]> granicus.if.org Git - postgresql/blob - configure
Update config/ax_pthread.m4 to latest upstream version.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 12devel.
4 #
5 # Report bugs to <pgsql-bugs@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-2018, 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@postgresql.org about your system, including
273 $0: any error possibly output before this message. Then
274 $0: install a modern shell, or manually run the script
275 $0: 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='12devel'
586 PACKAGE_STRING='PostgreSQL 12devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@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 SED
662 ZIC
663 python_additional_libs
664 python_libspec
665 python_libdir
666 python_includespec
667 python_version
668 python_majorversion
669 PYTHON
670 perl_embed_ldflags
671 perl_embed_ccflags
672 perl_includespec
673 perl_useshrplib
674 perl_privlibexp
675 perl_archlibexp
676 PERL
677 FLEXFLAGS
678 FLEX
679 BISONFLAGS
680 BISON
681 MKDIR_P
682 LN_S
683 TAR
684 install_bin
685 INSTALL_DATA
686 INSTALL_SCRIPT
687 INSTALL_PROGRAM
688 WINDRES
689 DLLWRAP
690 DLLTOOL
691 AR
692 STRIP_SHARED_LIB
693 STRIP_STATIC_LIB
694 STRIP
695 RANLIB
696 with_gnu_ld
697 LD
698 LDFLAGS_SL
699 LDFLAGS_EX
700 ELF_SYS
701 EGREP
702 GREP
703 with_zlib
704 with_system_tzdata
705 with_libxslt
706 with_libxml
707 XML2_CONFIG
708 UUID_EXTRA_OBJS
709 with_uuid
710 with_systemd
711 with_selinux
712 with_openssl
713 with_ldap
714 with_krb_srvnam
715 krb_srvtab
716 with_gssapi
717 with_python
718 with_perl
719 with_tcl
720 ICU_LIBS
721 ICU_CFLAGS
722 PKG_CONFIG_LIBDIR
723 PKG_CONFIG_PATH
724 PKG_CONFIG
725 with_icu
726 enable_thread_safety
727 INCLUDES
728 autodepend
729 TAS
730 GCC
731 CPP
732 BITCODE_CXXFLAGS
733 BITCODE_CFLAGS
734 CFLAGS_VECTOR
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_strong_random
765 enable_rpath
766 default_port
767 WANTED_LANGUAGES
768 enable_nls
769 PORTNAME
770 host_os
771 host_vendor
772 host_cpu
773 host
774 build_os
775 build_vendor
776 build_cpu
777 build
778 PG_MAJORVERSION
779 configure_args
780 target_alias
781 host_alias
782 build_alias
783 LIBS
784 ECHO_T
785 ECHO_N
786 ECHO_C
787 DEFS
788 mandir
789 localedir
790 libdir
791 psdir
792 pdfdir
793 dvidir
794 htmldir
795 infodir
796 docdir
797 oldincludedir
798 includedir
799 localstatedir
800 sharedstatedir
801 sysconfdir
802 datadir
803 datarootdir
804 libexecdir
805 sbindir
806 bindir
807 program_transform_name
808 prefix
809 exec_prefix
810 PACKAGE_URL
811 PACKAGE_BUGREPORT
812 PACKAGE_STRING
813 PACKAGE_VERSION
814 PACKAGE_TARNAME
815 PACKAGE_NAME
816 PATH_SEPARATOR
817 SHELL'
818 ac_subst_files=''
819 ac_user_opts='
820 enable_option_checking
821 with_extra_version
822 with_template
823 with_includes
824 with_libraries
825 with_libs
826 enable_integer_datetimes
827 enable_nls
828 with_pgport
829 enable_rpath
830 enable_spinlocks
831 enable_atomics
832 enable_strong_random
833 enable_debug
834 enable_profiling
835 enable_coverage
836 enable_dtrace
837 enable_tap_tests
838 with_blocksize
839 with_segsize
840 with_wal_blocksize
841 with_CC
842 with_llvm
843 enable_depend
844 enable_cassert
845 enable_thread_safety
846 with_icu
847 with_tcl
848 with_tclconfig
849 with_perl
850 with_python
851 with_gssapi
852 with_krb_srvnam
853 with_pam
854 with_bsd_auth
855 with_ldap
856 with_bonjour
857 with_openssl
858 with_selinux
859 with_systemd
860 with_readline
861 with_libedit_preferred
862 with_uuid
863 with_ossp_uuid
864 with_libxml
865 with_libxslt
866 with_system_tzdata
867 with_zlib
868 with_gnu_ld
869 enable_largefile
870 enable_float4_byval
871 enable_float8_byval
872 '
873       ac_precious_vars='build_alias
874 host_alias
875 target_alias
876 CC
877 CFLAGS
878 LDFLAGS
879 LIBS
880 CPPFLAGS
881 CXX
882 CXXFLAGS
883 CCC
884 LLVM_CONFIG
885 CLANG
886 CPP
887 PKG_CONFIG
888 PKG_CONFIG_PATH
889 PKG_CONFIG_LIBDIR
890 ICU_CFLAGS
891 ICU_LIBS
892 LDFLAGS_EX
893 LDFLAGS_SL'
894
895
896 # Initialize some variables set by options.
897 ac_init_help=
898 ac_init_version=false
899 ac_unrecognized_opts=
900 ac_unrecognized_sep=
901 # The variables have the same names as the options, with
902 # dashes changed to underlines.
903 cache_file=/dev/null
904 exec_prefix=NONE
905 no_create=
906 no_recursion=
907 prefix=NONE
908 program_prefix=NONE
909 program_suffix=NONE
910 program_transform_name=s,x,x,
911 silent=
912 site=
913 srcdir=
914 verbose=
915 x_includes=NONE
916 x_libraries=NONE
917
918 # Installation directory options.
919 # These are left unexpanded so users can "make install exec_prefix=/foo"
920 # and all the variables that are supposed to be based on exec_prefix
921 # by default will actually change.
922 # Use braces instead of parens because sh, perl, etc. also accept them.
923 # (The list follows the same order as the GNU Coding Standards.)
924 bindir='${exec_prefix}/bin'
925 sbindir='${exec_prefix}/sbin'
926 libexecdir='${exec_prefix}/libexec'
927 datarootdir='${prefix}/share'
928 datadir='${datarootdir}'
929 sysconfdir='${prefix}/etc'
930 sharedstatedir='${prefix}/com'
931 localstatedir='${prefix}/var'
932 includedir='${prefix}/include'
933 oldincludedir='/usr/include'
934 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
935 infodir='${datarootdir}/info'
936 htmldir='${docdir}'
937 dvidir='${docdir}'
938 pdfdir='${docdir}'
939 psdir='${docdir}'
940 libdir='${exec_prefix}/lib'
941 localedir='${datarootdir}/locale'
942 mandir='${datarootdir}/man'
943
944 ac_prev=
945 ac_dashdash=
946 for ac_option
947 do
948   # If the previous option needs an argument, assign it.
949   if test -n "$ac_prev"; then
950     eval $ac_prev=\$ac_option
951     ac_prev=
952     continue
953   fi
954
955   case $ac_option in
956   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
957   *=)   ac_optarg= ;;
958   *)    ac_optarg=yes ;;
959   esac
960
961   # Accept the important Cygnus configure options, so we can diagnose typos.
962
963   case $ac_dashdash$ac_option in
964   --)
965     ac_dashdash=yes ;;
966
967   -bindir | --bindir | --bindi | --bind | --bin | --bi)
968     ac_prev=bindir ;;
969   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
970     bindir=$ac_optarg ;;
971
972   -build | --build | --buil | --bui | --bu)
973     ac_prev=build_alias ;;
974   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
975     build_alias=$ac_optarg ;;
976
977   -cache-file | --cache-file | --cache-fil | --cache-fi \
978   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
979     ac_prev=cache_file ;;
980   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
981   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
982     cache_file=$ac_optarg ;;
983
984   --config-cache | -C)
985     cache_file=config.cache ;;
986
987   -datadir | --datadir | --datadi | --datad)
988     ac_prev=datadir ;;
989   -datadir=* | --datadir=* | --datadi=* | --datad=*)
990     datadir=$ac_optarg ;;
991
992   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
993   | --dataroo | --dataro | --datar)
994     ac_prev=datarootdir ;;
995   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
996   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
997     datarootdir=$ac_optarg ;;
998
999   -disable-* | --disable-*)
1000     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1001     # Reject names that are not valid shell variable names.
1002     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1003       as_fn_error $? "invalid feature name: $ac_useropt"
1004     ac_useropt_orig=$ac_useropt
1005     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1006     case $ac_user_opts in
1007       *"
1008 "enable_$ac_useropt"
1009 "*) ;;
1010       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1011          ac_unrecognized_sep=', ';;
1012     esac
1013     eval enable_$ac_useropt=no ;;
1014
1015   -docdir | --docdir | --docdi | --doc | --do)
1016     ac_prev=docdir ;;
1017   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1018     docdir=$ac_optarg ;;
1019
1020   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1021     ac_prev=dvidir ;;
1022   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1023     dvidir=$ac_optarg ;;
1024
1025   -enable-* | --enable-*)
1026     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1027     # Reject names that are not valid shell variable names.
1028     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1029       as_fn_error $? "invalid feature name: $ac_useropt"
1030     ac_useropt_orig=$ac_useropt
1031     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1032     case $ac_user_opts in
1033       *"
1034 "enable_$ac_useropt"
1035 "*) ;;
1036       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1037          ac_unrecognized_sep=', ';;
1038     esac
1039     eval enable_$ac_useropt=\$ac_optarg ;;
1040
1041   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1042   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1043   | --exec | --exe | --ex)
1044     ac_prev=exec_prefix ;;
1045   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1046   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1047   | --exec=* | --exe=* | --ex=*)
1048     exec_prefix=$ac_optarg ;;
1049
1050   -gas | --gas | --ga | --g)
1051     # Obsolete; use --with-gas.
1052     with_gas=yes ;;
1053
1054   -help | --help | --hel | --he | -h)
1055     ac_init_help=long ;;
1056   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1057     ac_init_help=recursive ;;
1058   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1059     ac_init_help=short ;;
1060
1061   -host | --host | --hos | --ho)
1062     ac_prev=host_alias ;;
1063   -host=* | --host=* | --hos=* | --ho=*)
1064     host_alias=$ac_optarg ;;
1065
1066   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1067     ac_prev=htmldir ;;
1068   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1069   | --ht=*)
1070     htmldir=$ac_optarg ;;
1071
1072   -includedir | --includedir | --includedi | --included | --include \
1073   | --includ | --inclu | --incl | --inc)
1074     ac_prev=includedir ;;
1075   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1076   | --includ=* | --inclu=* | --incl=* | --inc=*)
1077     includedir=$ac_optarg ;;
1078
1079   -infodir | --infodir | --infodi | --infod | --info | --inf)
1080     ac_prev=infodir ;;
1081   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1082     infodir=$ac_optarg ;;
1083
1084   -libdir | --libdir | --libdi | --libd)
1085     ac_prev=libdir ;;
1086   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1087     libdir=$ac_optarg ;;
1088
1089   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1090   | --libexe | --libex | --libe)
1091     ac_prev=libexecdir ;;
1092   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1093   | --libexe=* | --libex=* | --libe=*)
1094     libexecdir=$ac_optarg ;;
1095
1096   -localedir | --localedir | --localedi | --localed | --locale)
1097     ac_prev=localedir ;;
1098   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1099     localedir=$ac_optarg ;;
1100
1101   -localstatedir | --localstatedir | --localstatedi | --localstated \
1102   | --localstate | --localstat | --localsta | --localst | --locals)
1103     ac_prev=localstatedir ;;
1104   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1105   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1106     localstatedir=$ac_optarg ;;
1107
1108   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1109     ac_prev=mandir ;;
1110   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1111     mandir=$ac_optarg ;;
1112
1113   -nfp | --nfp | --nf)
1114     # Obsolete; use --without-fp.
1115     with_fp=no ;;
1116
1117   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1118   | --no-cr | --no-c | -n)
1119     no_create=yes ;;
1120
1121   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1122   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1123     no_recursion=yes ;;
1124
1125   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1126   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1127   | --oldin | --oldi | --old | --ol | --o)
1128     ac_prev=oldincludedir ;;
1129   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1130   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1131   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1132     oldincludedir=$ac_optarg ;;
1133
1134   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1135     ac_prev=prefix ;;
1136   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1137     prefix=$ac_optarg ;;
1138
1139   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1140   | --program-pre | --program-pr | --program-p)
1141     ac_prev=program_prefix ;;
1142   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1143   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1144     program_prefix=$ac_optarg ;;
1145
1146   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1147   | --program-suf | --program-su | --program-s)
1148     ac_prev=program_suffix ;;
1149   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1150   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1151     program_suffix=$ac_optarg ;;
1152
1153   -program-transform-name | --program-transform-name \
1154   | --program-transform-nam | --program-transform-na \
1155   | --program-transform-n | --program-transform- \
1156   | --program-transform | --program-transfor \
1157   | --program-transfo | --program-transf \
1158   | --program-trans | --program-tran \
1159   | --progr-tra | --program-tr | --program-t)
1160     ac_prev=program_transform_name ;;
1161   -program-transform-name=* | --program-transform-name=* \
1162   | --program-transform-nam=* | --program-transform-na=* \
1163   | --program-transform-n=* | --program-transform-=* \
1164   | --program-transform=* | --program-transfor=* \
1165   | --program-transfo=* | --program-transf=* \
1166   | --program-trans=* | --program-tran=* \
1167   | --progr-tra=* | --program-tr=* | --program-t=*)
1168     program_transform_name=$ac_optarg ;;
1169
1170   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1171     ac_prev=pdfdir ;;
1172   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1173     pdfdir=$ac_optarg ;;
1174
1175   -psdir | --psdir | --psdi | --psd | --ps)
1176     ac_prev=psdir ;;
1177   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1178     psdir=$ac_optarg ;;
1179
1180   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1181   | -silent | --silent | --silen | --sile | --sil)
1182     silent=yes ;;
1183
1184   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1185     ac_prev=sbindir ;;
1186   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1187   | --sbi=* | --sb=*)
1188     sbindir=$ac_optarg ;;
1189
1190   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1191   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1192   | --sharedst | --shareds | --shared | --share | --shar \
1193   | --sha | --sh)
1194     ac_prev=sharedstatedir ;;
1195   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1196   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1197   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1198   | --sha=* | --sh=*)
1199     sharedstatedir=$ac_optarg ;;
1200
1201   -site | --site | --sit)
1202     ac_prev=site ;;
1203   -site=* | --site=* | --sit=*)
1204     site=$ac_optarg ;;
1205
1206   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1207     ac_prev=srcdir ;;
1208   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1209     srcdir=$ac_optarg ;;
1210
1211   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1212   | --syscon | --sysco | --sysc | --sys | --sy)
1213     ac_prev=sysconfdir ;;
1214   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1215   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1216     sysconfdir=$ac_optarg ;;
1217
1218   -target | --target | --targe | --targ | --tar | --ta | --t)
1219     ac_prev=target_alias ;;
1220   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1221     target_alias=$ac_optarg ;;
1222
1223   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1224     verbose=yes ;;
1225
1226   -version | --version | --versio | --versi | --vers | -V)
1227     ac_init_version=: ;;
1228
1229   -with-* | --with-*)
1230     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1231     # Reject names that are not valid shell variable names.
1232     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1233       as_fn_error $? "invalid package name: $ac_useropt"
1234     ac_useropt_orig=$ac_useropt
1235     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1236     case $ac_user_opts in
1237       *"
1238 "with_$ac_useropt"
1239 "*) ;;
1240       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1241          ac_unrecognized_sep=', ';;
1242     esac
1243     eval with_$ac_useropt=\$ac_optarg ;;
1244
1245   -without-* | --without-*)
1246     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1247     # Reject names that are not valid shell variable names.
1248     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1249       as_fn_error $? "invalid package name: $ac_useropt"
1250     ac_useropt_orig=$ac_useropt
1251     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1252     case $ac_user_opts in
1253       *"
1254 "with_$ac_useropt"
1255 "*) ;;
1256       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1257          ac_unrecognized_sep=', ';;
1258     esac
1259     eval with_$ac_useropt=no ;;
1260
1261   --x)
1262     # Obsolete; use --with-x.
1263     with_x=yes ;;
1264
1265   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1266   | --x-incl | --x-inc | --x-in | --x-i)
1267     ac_prev=x_includes ;;
1268   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1269   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1270     x_includes=$ac_optarg ;;
1271
1272   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1273   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1274     ac_prev=x_libraries ;;
1275   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1276   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1277     x_libraries=$ac_optarg ;;
1278
1279   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1280 Try \`$0 --help' for more information"
1281     ;;
1282
1283   *=*)
1284     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1285     # Reject names that are not valid shell variable names.
1286     case $ac_envvar in #(
1287       '' | [0-9]* | *[!_$as_cr_alnum]* )
1288       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1289     esac
1290     eval $ac_envvar=\$ac_optarg
1291     export $ac_envvar ;;
1292
1293   *)
1294     # FIXME: should be removed in autoconf 3.0.
1295     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1296     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1297       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1298     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1299     ;;
1300
1301   esac
1302 done
1303
1304 if test -n "$ac_prev"; then
1305   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1306   as_fn_error $? "missing argument to $ac_option"
1307 fi
1308
1309 if test -n "$ac_unrecognized_opts"; then
1310   case $enable_option_checking in
1311     no) ;;
1312     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1313     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1314   esac
1315 fi
1316
1317 # Check all directory arguments for consistency.
1318 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1319                 datadir sysconfdir sharedstatedir localstatedir includedir \
1320                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1321                 libdir localedir mandir
1322 do
1323   eval ac_val=\$$ac_var
1324   # Remove trailing slashes.
1325   case $ac_val in
1326     */ )
1327       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1328       eval $ac_var=\$ac_val;;
1329   esac
1330   # Be sure to have absolute directory names.
1331   case $ac_val in
1332     [\\/$]* | ?:[\\/]* )  continue;;
1333     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1334   esac
1335   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1336 done
1337
1338 # There might be people who depend on the old broken behavior: `$host'
1339 # used to hold the argument of --host etc.
1340 # FIXME: To remove some day.
1341 build=$build_alias
1342 host=$host_alias
1343 target=$target_alias
1344
1345 # FIXME: To remove some day.
1346 if test "x$host_alias" != x; then
1347   if test "x$build_alias" = x; then
1348     cross_compiling=maybe
1349   elif test "x$build_alias" != "x$host_alias"; then
1350     cross_compiling=yes
1351   fi
1352 fi
1353
1354 ac_tool_prefix=
1355 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1356
1357 test "$silent" = yes && exec 6>/dev/null
1358
1359
1360 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1361 ac_ls_di=`ls -di .` &&
1362 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1363   as_fn_error $? "working directory cannot be determined"
1364 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1365   as_fn_error $? "pwd does not report name of working directory"
1366
1367
1368 # Find the source files, if location was not specified.
1369 if test -z "$srcdir"; then
1370   ac_srcdir_defaulted=yes
1371   # Try the directory containing this script, then the parent directory.
1372   ac_confdir=`$as_dirname -- "$as_myself" ||
1373 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1374          X"$as_myself" : 'X\(//\)[^/]' \| \
1375          X"$as_myself" : 'X\(//\)$' \| \
1376          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1377 $as_echo X"$as_myself" |
1378     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1379             s//\1/
1380             q
1381           }
1382           /^X\(\/\/\)[^/].*/{
1383             s//\1/
1384             q
1385           }
1386           /^X\(\/\/\)$/{
1387             s//\1/
1388             q
1389           }
1390           /^X\(\/\).*/{
1391             s//\1/
1392             q
1393           }
1394           s/.*/./; q'`
1395   srcdir=$ac_confdir
1396   if test ! -r "$srcdir/$ac_unique_file"; then
1397     srcdir=..
1398   fi
1399 else
1400   ac_srcdir_defaulted=no
1401 fi
1402 if test ! -r "$srcdir/$ac_unique_file"; then
1403   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1404   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1405 fi
1406 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1407 ac_abs_confdir=`(
1408         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1409         pwd)`
1410 # When building in place, set srcdir=.
1411 if test "$ac_abs_confdir" = "$ac_pwd"; then
1412   srcdir=.
1413 fi
1414 # Remove unnecessary trailing slashes from srcdir.
1415 # Double slashes in file names in object file debugging info
1416 # mess up M-x gdb in Emacs.
1417 case $srcdir in
1418 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1419 esac
1420 for ac_var in $ac_precious_vars; do
1421   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1422   eval ac_env_${ac_var}_value=\$${ac_var}
1423   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1424   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1425 done
1426
1427 #
1428 # Report the --help message.
1429 #
1430 if test "$ac_init_help" = "long"; then
1431   # Omit some internal or obsolete options to make the list less imposing.
1432   # This message is too long to be a string in the A/UX 3.1 sh.
1433   cat <<_ACEOF
1434 \`configure' configures PostgreSQL 12devel to adapt to many kinds of systems.
1435
1436 Usage: $0 [OPTION]... [VAR=VALUE]...
1437
1438 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1439 VAR=VALUE.  See below for descriptions of some of the useful variables.
1440
1441 Defaults for the options are specified in brackets.
1442
1443 Configuration:
1444   -h, --help              display this help and exit
1445       --help=short        display options specific to this package
1446       --help=recursive    display the short help of all the included packages
1447   -V, --version           display version information and exit
1448   -q, --quiet, --silent   do not print \`checking ...' messages
1449       --cache-file=FILE   cache test results in FILE [disabled]
1450   -C, --config-cache      alias for \`--cache-file=config.cache'
1451   -n, --no-create         do not create output files
1452       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1453
1454 Installation directories:
1455   --prefix=PREFIX         install architecture-independent files in PREFIX
1456                           [$ac_default_prefix]
1457   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1458                           [PREFIX]
1459
1460 By default, \`make install' will install all the files in
1461 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1462 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1463 for instance \`--prefix=\$HOME'.
1464
1465 For better control, use the options below.
1466
1467 Fine tuning of the installation directories:
1468   --bindir=DIR            user executables [EPREFIX/bin]
1469   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1470   --libexecdir=DIR        program executables [EPREFIX/libexec]
1471   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1472   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1473   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1474   --libdir=DIR            object code libraries [EPREFIX/lib]
1475   --includedir=DIR        C header files [PREFIX/include]
1476   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1477   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1478   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1479   --infodir=DIR           info documentation [DATAROOTDIR/info]
1480   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1481   --mandir=DIR            man documentation [DATAROOTDIR/man]
1482   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1483   --htmldir=DIR           html documentation [DOCDIR]
1484   --dvidir=DIR            dvi documentation [DOCDIR]
1485   --pdfdir=DIR            pdf documentation [DOCDIR]
1486   --psdir=DIR             ps documentation [DOCDIR]
1487 _ACEOF
1488
1489   cat <<\_ACEOF
1490
1491 System types:
1492   --build=BUILD     configure for building on BUILD [guessed]
1493   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1494 _ACEOF
1495 fi
1496
1497 if test -n "$ac_init_help"; then
1498   case $ac_init_help in
1499      short | recursive ) echo "Configuration of PostgreSQL 12devel:";;
1500    esac
1501   cat <<\_ACEOF
1502
1503 Optional Features:
1504   --disable-option-checking  ignore unrecognized --enable/--with options
1505   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1506   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1507   --disable-integer-datetimes
1508                           obsolete option, no longer supported
1509   --enable-nls[=LANGUAGES]
1510                           enable Native Language Support
1511   --disable-rpath         do not embed shared library search path in
1512                           executables
1513   --disable-spinlocks     do not use spinlocks
1514   --disable-atomics       do not use atomic operations
1515   --disable-strong-random do not use a strong random number source
1516   --enable-debug          build with debugging symbols (-g)
1517   --enable-profiling      build with profiling enabled
1518   --enable-coverage       build with coverage testing instrumentation
1519   --enable-dtrace         build with DTrace support
1520   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1521   --enable-depend         turn on automatic dependency tracking
1522   --enable-cassert        enable assertion checks (for debugging)
1523   --disable-thread-safety disable thread-safety in client libraries
1524   --disable-largefile     omit support for large files
1525   --disable-float4-byval  disable float4 passed by value
1526   --disable-float8-byval  disable float8 passed by value
1527
1528 Optional Packages:
1529   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1530   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1531   --with-extra-version=STRING
1532                           append STRING to version
1533   --with-template=NAME    override operating system template
1534   --with-includes=DIRS    look for additional header files in DIRS
1535   --with-libraries=DIRS   look for additional libraries in DIRS
1536   --with-libs=DIRS        alternative spelling of --with-libraries
1537   --with-pgport=PORTNUM   set default port number [5432]
1538   --with-blocksize=BLOCKSIZE
1539                           set table block size in kB [8]
1540   --with-segsize=SEGSIZE  set table segment size in GB [1]
1541   --with-wal-blocksize=BLOCKSIZE
1542                           set WAL block size in kB [8]
1543   --with-CC=CMD           set compiler (deprecated)
1544   --with-llvm             build with LLVM based JIT support
1545   --with-icu              build with ICU support
1546   --with-tcl              build Tcl modules (PL/Tcl)
1547   --with-tclconfig=DIR    tclConfig.sh is in DIR
1548   --with-perl             build Perl modules (PL/Perl)
1549   --with-python           build Python modules (PL/Python)
1550   --with-gssapi           build with GSSAPI support
1551   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1552                           [postgres]
1553   --with-pam              build with PAM support
1554   --with-bsd-auth         build with BSD Authentication support
1555   --with-ldap             build with LDAP support
1556   --with-bonjour          build with Bonjour support
1557   --with-openssl          build with OpenSSL support
1558   --with-selinux          build with SELinux support
1559   --with-systemd          build with systemd support
1560   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1561   --with-libedit-preferred
1562                           prefer BSD Libedit over GNU Readline
1563   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1564   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1565   --with-libxml           build with XML support
1566   --with-libxslt          use XSLT support when building contrib/xml2
1567   --with-system-tzdata=DIR
1568                           use system time zone data in DIR
1569   --without-zlib          do not use Zlib
1570   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1571
1572 Some influential environment variables:
1573   CC          C compiler command
1574   CFLAGS      C compiler flags
1575   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1576               nonstandard directory <lib dir>
1577   LIBS        libraries to pass to the linker, e.g. -l<library>
1578   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1579               you have headers in a nonstandard directory <include dir>
1580   CXX         C++ compiler command
1581   CXXFLAGS    C++ compiler flags
1582   LLVM_CONFIG path to llvm-config command
1583   CLANG       path to clang compiler to generate bitcode
1584   CPP         C preprocessor
1585   PKG_CONFIG  path to pkg-config utility
1586   PKG_CONFIG_PATH
1587               directories to add to pkg-config's search path
1588   PKG_CONFIG_LIBDIR
1589               path overriding pkg-config's built-in search path
1590   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1591   ICU_LIBS    linker flags for ICU, overriding pkg-config
1592   LDFLAGS_EX  extra linker flags for linking executables only
1593   LDFLAGS_SL  extra linker flags for linking shared libraries only
1594
1595 Use these variables to override the choices made by `configure' or to help
1596 it to find libraries and programs with nonstandard names/locations.
1597
1598 Report bugs to <pgsql-bugs@postgresql.org>.
1599 _ACEOF
1600 ac_status=$?
1601 fi
1602
1603 if test "$ac_init_help" = "recursive"; then
1604   # If there are subdirs, report their specific --help.
1605   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1606     test -d "$ac_dir" ||
1607       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1608       continue
1609     ac_builddir=.
1610
1611 case "$ac_dir" in
1612 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1613 *)
1614   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1615   # A ".." for each directory in $ac_dir_suffix.
1616   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1617   case $ac_top_builddir_sub in
1618   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1619   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1620   esac ;;
1621 esac
1622 ac_abs_top_builddir=$ac_pwd
1623 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1624 # for backward compatibility:
1625 ac_top_builddir=$ac_top_build_prefix
1626
1627 case $srcdir in
1628   .)  # We are building in place.
1629     ac_srcdir=.
1630     ac_top_srcdir=$ac_top_builddir_sub
1631     ac_abs_top_srcdir=$ac_pwd ;;
1632   [\\/]* | ?:[\\/]* )  # Absolute name.
1633     ac_srcdir=$srcdir$ac_dir_suffix;
1634     ac_top_srcdir=$srcdir
1635     ac_abs_top_srcdir=$srcdir ;;
1636   *) # Relative name.
1637     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1638     ac_top_srcdir=$ac_top_build_prefix$srcdir
1639     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1640 esac
1641 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1642
1643     cd "$ac_dir" || { ac_status=$?; continue; }
1644     # Check for guested configure.
1645     if test -f "$ac_srcdir/configure.gnu"; then
1646       echo &&
1647       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1648     elif test -f "$ac_srcdir/configure"; then
1649       echo &&
1650       $SHELL "$ac_srcdir/configure" --help=recursive
1651     else
1652       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1653     fi || ac_status=$?
1654     cd "$ac_pwd" || { ac_status=$?; break; }
1655   done
1656 fi
1657
1658 test -n "$ac_init_help" && exit $ac_status
1659 if $ac_init_version; then
1660   cat <<\_ACEOF
1661 PostgreSQL configure 12devel
1662 generated by GNU Autoconf 2.69
1663
1664 Copyright (C) 2012 Free Software Foundation, Inc.
1665 This configure script is free software; the Free Software Foundation
1666 gives unlimited permission to copy, distribute and modify it.
1667
1668 Copyright (c) 1996-2018, PostgreSQL Global Development Group
1669 _ACEOF
1670   exit
1671 fi
1672
1673 ## ------------------------ ##
1674 ## Autoconf initialization. ##
1675 ## ------------------------ ##
1676
1677 # ac_fn_c_try_compile LINENO
1678 # --------------------------
1679 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1680 ac_fn_c_try_compile ()
1681 {
1682   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1683   rm -f conftest.$ac_objext
1684   if { { ac_try="$ac_compile"
1685 case "(($ac_try" in
1686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1687   *) ac_try_echo=$ac_try;;
1688 esac
1689 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1690 $as_echo "$ac_try_echo"; } >&5
1691   (eval "$ac_compile") 2>conftest.err
1692   ac_status=$?
1693   if test -s conftest.err; then
1694     grep -v '^ *+' conftest.err >conftest.er1
1695     cat conftest.er1 >&5
1696     mv -f conftest.er1 conftest.err
1697   fi
1698   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1699   test $ac_status = 0; } && {
1700          test -z "$ac_c_werror_flag" ||
1701          test ! -s conftest.err
1702        } && test -s conftest.$ac_objext; then :
1703   ac_retval=0
1704 else
1705   $as_echo "$as_me: failed program was:" >&5
1706 sed 's/^/| /' conftest.$ac_ext >&5
1707
1708         ac_retval=1
1709 fi
1710   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1711   as_fn_set_status $ac_retval
1712
1713 } # ac_fn_c_try_compile
1714
1715 # ac_fn_cxx_try_compile LINENO
1716 # ----------------------------
1717 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1718 ac_fn_cxx_try_compile ()
1719 {
1720   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1721   rm -f conftest.$ac_objext
1722   if { { ac_try="$ac_compile"
1723 case "(($ac_try" in
1724   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1725   *) ac_try_echo=$ac_try;;
1726 esac
1727 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1728 $as_echo "$ac_try_echo"; } >&5
1729   (eval "$ac_compile") 2>conftest.err
1730   ac_status=$?
1731   if test -s conftest.err; then
1732     grep -v '^ *+' conftest.err >conftest.er1
1733     cat conftest.er1 >&5
1734     mv -f conftest.er1 conftest.err
1735   fi
1736   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1737   test $ac_status = 0; } && {
1738          test -z "$ac_cxx_werror_flag" ||
1739          test ! -s conftest.err
1740        } && test -s conftest.$ac_objext; then :
1741   ac_retval=0
1742 else
1743   $as_echo "$as_me: failed program was:" >&5
1744 sed 's/^/| /' conftest.$ac_ext >&5
1745
1746         ac_retval=1
1747 fi
1748   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1749   as_fn_set_status $ac_retval
1750
1751 } # ac_fn_cxx_try_compile
1752
1753 # ac_fn_c_try_link LINENO
1754 # -----------------------
1755 # Try to link conftest.$ac_ext, and return whether this succeeded.
1756 ac_fn_c_try_link ()
1757 {
1758   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1759   rm -f conftest.$ac_objext conftest$ac_exeext
1760   if { { ac_try="$ac_link"
1761 case "(($ac_try" in
1762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1763   *) ac_try_echo=$ac_try;;
1764 esac
1765 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1766 $as_echo "$ac_try_echo"; } >&5
1767   (eval "$ac_link") 2>conftest.err
1768   ac_status=$?
1769   if test -s conftest.err; then
1770     grep -v '^ *+' conftest.err >conftest.er1
1771     cat conftest.er1 >&5
1772     mv -f conftest.er1 conftest.err
1773   fi
1774   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1775   test $ac_status = 0; } && {
1776          test -z "$ac_c_werror_flag" ||
1777          test ! -s conftest.err
1778        } && test -s conftest$ac_exeext && {
1779          test "$cross_compiling" = yes ||
1780          test -x conftest$ac_exeext
1781        }; then :
1782   ac_retval=0
1783 else
1784   $as_echo "$as_me: failed program was:" >&5
1785 sed 's/^/| /' conftest.$ac_ext >&5
1786
1787         ac_retval=1
1788 fi
1789   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1790   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1791   # interfere with the next link command; also delete a directory that is
1792   # left behind by Apple's compiler.  We do this before executing the actions.
1793   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1794   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1795   as_fn_set_status $ac_retval
1796
1797 } # ac_fn_c_try_link
1798
1799 # ac_fn_c_try_cpp LINENO
1800 # ----------------------
1801 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1802 ac_fn_c_try_cpp ()
1803 {
1804   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805   if { { ac_try="$ac_cpp conftest.$ac_ext"
1806 case "(($ac_try" in
1807   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1808   *) ac_try_echo=$ac_try;;
1809 esac
1810 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1811 $as_echo "$ac_try_echo"; } >&5
1812   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1813   ac_status=$?
1814   if test -s conftest.err; then
1815     grep -v '^ *+' conftest.err >conftest.er1
1816     cat conftest.er1 >&5
1817     mv -f conftest.er1 conftest.err
1818   fi
1819   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1820   test $ac_status = 0; } > conftest.i && {
1821          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1822          test ! -s conftest.err
1823        }; then :
1824   ac_retval=0
1825 else
1826   $as_echo "$as_me: failed program was:" >&5
1827 sed 's/^/| /' conftest.$ac_ext >&5
1828
1829     ac_retval=1
1830 fi
1831   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1832   as_fn_set_status $ac_retval
1833
1834 } # ac_fn_c_try_cpp
1835
1836 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1837 # -------------------------------------------------------
1838 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1839 # the include files in INCLUDES and setting the cache variable VAR
1840 # accordingly.
1841 ac_fn_c_check_header_mongrel ()
1842 {
1843   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1844   if eval \${$3+:} false; then :
1845   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846 $as_echo_n "checking for $2... " >&6; }
1847 if eval \${$3+:} false; then :
1848   $as_echo_n "(cached) " >&6
1849 fi
1850 eval ac_res=\$$3
1851                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1852 $as_echo "$ac_res" >&6; }
1853 else
1854   # Is the header compilable?
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1856 $as_echo_n "checking $2 usability... " >&6; }
1857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1858 /* end confdefs.h.  */
1859 $4
1860 #include <$2>
1861 _ACEOF
1862 if ac_fn_c_try_compile "$LINENO"; then :
1863   ac_header_compiler=yes
1864 else
1865   ac_header_compiler=no
1866 fi
1867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1869 $as_echo "$ac_header_compiler" >&6; }
1870
1871 # Is the header present?
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1873 $as_echo_n "checking $2 presence... " >&6; }
1874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1875 /* end confdefs.h.  */
1876 #include <$2>
1877 _ACEOF
1878 if ac_fn_c_try_cpp "$LINENO"; then :
1879   ac_header_preproc=yes
1880 else
1881   ac_header_preproc=no
1882 fi
1883 rm -f conftest.err conftest.i conftest.$ac_ext
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1885 $as_echo "$ac_header_preproc" >&6; }
1886
1887 # So?  What about this header?
1888 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1889   yes:no: )
1890     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1891 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1892     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1893 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1894     ;;
1895   no:yes:* )
1896     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1897 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1898     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1899 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1900     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1901 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1902     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1903 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1904     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1905 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1906 ( $as_echo "## ---------------------------------------- ##
1907 ## Report this to pgsql-bugs@postgresql.org ##
1908 ## ---------------------------------------- ##"
1909      ) | sed "s/^/$as_me: WARNING:     /" >&2
1910     ;;
1911 esac
1912   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1913 $as_echo_n "checking for $2... " >&6; }
1914 if eval \${$3+:} false; then :
1915   $as_echo_n "(cached) " >&6
1916 else
1917   eval "$3=\$ac_header_compiler"
1918 fi
1919 eval ac_res=\$$3
1920                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1921 $as_echo "$ac_res" >&6; }
1922 fi
1923   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1924
1925 } # ac_fn_c_check_header_mongrel
1926
1927 # ac_fn_c_try_run LINENO
1928 # ----------------------
1929 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1930 # that executables *can* be run.
1931 ac_fn_c_try_run ()
1932 {
1933   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934   if { { ac_try="$ac_link"
1935 case "(($ac_try" in
1936   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1937   *) ac_try_echo=$ac_try;;
1938 esac
1939 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1940 $as_echo "$ac_try_echo"; } >&5
1941   (eval "$ac_link") 2>&5
1942   ac_status=$?
1943   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1944   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1945   { { case "(($ac_try" in
1946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1947   *) ac_try_echo=$ac_try;;
1948 esac
1949 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1950 $as_echo "$ac_try_echo"; } >&5
1951   (eval "$ac_try") 2>&5
1952   ac_status=$?
1953   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1954   test $ac_status = 0; }; }; then :
1955   ac_retval=0
1956 else
1957   $as_echo "$as_me: program exited with status $ac_status" >&5
1958        $as_echo "$as_me: failed program was:" >&5
1959 sed 's/^/| /' conftest.$ac_ext >&5
1960
1961        ac_retval=$ac_status
1962 fi
1963   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1964   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1965   as_fn_set_status $ac_retval
1966
1967 } # ac_fn_c_try_run
1968
1969 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1970 # -------------------------------------------------------
1971 # Tests whether HEADER exists and can be compiled using the include files in
1972 # INCLUDES, setting the cache variable VAR accordingly.
1973 ac_fn_c_check_header_compile ()
1974 {
1975   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1977 $as_echo_n "checking for $2... " >&6; }
1978 if eval \${$3+:} false; then :
1979   $as_echo_n "(cached) " >&6
1980 else
1981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982 /* end confdefs.h.  */
1983 $4
1984 #include <$2>
1985 _ACEOF
1986 if ac_fn_c_try_compile "$LINENO"; then :
1987   eval "$3=yes"
1988 else
1989   eval "$3=no"
1990 fi
1991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1992 fi
1993 eval ac_res=\$$3
1994                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1995 $as_echo "$ac_res" >&6; }
1996   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1997
1998 } # ac_fn_c_check_header_compile
1999
2000 # ac_fn_c_check_func LINENO FUNC VAR
2001 # ----------------------------------
2002 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2003 ac_fn_c_check_func ()
2004 {
2005   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2007 $as_echo_n "checking for $2... " >&6; }
2008 if eval \${$3+:} false; then :
2009   $as_echo_n "(cached) " >&6
2010 else
2011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012 /* end confdefs.h.  */
2013 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2014    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2015 #define $2 innocuous_$2
2016
2017 /* System header to define __stub macros and hopefully few prototypes,
2018     which can conflict with char $2 (); below.
2019     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2020     <limits.h> exists even on freestanding compilers.  */
2021
2022 #ifdef __STDC__
2023 # include <limits.h>
2024 #else
2025 # include <assert.h>
2026 #endif
2027
2028 #undef $2
2029
2030 /* Override any GCC internal prototype to avoid an error.
2031    Use char because int might match the return type of a GCC
2032    builtin and then its argument prototype would still apply.  */
2033 #ifdef __cplusplus
2034 extern "C"
2035 #endif
2036 char $2 ();
2037 /* The GNU C library defines this for functions which it implements
2038     to always fail with ENOSYS.  Some functions are actually named
2039     something starting with __ and the normal name is an alias.  */
2040 #if defined __stub_$2 || defined __stub___$2
2041 choke me
2042 #endif
2043
2044 int
2045 main ()
2046 {
2047 return $2 ();
2048   ;
2049   return 0;
2050 }
2051 _ACEOF
2052 if ac_fn_c_try_link "$LINENO"; then :
2053   eval "$3=yes"
2054 else
2055   eval "$3=no"
2056 fi
2057 rm -f core conftest.err conftest.$ac_objext \
2058     conftest$ac_exeext conftest.$ac_ext
2059 fi
2060 eval ac_res=\$$3
2061                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2062 $as_echo "$ac_res" >&6; }
2063   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2064
2065 } # ac_fn_c_check_func
2066
2067 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2068 # -------------------------------------------
2069 # Tests whether TYPE exists after having included INCLUDES, setting cache
2070 # variable VAR accordingly.
2071 ac_fn_c_check_type ()
2072 {
2073   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2074   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2075 $as_echo_n "checking for $2... " >&6; }
2076 if eval \${$3+:} false; then :
2077   $as_echo_n "(cached) " >&6
2078 else
2079   eval "$3=no"
2080   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081 /* end confdefs.h.  */
2082 $4
2083 int
2084 main ()
2085 {
2086 if (sizeof ($2))
2087          return 0;
2088   ;
2089   return 0;
2090 }
2091 _ACEOF
2092 if ac_fn_c_try_compile "$LINENO"; then :
2093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094 /* end confdefs.h.  */
2095 $4
2096 int
2097 main ()
2098 {
2099 if (sizeof (($2)))
2100             return 0;
2101   ;
2102   return 0;
2103 }
2104 _ACEOF
2105 if ac_fn_c_try_compile "$LINENO"; then :
2106
2107 else
2108   eval "$3=yes"
2109 fi
2110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111 fi
2112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113 fi
2114 eval ac_res=\$$3
2115                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2116 $as_echo "$ac_res" >&6; }
2117   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2118
2119 } # ac_fn_c_check_type
2120
2121 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2122 # ----------------------------------------------------
2123 # Tries to find if the field MEMBER exists in type AGGR, after including
2124 # INCLUDES, setting cache variable VAR accordingly.
2125 ac_fn_c_check_member ()
2126 {
2127   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2128   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2129 $as_echo_n "checking for $2.$3... " >&6; }
2130 if eval \${$4+:} false; then :
2131   $as_echo_n "(cached) " >&6
2132 else
2133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2134 /* end confdefs.h.  */
2135 $5
2136 int
2137 main ()
2138 {
2139 static $2 ac_aggr;
2140 if (ac_aggr.$3)
2141 return 0;
2142   ;
2143   return 0;
2144 }
2145 _ACEOF
2146 if ac_fn_c_try_compile "$LINENO"; then :
2147   eval "$4=yes"
2148 else
2149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150 /* end confdefs.h.  */
2151 $5
2152 int
2153 main ()
2154 {
2155 static $2 ac_aggr;
2156 if (sizeof ac_aggr.$3)
2157 return 0;
2158   ;
2159   return 0;
2160 }
2161 _ACEOF
2162 if ac_fn_c_try_compile "$LINENO"; then :
2163   eval "$4=yes"
2164 else
2165   eval "$4=no"
2166 fi
2167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2168 fi
2169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170 fi
2171 eval ac_res=\$$4
2172                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2173 $as_echo "$ac_res" >&6; }
2174   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2175
2176 } # ac_fn_c_check_member
2177
2178 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2179 # --------------------------------------------
2180 # Tries to find the compile-time value of EXPR in a program that includes
2181 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2182 # computed
2183 ac_fn_c_compute_int ()
2184 {
2185   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186   if test "$cross_compiling" = yes; then
2187     # Depending upon the size, compute the lo and hi bounds.
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189 /* end confdefs.h.  */
2190 $4
2191 int
2192 main ()
2193 {
2194 static int test_array [1 - 2 * !(($2) >= 0)];
2195 test_array [0] = 0;
2196 return test_array [0];
2197
2198   ;
2199   return 0;
2200 }
2201 _ACEOF
2202 if ac_fn_c_try_compile "$LINENO"; then :
2203   ac_lo=0 ac_mid=0
2204   while :; do
2205     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2206 /* end confdefs.h.  */
2207 $4
2208 int
2209 main ()
2210 {
2211 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2212 test_array [0] = 0;
2213 return test_array [0];
2214
2215   ;
2216   return 0;
2217 }
2218 _ACEOF
2219 if ac_fn_c_try_compile "$LINENO"; then :
2220   ac_hi=$ac_mid; break
2221 else
2222   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2223                         if test $ac_lo -le $ac_mid; then
2224                           ac_lo= ac_hi=
2225                           break
2226                         fi
2227                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2228 fi
2229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2230   done
2231 else
2232   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233 /* end confdefs.h.  */
2234 $4
2235 int
2236 main ()
2237 {
2238 static int test_array [1 - 2 * !(($2) < 0)];
2239 test_array [0] = 0;
2240 return test_array [0];
2241
2242   ;
2243   return 0;
2244 }
2245 _ACEOF
2246 if ac_fn_c_try_compile "$LINENO"; then :
2247   ac_hi=-1 ac_mid=-1
2248   while :; do
2249     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250 /* end confdefs.h.  */
2251 $4
2252 int
2253 main ()
2254 {
2255 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2256 test_array [0] = 0;
2257 return test_array [0];
2258
2259   ;
2260   return 0;
2261 }
2262 _ACEOF
2263 if ac_fn_c_try_compile "$LINENO"; then :
2264   ac_lo=$ac_mid; break
2265 else
2266   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2267                         if test $ac_mid -le $ac_hi; then
2268                           ac_lo= ac_hi=
2269                           break
2270                         fi
2271                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2272 fi
2273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2274   done
2275 else
2276   ac_lo= ac_hi=
2277 fi
2278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279 fi
2280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281 # Binary search between lo and hi bounds.
2282 while test "x$ac_lo" != "x$ac_hi"; do
2283   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285 /* end confdefs.h.  */
2286 $4
2287 int
2288 main ()
2289 {
2290 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2291 test_array [0] = 0;
2292 return test_array [0];
2293
2294   ;
2295   return 0;
2296 }
2297 _ACEOF
2298 if ac_fn_c_try_compile "$LINENO"; then :
2299   ac_hi=$ac_mid
2300 else
2301   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2302 fi
2303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304 done
2305 case $ac_lo in #((
2306 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2307 '') ac_retval=1 ;;
2308 esac
2309   else
2310     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311 /* end confdefs.h.  */
2312 $4
2313 static long int longval () { return $2; }
2314 static unsigned long int ulongval () { return $2; }
2315 #include <stdio.h>
2316 #include <stdlib.h>
2317 int
2318 main ()
2319 {
2320
2321   FILE *f = fopen ("conftest.val", "w");
2322   if (! f)
2323     return 1;
2324   if (($2) < 0)
2325     {
2326       long int i = longval ();
2327       if (i != ($2))
2328         return 1;
2329       fprintf (f, "%ld", i);
2330     }
2331   else
2332     {
2333       unsigned long int i = ulongval ();
2334       if (i != ($2))
2335         return 1;
2336       fprintf (f, "%lu", i);
2337     }
2338   /* Do not output a trailing newline, as this causes \r\n confusion
2339      on some platforms.  */
2340   return ferror (f) || fclose (f) != 0;
2341
2342   ;
2343   return 0;
2344 }
2345 _ACEOF
2346 if ac_fn_c_try_run "$LINENO"; then :
2347   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2348 else
2349   ac_retval=1
2350 fi
2351 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2352   conftest.$ac_objext conftest.beam conftest.$ac_ext
2353 rm -f conftest.val
2354
2355   fi
2356   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2357   as_fn_set_status $ac_retval
2358
2359 } # ac_fn_c_compute_int
2360
2361 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2362 # ---------------------------------------------
2363 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2364 # accordingly.
2365 ac_fn_c_check_decl ()
2366 {
2367   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368   # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2369       as_decl_name=`echo $2|sed 's/ *(.*//'`
2370   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2371   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2372 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2373 if eval \${$3+:} false; then :
2374   $as_echo_n "(cached) " >&6
2375 else
2376   ac_save_werror_flag=$ac_c_werror_flag
2377   ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2378   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379 /* end confdefs.h.  */
2380 $4
2381 int
2382 main ()
2383 {
2384 #ifndef $as_decl_name
2385 #ifdef __cplusplus
2386   (void) $as_decl_use;
2387 #else
2388   (void) $as_decl_name;
2389 #endif
2390 #endif
2391
2392   ;
2393   return 0;
2394 }
2395 _ACEOF
2396 if ac_fn_c_try_compile "$LINENO"; then :
2397   eval "$3=yes"
2398 else
2399   eval "$3=no"
2400 fi
2401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2402   ac_c_werror_flag=$ac_save_werror_flag
2403 fi
2404 eval ac_res=\$$3
2405                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406 $as_echo "$ac_res" >&6; }
2407   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2408
2409 } # ac_fn_c_check_decl
2410 cat >config.log <<_ACEOF
2411 This file contains any messages produced by compilers while
2412 running configure, to aid debugging if configure makes a mistake.
2413
2414 It was created by PostgreSQL $as_me 12devel, which was
2415 generated by GNU Autoconf 2.69.  Invocation command line was
2416
2417   $ $0 $@
2418
2419 _ACEOF
2420 exec 5>>config.log
2421 {
2422 cat <<_ASUNAME
2423 ## --------- ##
2424 ## Platform. ##
2425 ## --------- ##
2426
2427 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2428 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2429 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2430 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2431 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2432
2433 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2434 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2435
2436 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2437 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2438 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2439 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2440 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2441 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2442 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2443
2444 _ASUNAME
2445
2446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2447 for as_dir in $PATH
2448 do
2449   IFS=$as_save_IFS
2450   test -z "$as_dir" && as_dir=.
2451     $as_echo "PATH: $as_dir"
2452   done
2453 IFS=$as_save_IFS
2454
2455 } >&5
2456
2457 cat >&5 <<_ACEOF
2458
2459
2460 ## ----------- ##
2461 ## Core tests. ##
2462 ## ----------- ##
2463
2464 _ACEOF
2465
2466
2467 # Keep a trace of the command line.
2468 # Strip out --no-create and --no-recursion so they do not pile up.
2469 # Strip out --silent because we don't want to record it for future runs.
2470 # Also quote any args containing shell meta-characters.
2471 # Make two passes to allow for proper duplicate-argument suppression.
2472 ac_configure_args=
2473 ac_configure_args0=
2474 ac_configure_args1=
2475 ac_must_keep_next=false
2476 for ac_pass in 1 2
2477 do
2478   for ac_arg
2479   do
2480     case $ac_arg in
2481     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2482     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2483     | -silent | --silent | --silen | --sile | --sil)
2484       continue ;;
2485     *\'*)
2486       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2487     esac
2488     case $ac_pass in
2489     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2490     2)
2491       as_fn_append ac_configure_args1 " '$ac_arg'"
2492       if test $ac_must_keep_next = true; then
2493         ac_must_keep_next=false # Got value, back to normal.
2494       else
2495         case $ac_arg in
2496           *=* | --config-cache | -C | -disable-* | --disable-* \
2497           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2498           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2499           | -with-* | --with-* | -without-* | --without-* | --x)
2500             case "$ac_configure_args0 " in
2501               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2502             esac
2503             ;;
2504           -* ) ac_must_keep_next=true ;;
2505         esac
2506       fi
2507       as_fn_append ac_configure_args " '$ac_arg'"
2508       ;;
2509     esac
2510   done
2511 done
2512 { ac_configure_args0=; unset ac_configure_args0;}
2513 { ac_configure_args1=; unset ac_configure_args1;}
2514
2515 # When interrupted or exit'd, cleanup temporary files, and complete
2516 # config.log.  We remove comments because anyway the quotes in there
2517 # would cause problems or look ugly.
2518 # WARNING: Use '\'' to represent an apostrophe within the trap.
2519 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2520 trap 'exit_status=$?
2521   # Save into config.log some information that might help in debugging.
2522   {
2523     echo
2524
2525     $as_echo "## ---------------- ##
2526 ## Cache variables. ##
2527 ## ---------------- ##"
2528     echo
2529     # The following way of writing the cache mishandles newlines in values,
2530 (
2531   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2532     eval ac_val=\$$ac_var
2533     case $ac_val in #(
2534     *${as_nl}*)
2535       case $ac_var in #(
2536       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2537 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2538       esac
2539       case $ac_var in #(
2540       _ | IFS | as_nl) ;; #(
2541       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2542       *) { eval $ac_var=; unset $ac_var;} ;;
2543       esac ;;
2544     esac
2545   done
2546   (set) 2>&1 |
2547     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2548     *${as_nl}ac_space=\ *)
2549       sed -n \
2550         "s/'\''/'\''\\\\'\'''\''/g;
2551           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2552       ;; #(
2553     *)
2554       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2555       ;;
2556     esac |
2557     sort
2558 )
2559     echo
2560
2561     $as_echo "## ----------------- ##
2562 ## Output variables. ##
2563 ## ----------------- ##"
2564     echo
2565     for ac_var in $ac_subst_vars
2566     do
2567       eval ac_val=\$$ac_var
2568       case $ac_val in
2569       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2570       esac
2571       $as_echo "$ac_var='\''$ac_val'\''"
2572     done | sort
2573     echo
2574
2575     if test -n "$ac_subst_files"; then
2576       $as_echo "## ------------------- ##
2577 ## File substitutions. ##
2578 ## ------------------- ##"
2579       echo
2580       for ac_var in $ac_subst_files
2581       do
2582         eval ac_val=\$$ac_var
2583         case $ac_val in
2584         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2585         esac
2586         $as_echo "$ac_var='\''$ac_val'\''"
2587       done | sort
2588       echo
2589     fi
2590
2591     if test -s confdefs.h; then
2592       $as_echo "## ----------- ##
2593 ## confdefs.h. ##
2594 ## ----------- ##"
2595       echo
2596       cat confdefs.h
2597       echo
2598     fi
2599     test "$ac_signal" != 0 &&
2600       $as_echo "$as_me: caught signal $ac_signal"
2601     $as_echo "$as_me: exit $exit_status"
2602   } >&5
2603   rm -f core *.core core.conftest.* &&
2604     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2605     exit $exit_status
2606 ' 0
2607 for ac_signal in 1 2 13 15; do
2608   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2609 done
2610 ac_signal=0
2611
2612 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2613 rm -f -r conftest* confdefs.h
2614
2615 $as_echo "/* confdefs.h */" > confdefs.h
2616
2617 # Predefined preprocessor variables.
2618
2619 cat >>confdefs.h <<_ACEOF
2620 #define PACKAGE_NAME "$PACKAGE_NAME"
2621 _ACEOF
2622
2623 cat >>confdefs.h <<_ACEOF
2624 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2625 _ACEOF
2626
2627 cat >>confdefs.h <<_ACEOF
2628 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2629 _ACEOF
2630
2631 cat >>confdefs.h <<_ACEOF
2632 #define PACKAGE_STRING "$PACKAGE_STRING"
2633 _ACEOF
2634
2635 cat >>confdefs.h <<_ACEOF
2636 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2637 _ACEOF
2638
2639 cat >>confdefs.h <<_ACEOF
2640 #define PACKAGE_URL "$PACKAGE_URL"
2641 _ACEOF
2642
2643
2644 # Let the site file select an alternate cache file if it wants to.
2645 # Prefer an explicitly selected file to automatically selected ones.
2646 ac_site_file1=NONE
2647 ac_site_file2=NONE
2648 if test -n "$CONFIG_SITE"; then
2649   # We do not want a PATH search for config.site.
2650   case $CONFIG_SITE in #((
2651     -*)  ac_site_file1=./$CONFIG_SITE;;
2652     */*) ac_site_file1=$CONFIG_SITE;;
2653     *)   ac_site_file1=./$CONFIG_SITE;;
2654   esac
2655 elif test "x$prefix" != xNONE; then
2656   ac_site_file1=$prefix/share/config.site
2657   ac_site_file2=$prefix/etc/config.site
2658 else
2659   ac_site_file1=$ac_default_prefix/share/config.site
2660   ac_site_file2=$ac_default_prefix/etc/config.site
2661 fi
2662 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2663 do
2664   test "x$ac_site_file" = xNONE && continue
2665   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2666     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2667 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2668     sed 's/^/| /' "$ac_site_file" >&5
2669     . "$ac_site_file" \
2670       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672 as_fn_error $? "failed to load site script $ac_site_file
2673 See \`config.log' for more details" "$LINENO" 5; }
2674   fi
2675 done
2676
2677 if test -r "$cache_file"; then
2678   # Some versions of bash will fail to source /dev/null (special files
2679   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2680   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2681     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2682 $as_echo "$as_me: loading cache $cache_file" >&6;}
2683     case $cache_file in
2684       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2685       *)                      . "./$cache_file";;
2686     esac
2687   fi
2688 else
2689   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2690 $as_echo "$as_me: creating cache $cache_file" >&6;}
2691   >$cache_file
2692 fi
2693
2694 # Check that the precious variables saved in the cache have kept the same
2695 # value.
2696 ac_cache_corrupted=false
2697 for ac_var in $ac_precious_vars; do
2698   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2699   eval ac_new_set=\$ac_env_${ac_var}_set
2700   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2701   eval ac_new_val=\$ac_env_${ac_var}_value
2702   case $ac_old_set,$ac_new_set in
2703     set,)
2704       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2705 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2706       ac_cache_corrupted=: ;;
2707     ,set)
2708       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2709 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2710       ac_cache_corrupted=: ;;
2711     ,);;
2712     *)
2713       if test "x$ac_old_val" != "x$ac_new_val"; then
2714         # differences in whitespace do not lead to failure.
2715         ac_old_val_w=`echo x $ac_old_val`
2716         ac_new_val_w=`echo x $ac_new_val`
2717         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2718           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2719 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2720           ac_cache_corrupted=:
2721         else
2722           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2723 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2724           eval $ac_var=\$ac_old_val
2725         fi
2726         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2727 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2728         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2729 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2730       fi;;
2731   esac
2732   # Pass precious variables to config.status.
2733   if test "$ac_new_set" = set; then
2734     case $ac_new_val in
2735     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2736     *) ac_arg=$ac_var=$ac_new_val ;;
2737     esac
2738     case " $ac_configure_args " in
2739       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2740       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2741     esac
2742   fi
2743 done
2744 if $ac_cache_corrupted; then
2745   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2746 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2747   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2748 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2749   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2750 fi
2751 ## -------------------- ##
2752 ## Main body of script. ##
2753 ## -------------------- ##
2754
2755 ac_ext=c
2756 ac_cpp='$CPP $CPPFLAGS'
2757 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2758 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2759 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2760
2761
2762
2763
2764
2765
2766 ac_aux_dir=
2767 for ac_dir in config "$srcdir"/config; do
2768   if test -f "$ac_dir/install-sh"; then
2769     ac_aux_dir=$ac_dir
2770     ac_install_sh="$ac_aux_dir/install-sh -c"
2771     break
2772   elif test -f "$ac_dir/install.sh"; then
2773     ac_aux_dir=$ac_dir
2774     ac_install_sh="$ac_aux_dir/install.sh -c"
2775     break
2776   elif test -f "$ac_dir/shtool"; then
2777     ac_aux_dir=$ac_dir
2778     ac_install_sh="$ac_aux_dir/shtool install -c"
2779     break
2780   fi
2781 done
2782 if test -z "$ac_aux_dir"; then
2783   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2784 fi
2785
2786 # These three variables are undocumented and unsupported,
2787 # and are intended to be withdrawn in a future Autoconf release.
2788 # They can cause serious problems if a builder's source tree is in a directory
2789 # whose full name contains unusual characters.
2790 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2791 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2792 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2793
2794
2795
2796 configure_args=$ac_configure_args
2797
2798
2799 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2800
2801
2802 cat >>confdefs.h <<_ACEOF
2803 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2804 _ACEOF
2805
2806
2807
2808
2809
2810 # Check whether --with-extra-version was given.
2811 if test "${with_extra_version+set}" = set; then :
2812   withval=$with_extra_version;
2813   case $withval in
2814     yes)
2815       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2816       ;;
2817     no)
2818       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2819       ;;
2820     *)
2821       PG_VERSION="$PACKAGE_VERSION$withval"
2822       ;;
2823   esac
2824
2825 else
2826   PG_VERSION="$PACKAGE_VERSION"
2827 fi
2828
2829
2830
2831 cat >>confdefs.h <<_ACEOF
2832 #define PG_VERSION "$PG_VERSION"
2833 _ACEOF
2834
2835
2836 # Make sure we can run config.sub.
2837 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2838   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2839
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2841 $as_echo_n "checking build system type... " >&6; }
2842 if ${ac_cv_build+:} false; then :
2843   $as_echo_n "(cached) " >&6
2844 else
2845   ac_build_alias=$build_alias
2846 test "x$ac_build_alias" = x &&
2847   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2848 test "x$ac_build_alias" = x &&
2849   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2850 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2851   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2852
2853 fi
2854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2855 $as_echo "$ac_cv_build" >&6; }
2856 case $ac_cv_build in
2857 *-*-*) ;;
2858 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2859 esac
2860 build=$ac_cv_build
2861 ac_save_IFS=$IFS; IFS='-'
2862 set x $ac_cv_build
2863 shift
2864 build_cpu=$1
2865 build_vendor=$2
2866 shift; shift
2867 # Remember, the first character of IFS is used to create $*,
2868 # except with old shells:
2869 build_os=$*
2870 IFS=$ac_save_IFS
2871 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2872
2873
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2875 $as_echo_n "checking host system type... " >&6; }
2876 if ${ac_cv_host+:} false; then :
2877   $as_echo_n "(cached) " >&6
2878 else
2879   if test "x$host_alias" = x; then
2880   ac_cv_host=$ac_cv_build
2881 else
2882   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2883     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2884 fi
2885
2886 fi
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2888 $as_echo "$ac_cv_host" >&6; }
2889 case $ac_cv_host in
2890 *-*-*) ;;
2891 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2892 esac
2893 host=$ac_cv_host
2894 ac_save_IFS=$IFS; IFS='-'
2895 set x $ac_cv_host
2896 shift
2897 host_cpu=$1
2898 host_vendor=$2
2899 shift; shift
2900 # Remember, the first character of IFS is used to create $*,
2901 # except with old shells:
2902 host_os=$*
2903 IFS=$ac_save_IFS
2904 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2905
2906
2907
2908 template=
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2910 $as_echo_n "checking which template to use... " >&6; }
2911
2912
2913
2914
2915 # Check whether --with-template was given.
2916 if test "${with_template+set}" = set; then :
2917   withval=$with_template;
2918   case $withval in
2919     yes)
2920       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2921       ;;
2922     no)
2923       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2924       ;;
2925     *)
2926
2927   case $withval in
2928     list)   echo; ls "$srcdir/src/template"; exit;;
2929     *)      if test -f "$srcdir/src/template/$with_template" ; then
2930               template=$withval
2931             else
2932               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2933             fi;;
2934   esac
2935
2936       ;;
2937   esac
2938
2939 else
2940
2941 # --with-template not given
2942
2943 case $host_os in
2944      aix*) template=aix ;;
2945   cygwin*) template=cygwin ;;
2946   darwin*) template=darwin ;;
2947 dragonfly*) template=netbsd ;;
2948  freebsd*) template=freebsd ;;
2949     hpux*) template=hpux ;;
2950  linux*|gnu*|k*bsd*-gnu)
2951            template=linux ;;
2952    mingw*) template=win32 ;;
2953   netbsd*) template=netbsd ;;
2954  openbsd*) template=openbsd ;;
2955  solaris*) template=solaris ;;
2956 esac
2957
2958   if test x"$template" = x"" ; then
2959     as_fn_error $? "
2960 *******************************************************************
2961 PostgreSQL has apparently not been ported to your platform yet.
2962 To try a manual configuration, look into the src/template directory
2963 for a similar platform and use the '--with-template=' option.
2964
2965 Please also contact <pgsql-bugs@postgresql.org> to see about
2966 rectifying this.  Include the above 'checking host system type...'
2967 line.
2968 *******************************************************************
2969 " "$LINENO" 5
2970   fi
2971
2972
2973 fi
2974
2975
2976
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2978 $as_echo "$template" >&6; }
2979
2980 PORTNAME=$template
2981
2982
2983 # Initialize default assumption that we do not need separate assembly code
2984 # for TAS (test-and-set).  This can be overridden by the template file
2985 # when it's executed.
2986 need_tas=no
2987 tas_file=dummy.s
2988
2989
2990
2991 ##
2992 ## Command line options
2993 ##
2994
2995 #
2996 # Add non-standard directories to the include path
2997 #
2998
2999
3000
3001 # Check whether --with-includes was given.
3002 if test "${with_includes+set}" = set; then :
3003   withval=$with_includes;
3004   case $withval in
3005     yes)
3006       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3007       ;;
3008     no)
3009       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3010       ;;
3011     *)
3012
3013       ;;
3014   esac
3015
3016 fi
3017
3018
3019
3020
3021 #
3022 # Add non-standard directories to the library search path
3023 #
3024
3025
3026
3027 # Check whether --with-libraries was given.
3028 if test "${with_libraries+set}" = set; then :
3029   withval=$with_libraries;
3030   case $withval in
3031     yes)
3032       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3033       ;;
3034     no)
3035       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3036       ;;
3037     *)
3038       LIBRARY_DIRS=$withval
3039       ;;
3040   esac
3041
3042 fi
3043
3044
3045
3046
3047
3048
3049 # Check whether --with-libs was given.
3050 if test "${with_libs+set}" = set; then :
3051   withval=$with_libs;
3052   case $withval in
3053     yes)
3054       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3055       ;;
3056     no)
3057       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3058       ;;
3059     *)
3060       LIBRARY_DIRS=$withval
3061       ;;
3062   esac
3063
3064 fi
3065
3066
3067
3068
3069 #
3070 # 64-bit integer date/time storage is now the only option, but to avoid
3071 # unnecessary breakage of build scripts, continue to accept an explicit
3072 # "--enable-integer-datetimes" switch.
3073 #
3074
3075
3076 # Check whether --enable-integer-datetimes was given.
3077 if test "${enable_integer_datetimes+set}" = set; then :
3078   enableval=$enable_integer_datetimes;
3079   case $enableval in
3080     yes)
3081       :
3082       ;;
3083     no)
3084       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3085       ;;
3086     *)
3087       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3088       ;;
3089   esac
3090
3091 else
3092   enable_integer_datetimes=yes
3093
3094 fi
3095
3096
3097
3098
3099 #
3100 # NLS
3101 #
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3103 $as_echo_n "checking whether NLS is wanted... " >&6; }
3104
3105
3106 # Check whether --enable-nls was given.
3107 if test "${enable_nls+set}" = set; then :
3108   enableval=$enable_nls;
3109   case $enableval in
3110     yes)
3111       :
3112       ;;
3113     no)
3114       :
3115       ;;
3116     *)
3117       enable_nls=yes
3118 WANTED_LANGUAGES=$enableval
3119       ;;
3120   esac
3121
3122 else
3123   enable_nls=no
3124 fi
3125
3126
3127
3128 if test "$enable_nls" = yes; then
3129
3130 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3131
3132 fi
3133
3134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3135 $as_echo "$enable_nls" >&6; }
3136
3137
3138
3139 #
3140 # Default port number (--with-pgport), default 5432
3141 #
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3143 $as_echo_n "checking for default port number... " >&6; }
3144
3145
3146
3147 # Check whether --with-pgport was given.
3148 if test "${with_pgport+set}" = set; then :
3149   withval=$with_pgport;
3150   case $withval in
3151     yes)
3152       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3153       ;;
3154     no)
3155       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3156       ;;
3157     *)
3158       default_port=$withval
3159       ;;
3160   esac
3161
3162 else
3163   default_port=5432
3164 fi
3165
3166
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3168 $as_echo "$default_port" >&6; }
3169 # Need both of these because some places want an integer and some a string
3170
3171 cat >>confdefs.h <<_ACEOF
3172 #define DEF_PGPORT ${default_port}
3173 _ACEOF
3174
3175
3176 cat >>confdefs.h <<_ACEOF
3177 #define DEF_PGPORT_STR "${default_port}"
3178 _ACEOF
3179
3180
3181
3182 # It's worth validating port; you can get very confusing errors otherwise
3183 if test x"$default_port" = x""; then
3184   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3185 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3186   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3187 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3188   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3189 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3190   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3191 fi
3192
3193 #
3194 # '-rpath'-like feature can be disabled
3195 #
3196
3197
3198 # Check whether --enable-rpath was given.
3199 if test "${enable_rpath+set}" = set; then :
3200   enableval=$enable_rpath;
3201   case $enableval in
3202     yes)
3203       :
3204       ;;
3205     no)
3206       :
3207       ;;
3208     *)
3209       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3210       ;;
3211   esac
3212
3213 else
3214   enable_rpath=yes
3215
3216 fi
3217
3218
3219
3220
3221 #
3222 # Spinlocks
3223 #
3224
3225
3226 # Check whether --enable-spinlocks was given.
3227 if test "${enable_spinlocks+set}" = set; then :
3228   enableval=$enable_spinlocks;
3229   case $enableval in
3230     yes)
3231       :
3232       ;;
3233     no)
3234       :
3235       ;;
3236     *)
3237       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3238       ;;
3239   esac
3240
3241 else
3242   enable_spinlocks=yes
3243
3244 fi
3245
3246
3247
3248 #
3249 # Atomic operations
3250 #
3251
3252
3253 # Check whether --enable-atomics was given.
3254 if test "${enable_atomics+set}" = set; then :
3255   enableval=$enable_atomics;
3256   case $enableval in
3257     yes)
3258       :
3259       ;;
3260     no)
3261       :
3262       ;;
3263     *)
3264       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3265       ;;
3266   esac
3267
3268 else
3269   enable_atomics=yes
3270
3271 fi
3272
3273
3274
3275 #
3276 # Random number generation
3277 #
3278
3279
3280 # Check whether --enable-strong-random was given.
3281 if test "${enable_strong_random+set}" = set; then :
3282   enableval=$enable_strong_random;
3283   case $enableval in
3284     yes)
3285       :
3286       ;;
3287     no)
3288       :
3289       ;;
3290     *)
3291       as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3292       ;;
3293   esac
3294
3295 else
3296   enable_strong_random=yes
3297
3298 fi
3299
3300
3301
3302
3303 #
3304 # --enable-debug adds -g to compiler flags
3305 #
3306
3307
3308 # Check whether --enable-debug was given.
3309 if test "${enable_debug+set}" = set; then :
3310   enableval=$enable_debug;
3311   case $enableval in
3312     yes)
3313       :
3314       ;;
3315     no)
3316       :
3317       ;;
3318     *)
3319       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3320       ;;
3321   esac
3322
3323 else
3324   enable_debug=no
3325
3326 fi
3327
3328
3329
3330
3331 #
3332 # --enable-profiling enables gcc profiling
3333 #
3334
3335
3336 # Check whether --enable-profiling was given.
3337 if test "${enable_profiling+set}" = set; then :
3338   enableval=$enable_profiling;
3339   case $enableval in
3340     yes)
3341       :
3342       ;;
3343     no)
3344       :
3345       ;;
3346     *)
3347       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3348       ;;
3349   esac
3350
3351 else
3352   enable_profiling=no
3353
3354 fi
3355
3356
3357
3358 #
3359 # --enable-coverage enables generation of code coverage metrics with gcov
3360 #
3361
3362
3363 # Check whether --enable-coverage was given.
3364 if test "${enable_coverage+set}" = set; then :
3365   enableval=$enable_coverage;
3366   case $enableval in
3367     yes)
3368       if test -z "$GCOV"; then
3369   for ac_prog in gcov
3370 do
3371   # Extract the first word of "$ac_prog", so it can be a program name with args.
3372 set dummy $ac_prog; ac_word=$2
3373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3374 $as_echo_n "checking for $ac_word... " >&6; }
3375 if ${ac_cv_path_GCOV+:} false; then :
3376   $as_echo_n "(cached) " >&6
3377 else
3378   case $GCOV in
3379   [\\/]* | ?:[\\/]*)
3380   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3381   ;;
3382   *)
3383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3384 for as_dir in $PATH
3385 do
3386   IFS=$as_save_IFS
3387   test -z "$as_dir" && as_dir=.
3388     for ac_exec_ext in '' $ac_executable_extensions; do
3389   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3390     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3392     break 2
3393   fi
3394 done
3395   done
3396 IFS=$as_save_IFS
3397
3398   ;;
3399 esac
3400 fi
3401 GCOV=$ac_cv_path_GCOV
3402 if test -n "$GCOV"; then
3403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3404 $as_echo "$GCOV" >&6; }
3405 else
3406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3407 $as_echo "no" >&6; }
3408 fi
3409
3410
3411   test -n "$GCOV" && break
3412 done
3413
3414 else
3415   # Report the value of GCOV in configure's output in all cases.
3416   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3417 $as_echo_n "checking for GCOV... " >&6; }
3418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3419 $as_echo "$GCOV" >&6; }
3420 fi
3421
3422 if test -z "$GCOV"; then
3423   as_fn_error $? "gcov not found" "$LINENO" 5
3424 fi
3425 if test -z "$LCOV"; then
3426   for ac_prog in lcov
3427 do
3428   # Extract the first word of "$ac_prog", so it can be a program name with args.
3429 set dummy $ac_prog; ac_word=$2
3430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3431 $as_echo_n "checking for $ac_word... " >&6; }
3432 if ${ac_cv_path_LCOV+:} false; then :
3433   $as_echo_n "(cached) " >&6
3434 else
3435   case $LCOV in
3436   [\\/]* | ?:[\\/]*)
3437   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3438   ;;
3439   *)
3440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3441 for as_dir in $PATH
3442 do
3443   IFS=$as_save_IFS
3444   test -z "$as_dir" && as_dir=.
3445     for ac_exec_ext in '' $ac_executable_extensions; do
3446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3447     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3449     break 2
3450   fi
3451 done
3452   done
3453 IFS=$as_save_IFS
3454
3455   ;;
3456 esac
3457 fi
3458 LCOV=$ac_cv_path_LCOV
3459 if test -n "$LCOV"; then
3460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3461 $as_echo "$LCOV" >&6; }
3462 else
3463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3464 $as_echo "no" >&6; }
3465 fi
3466
3467
3468   test -n "$LCOV" && break
3469 done
3470
3471 else
3472   # Report the value of LCOV in configure's output in all cases.
3473   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3474 $as_echo_n "checking for LCOV... " >&6; }
3475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3476 $as_echo "$LCOV" >&6; }
3477 fi
3478
3479 if test -z "$LCOV"; then
3480   as_fn_error $? "lcov not found" "$LINENO" 5
3481 fi
3482 if test -z "$GENHTML"; then
3483   for ac_prog in genhtml
3484 do
3485   # Extract the first word of "$ac_prog", so it can be a program name with args.
3486 set dummy $ac_prog; ac_word=$2
3487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3488 $as_echo_n "checking for $ac_word... " >&6; }
3489 if ${ac_cv_path_GENHTML+:} false; then :
3490   $as_echo_n "(cached) " >&6
3491 else
3492   case $GENHTML in
3493   [\\/]* | ?:[\\/]*)
3494   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3495   ;;
3496   *)
3497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3498 for as_dir in $PATH
3499 do
3500   IFS=$as_save_IFS
3501   test -z "$as_dir" && as_dir=.
3502     for ac_exec_ext in '' $ac_executable_extensions; do
3503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3504     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3506     break 2
3507   fi
3508 done
3509   done
3510 IFS=$as_save_IFS
3511
3512   ;;
3513 esac
3514 fi
3515 GENHTML=$ac_cv_path_GENHTML
3516 if test -n "$GENHTML"; then
3517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3518 $as_echo "$GENHTML" >&6; }
3519 else
3520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3521 $as_echo "no" >&6; }
3522 fi
3523
3524
3525   test -n "$GENHTML" && break
3526 done
3527
3528 else
3529   # Report the value of GENHTML in configure's output in all cases.
3530   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3531 $as_echo_n "checking for GENHTML... " >&6; }
3532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3533 $as_echo "$GENHTML" >&6; }
3534 fi
3535
3536 if test -z "$GENHTML"; then
3537   as_fn_error $? "genhtml not found" "$LINENO" 5
3538 fi
3539       ;;
3540     no)
3541       :
3542       ;;
3543     *)
3544       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3545       ;;
3546   esac
3547
3548 else
3549   enable_coverage=no
3550
3551 fi
3552
3553
3554
3555
3556 #
3557 # DTrace
3558 #
3559
3560
3561 # Check whether --enable-dtrace was given.
3562 if test "${enable_dtrace+set}" = set; then :
3563   enableval=$enable_dtrace;
3564   case $enableval in
3565     yes)
3566       if test -z "$DTRACE"; then
3567   for ac_prog in dtrace
3568 do
3569   # Extract the first word of "$ac_prog", so it can be a program name with args.
3570 set dummy $ac_prog; ac_word=$2
3571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3572 $as_echo_n "checking for $ac_word... " >&6; }
3573 if ${ac_cv_path_DTRACE+:} false; then :
3574   $as_echo_n "(cached) " >&6
3575 else
3576   case $DTRACE in
3577   [\\/]* | ?:[\\/]*)
3578   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3579   ;;
3580   *)
3581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3582 for as_dir in $PATH
3583 do
3584   IFS=$as_save_IFS
3585   test -z "$as_dir" && as_dir=.
3586     for ac_exec_ext in '' $ac_executable_extensions; do
3587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3588     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3590     break 2
3591   fi
3592 done
3593   done
3594 IFS=$as_save_IFS
3595
3596   ;;
3597 esac
3598 fi
3599 DTRACE=$ac_cv_path_DTRACE
3600 if test -n "$DTRACE"; then
3601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3602 $as_echo "$DTRACE" >&6; }
3603 else
3604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3605 $as_echo "no" >&6; }
3606 fi
3607
3608
3609   test -n "$DTRACE" && break
3610 done
3611
3612 else
3613   # Report the value of DTRACE in configure's output in all cases.
3614   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3615 $as_echo_n "checking for DTRACE... " >&6; }
3616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3617 $as_echo "$DTRACE" >&6; }
3618 fi
3619
3620 if test -z "$DTRACE"; then
3621   as_fn_error $? "dtrace not found" "$LINENO" 5
3622 fi
3623
3624       ;;
3625     no)
3626       :
3627       ;;
3628     *)
3629       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3630       ;;
3631   esac
3632
3633 else
3634   enable_dtrace=no
3635
3636 fi
3637
3638
3639
3640
3641 #
3642 # TAP tests
3643 #
3644
3645
3646 # Check whether --enable-tap-tests was given.
3647 if test "${enable_tap_tests+set}" = set; then :
3648   enableval=$enable_tap_tests;
3649   case $enableval in
3650     yes)
3651       :
3652       ;;
3653     no)
3654       :
3655       ;;
3656     *)
3657       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3658       ;;
3659   esac
3660
3661 else
3662   enable_tap_tests=no
3663
3664 fi
3665
3666
3667
3668
3669 #
3670 # Block size
3671 #
3672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3673 $as_echo_n "checking for block size... " >&6; }
3674
3675
3676
3677 # Check whether --with-blocksize was given.
3678 if test "${with_blocksize+set}" = set; then :
3679   withval=$with_blocksize;
3680   case $withval in
3681     yes)
3682       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3683       ;;
3684     no)
3685       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3686       ;;
3687     *)
3688       blocksize=$withval
3689       ;;
3690   esac
3691
3692 else
3693   blocksize=8
3694 fi
3695
3696
3697 case ${blocksize} in
3698   1) BLCKSZ=1024;;
3699   2) BLCKSZ=2048;;
3700   4) BLCKSZ=4096;;
3701   8) BLCKSZ=8192;;
3702  16) BLCKSZ=16384;;
3703  32) BLCKSZ=32768;;
3704   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3705 esac
3706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3707 $as_echo "${blocksize}kB" >&6; }
3708
3709
3710 cat >>confdefs.h <<_ACEOF
3711 #define BLCKSZ ${BLCKSZ}
3712 _ACEOF
3713
3714
3715 #
3716 # Relation segment size
3717 #
3718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3719 $as_echo_n "checking for segment size... " >&6; }
3720
3721
3722
3723 # Check whether --with-segsize was given.
3724 if test "${with_segsize+set}" = set; then :
3725   withval=$with_segsize;
3726   case $withval in
3727     yes)
3728       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3729       ;;
3730     no)
3731       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3732       ;;
3733     *)
3734       segsize=$withval
3735       ;;
3736   esac
3737
3738 else
3739   segsize=1
3740 fi
3741
3742
3743 # this expression is set up to avoid unnecessary integer overflow
3744 # blocksize is already guaranteed to be a factor of 1024
3745 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3746 test $? -eq 0 || exit 1
3747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3748 $as_echo "${segsize}GB" >&6; }
3749
3750
3751 cat >>confdefs.h <<_ACEOF
3752 #define RELSEG_SIZE ${RELSEG_SIZE}
3753 _ACEOF
3754
3755
3756 #
3757 # WAL block size
3758 #
3759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3760 $as_echo_n "checking for WAL block size... " >&6; }
3761
3762
3763
3764 # Check whether --with-wal-blocksize was given.
3765 if test "${with_wal_blocksize+set}" = set; then :
3766   withval=$with_wal_blocksize;
3767   case $withval in
3768     yes)
3769       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3770       ;;
3771     no)
3772       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3773       ;;
3774     *)
3775       wal_blocksize=$withval
3776       ;;
3777   esac
3778
3779 else
3780   wal_blocksize=8
3781 fi
3782
3783
3784 case ${wal_blocksize} in
3785   1) XLOG_BLCKSZ=1024;;
3786   2) XLOG_BLCKSZ=2048;;
3787   4) XLOG_BLCKSZ=4096;;
3788   8) XLOG_BLCKSZ=8192;;
3789  16) XLOG_BLCKSZ=16384;;
3790  32) XLOG_BLCKSZ=32768;;
3791  64) XLOG_BLCKSZ=65536;;
3792   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3793 esac
3794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3795 $as_echo "${wal_blocksize}kB" >&6; }
3796
3797
3798 cat >>confdefs.h <<_ACEOF
3799 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3800 _ACEOF
3801
3802
3803 #
3804 # C compiler
3805 #
3806
3807 # For historical reasons you can also use --with-CC to specify the C compiler
3808 # to use, although the standard way to do this is to set the CC environment
3809 # variable.
3810
3811
3812
3813 # Check whether --with-CC was given.
3814 if test "${with_CC+set}" = set; then :
3815   withval=$with_CC;
3816   case $withval in
3817     yes)
3818       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3819       ;;
3820     no)
3821       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3822       ;;
3823     *)
3824       CC=$with_CC
3825       ;;
3826   esac
3827
3828 fi
3829
3830
3831
3832 case $template in
3833   aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3834     *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3835 esac
3836
3837 ac_ext=c
3838 ac_cpp='$CPP $CPPFLAGS'
3839 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3840 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3841 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3842 if test -n "$ac_tool_prefix"; then
3843   for ac_prog in $pgac_cc_list
3844   do
3845     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3846 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848 $as_echo_n "checking for $ac_word... " >&6; }
3849 if ${ac_cv_prog_CC+:} false; then :
3850   $as_echo_n "(cached) " >&6
3851 else
3852   if test -n "$CC"; then
3853   ac_cv_prog_CC="$CC" # Let the user override the test.
3854 else
3855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856 for as_dir in $PATH
3857 do
3858   IFS=$as_save_IFS
3859   test -z "$as_dir" && as_dir=.
3860     for ac_exec_ext in '' $ac_executable_extensions; do
3861   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3862     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3863     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3864     break 2
3865   fi
3866 done
3867   done
3868 IFS=$as_save_IFS
3869
3870 fi
3871 fi
3872 CC=$ac_cv_prog_CC
3873 if test -n "$CC"; then
3874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3875 $as_echo "$CC" >&6; }
3876 else
3877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878 $as_echo "no" >&6; }
3879 fi
3880
3881
3882     test -n "$CC" && break
3883   done
3884 fi
3885 if test -z "$CC"; then
3886   ac_ct_CC=$CC
3887   for ac_prog in $pgac_cc_list
3888 do
3889   # Extract the first word of "$ac_prog", so it can be a program name with args.
3890 set dummy $ac_prog; ac_word=$2
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3892 $as_echo_n "checking for $ac_word... " >&6; }
3893 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3894   $as_echo_n "(cached) " >&6
3895 else
3896   if test -n "$ac_ct_CC"; then
3897   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3898 else
3899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3900 for as_dir in $PATH
3901 do
3902   IFS=$as_save_IFS
3903   test -z "$as_dir" && as_dir=.
3904     for ac_exec_ext in '' $ac_executable_extensions; do
3905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3906     ac_cv_prog_ac_ct_CC="$ac_prog"
3907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3908     break 2
3909   fi
3910 done
3911   done
3912 IFS=$as_save_IFS
3913
3914 fi
3915 fi
3916 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3917 if test -n "$ac_ct_CC"; then
3918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3919 $as_echo "$ac_ct_CC" >&6; }
3920 else
3921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3922 $as_echo "no" >&6; }
3923 fi
3924
3925
3926   test -n "$ac_ct_CC" && break
3927 done
3928
3929   if test "x$ac_ct_CC" = x; then
3930     CC=""
3931   else
3932     case $cross_compiling:$ac_tool_warned in
3933 yes:)
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3935 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3936 ac_tool_warned=yes ;;
3937 esac
3938     CC=$ac_ct_CC
3939   fi
3940 fi
3941
3942
3943 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3944 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3945 as_fn_error $? "no acceptable C compiler found in \$PATH
3946 See \`config.log' for more details" "$LINENO" 5; }
3947
3948 # Provide some information about the compiler.
3949 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3950 set X $ac_compile
3951 ac_compiler=$2
3952 for ac_option in --version -v -V -qversion; do
3953   { { ac_try="$ac_compiler $ac_option >&5"
3954 case "(($ac_try" in
3955   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956   *) ac_try_echo=$ac_try;;
3957 esac
3958 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959 $as_echo "$ac_try_echo"; } >&5
3960   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3961   ac_status=$?
3962   if test -s conftest.err; then
3963     sed '10a\
3964 ... rest of stderr output deleted ...
3965          10q' conftest.err >conftest.er1
3966     cat conftest.er1 >&5
3967   fi
3968   rm -f conftest.er1 conftest.err
3969   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3970   test $ac_status = 0; }
3971 done
3972
3973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3974 /* end confdefs.h.  */
3975
3976 int
3977 main ()
3978 {
3979
3980   ;
3981   return 0;
3982 }
3983 _ACEOF
3984 ac_clean_files_save=$ac_clean_files
3985 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3986 # Try to create an executable without -o first, disregard a.out.
3987 # It will help us diagnose broken compilers, and finding out an intuition
3988 # of exeext.
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3990 $as_echo_n "checking whether the C compiler works... " >&6; }
3991 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3992
3993 # The possible output files:
3994 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3995
3996 ac_rmfiles=
3997 for ac_file in $ac_files
3998 do
3999   case $ac_file in
4000     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4001     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4002   esac
4003 done
4004 rm -f $ac_rmfiles
4005
4006 if { { ac_try="$ac_link_default"
4007 case "(($ac_try" in
4008   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4009   *) ac_try_echo=$ac_try;;
4010 esac
4011 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4012 $as_echo "$ac_try_echo"; } >&5
4013   (eval "$ac_link_default") 2>&5
4014   ac_status=$?
4015   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4016   test $ac_status = 0; }; then :
4017   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4018 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4019 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4020 # so that the user can short-circuit this test for compilers unknown to
4021 # Autoconf.
4022 for ac_file in $ac_files ''
4023 do
4024   test -f "$ac_file" || continue
4025   case $ac_file in
4026     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4027         ;;
4028     [ab].out )
4029         # We found the default executable, but exeext='' is most
4030         # certainly right.
4031         break;;
4032     *.* )
4033         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4034         then :; else
4035            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4036         fi
4037         # We set ac_cv_exeext here because the later test for it is not
4038         # safe: cross compilers may not add the suffix if given an `-o'
4039         # argument, so we may need to know it at that point already.
4040         # Even if this section looks crufty: it has the advantage of
4041         # actually working.
4042         break;;
4043     * )
4044         break;;
4045   esac
4046 done
4047 test "$ac_cv_exeext" = no && ac_cv_exeext=
4048
4049 else
4050   ac_file=''
4051 fi
4052 if test -z "$ac_file"; then :
4053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4054 $as_echo "no" >&6; }
4055 $as_echo "$as_me: failed program was:" >&5
4056 sed 's/^/| /' conftest.$ac_ext >&5
4057
4058 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4059 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4060 as_fn_error 77 "C compiler cannot create executables
4061 See \`config.log' for more details" "$LINENO" 5; }
4062 else
4063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4064 $as_echo "yes" >&6; }
4065 fi
4066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4067 $as_echo_n "checking for C compiler default output file name... " >&6; }
4068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4069 $as_echo "$ac_file" >&6; }
4070 ac_exeext=$ac_cv_exeext
4071
4072 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4073 ac_clean_files=$ac_clean_files_save
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4075 $as_echo_n "checking for suffix of executables... " >&6; }
4076 if { { ac_try="$ac_link"
4077 case "(($ac_try" in
4078   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4079   *) ac_try_echo=$ac_try;;
4080 esac
4081 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4082 $as_echo "$ac_try_echo"; } >&5
4083   (eval "$ac_link") 2>&5
4084   ac_status=$?
4085   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4086   test $ac_status = 0; }; then :
4087   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4088 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4089 # work properly (i.e., refer to `conftest.exe'), while it won't with
4090 # `rm'.
4091 for ac_file in conftest.exe conftest conftest.*; do
4092   test -f "$ac_file" || continue
4093   case $ac_file in
4094     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4095     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4096           break;;
4097     * ) break;;
4098   esac
4099 done
4100 else
4101   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4102 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4103 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4104 See \`config.log' for more details" "$LINENO" 5; }
4105 fi
4106 rm -f conftest conftest$ac_cv_exeext
4107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4108 $as_echo "$ac_cv_exeext" >&6; }
4109
4110 rm -f conftest.$ac_ext
4111 EXEEXT=$ac_cv_exeext
4112 ac_exeext=$EXEEXT
4113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4114 /* end confdefs.h.  */
4115 #include <stdio.h>
4116 int
4117 main ()
4118 {
4119 FILE *f = fopen ("conftest.out", "w");
4120  return ferror (f) || fclose (f) != 0;
4121
4122   ;
4123   return 0;
4124 }
4125 _ACEOF
4126 ac_clean_files="$ac_clean_files conftest.out"
4127 # Check that the compiler produces executables we can run.  If not, either
4128 # the compiler is broken, or we cross compile.
4129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4130 $as_echo_n "checking whether we are cross compiling... " >&6; }
4131 if test "$cross_compiling" != yes; then
4132   { { ac_try="$ac_link"
4133 case "(($ac_try" in
4134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4135   *) ac_try_echo=$ac_try;;
4136 esac
4137 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4138 $as_echo "$ac_try_echo"; } >&5
4139   (eval "$ac_link") 2>&5
4140   ac_status=$?
4141   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4142   test $ac_status = 0; }
4143   if { ac_try='./conftest$ac_cv_exeext'
4144   { { case "(($ac_try" in
4145   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4146   *) ac_try_echo=$ac_try;;
4147 esac
4148 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4149 $as_echo "$ac_try_echo"; } >&5
4150   (eval "$ac_try") 2>&5
4151   ac_status=$?
4152   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4153   test $ac_status = 0; }; }; then
4154     cross_compiling=no
4155   else
4156     if test "$cross_compiling" = maybe; then
4157         cross_compiling=yes
4158     else
4159         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4160 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4161 as_fn_error $? "cannot run C compiled programs.
4162 If you meant to cross compile, use \`--host'.
4163 See \`config.log' for more details" "$LINENO" 5; }
4164     fi
4165   fi
4166 fi
4167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4168 $as_echo "$cross_compiling" >&6; }
4169
4170 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4171 ac_clean_files=$ac_clean_files_save
4172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4173 $as_echo_n "checking for suffix of object files... " >&6; }
4174 if ${ac_cv_objext+:} false; then :
4175   $as_echo_n "(cached) " >&6
4176 else
4177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4178 /* end confdefs.h.  */
4179
4180 int
4181 main ()
4182 {
4183
4184   ;
4185   return 0;
4186 }
4187 _ACEOF
4188 rm -f conftest.o conftest.obj
4189 if { { ac_try="$ac_compile"
4190 case "(($ac_try" in
4191   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4192   *) ac_try_echo=$ac_try;;
4193 esac
4194 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4195 $as_echo "$ac_try_echo"; } >&5
4196   (eval "$ac_compile") 2>&5
4197   ac_status=$?
4198   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4199   test $ac_status = 0; }; then :
4200   for ac_file in conftest.o conftest.obj conftest.*; do
4201   test -f "$ac_file" || continue;
4202   case $ac_file in
4203     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4204     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4205        break;;
4206   esac
4207 done
4208 else
4209   $as_echo "$as_me: failed program was:" >&5
4210 sed 's/^/| /' conftest.$ac_ext >&5
4211
4212 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4213 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4214 as_fn_error $? "cannot compute suffix of object files: cannot compile
4215 See \`config.log' for more details" "$LINENO" 5; }
4216 fi
4217 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4218 fi
4219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4220 $as_echo "$ac_cv_objext" >&6; }
4221 OBJEXT=$ac_cv_objext
4222 ac_objext=$OBJEXT
4223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4224 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4225 if ${ac_cv_c_compiler_gnu+:} false; then :
4226   $as_echo_n "(cached) " >&6
4227 else
4228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4229 /* end confdefs.h.  */
4230
4231 int
4232 main ()
4233 {
4234 #ifndef __GNUC__
4235        choke me
4236 #endif
4237
4238   ;
4239   return 0;
4240 }
4241 _ACEOF
4242 if ac_fn_c_try_compile "$LINENO"; then :
4243   ac_compiler_gnu=yes
4244 else
4245   ac_compiler_gnu=no
4246 fi
4247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4248 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4249
4250 fi
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4252 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4253 if test $ac_compiler_gnu = yes; then
4254   GCC=yes
4255 else
4256   GCC=
4257 fi
4258 ac_test_CFLAGS=${CFLAGS+set}
4259 ac_save_CFLAGS=$CFLAGS
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4261 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4262 if ${ac_cv_prog_cc_g+:} false; then :
4263   $as_echo_n "(cached) " >&6
4264 else
4265   ac_save_c_werror_flag=$ac_c_werror_flag
4266    ac_c_werror_flag=yes
4267    ac_cv_prog_cc_g=no
4268    CFLAGS="-g"
4269    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4270 /* end confdefs.h.  */
4271
4272 int
4273 main ()
4274 {
4275
4276   ;
4277   return 0;
4278 }
4279 _ACEOF
4280 if ac_fn_c_try_compile "$LINENO"; then :
4281   ac_cv_prog_cc_g=yes
4282 else
4283   CFLAGS=""
4284       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4285 /* end confdefs.h.  */
4286
4287 int
4288 main ()
4289 {
4290
4291   ;
4292   return 0;
4293 }
4294 _ACEOF
4295 if ac_fn_c_try_compile "$LINENO"; then :
4296
4297 else
4298   ac_c_werror_flag=$ac_save_c_werror_flag
4299          CFLAGS="-g"
4300          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4301 /* end confdefs.h.  */
4302
4303 int
4304 main ()
4305 {
4306
4307   ;
4308   return 0;
4309 }
4310 _ACEOF
4311 if ac_fn_c_try_compile "$LINENO"; then :
4312   ac_cv_prog_cc_g=yes
4313 fi
4314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4315 fi
4316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4317 fi
4318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4319    ac_c_werror_flag=$ac_save_c_werror_flag
4320 fi
4321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4322 $as_echo "$ac_cv_prog_cc_g" >&6; }
4323 if test "$ac_test_CFLAGS" = set; then
4324   CFLAGS=$ac_save_CFLAGS
4325 elif test $ac_cv_prog_cc_g = yes; then
4326   if test "$GCC" = yes; then
4327     CFLAGS="-g -O2"
4328   else
4329     CFLAGS="-g"
4330   fi
4331 else
4332   if test "$GCC" = yes; then
4333     CFLAGS="-O2"
4334   else
4335     CFLAGS=
4336   fi
4337 fi
4338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4339 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4340 if ${ac_cv_prog_cc_c89+:} false; then :
4341   $as_echo_n "(cached) " >&6
4342 else
4343   ac_cv_prog_cc_c89=no
4344 ac_save_CC=$CC
4345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4346 /* end confdefs.h.  */
4347 #include <stdarg.h>
4348 #include <stdio.h>
4349 struct stat;
4350 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4351 struct buf { int x; };
4352 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4353 static char *e (p, i)
4354      char **p;
4355      int i;
4356 {
4357   return p[i];
4358 }
4359 static char *f (char * (*g) (char **, int), char **p, ...)
4360 {
4361   char *s;
4362   va_list v;
4363   va_start (v,p);
4364   s = g (p, va_arg (v,int));
4365   va_end (v);
4366   return s;
4367 }
4368
4369 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4370    function prototypes and stuff, but not '\xHH' hex character constants.
4371    These don't provoke an error unfortunately, instead are silently treated
4372    as 'x'.  The following induces an error, until -std is added to get
4373    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4374    array size at least.  It's necessary to write '\x00'==0 to get something
4375    that's true only with -std.  */
4376 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4377
4378 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4379    inside strings and character constants.  */
4380 #define FOO(x) 'x'
4381 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4382
4383 int test (int i, double x);
4384 struct s1 {int (*f) (int a);};
4385 struct s2 {int (*f) (double a);};
4386 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4387 int argc;
4388 char **argv;
4389 int
4390 main ()
4391 {
4392 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4393   ;
4394   return 0;
4395 }
4396 _ACEOF
4397 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4398         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4399 do
4400   CC="$ac_save_CC $ac_arg"
4401   if ac_fn_c_try_compile "$LINENO"; then :
4402   ac_cv_prog_cc_c89=$ac_arg
4403 fi
4404 rm -f core conftest.err conftest.$ac_objext
4405   test "x$ac_cv_prog_cc_c89" != "xno" && break
4406 done
4407 rm -f conftest.$ac_ext
4408 CC=$ac_save_CC
4409
4410 fi
4411 # AC_CACHE_VAL
4412 case "x$ac_cv_prog_cc_c89" in
4413   x)
4414     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4415 $as_echo "none needed" >&6; } ;;
4416   xno)
4417     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4418 $as_echo "unsupported" >&6; } ;;
4419   *)
4420     CC="$CC $ac_cv_prog_cc_c89"
4421     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4422 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4423 esac
4424 if test "x$ac_cv_prog_cc_c89" != xno; then :
4425
4426 fi
4427
4428 ac_ext=c
4429 ac_cpp='$CPP $CPPFLAGS'
4430 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4431 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4432 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4433
4434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4435 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4436 if ${ac_cv_prog_cc_c99+:} false; then :
4437   $as_echo_n "(cached) " >&6
4438 else
4439   ac_cv_prog_cc_c99=no
4440 ac_save_CC=$CC
4441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4442 /* end confdefs.h.  */
4443 #include <stdarg.h>
4444 #include <stdbool.h>
4445 #include <stdlib.h>
4446 #include <wchar.h>
4447 #include <stdio.h>
4448
4449 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4450 #define debug(...) fprintf (stderr, __VA_ARGS__)
4451 #define showlist(...) puts (#__VA_ARGS__)
4452 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4453 static void
4454 test_varargs_macros (void)
4455 {
4456   int x = 1234;
4457   int y = 5678;
4458   debug ("Flag");
4459   debug ("X = %d\n", x);
4460   showlist (The first, second, and third items.);
4461   report (x>y, "x is %d but y is %d", x, y);
4462 }
4463
4464 // Check long long types.
4465 #define BIG64 18446744073709551615ull
4466 #define BIG32 4294967295ul
4467 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4468 #if !BIG_OK
4469   your preprocessor is broken;
4470 #endif
4471 #if BIG_OK
4472 #else
4473   your preprocessor is broken;
4474 #endif
4475 static long long int bignum = -9223372036854775807LL;
4476 static unsigned long long int ubignum = BIG64;
4477
4478 struct incomplete_array
4479 {
4480   int datasize;
4481   double data[];
4482 };
4483
4484 struct named_init {
4485   int number;
4486   const wchar_t *name;
4487   double average;
4488 };
4489
4490 typedef const char *ccp;
4491
4492 static inline int
4493 test_restrict (ccp restrict text)
4494 {
4495   // See if C++-style comments work.
4496   // Iterate through items via the restricted pointer.
4497   // Also check for declarations in for loops.
4498   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4499     continue;
4500   return 0;
4501 }
4502
4503 // Check varargs and va_copy.
4504 static void
4505 test_varargs (const char *format, ...)
4506 {
4507   va_list args;
4508   va_start (args, format);
4509   va_list args_copy;
4510   va_copy (args_copy, args);
4511
4512   const char *str;
4513   int number;
4514   float fnumber;
4515
4516   while (*format)
4517     {
4518       switch (*format++)
4519         {
4520         case 's': // string
4521           str = va_arg (args_copy, const char *);
4522           break;
4523         case 'd': // int
4524           number = va_arg (args_copy, int);
4525           break;
4526         case 'f': // float
4527           fnumber = va_arg (args_copy, double);
4528           break;
4529         default:
4530           break;
4531         }
4532     }
4533   va_end (args_copy);
4534   va_end (args);
4535 }
4536
4537 int
4538 main ()
4539 {
4540
4541   // Check bool.
4542   _Bool success = false;
4543
4544   // Check restrict.
4545   if (test_restrict ("String literal") == 0)
4546     success = true;
4547   char *restrict newvar = "Another string";
4548
4549   // Check varargs.
4550   test_varargs ("s, d' f .", "string", 65, 34.234);
4551   test_varargs_macros ();
4552
4553   // Check flexible array members.
4554   struct incomplete_array *ia =
4555     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4556   ia->datasize = 10;
4557   for (int i = 0; i < ia->datasize; ++i)
4558     ia->data[i] = i * 1.234;
4559
4560   // Check named initializers.
4561   struct named_init ni = {
4562     .number = 34,
4563     .name = L"Test wide string",
4564     .average = 543.34343,
4565   };
4566
4567   ni.number = 58;
4568
4569   int dynamic_array[ni.number];
4570   dynamic_array[ni.number - 1] = 543;
4571
4572   // work around unused variable warnings
4573   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4574           || dynamic_array[ni.number - 1] != 543);
4575
4576   ;
4577   return 0;
4578 }
4579 _ACEOF
4580 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4581 do
4582   CC="$ac_save_CC $ac_arg"
4583   if ac_fn_c_try_compile "$LINENO"; then :
4584   ac_cv_prog_cc_c99=$ac_arg
4585 fi
4586 rm -f core conftest.err conftest.$ac_objext
4587   test "x$ac_cv_prog_cc_c99" != "xno" && break
4588 done
4589 rm -f conftest.$ac_ext
4590 CC=$ac_save_CC
4591
4592 fi
4593 # AC_CACHE_VAL
4594 case "x$ac_cv_prog_cc_c99" in
4595   x)
4596     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4597 $as_echo "none needed" >&6; } ;;
4598   xno)
4599     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4600 $as_echo "unsupported" >&6; } ;;
4601   *)
4602     CC="$CC $ac_cv_prog_cc_c99"
4603     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4604 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4605 esac
4606 if test "x$ac_cv_prog_cc_c99" != xno; then :
4607
4608 fi
4609
4610
4611
4612 # Error out if the compiler does not support C99, as the codebase
4613 # relies on that.
4614 if test "$ac_cv_prog_cc_c99" = no; then
4615     as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4616 fi
4617
4618 ac_ext=cpp
4619 ac_cpp='$CXXCPP $CPPFLAGS'
4620 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4621 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4622 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4623 if test -z "$CXX"; then
4624   if test -n "$CCC"; then
4625     CXX=$CCC
4626   else
4627     if test -n "$ac_tool_prefix"; then
4628   for ac_prog in $pgac_cxx_list
4629   do
4630     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4631 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4633 $as_echo_n "checking for $ac_word... " >&6; }
4634 if ${ac_cv_prog_CXX+:} false; then :
4635   $as_echo_n "(cached) " >&6
4636 else
4637   if test -n "$CXX"; then
4638   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4639 else
4640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4641 for as_dir in $PATH
4642 do
4643   IFS=$as_save_IFS
4644   test -z "$as_dir" && as_dir=.
4645     for ac_exec_ext in '' $ac_executable_extensions; do
4646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4647     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4649     break 2
4650   fi
4651 done
4652   done
4653 IFS=$as_save_IFS
4654
4655 fi
4656 fi
4657 CXX=$ac_cv_prog_CXX
4658 if test -n "$CXX"; then
4659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4660 $as_echo "$CXX" >&6; }
4661 else
4662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4663 $as_echo "no" >&6; }
4664 fi
4665
4666
4667     test -n "$CXX" && break
4668   done
4669 fi
4670 if test -z "$CXX"; then
4671   ac_ct_CXX=$CXX
4672   for ac_prog in $pgac_cxx_list
4673 do
4674   # Extract the first word of "$ac_prog", so it can be a program name with args.
4675 set dummy $ac_prog; ac_word=$2
4676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4677 $as_echo_n "checking for $ac_word... " >&6; }
4678 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4679   $as_echo_n "(cached) " >&6
4680 else
4681   if test -n "$ac_ct_CXX"; then
4682   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4683 else
4684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685 for as_dir in $PATH
4686 do
4687   IFS=$as_save_IFS
4688   test -z "$as_dir" && as_dir=.
4689     for ac_exec_ext in '' $ac_executable_extensions; do
4690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4691     ac_cv_prog_ac_ct_CXX="$ac_prog"
4692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693     break 2
4694   fi
4695 done
4696   done
4697 IFS=$as_save_IFS
4698
4699 fi
4700 fi
4701 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4702 if test -n "$ac_ct_CXX"; then
4703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4704 $as_echo "$ac_ct_CXX" >&6; }
4705 else
4706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707 $as_echo "no" >&6; }
4708 fi
4709
4710
4711   test -n "$ac_ct_CXX" && break
4712 done
4713
4714   if test "x$ac_ct_CXX" = x; then
4715     CXX="g++"
4716   else
4717     case $cross_compiling:$ac_tool_warned in
4718 yes:)
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4720 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4721 ac_tool_warned=yes ;;
4722 esac
4723     CXX=$ac_ct_CXX
4724   fi
4725 fi
4726
4727   fi
4728 fi
4729 # Provide some information about the compiler.
4730 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4731 set X $ac_compile
4732 ac_compiler=$2
4733 for ac_option in --version -v -V -qversion; do
4734   { { ac_try="$ac_compiler $ac_option >&5"
4735 case "(($ac_try" in
4736   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4737   *) ac_try_echo=$ac_try;;
4738 esac
4739 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4740 $as_echo "$ac_try_echo"; } >&5
4741   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4742   ac_status=$?
4743   if test -s conftest.err; then
4744     sed '10a\
4745 ... rest of stderr output deleted ...
4746          10q' conftest.err >conftest.er1
4747     cat conftest.er1 >&5
4748   fi
4749   rm -f conftest.er1 conftest.err
4750   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4751   test $ac_status = 0; }
4752 done
4753
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4755 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4756 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4757   $as_echo_n "(cached) " >&6
4758 else
4759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4760 /* end confdefs.h.  */
4761
4762 int
4763 main ()
4764 {
4765 #ifndef __GNUC__
4766        choke me
4767 #endif
4768
4769   ;
4770   return 0;
4771 }
4772 _ACEOF
4773 if ac_fn_cxx_try_compile "$LINENO"; then :
4774   ac_compiler_gnu=yes
4775 else
4776   ac_compiler_gnu=no
4777 fi
4778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4779 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4780
4781 fi
4782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4783 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4784 if test $ac_compiler_gnu = yes; then
4785   GXX=yes
4786 else
4787   GXX=
4788 fi
4789 ac_test_CXXFLAGS=${CXXFLAGS+set}
4790 ac_save_CXXFLAGS=$CXXFLAGS
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4792 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4793 if ${ac_cv_prog_cxx_g+:} false; then :
4794   $as_echo_n "(cached) " >&6
4795 else
4796   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4797    ac_cxx_werror_flag=yes
4798    ac_cv_prog_cxx_g=no
4799    CXXFLAGS="-g"
4800    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4801 /* end confdefs.h.  */
4802
4803 int
4804 main ()
4805 {
4806
4807   ;
4808   return 0;
4809 }
4810 _ACEOF
4811 if ac_fn_cxx_try_compile "$LINENO"; then :
4812   ac_cv_prog_cxx_g=yes
4813 else
4814   CXXFLAGS=""
4815       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4816 /* end confdefs.h.  */
4817
4818 int
4819 main ()
4820 {
4821
4822   ;
4823   return 0;
4824 }
4825 _ACEOF
4826 if ac_fn_cxx_try_compile "$LINENO"; then :
4827
4828 else
4829   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4830          CXXFLAGS="-g"
4831          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4832 /* end confdefs.h.  */
4833
4834 int
4835 main ()
4836 {
4837
4838   ;
4839   return 0;
4840 }
4841 _ACEOF
4842 if ac_fn_cxx_try_compile "$LINENO"; then :
4843   ac_cv_prog_cxx_g=yes
4844 fi
4845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4846 fi
4847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4848 fi
4849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4850    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4851 fi
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4853 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4854 if test "$ac_test_CXXFLAGS" = set; then
4855   CXXFLAGS=$ac_save_CXXFLAGS
4856 elif test $ac_cv_prog_cxx_g = yes; then
4857   if test "$GXX" = yes; then
4858     CXXFLAGS="-g -O2"
4859   else
4860     CXXFLAGS="-g"
4861   fi
4862 else
4863   if test "$GXX" = yes; then
4864     CXXFLAGS="-O2"
4865   else
4866     CXXFLAGS=
4867   fi
4868 fi
4869 ac_ext=c
4870 ac_cpp='$CPP $CPPFLAGS'
4871 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4872 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4873 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4874
4875
4876 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4877 # but has idiosyncrasies of its own.  We assume icc will define
4878 # __INTEL_COMPILER regardless of CFLAGS.
4879
4880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4881 /* end confdefs.h.  */
4882
4883 int
4884 main ()
4885 {
4886 #ifndef __INTEL_COMPILER
4887 choke me
4888 #endif
4889   ;
4890   return 0;
4891 }
4892 _ACEOF
4893 if ac_fn_c_try_compile "$LINENO"; then :
4894   ICC=yes
4895 else
4896   ICC=no
4897 fi
4898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4899
4900 # Check if it's Sun Studio compiler. We assume that
4901 # __SUNPRO_C will be defined for Sun Studio compilers
4902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4903 /* end confdefs.h.  */
4904
4905 int
4906 main ()
4907 {
4908 #ifndef __SUNPRO_C
4909 choke me
4910 #endif
4911   ;
4912   return 0;
4913 }
4914 _ACEOF
4915 if ac_fn_c_try_compile "$LINENO"; then :
4916   SUN_STUDIO_CC=yes
4917 else
4918   SUN_STUDIO_CC=no
4919 fi
4920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4921
4922
4923
4924
4925 #
4926 # LLVM
4927 #
4928 # Checked early because subsequent tests depend on it.
4929
4930
4931
4932 # Check whether --with-llvm was given.
4933 if test "${with_llvm+set}" = set; then :
4934   withval=$with_llvm;
4935   case $withval in
4936     yes)
4937
4938 $as_echo "#define USE_LLVM 1" >>confdefs.h
4939
4940       ;;
4941     no)
4942       :
4943       ;;
4944     *)
4945       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4946       ;;
4947   esac
4948
4949 else
4950   with_llvm=no
4951
4952 fi
4953
4954
4955
4956 for ac_prog in gawk mawk nawk awk
4957 do
4958   # Extract the first word of "$ac_prog", so it can be a program name with args.
4959 set dummy $ac_prog; ac_word=$2
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4961 $as_echo_n "checking for $ac_word... " >&6; }
4962 if ${ac_cv_prog_AWK+:} false; then :
4963   $as_echo_n "(cached) " >&6
4964 else
4965   if test -n "$AWK"; then
4966   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4967 else
4968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4969 for as_dir in $PATH
4970 do
4971   IFS=$as_save_IFS
4972   test -z "$as_dir" && as_dir=.
4973     for ac_exec_ext in '' $ac_executable_extensions; do
4974   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4975     ac_cv_prog_AWK="$ac_prog"
4976     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4977     break 2
4978   fi
4979 done
4980   done
4981 IFS=$as_save_IFS
4982
4983 fi
4984 fi
4985 AWK=$ac_cv_prog_AWK
4986 if test -n "$AWK"; then
4987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4988 $as_echo "$AWK" >&6; }
4989 else
4990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4991 $as_echo "no" >&6; }
4992 fi
4993
4994
4995   test -n "$AWK" && break
4996 done
4997
4998 if test "$with_llvm" = yes; then :
4999
5000
5001
5002
5003
5004   if test -z "$LLVM_CONFIG"; then
5005   for ac_prog in llvm-config llvm-config-7 llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
5006 do
5007   # Extract the first word of "$ac_prog", so it can be a program name with args.
5008 set dummy $ac_prog; ac_word=$2
5009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010 $as_echo_n "checking for $ac_word... " >&6; }
5011 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5012   $as_echo_n "(cached) " >&6
5013 else
5014   case $LLVM_CONFIG in
5015   [\\/]* | ?:[\\/]*)
5016   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5017   ;;
5018   *)
5019   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020 for as_dir in $PATH
5021 do
5022   IFS=$as_save_IFS
5023   test -z "$as_dir" && as_dir=.
5024     for ac_exec_ext in '' $ac_executable_extensions; do
5025   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5026     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5027     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5028     break 2
5029   fi
5030 done
5031   done
5032 IFS=$as_save_IFS
5033
5034   ;;
5035 esac
5036 fi
5037 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5038 if test -n "$LLVM_CONFIG"; then
5039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5040 $as_echo "$LLVM_CONFIG" >&6; }
5041 else
5042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043 $as_echo "no" >&6; }
5044 fi
5045
5046
5047   test -n "$LLVM_CONFIG" && break
5048 done
5049
5050 else
5051   # Report the value of LLVM_CONFIG in configure's output in all cases.
5052   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5053 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5055 $as_echo "$LLVM_CONFIG" >&6; }
5056 fi
5057
5058
5059   # no point continuing if llvm wasn't found
5060   if test -z "$LLVM_CONFIG"; then
5061     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5062   fi
5063   # check if detected $LLVM_CONFIG is executable
5064   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5065   if test "x$pgac_llvm_version" = "xno"; then
5066     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5067   fi
5068   # and whether the version is supported
5069   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5070     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5071   fi
5072
5073   # need clang to create some bitcode files
5074
5075   if test -z "$CLANG"; then
5076   for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5077 do
5078   # Extract the first word of "$ac_prog", so it can be a program name with args.
5079 set dummy $ac_prog; ac_word=$2
5080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5081 $as_echo_n "checking for $ac_word... " >&6; }
5082 if ${ac_cv_path_CLANG+:} false; then :
5083   $as_echo_n "(cached) " >&6
5084 else
5085   case $CLANG in
5086   [\\/]* | ?:[\\/]*)
5087   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5088   ;;
5089   *)
5090   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5091 for as_dir in $PATH
5092 do
5093   IFS=$as_save_IFS
5094   test -z "$as_dir" && as_dir=.
5095     for ac_exec_ext in '' $ac_executable_extensions; do
5096   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5097     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5099     break 2
5100   fi
5101 done
5102   done
5103 IFS=$as_save_IFS
5104
5105   ;;
5106 esac
5107 fi
5108 CLANG=$ac_cv_path_CLANG
5109 if test -n "$CLANG"; then
5110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5111 $as_echo "$CLANG" >&6; }
5112 else
5113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5114 $as_echo "no" >&6; }
5115 fi
5116
5117
5118   test -n "$CLANG" && break
5119 done
5120
5121 else
5122   # Report the value of CLANG in configure's output in all cases.
5123   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5124 $as_echo_n "checking for CLANG... " >&6; }
5125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5126 $as_echo "$CLANG" >&6; }
5127 fi
5128
5129   if test -z "$CLANG"; then
5130     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5131   fi
5132   # make sure clang is executable
5133   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5134     as_fn_error $? "$CLANG does not work" "$LINENO" 5
5135   fi
5136   # Could check clang version, but it doesn't seem that
5137   # important. Systems with a new enough LLVM version are usually
5138   # going to have a decent clang version too. It's also not entirely
5139   # clear what the minimum version is.
5140
5141   # Collect compiler flags necessary to build the LLVM dependent
5142   # shared library.
5143   for pgac_option in `$LLVM_CONFIG --cppflags`; do
5144     case $pgac_option in
5145       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5146     esac
5147   done
5148
5149   for pgac_option in `$LLVM_CONFIG --ldflags`; do
5150     case $pgac_option in
5151       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5152     esac
5153   done
5154
5155   # ABI influencing options, standard influencing options
5156   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5157     case $pgac_option in
5158       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5159       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5160     esac
5161   done
5162
5163   # Look for components we're interested in, collect necessary
5164   # libs. As some components are optional, we can't just list all of
5165   # them as it'd raise an error.
5166   pgac_components='';
5167   for pgac_component in `$LLVM_CONFIG --components`; do
5168     case $pgac_component in
5169       engine) pgac_components="$pgac_components $pgac_component";;
5170       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5171       orcjit) pgac_components="$pgac_components $pgac_component";;
5172       passes) pgac_components="$pgac_components $pgac_component";;
5173       perfjitevents) pgac_components="$pgac_components $pgac_component";;
5174     esac
5175   done;
5176
5177   # And then get the libraries that need to be linked in for the
5178   # selected components.  They're large libraries, we only want to
5179   # link them into the LLVM using shared library.
5180   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5181     case $pgac_option in
5182       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5183     esac
5184   done
5185
5186   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5187
5188   # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5189
5190
5191
5192
5193
5194
5195
5196
5197 fi # fi
5198
5199
5200 unset CFLAGS
5201 unset CXXFLAGS
5202
5203 #
5204 # Read the template
5205 #
5206 . "$srcdir/src/template/$template" || exit
5207
5208 # C[XX]FLAGS are selected so:
5209 # If the user specifies something in the environment, that is used.
5210 # else:  If the template file set something, that is used.
5211 # else:  If coverage was enabled, don't set anything.
5212 # else:  If the compiler is GCC, then we use -O2.
5213 # else:  If the compiler is something else, then we use -O, unless debugging.
5214
5215 if test "$ac_env_CFLAGS_set" = set; then
5216   CFLAGS=$ac_env_CFLAGS_value
5217 elif test "${CFLAGS+set}" = set; then
5218   : # (keep what template set)
5219 elif test "$enable_coverage" = yes; then
5220   : # no optimization by default
5221 elif test "$GCC" = yes; then
5222   CFLAGS="-O2"
5223 else
5224   # if the user selected debug mode, don't use -O
5225   if test "$enable_debug" != yes; then
5226     CFLAGS="-O"
5227   fi
5228 fi
5229
5230 if test "$ac_env_CXXFLAGS_set" = set; then
5231   CXXFLAGS=$ac_env_CXXFLAGS_value
5232 elif test "${CXXFLAGS+set}" = set; then
5233   : # (keep what template set)
5234 elif test "$enable_coverage" = yes; then
5235   : # no optimization by default
5236 elif test "$GCC" = yes; then
5237   CXXFLAGS="-O2"
5238 else
5239   # if the user selected debug mode, don't use -O
5240   if test "$enable_debug" != yes; then
5241     CXXFLAGS="-O"
5242   fi
5243 fi
5244
5245 # When generating bitcode (for inlining) we always want to use -O2
5246 # even when --enable-debug is specified. The bitcode it's not going to
5247 # be used for line-by-line debugging, and JIT inlining doesn't work
5248 # without at least -O1 (otherwise clang will emit 'noinline'
5249 # attributes everywhere), which is bad for testing.  Still allow the
5250 # environment to override if done explicitly.
5251 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5252   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5253 else
5254   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5255 fi
5256 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5257   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5258 else
5259   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5260 fi
5261
5262 # C[XX]FLAGS we determined above will be added back at the end
5263 user_CFLAGS=$CFLAGS
5264 CFLAGS=""
5265 user_CXXFLAGS=$CXXFLAGS
5266 CXXFLAGS=""
5267 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5268 BITCODE_CFLAGS=""
5269 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5270 BITCODE_CXXFLAGS=""
5271
5272 # set CFLAGS_VECTOR from the environment, if available
5273 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5274   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5275 fi
5276
5277 # Some versions of GCC support some additional useful warning flags.
5278 # Check whether they are supported, and add them to CFLAGS if so.
5279 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5280 # but has its own.  Also check other compiler-specific flags here.
5281
5282 if test "$GCC" = yes -a "$ICC" = no; then
5283   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5284   CXXFLAGS="-Wall -Wpointer-arith"
5285   # These work in some but not all gcc versions
5286
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5288 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5289 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5290   $as_echo_n "(cached) " >&6
5291 else
5292   pgac_save_CFLAGS=$CFLAGS
5293 pgac_save_CC=$CC
5294 CC=${CC}
5295 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5296 ac_save_c_werror_flag=$ac_c_werror_flag
5297 ac_c_werror_flag=yes
5298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5299 /* end confdefs.h.  */
5300
5301 int
5302 main ()
5303 {
5304
5305   ;
5306   return 0;
5307 }
5308 _ACEOF
5309 if ac_fn_c_try_compile "$LINENO"; then :
5310   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5311 else
5312   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5313 fi
5314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5315 ac_c_werror_flag=$ac_save_c_werror_flag
5316 CFLAGS="$pgac_save_CFLAGS"
5317 CC="$pgac_save_CC"
5318 fi
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5320 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5321 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5322   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5323 fi
5324
5325
5326   # -Wdeclaration-after-statement isn't applicable for C++
5327   # Really don't want VLAs to be used in our dialect of C
5328
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5330 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5331 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5332   $as_echo_n "(cached) " >&6
5333 else
5334   pgac_save_CFLAGS=$CFLAGS
5335 pgac_save_CC=$CC
5336 CC=${CC}
5337 CFLAGS="${CFLAGS} -Werror=vla"
5338 ac_save_c_werror_flag=$ac_c_werror_flag
5339 ac_c_werror_flag=yes
5340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5341 /* end confdefs.h.  */
5342
5343 int
5344 main ()
5345 {
5346
5347   ;
5348   return 0;
5349 }
5350 _ACEOF
5351 if ac_fn_c_try_compile "$LINENO"; then :
5352   pgac_cv_prog_CC_cflags__Werror_vla=yes
5353 else
5354   pgac_cv_prog_CC_cflags__Werror_vla=no
5355 fi
5356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5357 ac_c_werror_flag=$ac_save_c_werror_flag
5358 CFLAGS="$pgac_save_CFLAGS"
5359 CC="$pgac_save_CC"
5360 fi
5361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5362 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5363 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5364   CFLAGS="${CFLAGS} -Werror=vla"
5365 fi
5366
5367
5368   # -Wvla is not applicable for C++
5369
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5371 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5372 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5373   $as_echo_n "(cached) " >&6
5374 else
5375   pgac_save_CFLAGS=$CFLAGS
5376 pgac_save_CC=$CC
5377 CC=${CC}
5378 CFLAGS="${CFLAGS} -Wendif-labels"
5379 ac_save_c_werror_flag=$ac_c_werror_flag
5380 ac_c_werror_flag=yes
5381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5382 /* end confdefs.h.  */
5383
5384 int
5385 main ()
5386 {
5387
5388   ;
5389   return 0;
5390 }
5391 _ACEOF
5392 if ac_fn_c_try_compile "$LINENO"; then :
5393   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5394 else
5395   pgac_cv_prog_CC_cflags__Wendif_labels=no
5396 fi
5397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5398 ac_c_werror_flag=$ac_save_c_werror_flag
5399 CFLAGS="$pgac_save_CFLAGS"
5400 CC="$pgac_save_CC"
5401 fi
5402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5403 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5404 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5405   CFLAGS="${CFLAGS} -Wendif-labels"
5406 fi
5407
5408
5409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5410 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5411 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5412   $as_echo_n "(cached) " >&6
5413 else
5414   pgac_save_CXXFLAGS=$CXXFLAGS
5415 pgac_save_CXX=$CXX
5416 CXX=${CXX}
5417 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5418 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5419 ac_cxx_werror_flag=yes
5420 ac_ext=cpp
5421 ac_cpp='$CXXCPP $CPPFLAGS'
5422 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5423 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5424 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5425
5426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5427 /* end confdefs.h.  */
5428
5429 int
5430 main ()
5431 {
5432
5433   ;
5434   return 0;
5435 }
5436 _ACEOF
5437 if ac_fn_cxx_try_compile "$LINENO"; then :
5438   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5439 else
5440   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5441 fi
5442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5443 ac_ext=c
5444 ac_cpp='$CPP $CPPFLAGS'
5445 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5446 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5448
5449 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5450 CXXFLAGS="$pgac_save_CXXFLAGS"
5451 CXX="$pgac_save_CXX"
5452 fi
5453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5454 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5455 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5456   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5457 fi
5458
5459
5460
5461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5462 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5463 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5464   $as_echo_n "(cached) " >&6
5465 else
5466   pgac_save_CFLAGS=$CFLAGS
5467 pgac_save_CC=$CC
5468 CC=${CC}
5469 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5470 ac_save_c_werror_flag=$ac_c_werror_flag
5471 ac_c_werror_flag=yes
5472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5473 /* end confdefs.h.  */
5474
5475 int
5476 main ()
5477 {
5478
5479   ;
5480   return 0;
5481 }
5482 _ACEOF
5483 if ac_fn_c_try_compile "$LINENO"; then :
5484   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5485 else
5486   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5487 fi
5488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5489 ac_c_werror_flag=$ac_save_c_werror_flag
5490 CFLAGS="$pgac_save_CFLAGS"
5491 CC="$pgac_save_CC"
5492 fi
5493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5494 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5495 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5496   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5497 fi
5498
5499
5500   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5501 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5502 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5503   $as_echo_n "(cached) " >&6
5504 else
5505   pgac_save_CXXFLAGS=$CXXFLAGS
5506 pgac_save_CXX=$CXX
5507 CXX=${CXX}
5508 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5509 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5510 ac_cxx_werror_flag=yes
5511 ac_ext=cpp
5512 ac_cpp='$CXXCPP $CPPFLAGS'
5513 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5514 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5515 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5516
5517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5518 /* end confdefs.h.  */
5519
5520 int
5521 main ()
5522 {
5523
5524   ;
5525   return 0;
5526 }
5527 _ACEOF
5528 if ac_fn_cxx_try_compile "$LINENO"; then :
5529   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5530 else
5531   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5532 fi
5533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5534 ac_ext=c
5535 ac_cpp='$CPP $CPPFLAGS'
5536 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5537 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5538 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5539
5540 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5541 CXXFLAGS="$pgac_save_CXXFLAGS"
5542 CXX="$pgac_save_CXX"
5543 fi
5544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5545 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5546 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5547   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5548 fi
5549
5550
5551   # This was included in -Wall/-Wformat in older GCC versions
5552
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5554 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5555 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5556   $as_echo_n "(cached) " >&6
5557 else
5558   pgac_save_CFLAGS=$CFLAGS
5559 pgac_save_CC=$CC
5560 CC=${CC}
5561 CFLAGS="${CFLAGS} -Wformat-security"
5562 ac_save_c_werror_flag=$ac_c_werror_flag
5563 ac_c_werror_flag=yes
5564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5565 /* end confdefs.h.  */
5566
5567 int
5568 main ()
5569 {
5570
5571   ;
5572   return 0;
5573 }
5574 _ACEOF
5575 if ac_fn_c_try_compile "$LINENO"; then :
5576   pgac_cv_prog_CC_cflags__Wformat_security=yes
5577 else
5578   pgac_cv_prog_CC_cflags__Wformat_security=no
5579 fi
5580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5581 ac_c_werror_flag=$ac_save_c_werror_flag
5582 CFLAGS="$pgac_save_CFLAGS"
5583 CC="$pgac_save_CC"
5584 fi
5585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5586 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5587 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5588   CFLAGS="${CFLAGS} -Wformat-security"
5589 fi
5590
5591
5592   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5593 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5594 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5595   $as_echo_n "(cached) " >&6
5596 else
5597   pgac_save_CXXFLAGS=$CXXFLAGS
5598 pgac_save_CXX=$CXX
5599 CXX=${CXX}
5600 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5601 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5602 ac_cxx_werror_flag=yes
5603 ac_ext=cpp
5604 ac_cpp='$CXXCPP $CPPFLAGS'
5605 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5606 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5607 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5608
5609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5610 /* end confdefs.h.  */
5611
5612 int
5613 main ()
5614 {
5615
5616   ;
5617   return 0;
5618 }
5619 _ACEOF
5620 if ac_fn_cxx_try_compile "$LINENO"; then :
5621   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5622 else
5623   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5624 fi
5625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5626 ac_ext=c
5627 ac_cpp='$CPP $CPPFLAGS'
5628 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5629 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5630 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5631
5632 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5633 CXXFLAGS="$pgac_save_CXXFLAGS"
5634 CXX="$pgac_save_CXX"
5635 fi
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5637 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5638 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5639   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5640 fi
5641
5642
5643   # Disable strict-aliasing rules; needed for gcc 3.3+
5644
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5646 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5647 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5648   $as_echo_n "(cached) " >&6
5649 else
5650   pgac_save_CFLAGS=$CFLAGS
5651 pgac_save_CC=$CC
5652 CC=${CC}
5653 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5654 ac_save_c_werror_flag=$ac_c_werror_flag
5655 ac_c_werror_flag=yes
5656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5657 /* end confdefs.h.  */
5658
5659 int
5660 main ()
5661 {
5662
5663   ;
5664   return 0;
5665 }
5666 _ACEOF
5667 if ac_fn_c_try_compile "$LINENO"; then :
5668   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5669 else
5670   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5671 fi
5672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5673 ac_c_werror_flag=$ac_save_c_werror_flag
5674 CFLAGS="$pgac_save_CFLAGS"
5675 CC="$pgac_save_CC"
5676 fi
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5678 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5679 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5680   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5681 fi
5682
5683
5684   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5685 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5686 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5687   $as_echo_n "(cached) " >&6
5688 else
5689   pgac_save_CXXFLAGS=$CXXFLAGS
5690 pgac_save_CXX=$CXX
5691 CXX=${CXX}
5692 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5693 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5694 ac_cxx_werror_flag=yes
5695 ac_ext=cpp
5696 ac_cpp='$CXXCPP $CPPFLAGS'
5697 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5698 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5699 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5700
5701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5702 /* end confdefs.h.  */
5703
5704 int
5705 main ()
5706 {
5707
5708   ;
5709   return 0;
5710 }
5711 _ACEOF
5712 if ac_fn_cxx_try_compile "$LINENO"; then :
5713   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5714 else
5715   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5716 fi
5717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5718 ac_ext=c
5719 ac_cpp='$CPP $CPPFLAGS'
5720 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5721 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5722 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5723
5724 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5725 CXXFLAGS="$pgac_save_CXXFLAGS"
5726 CXX="$pgac_save_CXX"
5727 fi
5728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5729 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5730 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5731   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5732 fi
5733
5734
5735   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5736
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5738 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5739 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5740   $as_echo_n "(cached) " >&6
5741 else
5742   pgac_save_CFLAGS=$CFLAGS
5743 pgac_save_CC=$CC
5744 CC=${CC}
5745 CFLAGS="${CFLAGS} -fwrapv"
5746 ac_save_c_werror_flag=$ac_c_werror_flag
5747 ac_c_werror_flag=yes
5748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5749 /* end confdefs.h.  */
5750
5751 int
5752 main ()
5753 {
5754
5755   ;
5756   return 0;
5757 }
5758 _ACEOF
5759 if ac_fn_c_try_compile "$LINENO"; then :
5760   pgac_cv_prog_CC_cflags__fwrapv=yes
5761 else
5762   pgac_cv_prog_CC_cflags__fwrapv=no
5763 fi
5764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5765 ac_c_werror_flag=$ac_save_c_werror_flag
5766 CFLAGS="$pgac_save_CFLAGS"
5767 CC="$pgac_save_CC"
5768 fi
5769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5770 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5771 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5772   CFLAGS="${CFLAGS} -fwrapv"
5773 fi
5774
5775
5776   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5777 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5778 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5779   $as_echo_n "(cached) " >&6
5780 else
5781   pgac_save_CXXFLAGS=$CXXFLAGS
5782 pgac_save_CXX=$CXX
5783 CXX=${CXX}
5784 CXXFLAGS="${CXXFLAGS} -fwrapv"
5785 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5786 ac_cxx_werror_flag=yes
5787 ac_ext=cpp
5788 ac_cpp='$CXXCPP $CPPFLAGS'
5789 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5790 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5791 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5792
5793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5794 /* end confdefs.h.  */
5795
5796 int
5797 main ()
5798 {
5799
5800   ;
5801   return 0;
5802 }
5803 _ACEOF
5804 if ac_fn_cxx_try_compile "$LINENO"; then :
5805   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5806 else
5807   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5808 fi
5809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5810 ac_ext=c
5811 ac_cpp='$CPP $CPPFLAGS'
5812 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5813 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5814 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5815
5816 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5817 CXXFLAGS="$pgac_save_CXXFLAGS"
5818 CXX="$pgac_save_CXX"
5819 fi
5820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5821 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5822 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5823   CXXFLAGS="${CXXFLAGS} -fwrapv"
5824 fi
5825
5826
5827   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5828
5829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5830 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5831 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5832   $as_echo_n "(cached) " >&6
5833 else
5834   pgac_save_CFLAGS=$CFLAGS
5835 pgac_save_CC=$CC
5836 CC=${CC}
5837 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5838 ac_save_c_werror_flag=$ac_c_werror_flag
5839 ac_c_werror_flag=yes
5840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5841 /* end confdefs.h.  */
5842
5843 int
5844 main ()
5845 {
5846
5847   ;
5848   return 0;
5849 }
5850 _ACEOF
5851 if ac_fn_c_try_compile "$LINENO"; then :
5852   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5853 else
5854   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5855 fi
5856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5857 ac_c_werror_flag=$ac_save_c_werror_flag
5858 CFLAGS="$pgac_save_CFLAGS"
5859 CC="$pgac_save_CC"
5860 fi
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5862 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5863 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5864   CFLAGS="${CFLAGS} -fexcess-precision=standard"
5865 fi
5866
5867
5868   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5869 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5870 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5871   $as_echo_n "(cached) " >&6
5872 else
5873   pgac_save_CXXFLAGS=$CXXFLAGS
5874 pgac_save_CXX=$CXX
5875 CXX=${CXX}
5876 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5877 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5878 ac_cxx_werror_flag=yes
5879 ac_ext=cpp
5880 ac_cpp='$CXXCPP $CPPFLAGS'
5881 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5882 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5883 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5884
5885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5886 /* end confdefs.h.  */
5887
5888 int
5889 main ()
5890 {
5891
5892   ;
5893   return 0;
5894 }
5895 _ACEOF
5896 if ac_fn_cxx_try_compile "$LINENO"; then :
5897   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5898 else
5899   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5900 fi
5901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5902 ac_ext=c
5903 ac_cpp='$CPP $CPPFLAGS'
5904 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5905 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5906 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5907
5908 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5909 CXXFLAGS="$pgac_save_CXXFLAGS"
5910 CXX="$pgac_save_CXX"
5911 fi
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5913 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5914 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5915   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5916 fi
5917
5918
5919   # Optimization flags for specific files that benefit from vectorization
5920   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5921 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5922 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5923   $as_echo_n "(cached) " >&6
5924 else
5925   pgac_save_CFLAGS=$CFLAGS
5926 pgac_save_CC=$CC
5927 CC=${CC}
5928 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5929 ac_save_c_werror_flag=$ac_c_werror_flag
5930 ac_c_werror_flag=yes
5931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5932 /* end confdefs.h.  */
5933
5934 int
5935 main ()
5936 {
5937
5938   ;
5939   return 0;
5940 }
5941 _ACEOF
5942 if ac_fn_c_try_compile "$LINENO"; then :
5943   pgac_cv_prog_CC_cflags__funroll_loops=yes
5944 else
5945   pgac_cv_prog_CC_cflags__funroll_loops=no
5946 fi
5947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5948 ac_c_werror_flag=$ac_save_c_werror_flag
5949 CFLAGS="$pgac_save_CFLAGS"
5950 CC="$pgac_save_CC"
5951 fi
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5953 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5954 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5955   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5956 fi
5957
5958
5959   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5960 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5961 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5962   $as_echo_n "(cached) " >&6
5963 else
5964   pgac_save_CFLAGS=$CFLAGS
5965 pgac_save_CC=$CC
5966 CC=${CC}
5967 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5968 ac_save_c_werror_flag=$ac_c_werror_flag
5969 ac_c_werror_flag=yes
5970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5971 /* end confdefs.h.  */
5972
5973 int
5974 main ()
5975 {
5976
5977   ;
5978   return 0;
5979 }
5980 _ACEOF
5981 if ac_fn_c_try_compile "$LINENO"; then :
5982   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5983 else
5984   pgac_cv_prog_CC_cflags__ftree_vectorize=no
5985 fi
5986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5987 ac_c_werror_flag=$ac_save_c_werror_flag
5988 CFLAGS="$pgac_save_CFLAGS"
5989 CC="$pgac_save_CC"
5990 fi
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5992 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5993 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5994   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5995 fi
5996
5997
5998   # We want to suppress clang's unhelpful unused-command-line-argument warnings
5999   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
6000   # test for the positive form and if that works, add the negative form
6001   NOT_THE_CFLAGS=""
6002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6003 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6004 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6005   $as_echo_n "(cached) " >&6
6006 else
6007   pgac_save_CFLAGS=$CFLAGS
6008 pgac_save_CC=$CC
6009 CC=${CC}
6010 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6011 ac_save_c_werror_flag=$ac_c_werror_flag
6012 ac_c_werror_flag=yes
6013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6014 /* end confdefs.h.  */
6015
6016 int
6017 main ()
6018 {
6019
6020   ;
6021   return 0;
6022 }
6023 _ACEOF
6024 if ac_fn_c_try_compile "$LINENO"; then :
6025   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6026 else
6027   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6028 fi
6029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6030 ac_c_werror_flag=$ac_save_c_werror_flag
6031 CFLAGS="$pgac_save_CFLAGS"
6032 CC="$pgac_save_CC"
6033 fi
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6035 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6036 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6037   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6038 fi
6039
6040
6041   if test -n "$NOT_THE_CFLAGS"; then
6042     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6043   fi
6044   # Similarly disable useless truncation warnings from gcc 8+
6045   NOT_THE_CFLAGS=""
6046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6047 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6048 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6049   $as_echo_n "(cached) " >&6
6050 else
6051   pgac_save_CFLAGS=$CFLAGS
6052 pgac_save_CC=$CC
6053 CC=${CC}
6054 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6055 ac_save_c_werror_flag=$ac_c_werror_flag
6056 ac_c_werror_flag=yes
6057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6058 /* end confdefs.h.  */
6059
6060 int
6061 main ()
6062 {
6063
6064   ;
6065   return 0;
6066 }
6067 _ACEOF
6068 if ac_fn_c_try_compile "$LINENO"; then :
6069   pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6070 else
6071   pgac_cv_prog_CC_cflags__Wformat_truncation=no
6072 fi
6073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6074 ac_c_werror_flag=$ac_save_c_werror_flag
6075 CFLAGS="$pgac_save_CFLAGS"
6076 CC="$pgac_save_CC"
6077 fi
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6079 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6080 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6081   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6082 fi
6083
6084
6085   if test -n "$NOT_THE_CFLAGS"; then
6086     CFLAGS="$CFLAGS -Wno-format-truncation"
6087   fi
6088   NOT_THE_CFLAGS=""
6089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6090 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6091 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6092   $as_echo_n "(cached) " >&6
6093 else
6094   pgac_save_CFLAGS=$CFLAGS
6095 pgac_save_CC=$CC
6096 CC=${CC}
6097 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6098 ac_save_c_werror_flag=$ac_c_werror_flag
6099 ac_c_werror_flag=yes
6100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6101 /* end confdefs.h.  */
6102
6103 int
6104 main ()
6105 {
6106
6107   ;
6108   return 0;
6109 }
6110 _ACEOF
6111 if ac_fn_c_try_compile "$LINENO"; then :
6112   pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6113 else
6114   pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6115 fi
6116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6117 ac_c_werror_flag=$ac_save_c_werror_flag
6118 CFLAGS="$pgac_save_CFLAGS"
6119 CC="$pgac_save_CC"
6120 fi
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6122 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6123 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6124   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6125 fi
6126
6127
6128   if test -n "$NOT_THE_CFLAGS"; then
6129     CFLAGS="$CFLAGS -Wno-stringop-truncation"
6130   fi
6131 elif test "$ICC" = yes; then
6132   # Intel's compiler has a bug/misoptimization in checking for
6133   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6134
6135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6136 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6137 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6138   $as_echo_n "(cached) " >&6
6139 else
6140   pgac_save_CFLAGS=$CFLAGS
6141 pgac_save_CC=$CC
6142 CC=${CC}
6143 CFLAGS="${CFLAGS} -mp1"
6144 ac_save_c_werror_flag=$ac_c_werror_flag
6145 ac_c_werror_flag=yes
6146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6147 /* end confdefs.h.  */
6148
6149 int
6150 main ()
6151 {
6152
6153   ;
6154   return 0;
6155 }
6156 _ACEOF
6157 if ac_fn_c_try_compile "$LINENO"; then :
6158   pgac_cv_prog_CC_cflags__mp1=yes
6159 else
6160   pgac_cv_prog_CC_cflags__mp1=no
6161 fi
6162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6163 ac_c_werror_flag=$ac_save_c_werror_flag
6164 CFLAGS="$pgac_save_CFLAGS"
6165 CC="$pgac_save_CC"
6166 fi
6167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6168 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6169 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6170   CFLAGS="${CFLAGS} -mp1"
6171 fi
6172
6173
6174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6175 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6176 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6177   $as_echo_n "(cached) " >&6
6178 else
6179   pgac_save_CXXFLAGS=$CXXFLAGS
6180 pgac_save_CXX=$CXX
6181 CXX=${CXX}
6182 CXXFLAGS="${CXXFLAGS} -mp1"
6183 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6184 ac_cxx_werror_flag=yes
6185 ac_ext=cpp
6186 ac_cpp='$CXXCPP $CPPFLAGS'
6187 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6188 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6189 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6190
6191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6192 /* end confdefs.h.  */
6193
6194 int
6195 main ()
6196 {
6197
6198   ;
6199   return 0;
6200 }
6201 _ACEOF
6202 if ac_fn_cxx_try_compile "$LINENO"; then :
6203   pgac_cv_prog_CXX_cxxflags__mp1=yes
6204 else
6205   pgac_cv_prog_CXX_cxxflags__mp1=no
6206 fi
6207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6208 ac_ext=c
6209 ac_cpp='$CPP $CPPFLAGS'
6210 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6211 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6212 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6213
6214 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6215 CXXFLAGS="$pgac_save_CXXFLAGS"
6216 CXX="$pgac_save_CXX"
6217 fi
6218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6219 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6220 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6221   CXXFLAGS="${CXXFLAGS} -mp1"
6222 fi
6223
6224
6225   # Make sure strict aliasing is off (though this is said to be the default)
6226
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6228 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6229 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6230   $as_echo_n "(cached) " >&6
6231 else
6232   pgac_save_CFLAGS=$CFLAGS
6233 pgac_save_CC=$CC
6234 CC=${CC}
6235 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6236 ac_save_c_werror_flag=$ac_c_werror_flag
6237 ac_c_werror_flag=yes
6238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6239 /* end confdefs.h.  */
6240
6241 int
6242 main ()
6243 {
6244
6245   ;
6246   return 0;
6247 }
6248 _ACEOF
6249 if ac_fn_c_try_compile "$LINENO"; then :
6250   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6251 else
6252   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6253 fi
6254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6255 ac_c_werror_flag=$ac_save_c_werror_flag
6256 CFLAGS="$pgac_save_CFLAGS"
6257 CC="$pgac_save_CC"
6258 fi
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6260 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6261 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6262   CFLAGS="${CFLAGS} -fno-strict-aliasing"
6263 fi
6264
6265
6266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6267 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6268 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6269   $as_echo_n "(cached) " >&6
6270 else
6271   pgac_save_CXXFLAGS=$CXXFLAGS
6272 pgac_save_CXX=$CXX
6273 CXX=${CXX}
6274 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6275 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6276 ac_cxx_werror_flag=yes
6277 ac_ext=cpp
6278 ac_cpp='$CXXCPP $CPPFLAGS'
6279 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6280 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6281 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6282
6283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6284 /* end confdefs.h.  */
6285
6286 int
6287 main ()
6288 {
6289
6290   ;
6291   return 0;
6292 }
6293 _ACEOF
6294 if ac_fn_cxx_try_compile "$LINENO"; then :
6295   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6296 else
6297   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6298 fi
6299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6300 ac_ext=c
6301 ac_cpp='$CPP $CPPFLAGS'
6302 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6303 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6304 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6305
6306 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6307 CXXFLAGS="$pgac_save_CXXFLAGS"
6308 CXX="$pgac_save_CXX"
6309 fi
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6311 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6312 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6313   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6314 fi
6315
6316
6317 elif test "$PORTNAME" = "aix"; then
6318   # AIX's xlc has to have strict aliasing turned off too
6319
6320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6321 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6322 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6323   $as_echo_n "(cached) " >&6
6324 else
6325   pgac_save_CFLAGS=$CFLAGS
6326 pgac_save_CC=$CC
6327 CC=${CC}
6328 CFLAGS="${CFLAGS} -qnoansialias"
6329 ac_save_c_werror_flag=$ac_c_werror_flag
6330 ac_c_werror_flag=yes
6331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6332 /* end confdefs.h.  */
6333
6334 int
6335 main ()
6336 {
6337
6338   ;
6339   return 0;
6340 }
6341 _ACEOF
6342 if ac_fn_c_try_compile "$LINENO"; then :
6343   pgac_cv_prog_CC_cflags__qnoansialias=yes
6344 else
6345   pgac_cv_prog_CC_cflags__qnoansialias=no
6346 fi
6347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6348 ac_c_werror_flag=$ac_save_c_werror_flag
6349 CFLAGS="$pgac_save_CFLAGS"
6350 CC="$pgac_save_CC"
6351 fi
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6353 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6354 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6355   CFLAGS="${CFLAGS} -qnoansialias"
6356 fi
6357
6358
6359   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6360 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6361 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6362   $as_echo_n "(cached) " >&6
6363 else
6364   pgac_save_CXXFLAGS=$CXXFLAGS
6365 pgac_save_CXX=$CXX
6366 CXX=${CXX}
6367 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6368 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6369 ac_cxx_werror_flag=yes
6370 ac_ext=cpp
6371 ac_cpp='$CXXCPP $CPPFLAGS'
6372 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6373 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6374 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6375
6376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6377 /* end confdefs.h.  */
6378
6379 int
6380 main ()
6381 {
6382
6383   ;
6384   return 0;
6385 }
6386 _ACEOF
6387 if ac_fn_cxx_try_compile "$LINENO"; then :
6388   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6389 else
6390   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6391 fi
6392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6393 ac_ext=c
6394 ac_cpp='$CPP $CPPFLAGS'
6395 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6396 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6397 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6398
6399 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6400 CXXFLAGS="$pgac_save_CXXFLAGS"
6401 CXX="$pgac_save_CXX"
6402 fi
6403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6404 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6405 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6406   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6407 fi
6408
6409
6410
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6412 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6413 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6414   $as_echo_n "(cached) " >&6
6415 else
6416   pgac_save_CFLAGS=$CFLAGS
6417 pgac_save_CC=$CC
6418 CC=${CC}
6419 CFLAGS="${CFLAGS} -qlonglong"
6420 ac_save_c_werror_flag=$ac_c_werror_flag
6421 ac_c_werror_flag=yes
6422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6423 /* end confdefs.h.  */
6424
6425 int
6426 main ()
6427 {
6428
6429   ;
6430   return 0;
6431 }
6432 _ACEOF
6433 if ac_fn_c_try_compile "$LINENO"; then :
6434   pgac_cv_prog_CC_cflags__qlonglong=yes
6435 else
6436   pgac_cv_prog_CC_cflags__qlonglong=no
6437 fi
6438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6439 ac_c_werror_flag=$ac_save_c_werror_flag
6440 CFLAGS="$pgac_save_CFLAGS"
6441 CC="$pgac_save_CC"
6442 fi
6443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6444 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6445 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6446   CFLAGS="${CFLAGS} -qlonglong"
6447 fi
6448
6449
6450   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6451 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6452 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6453   $as_echo_n "(cached) " >&6
6454 else
6455   pgac_save_CXXFLAGS=$CXXFLAGS
6456 pgac_save_CXX=$CXX
6457 CXX=${CXX}
6458 CXXFLAGS="${CXXFLAGS} -qlonglong"
6459 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6460 ac_cxx_werror_flag=yes
6461 ac_ext=cpp
6462 ac_cpp='$CXXCPP $CPPFLAGS'
6463 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6464 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6465 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6466
6467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6468 /* end confdefs.h.  */
6469
6470 int
6471 main ()
6472 {
6473
6474   ;
6475   return 0;
6476 }
6477 _ACEOF
6478 if ac_fn_cxx_try_compile "$LINENO"; then :
6479   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6480 else
6481   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6482 fi
6483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6484 ac_ext=c
6485 ac_cpp='$CPP $CPPFLAGS'
6486 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6487 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6488 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6489
6490 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6491 CXXFLAGS="$pgac_save_CXXFLAGS"
6492 CXX="$pgac_save_CXX"
6493 fi
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6495 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6496 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6497   CXXFLAGS="${CXXFLAGS} -qlonglong"
6498 fi
6499
6500
6501 elif test "$PORTNAME" = "hpux"; then
6502   # On some versions of HP-UX, libm functions do not set errno by default.
6503   # Fix that by using +Olibmerrno if the compiler recognizes it.
6504
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6506 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6507 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6508   $as_echo_n "(cached) " >&6
6509 else
6510   pgac_save_CFLAGS=$CFLAGS
6511 pgac_save_CC=$CC
6512 CC=${CC}
6513 CFLAGS="${CFLAGS} +Olibmerrno"
6514 ac_save_c_werror_flag=$ac_c_werror_flag
6515 ac_c_werror_flag=yes
6516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6517 /* end confdefs.h.  */
6518
6519 int
6520 main ()
6521 {
6522
6523   ;
6524   return 0;
6525 }
6526 _ACEOF
6527 if ac_fn_c_try_compile "$LINENO"; then :
6528   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6529 else
6530   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6531 fi
6532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6533 ac_c_werror_flag=$ac_save_c_werror_flag
6534 CFLAGS="$pgac_save_CFLAGS"
6535 CC="$pgac_save_CC"
6536 fi
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6538 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6539 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6540   CFLAGS="${CFLAGS} +Olibmerrno"
6541 fi
6542
6543
6544   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6545 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6546 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6547   $as_echo_n "(cached) " >&6
6548 else
6549   pgac_save_CXXFLAGS=$CXXFLAGS
6550 pgac_save_CXX=$CXX
6551 CXX=${CXX}
6552 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6553 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6554 ac_cxx_werror_flag=yes
6555 ac_ext=cpp
6556 ac_cpp='$CXXCPP $CPPFLAGS'
6557 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6558 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6559 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6560
6561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6562 /* end confdefs.h.  */
6563
6564 int
6565 main ()
6566 {
6567
6568   ;
6569   return 0;
6570 }
6571 _ACEOF
6572 if ac_fn_cxx_try_compile "$LINENO"; then :
6573   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6574 else
6575   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6576 fi
6577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6578 ac_ext=c
6579 ac_cpp='$CPP $CPPFLAGS'
6580 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6581 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6582 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6583
6584 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6585 CXXFLAGS="$pgac_save_CXXFLAGS"
6586 CXX="$pgac_save_CXX"
6587 fi
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6589 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6590 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6591   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6592 fi
6593
6594
6595 fi
6596
6597 CFLAGS_VECTOR=$CFLAGS_VECTOR
6598
6599
6600 # Determine flags used to emit bitcode for JIT inlining. Need to test
6601 # for behaviour changing compiler flags, to keep compatibility with
6602 # compiler used for normal postgres code.
6603 if test "$with_llvm" = yes ; then
6604   CLANGXX="$CLANG -xc++"
6605
6606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6607 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6608 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6609   $as_echo_n "(cached) " >&6
6610 else
6611   pgac_save_CFLAGS=$CFLAGS
6612 pgac_save_CC=$CC
6613 CC=${CLANG}
6614 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6615 ac_save_c_werror_flag=$ac_c_werror_flag
6616 ac_c_werror_flag=yes
6617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6618 /* end confdefs.h.  */
6619
6620 int
6621 main ()
6622 {
6623
6624   ;
6625   return 0;
6626 }
6627 _ACEOF
6628 if ac_fn_c_try_compile "$LINENO"; then :
6629   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6630 else
6631   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6632 fi
6633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6634 ac_c_werror_flag=$ac_save_c_werror_flag
6635 CFLAGS="$pgac_save_CFLAGS"
6636 CC="$pgac_save_CC"
6637 fi
6638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6639 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6640 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6641   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6642 fi
6643
6644   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6645 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6646 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6647   $as_echo_n "(cached) " >&6
6648 else
6649   pgac_save_CXXFLAGS=$CXXFLAGS
6650 pgac_save_CXX=$CXX
6651 CXX=${CLANGXX}
6652 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6653 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6654 ac_cxx_werror_flag=yes
6655 ac_ext=cpp
6656 ac_cpp='$CXXCPP $CPPFLAGS'
6657 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6658 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6659 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6660
6661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6662 /* end confdefs.h.  */
6663
6664 int
6665 main ()
6666 {
6667
6668   ;
6669   return 0;
6670 }
6671 _ACEOF
6672 if ac_fn_cxx_try_compile "$LINENO"; then :
6673   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6674 else
6675   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6676 fi
6677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6678 ac_ext=c
6679 ac_cpp='$CPP $CPPFLAGS'
6680 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6681 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6682 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6683
6684 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6685 CXXFLAGS="$pgac_save_CXXFLAGS"
6686 CXX="$pgac_save_CXX"
6687 fi
6688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6689 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6690 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6691   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6692 fi
6693
6694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6695 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6696 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6697   $as_echo_n "(cached) " >&6
6698 else
6699   pgac_save_CFLAGS=$CFLAGS
6700 pgac_save_CC=$CC
6701 CC=${CLANG}
6702 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6703 ac_save_c_werror_flag=$ac_c_werror_flag
6704 ac_c_werror_flag=yes
6705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6706 /* end confdefs.h.  */
6707
6708 int
6709 main ()
6710 {
6711
6712   ;
6713   return 0;
6714 }
6715 _ACEOF
6716 if ac_fn_c_try_compile "$LINENO"; then :
6717   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6718 else
6719   pgac_cv_prog_CLANG_cflags__fwrapv=no
6720 fi
6721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6722 ac_c_werror_flag=$ac_save_c_werror_flag
6723 CFLAGS="$pgac_save_CFLAGS"
6724 CC="$pgac_save_CC"
6725 fi
6726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6727 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6728 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6729   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6730 fi
6731
6732   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6733 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6734 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6735   $as_echo_n "(cached) " >&6
6736 else
6737   pgac_save_CXXFLAGS=$CXXFLAGS
6738 pgac_save_CXX=$CXX
6739 CXX=${CLANGXX}
6740 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6741 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6742 ac_cxx_werror_flag=yes
6743 ac_ext=cpp
6744 ac_cpp='$CXXCPP $CPPFLAGS'
6745 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6746 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6747 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6748
6749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6750 /* end confdefs.h.  */
6751
6752 int
6753 main ()
6754 {
6755
6756   ;
6757   return 0;
6758 }
6759 _ACEOF
6760 if ac_fn_cxx_try_compile "$LINENO"; then :
6761   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6762 else
6763   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6764 fi
6765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6766 ac_ext=c
6767 ac_cpp='$CPP $CPPFLAGS'
6768 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6769 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6770 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6771
6772 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6773 CXXFLAGS="$pgac_save_CXXFLAGS"
6774 CXX="$pgac_save_CXX"
6775 fi
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6777 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6778 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6779   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6780 fi
6781
6782   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6783 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6784 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6785   $as_echo_n "(cached) " >&6
6786 else
6787   pgac_save_CFLAGS=$CFLAGS
6788 pgac_save_CC=$CC
6789 CC=${CLANG}
6790 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6791 ac_save_c_werror_flag=$ac_c_werror_flag
6792 ac_c_werror_flag=yes
6793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6794 /* end confdefs.h.  */
6795
6796 int
6797 main ()
6798 {
6799
6800   ;
6801   return 0;
6802 }
6803 _ACEOF
6804 if ac_fn_c_try_compile "$LINENO"; then :
6805   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6806 else
6807   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6808 fi
6809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6810 ac_c_werror_flag=$ac_save_c_werror_flag
6811 CFLAGS="$pgac_save_CFLAGS"
6812 CC="$pgac_save_CC"
6813 fi
6814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6815 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6816 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6817   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6818 fi
6819
6820   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6821 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6822 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6823   $as_echo_n "(cached) " >&6
6824 else
6825   pgac_save_CXXFLAGS=$CXXFLAGS
6826 pgac_save_CXX=$CXX
6827 CXX=${CLANGXX}
6828 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6829 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6830 ac_cxx_werror_flag=yes
6831 ac_ext=cpp
6832 ac_cpp='$CXXCPP $CPPFLAGS'
6833 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6834 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6835 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6836
6837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6838 /* end confdefs.h.  */
6839
6840 int
6841 main ()
6842 {
6843
6844   ;
6845   return 0;
6846 }
6847 _ACEOF
6848 if ac_fn_cxx_try_compile "$LINENO"; then :
6849   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6850 else
6851   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6852 fi
6853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6854 ac_ext=c
6855 ac_cpp='$CPP $CPPFLAGS'
6856 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6857 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6858 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6859
6860 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6861 CXXFLAGS="$pgac_save_CXXFLAGS"
6862 CXX="$pgac_save_CXX"
6863 fi
6864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6865 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6866 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6867   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6868 fi
6869
6870 fi
6871
6872 # supply -g if --enable-debug
6873 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6874   CFLAGS="$CFLAGS -g"
6875 fi
6876
6877 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6878   CXXFLAGS="$CXXFLAGS -g"
6879 fi
6880
6881 # enable code coverage if --enable-coverage
6882 if test "$enable_coverage" = yes; then
6883   if test "$GCC" = yes; then
6884     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6885     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6886   else
6887     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6888   fi
6889 fi
6890
6891 # enable profiling if --enable-profiling
6892 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6893   if test "$GCC" = yes; then
6894
6895 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6896
6897     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6898     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6899   else
6900     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6901   fi
6902 fi
6903
6904 # We already have this in Makefile.win32, but configure needs it too
6905 if test "$PORTNAME" = "win32"; then
6906   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6907 fi
6908
6909 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6910 # user-specified flags (if any) at the end.  This lets users override
6911 # the automatic additions.
6912 CFLAGS="$CFLAGS $user_CFLAGS"
6913 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6914 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6915 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6916
6917 BITCODE_CFLAGS=$BITCODE_CFLAGS
6918
6919 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6920
6921
6922 # Check if the compiler still works with the final flag settings
6923 # (note, we're not checking that for CXX, which is optional)
6924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6925 $as_echo_n "checking whether the C compiler still works... " >&6; }
6926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6927 /* end confdefs.h.  */
6928
6929 int
6930 main ()
6931 {
6932 return 0;
6933   ;
6934   return 0;
6935 }
6936 _ACEOF
6937 if ac_fn_c_try_link "$LINENO"; then :
6938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6939 $as_echo "yes" >&6; }
6940 else
6941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6942 $as_echo "no" >&6; }
6943    as_fn_error $? "cannot proceed" "$LINENO" 5
6944 fi
6945 rm -f core conftest.err conftest.$ac_objext \
6946     conftest$ac_exeext conftest.$ac_ext
6947
6948 # Defend against gcc -ffast-math
6949 if test "$GCC" = yes; then
6950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951 /* end confdefs.h.  */
6952
6953 int
6954 main ()
6955 {
6956 #ifdef __FAST_MATH__
6957 choke me
6958 #endif
6959   ;
6960   return 0;
6961 }
6962 _ACEOF
6963 if ac_fn_c_try_compile "$LINENO"; then :
6964
6965 else
6966   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6967 fi
6968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6969 fi
6970
6971 # Defend against clang being used on x86-32 without SSE2 enabled.  As current
6972 # versions of clang do not understand -fexcess-precision=standard, the use of
6973 # x87 floating point operations leads to problems like isinf possibly returning
6974 # false for a value that is infinite when converted from the 80bit register to
6975 # the 8byte memory representation.
6976 #
6977 # Only perform the test if the compiler doesn't understand
6978 # -fexcess-precision=standard, that way a potentially fixed compiler will work
6979 # automatically.
6980 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
6981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6982 /* end confdefs.h.  */
6983
6984 int
6985 main ()
6986 {
6987
6988 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
6989 choke me
6990 #endif
6991
6992   ;
6993   return 0;
6994 }
6995 _ACEOF
6996 if ac_fn_c_try_compile "$LINENO"; then :
6997
6998 else
6999   as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7000 fi
7001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7002 fi
7003
7004 ac_ext=c
7005 ac_cpp='$CPP $CPPFLAGS'
7006 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7007 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7008 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7010 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7011 # On Suns, sometimes $CPP names a directory.
7012 if test -n "$CPP" && test -d "$CPP"; then
7013   CPP=
7014 fi
7015 if test -z "$CPP"; then
7016   if ${ac_cv_prog_CPP+:} false; then :
7017   $as_echo_n "(cached) " >&6
7018 else
7019       # Double quotes because CPP needs to be expanded
7020     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7021     do
7022       ac_preproc_ok=false
7023 for ac_c_preproc_warn_flag in '' yes
7024 do
7025   # Use a header file that comes with gcc, so configuring glibc
7026   # with a fresh cross-compiler works.
7027   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7028   # <limits.h> exists even on freestanding compilers.
7029   # On the NeXT, cc -E runs the code through the compiler's parser,
7030   # not just through cpp. "Syntax error" is here to catch this case.
7031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7032 /* end confdefs.h.  */
7033 #ifdef __STDC__
7034 # include <limits.h>
7035 #else
7036 # include <assert.h>
7037 #endif
7038                      Syntax error
7039 _ACEOF
7040 if ac_fn_c_try_cpp "$LINENO"; then :
7041
7042 else
7043   # Broken: fails on valid input.
7044 continue
7045 fi
7046 rm -f conftest.err conftest.i conftest.$ac_ext
7047
7048   # OK, works on sane cases.  Now check whether nonexistent headers
7049   # can be detected and how.
7050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7051 /* end confdefs.h.  */
7052 #include <ac_nonexistent.h>
7053 _ACEOF
7054 if ac_fn_c_try_cpp "$LINENO"; then :
7055   # Broken: success on invalid input.
7056 continue
7057 else
7058   # Passes both tests.
7059 ac_preproc_ok=:
7060 break
7061 fi
7062 rm -f conftest.err conftest.i conftest.$ac_ext
7063
7064 done
7065 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7066 rm -f conftest.i conftest.err conftest.$ac_ext
7067 if $ac_preproc_ok; then :
7068   break
7069 fi
7070
7071     done
7072     ac_cv_prog_CPP=$CPP
7073
7074 fi
7075   CPP=$ac_cv_prog_CPP
7076 else
7077   ac_cv_prog_CPP=$CPP
7078 fi
7079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7080 $as_echo "$CPP" >&6; }
7081 ac_preproc_ok=false
7082 for ac_c_preproc_warn_flag in '' yes
7083 do
7084   # Use a header file that comes with gcc, so configuring glibc
7085   # with a fresh cross-compiler works.
7086   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7087   # <limits.h> exists even on freestanding compilers.
7088   # On the NeXT, cc -E runs the code through the compiler's parser,
7089   # not just through cpp. "Syntax error" is here to catch this case.
7090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7091 /* end confdefs.h.  */
7092 #ifdef __STDC__
7093 # include <limits.h>
7094 #else
7095 # include <assert.h>
7096 #endif
7097                      Syntax error
7098 _ACEOF
7099 if ac_fn_c_try_cpp "$LINENO"; then :
7100
7101 else
7102   # Broken: fails on valid input.
7103 continue
7104 fi
7105 rm -f conftest.err conftest.i conftest.$ac_ext
7106
7107   # OK, works on sane cases.  Now check whether nonexistent headers
7108   # can be detected and how.
7109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7110 /* end confdefs.h.  */
7111 #include <ac_nonexistent.h>
7112 _ACEOF
7113 if ac_fn_c_try_cpp "$LINENO"; then :
7114   # Broken: success on invalid input.
7115 continue
7116 else
7117   # Passes both tests.
7118 ac_preproc_ok=:
7119 break
7120 fi
7121 rm -f conftest.err conftest.i conftest.$ac_ext
7122
7123 done
7124 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7125 rm -f conftest.i conftest.err conftest.$ac_ext
7126 if $ac_preproc_ok; then :
7127
7128 else
7129   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7130 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7131 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7132 See \`config.log' for more details" "$LINENO" 5; }
7133 fi
7134
7135 ac_ext=c
7136 ac_cpp='$CPP $CPPFLAGS'
7137 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7138 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7139 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7140
7141
7142
7143
7144 #
7145 # Set up TAS assembly code if needed; the template file has now had its
7146 # chance to request this.
7147 #
7148 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7149
7150
7151 if test "$need_tas" = yes ; then
7152   TAS=tas.o
7153 else
7154   TAS=""
7155 fi
7156
7157
7158
7159 #
7160 # Automatic dependency tracking
7161 #
7162
7163
7164 # Check whether --enable-depend was given.
7165 if test "${enable_depend+set}" = set; then :
7166   enableval=$enable_depend;
7167   case $enableval in
7168     yes)
7169       autodepend=yes
7170       ;;
7171     no)
7172       :
7173       ;;
7174     *)
7175       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7176       ;;
7177   esac
7178
7179 else
7180   enable_depend=no
7181
7182 fi
7183
7184
7185
7186
7187
7188 #
7189 # Enable assert checks
7190 #
7191
7192
7193 # Check whether --enable-cassert was given.
7194 if test "${enable_cassert+set}" = set; then :
7195   enableval=$enable_cassert;
7196   case $enableval in
7197     yes)
7198
7199 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7200
7201       ;;
7202     no)
7203       :
7204       ;;
7205     *)
7206       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7207       ;;
7208   esac
7209
7210 else
7211   enable_cassert=no
7212
7213 fi
7214
7215
7216
7217
7218 #
7219 # Include directories
7220 #
7221 ac_save_IFS=$IFS
7222 IFS="${IFS}${PATH_SEPARATOR}"
7223 # SRCH_INC comes from the template file
7224 for dir in $with_includes $SRCH_INC; do
7225   if test -d "$dir"; then
7226     INCLUDES="$INCLUDES -I$dir"
7227   else
7228     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7229 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7230   fi
7231 done
7232 IFS=$ac_save_IFS
7233
7234
7235
7236 #
7237 # Library directories
7238 #
7239 ac_save_IFS=$IFS
7240 IFS="${IFS}${PATH_SEPARATOR}"
7241 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7242 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7243   if test -d "$dir"; then
7244     LIBDIRS="$LIBDIRS -L$dir"
7245   else
7246     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7247 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7248   fi
7249 done
7250 IFS=$ac_save_IFS
7251
7252 #
7253 # Enable thread-safe client libraries
7254 #
7255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7256 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7257
7258
7259 # Check whether --enable-thread-safety was given.
7260 if test "${enable_thread_safety+set}" = set; then :
7261   enableval=$enable_thread_safety;
7262   case $enableval in
7263     yes)
7264       :
7265       ;;
7266     no)
7267       :
7268       ;;
7269     *)
7270       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7271       ;;
7272   esac
7273
7274 else
7275   enable_thread_safety=yes
7276
7277 fi
7278
7279
7280 if test "$enable_thread_safety" = yes; then
7281
7282 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7283
7284 fi
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7286 $as_echo "$enable_thread_safety" >&6; }
7287
7288
7289 #
7290 # ICU
7291 #
7292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7293 $as_echo_n "checking whether to build with ICU support... " >&6; }
7294
7295
7296
7297 # Check whether --with-icu was given.
7298 if test "${with_icu+set}" = set; then :
7299   withval=$with_icu;
7300   case $withval in
7301     yes)
7302
7303 $as_echo "#define USE_ICU 1" >>confdefs.h
7304
7305       ;;
7306     no)
7307       :
7308       ;;
7309     *)
7310       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7311       ;;
7312   esac
7313
7314 else
7315   with_icu=no
7316
7317 fi
7318
7319
7320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7321 $as_echo "$with_icu" >&6; }
7322
7323
7324 if test "$with_icu" = yes; then
7325
7326
7327
7328
7329
7330
7331
7332 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7333         if test -n "$ac_tool_prefix"; then
7334   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7335 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7337 $as_echo_n "checking for $ac_word... " >&6; }
7338 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7339   $as_echo_n "(cached) " >&6
7340 else
7341   case $PKG_CONFIG in
7342   [\\/]* | ?:[\\/]*)
7343   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7344   ;;
7345   *)
7346   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7347 for as_dir in $PATH
7348 do
7349   IFS=$as_save_IFS
7350   test -z "$as_dir" && as_dir=.
7351     for ac_exec_ext in '' $ac_executable_extensions; do
7352   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7353     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7354     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7355     break 2
7356   fi
7357 done
7358   done
7359 IFS=$as_save_IFS
7360
7361   ;;
7362 esac
7363 fi
7364 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7365 if test -n "$PKG_CONFIG"; then
7366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7367 $as_echo "$PKG_CONFIG" >&6; }
7368 else
7369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7370 $as_echo "no" >&6; }
7371 fi
7372
7373
7374 fi
7375 if test -z "$ac_cv_path_PKG_CONFIG"; then
7376   ac_pt_PKG_CONFIG=$PKG_CONFIG
7377   # Extract the first word of "pkg-config", so it can be a program name with args.
7378 set dummy pkg-config; ac_word=$2
7379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7380 $as_echo_n "checking for $ac_word... " >&6; }
7381 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7382   $as_echo_n "(cached) " >&6
7383 else
7384   case $ac_pt_PKG_CONFIG in
7385   [\\/]* | ?:[\\/]*)
7386   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7387   ;;
7388   *)
7389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7390 for as_dir in $PATH
7391 do
7392   IFS=$as_save_IFS
7393   test -z "$as_dir" && as_dir=.
7394     for ac_exec_ext in '' $ac_executable_extensions; do
7395   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7396     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7398     break 2
7399   fi
7400 done
7401   done
7402 IFS=$as_save_IFS
7403
7404   ;;
7405 esac
7406 fi
7407 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7408 if test -n "$ac_pt_PKG_CONFIG"; then
7409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7410 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7411 else
7412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7413 $as_echo "no" >&6; }
7414 fi
7415
7416   if test "x$ac_pt_PKG_CONFIG" = x; then
7417     PKG_CONFIG=""
7418   else
7419     case $cross_compiling:$ac_tool_warned in
7420 yes:)
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7422 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7423 ac_tool_warned=yes ;;
7424 esac
7425     PKG_CONFIG=$ac_pt_PKG_CONFIG
7426   fi
7427 else
7428   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7429 fi
7430
7431 fi
7432 if test -n "$PKG_CONFIG"; then
7433         _pkg_min_version=0.9.0
7434         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7435 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7436         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7437                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7438 $as_echo "yes" >&6; }
7439         else
7440                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7441 $as_echo "no" >&6; }
7442                 PKG_CONFIG=""
7443         fi
7444 fi
7445
7446 pkg_failed=no
7447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7448 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7449
7450 if test -n "$ICU_CFLAGS"; then
7451     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7452  elif test -n "$PKG_CONFIG"; then
7453     if test -n "$PKG_CONFIG" && \
7454     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7455   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7456   ac_status=$?
7457   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7458   test $ac_status = 0; }; then
7459   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7460                       test "x$?" != "x0" && pkg_failed=yes
7461 else
7462   pkg_failed=yes
7463 fi
7464  else
7465     pkg_failed=untried
7466 fi
7467 if test -n "$ICU_LIBS"; then
7468     pkg_cv_ICU_LIBS="$ICU_LIBS"
7469  elif test -n "$PKG_CONFIG"; then
7470     if test -n "$PKG_CONFIG" && \
7471     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7472   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7473   ac_status=$?
7474   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7475   test $ac_status = 0; }; then
7476   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7477                       test "x$?" != "x0" && pkg_failed=yes
7478 else
7479   pkg_failed=yes
7480 fi
7481  else
7482     pkg_failed=untried
7483 fi
7484
7485
7486
7487 if test $pkg_failed = yes; then
7488         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489 $as_echo "no" >&6; }
7490
7491 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7492         _pkg_short_errors_supported=yes
7493 else
7494         _pkg_short_errors_supported=no
7495 fi
7496         if test $_pkg_short_errors_supported = yes; then
7497                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7498         else
7499                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7500         fi
7501         # Put the nasty error message in config.log where it belongs
7502         echo "$ICU_PKG_ERRORS" >&5
7503
7504         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7505
7506 $ICU_PKG_ERRORS
7507
7508 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7509 installed software in a non-standard prefix.
7510
7511 Alternatively, you may set the environment variables ICU_CFLAGS
7512 and ICU_LIBS to avoid the need to call pkg-config.
7513 See the pkg-config man page for more details." "$LINENO" 5
7514 elif test $pkg_failed = untried; then
7515         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7516 $as_echo "no" >&6; }
7517         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7518 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7519 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7520 is in your PATH or set the PKG_CONFIG environment variable to the full
7521 path to pkg-config.
7522
7523 Alternatively, you may set the environment variables ICU_CFLAGS
7524 and ICU_LIBS to avoid the need to call pkg-config.
7525 See the pkg-config man page for more details.
7526
7527 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7528 See \`config.log' for more details" "$LINENO" 5; }
7529 else
7530         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7531         ICU_LIBS=$pkg_cv_ICU_LIBS
7532         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7533 $as_echo "yes" >&6; }
7534
7535 fi
7536 fi
7537
7538 #
7539 # Optionally build Tcl modules (PL/Tcl)
7540 #
7541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7542 $as_echo_n "checking whether to build with Tcl... " >&6; }
7543
7544
7545
7546 # Check whether --with-tcl was given.
7547 if test "${with_tcl+set}" = set; then :
7548   withval=$with_tcl;
7549   case $withval in
7550     yes)
7551       :
7552       ;;
7553     no)
7554       :
7555       ;;
7556     *)
7557       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7558       ;;
7559   esac
7560
7561 else
7562   with_tcl=no
7563
7564 fi
7565
7566
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7568 $as_echo "$with_tcl" >&6; }
7569
7570
7571 # We see if the path to the Tcl/Tk configuration scripts is specified.
7572 # This will override the use of tclsh to find the paths to search.
7573
7574
7575
7576
7577 # Check whether --with-tclconfig was given.
7578 if test "${with_tclconfig+set}" = set; then :
7579   withval=$with_tclconfig;
7580   case $withval in
7581     yes)
7582       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7583       ;;
7584     no)
7585       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7586       ;;
7587     *)
7588
7589       ;;
7590   esac
7591
7592 fi
7593
7594
7595
7596 #
7597 # Optionally build Perl modules (PL/Perl)
7598 #
7599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7600 $as_echo_n "checking whether to build Perl modules... " >&6; }
7601
7602
7603
7604 # Check whether --with-perl was given.
7605 if test "${with_perl+set}" = set; then :
7606   withval=$with_perl;
7607   case $withval in
7608     yes)
7609       :
7610       ;;
7611     no)
7612       :
7613       ;;
7614     *)
7615       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7616       ;;
7617   esac
7618
7619 else
7620   with_perl=no
7621
7622 fi
7623
7624
7625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7626 $as_echo "$with_perl" >&6; }
7627
7628
7629 #
7630 # Optionally build Python modules (PL/Python)
7631 #
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7633 $as_echo_n "checking whether to build Python modules... " >&6; }
7634
7635
7636
7637 # Check whether --with-python was given.
7638 if test "${with_python+set}" = set; then :
7639   withval=$with_python;
7640   case $withval in
7641     yes)
7642       :
7643       ;;
7644     no)
7645       :
7646       ;;
7647     *)
7648       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7649       ;;
7650   esac
7651
7652 else
7653   with_python=no
7654
7655 fi
7656
7657
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7659 $as_echo "$with_python" >&6; }
7660
7661
7662 #
7663 # GSSAPI
7664 #
7665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7666 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7667
7668
7669
7670 # Check whether --with-gssapi was given.
7671 if test "${with_gssapi+set}" = set; then :
7672   withval=$with_gssapi;
7673   case $withval in
7674     yes)
7675
7676
7677 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7678
7679   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7680
7681       ;;
7682     no)
7683       :
7684       ;;
7685     *)
7686       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7687       ;;
7688   esac
7689
7690 else
7691   with_gssapi=no
7692
7693 fi
7694
7695
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7697 $as_echo "$with_gssapi" >&6; }
7698
7699
7700
7701
7702
7703
7704 #
7705 # Kerberos configuration parameters
7706 #
7707
7708
7709
7710 # Check whether --with-krb-srvnam was given.
7711 if test "${with_krb_srvnam+set}" = set; then :
7712   withval=$with_krb_srvnam;
7713   case $withval in
7714     yes)
7715       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7716       ;;
7717     no)
7718       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7719       ;;
7720     *)
7721
7722       ;;
7723   esac
7724
7725 else
7726   with_krb_srvnam="postgres"
7727 fi
7728
7729
7730
7731
7732 cat >>confdefs.h <<_ACEOF
7733 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7734 _ACEOF
7735
7736
7737
7738 #
7739 # PAM
7740 #
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7742 $as_echo_n "checking whether to build with PAM support... " >&6; }
7743
7744
7745
7746 # Check whether --with-pam was given.
7747 if test "${with_pam+set}" = set; then :
7748   withval=$with_pam;
7749   case $withval in
7750     yes)
7751
7752 $as_echo "#define USE_PAM 1" >>confdefs.h
7753
7754       ;;
7755     no)
7756       :
7757       ;;
7758     *)
7759       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7760       ;;
7761   esac
7762
7763 else
7764   with_pam=no
7765
7766 fi
7767
7768
7769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7770 $as_echo "$with_pam" >&6; }
7771
7772
7773 #
7774 # BSD AUTH
7775 #
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7777 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7778
7779
7780
7781 # Check whether --with-bsd-auth was given.
7782 if test "${with_bsd_auth+set}" = set; then :
7783   withval=$with_bsd_auth;
7784   case $withval in
7785     yes)
7786
7787 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7788
7789       ;;
7790     no)
7791       :
7792       ;;
7793     *)
7794       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7795       ;;
7796   esac
7797
7798 else
7799   with_bsd_auth=no
7800
7801 fi
7802
7803
7804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7805 $as_echo "$with_bsd_auth" >&6; }
7806
7807
7808 #
7809 # LDAP
7810 #
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7812 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7813
7814
7815
7816 # Check whether --with-ldap was given.
7817 if test "${with_ldap+set}" = set; then :
7818   withval=$with_ldap;
7819   case $withval in
7820     yes)
7821
7822 $as_echo "#define USE_LDAP 1" >>confdefs.h
7823
7824       ;;
7825     no)
7826       :
7827       ;;
7828     *)
7829       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7830       ;;
7831   esac
7832
7833 else
7834   with_ldap=no
7835
7836 fi
7837
7838
7839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7840 $as_echo "$with_ldap" >&6; }
7841
7842
7843
7844 #
7845 # Bonjour
7846 #
7847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7848 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7849
7850
7851
7852 # Check whether --with-bonjour was given.
7853 if test "${with_bonjour+set}" = set; then :
7854   withval=$with_bonjour;
7855   case $withval in
7856     yes)
7857
7858 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7859
7860       ;;
7861     no)
7862       :
7863       ;;
7864     *)
7865       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7866       ;;
7867   esac
7868
7869 else
7870   with_bonjour=no
7871
7872 fi
7873
7874
7875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7876 $as_echo "$with_bonjour" >&6; }
7877
7878
7879 #
7880 # OpenSSL
7881 #
7882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7883 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7884
7885
7886
7887 # Check whether --with-openssl was given.
7888 if test "${with_openssl+set}" = set; then :
7889   withval=$with_openssl;
7890   case $withval in
7891     yes)
7892
7893 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7894
7895       ;;
7896     no)
7897       :
7898       ;;
7899     *)
7900       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7901       ;;
7902   esac
7903
7904 else
7905   with_openssl=no
7906
7907 fi
7908
7909
7910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7911 $as_echo "$with_openssl" >&6; }
7912
7913
7914 #
7915 # SELinux
7916 #
7917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7918 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7919
7920
7921
7922 # Check whether --with-selinux was given.
7923 if test "${with_selinux+set}" = set; then :
7924   withval=$with_selinux;
7925   case $withval in
7926     yes)
7927       :
7928       ;;
7929     no)
7930       :
7931       ;;
7932     *)
7933       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7934       ;;
7935   esac
7936
7937 else
7938   with_selinux=no
7939
7940 fi
7941
7942
7943
7944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7945 $as_echo "$with_selinux" >&6; }
7946
7947 #
7948 # Systemd
7949 #
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7951 $as_echo_n "checking whether to build with systemd support... " >&6; }
7952
7953
7954
7955 # Check whether --with-systemd was given.
7956 if test "${with_systemd+set}" = set; then :
7957   withval=$with_systemd;
7958   case $withval in
7959     yes)
7960
7961 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7962
7963       ;;
7964     no)
7965       :
7966       ;;
7967     *)
7968       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7969       ;;
7970   esac
7971
7972 else
7973   with_systemd=no
7974
7975 fi
7976
7977
7978
7979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7980 $as_echo "$with_systemd" >&6; }
7981
7982 #
7983 # Readline
7984 #
7985
7986
7987
7988 # Check whether --with-readline was given.
7989 if test "${with_readline+set}" = set; then :
7990   withval=$with_readline;
7991   case $withval in
7992     yes)
7993       :
7994       ;;
7995     no)
7996       :
7997       ;;
7998     *)
7999       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8000       ;;
8001   esac
8002
8003 else
8004   with_readline=yes
8005
8006 fi
8007
8008
8009 # readline on MinGW has problems with backslashes in psql and other bugs.
8010 # This is particularly a problem with non-US code pages.
8011 # Therefore disable its use until we understand the cause. 2004-07-20
8012 if test "$PORTNAME" = "win32"; then
8013   if test "$with_readline" = yes; then
8014     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8015 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8016     with_readline=no
8017   fi
8018 fi
8019
8020
8021 #
8022 # Prefer libedit
8023 #
8024
8025
8026
8027 # Check whether --with-libedit-preferred was given.
8028 if test "${with_libedit_preferred+set}" = set; then :
8029   withval=$with_libedit_preferred;
8030   case $withval in
8031     yes)
8032       :
8033       ;;
8034     no)
8035       :
8036       ;;
8037     *)
8038       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8039       ;;
8040   esac
8041
8042 else
8043   with_libedit_preferred=no
8044
8045 fi
8046
8047
8048
8049
8050 #
8051 # UUID library
8052 #
8053 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8054 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8055 # UUID library.  More than one of these might be present on a given platform,
8056 # so we make the user say which one she wants.
8057 #
8058
8059
8060
8061 # Check whether --with-uuid was given.
8062 if test "${with_uuid+set}" = set; then :
8063   withval=$with_uuid;
8064   case $withval in
8065     yes)
8066       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8067       ;;
8068     no)
8069       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8070       ;;
8071     *)
8072
8073       ;;
8074   esac
8075
8076 fi
8077
8078
8079 if test x"$with_uuid" = x"" ; then
8080   with_uuid=no
8081 fi
8082
8083
8084
8085 # Check whether --with-ossp-uuid was given.
8086 if test "${with_ossp_uuid+set}" = set; then :
8087   withval=$with_ossp_uuid;
8088   case $withval in
8089     yes)
8090       :
8091       ;;
8092     no)
8093       :
8094       ;;
8095     *)
8096       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8097       ;;
8098   esac
8099
8100 else
8101   with_ossp_uuid=no
8102
8103 fi
8104
8105
8106 if test "$with_ossp_uuid" = yes ; then
8107   with_uuid=ossp
8108 fi
8109
8110 if test "$with_uuid" = bsd ; then
8111
8112 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8113
8114   UUID_EXTRA_OBJS="md5.o sha1.o"
8115 elif test "$with_uuid" = e2fs ; then
8116
8117 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8118
8119   UUID_EXTRA_OBJS="md5.o sha1.o"
8120 elif test "$with_uuid" = ossp ; then
8121
8122 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8123
8124   UUID_EXTRA_OBJS=""
8125 elif test "$with_uuid" = no ; then
8126   UUID_EXTRA_OBJS=""
8127 else
8128   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8129 fi
8130
8131
8132
8133
8134 #
8135 # XML
8136 #
8137
8138
8139
8140 # Check whether --with-libxml was given.
8141 if test "${with_libxml+set}" = set; then :
8142   withval=$with_libxml;
8143   case $withval in
8144     yes)
8145
8146 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8147
8148       ;;
8149     no)
8150       :
8151       ;;
8152     *)
8153       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8154       ;;
8155   esac
8156
8157 else
8158   with_libxml=no
8159
8160 fi
8161
8162
8163
8164 if test "$with_libxml" = yes ; then
8165   if test -z "$XML2_CONFIG"; then
8166   for ac_prog in xml2-config
8167 do
8168   # Extract the first word of "$ac_prog", so it can be a program name with args.
8169 set dummy $ac_prog; ac_word=$2
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8171 $as_echo_n "checking for $ac_word... " >&6; }
8172 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8173   $as_echo_n "(cached) " >&6
8174 else
8175   case $XML2_CONFIG in
8176   [\\/]* | ?:[\\/]*)
8177   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8178   ;;
8179   *)
8180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8181 for as_dir in $PATH
8182 do
8183   IFS=$as_save_IFS
8184   test -z "$as_dir" && as_dir=.
8185     for ac_exec_ext in '' $ac_executable_extensions; do
8186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8187     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8189     break 2
8190   fi
8191 done
8192   done
8193 IFS=$as_save_IFS
8194
8195   ;;
8196 esac
8197 fi
8198 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8199 if test -n "$XML2_CONFIG"; then
8200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8201 $as_echo "$XML2_CONFIG" >&6; }
8202 else
8203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8204 $as_echo "no" >&6; }
8205 fi
8206
8207
8208   test -n "$XML2_CONFIG" && break
8209 done
8210
8211 else
8212   # Report the value of XML2_CONFIG in configure's output in all cases.
8213   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8214 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8216 $as_echo "$XML2_CONFIG" >&6; }
8217 fi
8218
8219   if test -n "$XML2_CONFIG"; then
8220     for pgac_option in `$XML2_CONFIG --cflags`; do
8221       case $pgac_option in
8222         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8223       esac
8224     done
8225     for pgac_option in `$XML2_CONFIG --libs`; do
8226       case $pgac_option in
8227         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8228       esac
8229     done
8230   fi
8231 fi
8232
8233
8234
8235 #
8236 # XSLT
8237 #
8238
8239
8240
8241 # Check whether --with-libxslt was given.
8242 if test "${with_libxslt+set}" = set; then :
8243   withval=$with_libxslt;
8244   case $withval in
8245     yes)
8246
8247 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8248
8249       ;;
8250     no)
8251       :
8252       ;;
8253     *)
8254       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8255       ;;
8256   esac
8257
8258 else
8259   with_libxslt=no
8260
8261 fi
8262
8263
8264
8265
8266
8267
8268 #
8269 # tzdata
8270 #
8271
8272
8273
8274 # Check whether --with-system-tzdata was given.
8275 if test "${with_system_tzdata+set}" = set; then :
8276   withval=$with_system_tzdata;
8277   case $withval in
8278     yes)
8279       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8280       ;;
8281     no)
8282       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8283       ;;
8284     *)
8285
8286       ;;
8287   esac
8288
8289 fi
8290
8291
8292
8293
8294 #
8295 # Zlib
8296 #
8297
8298
8299
8300 # Check whether --with-zlib was given.
8301 if test "${with_zlib+set}" = set; then :
8302   withval=$with_zlib;
8303   case $withval in
8304     yes)
8305       :
8306       ;;
8307     no)
8308       :
8309       ;;
8310     *)
8311       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8312       ;;
8313   esac
8314
8315 else
8316   with_zlib=yes
8317
8318 fi
8319
8320
8321
8322
8323 #
8324 # Elf
8325 #
8326
8327 # Assume system is ELF if it predefines __ELF__ as 1,
8328 # otherwise believe host_os based default.
8329 case $host_os in
8330     freebsd1*|freebsd2*) elf=no;;
8331     freebsd3*|freebsd4*) elf=yes;;
8332 esac
8333
8334
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8336 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8337 if ${ac_cv_path_GREP+:} false; then :
8338   $as_echo_n "(cached) " >&6
8339 else
8340   if test -z "$GREP"; then
8341   ac_path_GREP_found=false
8342   # Loop through the user's path and test for each of PROGNAME-LIST
8343   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8344 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8345 do
8346   IFS=$as_save_IFS
8347   test -z "$as_dir" && as_dir=.
8348     for ac_prog in grep ggrep; do
8349     for ac_exec_ext in '' $ac_executable_extensions; do
8350       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8351       as_fn_executable_p "$ac_path_GREP" || continue
8352 # Check for GNU ac_path_GREP and select it if it is found.
8353   # Check for GNU $ac_path_GREP
8354 case `"$ac_path_GREP" --version 2>&1` in
8355 *GNU*)
8356   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8357 *)
8358   ac_count=0
8359   $as_echo_n 0123456789 >"conftest.in"
8360   while :
8361   do
8362     cat "conftest.in" "conftest.in" >"conftest.tmp"
8363     mv "conftest.tmp" "conftest.in"
8364     cp "conftest.in" "conftest.nl"
8365     $as_echo 'GREP' >> "conftest.nl"
8366     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8367     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8368     as_fn_arith $ac_count + 1 && ac_count=$as_val
8369     if test $ac_count -gt ${ac_path_GREP_max-0}; then
8370       # Best one so far, save it but keep looking for a better one
8371       ac_cv_path_GREP="$ac_path_GREP"
8372       ac_path_GREP_max=$ac_count
8373     fi
8374     # 10*(2^10) chars as input seems more than enough
8375     test $ac_count -gt 10 && break
8376   done
8377   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8378 esac
8379
8380       $ac_path_GREP_found && break 3
8381     done
8382   done
8383   done
8384 IFS=$as_save_IFS
8385   if test -z "$ac_cv_path_GREP"; then
8386     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8387   fi
8388 else
8389   ac_cv_path_GREP=$GREP
8390 fi
8391
8392 fi
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8394 $as_echo "$ac_cv_path_GREP" >&6; }
8395  GREP="$ac_cv_path_GREP"
8396
8397
8398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8399 $as_echo_n "checking for egrep... " >&6; }
8400 if ${ac_cv_path_EGREP+:} false; then :
8401   $as_echo_n "(cached) " >&6
8402 else
8403   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8404    then ac_cv_path_EGREP="$GREP -E"
8405    else
8406      if test -z "$EGREP"; then
8407   ac_path_EGREP_found=false
8408   # Loop through the user's path and test for each of PROGNAME-LIST
8409   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8410 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8411 do
8412   IFS=$as_save_IFS
8413   test -z "$as_dir" && as_dir=.
8414     for ac_prog in egrep; do
8415     for ac_exec_ext in '' $ac_executable_extensions; do
8416       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8417       as_fn_executable_p "$ac_path_EGREP" || continue
8418 # Check for GNU ac_path_EGREP and select it if it is found.
8419   # Check for GNU $ac_path_EGREP
8420 case `"$ac_path_EGREP" --version 2>&1` in
8421 *GNU*)
8422   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8423 *)
8424   ac_count=0
8425   $as_echo_n 0123456789 >"conftest.in"
8426   while :
8427   do
8428     cat "conftest.in" "conftest.in" >"conftest.tmp"
8429     mv "conftest.tmp" "conftest.in"
8430     cp "conftest.in" "conftest.nl"
8431     $as_echo 'EGREP' >> "conftest.nl"
8432     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8433     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8434     as_fn_arith $ac_count + 1 && ac_count=$as_val
8435     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8436       # Best one so far, save it but keep looking for a better one
8437       ac_cv_path_EGREP="$ac_path_EGREP"
8438       ac_path_EGREP_max=$ac_count
8439     fi
8440     # 10*(2^10) chars as input seems more than enough
8441     test $ac_count -gt 10 && break
8442   done
8443   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8444 esac
8445
8446       $ac_path_EGREP_found && break 3
8447     done
8448   done
8449   done
8450 IFS=$as_save_IFS
8451   if test -z "$ac_cv_path_EGREP"; then
8452     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8453   fi
8454 else
8455   ac_cv_path_EGREP=$EGREP
8456 fi
8457
8458    fi
8459 fi
8460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8461 $as_echo "$ac_cv_path_EGREP" >&6; }
8462  EGREP="$ac_cv_path_EGREP"
8463
8464
8465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8466 /* end confdefs.h.  */
8467 #if __ELF__
8468   yes
8469 #endif
8470
8471 _ACEOF
8472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8473   $EGREP "yes" >/dev/null 2>&1; then :
8474   ELF_SYS=true
8475 else
8476   if test "X$elf" = "Xyes" ; then
8477   ELF_SYS=true
8478 else
8479   ELF_SYS=
8480 fi
8481 fi
8482 rm -f conftest*
8483
8484
8485
8486 #
8487 # Assignments
8488 #
8489
8490 CPPFLAGS="$CPPFLAGS $INCLUDES"
8491 LDFLAGS="$LDFLAGS $LIBDIRS"
8492
8493
8494
8495
8496
8497 # Check whether --with-gnu-ld was given.
8498 if test "${with_gnu_ld+set}" = set; then :
8499   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8500 else
8501   with_gnu_ld=no
8502 fi
8503
8504 ac_prog=ld
8505 if test "$GCC" = yes; then
8506   # Check if gcc -print-prog-name=ld gives a path.
8507   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8508 $as_echo_n "checking for ld used by GCC... " >&6; }
8509   case $host in
8510   *-*-mingw*)
8511     # gcc leaves a trailing carriage return which upsets mingw
8512     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8513   *)
8514     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8515   esac
8516   case "$ac_prog" in
8517     # Accept absolute paths.
8518     [\\/]* | [A-Za-z]:[\\/]*)
8519       re_direlt='/[^/][^/]*/\.\./'
8520       # Canonicalize the path of ld
8521       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8522       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8523         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8524       done
8525       test -z "$LD" && LD="$ac_prog"
8526       ;;
8527   "")
8528     # If it fails, then pretend we aren't using GCC.
8529     ac_prog=ld
8530     ;;
8531   *)
8532     # If it is relative, then search for the first ld in PATH.
8533     with_gnu_ld=unknown
8534     ;;
8535   esac
8536 elif test "$with_gnu_ld" = yes; then
8537   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8538 $as_echo_n "checking for GNU ld... " >&6; }
8539 else
8540   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8541 $as_echo_n "checking for non-GNU ld... " >&6; }
8542 fi
8543 if ${ac_cv_path_LD+:} false; then :
8544   $as_echo_n "(cached) " >&6
8545 else
8546   if test -z "$LD"; then
8547   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8548   for ac_dir in $PATH; do
8549     test -z "$ac_dir" && ac_dir=.
8550     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8551       ac_cv_path_LD="$ac_dir/$ac_prog"
8552       # Check to see if the program is GNU ld.  I'd rather use --version,
8553       # but apparently some GNU ld's only accept -v.
8554       # Break only if it was the GNU/non-GNU ld that we prefer.
8555       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8556         test "$with_gnu_ld" != no && break
8557       else
8558         test "$with_gnu_ld" != yes && break
8559       fi
8560     fi
8561   done
8562   IFS="$ac_save_ifs"
8563 else
8564   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8565 fi
8566 fi
8567
8568 LD="$ac_cv_path_LD"
8569 if test -n "$LD"; then
8570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8571 $as_echo "$LD" >&6; }
8572 else
8573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8574 $as_echo "no" >&6; }
8575 fi
8576 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8578 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8579 if ${ac_cv_prog_gnu_ld+:} false; then :
8580   $as_echo_n "(cached) " >&6
8581 else
8582   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8583 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8584   ac_cv_prog_gnu_ld=yes
8585 else
8586   ac_cv_prog_gnu_ld=no
8587 fi
8588 fi
8589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8590 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8591 with_gnu_ld=$ac_cv_prog_gnu_ld
8592
8593
8594
8595
8596 if test -n "$ac_tool_prefix"; then
8597   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8598 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8600 $as_echo_n "checking for $ac_word... " >&6; }
8601 if ${ac_cv_prog_RANLIB+:} false; then :
8602   $as_echo_n "(cached) " >&6
8603 else
8604   if test -n "$RANLIB"; then
8605   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8606 else
8607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608 for as_dir in $PATH
8609 do
8610   IFS=$as_save_IFS
8611   test -z "$as_dir" && as_dir=.
8612     for ac_exec_ext in '' $ac_executable_extensions; do
8613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8616     break 2
8617   fi
8618 done
8619   done
8620 IFS=$as_save_IFS
8621
8622 fi
8623 fi
8624 RANLIB=$ac_cv_prog_RANLIB
8625 if test -n "$RANLIB"; then
8626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8627 $as_echo "$RANLIB" >&6; }
8628 else
8629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8630 $as_echo "no" >&6; }
8631 fi
8632
8633
8634 fi
8635 if test -z "$ac_cv_prog_RANLIB"; then
8636   ac_ct_RANLIB=$RANLIB
8637   # Extract the first word of "ranlib", so it can be a program name with args.
8638 set dummy ranlib; ac_word=$2
8639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8640 $as_echo_n "checking for $ac_word... " >&6; }
8641 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8642   $as_echo_n "(cached) " >&6
8643 else
8644   if test -n "$ac_ct_RANLIB"; then
8645   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8646 else
8647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8648 for as_dir in $PATH
8649 do
8650   IFS=$as_save_IFS
8651   test -z "$as_dir" && as_dir=.
8652     for ac_exec_ext in '' $ac_executable_extensions; do
8653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8654     ac_cv_prog_ac_ct_RANLIB="ranlib"
8655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8656     break 2
8657   fi
8658 done
8659   done
8660 IFS=$as_save_IFS
8661
8662 fi
8663 fi
8664 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8665 if test -n "$ac_ct_RANLIB"; then
8666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8667 $as_echo "$ac_ct_RANLIB" >&6; }
8668 else
8669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8670 $as_echo "no" >&6; }
8671 fi
8672
8673   if test "x$ac_ct_RANLIB" = x; then
8674     RANLIB=":"
8675   else
8676     case $cross_compiling:$ac_tool_warned in
8677 yes:)
8678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8679 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8680 ac_tool_warned=yes ;;
8681 esac
8682     RANLIB=$ac_ct_RANLIB
8683   fi
8684 else
8685   RANLIB="$ac_cv_prog_RANLIB"
8686 fi
8687
8688
8689   if test -n "$ac_tool_prefix"; then
8690   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8691 set dummy ${ac_tool_prefix}strip; ac_word=$2
8692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693 $as_echo_n "checking for $ac_word... " >&6; }
8694 if ${ac_cv_prog_STRIP+:} false; then :
8695   $as_echo_n "(cached) " >&6
8696 else
8697   if test -n "$STRIP"; then
8698   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8699 else
8700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8701 for as_dir in $PATH
8702 do
8703   IFS=$as_save_IFS
8704   test -z "$as_dir" && as_dir=.
8705     for ac_exec_ext in '' $ac_executable_extensions; do
8706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8707     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8709     break 2
8710   fi
8711 done
8712   done
8713 IFS=$as_save_IFS
8714
8715 fi
8716 fi
8717 STRIP=$ac_cv_prog_STRIP
8718 if test -n "$STRIP"; then
8719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8720 $as_echo "$STRIP" >&6; }
8721 else
8722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8723 $as_echo "no" >&6; }
8724 fi
8725
8726
8727 fi
8728 if test -z "$ac_cv_prog_STRIP"; then
8729   ac_ct_STRIP=$STRIP
8730   # Extract the first word of "strip", so it can be a program name with args.
8731 set dummy strip; ac_word=$2
8732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8733 $as_echo_n "checking for $ac_word... " >&6; }
8734 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8735   $as_echo_n "(cached) " >&6
8736 else
8737   if test -n "$ac_ct_STRIP"; then
8738   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8739 else
8740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8741 for as_dir in $PATH
8742 do
8743   IFS=$as_save_IFS
8744   test -z "$as_dir" && as_dir=.
8745     for ac_exec_ext in '' $ac_executable_extensions; do
8746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8747     ac_cv_prog_ac_ct_STRIP="strip"
8748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8749     break 2
8750   fi
8751 done
8752   done
8753 IFS=$as_save_IFS
8754
8755 fi
8756 fi
8757 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8758 if test -n "$ac_ct_STRIP"; then
8759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8760 $as_echo "$ac_ct_STRIP" >&6; }
8761 else
8762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8763 $as_echo "no" >&6; }
8764 fi
8765
8766   if test "x$ac_ct_STRIP" = x; then
8767     STRIP=":"
8768   else
8769     case $cross_compiling:$ac_tool_warned in
8770 yes:)
8771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8772 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8773 ac_tool_warned=yes ;;
8774 esac
8775     STRIP=$ac_ct_STRIP
8776   fi
8777 else
8778   STRIP="$ac_cv_prog_STRIP"
8779 fi
8780
8781
8782   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8783 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8784   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8785     STRIP_STATIC_LIB="$STRIP -x"
8786     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8787     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8788 $as_echo "yes" >&6; }
8789   else
8790     case $host_os in
8791       darwin*)
8792         STRIP="$STRIP -x"
8793         STRIP_STATIC_LIB=$STRIP
8794         STRIP_SHARED_LIB=$STRIP
8795         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8796 $as_echo "yes" >&6; }
8797         ;;
8798       *)
8799         STRIP_STATIC_LIB=:
8800         STRIP_SHARED_LIB=:
8801         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8802 $as_echo "no" >&6; }
8803         ;;
8804     esac
8805   fi
8806
8807
8808
8809 if test -n "$ac_tool_prefix"; then
8810   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8811 set dummy ${ac_tool_prefix}ar; ac_word=$2
8812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8813 $as_echo_n "checking for $ac_word... " >&6; }
8814 if ${ac_cv_prog_AR+:} false; then :
8815   $as_echo_n "(cached) " >&6
8816 else
8817   if test -n "$AR"; then
8818   ac_cv_prog_AR="$AR" # Let the user override the test.
8819 else
8820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8821 for as_dir in $PATH
8822 do
8823   IFS=$as_save_IFS
8824   test -z "$as_dir" && as_dir=.
8825     for ac_exec_ext in '' $ac_executable_extensions; do
8826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8827     ac_cv_prog_AR="${ac_tool_prefix}ar"
8828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8829     break 2
8830   fi
8831 done
8832   done
8833 IFS=$as_save_IFS
8834
8835 fi
8836 fi
8837 AR=$ac_cv_prog_AR
8838 if test -n "$AR"; then
8839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8840 $as_echo "$AR" >&6; }
8841 else
8842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8843 $as_echo "no" >&6; }
8844 fi
8845
8846
8847 fi
8848 if test -z "$ac_cv_prog_AR"; then
8849   ac_ct_AR=$AR
8850   # Extract the first word of "ar", so it can be a program name with args.
8851 set dummy ar; ac_word=$2
8852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8853 $as_echo_n "checking for $ac_word... " >&6; }
8854 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8855   $as_echo_n "(cached) " >&6
8856 else
8857   if test -n "$ac_ct_AR"; then
8858   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8859 else
8860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8861 for as_dir in $PATH
8862 do
8863   IFS=$as_save_IFS
8864   test -z "$as_dir" && as_dir=.
8865     for ac_exec_ext in '' $ac_executable_extensions; do
8866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8867     ac_cv_prog_ac_ct_AR="ar"
8868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8869     break 2
8870   fi
8871 done
8872   done
8873 IFS=$as_save_IFS
8874
8875 fi
8876 fi
8877 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8878 if test -n "$ac_ct_AR"; then
8879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8880 $as_echo "$ac_ct_AR" >&6; }
8881 else
8882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8883 $as_echo "no" >&6; }
8884 fi
8885
8886   if test "x$ac_ct_AR" = x; then
8887     AR="ar"
8888   else
8889     case $cross_compiling:$ac_tool_warned in
8890 yes:)
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8892 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8893 ac_tool_warned=yes ;;
8894 esac
8895     AR=$ac_ct_AR
8896   fi
8897 else
8898   AR="$ac_cv_prog_AR"
8899 fi
8900
8901 if test "$PORTNAME" = "win32"; then
8902   if test -n "$ac_tool_prefix"; then
8903   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8904 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8906 $as_echo_n "checking for $ac_word... " >&6; }
8907 if ${ac_cv_prog_DLLTOOL+:} false; then :
8908   $as_echo_n "(cached) " >&6
8909 else
8910   if test -n "$DLLTOOL"; then
8911   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8912 else
8913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8914 for as_dir in $PATH
8915 do
8916   IFS=$as_save_IFS
8917   test -z "$as_dir" && as_dir=.
8918     for ac_exec_ext in '' $ac_executable_extensions; do
8919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8920     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8922     break 2
8923   fi
8924 done
8925   done
8926 IFS=$as_save_IFS
8927
8928 fi
8929 fi
8930 DLLTOOL=$ac_cv_prog_DLLTOOL
8931 if test -n "$DLLTOOL"; then
8932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8933 $as_echo "$DLLTOOL" >&6; }
8934 else
8935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8936 $as_echo "no" >&6; }
8937 fi
8938
8939
8940 fi
8941 if test -z "$ac_cv_prog_DLLTOOL"; then
8942   ac_ct_DLLTOOL=$DLLTOOL
8943   # Extract the first word of "dlltool", so it can be a program name with args.
8944 set dummy dlltool; ac_word=$2
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8946 $as_echo_n "checking for $ac_word... " >&6; }
8947 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8948   $as_echo_n "(cached) " >&6
8949 else
8950   if test -n "$ac_ct_DLLTOOL"; then
8951   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8952 else
8953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8954 for as_dir in $PATH
8955 do
8956   IFS=$as_save_IFS
8957   test -z "$as_dir" && as_dir=.
8958     for ac_exec_ext in '' $ac_executable_extensions; do
8959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8960     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8962     break 2
8963   fi
8964 done
8965   done
8966 IFS=$as_save_IFS
8967
8968 fi
8969 fi
8970 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8971 if test -n "$ac_ct_DLLTOOL"; then
8972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8973 $as_echo "$ac_ct_DLLTOOL" >&6; }
8974 else
8975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8976 $as_echo "no" >&6; }
8977 fi
8978
8979   if test "x$ac_ct_DLLTOOL" = x; then
8980     DLLTOOL="dlltool"
8981   else
8982     case $cross_compiling:$ac_tool_warned in
8983 yes:)
8984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8985 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8986 ac_tool_warned=yes ;;
8987 esac
8988     DLLTOOL=$ac_ct_DLLTOOL
8989   fi
8990 else
8991   DLLTOOL="$ac_cv_prog_DLLTOOL"
8992 fi
8993
8994   if test -n "$ac_tool_prefix"; then
8995   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8996 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8998 $as_echo_n "checking for $ac_word... " >&6; }
8999 if ${ac_cv_prog_DLLWRAP+:} false; then :
9000   $as_echo_n "(cached) " >&6
9001 else
9002   if test -n "$DLLWRAP"; then
9003   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9004 else
9005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9006 for as_dir in $PATH
9007 do
9008   IFS=$as_save_IFS
9009   test -z "$as_dir" && as_dir=.
9010     for ac_exec_ext in '' $ac_executable_extensions; do
9011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9012     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9014     break 2
9015   fi
9016 done
9017   done
9018 IFS=$as_save_IFS
9019
9020 fi
9021 fi
9022 DLLWRAP=$ac_cv_prog_DLLWRAP
9023 if test -n "$DLLWRAP"; then
9024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9025 $as_echo "$DLLWRAP" >&6; }
9026 else
9027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9028 $as_echo "no" >&6; }
9029 fi
9030
9031
9032 fi
9033 if test -z "$ac_cv_prog_DLLWRAP"; then
9034   ac_ct_DLLWRAP=$DLLWRAP
9035   # Extract the first word of "dllwrap", so it can be a program name with args.
9036 set dummy dllwrap; ac_word=$2
9037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9038 $as_echo_n "checking for $ac_word... " >&6; }
9039 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9040   $as_echo_n "(cached) " >&6
9041 else
9042   if test -n "$ac_ct_DLLWRAP"; then
9043   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9044 else
9045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9046 for as_dir in $PATH
9047 do
9048   IFS=$as_save_IFS
9049   test -z "$as_dir" && as_dir=.
9050     for ac_exec_ext in '' $ac_executable_extensions; do
9051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9052     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9054     break 2
9055   fi
9056 done
9057   done
9058 IFS=$as_save_IFS
9059
9060 fi
9061 fi
9062 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9063 if test -n "$ac_ct_DLLWRAP"; then
9064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9065 $as_echo "$ac_ct_DLLWRAP" >&6; }
9066 else
9067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9068 $as_echo "no" >&6; }
9069 fi
9070
9071   if test "x$ac_ct_DLLWRAP" = x; then
9072     DLLWRAP="dllwrap"
9073   else
9074     case $cross_compiling:$ac_tool_warned in
9075 yes:)
9076 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9077 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9078 ac_tool_warned=yes ;;
9079 esac
9080     DLLWRAP=$ac_ct_DLLWRAP
9081   fi
9082 else
9083   DLLWRAP="$ac_cv_prog_DLLWRAP"
9084 fi
9085
9086   if test -n "$ac_tool_prefix"; then
9087   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9088 set dummy ${ac_tool_prefix}windres; ac_word=$2
9089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9090 $as_echo_n "checking for $ac_word... " >&6; }
9091 if ${ac_cv_prog_WINDRES+:} false; then :
9092   $as_echo_n "(cached) " >&6
9093 else
9094   if test -n "$WINDRES"; then
9095   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9096 else
9097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9098 for as_dir in $PATH
9099 do
9100   IFS=$as_save_IFS
9101   test -z "$as_dir" && as_dir=.
9102     for ac_exec_ext in '' $ac_executable_extensions; do
9103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9104     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9106     break 2
9107   fi
9108 done
9109   done
9110 IFS=$as_save_IFS
9111
9112 fi
9113 fi
9114 WINDRES=$ac_cv_prog_WINDRES
9115 if test -n "$WINDRES"; then
9116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9117 $as_echo "$WINDRES" >&6; }
9118 else
9119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9120 $as_echo "no" >&6; }
9121 fi
9122
9123
9124 fi
9125 if test -z "$ac_cv_prog_WINDRES"; then
9126   ac_ct_WINDRES=$WINDRES
9127   # Extract the first word of "windres", so it can be a program name with args.
9128 set dummy windres; ac_word=$2
9129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9130 $as_echo_n "checking for $ac_word... " >&6; }
9131 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9132   $as_echo_n "(cached) " >&6
9133 else
9134   if test -n "$ac_ct_WINDRES"; then
9135   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9136 else
9137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9138 for as_dir in $PATH
9139 do
9140   IFS=$as_save_IFS
9141   test -z "$as_dir" && as_dir=.
9142     for ac_exec_ext in '' $ac_executable_extensions; do
9143   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9144     ac_cv_prog_ac_ct_WINDRES="windres"
9145     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9146     break 2
9147   fi
9148 done
9149   done
9150 IFS=$as_save_IFS
9151
9152 fi
9153 fi
9154 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9155 if test -n "$ac_ct_WINDRES"; then
9156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9157 $as_echo "$ac_ct_WINDRES" >&6; }
9158 else
9159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9160 $as_echo "no" >&6; }
9161 fi
9162
9163   if test "x$ac_ct_WINDRES" = x; then
9164     WINDRES="windres"
9165   else
9166     case $cross_compiling:$ac_tool_warned in
9167 yes:)
9168 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9169 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9170 ac_tool_warned=yes ;;
9171 esac
9172     WINDRES=$ac_ct_WINDRES
9173   fi
9174 else
9175   WINDRES="$ac_cv_prog_WINDRES"
9176 fi
9177
9178 fi
9179
9180 # Find a good install program.  We prefer a C program (faster),
9181 # so one script is as good as another.  But avoid the broken or
9182 # incompatible versions:
9183 # SysV /etc/install, /usr/sbin/install
9184 # SunOS /usr/etc/install
9185 # IRIX /sbin/install
9186 # AIX /bin/install
9187 # AmigaOS /C/install, which installs bootblocks on floppy discs
9188 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9189 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9190 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9191 # OS/2's system install, which has a completely different semantic
9192 # ./install, which can be erroneously created by make from ./install.sh.
9193 # Reject install programs that cannot install multiple files.
9194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9195 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9196 if test -z "$INSTALL"; then
9197 if ${ac_cv_path_install+:} false; then :
9198   $as_echo_n "(cached) " >&6
9199 else
9200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9201 for as_dir in $PATH
9202 do
9203   IFS=$as_save_IFS
9204   test -z "$as_dir" && as_dir=.
9205     # Account for people who put trailing slashes in PATH elements.
9206 case $as_dir/ in #((
9207   ./ | .// | /[cC]/* | \
9208   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9209   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9210   /usr/ucb/* ) ;;
9211   *)
9212     # OSF1 and SCO ODT 3.0 have their own names for install.
9213     # Don't use installbsd from OSF since it installs stuff as root
9214     # by default.
9215     for ac_prog in ginstall scoinst install; do
9216       for ac_exec_ext in '' $ac_executable_extensions; do
9217         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9218           if test $ac_prog = install &&
9219             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9220             # AIX install.  It has an incompatible calling convention.
9221             :
9222           elif test $ac_prog = install &&
9223             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9224             # program-specific install script used by HP pwplus--don't use.
9225             :
9226           else
9227             rm -rf conftest.one conftest.two conftest.dir
9228             echo one > conftest.one
9229             echo two > conftest.two
9230             mkdir conftest.dir
9231             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9232               test -s conftest.one && test -s conftest.two &&
9233               test -s conftest.dir/conftest.one &&
9234               test -s conftest.dir/conftest.two
9235             then
9236               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9237               break 3
9238             fi
9239           fi
9240         fi
9241       done
9242     done
9243     ;;
9244 esac
9245
9246   done
9247 IFS=$as_save_IFS
9248
9249 rm -rf conftest.one conftest.two conftest.dir
9250
9251 fi
9252   if test "${ac_cv_path_install+set}" = set; then
9253     INSTALL=$ac_cv_path_install
9254   else
9255     # As a last resort, use the slow shell script.  Don't cache a
9256     # value for INSTALL within a source directory, because that will
9257     # break other packages using the cache if that directory is
9258     # removed, or if the value is a relative name.
9259     INSTALL=$ac_install_sh
9260   fi
9261 fi
9262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9263 $as_echo "$INSTALL" >&6; }
9264
9265 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9266 # It thinks the first close brace ends the variable substitution.
9267 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9268
9269 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9270
9271 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9272
9273 # When Autoconf chooses install-sh as install program it tries to generate
9274 # a relative path to it in each makefile where it substitutes it. This clashes
9275 # with our Makefile.global concept. This workaround helps.
9276 case $INSTALL in
9277   *install-sh*) install_bin='';;
9278   *) install_bin=$INSTALL;;
9279 esac
9280
9281
9282 if test -z "$TAR"; then
9283   for ac_prog in tar
9284 do
9285   # Extract the first word of "$ac_prog", so it can be a program name with args.
9286 set dummy $ac_prog; ac_word=$2
9287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9288 $as_echo_n "checking for $ac_word... " >&6; }
9289 if ${ac_cv_path_TAR+:} false; then :
9290   $as_echo_n "(cached) " >&6
9291 else
9292   case $TAR in
9293   [\\/]* | ?:[\\/]*)
9294   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9295   ;;
9296   *)
9297   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9298 for as_dir in $PATH
9299 do
9300   IFS=$as_save_IFS
9301   test -z "$as_dir" && as_dir=.
9302     for ac_exec_ext in '' $ac_executable_extensions; do
9303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9304     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9306     break 2
9307   fi
9308 done
9309   done
9310 IFS=$as_save_IFS
9311
9312   ;;
9313 esac
9314 fi
9315 TAR=$ac_cv_path_TAR
9316 if test -n "$TAR"; then
9317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9318 $as_echo "$TAR" >&6; }
9319 else
9320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9321 $as_echo "no" >&6; }
9322 fi
9323
9324
9325   test -n "$TAR" && break
9326 done
9327
9328 else
9329   # Report the value of TAR in configure's output in all cases.
9330   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9331 $as_echo_n "checking for TAR... " >&6; }
9332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9333 $as_echo "$TAR" >&6; }
9334 fi
9335
9336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9337 $as_echo_n "checking whether ln -s works... " >&6; }
9338 LN_S=$as_ln_s
9339 if test "$LN_S" = "ln -s"; then
9340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9341 $as_echo "yes" >&6; }
9342 else
9343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9344 $as_echo "no, using $LN_S" >&6; }
9345 fi
9346
9347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9348 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9349 if test -z "$MKDIR_P"; then
9350   if ${ac_cv_path_mkdir+:} false; then :
9351   $as_echo_n "(cached) " >&6
9352 else
9353   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9354 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9355 do
9356   IFS=$as_save_IFS
9357   test -z "$as_dir" && as_dir=.
9358     for ac_prog in mkdir gmkdir; do
9359          for ac_exec_ext in '' $ac_executable_extensions; do
9360            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9361            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9362              'mkdir (GNU coreutils) '* | \
9363              'mkdir (coreutils) '* | \
9364              'mkdir (fileutils) '4.1*)
9365                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9366                break 3;;
9367            esac
9368          done
9369        done
9370   done
9371 IFS=$as_save_IFS
9372
9373 fi
9374
9375   test -d ./--version && rmdir ./--version
9376   if test "${ac_cv_path_mkdir+set}" = set; then
9377     MKDIR_P="$ac_cv_path_mkdir -p"
9378   else
9379     # As a last resort, use the slow shell script.  Don't cache a
9380     # value for MKDIR_P within a source directory, because that will
9381     # break other packages using the cache if that directory is
9382     # removed, or if the value is a relative name.
9383     MKDIR_P="$ac_install_sh -d"
9384   fi
9385 fi
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9387 $as_echo "$MKDIR_P" >&6; }
9388
9389 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9390 # a relative path to it in each makefile where it substitutes it. This clashes
9391 # with our Makefile.global concept. This workaround helps.
9392 case $MKDIR_P in
9393   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9394 esac
9395
9396 if test -z "$BISON"; then
9397   for ac_prog in bison
9398 do
9399   # Extract the first word of "$ac_prog", so it can be a program name with args.
9400 set dummy $ac_prog; ac_word=$2
9401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9402 $as_echo_n "checking for $ac_word... " >&6; }
9403 if ${ac_cv_path_BISON+:} false; then :
9404   $as_echo_n "(cached) " >&6
9405 else
9406   case $BISON in
9407   [\\/]* | ?:[\\/]*)
9408   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9409   ;;
9410   *)
9411   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9412 for as_dir in $PATH
9413 do
9414   IFS=$as_save_IFS
9415   test -z "$as_dir" && as_dir=.
9416     for ac_exec_ext in '' $ac_executable_extensions; do
9417   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9418     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9420     break 2
9421   fi
9422 done
9423   done
9424 IFS=$as_save_IFS
9425
9426   ;;
9427 esac
9428 fi
9429 BISON=$ac_cv_path_BISON
9430 if test -n "$BISON"; then
9431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9432 $as_echo "$BISON" >&6; }
9433 else
9434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9435 $as_echo "no" >&6; }
9436 fi
9437
9438
9439   test -n "$BISON" && break
9440 done
9441
9442 else
9443   # Report the value of BISON in configure's output in all cases.
9444   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9445 $as_echo_n "checking for BISON... " >&6; }
9446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9447 $as_echo "$BISON" >&6; }
9448 fi
9449
9450
9451 if test "$BISON"; then
9452   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9453   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9454 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9455   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9456   then
9457     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9458 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9459 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9460 $as_echo "$as_me: WARNING:
9461 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9462 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9463     BISON=""
9464   fi
9465   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9466   # of the now preferred %name-prefix "base_yy", but the latter
9467   # doesn't work with Bison 2.3 or less.  So for now we silence the
9468   # deprecation warnings.
9469   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9470   then
9471     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9472   fi
9473 fi
9474
9475 if test -z "$BISON"; then
9476   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9477 *** Without Bison you will not be able to build PostgreSQL from Git nor
9478 *** change any of the parser definition files.  You can obtain Bison from
9479 *** a GNU mirror site.  (If you are using the official distribution of
9480 *** PostgreSQL then you do not need to worry about this, because the Bison
9481 *** output is pre-generated.)" >&5
9482 $as_echo "$as_me: WARNING:
9483 *** Without Bison you will not be able to build PostgreSQL from Git nor
9484 *** change any of the parser definition files.  You can obtain Bison from
9485 *** a GNU mirror site.  (If you are using the official distribution of
9486 *** PostgreSQL then you do not need to worry about this, because the Bison
9487 *** output is pre-generated.)" >&2;}
9488 fi
9489 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9490
9491
9492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9493 $as_echo_n "checking for flex... " >&6; }
9494 if ${pgac_cv_path_flex+:} false; then :
9495   $as_echo_n "(cached) " >&6
9496 else
9497   # Let the user override the test
9498 if test -n "$FLEX"; then
9499   pgac_cv_path_flex=$FLEX
9500 else
9501   pgac_save_IFS=$IFS
9502   IFS=$PATH_SEPARATOR
9503   for pgac_dir in $PATH; do
9504     IFS=$pgac_save_IFS
9505     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9506       pgac_dir=`pwd`
9507     fi
9508     for pgac_prog in flex lex; do
9509       pgac_candidate="$pgac_dir/$pgac_prog"
9510       if test -f "$pgac_candidate" \
9511         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9512       then
9513         echo '%%'  > conftest.l
9514         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9515           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9516           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;}'
9517           then
9518             pgac_cv_path_flex=$pgac_candidate
9519             break 2
9520           else
9521             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9522 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9523 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9524 $as_echo "$as_me: WARNING:
9525 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9526 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9527           fi
9528         fi
9529       fi
9530     done
9531   done
9532   rm -f conftest.l lex.yy.c
9533   : ${pgac_cv_path_flex=no}
9534 fi
9535
9536 fi
9537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9538 $as_echo "$pgac_cv_path_flex" >&6; }
9539 if test x"$pgac_cv_path_flex" = x"no"; then
9540   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9541 *** Without Flex you will not be able to build PostgreSQL from Git nor
9542 *** change any of the scanner definition files.  You can obtain Flex from
9543 *** a GNU mirror site.  (If you are using the official distribution of
9544 *** PostgreSQL then you do not need to worry about this because the Flex
9545 *** output is pre-generated.)" >&5
9546 $as_echo "$as_me: WARNING:
9547 *** Without Flex you will not be able to build PostgreSQL from Git nor
9548 *** change any of the scanner definition files.  You can obtain Flex from
9549 *** a GNU mirror site.  (If you are using the official distribution of
9550 *** PostgreSQL then you do not need to worry about this because the Flex
9551 *** output is pre-generated.)" >&2;}
9552
9553   FLEX=
9554 else
9555   FLEX=$pgac_cv_path_flex
9556   pgac_flex_version=`$FLEX --version 2>/dev/null`
9557   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9558 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9559 fi
9560
9561
9562
9563
9564
9565 if test -z "$PERL"; then
9566   for ac_prog in perl
9567 do
9568   # Extract the first word of "$ac_prog", so it can be a program name with args.
9569 set dummy $ac_prog; ac_word=$2
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9571 $as_echo_n "checking for $ac_word... " >&6; }
9572 if ${ac_cv_path_PERL+:} false; then :
9573   $as_echo_n "(cached) " >&6
9574 else
9575   case $PERL in
9576   [\\/]* | ?:[\\/]*)
9577   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9578   ;;
9579   *)
9580   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9581 for as_dir in $PATH
9582 do
9583   IFS=$as_save_IFS
9584   test -z "$as_dir" && as_dir=.
9585     for ac_exec_ext in '' $ac_executable_extensions; do
9586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9587     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9589     break 2
9590   fi
9591 done
9592   done
9593 IFS=$as_save_IFS
9594
9595   ;;
9596 esac
9597 fi
9598 PERL=$ac_cv_path_PERL
9599 if test -n "$PERL"; then
9600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9601 $as_echo "$PERL" >&6; }
9602 else
9603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9604 $as_echo "no" >&6; }
9605 fi
9606
9607
9608   test -n "$PERL" && break
9609 done
9610
9611 else
9612   # Report the value of PERL in configure's output in all cases.
9613   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9614 $as_echo_n "checking for PERL... " >&6; }
9615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9616 $as_echo "$PERL" >&6; }
9617 fi
9618
9619
9620 if test "$PERL"; then
9621   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'`
9622   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9623 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9624   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9625     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9626   then
9627     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9628 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9629 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9630 $as_echo "$as_me: WARNING:
9631 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9632 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9633     PERL=""
9634   fi
9635 fi
9636
9637 if test -z "$PERL"; then
9638   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9639 *** Without Perl you will not be able to build PostgreSQL from Git.
9640 *** You can obtain Perl from any CPAN mirror site.
9641 *** (If you are using the official distribution of PostgreSQL then you do not
9642 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9643 $as_echo "$as_me: WARNING:
9644 *** Without Perl you will not be able to build PostgreSQL from Git.
9645 *** You can obtain Perl from any CPAN mirror site.
9646 *** (If you are using the official distribution of PostgreSQL then you do not
9647 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9648 fi
9649
9650 if test "$with_perl" = yes; then
9651   if test -z "$PERL"; then
9652     as_fn_error $? "Perl not found" "$LINENO" 5
9653   fi
9654
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9656 $as_echo_n "checking for Perl archlibexp... " >&6; }
9657 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9658 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9660 $as_echo "$perl_archlibexp" >&6; }
9661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9662 $as_echo_n "checking for Perl privlibexp... " >&6; }
9663 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9664 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9666 $as_echo "$perl_privlibexp" >&6; }
9667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9668 $as_echo_n "checking for Perl useshrplib... " >&6; }
9669 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9670 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9672 $as_echo "$perl_useshrplib" >&6; }
9673   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9674     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9675 You might have to rebuild your Perl installation.  Refer to the
9676 documentation for details.  Use --without-perl to disable building
9677 PL/Perl." "$LINENO" 5
9678   fi
9679   # On most platforms, archlibexp is also where the Perl include files live ...
9680   perl_includespec="-I$perl_archlibexp/CORE"
9681   # ... but on newer macOS versions, we must use -iwithsysroot to look
9682   # under $PG_SYSROOT
9683   if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9684     if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9685       perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9686     fi
9687   fi
9688
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9690 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9691 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9693 $as_echo "$perl_ccflags" >&6; }
9694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9695 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9696 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9698 $as_echo "$perl_embed_ccflags" >&6; }
9699
9700
9701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9702 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9703 if test "$PORTNAME" = "win32" ; then
9704         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9705         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9706                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9707         else
9708                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9709                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9710                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9711                 fi
9712         fi
9713 else
9714         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9715         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9716         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9717 fi
9718 if test -z "$perl_embed_ldflags" ; then
9719         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9720 $as_echo "no" >&6; }
9721         as_fn_error $? "could not determine flags for linking embedded Perl.
9722 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9723 installed." "$LINENO" 5
9724 else
9725         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9726 $as_echo "$perl_embed_ldflags" >&6; }
9727 fi
9728
9729 fi
9730
9731 if test "$with_python" = yes; then
9732   if test -z "$PYTHON"; then
9733   for ac_prog in python
9734 do
9735   # Extract the first word of "$ac_prog", so it can be a program name with args.
9736 set dummy $ac_prog; ac_word=$2
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9738 $as_echo_n "checking for $ac_word... " >&6; }
9739 if ${ac_cv_path_PYTHON+:} false; then :
9740   $as_echo_n "(cached) " >&6
9741 else
9742   case $PYTHON in
9743   [\\/]* | ?:[\\/]*)
9744   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9745   ;;
9746   *)
9747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9748 for as_dir in $PATH
9749 do
9750   IFS=$as_save_IFS
9751   test -z "$as_dir" && as_dir=.
9752     for ac_exec_ext in '' $ac_executable_extensions; do
9753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9754     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9756     break 2
9757   fi
9758 done
9759   done
9760 IFS=$as_save_IFS
9761
9762   ;;
9763 esac
9764 fi
9765 PYTHON=$ac_cv_path_PYTHON
9766 if test -n "$PYTHON"; then
9767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9768 $as_echo "$PYTHON" >&6; }
9769 else
9770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9771 $as_echo "no" >&6; }
9772 fi
9773
9774
9775   test -n "$PYTHON" && break
9776 done
9777
9778 else
9779   # Report the value of PYTHON in configure's output in all cases.
9780   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9781 $as_echo_n "checking for PYTHON... " >&6; }
9782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9783 $as_echo "$PYTHON" >&6; }
9784 fi
9785
9786 if test x"$PYTHON" = x""; then
9787   as_fn_error $? "Python not found" "$LINENO" 5
9788 fi
9789
9790
9791 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9792 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9793 $as_echo "$as_me: using python $python_fullversion" >&6;}
9794 # python_fullversion is typically n.n.n plus some trailing junk
9795 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9796 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9797 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9798 # Reject unsupported Python versions as soon as practical.
9799 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9800   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9801 fi
9802
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9804 $as_echo_n "checking for Python distutils module... " >&6; }
9805 if "${PYTHON}" -c 'import distutils' 2>&5
9806 then
9807     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9808 $as_echo "yes" >&6; }
9809 else
9810     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9811 $as_echo "no" >&6; }
9812     as_fn_error $? "distutils module not found" "$LINENO" 5
9813 fi
9814
9815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9816 $as_echo_n "checking Python configuration directory... " >&6; }
9817 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9819 $as_echo "$python_configdir" >&6; }
9820
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9822 $as_echo_n "checking Python include directories... " >&6; }
9823 python_includespec=`${PYTHON} -c "
9824 import distutils.sysconfig
9825 a = '-I' + distutils.sysconfig.get_python_inc(False)
9826 b = '-I' + distutils.sysconfig.get_python_inc(True)
9827 if a == b:
9828     print(a)
9829 else:
9830     print(a + ' ' + b)"`
9831 if test "$PORTNAME" = win32 ; then
9832     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9833 fi
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9835 $as_echo "$python_includespec" >&6; }
9836
9837
9838
9839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9840 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9841
9842 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9843 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9844
9845 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9846 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9847 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9848 then
9849         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9850         found_shlib=1
9851 else
9852         # Otherwise, guess the base name of the shlib.
9853         # LDVERSION was added in Python 3.2, before that use VERSION,
9854         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9855         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9856         if test x"${python_ldversion}" != x""; then
9857                 ldlibrary="python${python_ldversion}"
9858         else
9859                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9860                 if test x"${python_version_var}" != x""; then
9861                         ldlibrary="python${python_version_var}"
9862                 else
9863                         ldlibrary="python${python_version}"
9864                 fi
9865         fi
9866         # Search for a likely-looking file.
9867         found_shlib=0
9868         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9869         do
9870                 # We don't know the platform DLSUFFIX here, so check 'em all.
9871                 for e in .so .dll .dylib .sl; do
9872                         if test -e "$d/lib${ldlibrary}$e"; then
9873                                 python_libdir="$d"
9874                                 found_shlib=1
9875                                 break 2
9876                         fi
9877                 done
9878         done
9879         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9880         # (".so.n.n") as well. However, check this only after failing to find
9881         # ".so" anywhere, because yet other platforms (Debian) put the .so
9882         # symlink in a different directory from the underlying versioned shlib.
9883         if test "$found_shlib" != 1; then
9884                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9885                 do
9886                         for f in "$d/lib${ldlibrary}.so."* ; do
9887                                 if test -e "$f"; then
9888                                         python_libdir="$d"
9889                                         found_shlib=1
9890                                         break 2
9891                                 fi
9892                         done
9893                 done
9894         fi
9895         # As usual, Windows has its own ideas.  Possible default library
9896         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9897         # and the "lib" prefix might not be there.
9898         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9899                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9900                 do
9901                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9902                                 if test -e "$f"; then
9903                                         python_libdir="$d"
9904                                         found_shlib=1
9905                                         break 2
9906                                 fi
9907                         done
9908                 done
9909         fi
9910 fi
9911 if test "$found_shlib" != 1; then
9912         as_fn_error $? "could not find shared library for Python
9913 You might have to rebuild your Python installation.  Refer to the
9914 documentation for details.  Use --without-python to disable building
9915 PL/Python." "$LINENO" 5
9916 fi
9917 python_libspec="-L${python_libdir} -l${ldlibrary}"
9918
9919 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9920
9921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9922 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9923
9924
9925
9926 fi
9927
9928 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9929   if test -z "$ZIC"; then
9930   for ac_prog in zic
9931 do
9932   # Extract the first word of "$ac_prog", so it can be a program name with args.
9933 set dummy $ac_prog; ac_word=$2
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9935 $as_echo_n "checking for $ac_word... " >&6; }
9936 if ${ac_cv_path_ZIC+:} false; then :
9937   $as_echo_n "(cached) " >&6
9938 else
9939   case $ZIC in
9940   [\\/]* | ?:[\\/]*)
9941   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9942   ;;
9943   *)
9944   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9945 for as_dir in $PATH
9946 do
9947   IFS=$as_save_IFS
9948   test -z "$as_dir" && as_dir=.
9949     for ac_exec_ext in '' $ac_executable_extensions; do
9950   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9951     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9953     break 2
9954   fi
9955 done
9956   done
9957 IFS=$as_save_IFS
9958
9959   ;;
9960 esac
9961 fi
9962 ZIC=$ac_cv_path_ZIC
9963 if test -n "$ZIC"; then
9964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9965 $as_echo "$ZIC" >&6; }
9966 else
9967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9968 $as_echo "no" >&6; }
9969 fi
9970
9971
9972   test -n "$ZIC" && break
9973 done
9974
9975 else
9976   # Report the value of ZIC in configure's output in all cases.
9977   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9978 $as_echo_n "checking for ZIC... " >&6; }
9979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9980 $as_echo "$ZIC" >&6; }
9981 fi
9982
9983   if test -z "$ZIC"; then
9984     as_fn_error $? "
9985 When cross-compiling, either use the option --with-system-tzdata to use
9986 existing time-zone data, or set the environment variable ZIC to a zic
9987 program to use during the build." "$LINENO" 5
9988   fi
9989 fi
9990
9991 #
9992 # Pthreads
9993 #
9994 # For each platform, we need to know about any special compile and link
9995 # libraries, and whether the normal C function names are thread-safe.
9996 # See the comment at the top of src/port/thread.c for more information.
9997 # WIN32 doesn't need the pthread tests;  it always uses threads
9998 #
9999 # These tests are run before the library-tests, because linking with the
10000 # other libraries can pull in the pthread functions as a side-effect.  We
10001 # want to use the -pthread or similar flags directly, and not rely on
10002 # the side-effects of linking with some other library.
10003 #
10004 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
10005 # invocation below is the first one in the script, and autoconf generates
10006 # additional code for that, which must not be inside the if-block. AS_IF
10007 # knows how to do that.
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10009 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10010 if ${ac_cv_path_SED+:} false; then :
10011   $as_echo_n "(cached) " >&6
10012 else
10013             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10014      for ac_i in 1 2 3 4 5 6 7; do
10015        ac_script="$ac_script$as_nl$ac_script"
10016      done
10017      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10018      { ac_script=; unset ac_script;}
10019      if test -z "$SED"; then
10020   ac_path_SED_found=false
10021   # Loop through the user's path and test for each of PROGNAME-LIST
10022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10023 for as_dir in $PATH
10024 do
10025   IFS=$as_save_IFS
10026   test -z "$as_dir" && as_dir=.
10027     for ac_prog in sed gsed; do
10028     for ac_exec_ext in '' $ac_executable_extensions; do
10029       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10030       as_fn_executable_p "$ac_path_SED" || continue
10031 # Check for GNU ac_path_SED and select it if it is found.
10032   # Check for GNU $ac_path_SED
10033 case `"$ac_path_SED" --version 2>&1` in
10034 *GNU*)
10035   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10036 *)
10037   ac_count=0
10038   $as_echo_n 0123456789 >"conftest.in"
10039   while :
10040   do
10041     cat "conftest.in" "conftest.in" >"conftest.tmp"
10042     mv "conftest.tmp" "conftest.in"
10043     cp "conftest.in" "conftest.nl"
10044     $as_echo '' >> "conftest.nl"
10045     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10046     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10047     as_fn_arith $ac_count + 1 && ac_count=$as_val
10048     if test $ac_count -gt ${ac_path_SED_max-0}; then
10049       # Best one so far, save it but keep looking for a better one
10050       ac_cv_path_SED="$ac_path_SED"
10051       ac_path_SED_max=$ac_count
10052     fi
10053     # 10*(2^10) chars as input seems more than enough
10054     test $ac_count -gt 10 && break
10055   done
10056   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10057 esac
10058
10059       $ac_path_SED_found && break 3
10060     done
10061   done
10062   done
10063 IFS=$as_save_IFS
10064   if test -z "$ac_cv_path_SED"; then
10065     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10066   fi
10067 else
10068   ac_cv_path_SED=$SED
10069 fi
10070
10071 fi
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10073 $as_echo "$ac_cv_path_SED" >&6; }
10074  SED="$ac_cv_path_SED"
10075   rm -f conftest.sed
10076
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10078 $as_echo_n "checking for ANSI C header files... " >&6; }
10079 if ${ac_cv_header_stdc+:} false; then :
10080   $as_echo_n "(cached) " >&6
10081 else
10082   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10083 /* end confdefs.h.  */
10084 #include <stdlib.h>
10085 #include <stdarg.h>
10086 #include <string.h>
10087 #include <float.h>
10088
10089 int
10090 main ()
10091 {
10092
10093   ;
10094   return 0;
10095 }
10096 _ACEOF
10097 if ac_fn_c_try_compile "$LINENO"; then :
10098   ac_cv_header_stdc=yes
10099 else
10100   ac_cv_header_stdc=no
10101 fi
10102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10103
10104 if test $ac_cv_header_stdc = yes; then
10105   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10107 /* end confdefs.h.  */
10108 #include <string.h>
10109
10110 _ACEOF
10111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10112   $EGREP "memchr" >/dev/null 2>&1; then :
10113
10114 else
10115   ac_cv_header_stdc=no
10116 fi
10117 rm -f conftest*
10118
10119 fi
10120
10121 if test $ac_cv_header_stdc = yes; then
10122   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10124 /* end confdefs.h.  */
10125 #include <stdlib.h>
10126
10127 _ACEOF
10128 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10129   $EGREP "free" >/dev/null 2>&1; then :
10130
10131 else
10132   ac_cv_header_stdc=no
10133 fi
10134 rm -f conftest*
10135
10136 fi
10137
10138 if test $ac_cv_header_stdc = yes; then
10139   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10140   if test "$cross_compiling" = yes; then :
10141   :
10142 else
10143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10144 /* end confdefs.h.  */
10145 #include <ctype.h>
10146 #include <stdlib.h>
10147 #if ((' ' & 0x0FF) == 0x020)
10148 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10149 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10150 #else
10151 # define ISLOWER(c) \
10152                    (('a' <= (c) && (c) <= 'i') \
10153                      || ('j' <= (c) && (c) <= 'r') \
10154                      || ('s' <= (c) && (c) <= 'z'))
10155 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10156 #endif
10157
10158 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10159 int
10160 main ()
10161 {
10162   int i;
10163   for (i = 0; i < 256; i++)
10164     if (XOR (islower (i), ISLOWER (i))
10165         || toupper (i) != TOUPPER (i))
10166       return 2;
10167   return 0;
10168 }
10169 _ACEOF
10170 if ac_fn_c_try_run "$LINENO"; then :
10171
10172 else
10173   ac_cv_header_stdc=no
10174 fi
10175 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10176   conftest.$ac_objext conftest.beam conftest.$ac_ext
10177 fi
10178
10179 fi
10180 fi
10181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10182 $as_echo "$ac_cv_header_stdc" >&6; }
10183 if test $ac_cv_header_stdc = yes; then
10184
10185 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10186
10187 fi
10188
10189 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10190 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10191                   inttypes.h stdint.h unistd.h
10192 do :
10193   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10194 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10195 "
10196 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10197   cat >>confdefs.h <<_ACEOF
10198 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10199 _ACEOF
10200
10201 fi
10202
10203 done
10204
10205
10206 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10207    # then
10208
10209
10210
10211
10212 ac_ext=c
10213 ac_cpp='$CPP $CPPFLAGS'
10214 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10215 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10216 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10217
10218 ax_pthread_ok=no
10219
10220 # We used to check for pthread.h first, but this fails if pthread.h
10221 # requires special compiler flags (e.g. on Tru64 or Sequent).
10222 # It gets checked for in the link test anyway.
10223
10224 # First of all, check if the user has set any of the PTHREAD_LIBS,
10225 # etcetera environment variables, and if threads linking works using
10226 # them:
10227 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10228         ax_pthread_save_CC="$CC"
10229         ax_pthread_save_CFLAGS="$CFLAGS"
10230         ax_pthread_save_LIBS="$LIBS"
10231         if test "x$PTHREAD_CC" != "x"; then :
10232   CC="$PTHREAD_CC"
10233 fi
10234         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10235         LIBS="$PTHREAD_LIBS $LIBS"
10236         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10237 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10238         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10239 /* end confdefs.h.  */
10240
10241 /* Override any GCC internal prototype to avoid an error.
10242    Use char because int might match the return type of a GCC
10243    builtin and then its argument prototype would still apply.  */
10244 #ifdef __cplusplus
10245 extern "C"
10246 #endif
10247 char pthread_join ();
10248 int
10249 main ()
10250 {
10251 return pthread_join ();
10252   ;
10253   return 0;
10254 }
10255 _ACEOF
10256 if ac_fn_c_try_link "$LINENO"; then :
10257   ax_pthread_ok=yes
10258 fi
10259 rm -f core conftest.err conftest.$ac_objext \
10260     conftest$ac_exeext conftest.$ac_ext
10261         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10262 $as_echo "$ax_pthread_ok" >&6; }
10263         if test "x$ax_pthread_ok" = "xno"; then
10264                 PTHREAD_LIBS=""
10265                 PTHREAD_CFLAGS=""
10266         fi
10267         CC="$ax_pthread_save_CC"
10268         CFLAGS="$ax_pthread_save_CFLAGS"
10269         LIBS="$ax_pthread_save_LIBS"
10270 fi
10271
10272 # We must check for the threads library under a number of different
10273 # names; the ordering is very important because some systems
10274 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10275 # libraries is broken (non-POSIX).
10276
10277 # Create a list of thread flags to try.  Items starting with a "-" are
10278 # C compiler flags, and other items are library names, except for "none"
10279 # which indicates that we try without any flags at all, and "pthread-config"
10280 # which is a program returning the flags for the Pth emulation library.
10281
10282 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10283
10284 # The ordering *is* (sometimes) important.  Some notes on the
10285 # individual items follow:
10286
10287 # pthreads: AIX (must check this before -lpthread)
10288 # none: in case threads are in libc; should be tried before -Kthread and
10289 #       other compiler flags to prevent continual compiler warnings
10290 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10291 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10292 #           (Note: HP C rejects this with "bad form for `-t' option")
10293 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10294 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10295 #      doesn't hurt to check since this sometimes defines pthreads and
10296 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10297 #      is present but should not be used directly; and before -mthreads,
10298 #      because the compiler interprets this as "-mt" + "-hreads")
10299 # -mthreads: Mingw32/gcc, Lynx/gcc
10300 # pthread: Linux, etcetera
10301 # --thread-safe: KAI C++
10302 # pthread-config: use pthread-config program (for GNU Pth library)
10303
10304 case $host_os in
10305
10306         freebsd*)
10307
10308         # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10309         # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10310
10311         ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10312         ;;
10313
10314         hpux*)
10315
10316         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10317         # multi-threading and also sets -lpthread."
10318
10319         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10320         ;;
10321
10322         openedition*)
10323
10324         # IBM z/OS requires a feature-test macro to be defined in order to
10325         # enable POSIX threads at all, so give the user a hint if this is
10326         # not set. (We don't define these ourselves, as they can affect
10327         # other portions of the system API in unpredictable ways.)
10328
10329         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10330 /* end confdefs.h.  */
10331
10332 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10333              AX_PTHREAD_ZOS_MISSING
10334 #            endif
10335
10336 _ACEOF
10337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10338   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10339   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10340 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10341 fi
10342 rm -f conftest*
10343
10344         ;;
10345
10346         solaris*)
10347
10348         # On Solaris (at least, for some versions), libc contains stubbed
10349         # (non-functional) versions of the pthreads routines, so link-based
10350         # tests will erroneously succeed. (N.B.: The stubs are missing
10351         # pthread_cleanup_push, or rather a function called by this macro,
10352         # so we could check for that, but who knows whether they'll stub
10353         # that too in a future libc.)  So we'll check first for the
10354         # standard Solaris way of linking pthreads (-mt -lpthread).
10355
10356         ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10357         ;;
10358 esac
10359
10360 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10361
10362 if test "x$GCC" = "xyes"; then :
10363   ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10364 fi
10365
10366 # The presence of a feature test macro requesting re-entrant function
10367 # definitions is, on some systems, a strong hint that pthreads support is
10368 # correctly enabled
10369
10370 case $host_os in
10371         darwin* | hpux* | linux* | osf* | solaris*)
10372         ax_pthread_check_macro="_REENTRANT"
10373         ;;
10374
10375         aix*)
10376         ax_pthread_check_macro="_THREAD_SAFE"
10377         ;;
10378
10379         *)
10380         ax_pthread_check_macro="--"
10381         ;;
10382 esac
10383 if test "x$ax_pthread_check_macro" = "x--"; then :
10384   ax_pthread_check_cond=0
10385 else
10386   ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10387 fi
10388
10389 # Are we compiling with Clang?
10390
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10392 $as_echo_n "checking whether $CC is Clang... " >&6; }
10393 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10394   $as_echo_n "(cached) " >&6
10395 else
10396   ax_cv_PTHREAD_CLANG=no
10397      # Note that Autoconf sets GCC=yes for Clang as well as GCC
10398      if test "x$GCC" = "xyes"; then
10399         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10400 /* end confdefs.h.  */
10401 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10402 #            if defined(__clang__) && defined(__llvm__)
10403              AX_PTHREAD_CC_IS_CLANG
10404 #            endif
10405
10406 _ACEOF
10407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10408   $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10409   ax_cv_PTHREAD_CLANG=yes
10410 fi
10411 rm -f conftest*
10412
10413      fi
10414
10415 fi
10416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10417 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10418 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10419
10420 ax_pthread_clang_warning=no
10421
10422 # Clang needs special handling, because older versions handle the -pthread
10423 # option in a rather... idiosyncratic way
10424
10425 if test "x$ax_pthread_clang" = "xyes"; then
10426
10427         # Clang takes -pthread; it has never supported any other flag
10428
10429         # (Note 1: This will need to be revisited if a system that Clang
10430         # supports has POSIX threads in a separate library.  This tends not
10431         # to be the way of modern systems, but it's conceivable.)
10432
10433         # (Note 2: On some systems, notably Darwin, -pthread is not needed
10434         # to get POSIX threads support; the API is always present and
10435         # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
10436         # -pthread does define _REENTRANT, and while the Darwin headers
10437         # ignore this macro, third-party headers might not.)
10438
10439         PTHREAD_CFLAGS="-pthread"
10440         PTHREAD_LIBS=
10441
10442         ax_pthread_ok=yes
10443
10444         # However, older versions of Clang make a point of warning the user
10445         # that, in an invocation where only linking and no compilation is
10446         # taking place, the -pthread option has no effect ("argument unused
10447         # during compilation").  They expect -pthread to be passed in only
10448         # when source code is being compiled.
10449         #
10450         # Problem is, this is at odds with the way Automake and most other
10451         # C build frameworks function, which is that the same flags used in
10452         # compilation (CFLAGS) are also used in linking.  Many systems
10453         # supported by AX_PTHREAD require exactly this for POSIX threads
10454         # support, and in fact it is often not straightforward to specify a
10455         # flag that is used only in the compilation phase and not in
10456         # linking.  Such a scenario is extremely rare in practice.
10457         #
10458         # Even though use of the -pthread flag in linking would only print
10459         # a warning, this can be a nuisance for well-run software projects
10460         # that build with -Werror.  So if the active version of Clang has
10461         # this misfeature, we search for an option to squash it.
10462
10463         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10464 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10465 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10466   $as_echo_n "(cached) " >&6
10467 else
10468   ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10469              # Create an alternate version of $ac_link that compiles and
10470              # links in two steps (.c -> .o, .o -> exe) instead of one
10471              # (.c -> exe), because the warning occurs only in the second
10472              # step
10473              ax_pthread_save_ac_link="$ac_link"
10474              ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10475              ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10476              ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10477              ax_pthread_save_CFLAGS="$CFLAGS"
10478              for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10479                 if test "x$ax_pthread_try" = "xunknown"; then :
10480   break
10481 fi
10482                 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10483                 ac_link="$ax_pthread_save_ac_link"
10484                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10485 /* end confdefs.h.  */
10486 int main(void){return 0;}
10487 _ACEOF
10488 if ac_fn_c_try_link "$LINENO"; then :
10489   ac_link="$ax_pthread_2step_ac_link"
10490                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10491 /* end confdefs.h.  */
10492 int main(void){return 0;}
10493 _ACEOF
10494 if ac_fn_c_try_link "$LINENO"; then :
10495   break
10496 fi
10497 rm -f core conftest.err conftest.$ac_objext \
10498     conftest$ac_exeext conftest.$ac_ext
10499
10500 fi
10501 rm -f core conftest.err conftest.$ac_objext \
10502     conftest$ac_exeext conftest.$ac_ext
10503              done
10504              ac_link="$ax_pthread_save_ac_link"
10505              CFLAGS="$ax_pthread_save_CFLAGS"
10506              if test "x$ax_pthread_try" = "x"; then :
10507   ax_pthread_try=no
10508 fi
10509              ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10510
10511 fi
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10513 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10514
10515         case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10516                 no | unknown) ;;
10517                 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10518         esac
10519
10520 fi # $ax_pthread_clang = yes
10521
10522 if test "x$ax_pthread_ok" = "xno"; then
10523 for ax_pthread_try_flag in $ax_pthread_flags; do
10524
10525         case $ax_pthread_try_flag in
10526                 none)
10527                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10528 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10529                 ;;
10530
10531                 -mt,pthread)
10532                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10533 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10534                 PTHREAD_CFLAGS="-mt"
10535                 PTHREAD_LIBS="-lpthread"
10536                 ;;
10537
10538                 -*)
10539                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10540 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10541                 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10542                 ;;
10543
10544                 pthread-config)
10545                 # Extract the first word of "pthread-config", so it can be a program name with args.
10546 set dummy pthread-config; ac_word=$2
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10548 $as_echo_n "checking for $ac_word... " >&6; }
10549 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10550   $as_echo_n "(cached) " >&6
10551 else
10552   if test -n "$ax_pthread_config"; then
10553   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10554 else
10555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10556 for as_dir in $PATH
10557 do
10558   IFS=$as_save_IFS
10559   test -z "$as_dir" && as_dir=.
10560     for ac_exec_ext in '' $ac_executable_extensions; do
10561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10562     ac_cv_prog_ax_pthread_config="yes"
10563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10564     break 2
10565   fi
10566 done
10567   done
10568 IFS=$as_save_IFS
10569
10570   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10571 fi
10572 fi
10573 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10574 if test -n "$ax_pthread_config"; then
10575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10576 $as_echo "$ax_pthread_config" >&6; }
10577 else
10578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579 $as_echo "no" >&6; }
10580 fi
10581
10582
10583                 if test "x$ax_pthread_config" = "xno"; then :
10584   continue
10585 fi
10586                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10587                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10588                 ;;
10589
10590                 *)
10591                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
10592 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
10593                 PTHREAD_LIBS="-l$ax_pthread_try_flag"
10594                 ;;
10595         esac
10596
10597         ax_pthread_save_CFLAGS="$CFLAGS"
10598         ax_pthread_save_LIBS="$LIBS"
10599         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10600         LIBS="$PTHREAD_LIBS $LIBS"
10601
10602         # Check for various functions.  We must include pthread.h,
10603         # since some functions may be macros.  (On the Sequent, we
10604         # need a special flag -Kthread to make this header compile.)
10605         # We check for pthread_join because it is in -lpthread on IRIX
10606         # while pthread_create is in libc.  We check for pthread_attr_init
10607         # due to DEC craziness with -lpthreads.  We check for
10608         # pthread_cleanup_push because it is one of the few pthread
10609         # functions on Solaris that doesn't have a non-functional libc stub.
10610         # We try pthread_create on general principles.
10611
10612         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10613 /* end confdefs.h.  */
10614 #include <pthread.h>
10615 #                       if $ax_pthread_check_cond
10616 #                        error "$ax_pthread_check_macro must be defined"
10617 #                       endif
10618                         static void routine(void *a) { a = 0; }
10619                         static void *start_routine(void *a) { return a; }
10620 int
10621 main ()
10622 {
10623 pthread_t th; pthread_attr_t attr;
10624                         pthread_create(&th, 0, start_routine, 0);
10625                         pthread_join(th, 0);
10626                         pthread_attr_init(&attr);
10627                         pthread_cleanup_push(routine, 0);
10628                         pthread_cleanup_pop(0) /* ; */
10629   ;
10630   return 0;
10631 }
10632 _ACEOF
10633 if ac_fn_c_try_link "$LINENO"; then :
10634   ax_pthread_ok=yes
10635 fi
10636 rm -f core conftest.err conftest.$ac_objext \
10637     conftest$ac_exeext conftest.$ac_ext
10638
10639         CFLAGS="$ax_pthread_save_CFLAGS"
10640         LIBS="$ax_pthread_save_LIBS"
10641
10642         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10643 $as_echo "$ax_pthread_ok" >&6; }
10644         if test "x$ax_pthread_ok" = "xyes"; then :
10645   break
10646 fi
10647
10648         PTHREAD_LIBS=""
10649         PTHREAD_CFLAGS=""
10650 done
10651 fi
10652
10653 # Various other checks:
10654 if test "x$ax_pthread_ok" = "xyes"; then
10655         ax_pthread_save_CFLAGS="$CFLAGS"
10656         ax_pthread_save_LIBS="$LIBS"
10657         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10658         LIBS="$PTHREAD_LIBS $LIBS"
10659
10660         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10661         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10662 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10663 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10664   $as_echo_n "(cached) " >&6
10665 else
10666   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10667              for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10668                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10669 /* end confdefs.h.  */
10670 #include <pthread.h>
10671 int
10672 main ()
10673 {
10674 int attr = $ax_pthread_attr; return attr /* ; */
10675   ;
10676   return 0;
10677 }
10678 _ACEOF
10679 if ac_fn_c_try_link "$LINENO"; then :
10680   ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
10681 fi
10682 rm -f core conftest.err conftest.$ac_objext \
10683     conftest$ac_exeext conftest.$ac_ext
10684              done
10685
10686 fi
10687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10688 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10689         if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
10690                test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
10691                test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
10692
10693 cat >>confdefs.h <<_ACEOF
10694 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10695 _ACEOF
10696
10697                ax_pthread_joinable_attr_defined=yes
10698
10699 fi
10700
10701         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
10702 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
10703 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10704   $as_echo_n "(cached) " >&6
10705 else
10706   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10707              case $host_os in
10708              solaris*)
10709              ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
10710              ;;
10711              esac
10712
10713 fi
10714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10715 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10716         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10717                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10718   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10719                ax_pthread_special_flags_added=yes
10720 fi
10721
10722         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10723 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10724 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10725   $as_echo_n "(cached) " >&6
10726 else
10727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10728 /* end confdefs.h.  */
10729 #include <pthread.h>
10730 int
10731 main ()
10732 {
10733 int i = PTHREAD_PRIO_INHERIT;
10734   ;
10735   return 0;
10736 }
10737 _ACEOF
10738 if ac_fn_c_try_link "$LINENO"; then :
10739   ax_cv_PTHREAD_PRIO_INHERIT=yes
10740 else
10741   ax_cv_PTHREAD_PRIO_INHERIT=no
10742 fi
10743 rm -f core conftest.err conftest.$ac_objext \
10744     conftest$ac_exeext conftest.$ac_ext
10745
10746 fi
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10748 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10749         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
10750                test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
10751
10752 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10753
10754                ax_pthread_prio_inherit_defined=yes
10755
10756 fi
10757
10758         CFLAGS="$ax_pthread_save_CFLAGS"
10759         LIBS="$ax_pthread_save_LIBS"
10760
10761         # More AIX lossage: compile with *_r variant
10762         if test "x$GCC" != "xyes"; then
10763             case $host_os in
10764                 aix*)
10765                 case "x/$CC" in #(
10766   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10767     #handle absolute path differently from PATH based program lookup
10768                      case "x$CC" in #(
10769   x/*) :
10770     if as_fn_executable_p ${CC}_r; then :
10771   PTHREAD_CC="${CC}_r"
10772 fi ;; #(
10773   *) :
10774     for ac_prog in ${CC}_r
10775 do
10776   # Extract the first word of "$ac_prog", so it can be a program name with args.
10777 set dummy $ac_prog; ac_word=$2
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10779 $as_echo_n "checking for $ac_word... " >&6; }
10780 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10781   $as_echo_n "(cached) " >&6
10782 else
10783   if test -n "$PTHREAD_CC"; then
10784   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10785 else
10786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10787 for as_dir in $PATH
10788 do
10789   IFS=$as_save_IFS
10790   test -z "$as_dir" && as_dir=.
10791     for ac_exec_ext in '' $ac_executable_extensions; do
10792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10793     ac_cv_prog_PTHREAD_CC="$ac_prog"
10794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10795     break 2
10796   fi
10797 done
10798   done
10799 IFS=$as_save_IFS
10800
10801 fi
10802 fi
10803 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10804 if test -n "$PTHREAD_CC"; then
10805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10806 $as_echo "$PTHREAD_CC" >&6; }
10807 else
10808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10809 $as_echo "no" >&6; }
10810 fi
10811
10812
10813   test -n "$PTHREAD_CC" && break
10814 done
10815 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10816  ;;
10817 esac ;; #(
10818   *) :
10819      ;;
10820 esac
10821                 ;;
10822             esac
10823         fi
10824 fi
10825
10826 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10827
10828
10829
10830
10831
10832 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10833 if test "x$ax_pthread_ok" = "xyes"; then
10834
10835 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10836
10837         :
10838 else
10839         ax_pthread_ok=no
10840
10841 fi
10842 ac_ext=c
10843 ac_cpp='$CPP $CPPFLAGS'
10844 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10845 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10846 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10847
10848         # set thread flags
10849
10850 # Some platforms use these, so just define them.  They can't hurt if they
10851 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10852 # enables 5-arg getpwuid_r, among other things.
10853 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10854
10855 # Check for *_r functions
10856 _CFLAGS="$CFLAGS"
10857 _LIBS="$LIBS"
10858 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10859 LIBS="$LIBS $PTHREAD_LIBS"
10860
10861 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10862 if test "x$ac_cv_header_pthread_h" = xyes; then :
10863
10864 else
10865   as_fn_error $? "
10866 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10867 fi
10868
10869
10870
10871 for ac_func in strerror_r getpwuid_r gethostbyname_r
10872 do :
10873   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10874 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10875 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10876   cat >>confdefs.h <<_ACEOF
10877 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10878 _ACEOF
10879
10880 fi
10881 done
10882
10883
10884 # Do test here with the proper thread flags
10885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10886 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10887 if ${pgac_cv_func_strerror_r_int+:} false; then :
10888   $as_echo_n "(cached) " >&6
10889 else
10890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10891 /* end confdefs.h.  */
10892 #include <string.h>
10893 int
10894 main ()
10895 {
10896 char buf[100];
10897   switch (strerror_r(1, buf, sizeof(buf)))
10898   { case 0: break; default: break; }
10899
10900   ;
10901   return 0;
10902 }
10903 _ACEOF
10904 if ac_fn_c_try_compile "$LINENO"; then :
10905   pgac_cv_func_strerror_r_int=yes
10906 else
10907   pgac_cv_func_strerror_r_int=no
10908 fi
10909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10910 fi
10911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10912 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10913 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10914
10915 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10916
10917 fi
10918
10919
10920 CFLAGS="$_CFLAGS"
10921 LIBS="$_LIBS"
10922
10923
10924 else
10925    # else
10926 # do not use values from template file
10927 PTHREAD_CFLAGS=
10928 PTHREAD_LIBS=
10929
10930 fi # fi
10931
10932
10933
10934
10935
10936 ##
10937 ## Libraries
10938 ##
10939 ## Most libraries are included only if they demonstrably provide a function
10940 ## we need, but libm is an exception: always include it, because there are
10941 ## too many compilers that play cute optimization games that will break
10942 ## probes for standard functions such as pow().
10943 ##
10944
10945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10946 $as_echo_n "checking for main in -lm... " >&6; }
10947 if ${ac_cv_lib_m_main+:} false; then :
10948   $as_echo_n "(cached) " >&6
10949 else
10950   ac_check_lib_save_LIBS=$LIBS
10951 LIBS="-lm  $LIBS"
10952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10953 /* end confdefs.h.  */
10954
10955
10956 int
10957 main ()
10958 {
10959 return main ();
10960   ;
10961   return 0;
10962 }
10963 _ACEOF
10964 if ac_fn_c_try_link "$LINENO"; then :
10965   ac_cv_lib_m_main=yes
10966 else
10967   ac_cv_lib_m_main=no
10968 fi
10969 rm -f core conftest.err conftest.$ac_objext \
10970     conftest$ac_exeext conftest.$ac_ext
10971 LIBS=$ac_check_lib_save_LIBS
10972 fi
10973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10974 $as_echo "$ac_cv_lib_m_main" >&6; }
10975 if test "x$ac_cv_lib_m_main" = xyes; then :
10976   cat >>confdefs.h <<_ACEOF
10977 #define HAVE_LIBM 1
10978 _ACEOF
10979
10980   LIBS="-lm $LIBS"
10981
10982 fi
10983
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10985 $as_echo_n "checking for library containing setproctitle... " >&6; }
10986 if ${ac_cv_search_setproctitle+:} false; then :
10987   $as_echo_n "(cached) " >&6
10988 else
10989   ac_func_search_save_LIBS=$LIBS
10990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10991 /* end confdefs.h.  */
10992
10993 /* Override any GCC internal prototype to avoid an error.
10994    Use char because int might match the return type of a GCC
10995    builtin and then its argument prototype would still apply.  */
10996 #ifdef __cplusplus
10997 extern "C"
10998 #endif
10999 char setproctitle ();
11000 int
11001 main ()
11002 {
11003 return setproctitle ();
11004   ;
11005   return 0;
11006 }
11007 _ACEOF
11008 for ac_lib in '' util; do
11009   if test -z "$ac_lib"; then
11010     ac_res="none required"
11011   else
11012     ac_res=-l$ac_lib
11013     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11014   fi
11015   if ac_fn_c_try_link "$LINENO"; then :
11016   ac_cv_search_setproctitle=$ac_res
11017 fi
11018 rm -f core conftest.err conftest.$ac_objext \
11019     conftest$ac_exeext
11020   if ${ac_cv_search_setproctitle+:} false; then :
11021   break
11022 fi
11023 done
11024 if ${ac_cv_search_setproctitle+:} false; then :
11025
11026 else
11027   ac_cv_search_setproctitle=no
11028 fi
11029 rm conftest.$ac_ext
11030 LIBS=$ac_func_search_save_LIBS
11031 fi
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11033 $as_echo "$ac_cv_search_setproctitle" >&6; }
11034 ac_res=$ac_cv_search_setproctitle
11035 if test "$ac_res" != no; then :
11036   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11037
11038 fi
11039
11040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11041 $as_echo_n "checking for library containing dlopen... " >&6; }
11042 if ${ac_cv_search_dlopen+:} false; then :
11043   $as_echo_n "(cached) " >&6
11044 else
11045   ac_func_search_save_LIBS=$LIBS
11046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11047 /* end confdefs.h.  */
11048
11049 /* Override any GCC internal prototype to avoid an error.
11050    Use char because int might match the return type of a GCC
11051    builtin and then its argument prototype would still apply.  */
11052 #ifdef __cplusplus
11053 extern "C"
11054 #endif
11055 char dlopen ();
11056 int
11057 main ()
11058 {
11059 return dlopen ();
11060   ;
11061   return 0;
11062 }
11063 _ACEOF
11064 for ac_lib in '' dl; do
11065   if test -z "$ac_lib"; then
11066     ac_res="none required"
11067   else
11068     ac_res=-l$ac_lib
11069     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11070   fi
11071   if ac_fn_c_try_link "$LINENO"; then :
11072   ac_cv_search_dlopen=$ac_res
11073 fi
11074 rm -f core conftest.err conftest.$ac_objext \
11075     conftest$ac_exeext
11076   if ${ac_cv_search_dlopen+:} false; then :
11077   break
11078 fi
11079 done
11080 if ${ac_cv_search_dlopen+:} false; then :
11081
11082 else
11083   ac_cv_search_dlopen=no
11084 fi
11085 rm conftest.$ac_ext
11086 LIBS=$ac_func_search_save_LIBS
11087 fi
11088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11089 $as_echo "$ac_cv_search_dlopen" >&6; }
11090 ac_res=$ac_cv_search_dlopen
11091 if test "$ac_res" != no; then :
11092   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11093
11094 fi
11095
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11097 $as_echo_n "checking for library containing socket... " >&6; }
11098 if ${ac_cv_search_socket+:} false; then :
11099   $as_echo_n "(cached) " >&6
11100 else
11101   ac_func_search_save_LIBS=$LIBS
11102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11103 /* end confdefs.h.  */
11104
11105 /* Override any GCC internal prototype to avoid an error.
11106    Use char because int might match the return type of a GCC
11107    builtin and then its argument prototype would still apply.  */
11108 #ifdef __cplusplus
11109 extern "C"
11110 #endif
11111 char socket ();
11112 int
11113 main ()
11114 {
11115 return socket ();
11116   ;
11117   return 0;
11118 }
11119 _ACEOF
11120 for ac_lib in '' socket ws2_32; do
11121   if test -z "$ac_lib"; then
11122     ac_res="none required"
11123   else
11124     ac_res=-l$ac_lib
11125     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11126   fi
11127   if ac_fn_c_try_link "$LINENO"; then :
11128   ac_cv_search_socket=$ac_res
11129 fi
11130 rm -f core conftest.err conftest.$ac_objext \
11131     conftest$ac_exeext
11132   if ${ac_cv_search_socket+:} false; then :
11133   break
11134 fi
11135 done
11136 if ${ac_cv_search_socket+:} false; then :
11137
11138 else
11139   ac_cv_search_socket=no
11140 fi
11141 rm conftest.$ac_ext
11142 LIBS=$ac_func_search_save_LIBS
11143 fi
11144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11145 $as_echo "$ac_cv_search_socket" >&6; }
11146 ac_res=$ac_cv_search_socket
11147 if test "$ac_res" != no; then :
11148   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11149
11150 fi
11151
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11153 $as_echo_n "checking for library containing shl_load... " >&6; }
11154 if ${ac_cv_search_shl_load+:} false; then :
11155   $as_echo_n "(cached) " >&6
11156 else
11157   ac_func_search_save_LIBS=$LIBS
11158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11159 /* end confdefs.h.  */
11160
11161 /* Override any GCC internal prototype to avoid an error.
11162    Use char because int might match the return type of a GCC
11163    builtin and then its argument prototype would still apply.  */
11164 #ifdef __cplusplus
11165 extern "C"
11166 #endif
11167 char shl_load ();
11168 int
11169 main ()
11170 {
11171 return shl_load ();
11172   ;
11173   return 0;
11174 }
11175 _ACEOF
11176 for ac_lib in '' dld; do
11177   if test -z "$ac_lib"; then
11178     ac_res="none required"
11179   else
11180     ac_res=-l$ac_lib
11181     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11182   fi
11183   if ac_fn_c_try_link "$LINENO"; then :
11184   ac_cv_search_shl_load=$ac_res
11185 fi
11186 rm -f core conftest.err conftest.$ac_objext \
11187     conftest$ac_exeext
11188   if ${ac_cv_search_shl_load+:} false; then :
11189   break
11190 fi
11191 done
11192 if ${ac_cv_search_shl_load+:} false; then :
11193
11194 else
11195   ac_cv_search_shl_load=no
11196 fi
11197 rm conftest.$ac_ext
11198 LIBS=$ac_func_search_save_LIBS
11199 fi
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11201 $as_echo "$ac_cv_search_shl_load" >&6; }
11202 ac_res=$ac_cv_search_shl_load
11203 if test "$ac_res" != no; then :
11204   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11205
11206 fi
11207
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11209 $as_echo_n "checking for library containing getopt_long... " >&6; }
11210 if ${ac_cv_search_getopt_long+:} false; then :
11211   $as_echo_n "(cached) " >&6
11212 else
11213   ac_func_search_save_LIBS=$LIBS
11214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11215 /* end confdefs.h.  */
11216
11217 /* Override any GCC internal prototype to avoid an error.
11218    Use char because int might match the return type of a GCC
11219    builtin and then its argument prototype would still apply.  */
11220 #ifdef __cplusplus
11221 extern "C"
11222 #endif
11223 char getopt_long ();
11224 int
11225 main ()
11226 {
11227 return getopt_long ();
11228   ;
11229   return 0;
11230 }
11231 _ACEOF
11232 for ac_lib in '' getopt gnugetopt; do
11233   if test -z "$ac_lib"; then
11234     ac_res="none required"
11235   else
11236     ac_res=-l$ac_lib
11237     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11238   fi
11239   if ac_fn_c_try_link "$LINENO"; then :
11240   ac_cv_search_getopt_long=$ac_res
11241 fi
11242 rm -f core conftest.err conftest.$ac_objext \
11243     conftest$ac_exeext
11244   if ${ac_cv_search_getopt_long+:} false; then :
11245   break
11246 fi
11247 done
11248 if ${ac_cv_search_getopt_long+:} false; then :
11249
11250 else
11251   ac_cv_search_getopt_long=no
11252 fi
11253 rm conftest.$ac_ext
11254 LIBS=$ac_func_search_save_LIBS
11255 fi
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11257 $as_echo "$ac_cv_search_getopt_long" >&6; }
11258 ac_res=$ac_cv_search_getopt_long
11259 if test "$ac_res" != no; then :
11260   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11261
11262 fi
11263
11264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11265 $as_echo_n "checking for library containing crypt... " >&6; }
11266 if ${ac_cv_search_crypt+:} false; then :
11267   $as_echo_n "(cached) " >&6
11268 else
11269   ac_func_search_save_LIBS=$LIBS
11270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11271 /* end confdefs.h.  */
11272
11273 /* Override any GCC internal prototype to avoid an error.
11274    Use char because int might match the return type of a GCC
11275    builtin and then its argument prototype would still apply.  */
11276 #ifdef __cplusplus
11277 extern "C"
11278 #endif
11279 char crypt ();
11280 int
11281 main ()
11282 {
11283 return crypt ();
11284   ;
11285   return 0;
11286 }
11287 _ACEOF
11288 for ac_lib in '' crypt; do
11289   if test -z "$ac_lib"; then
11290     ac_res="none required"
11291   else
11292     ac_res=-l$ac_lib
11293     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11294   fi
11295   if ac_fn_c_try_link "$LINENO"; then :
11296   ac_cv_search_crypt=$ac_res
11297 fi
11298 rm -f core conftest.err conftest.$ac_objext \
11299     conftest$ac_exeext
11300   if ${ac_cv_search_crypt+:} false; then :
11301   break
11302 fi
11303 done
11304 if ${ac_cv_search_crypt+:} false; then :
11305
11306 else
11307   ac_cv_search_crypt=no
11308 fi
11309 rm conftest.$ac_ext
11310 LIBS=$ac_func_search_save_LIBS
11311 fi
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11313 $as_echo "$ac_cv_search_crypt" >&6; }
11314 ac_res=$ac_cv_search_crypt
11315 if test "$ac_res" != no; then :
11316   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11317
11318 fi
11319
11320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11321 $as_echo_n "checking for library containing shm_open... " >&6; }
11322 if ${ac_cv_search_shm_open+:} false; then :
11323   $as_echo_n "(cached) " >&6
11324 else
11325   ac_func_search_save_LIBS=$LIBS
11326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11327 /* end confdefs.h.  */
11328
11329 /* Override any GCC internal prototype to avoid an error.
11330    Use char because int might match the return type of a GCC
11331    builtin and then its argument prototype would still apply.  */
11332 #ifdef __cplusplus
11333 extern "C"
11334 #endif
11335 char shm_open ();
11336 int
11337 main ()
11338 {
11339 return shm_open ();
11340   ;
11341   return 0;
11342 }
11343 _ACEOF
11344 for ac_lib in '' rt; do
11345   if test -z "$ac_lib"; then
11346     ac_res="none required"
11347   else
11348     ac_res=-l$ac_lib
11349     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11350   fi
11351   if ac_fn_c_try_link "$LINENO"; then :
11352   ac_cv_search_shm_open=$ac_res
11353 fi
11354 rm -f core conftest.err conftest.$ac_objext \
11355     conftest$ac_exeext
11356   if ${ac_cv_search_shm_open+:} false; then :
11357   break
11358 fi
11359 done
11360 if ${ac_cv_search_shm_open+:} false; then :
11361
11362 else
11363   ac_cv_search_shm_open=no
11364 fi
11365 rm conftest.$ac_ext
11366 LIBS=$ac_func_search_save_LIBS
11367 fi
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11369 $as_echo "$ac_cv_search_shm_open" >&6; }
11370 ac_res=$ac_cv_search_shm_open
11371 if test "$ac_res" != no; then :
11372   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11373
11374 fi
11375
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11377 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11378 if ${ac_cv_search_shm_unlink+:} false; then :
11379   $as_echo_n "(cached) " >&6
11380 else
11381   ac_func_search_save_LIBS=$LIBS
11382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11383 /* end confdefs.h.  */
11384
11385 /* Override any GCC internal prototype to avoid an error.
11386    Use char because int might match the return type of a GCC
11387    builtin and then its argument prototype would still apply.  */
11388 #ifdef __cplusplus
11389 extern "C"
11390 #endif
11391 char shm_unlink ();
11392 int
11393 main ()
11394 {
11395 return shm_unlink ();
11396   ;
11397   return 0;
11398 }
11399 _ACEOF
11400 for ac_lib in '' rt; do
11401   if test -z "$ac_lib"; then
11402     ac_res="none required"
11403   else
11404     ac_res=-l$ac_lib
11405     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11406   fi
11407   if ac_fn_c_try_link "$LINENO"; then :
11408   ac_cv_search_shm_unlink=$ac_res
11409 fi
11410 rm -f core conftest.err conftest.$ac_objext \
11411     conftest$ac_exeext
11412   if ${ac_cv_search_shm_unlink+:} false; then :
11413   break
11414 fi
11415 done
11416 if ${ac_cv_search_shm_unlink+:} false; then :
11417
11418 else
11419   ac_cv_search_shm_unlink=no
11420 fi
11421 rm conftest.$ac_ext
11422 LIBS=$ac_func_search_save_LIBS
11423 fi
11424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11425 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11426 ac_res=$ac_cv_search_shm_unlink
11427 if test "$ac_res" != no; then :
11428   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11429
11430 fi
11431
11432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11433 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11434 if ${ac_cv_search_clock_gettime+:} false; then :
11435   $as_echo_n "(cached) " >&6
11436 else
11437   ac_func_search_save_LIBS=$LIBS
11438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11439 /* end confdefs.h.  */
11440
11441 /* Override any GCC internal prototype to avoid an error.
11442    Use char because int might match the return type of a GCC
11443    builtin and then its argument prototype would still apply.  */
11444 #ifdef __cplusplus
11445 extern "C"
11446 #endif
11447 char clock_gettime ();
11448 int
11449 main ()
11450 {
11451 return clock_gettime ();
11452   ;
11453   return 0;
11454 }
11455 _ACEOF
11456 for ac_lib in '' rt posix4; do
11457   if test -z "$ac_lib"; then
11458     ac_res="none required"
11459   else
11460     ac_res=-l$ac_lib
11461     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11462   fi
11463   if ac_fn_c_try_link "$LINENO"; then :
11464   ac_cv_search_clock_gettime=$ac_res
11465 fi
11466 rm -f core conftest.err conftest.$ac_objext \
11467     conftest$ac_exeext
11468   if ${ac_cv_search_clock_gettime+:} false; then :
11469   break
11470 fi
11471 done
11472 if ${ac_cv_search_clock_gettime+:} false; then :
11473
11474 else
11475   ac_cv_search_clock_gettime=no
11476 fi
11477 rm conftest.$ac_ext
11478 LIBS=$ac_func_search_save_LIBS
11479 fi
11480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11481 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11482 ac_res=$ac_cv_search_clock_gettime
11483 if test "$ac_res" != no; then :
11484   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11485
11486 fi
11487
11488 # Solaris:
11489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11490 $as_echo_n "checking for library containing fdatasync... " >&6; }
11491 if ${ac_cv_search_fdatasync+:} false; then :
11492   $as_echo_n "(cached) " >&6
11493 else
11494   ac_func_search_save_LIBS=$LIBS
11495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11496 /* end confdefs.h.  */
11497
11498 /* Override any GCC internal prototype to avoid an error.
11499    Use char because int might match the return type of a GCC
11500    builtin and then its argument prototype would still apply.  */
11501 #ifdef __cplusplus
11502 extern "C"
11503 #endif
11504 char fdatasync ();
11505 int
11506 main ()
11507 {
11508 return fdatasync ();
11509   ;
11510   return 0;
11511 }
11512 _ACEOF
11513 for ac_lib in '' rt posix4; do
11514   if test -z "$ac_lib"; then
11515     ac_res="none required"
11516   else
11517     ac_res=-l$ac_lib
11518     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11519   fi
11520   if ac_fn_c_try_link "$LINENO"; then :
11521   ac_cv_search_fdatasync=$ac_res
11522 fi
11523 rm -f core conftest.err conftest.$ac_objext \
11524     conftest$ac_exeext
11525   if ${ac_cv_search_fdatasync+:} false; then :
11526   break
11527 fi
11528 done
11529 if ${ac_cv_search_fdatasync+:} false; then :
11530
11531 else
11532   ac_cv_search_fdatasync=no
11533 fi
11534 rm conftest.$ac_ext
11535 LIBS=$ac_func_search_save_LIBS
11536 fi
11537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11538 $as_echo "$ac_cv_search_fdatasync" >&6; }
11539 ac_res=$ac_cv_search_fdatasync
11540 if test "$ac_res" != no; then :
11541   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11542
11543 fi
11544
11545 # Required for thread_test.c on Solaris
11546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11547 $as_echo_n "checking for library containing sched_yield... " >&6; }
11548 if ${ac_cv_search_sched_yield+:} false; then :
11549   $as_echo_n "(cached) " >&6
11550 else
11551   ac_func_search_save_LIBS=$LIBS
11552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11553 /* end confdefs.h.  */
11554
11555 /* Override any GCC internal prototype to avoid an error.
11556    Use char because int might match the return type of a GCC
11557    builtin and then its argument prototype would still apply.  */
11558 #ifdef __cplusplus
11559 extern "C"
11560 #endif
11561 char sched_yield ();
11562 int
11563 main ()
11564 {
11565 return sched_yield ();
11566   ;
11567   return 0;
11568 }
11569 _ACEOF
11570 for ac_lib in '' rt; do
11571   if test -z "$ac_lib"; then
11572     ac_res="none required"
11573   else
11574     ac_res=-l$ac_lib
11575     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11576   fi
11577   if ac_fn_c_try_link "$LINENO"; then :
11578   ac_cv_search_sched_yield=$ac_res
11579 fi
11580 rm -f core conftest.err conftest.$ac_objext \
11581     conftest$ac_exeext
11582   if ${ac_cv_search_sched_yield+:} false; then :
11583   break
11584 fi
11585 done
11586 if ${ac_cv_search_sched_yield+:} false; then :
11587
11588 else
11589   ac_cv_search_sched_yield=no
11590 fi
11591 rm conftest.$ac_ext
11592 LIBS=$ac_func_search_save_LIBS
11593 fi
11594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11595 $as_echo "$ac_cv_search_sched_yield" >&6; }
11596 ac_res=$ac_cv_search_sched_yield
11597 if test "$ac_res" != no; then :
11598   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11599
11600 fi
11601
11602 # Required for thread_test.c on Solaris 2.5:
11603 # Other ports use it too (HP-UX) so test unconditionally
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11605 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11606 if ${ac_cv_search_gethostbyname_r+:} false; then :
11607   $as_echo_n "(cached) " >&6
11608 else
11609   ac_func_search_save_LIBS=$LIBS
11610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11611 /* end confdefs.h.  */
11612
11613 /* Override any GCC internal prototype to avoid an error.
11614    Use char because int might match the return type of a GCC
11615    builtin and then its argument prototype would still apply.  */
11616 #ifdef __cplusplus
11617 extern "C"
11618 #endif
11619 char gethostbyname_r ();
11620 int
11621 main ()
11622 {
11623 return gethostbyname_r ();
11624   ;
11625   return 0;
11626 }
11627 _ACEOF
11628 for ac_lib in '' nsl; do
11629   if test -z "$ac_lib"; then
11630     ac_res="none required"
11631   else
11632     ac_res=-l$ac_lib
11633     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11634   fi
11635   if ac_fn_c_try_link "$LINENO"; then :
11636   ac_cv_search_gethostbyname_r=$ac_res
11637 fi
11638 rm -f core conftest.err conftest.$ac_objext \
11639     conftest$ac_exeext
11640   if ${ac_cv_search_gethostbyname_r+:} false; then :
11641   break
11642 fi
11643 done
11644 if ${ac_cv_search_gethostbyname_r+:} false; then :
11645
11646 else
11647   ac_cv_search_gethostbyname_r=no
11648 fi
11649 rm conftest.$ac_ext
11650 LIBS=$ac_func_search_save_LIBS
11651 fi
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11653 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11654 ac_res=$ac_cv_search_gethostbyname_r
11655 if test "$ac_res" != no; then :
11656   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11657
11658 fi
11659
11660 # Cygwin:
11661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11662 $as_echo_n "checking for library containing shmget... " >&6; }
11663 if ${ac_cv_search_shmget+:} false; then :
11664   $as_echo_n "(cached) " >&6
11665 else
11666   ac_func_search_save_LIBS=$LIBS
11667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11668 /* end confdefs.h.  */
11669
11670 /* Override any GCC internal prototype to avoid an error.
11671    Use char because int might match the return type of a GCC
11672    builtin and then its argument prototype would still apply.  */
11673 #ifdef __cplusplus
11674 extern "C"
11675 #endif
11676 char shmget ();
11677 int
11678 main ()
11679 {
11680 return shmget ();
11681   ;
11682   return 0;
11683 }
11684 _ACEOF
11685 for ac_lib in '' cygipc; do
11686   if test -z "$ac_lib"; then
11687     ac_res="none required"
11688   else
11689     ac_res=-l$ac_lib
11690     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11691   fi
11692   if ac_fn_c_try_link "$LINENO"; then :
11693   ac_cv_search_shmget=$ac_res
11694 fi
11695 rm -f core conftest.err conftest.$ac_objext \
11696     conftest$ac_exeext
11697   if ${ac_cv_search_shmget+:} false; then :
11698   break
11699 fi
11700 done
11701 if ${ac_cv_search_shmget+:} false; then :
11702
11703 else
11704   ac_cv_search_shmget=no
11705 fi
11706 rm conftest.$ac_ext
11707 LIBS=$ac_func_search_save_LIBS
11708 fi
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11710 $as_echo "$ac_cv_search_shmget" >&6; }
11711 ac_res=$ac_cv_search_shmget
11712 if test "$ac_res" != no; then :
11713   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11714
11715 fi
11716
11717
11718 if test "$with_readline" = yes; then
11719
11720
11721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11722 $as_echo_n "checking for library containing readline... " >&6; }
11723 if ${pgac_cv_check_readline+:} false; then :
11724   $as_echo_n "(cached) " >&6
11725 else
11726   pgac_cv_check_readline=no
11727 pgac_save_LIBS=$LIBS
11728 if test x"$with_libedit_preferred" != x"yes"
11729 then    READLINE_ORDER="-lreadline -ledit"
11730 else    READLINE_ORDER="-ledit -lreadline"
11731 fi
11732 for pgac_rllib in $READLINE_ORDER ; do
11733   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11734     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11735     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11736 /* end confdefs.h.  */
11737
11738 /* Override any GCC internal prototype to avoid an error.
11739    Use char because int might match the return type of a GCC
11740    builtin and then its argument prototype would still apply.  */
11741 #ifdef __cplusplus
11742 extern "C"
11743 #endif
11744 char readline ();
11745 int
11746 main ()
11747 {
11748 return readline ();
11749   ;
11750   return 0;
11751 }
11752 _ACEOF
11753 if ac_fn_c_try_link "$LINENO"; then :
11754
11755       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11756       # recognize dependent libraries; assume curses is needed if we didn't
11757       # find any dependency.
11758       case $host_os in
11759         netbsd* | openbsd* | irix*)
11760           if test x"$pgac_lib" = x"" ; then
11761             pgac_lib=" -lcurses"
11762           fi ;;
11763       esac
11764
11765       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11766       break
11767
11768 fi
11769 rm -f core conftest.err conftest.$ac_objext \
11770     conftest$ac_exeext conftest.$ac_ext
11771   done
11772   if test "$pgac_cv_check_readline" != no ; then
11773     break
11774   fi
11775 done
11776 LIBS=$pgac_save_LIBS
11777
11778 fi
11779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11780 $as_echo "$pgac_cv_check_readline" >&6; }
11781 if test "$pgac_cv_check_readline" != no ; then
11782   LIBS="$pgac_cv_check_readline $LIBS"
11783
11784 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11785
11786 fi
11787
11788
11789   if test x"$pgac_cv_check_readline" = x"no"; then
11790     as_fn_error $? "readline library not found
11791 If you have readline already installed, see config.log for details on the
11792 failure.  It is possible the compiler isn't looking in the proper directory.
11793 Use --without-readline to disable readline support." "$LINENO" 5
11794   fi
11795 fi
11796
11797 if test "$with_zlib" = yes; then
11798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11799 $as_echo_n "checking for inflate in -lz... " >&6; }
11800 if ${ac_cv_lib_z_inflate+:} false; then :
11801   $as_echo_n "(cached) " >&6
11802 else
11803   ac_check_lib_save_LIBS=$LIBS
11804 LIBS="-lz  $LIBS"
11805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11806 /* end confdefs.h.  */
11807
11808 /* Override any GCC internal prototype to avoid an error.
11809    Use char because int might match the return type of a GCC
11810    builtin and then its argument prototype would still apply.  */
11811 #ifdef __cplusplus
11812 extern "C"
11813 #endif
11814 char inflate ();
11815 int
11816 main ()
11817 {
11818 return inflate ();
11819   ;
11820   return 0;
11821 }
11822 _ACEOF
11823 if ac_fn_c_try_link "$LINENO"; then :
11824   ac_cv_lib_z_inflate=yes
11825 else
11826   ac_cv_lib_z_inflate=no
11827 fi
11828 rm -f core conftest.err conftest.$ac_objext \
11829     conftest$ac_exeext conftest.$ac_ext
11830 LIBS=$ac_check_lib_save_LIBS
11831 fi
11832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11833 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11834 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11835   cat >>confdefs.h <<_ACEOF
11836 #define HAVE_LIBZ 1
11837 _ACEOF
11838
11839   LIBS="-lz $LIBS"
11840
11841 else
11842   as_fn_error $? "zlib library not found
11843 If you have zlib already installed, see config.log for details on the
11844 failure.  It is possible the compiler isn't looking in the proper directory.
11845 Use --without-zlib to disable zlib support." "$LINENO" 5
11846 fi
11847
11848 fi
11849
11850 if test "$enable_spinlocks" = yes; then
11851
11852 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11853
11854 else
11855   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11856 *** Not using spinlocks will cause poor performance." >&5
11857 $as_echo "$as_me: WARNING:
11858 *** Not using spinlocks will cause poor performance." >&2;}
11859 fi
11860
11861 if test "$enable_atomics" = yes; then
11862
11863 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11864
11865 else
11866   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11867 *** Not using atomic operations will cause poor performance." >&5
11868 $as_echo "$as_me: WARNING:
11869 *** Not using atomic operations will cause poor performance." >&2;}
11870 fi
11871
11872 if test "$with_gssapi" = yes ; then
11873   if test "$PORTNAME" != "win32"; then
11874     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11875 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11876 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11877   $as_echo_n "(cached) " >&6
11878 else
11879   ac_func_search_save_LIBS=$LIBS
11880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11881 /* end confdefs.h.  */
11882
11883 /* Override any GCC internal prototype to avoid an error.
11884    Use char because int might match the return type of a GCC
11885    builtin and then its argument prototype would still apply.  */
11886 #ifdef __cplusplus
11887 extern "C"
11888 #endif
11889 char gss_init_sec_context ();
11890 int
11891 main ()
11892 {
11893 return gss_init_sec_context ();
11894   ;
11895   return 0;
11896 }
11897 _ACEOF
11898 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11899   if test -z "$ac_lib"; then
11900     ac_res="none required"
11901   else
11902     ac_res=-l$ac_lib
11903     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11904   fi
11905   if ac_fn_c_try_link "$LINENO"; then :
11906   ac_cv_search_gss_init_sec_context=$ac_res
11907 fi
11908 rm -f core conftest.err conftest.$ac_objext \
11909     conftest$ac_exeext
11910   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11911   break
11912 fi
11913 done
11914 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11915
11916 else
11917   ac_cv_search_gss_init_sec_context=no
11918 fi
11919 rm conftest.$ac_ext
11920 LIBS=$ac_func_search_save_LIBS
11921 fi
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11923 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11924 ac_res=$ac_cv_search_gss_init_sec_context
11925 if test "$ac_res" != no; then :
11926   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11927
11928 else
11929   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11930 fi
11931
11932   else
11933     LIBS="$LIBS -lgssapi32"
11934   fi
11935 fi
11936
11937 if test "$with_openssl" = yes ; then
11938     if test "$PORTNAME" != "win32"; then
11939      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11940 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11941 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11942   $as_echo_n "(cached) " >&6
11943 else
11944   ac_check_lib_save_LIBS=$LIBS
11945 LIBS="-lcrypto  $LIBS"
11946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11947 /* end confdefs.h.  */
11948
11949 /* Override any GCC internal prototype to avoid an error.
11950    Use char because int might match the return type of a GCC
11951    builtin and then its argument prototype would still apply.  */
11952 #ifdef __cplusplus
11953 extern "C"
11954 #endif
11955 char CRYPTO_new_ex_data ();
11956 int
11957 main ()
11958 {
11959 return CRYPTO_new_ex_data ();
11960   ;
11961   return 0;
11962 }
11963 _ACEOF
11964 if ac_fn_c_try_link "$LINENO"; then :
11965   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11966 else
11967   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11968 fi
11969 rm -f core conftest.err conftest.$ac_objext \
11970     conftest$ac_exeext conftest.$ac_ext
11971 LIBS=$ac_check_lib_save_LIBS
11972 fi
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11974 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11975 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11976   cat >>confdefs.h <<_ACEOF
11977 #define HAVE_LIBCRYPTO 1
11978 _ACEOF
11979
11980   LIBS="-lcrypto $LIBS"
11981
11982 else
11983   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11984 fi
11985
11986      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11987 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11988 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11989   $as_echo_n "(cached) " >&6
11990 else
11991   ac_check_lib_save_LIBS=$LIBS
11992 LIBS="-lssl  $LIBS"
11993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11994 /* end confdefs.h.  */
11995
11996 /* Override any GCC internal prototype to avoid an error.
11997    Use char because int might match the return type of a GCC
11998    builtin and then its argument prototype would still apply.  */
11999 #ifdef __cplusplus
12000 extern "C"
12001 #endif
12002 char SSL_new ();
12003 int
12004 main ()
12005 {
12006 return SSL_new ();
12007   ;
12008   return 0;
12009 }
12010 _ACEOF
12011 if ac_fn_c_try_link "$LINENO"; then :
12012   ac_cv_lib_ssl_SSL_new=yes
12013 else
12014   ac_cv_lib_ssl_SSL_new=no
12015 fi
12016 rm -f core conftest.err conftest.$ac_objext \
12017     conftest$ac_exeext conftest.$ac_ext
12018 LIBS=$ac_check_lib_save_LIBS
12019 fi
12020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12021 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12022 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12023   cat >>confdefs.h <<_ACEOF
12024 #define HAVE_LIBSSL 1
12025 _ACEOF
12026
12027   LIBS="-lssl $LIBS"
12028
12029 else
12030   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12031 fi
12032
12033   else
12034      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12035 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12036 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12037   $as_echo_n "(cached) " >&6
12038 else
12039   ac_func_search_save_LIBS=$LIBS
12040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12041 /* end confdefs.h.  */
12042
12043 /* Override any GCC internal prototype to avoid an error.
12044    Use char because int might match the return type of a GCC
12045    builtin and then its argument prototype would still apply.  */
12046 #ifdef __cplusplus
12047 extern "C"
12048 #endif
12049 char CRYPTO_new_ex_data ();
12050 int
12051 main ()
12052 {
12053 return CRYPTO_new_ex_data ();
12054   ;
12055   return 0;
12056 }
12057 _ACEOF
12058 for ac_lib in '' eay32 crypto; do
12059   if test -z "$ac_lib"; then
12060     ac_res="none required"
12061   else
12062     ac_res=-l$ac_lib
12063     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12064   fi
12065   if ac_fn_c_try_link "$LINENO"; then :
12066   ac_cv_search_CRYPTO_new_ex_data=$ac_res
12067 fi
12068 rm -f core conftest.err conftest.$ac_objext \
12069     conftest$ac_exeext
12070   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12071   break
12072 fi
12073 done
12074 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12075
12076 else
12077   ac_cv_search_CRYPTO_new_ex_data=no
12078 fi
12079 rm conftest.$ac_ext
12080 LIBS=$ac_func_search_save_LIBS
12081 fi
12082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12083 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12084 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12085 if test "$ac_res" != no; then :
12086   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12087
12088 else
12089   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12090 fi
12091
12092      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12093 $as_echo_n "checking for library containing SSL_new... " >&6; }
12094 if ${ac_cv_search_SSL_new+:} false; then :
12095   $as_echo_n "(cached) " >&6
12096 else
12097   ac_func_search_save_LIBS=$LIBS
12098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12099 /* end confdefs.h.  */
12100
12101 /* Override any GCC internal prototype to avoid an error.
12102    Use char because int might match the return type of a GCC
12103    builtin and then its argument prototype would still apply.  */
12104 #ifdef __cplusplus
12105 extern "C"
12106 #endif
12107 char SSL_new ();
12108 int
12109 main ()
12110 {
12111 return SSL_new ();
12112   ;
12113   return 0;
12114 }
12115 _ACEOF
12116 for ac_lib in '' ssleay32 ssl; do
12117   if test -z "$ac_lib"; then
12118     ac_res="none required"
12119   else
12120     ac_res=-l$ac_lib
12121     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12122   fi
12123   if ac_fn_c_try_link "$LINENO"; then :
12124   ac_cv_search_SSL_new=$ac_res
12125 fi
12126 rm -f core conftest.err conftest.$ac_objext \
12127     conftest$ac_exeext
12128   if ${ac_cv_search_SSL_new+:} false; then :
12129   break
12130 fi
12131 done
12132 if ${ac_cv_search_SSL_new+:} false; then :
12133
12134 else
12135   ac_cv_search_SSL_new=no
12136 fi
12137 rm conftest.$ac_ext
12138 LIBS=$ac_func_search_save_LIBS
12139 fi
12140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12141 $as_echo "$ac_cv_search_SSL_new" >&6; }
12142 ac_res=$ac_cv_search_SSL_new
12143 if test "$ac_res" != no; then :
12144   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12145
12146 else
12147   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12148 fi
12149
12150   fi
12151   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
12152 do :
12153   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12154 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12155 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12156   cat >>confdefs.h <<_ACEOF
12157 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12158 _ACEOF
12159
12160 fi
12161 done
12162
12163   # Functions introduced in OpenSSL 1.1.0. We used to check for
12164   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12165   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12166   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12167   # functions.
12168   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
12169 do :
12170   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12171 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12172 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12173   cat >>confdefs.h <<_ACEOF
12174 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12175 _ACEOF
12176
12177 fi
12178 done
12179
12180   # OpenSSL versions before 1.1.0 required setting callback functions, for
12181   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12182   # function was removed.
12183   for ac_func in CRYPTO_lock
12184 do :
12185   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12186 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12187   cat >>confdefs.h <<_ACEOF
12188 #define HAVE_CRYPTO_LOCK 1
12189 _ACEOF
12190
12191 fi
12192 done
12193
12194 fi
12195
12196 if test "$with_pam" = yes ; then
12197   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12198 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12199 if ${ac_cv_lib_pam_pam_start+:} false; then :
12200   $as_echo_n "(cached) " >&6
12201 else
12202   ac_check_lib_save_LIBS=$LIBS
12203 LIBS="-lpam  $LIBS"
12204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12205 /* end confdefs.h.  */
12206
12207 /* Override any GCC internal prototype to avoid an error.
12208    Use char because int might match the return type of a GCC
12209    builtin and then its argument prototype would still apply.  */
12210 #ifdef __cplusplus
12211 extern "C"
12212 #endif
12213 char pam_start ();
12214 int
12215 main ()
12216 {
12217 return pam_start ();
12218   ;
12219   return 0;
12220 }
12221 _ACEOF
12222 if ac_fn_c_try_link "$LINENO"; then :
12223   ac_cv_lib_pam_pam_start=yes
12224 else
12225   ac_cv_lib_pam_pam_start=no
12226 fi
12227 rm -f core conftest.err conftest.$ac_objext \
12228     conftest$ac_exeext conftest.$ac_ext
12229 LIBS=$ac_check_lib_save_LIBS
12230 fi
12231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12232 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12233 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12234   cat >>confdefs.h <<_ACEOF
12235 #define HAVE_LIBPAM 1
12236 _ACEOF
12237
12238   LIBS="-lpam $LIBS"
12239
12240 else
12241   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12242 fi
12243
12244 fi
12245
12246 if test "$with_libxml" = yes ; then
12247   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12248 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12249 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12250   $as_echo_n "(cached) " >&6
12251 else
12252   ac_check_lib_save_LIBS=$LIBS
12253 LIBS="-lxml2  $LIBS"
12254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12255 /* end confdefs.h.  */
12256
12257 /* Override any GCC internal prototype to avoid an error.
12258    Use char because int might match the return type of a GCC
12259    builtin and then its argument prototype would still apply.  */
12260 #ifdef __cplusplus
12261 extern "C"
12262 #endif
12263 char xmlSaveToBuffer ();
12264 int
12265 main ()
12266 {
12267 return xmlSaveToBuffer ();
12268   ;
12269   return 0;
12270 }
12271 _ACEOF
12272 if ac_fn_c_try_link "$LINENO"; then :
12273   ac_cv_lib_xml2_xmlSaveToBuffer=yes
12274 else
12275   ac_cv_lib_xml2_xmlSaveToBuffer=no
12276 fi
12277 rm -f core conftest.err conftest.$ac_objext \
12278     conftest$ac_exeext conftest.$ac_ext
12279 LIBS=$ac_check_lib_save_LIBS
12280 fi
12281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12282 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12283 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12284   cat >>confdefs.h <<_ACEOF
12285 #define HAVE_LIBXML2 1
12286 _ACEOF
12287
12288   LIBS="-lxml2 $LIBS"
12289
12290 else
12291   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12292 fi
12293
12294 fi
12295
12296 if test "$with_libxslt" = yes ; then
12297   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12298 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12299 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12300   $as_echo_n "(cached) " >&6
12301 else
12302   ac_check_lib_save_LIBS=$LIBS
12303 LIBS="-lxslt  $LIBS"
12304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12305 /* end confdefs.h.  */
12306
12307 /* Override any GCC internal prototype to avoid an error.
12308    Use char because int might match the return type of a GCC
12309    builtin and then its argument prototype would still apply.  */
12310 #ifdef __cplusplus
12311 extern "C"
12312 #endif
12313 char xsltCleanupGlobals ();
12314 int
12315 main ()
12316 {
12317 return xsltCleanupGlobals ();
12318   ;
12319   return 0;
12320 }
12321 _ACEOF
12322 if ac_fn_c_try_link "$LINENO"; then :
12323   ac_cv_lib_xslt_xsltCleanupGlobals=yes
12324 else
12325   ac_cv_lib_xslt_xsltCleanupGlobals=no
12326 fi
12327 rm -f core conftest.err conftest.$ac_objext \
12328     conftest$ac_exeext conftest.$ac_ext
12329 LIBS=$ac_check_lib_save_LIBS
12330 fi
12331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12332 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12333 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12334   cat >>confdefs.h <<_ACEOF
12335 #define HAVE_LIBXSLT 1
12336 _ACEOF
12337
12338   LIBS="-lxslt $LIBS"
12339
12340 else
12341   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12342 fi
12343
12344 fi
12345
12346 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12347 if test "$with_ldap" = yes ; then
12348   _LIBS="$LIBS"
12349   if test "$PORTNAME" != "win32"; then
12350     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12351 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12352 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12353   $as_echo_n "(cached) " >&6
12354 else
12355   ac_check_lib_save_LIBS=$LIBS
12356 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12358 /* end confdefs.h.  */
12359
12360 /* Override any GCC internal prototype to avoid an error.
12361    Use char because int might match the return type of a GCC
12362    builtin and then its argument prototype would still apply.  */
12363 #ifdef __cplusplus
12364 extern "C"
12365 #endif
12366 char ldap_bind ();
12367 int
12368 main ()
12369 {
12370 return ldap_bind ();
12371   ;
12372   return 0;
12373 }
12374 _ACEOF
12375 if ac_fn_c_try_link "$LINENO"; then :
12376   ac_cv_lib_ldap_ldap_bind=yes
12377 else
12378   ac_cv_lib_ldap_ldap_bind=no
12379 fi
12380 rm -f core conftest.err conftest.$ac_objext \
12381     conftest$ac_exeext conftest.$ac_ext
12382 LIBS=$ac_check_lib_save_LIBS
12383 fi
12384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12385 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12386 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12387   cat >>confdefs.h <<_ACEOF
12388 #define HAVE_LIBLDAP 1
12389 _ACEOF
12390
12391   LIBS="-lldap $LIBS"
12392
12393 else
12394   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12395 fi
12396
12397     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12398     if test "$enable_thread_safety" = yes; then
12399       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12400       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12401 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12402 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12403   $as_echo_n "(cached) " >&6
12404 else
12405   ac_check_lib_save_LIBS=$LIBS
12406 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12408 /* end confdefs.h.  */
12409
12410 /* Override any GCC internal prototype to avoid an error.
12411    Use char because int might match the return type of a GCC
12412    builtin and then its argument prototype would still apply.  */
12413 #ifdef __cplusplus
12414 extern "C"
12415 #endif
12416 char ldap_simple_bind ();
12417 int
12418 main ()
12419 {
12420 return ldap_simple_bind ();
12421   ;
12422   return 0;
12423 }
12424 _ACEOF
12425 if ac_fn_c_try_link "$LINENO"; then :
12426   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12427 else
12428   ac_cv_lib_ldap_r_ldap_simple_bind=no
12429 fi
12430 rm -f core conftest.err conftest.$ac_objext \
12431     conftest$ac_exeext conftest.$ac_ext
12432 LIBS=$ac_check_lib_save_LIBS
12433 fi
12434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12435 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12436 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12437   cat >>confdefs.h <<_ACEOF
12438 #define HAVE_LIBLDAP_R 1
12439 _ACEOF
12440
12441   LIBS="-lldap_r $LIBS"
12442
12443 else
12444   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12445 fi
12446
12447       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12448     else
12449       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12450     fi
12451     for ac_func in ldap_initialize
12452 do :
12453   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12454 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12455   cat >>confdefs.h <<_ACEOF
12456 #define HAVE_LDAP_INITIALIZE 1
12457 _ACEOF
12458
12459 fi
12460 done
12461
12462   else
12463     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12464 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12465 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12466   $as_echo_n "(cached) " >&6
12467 else
12468   ac_check_lib_save_LIBS=$LIBS
12469 LIBS="-lwldap32  $LIBS"
12470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12471 /* end confdefs.h.  */
12472
12473 /* Override any GCC internal prototype to avoid an error.
12474    Use char because int might match the return type of a GCC
12475    builtin and then its argument prototype would still apply.  */
12476 #ifdef __cplusplus
12477 extern "C"
12478 #endif
12479 char ldap_bind ();
12480 int
12481 main ()
12482 {
12483 return ldap_bind ();
12484   ;
12485   return 0;
12486 }
12487 _ACEOF
12488 if ac_fn_c_try_link "$LINENO"; then :
12489   ac_cv_lib_wldap32_ldap_bind=yes
12490 else
12491   ac_cv_lib_wldap32_ldap_bind=no
12492 fi
12493 rm -f core conftest.err conftest.$ac_objext \
12494     conftest$ac_exeext conftest.$ac_ext
12495 LIBS=$ac_check_lib_save_LIBS
12496 fi
12497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12498 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12499 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12500   cat >>confdefs.h <<_ACEOF
12501 #define HAVE_LIBWLDAP32 1
12502 _ACEOF
12503
12504   LIBS="-lwldap32 $LIBS"
12505
12506 else
12507   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12508 fi
12509
12510     LDAP_LIBS_FE="-lwldap32"
12511     LDAP_LIBS_BE="-lwldap32"
12512   fi
12513   LIBS="$_LIBS"
12514 fi
12515
12516
12517
12518 # for contrib/sepgsql
12519 if test "$with_selinux" = yes; then
12520   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12521 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12522 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12523   $as_echo_n "(cached) " >&6
12524 else
12525   ac_check_lib_save_LIBS=$LIBS
12526 LIBS="-lselinux  $LIBS"
12527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12528 /* end confdefs.h.  */
12529
12530 /* Override any GCC internal prototype to avoid an error.
12531    Use char because int might match the return type of a GCC
12532    builtin and then its argument prototype would still apply.  */
12533 #ifdef __cplusplus
12534 extern "C"
12535 #endif
12536 char security_compute_create_name ();
12537 int
12538 main ()
12539 {
12540 return security_compute_create_name ();
12541   ;
12542   return 0;
12543 }
12544 _ACEOF
12545 if ac_fn_c_try_link "$LINENO"; then :
12546   ac_cv_lib_selinux_security_compute_create_name=yes
12547 else
12548   ac_cv_lib_selinux_security_compute_create_name=no
12549 fi
12550 rm -f core conftest.err conftest.$ac_objext \
12551     conftest$ac_exeext conftest.$ac_ext
12552 LIBS=$ac_check_lib_save_LIBS
12553 fi
12554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12555 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12556 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12557   cat >>confdefs.h <<_ACEOF
12558 #define HAVE_LIBSELINUX 1
12559 _ACEOF
12560
12561   LIBS="-lselinux $LIBS"
12562
12563 else
12564   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12565 fi
12566
12567 fi
12568
12569 # for contrib/uuid-ossp
12570 if test "$with_uuid" = bsd ; then
12571   # On BSD, the UUID functions are in libc
12572   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12573 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12574   UUID_LIBS=""
12575 else
12576   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12577 fi
12578
12579 elif test "$with_uuid" = e2fs ; then
12580   # On macOS, the UUID functions are in libc
12581   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12582 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12583   UUID_LIBS=""
12584 else
12585   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12586 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12587 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12588   $as_echo_n "(cached) " >&6
12589 else
12590   ac_check_lib_save_LIBS=$LIBS
12591 LIBS="-luuid  $LIBS"
12592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12593 /* end confdefs.h.  */
12594
12595 /* Override any GCC internal prototype to avoid an error.
12596    Use char because int might match the return type of a GCC
12597    builtin and then its argument prototype would still apply.  */
12598 #ifdef __cplusplus
12599 extern "C"
12600 #endif
12601 char uuid_generate ();
12602 int
12603 main ()
12604 {
12605 return uuid_generate ();
12606   ;
12607   return 0;
12608 }
12609 _ACEOF
12610 if ac_fn_c_try_link "$LINENO"; then :
12611   ac_cv_lib_uuid_uuid_generate=yes
12612 else
12613   ac_cv_lib_uuid_uuid_generate=no
12614 fi
12615 rm -f core conftest.err conftest.$ac_objext \
12616     conftest$ac_exeext conftest.$ac_ext
12617 LIBS=$ac_check_lib_save_LIBS
12618 fi
12619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12620 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12621 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12622   UUID_LIBS="-luuid"
12623 else
12624   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12625 fi
12626
12627 fi
12628
12629 elif test "$with_uuid" = ossp ; then
12630   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12631 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12632 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12633   $as_echo_n "(cached) " >&6
12634 else
12635   ac_check_lib_save_LIBS=$LIBS
12636 LIBS="-lossp-uuid  $LIBS"
12637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12638 /* end confdefs.h.  */
12639
12640 /* Override any GCC internal prototype to avoid an error.
12641    Use char because int might match the return type of a GCC
12642    builtin and then its argument prototype would still apply.  */
12643 #ifdef __cplusplus
12644 extern "C"
12645 #endif
12646 char uuid_export ();
12647 int
12648 main ()
12649 {
12650 return uuid_export ();
12651   ;
12652   return 0;
12653 }
12654 _ACEOF
12655 if ac_fn_c_try_link "$LINENO"; then :
12656   ac_cv_lib_ossp_uuid_uuid_export=yes
12657 else
12658   ac_cv_lib_ossp_uuid_uuid_export=no
12659 fi
12660 rm -f core conftest.err conftest.$ac_objext \
12661     conftest$ac_exeext conftest.$ac_ext
12662 LIBS=$ac_check_lib_save_LIBS
12663 fi
12664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12665 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12666 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12667   UUID_LIBS="-lossp-uuid"
12668 else
12669   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12670 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12671 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12672   $as_echo_n "(cached) " >&6
12673 else
12674   ac_check_lib_save_LIBS=$LIBS
12675 LIBS="-luuid  $LIBS"
12676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12677 /* end confdefs.h.  */
12678
12679 /* Override any GCC internal prototype to avoid an error.
12680    Use char because int might match the return type of a GCC
12681    builtin and then its argument prototype would still apply.  */
12682 #ifdef __cplusplus
12683 extern "C"
12684 #endif
12685 char uuid_export ();
12686 int
12687 main ()
12688 {
12689 return uuid_export ();
12690   ;
12691   return 0;
12692 }
12693 _ACEOF
12694 if ac_fn_c_try_link "$LINENO"; then :
12695   ac_cv_lib_uuid_uuid_export=yes
12696 else
12697   ac_cv_lib_uuid_uuid_export=no
12698 fi
12699 rm -f core conftest.err conftest.$ac_objext \
12700     conftest$ac_exeext conftest.$ac_ext
12701 LIBS=$ac_check_lib_save_LIBS
12702 fi
12703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12704 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12705 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12706   UUID_LIBS="-luuid"
12707 else
12708   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12709 fi
12710
12711 fi
12712
12713 fi
12714
12715
12716
12717 ##
12718 ## Header files
12719 ##
12720
12721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12722 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12723 if ${ac_cv_header_stdbool_h+:} false; then :
12724   $as_echo_n "(cached) " >&6
12725 else
12726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12727 /* end confdefs.h.  */
12728
12729              #include <stdbool.h>
12730              #ifndef bool
12731               "error: bool is not defined"
12732              #endif
12733              #ifndef false
12734               "error: false is not defined"
12735              #endif
12736              #if false
12737               "error: false is not 0"
12738              #endif
12739              #ifndef true
12740               "error: true is not defined"
12741              #endif
12742              #if true != 1
12743               "error: true is not 1"
12744              #endif
12745              #ifndef __bool_true_false_are_defined
12746               "error: __bool_true_false_are_defined is not defined"
12747              #endif
12748
12749              struct s { _Bool s: 1; _Bool t; } s;
12750
12751              char a[true == 1 ? 1 : -1];
12752              char b[false == 0 ? 1 : -1];
12753              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12754              char d[(bool) 0.5 == true ? 1 : -1];
12755              /* See body of main program for 'e'.  */
12756              char f[(_Bool) 0.0 == false ? 1 : -1];
12757              char g[true];
12758              char h[sizeof (_Bool)];
12759              char i[sizeof s.t];
12760              enum { j = false, k = true, l = false * true, m = true * 256 };
12761              /* The following fails for
12762                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12763              _Bool n[m];
12764              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12765              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12766              /* Catch a bug in an HP-UX C compiler.  See
12767                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12768                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12769               */
12770              _Bool q = true;
12771              _Bool *pq = &q;
12772
12773 int
12774 main ()
12775 {
12776
12777              bool e = &s;
12778              *pq |= q;
12779              *pq |= ! q;
12780              /* Refer to every declared value, to avoid compiler optimizations.  */
12781              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12782                      + !m + !n + !o + !p + !q + !pq);
12783
12784   ;
12785   return 0;
12786 }
12787 _ACEOF
12788 if ac_fn_c_try_compile "$LINENO"; then :
12789   ac_cv_header_stdbool_h=yes
12790 else
12791   ac_cv_header_stdbool_h=no
12792 fi
12793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12794 fi
12795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12796 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12797    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12798 if test "x$ac_cv_type__Bool" = xyes; then :
12799
12800 cat >>confdefs.h <<_ACEOF
12801 #define HAVE__BOOL 1
12802 _ACEOF
12803
12804
12805 fi
12806
12807
12808 if test $ac_cv_header_stdbool_h = yes; then
12809
12810 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12811
12812 fi
12813
12814
12815 for ac_header in atomic.h copyfile.h crypt.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/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
12816 do :
12817   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12818 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12819 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12820   cat >>confdefs.h <<_ACEOF
12821 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12822 _ACEOF
12823
12824 fi
12825
12826 done
12827
12828
12829 # On BSD, test for net/if.h will fail unless sys/socket.h
12830 # is included first.
12831 for ac_header in net/if.h
12832 do :
12833   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12834 #include <sys/socket.h>
12835
12836 "
12837 if test "x$ac_cv_header_net_if_h" = xyes; then :
12838   cat >>confdefs.h <<_ACEOF
12839 #define HAVE_NET_IF_H 1
12840 _ACEOF
12841
12842 fi
12843
12844 done
12845
12846
12847 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12848 # is included first.
12849 for ac_header in sys/ucred.h
12850 do :
12851   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12852 #include <sys/param.h>
12853
12854 "
12855 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12856   cat >>confdefs.h <<_ACEOF
12857 #define HAVE_SYS_UCRED_H 1
12858 _ACEOF
12859
12860 fi
12861
12862 done
12863
12864
12865 # At least on IRIX, test for netinet/tcp.h will fail unless
12866 # netinet/in.h is included first.
12867 for ac_header in netinet/tcp.h
12868 do :
12869   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12870 #include <netinet/in.h>
12871
12872 "
12873 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12874   cat >>confdefs.h <<_ACEOF
12875 #define HAVE_NETINET_TCP_H 1
12876 _ACEOF
12877
12878 fi
12879
12880 done
12881
12882
12883 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12884   for ac_header in readline/readline.h
12885 do :
12886   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12887 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12888   cat >>confdefs.h <<_ACEOF
12889 #define HAVE_READLINE_READLINE_H 1
12890 _ACEOF
12891
12892 else
12893   for ac_header in readline.h
12894 do :
12895   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12896 if test "x$ac_cv_header_readline_h" = xyes; then :
12897   cat >>confdefs.h <<_ACEOF
12898 #define HAVE_READLINE_H 1
12899 _ACEOF
12900
12901 else
12902   as_fn_error $? "readline header not found
12903 If you have readline already installed, see config.log for details on the
12904 failure.  It is possible the compiler isn't looking in the proper directory.
12905 Use --without-readline to disable readline support." "$LINENO" 5
12906 fi
12907
12908 done
12909
12910 fi
12911
12912 done
12913
12914   for ac_header in readline/history.h
12915 do :
12916   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12917 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12918   cat >>confdefs.h <<_ACEOF
12919 #define HAVE_READLINE_HISTORY_H 1
12920 _ACEOF
12921
12922 else
12923   for ac_header in history.h
12924 do :
12925   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12926 if test "x$ac_cv_header_history_h" = xyes; then :
12927   cat >>confdefs.h <<_ACEOF
12928 #define HAVE_HISTORY_H 1
12929 _ACEOF
12930
12931 else
12932   as_fn_error $? "history header not found
12933 If you have readline already installed, see config.log for details on the
12934 failure.  It is possible the compiler isn't looking in the proper directory.
12935 Use --without-readline to disable readline support." "$LINENO" 5
12936 fi
12937
12938 done
12939
12940 fi
12941
12942 done
12943
12944 fi
12945
12946 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12947 # Some installations of libedit usurp /usr/include/readline/, which seems
12948 # bad practice, since in combined installations readline will have its headers
12949 # there.  We might have to resort to AC_EGREP checks to make sure we found
12950 # the proper header...
12951   for ac_header in editline/readline.h
12952 do :
12953   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12954 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12955   cat >>confdefs.h <<_ACEOF
12956 #define HAVE_EDITLINE_READLINE_H 1
12957 _ACEOF
12958
12959 else
12960   for ac_header in readline.h
12961 do :
12962   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12963 if test "x$ac_cv_header_readline_h" = xyes; then :
12964   cat >>confdefs.h <<_ACEOF
12965 #define HAVE_READLINE_H 1
12966 _ACEOF
12967
12968 else
12969   for ac_header in readline/readline.h
12970 do :
12971   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12972 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12973   cat >>confdefs.h <<_ACEOF
12974 #define HAVE_READLINE_READLINE_H 1
12975 _ACEOF
12976
12977 else
12978   as_fn_error $? "readline header not found
12979 If you have libedit already installed, see config.log for details on the
12980 failure.  It is possible the compiler isn't looking in the proper directory.
12981 Use --without-readline to disable libedit support." "$LINENO" 5
12982 fi
12983
12984 done
12985
12986 fi
12987
12988 done
12989
12990 fi
12991
12992 done
12993
12994 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12995 # not be there at all.  Hence, don't complain if not found.  We must check
12996 # though, since in yet other versions it is an independent header.
12997   for ac_header in editline/history.h
12998 do :
12999   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13000 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13001   cat >>confdefs.h <<_ACEOF
13002 #define HAVE_EDITLINE_HISTORY_H 1
13003 _ACEOF
13004
13005 else
13006   for ac_header in history.h
13007 do :
13008   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13009 if test "x$ac_cv_header_history_h" = xyes; then :
13010   cat >>confdefs.h <<_ACEOF
13011 #define HAVE_HISTORY_H 1
13012 _ACEOF
13013
13014 else
13015   for ac_header in readline/history.h
13016 do :
13017   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13018 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13019   cat >>confdefs.h <<_ACEOF
13020 #define HAVE_READLINE_HISTORY_H 1
13021 _ACEOF
13022
13023 fi
13024
13025 done
13026
13027 fi
13028
13029 done
13030
13031 fi
13032
13033 done
13034
13035 fi
13036
13037 if test "$with_zlib" = yes; then
13038   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13039 if test "x$ac_cv_header_zlib_h" = xyes; then :
13040
13041 else
13042   as_fn_error $? "zlib header not found
13043 If you have zlib already installed, see config.log for details on the
13044 failure.  It is possible the compiler isn't looking in the proper directory.
13045 Use --without-zlib to disable zlib support." "$LINENO" 5
13046 fi
13047
13048
13049 fi
13050
13051 if test "$with_gssapi" = yes ; then
13052   for ac_header in gssapi/gssapi.h
13053 do :
13054   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13055 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13056   cat >>confdefs.h <<_ACEOF
13057 #define HAVE_GSSAPI_GSSAPI_H 1
13058 _ACEOF
13059
13060 else
13061   for ac_header in gssapi.h
13062 do :
13063   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13064 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13065   cat >>confdefs.h <<_ACEOF
13066 #define HAVE_GSSAPI_H 1
13067 _ACEOF
13068
13069 else
13070   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13071 fi
13072
13073 done
13074
13075 fi
13076
13077 done
13078
13079 fi
13080
13081 if test "$with_openssl" = yes ; then
13082   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13083 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13084
13085 else
13086   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13087 fi
13088
13089
13090   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13091 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13092
13093 else
13094   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13095 fi
13096
13097
13098 fi
13099
13100 if test "$with_pam" = yes ; then
13101   for ac_header in security/pam_appl.h
13102 do :
13103   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13104 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13105   cat >>confdefs.h <<_ACEOF
13106 #define HAVE_SECURITY_PAM_APPL_H 1
13107 _ACEOF
13108
13109 else
13110   for ac_header in pam/pam_appl.h
13111 do :
13112   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13113 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13114   cat >>confdefs.h <<_ACEOF
13115 #define HAVE_PAM_PAM_APPL_H 1
13116 _ACEOF
13117
13118 else
13119   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13120 fi
13121
13122 done
13123
13124 fi
13125
13126 done
13127
13128 fi
13129
13130 if test "$with_bsd_auth" = yes ; then
13131   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13132 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13133
13134 else
13135   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13136 fi
13137
13138
13139 fi
13140
13141 if test "$with_systemd" = yes ; then
13142   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13143 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13144
13145 else
13146   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13147 fi
13148
13149
13150 fi
13151
13152 if test "$with_libxml" = yes ; then
13153   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13154 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13155
13156 else
13157   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13158 fi
13159
13160
13161 fi
13162
13163 if test "$with_libxslt" = yes ; then
13164   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13165 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13166
13167 else
13168   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13169 fi
13170
13171
13172 fi
13173
13174 if test "$with_ldap" = yes ; then
13175   if test "$PORTNAME" != "win32"; then
13176      for ac_header in ldap.h
13177 do :
13178   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13179 if test "x$ac_cv_header_ldap_h" = xyes; then :
13180   cat >>confdefs.h <<_ACEOF
13181 #define HAVE_LDAP_H 1
13182 _ACEOF
13183
13184 else
13185   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13186 fi
13187
13188 done
13189
13190      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13191 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13192 if ${pgac_cv_ldap_safe+:} false; then :
13193   $as_echo_n "(cached) " >&6
13194 else
13195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13196 /* end confdefs.h.  */
13197 #include <ldap.h>
13198 #if !defined(LDAP_VENDOR_VERSION) || \
13199      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13200       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13201 choke me
13202 #endif
13203 int
13204 main ()
13205 {
13206
13207   ;
13208   return 0;
13209 }
13210 _ACEOF
13211 if ac_fn_c_try_compile "$LINENO"; then :
13212   pgac_cv_ldap_safe=yes
13213 else
13214   pgac_cv_ldap_safe=no
13215 fi
13216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13217 fi
13218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13219 $as_echo "$pgac_cv_ldap_safe" >&6; }
13220
13221 if test "$pgac_cv_ldap_safe" != yes; then
13222   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13223 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13224 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13225 *** also uses LDAP will crash on exit." >&5
13226 $as_echo "$as_me: WARNING:
13227 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13228 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13229 *** also uses LDAP will crash on exit." >&2;}
13230 fi
13231   else
13232      for ac_header in winldap.h
13233 do :
13234   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13235 #include <windows.h>
13236
13237 "
13238 if test "x$ac_cv_header_winldap_h" = xyes; then :
13239   cat >>confdefs.h <<_ACEOF
13240 #define HAVE_WINLDAP_H 1
13241 _ACEOF
13242
13243 else
13244   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13245 fi
13246
13247 done
13248
13249   fi
13250 fi
13251
13252 if test "$with_bonjour" = yes ; then
13253   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13254 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13255
13256 else
13257   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13258 fi
13259
13260
13261 fi
13262
13263 # for contrib/uuid-ossp
13264 if test "$with_uuid" = bsd ; then
13265   for ac_header in uuid.h
13266 do :
13267   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13268 if test "x$ac_cv_header_uuid_h" = xyes; then :
13269   cat >>confdefs.h <<_ACEOF
13270 #define HAVE_UUID_H 1
13271 _ACEOF
13272  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13273 /* end confdefs.h.  */
13274 #include <uuid.h>
13275
13276 _ACEOF
13277 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13278   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13279
13280 else
13281   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13282 fi
13283 rm -f conftest*
13284
13285 else
13286   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13287 fi
13288
13289 done
13290
13291 elif test "$with_uuid" = e2fs ; then
13292   for ac_header in uuid/uuid.h
13293 do :
13294   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13295 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13296   cat >>confdefs.h <<_ACEOF
13297 #define HAVE_UUID_UUID_H 1
13298 _ACEOF
13299  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13300 /* end confdefs.h.  */
13301 #include <uuid/uuid.h>
13302
13303 _ACEOF
13304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13305   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13306
13307 else
13308   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13309 fi
13310 rm -f conftest*
13311
13312 else
13313   for ac_header in uuid.h
13314 do :
13315   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13316 if test "x$ac_cv_header_uuid_h" = xyes; then :
13317   cat >>confdefs.h <<_ACEOF
13318 #define HAVE_UUID_H 1
13319 _ACEOF
13320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13321 /* end confdefs.h.  */
13322 #include <uuid.h>
13323
13324 _ACEOF
13325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13326   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13327
13328 else
13329   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13330 fi
13331 rm -f conftest*
13332
13333 else
13334   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13335 fi
13336
13337 done
13338
13339 fi
13340
13341 done
13342
13343 elif test "$with_uuid" = ossp ; then
13344   for ac_header in ossp/uuid.h
13345 do :
13346   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13347 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13348   cat >>confdefs.h <<_ACEOF
13349 #define HAVE_OSSP_UUID_H 1
13350 _ACEOF
13351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13352 /* end confdefs.h.  */
13353 #include <ossp/uuid.h>
13354
13355 _ACEOF
13356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13357   $EGREP "uuid_export" >/dev/null 2>&1; then :
13358
13359 else
13360   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13361 fi
13362 rm -f conftest*
13363
13364 else
13365   for ac_header in uuid.h
13366 do :
13367   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13368 if test "x$ac_cv_header_uuid_h" = xyes; then :
13369   cat >>confdefs.h <<_ACEOF
13370 #define HAVE_UUID_H 1
13371 _ACEOF
13372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13373 /* end confdefs.h.  */
13374 #include <uuid.h>
13375
13376 _ACEOF
13377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13378   $EGREP "uuid_export" >/dev/null 2>&1; then :
13379
13380 else
13381   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13382 fi
13383 rm -f conftest*
13384
13385 else
13386   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13387 fi
13388
13389 done
13390
13391 fi
13392
13393 done
13394
13395 fi
13396
13397 if test "$PORTNAME" = "win32" ; then
13398    for ac_header in crtdefs.h
13399 do :
13400   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13401 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13402   cat >>confdefs.h <<_ACEOF
13403 #define HAVE_CRTDEFS_H 1
13404 _ACEOF
13405
13406 fi
13407
13408 done
13409
13410 fi
13411
13412 ##
13413 ## Types, structures, compiler characteristics
13414 ##
13415
13416   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13417 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13418 if ${ac_cv_c_bigendian+:} false; then :
13419   $as_echo_n "(cached) " >&6
13420 else
13421   ac_cv_c_bigendian=unknown
13422     # See if we're dealing with a universal compiler.
13423     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13424 /* end confdefs.h.  */
13425 #ifndef __APPLE_CC__
13426                not a universal capable compiler
13427              #endif
13428              typedef int dummy;
13429
13430 _ACEOF
13431 if ac_fn_c_try_compile "$LINENO"; then :
13432
13433         # Check for potential -arch flags.  It is not universal unless
13434         # there are at least two -arch flags with different values.
13435         ac_arch=
13436         ac_prev=
13437         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13438          if test -n "$ac_prev"; then
13439            case $ac_word in
13440              i?86 | x86_64 | ppc | ppc64)
13441                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13442                  ac_arch=$ac_word
13443                else
13444                  ac_cv_c_bigendian=universal
13445                  break
13446                fi
13447                ;;
13448            esac
13449            ac_prev=
13450          elif test "x$ac_word" = "x-arch"; then
13451            ac_prev=arch
13452          fi
13453        done
13454 fi
13455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13456     if test $ac_cv_c_bigendian = unknown; then
13457       # See if sys/param.h defines the BYTE_ORDER macro.
13458       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13459 /* end confdefs.h.  */
13460 #include <sys/types.h>
13461              #include <sys/param.h>
13462
13463 int
13464 main ()
13465 {
13466 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13467                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13468                      && LITTLE_ENDIAN)
13469               bogus endian macros
13470              #endif
13471
13472   ;
13473   return 0;
13474 }
13475 _ACEOF
13476 if ac_fn_c_try_compile "$LINENO"; then :
13477   # It does; now see whether it defined to BIG_ENDIAN or not.
13478          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13479 /* end confdefs.h.  */
13480 #include <sys/types.h>
13481                 #include <sys/param.h>
13482
13483 int
13484 main ()
13485 {
13486 #if BYTE_ORDER != BIG_ENDIAN
13487                  not big endian
13488                 #endif
13489
13490   ;
13491   return 0;
13492 }
13493 _ACEOF
13494 if ac_fn_c_try_compile "$LINENO"; then :
13495   ac_cv_c_bigendian=yes
13496 else
13497   ac_cv_c_bigendian=no
13498 fi
13499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13500 fi
13501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13502     fi
13503     if test $ac_cv_c_bigendian = unknown; then
13504       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13505       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13506 /* end confdefs.h.  */
13507 #include <limits.h>
13508
13509 int
13510 main ()
13511 {
13512 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13513               bogus endian macros
13514              #endif
13515
13516   ;
13517   return 0;
13518 }
13519 _ACEOF
13520 if ac_fn_c_try_compile "$LINENO"; then :
13521   # It does; now see whether it defined to _BIG_ENDIAN or not.
13522          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13523 /* end confdefs.h.  */
13524 #include <limits.h>
13525
13526 int
13527 main ()
13528 {
13529 #ifndef _BIG_ENDIAN
13530                  not big endian
13531                 #endif
13532
13533   ;
13534   return 0;
13535 }
13536 _ACEOF
13537 if ac_fn_c_try_compile "$LINENO"; then :
13538   ac_cv_c_bigendian=yes
13539 else
13540   ac_cv_c_bigendian=no
13541 fi
13542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13543 fi
13544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13545     fi
13546     if test $ac_cv_c_bigendian = unknown; then
13547       # Compile a test program.
13548       if test "$cross_compiling" = yes; then :
13549   # Try to guess by grepping values from an object file.
13550          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13551 /* end confdefs.h.  */
13552 short int ascii_mm[] =
13553                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13554                 short int ascii_ii[] =
13555                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13556                 int use_ascii (int i) {
13557                   return ascii_mm[i] + ascii_ii[i];
13558                 }
13559                 short int ebcdic_ii[] =
13560                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13561                 short int ebcdic_mm[] =
13562                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13563                 int use_ebcdic (int i) {
13564                   return ebcdic_mm[i] + ebcdic_ii[i];
13565                 }
13566                 extern int foo;
13567
13568 int
13569 main ()
13570 {
13571 return use_ascii (foo) == use_ebcdic (foo);
13572   ;
13573   return 0;
13574 }
13575 _ACEOF
13576 if ac_fn_c_try_compile "$LINENO"; then :
13577   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13578               ac_cv_c_bigendian=yes
13579             fi
13580             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13581               if test "$ac_cv_c_bigendian" = unknown; then
13582                 ac_cv_c_bigendian=no
13583               else
13584                 # finding both strings is unlikely to happen, but who knows?
13585                 ac_cv_c_bigendian=unknown
13586               fi
13587             fi
13588 fi
13589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13590 else
13591   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13592 /* end confdefs.h.  */
13593 $ac_includes_default
13594 int
13595 main ()
13596 {
13597
13598              /* Are we little or big endian?  From Harbison&Steele.  */
13599              union
13600              {
13601                long int l;
13602                char c[sizeof (long int)];
13603              } u;
13604              u.l = 1;
13605              return u.c[sizeof (long int) - 1] == 1;
13606
13607   ;
13608   return 0;
13609 }
13610 _ACEOF
13611 if ac_fn_c_try_run "$LINENO"; then :
13612   ac_cv_c_bigendian=no
13613 else
13614   ac_cv_c_bigendian=yes
13615 fi
13616 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13617   conftest.$ac_objext conftest.beam conftest.$ac_ext
13618 fi
13619
13620     fi
13621 fi
13622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13623 $as_echo "$ac_cv_c_bigendian" >&6; }
13624  case $ac_cv_c_bigendian in #(
13625    yes)
13626      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13627 ;; #(
13628    no)
13629       ;; #(
13630    universal)
13631
13632 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13633
13634      ;; #(
13635    *)
13636      as_fn_error $? "unknown endianness
13637  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13638  esac
13639
13640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13641 $as_echo_n "checking for inline... " >&6; }
13642 if ${ac_cv_c_inline+:} false; then :
13643   $as_echo_n "(cached) " >&6
13644 else
13645   ac_cv_c_inline=no
13646 for ac_kw in inline __inline__ __inline; do
13647   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13648 /* end confdefs.h.  */
13649 #ifndef __cplusplus
13650 typedef int foo_t;
13651 static $ac_kw foo_t static_foo () {return 0; }
13652 $ac_kw foo_t foo () {return 0; }
13653 #endif
13654
13655 _ACEOF
13656 if ac_fn_c_try_compile "$LINENO"; then :
13657   ac_cv_c_inline=$ac_kw
13658 fi
13659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13660   test "$ac_cv_c_inline" != no && break
13661 done
13662
13663 fi
13664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13665 $as_echo "$ac_cv_c_inline" >&6; }
13666
13667 case $ac_cv_c_inline in
13668   inline | yes) ;;
13669   *)
13670     case $ac_cv_c_inline in
13671       no) ac_val=;;
13672       *) ac_val=$ac_cv_c_inline;;
13673     esac
13674     cat >>confdefs.h <<_ACEOF
13675 #ifndef __cplusplus
13676 #define inline $ac_val
13677 #endif
13678 _ACEOF
13679     ;;
13680 esac
13681
13682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13683 $as_echo_n "checking for printf format archetype... " >&6; }
13684 if ${pgac_cv_printf_archetype+:} false; then :
13685   $as_echo_n "(cached) " >&6
13686 else
13687   pgac_cv_printf_archetype=gnu_printf
13688 ac_save_c_werror_flag=$ac_c_werror_flag
13689 ac_c_werror_flag=yes
13690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13691 /* end confdefs.h.  */
13692 extern void pgac_write(int ignore, const char *fmt,...)
13693 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13694 int
13695 main ()
13696 {
13697 pgac_write(0, "error %s: %m", "foo");
13698   ;
13699   return 0;
13700 }
13701 _ACEOF
13702 if ac_fn_c_try_compile "$LINENO"; then :
13703   ac_archetype_ok=yes
13704 else
13705   ac_archetype_ok=no
13706 fi
13707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13708 ac_c_werror_flag=$ac_save_c_werror_flag
13709
13710 if [ "$ac_archetype_ok" = no ]; then
13711   pgac_cv_printf_archetype=__syslog__
13712   ac_save_c_werror_flag=$ac_c_werror_flag
13713 ac_c_werror_flag=yes
13714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13715 /* end confdefs.h.  */
13716 extern void pgac_write(int ignore, const char *fmt,...)
13717 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13718 int
13719 main ()
13720 {
13721 pgac_write(0, "error %s: %m", "foo");
13722   ;
13723   return 0;
13724 }
13725 _ACEOF
13726 if ac_fn_c_try_compile "$LINENO"; then :
13727   ac_archetype_ok=yes
13728 else
13729   ac_archetype_ok=no
13730 fi
13731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13732 ac_c_werror_flag=$ac_save_c_werror_flag
13733
13734   if [ "$ac_archetype_ok" = no ]; then
13735     pgac_cv_printf_archetype=printf
13736   fi
13737 fi
13738 fi
13739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13740 $as_echo "$pgac_cv_printf_archetype" >&6; }
13741
13742 cat >>confdefs.h <<_ACEOF
13743 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13744 _ACEOF
13745
13746
13747
13748   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13749 $as_echo_n "checking for flexible array members... " >&6; }
13750 if ${ac_cv_c_flexmember+:} false; then :
13751   $as_echo_n "(cached) " >&6
13752 else
13753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13754 /* end confdefs.h.  */
13755 #include <stdlib.h>
13756             #include <stdio.h>
13757             #include <stddef.h>
13758             struct s { int n; double d[]; };
13759 int
13760 main ()
13761 {
13762 int m = getchar ();
13763             struct s *p = malloc (offsetof (struct s, d)
13764                                   + m * sizeof (double));
13765             p->d[0] = 0.0;
13766             return p->d != (double *) NULL;
13767   ;
13768   return 0;
13769 }
13770 _ACEOF
13771 if ac_fn_c_try_compile "$LINENO"; then :
13772   ac_cv_c_flexmember=yes
13773 else
13774   ac_cv_c_flexmember=no
13775 fi
13776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13777 fi
13778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13779 $as_echo "$ac_cv_c_flexmember" >&6; }
13780   if test $ac_cv_c_flexmember = yes; then
13781
13782 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13783
13784   else
13785     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13786
13787   fi
13788
13789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13790 $as_echo_n "checking for signed types... " >&6; }
13791 if ${pgac_cv_c_signed+:} false; then :
13792   $as_echo_n "(cached) " >&6
13793 else
13794   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13795 /* end confdefs.h.  */
13796
13797 int
13798 main ()
13799 {
13800 signed char c; signed short s; signed int i;
13801   ;
13802   return 0;
13803 }
13804 _ACEOF
13805 if ac_fn_c_try_compile "$LINENO"; then :
13806   pgac_cv_c_signed=yes
13807 else
13808   pgac_cv_c_signed=no
13809 fi
13810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13811 fi
13812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13813 $as_echo "$pgac_cv_c_signed" >&6; }
13814 if test x"$pgac_cv_c_signed" = xno ; then
13815
13816 $as_echo "#define signed /**/" >>confdefs.h
13817
13818 fi
13819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13820 $as_echo_n "checking for __func__... " >&6; }
13821 if ${pgac_cv_funcname_func_support+:} false; then :
13822   $as_echo_n "(cached) " >&6
13823 else
13824   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13825 /* end confdefs.h.  */
13826 #include <stdio.h>
13827 int
13828 main ()
13829 {
13830 printf("%s\n", __func__);
13831   ;
13832   return 0;
13833 }
13834 _ACEOF
13835 if ac_fn_c_try_compile "$LINENO"; then :
13836   pgac_cv_funcname_func_support=yes
13837 else
13838   pgac_cv_funcname_func_support=no
13839 fi
13840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13841 fi
13842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13843 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13844 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13845
13846 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13847
13848 else
13849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13850 $as_echo_n "checking for __FUNCTION__... " >&6; }
13851 if ${pgac_cv_funcname_function_support+:} false; then :
13852   $as_echo_n "(cached) " >&6
13853 else
13854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13855 /* end confdefs.h.  */
13856 #include <stdio.h>
13857 int
13858 main ()
13859 {
13860 printf("%s\n", __FUNCTION__);
13861   ;
13862   return 0;
13863 }
13864 _ACEOF
13865 if ac_fn_c_try_compile "$LINENO"; then :
13866   pgac_cv_funcname_function_support=yes
13867 else
13868   pgac_cv_funcname_function_support=no
13869 fi
13870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13871 fi
13872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13873 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13874 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13875
13876 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13877
13878 fi
13879 fi
13880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13881 $as_echo_n "checking for _Static_assert... " >&6; }
13882 if ${pgac_cv__static_assert+:} false; then :
13883   $as_echo_n "(cached) " >&6
13884 else
13885   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13886 /* end confdefs.h.  */
13887
13888 int
13889 main ()
13890 {
13891 ({ _Static_assert(1, "foo"); })
13892   ;
13893   return 0;
13894 }
13895 _ACEOF
13896 if ac_fn_c_try_link "$LINENO"; then :
13897   pgac_cv__static_assert=yes
13898 else
13899   pgac_cv__static_assert=no
13900 fi
13901 rm -f core conftest.err conftest.$ac_objext \
13902     conftest$ac_exeext conftest.$ac_ext
13903 fi
13904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13905 $as_echo "$pgac_cv__static_assert" >&6; }
13906 if test x"$pgac_cv__static_assert" = xyes ; then
13907
13908 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13909
13910 fi
13911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13912 $as_echo_n "checking for typeof... " >&6; }
13913 if ${pgac_cv_c_typeof+:} false; then :
13914   $as_echo_n "(cached) " >&6
13915 else
13916   pgac_cv_c_typeof=no
13917 for pgac_kw in typeof __typeof__ decltype; do
13918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13919 /* end confdefs.h.  */
13920
13921 int
13922 main ()
13923 {
13924 int x = 0;
13925 $pgac_kw(x) y;
13926 y = x;
13927 return y;
13928   ;
13929   return 0;
13930 }
13931 _ACEOF
13932 if ac_fn_c_try_compile "$LINENO"; then :
13933   pgac_cv_c_typeof=$pgac_kw
13934 fi
13935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13936   test "$pgac_cv_c_typeof" != no && break
13937 done
13938 fi
13939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13940 $as_echo "$pgac_cv_c_typeof" >&6; }
13941 if test "$pgac_cv_c_typeof" != no; then
13942
13943 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13944
13945   if test "$pgac_cv_c_typeof" != typeof; then
13946
13947 cat >>confdefs.h <<_ACEOF
13948 #define typeof $pgac_cv_c_typeof
13949 _ACEOF
13950
13951   fi
13952 fi
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13954 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13955 if ${pgac_cv__types_compatible+:} false; then :
13956   $as_echo_n "(cached) " >&6
13957 else
13958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959 /* end confdefs.h.  */
13960
13961 int
13962 main ()
13963 {
13964  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13965   ;
13966   return 0;
13967 }
13968 _ACEOF
13969 if ac_fn_c_try_compile "$LINENO"; then :
13970   pgac_cv__types_compatible=yes
13971 else
13972   pgac_cv__types_compatible=no
13973 fi
13974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13975 fi
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13977 $as_echo "$pgac_cv__types_compatible" >&6; }
13978 if test x"$pgac_cv__types_compatible" = xyes ; then
13979
13980 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13981
13982 fi
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13984 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13985 if ${pgac_cv__builtin_bswap16+:} false; then :
13986   $as_echo_n "(cached) " >&6
13987 else
13988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13989 /* end confdefs.h.  */
13990 static unsigned long int x = __builtin_bswap16(0xaabb);
13991
13992 _ACEOF
13993 if ac_fn_c_try_compile "$LINENO"; then :
13994   pgac_cv__builtin_bswap16=yes
13995 else
13996   pgac_cv__builtin_bswap16=no
13997 fi
13998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13999 fi
14000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
14001 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
14002 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
14003
14004 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
14005
14006 fi
14007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
14008 $as_echo_n "checking for __builtin_bswap32... " >&6; }
14009 if ${pgac_cv__builtin_bswap32+:} false; then :
14010   $as_echo_n "(cached) " >&6
14011 else
14012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14013 /* end confdefs.h.  */
14014 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
14015
14016 _ACEOF
14017 if ac_fn_c_try_compile "$LINENO"; then :
14018   pgac_cv__builtin_bswap32=yes
14019 else
14020   pgac_cv__builtin_bswap32=no
14021 fi
14022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14023 fi
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
14025 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
14026 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
14027
14028 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
14029
14030 fi
14031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
14032 $as_echo_n "checking for __builtin_bswap64... " >&6; }
14033 if ${pgac_cv__builtin_bswap64+:} false; then :
14034   $as_echo_n "(cached) " >&6
14035 else
14036   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14037 /* end confdefs.h.  */
14038 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
14039
14040 _ACEOF
14041 if ac_fn_c_try_compile "$LINENO"; then :
14042   pgac_cv__builtin_bswap64=yes
14043 else
14044   pgac_cv__builtin_bswap64=no
14045 fi
14046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14047 fi
14048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
14049 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
14050 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
14051
14052 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
14053
14054 fi
14055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14056 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14057 if ${pgac_cv__builtin_constant_p+:} false; then :
14058   $as_echo_n "(cached) " >&6
14059 else
14060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14061 /* end confdefs.h.  */
14062 static int x;
14063   static int y[__builtin_constant_p(x) ? x : 1];
14064   static int z[__builtin_constant_p("string literal") ? 1 : x];
14065
14066
14067 _ACEOF
14068 if ac_fn_c_try_compile "$LINENO"; then :
14069   pgac_cv__builtin_constant_p=yes
14070 else
14071   pgac_cv__builtin_constant_p=no
14072 fi
14073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14074 fi
14075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14076 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14077 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14078
14079 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14080
14081 fi
14082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14083 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14084 if ${pgac_cv__builtin_unreachable+:} false; then :
14085   $as_echo_n "(cached) " >&6
14086 else
14087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14088 /* end confdefs.h.  */
14089
14090 int
14091 main ()
14092 {
14093 __builtin_unreachable();
14094   ;
14095   return 0;
14096 }
14097 _ACEOF
14098 if ac_fn_c_try_link "$LINENO"; then :
14099   pgac_cv__builtin_unreachable=yes
14100 else
14101   pgac_cv__builtin_unreachable=no
14102 fi
14103 rm -f core conftest.err conftest.$ac_objext \
14104     conftest$ac_exeext conftest.$ac_ext
14105 fi
14106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14107 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14108 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14109
14110 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14111
14112 fi
14113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14114 $as_echo_n "checking for computed goto support... " >&6; }
14115 if ${pgac_cv_computed_goto+:} false; then :
14116   $as_echo_n "(cached) " >&6
14117 else
14118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14119 /* end confdefs.h.  */
14120
14121 int
14122 main ()
14123 {
14124 void *labeladdrs[] = {&&my_label};
14125   goto *labeladdrs[0];
14126   my_label:
14127   return 1;
14128
14129   ;
14130   return 0;
14131 }
14132 _ACEOF
14133 if ac_fn_c_try_compile "$LINENO"; then :
14134   pgac_cv_computed_goto=yes
14135 else
14136   pgac_cv_computed_goto=no
14137 fi
14138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14139 fi
14140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14141 $as_echo "$pgac_cv_computed_goto" >&6; }
14142 if test x"$pgac_cv_computed_goto" = xyes ; then
14143
14144 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14145
14146 fi
14147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14148 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14149 if ${ac_cv_struct_tm+:} false; then :
14150   $as_echo_n "(cached) " >&6
14151 else
14152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14153 /* end confdefs.h.  */
14154 #include <sys/types.h>
14155 #include <time.h>
14156
14157 int
14158 main ()
14159 {
14160 struct tm tm;
14161                                      int *p = &tm.tm_sec;
14162                                      return !p;
14163   ;
14164   return 0;
14165 }
14166 _ACEOF
14167 if ac_fn_c_try_compile "$LINENO"; then :
14168   ac_cv_struct_tm=time.h
14169 else
14170   ac_cv_struct_tm=sys/time.h
14171 fi
14172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14173 fi
14174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14175 $as_echo "$ac_cv_struct_tm" >&6; }
14176 if test $ac_cv_struct_tm = sys/time.h; then
14177
14178 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14179
14180 fi
14181
14182 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14183 #include <$ac_cv_struct_tm>
14184
14185 "
14186 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14187
14188 cat >>confdefs.h <<_ACEOF
14189 #define HAVE_STRUCT_TM_TM_ZONE 1
14190 _ACEOF
14191
14192
14193 fi
14194
14195 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14196
14197 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14198
14199 fi
14200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14201 $as_echo_n "checking for tzname... " >&6; }
14202 if ${ac_cv_var_tzname+:} false; then :
14203   $as_echo_n "(cached) " >&6
14204 else
14205   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14206 /* end confdefs.h.  */
14207 #include <stdlib.h>
14208 #include <time.h>
14209 #ifndef tzname /* For SGI.  */
14210 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
14211 #endif
14212
14213 int
14214 main ()
14215 {
14216 atoi(*tzname);
14217   ;
14218   return 0;
14219 }
14220 _ACEOF
14221 if ac_fn_c_try_link "$LINENO"; then :
14222   ac_cv_var_tzname=yes
14223 else
14224   ac_cv_var_tzname=no
14225 fi
14226 rm -f core conftest.err conftest.$ac_objext \
14227     conftest$ac_exeext conftest.$ac_ext
14228 fi
14229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14230 $as_echo "$ac_cv_var_tzname" >&6; }
14231 if test $ac_cv_var_tzname = yes; then
14232
14233 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14234
14235 fi
14236
14237 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14238 #ifdef HAVE_SYS_IPC_H
14239 #include <sys/ipc.h>
14240 #endif
14241 #ifdef HAVE_SYS_SEM_H
14242 #include <sys/sem.h>
14243 #endif
14244 "
14245 if test "x$ac_cv_type_union_semun" = xyes; then :
14246
14247 cat >>confdefs.h <<_ACEOF
14248 #define HAVE_UNION_SEMUN 1
14249 _ACEOF
14250
14251
14252 fi
14253
14254 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14255 #ifdef HAVE_SYS_UN_H
14256 #include <sys/un.h>
14257 #endif
14258
14259 "
14260 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14261
14262 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14263
14264 fi
14265
14266 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14267 #include <sys/socket.h>
14268
14269 "
14270 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14271
14272 cat >>confdefs.h <<_ACEOF
14273 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14274 _ACEOF
14275
14276
14277 fi
14278
14279 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14280 #include <sys/socket.h>
14281
14282 "
14283 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14284
14285 cat >>confdefs.h <<_ACEOF
14286 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14287 _ACEOF
14288
14289
14290 fi
14291 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14292 #include <sys/socket.h>
14293
14294 "
14295 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14296
14297 cat >>confdefs.h <<_ACEOF
14298 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14299 _ACEOF
14300
14301
14302 fi
14303 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14304 #include <sys/socket.h>
14305
14306 "
14307 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14308
14309 cat >>confdefs.h <<_ACEOF
14310 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14311 _ACEOF
14312
14313
14314 fi
14315 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14316 #include <sys/socket.h>
14317
14318 "
14319 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14320
14321 cat >>confdefs.h <<_ACEOF
14322 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14323 _ACEOF
14324
14325
14326 fi
14327 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14328 #include <sys/socket.h>
14329
14330 "
14331 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14332
14333 cat >>confdefs.h <<_ACEOF
14334 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14335 _ACEOF
14336
14337
14338 fi
14339
14340 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14341 #include <sys/socket.h>
14342 #include <netdb.h>
14343
14344 "
14345 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14346
14347 cat >>confdefs.h <<_ACEOF
14348 #define HAVE_STRUCT_ADDRINFO 1
14349 _ACEOF
14350
14351
14352 fi
14353
14354
14355   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14356 if test "x$ac_cv_type_intptr_t" = xyes; then :
14357
14358 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14359
14360 else
14361   for ac_type in 'int' 'long int' 'long long int'; do
14362        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14363 /* end confdefs.h.  */
14364 $ac_includes_default
14365 int
14366 main ()
14367 {
14368 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14369 test_array [0] = 0;
14370 return test_array [0];
14371
14372   ;
14373   return 0;
14374 }
14375 _ACEOF
14376 if ac_fn_c_try_compile "$LINENO"; then :
14377
14378 cat >>confdefs.h <<_ACEOF
14379 #define intptr_t $ac_type
14380 _ACEOF
14381
14382           ac_type=
14383 fi
14384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14385        test -z "$ac_type" && break
14386      done
14387 fi
14388
14389
14390
14391   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14392 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14393
14394 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14395
14396 else
14397   for ac_type in 'unsigned int' 'unsigned long int' \
14398         'unsigned long long int'; do
14399        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14400 /* end confdefs.h.  */
14401 $ac_includes_default
14402 int
14403 main ()
14404 {
14405 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14406 test_array [0] = 0;
14407 return test_array [0];
14408
14409   ;
14410   return 0;
14411 }
14412 _ACEOF
14413 if ac_fn_c_try_compile "$LINENO"; then :
14414
14415 cat >>confdefs.h <<_ACEOF
14416 #define uintptr_t $ac_type
14417 _ACEOF
14418
14419           ac_type=
14420 fi
14421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14422        test -z "$ac_type" && break
14423      done
14424 fi
14425
14426
14427
14428   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14429 $as_echo_n "checking for unsigned long long int... " >&6; }
14430 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14431   $as_echo_n "(cached) " >&6
14432 else
14433   ac_cv_type_unsigned_long_long_int=yes
14434      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14435        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14436 /* end confdefs.h.  */
14437
14438   /* For now, do not test the preprocessor; as of 2007 there are too many
14439          implementations with broken preprocessors.  Perhaps this can
14440          be revisited in 2012.  In the meantime, code should not expect
14441          #if to work with literals wider than 32 bits.  */
14442       /* Test literals.  */
14443       long long int ll = 9223372036854775807ll;
14444       long long int nll = -9223372036854775807LL;
14445       unsigned long long int ull = 18446744073709551615ULL;
14446       /* Test constant expressions.   */
14447       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14448                      ? 1 : -1)];
14449       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14450                      ? 1 : -1)];
14451       int i = 63;
14452 int
14453 main ()
14454 {
14455 /* Test availability of runtime routines for shift and division.  */
14456       long long int llmax = 9223372036854775807ll;
14457       unsigned long long int ullmax = 18446744073709551615ull;
14458       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14459               | (llmax / ll) | (llmax % ll)
14460               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14461               | (ullmax / ull) | (ullmax % ull));
14462   ;
14463   return 0;
14464 }
14465
14466 _ACEOF
14467 if ac_fn_c_try_link "$LINENO"; then :
14468
14469 else
14470   ac_cv_type_unsigned_long_long_int=no
14471 fi
14472 rm -f core conftest.err conftest.$ac_objext \
14473     conftest$ac_exeext conftest.$ac_ext
14474      fi
14475 fi
14476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14477 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14478   if test $ac_cv_type_unsigned_long_long_int = yes; then
14479
14480 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14481
14482   fi
14483
14484
14485
14486   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14487 $as_echo_n "checking for long long int... " >&6; }
14488 if ${ac_cv_type_long_long_int+:} false; then :
14489   $as_echo_n "(cached) " >&6
14490 else
14491   ac_cv_type_long_long_int=yes
14492       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14493         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14494         if test $ac_cv_type_long_long_int = yes; then
14495                                   if test "$cross_compiling" = yes; then :
14496   :
14497 else
14498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14499 /* end confdefs.h.  */
14500 #include <limits.h>
14501                  #ifndef LLONG_MAX
14502                  # define HALF \
14503                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14504                  # define LLONG_MAX (HALF - 1 + HALF)
14505                  #endif
14506 int
14507 main ()
14508 {
14509 long long int n = 1;
14510                  int i;
14511                  for (i = 0; ; i++)
14512                    {
14513                      long long int m = n << i;
14514                      if (m >> i != n)
14515                        return 1;
14516                      if (LLONG_MAX / 2 < m)
14517                        break;
14518                    }
14519                  return 0;
14520   ;
14521   return 0;
14522 }
14523 _ACEOF
14524 if ac_fn_c_try_run "$LINENO"; then :
14525
14526 else
14527   ac_cv_type_long_long_int=no
14528 fi
14529 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14530   conftest.$ac_objext conftest.beam conftest.$ac_ext
14531 fi
14532
14533         fi
14534       fi
14535 fi
14536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14537 $as_echo "$ac_cv_type_long_long_int" >&6; }
14538   if test $ac_cv_type_long_long_int = yes; then
14539
14540 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14541
14542   fi
14543
14544
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14546 $as_echo_n "checking for locale_t... " >&6; }
14547 if ${pgac_cv_type_locale_t+:} false; then :
14548   $as_echo_n "(cached) " >&6
14549 else
14550   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14551 /* end confdefs.h.  */
14552 #include <locale.h>
14553 locale_t x;
14554 int
14555 main ()
14556 {
14557
14558   ;
14559   return 0;
14560 }
14561 _ACEOF
14562 if ac_fn_c_try_compile "$LINENO"; then :
14563   pgac_cv_type_locale_t=yes
14564 else
14565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14566 /* end confdefs.h.  */
14567 #include <xlocale.h>
14568 locale_t x;
14569 int
14570 main ()
14571 {
14572
14573   ;
14574   return 0;
14575 }
14576 _ACEOF
14577 if ac_fn_c_try_compile "$LINENO"; then :
14578   pgac_cv_type_locale_t='yes (in xlocale.h)'
14579 else
14580   pgac_cv_type_locale_t=no
14581 fi
14582 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14583 fi
14584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14585 fi
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14587 $as_echo "$pgac_cv_type_locale_t" >&6; }
14588 if test "$pgac_cv_type_locale_t" != no; then
14589
14590 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14591
14592 fi
14593 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14594
14595 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14596
14597 fi
14598
14599 # MSVC doesn't cope well with defining restrict to __restrict, the
14600 # spelling it understands, because it conflicts with
14601 # __declspec(restrict). Therefore we define pg_restrict to the
14602 # appropriate definition, which presumably won't conflict.
14603 #
14604 # Allow platforms with buggy compilers to force restrict to not be
14605 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14606 # template.
14607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14608 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14609 if ${ac_cv_c_restrict+:} false; then :
14610   $as_echo_n "(cached) " >&6
14611 else
14612   ac_cv_c_restrict=no
14613    # The order here caters to the fact that C++ does not require restrict.
14614    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14615      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14616 /* end confdefs.h.  */
14617 typedef int * int_ptr;
14618         int foo (int_ptr $ac_kw ip) {
14619         return ip[0];
14620        }
14621 int
14622 main ()
14623 {
14624 int s[1];
14625         int * $ac_kw t = s;
14626         t[0] = 0;
14627         return foo(t)
14628   ;
14629   return 0;
14630 }
14631 _ACEOF
14632 if ac_fn_c_try_compile "$LINENO"; then :
14633   ac_cv_c_restrict=$ac_kw
14634 fi
14635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14636      test "$ac_cv_c_restrict" != no && break
14637    done
14638
14639 fi
14640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14641 $as_echo "$ac_cv_c_restrict" >&6; }
14642
14643  case $ac_cv_c_restrict in
14644    restrict) ;;
14645    no) $as_echo "#define restrict /**/" >>confdefs.h
14646  ;;
14647    *)  cat >>confdefs.h <<_ACEOF
14648 #define restrict $ac_cv_c_restrict
14649 _ACEOF
14650  ;;
14651  esac
14652
14653 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14654   pg_restrict=""
14655 else
14656   pg_restrict="$ac_cv_c_restrict"
14657 fi
14658
14659 cat >>confdefs.h <<_ACEOF
14660 #define pg_restrict $pg_restrict
14661 _ACEOF
14662
14663
14664 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14665 #include <sys/param.h>
14666 #ifdef HAVE_SYS_UCRED_H
14667 #include <sys/ucred.h>
14668 #endif
14669 "
14670 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14671
14672 cat >>confdefs.h <<_ACEOF
14673 #define HAVE_STRUCT_CMSGCRED 1
14674 _ACEOF
14675
14676
14677 fi
14678
14679
14680 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14681 #include <getopt.h>
14682 #endif
14683 "
14684 if test "x$ac_cv_type_struct_option" = xyes; then :
14685
14686 cat >>confdefs.h <<_ACEOF
14687 #define HAVE_STRUCT_OPTION 1
14688 _ACEOF
14689
14690
14691 fi
14692
14693
14694 if test "$with_zlib" = yes; then
14695   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14696   # did not).  While we could work around the lack of z_streamp, it
14697   # seems unwise to encourage people to use such old zlib versions...
14698   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14699 "
14700 if test "x$ac_cv_type_z_streamp" = xyes; then :
14701
14702 else
14703   as_fn_error $? "zlib version is too old
14704 Use --without-zlib to disable zlib support." "$LINENO" 5
14705 fi
14706
14707 fi
14708
14709 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14710 case $host_cpu in
14711   ppc*|powerpc*)
14712     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14713 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14714     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14715 /* end confdefs.h.  */
14716
14717 int
14718 main ()
14719 {
14720 int a = 0; int *p = &a; int r;
14721          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14722   ;
14723   return 0;
14724 }
14725 _ACEOF
14726 if ac_fn_c_try_compile "$LINENO"; then :
14727   pgac_cv_have_ppc_mutex_hint=yes
14728 else
14729   pgac_cv_have_ppc_mutex_hint=no
14730 fi
14731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14732     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14733 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14734     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14735
14736 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14737
14738     fi
14739   ;;
14740 esac
14741
14742 # Check largefile support.  You might think this is a system service not a
14743 # compiler characteristic, but you'd be wrong.  We must check this before
14744 # probing existence of related functions such as fseeko, since the largefile
14745 # defines can affect what is generated for that.
14746 if test "$PORTNAME" != "win32"; then
14747    # Check whether --enable-largefile was given.
14748 if test "${enable_largefile+set}" = set; then :
14749   enableval=$enable_largefile;
14750 fi
14751
14752 if test "$enable_largefile" != no; then
14753
14754   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14755 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14756 if ${ac_cv_sys_largefile_CC+:} false; then :
14757   $as_echo_n "(cached) " >&6
14758 else
14759   ac_cv_sys_largefile_CC=no
14760      if test "$GCC" != yes; then
14761        ac_save_CC=$CC
14762        while :; do
14763          # IRIX 6.2 and later do not support large files by default,
14764          # so use the C compiler's -n32 option if that helps.
14765          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14766 /* end confdefs.h.  */
14767 #include <sys/types.h>
14768  /* Check that off_t can represent 2**63 - 1 correctly.
14769     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14770     since some C++ compilers masquerading as C compilers
14771     incorrectly reject 9223372036854775807.  */
14772 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14773   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14774                        && LARGE_OFF_T % 2147483647 == 1)
14775                       ? 1 : -1];
14776 int
14777 main ()
14778 {
14779
14780   ;
14781   return 0;
14782 }
14783 _ACEOF
14784          if ac_fn_c_try_compile "$LINENO"; then :
14785   break
14786 fi
14787 rm -f core conftest.err conftest.$ac_objext
14788          CC="$CC -n32"
14789          if ac_fn_c_try_compile "$LINENO"; then :
14790   ac_cv_sys_largefile_CC=' -n32'; break
14791 fi
14792 rm -f core conftest.err conftest.$ac_objext
14793          break
14794        done
14795        CC=$ac_save_CC
14796        rm -f conftest.$ac_ext
14797     fi
14798 fi
14799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14800 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14801   if test "$ac_cv_sys_largefile_CC" != no; then
14802     CC=$CC$ac_cv_sys_largefile_CC
14803   fi
14804
14805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14806 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14807 if ${ac_cv_sys_file_offset_bits+:} false; then :
14808   $as_echo_n "(cached) " >&6
14809 else
14810   while :; do
14811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14812 /* end confdefs.h.  */
14813 #include <sys/types.h>
14814  /* Check that off_t can represent 2**63 - 1 correctly.
14815     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14816     since some C++ compilers masquerading as C compilers
14817     incorrectly reject 9223372036854775807.  */
14818 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14819   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14820                        && LARGE_OFF_T % 2147483647 == 1)
14821                       ? 1 : -1];
14822 int
14823 main ()
14824 {
14825
14826   ;
14827   return 0;
14828 }
14829 _ACEOF
14830 if ac_fn_c_try_compile "$LINENO"; then :
14831   ac_cv_sys_file_offset_bits=no; break
14832 fi
14833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14835 /* end confdefs.h.  */
14836 #define _FILE_OFFSET_BITS 64
14837 #include <sys/types.h>
14838  /* Check that off_t can represent 2**63 - 1 correctly.
14839     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14840     since some C++ compilers masquerading as C compilers
14841     incorrectly reject 9223372036854775807.  */
14842 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14843   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14844                        && LARGE_OFF_T % 2147483647 == 1)
14845                       ? 1 : -1];
14846 int
14847 main ()
14848 {
14849
14850   ;
14851   return 0;
14852 }
14853 _ACEOF
14854 if ac_fn_c_try_compile "$LINENO"; then :
14855   ac_cv_sys_file_offset_bits=64; break
14856 fi
14857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14858   ac_cv_sys_file_offset_bits=unknown
14859   break
14860 done
14861 fi
14862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14863 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14864 case $ac_cv_sys_file_offset_bits in #(
14865   no | unknown) ;;
14866   *)
14867 cat >>confdefs.h <<_ACEOF
14868 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14869 _ACEOF
14870 ;;
14871 esac
14872 rm -rf conftest*
14873   if test $ac_cv_sys_file_offset_bits = unknown; then
14874     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14875 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14876 if ${ac_cv_sys_large_files+:} false; then :
14877   $as_echo_n "(cached) " >&6
14878 else
14879   while :; do
14880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14881 /* end confdefs.h.  */
14882 #include <sys/types.h>
14883  /* Check that off_t can represent 2**63 - 1 correctly.
14884     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14885     since some C++ compilers masquerading as C compilers
14886     incorrectly reject 9223372036854775807.  */
14887 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14888   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14889                        && LARGE_OFF_T % 2147483647 == 1)
14890                       ? 1 : -1];
14891 int
14892 main ()
14893 {
14894
14895   ;
14896   return 0;
14897 }
14898 _ACEOF
14899 if ac_fn_c_try_compile "$LINENO"; then :
14900   ac_cv_sys_large_files=no; break
14901 fi
14902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14903   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14904 /* end confdefs.h.  */
14905 #define _LARGE_FILES 1
14906 #include <sys/types.h>
14907  /* Check that off_t can represent 2**63 - 1 correctly.
14908     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14909     since some C++ compilers masquerading as C compilers
14910     incorrectly reject 9223372036854775807.  */
14911 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14912   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14913                        && LARGE_OFF_T % 2147483647 == 1)
14914                       ? 1 : -1];
14915 int
14916 main ()
14917 {
14918
14919   ;
14920   return 0;
14921 }
14922 _ACEOF
14923 if ac_fn_c_try_compile "$LINENO"; then :
14924   ac_cv_sys_large_files=1; break
14925 fi
14926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14927   ac_cv_sys_large_files=unknown
14928   break
14929 done
14930 fi
14931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14932 $as_echo "$ac_cv_sys_large_files" >&6; }
14933 case $ac_cv_sys_large_files in #(
14934   no | unknown) ;;
14935   *)
14936 cat >>confdefs.h <<_ACEOF
14937 #define _LARGE_FILES $ac_cv_sys_large_files
14938 _ACEOF
14939 ;;
14940 esac
14941 rm -rf conftest*
14942   fi
14943
14944
14945 fi
14946
14947
14948 fi
14949
14950 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14951 # The cast to long int works around a bug in the HP C Compiler
14952 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14953 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14954 # This bug is HP SR number 8606223364.
14955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14956 $as_echo_n "checking size of off_t... " >&6; }
14957 if ${ac_cv_sizeof_off_t+:} false; then :
14958   $as_echo_n "(cached) " >&6
14959 else
14960   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14961
14962 else
14963   if test "$ac_cv_type_off_t" = yes; then
14964      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14965 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14966 as_fn_error 77 "cannot compute sizeof (off_t)
14967 See \`config.log' for more details" "$LINENO" 5; }
14968    else
14969      ac_cv_sizeof_off_t=0
14970    fi
14971 fi
14972
14973 fi
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14975 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14976
14977
14978
14979 cat >>confdefs.h <<_ACEOF
14980 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14981 _ACEOF
14982
14983
14984
14985 # If we don't have largefile support, can't handle segsize >= 2GB.
14986 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14987    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14988 fi
14989
14990 # The cast to long int works around a bug in the HP C Compiler
14991 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14992 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14993 # This bug is HP SR number 8606223364.
14994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14995 $as_echo_n "checking size of bool... " >&6; }
14996 if ${ac_cv_sizeof_bool+:} false; then :
14997   $as_echo_n "(cached) " >&6
14998 else
14999   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
15000 #include <stdbool.h>
15001 #endif
15002 "; then :
15003
15004 else
15005   if test "$ac_cv_type_bool" = yes; then
15006      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15007 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15008 as_fn_error 77 "cannot compute sizeof (bool)
15009 See \`config.log' for more details" "$LINENO" 5; }
15010    else
15011      ac_cv_sizeof_bool=0
15012    fi
15013 fi
15014
15015 fi
15016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15017 $as_echo "$ac_cv_sizeof_bool" >&6; }
15018
15019
15020
15021 cat >>confdefs.h <<_ACEOF
15022 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15023 _ACEOF
15024
15025
15026
15027
15028 ##
15029 ## Functions, global variables
15030 ##
15031
15032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15033 $as_echo_n "checking for int timezone... " >&6; }
15034 if ${pgac_cv_var_int_timezone+:} false; then :
15035   $as_echo_n "(cached) " >&6
15036 else
15037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15038 /* end confdefs.h.  */
15039 #include <time.h>
15040 int res;
15041 int
15042 main ()
15043 {
15044 #ifndef __CYGWIN__
15045 res = timezone / 60;
15046 #else
15047 res = _timezone / 60;
15048 #endif
15049   ;
15050   return 0;
15051 }
15052 _ACEOF
15053 if ac_fn_c_try_link "$LINENO"; then :
15054   pgac_cv_var_int_timezone=yes
15055 else
15056   pgac_cv_var_int_timezone=no
15057 fi
15058 rm -f core conftest.err conftest.$ac_objext \
15059     conftest$ac_exeext conftest.$ac_ext
15060 fi
15061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15062 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15063 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15064
15065 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15066
15067 fi
15068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15069 $as_echo_n "checking types of arguments for accept()... " >&6; }
15070  if ${ac_cv_func_accept_return+:} false; then :
15071   $as_echo_n "(cached) " >&6
15072 else
15073    if ${ac_cv_func_accept_arg1+:} false; then :
15074   $as_echo_n "(cached) " >&6
15075 else
15076     if ${ac_cv_func_accept_arg2+:} false; then :
15077   $as_echo_n "(cached) " >&6
15078 else
15079      if ${ac_cv_func_accept_arg3+:} false; then :
15080   $as_echo_n "(cached) " >&6
15081 else
15082       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
15083       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
15084        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15085         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15086          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15087 /* end confdefs.h.  */
15088 #include <sys/types.h>
15089 #include <sys/socket.h>
15090 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15091 _ACEOF
15092 if ac_fn_c_try_compile "$LINENO"; then :
15093   ac_not_found=no; break 4
15094 else
15095   ac_not_found=yes
15096 fi
15097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15098        done
15099       done
15100      done
15101     done
15102     if test "$ac_not_found" = yes; then
15103       as_fn_error $? "could not determine argument types" "$LINENO" 5
15104     fi
15105     if test "$ac_cv_func_accept_arg3" = "void"; then
15106       ac_cv_func_accept_arg3=int
15107     fi
15108
15109 fi
15110
15111 fi
15112
15113 fi
15114
15115 fi
15116  { $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
15117 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15118
15119 cat >>confdefs.h <<_ACEOF
15120 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15121 _ACEOF
15122
15123
15124 cat >>confdefs.h <<_ACEOF
15125 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15126 _ACEOF
15127
15128
15129 cat >>confdefs.h <<_ACEOF
15130 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15131 _ACEOF
15132
15133
15134 cat >>confdefs.h <<_ACEOF
15135 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15136 _ACEOF
15137
15138
15139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15140 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15141 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15142   $as_echo_n "(cached) " >&6
15143 else
15144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15145 /* end confdefs.h.  */
15146 #include <sys/time.h>
15147 int
15148 main ()
15149 {
15150 struct timeval *tp;
15151 struct timezone *tzp;
15152 gettimeofday(tp,tzp);
15153   ;
15154   return 0;
15155 }
15156 _ACEOF
15157 if ac_fn_c_try_compile "$LINENO"; then :
15158   pgac_cv_func_gettimeofday_1arg=no
15159 else
15160   pgac_cv_func_gettimeofday_1arg=yes
15161 fi
15162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15163 fi
15164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15165 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15166 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15167
15168 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15169
15170 fi
15171
15172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15173 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15174 if ${pgac_cv_func_wcstombs_l+:} false; then :
15175   $as_echo_n "(cached) " >&6
15176 else
15177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15178 /* end confdefs.h.  */
15179 #include <stdlib.h>
15180 #include <locale.h>
15181 int
15182 main ()
15183 {
15184 #ifndef wcstombs_l
15185 (void) wcstombs_l;
15186 #endif
15187   ;
15188   return 0;
15189 }
15190 _ACEOF
15191 if ac_fn_c_try_compile "$LINENO"; then :
15192   pgac_cv_func_wcstombs_l='yes'
15193 else
15194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15195 /* end confdefs.h.  */
15196 #include <stdlib.h>
15197 #include <locale.h>
15198 #include <xlocale.h>
15199 int
15200 main ()
15201 {
15202 #ifndef wcstombs_l
15203 (void) wcstombs_l;
15204 #endif
15205   ;
15206   return 0;
15207 }
15208 _ACEOF
15209 if ac_fn_c_try_compile "$LINENO"; then :
15210   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15211 else
15212   pgac_cv_func_wcstombs_l='no'
15213 fi
15214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15215 fi
15216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15217 fi
15218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15219 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15220 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15221
15222 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15223
15224 fi
15225
15226 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15227 # symbols that that library has no business exposing to the world.  Pending
15228 # acquisition of a clue by those developers, ignore libedit (including its
15229 # possible alias of libreadline) while checking for everything else.
15230 LIBS_including_readline="$LIBS"
15231 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15232
15233 for ac_func in cbrt clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul symlink sync_file_range utime utimes wcstombs_l
15234 do :
15235   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15236 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15237 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15238   cat >>confdefs.h <<_ACEOF
15239 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15240 _ACEOF
15241
15242 fi
15243 done
15244
15245
15246 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15247 if test "x$ac_cv_func_fseeko" = xyes; then :
15248   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15249
15250 else
15251   case " $LIBOBJS " in
15252   *" fseeko.$ac_objext "* ) ;;
15253   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15254  ;;
15255 esac
15256
15257 fi
15258
15259
15260 case $host_os in
15261         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15262         # Mingw uses macros to access Win32 API calls
15263         netbsd*|mingw*)
15264
15265 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15266
15267                 ac_cv_func_fseeko=yes;;
15268         *)
15269                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15270 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15271 if ${ac_cv_sys_largefile_source+:} false; then :
15272   $as_echo_n "(cached) " >&6
15273 else
15274   while :; do
15275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15276 /* end confdefs.h.  */
15277 #include <sys/types.h> /* for off_t */
15278      #include <stdio.h>
15279 int
15280 main ()
15281 {
15282 int (*fp) (FILE *, off_t, int) = fseeko;
15283      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15284   ;
15285   return 0;
15286 }
15287 _ACEOF
15288 if ac_fn_c_try_link "$LINENO"; then :
15289   ac_cv_sys_largefile_source=no; break
15290 fi
15291 rm -f core conftest.err conftest.$ac_objext \
15292     conftest$ac_exeext conftest.$ac_ext
15293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15294 /* end confdefs.h.  */
15295 #define _LARGEFILE_SOURCE 1
15296 #include <sys/types.h> /* for off_t */
15297      #include <stdio.h>
15298 int
15299 main ()
15300 {
15301 int (*fp) (FILE *, off_t, int) = fseeko;
15302      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15303   ;
15304   return 0;
15305 }
15306 _ACEOF
15307 if ac_fn_c_try_link "$LINENO"; then :
15308   ac_cv_sys_largefile_source=1; break
15309 fi
15310 rm -f core conftest.err conftest.$ac_objext \
15311     conftest$ac_exeext conftest.$ac_ext
15312   ac_cv_sys_largefile_source=unknown
15313   break
15314 done
15315 fi
15316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15317 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15318 case $ac_cv_sys_largefile_source in #(
15319   no | unknown) ;;
15320   *)
15321 cat >>confdefs.h <<_ACEOF
15322 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15323 _ACEOF
15324 ;;
15325 esac
15326 rm -rf conftest*
15327
15328 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15329 # in glibc 2.1.3, but that breaks too many other things.
15330 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15331 if test $ac_cv_sys_largefile_source != unknown; then
15332
15333 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15334
15335 fi
15336 ;;
15337 esac
15338
15339 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15340 # by calling it, 2009-04-02
15341 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15342 # The Clang compiler raises a warning for an undeclared identifier that matches
15343 # a compiler builtin function.  All extant Clang versions are affected, as of
15344 # Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
15345 # C and Objective C languages, but Clang does report an error under C++ and
15346 # Objective C++.
15347 #
15348 # Passing -fno-builtin to the compiler would suppress this problem.  That
15349 # strategy would have the advantage of being insensitive to stray warnings, but
15350 # it would make tests less realistic.
15351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15352 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15353 if ${ac_cv_c_decl_report+:} false; then :
15354   $as_echo_n "(cached) " >&6
15355 else
15356   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15357 /* end confdefs.h.  */
15358
15359 int
15360 main ()
15361 {
15362 (void) strchr;
15363   ;
15364   return 0;
15365 }
15366 _ACEOF
15367 if ac_fn_c_try_compile "$LINENO"; then :
15368   if test -s conftest.err; then :
15369       # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15370     # valid AC_CHECK_DECL input.  No library function is consistently available
15371     # on freestanding implementations, so test against a dummy declaration.
15372     # Include always-available headers on the off chance that they somehow
15373     # elicit warnings.
15374     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15375 /* end confdefs.h.  */
15376 #include <float.h>
15377 #include <limits.h>
15378 #include <stdarg.h>
15379 #include <stddef.h>
15380 extern void ac_decl (int, char *);
15381 int
15382 main ()
15383 {
15384 #ifdef __cplusplus
15385   (void) ac_decl ((int) 0, (char *) 0);
15386   (void) ac_decl;
15387 #else
15388   (void) ac_decl;
15389 #endif
15390
15391   ;
15392   return 0;
15393 }
15394 _ACEOF
15395 if ac_fn_c_try_compile "$LINENO"; then :
15396   if test -s conftest.err; then :
15397   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15398 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15399 as_fn_error $? "cannot detect from compiler exit status or warnings
15400 See \`config.log' for more details" "$LINENO" 5; }
15401 else
15402   ac_cv_c_decl_report=warning
15403 fi
15404 else
15405   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15407 as_fn_error $? "cannot compile a simple declaration test
15408 See \`config.log' for more details" "$LINENO" 5; }
15409 fi
15410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15411 else
15412   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15413 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15414 as_fn_error $? "compiler does not report undeclared identifiers
15415 See \`config.log' for more details" "$LINENO" 5; }
15416 fi
15417 else
15418   ac_cv_c_decl_report=error
15419 fi
15420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15421 fi
15422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15423 $as_echo "$ac_cv_c_decl_report" >&6; }
15424
15425 case $ac_cv_c_decl_report in
15426   warning) ac_c_decl_warn_flag=yes ;;
15427   *) ac_c_decl_warn_flag= ;;
15428 esac
15429
15430 if test "$PORTNAME" != "solaris"; then :
15431
15432 for ac_func in posix_fadvise
15433 do :
15434   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15435 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15436   cat >>confdefs.h <<_ACEOF
15437 #define HAVE_POSIX_FADVISE 1
15438 _ACEOF
15439
15440 fi
15441 done
15442
15443 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15444 "
15445 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15446   ac_have_decl=1
15447 else
15448   ac_have_decl=0
15449 fi
15450
15451 cat >>confdefs.h <<_ACEOF
15452 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15453 _ACEOF
15454
15455
15456 fi # fi
15457
15458 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15459 "
15460 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15461   ac_have_decl=1
15462 else
15463   ac_have_decl=0
15464 fi
15465
15466 cat >>confdefs.h <<_ACEOF
15467 #define HAVE_DECL_FDATASYNC $ac_have_decl
15468 _ACEOF
15469
15470 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15471 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15472   ac_have_decl=1
15473 else
15474   ac_have_decl=0
15475 fi
15476
15477 cat >>confdefs.h <<_ACEOF
15478 #define HAVE_DECL_STRLCAT $ac_have_decl
15479 _ACEOF
15480 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15481 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15482   ac_have_decl=1
15483 else
15484   ac_have_decl=0
15485 fi
15486
15487 cat >>confdefs.h <<_ACEOF
15488 #define HAVE_DECL_STRLCPY $ac_have_decl
15489 _ACEOF
15490 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15491 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15492   ac_have_decl=1
15493 else
15494   ac_have_decl=0
15495 fi
15496
15497 cat >>confdefs.h <<_ACEOF
15498 #define HAVE_DECL_STRNLEN $ac_have_decl
15499 _ACEOF
15500
15501 # This is probably only present on macOS, but may as well check always
15502 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15503 "
15504 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15505   ac_have_decl=1
15506 else
15507   ac_have_decl=0
15508 fi
15509
15510 cat >>confdefs.h <<_ACEOF
15511 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15512 _ACEOF
15513
15514
15515 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15516 "
15517 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15518   ac_have_decl=1
15519 else
15520   ac_have_decl=0
15521 fi
15522
15523 cat >>confdefs.h <<_ACEOF
15524 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15525 _ACEOF
15526 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15527 "
15528 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15529   ac_have_decl=1
15530 else
15531   ac_have_decl=0
15532 fi
15533
15534 cat >>confdefs.h <<_ACEOF
15535 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15536 _ACEOF
15537
15538
15539 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15540 #include <netinet/in.h>
15541 "
15542 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15543
15544 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15545
15546 fi
15547
15548
15549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15550 $as_echo_n "checking for PS_STRINGS... " >&6; }
15551 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15552   $as_echo_n "(cached) " >&6
15553 else
15554   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15555 /* end confdefs.h.  */
15556 #include <machine/vmparam.h>
15557 #include <sys/exec.h>
15558
15559 int
15560 main ()
15561 {
15562 PS_STRINGS->ps_nargvstr = 1;
15563 PS_STRINGS->ps_argvstr = "foo";
15564   ;
15565   return 0;
15566 }
15567 _ACEOF
15568 if ac_fn_c_try_link "$LINENO"; then :
15569   pgac_cv_var_PS_STRINGS=yes
15570 else
15571   pgac_cv_var_PS_STRINGS=no
15572 fi
15573 rm -f core conftest.err conftest.$ac_objext \
15574     conftest$ac_exeext conftest.$ac_ext
15575 fi
15576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15577 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15578 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15579
15580 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15581
15582 fi
15583
15584
15585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15586 $as_echo_n "checking for isinf... " >&6; }
15587 if ${ac_cv_func_isinf+:} false; then :
15588   $as_echo_n "(cached) " >&6
15589 else
15590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15591 /* end confdefs.h.  */
15592
15593 #include <math.h>
15594 double glob_double;
15595
15596 int
15597 main ()
15598 {
15599 return isinf(glob_double) ? 0 : 1;
15600   ;
15601   return 0;
15602 }
15603 _ACEOF
15604 if ac_fn_c_try_link "$LINENO"; then :
15605   ac_cv_func_isinf=yes
15606 else
15607   ac_cv_func_isinf=no
15608 fi
15609 rm -f core conftest.err conftest.$ac_objext \
15610     conftest$ac_exeext conftest.$ac_ext
15611 fi
15612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15613 $as_echo "$ac_cv_func_isinf" >&6; }
15614
15615 if test $ac_cv_func_isinf = yes ; then
15616
15617 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15618
15619 else
15620   case " $LIBOBJS " in
15621   *" isinf.$ac_objext "* ) ;;
15622   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15623  ;;
15624 esac
15625
15626   # Look for a way to implement a substitute for isinf()
15627   for ac_func in fpclass fp_class fp_class_d class
15628 do :
15629   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15630 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15631 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15632   cat >>confdefs.h <<_ACEOF
15633 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15634 _ACEOF
15635  break
15636 fi
15637 done
15638
15639 fi
15640
15641 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15642 if test "x$ac_cv_func_crypt" = xyes; then :
15643   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15644
15645 else
15646   case " $LIBOBJS " in
15647   *" crypt.$ac_objext "* ) ;;
15648   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15649  ;;
15650 esac
15651
15652 fi
15653
15654 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15655 if test "x$ac_cv_func_dlopen" = xyes; then :
15656   $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15657
15658 else
15659   case " $LIBOBJS " in
15660   *" dlopen.$ac_objext "* ) ;;
15661   *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15662  ;;
15663 esac
15664
15665 fi
15666
15667 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15668 if test "x$ac_cv_func_fls" = xyes; then :
15669   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15670
15671 else
15672   case " $LIBOBJS " in
15673   *" fls.$ac_objext "* ) ;;
15674   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15675  ;;
15676 esac
15677
15678 fi
15679
15680 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15681 if test "x$ac_cv_func_getopt" = xyes; then :
15682   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15683
15684 else
15685   case " $LIBOBJS " in
15686   *" getopt.$ac_objext "* ) ;;
15687   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15688  ;;
15689 esac
15690
15691 fi
15692
15693 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15694 if test "x$ac_cv_func_getrusage" = xyes; then :
15695   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15696
15697 else
15698   case " $LIBOBJS " in
15699   *" getrusage.$ac_objext "* ) ;;
15700   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15701  ;;
15702 esac
15703
15704 fi
15705
15706 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15707 if test "x$ac_cv_func_inet_aton" = xyes; then :
15708   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15709
15710 else
15711   case " $LIBOBJS " in
15712   *" inet_aton.$ac_objext "* ) ;;
15713   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15714  ;;
15715 esac
15716
15717 fi
15718
15719 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15720 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15721   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15722
15723 else
15724   case " $LIBOBJS " in
15725   *" mkdtemp.$ac_objext "* ) ;;
15726   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15727  ;;
15728 esac
15729
15730 fi
15731
15732 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
15733 if test "x$ac_cv_func_pread" = xyes; then :
15734   $as_echo "#define HAVE_PREAD 1" >>confdefs.h
15735
15736 else
15737   case " $LIBOBJS " in
15738   *" pread.$ac_objext "* ) ;;
15739   *) LIBOBJS="$LIBOBJS pread.$ac_objext"
15740  ;;
15741 esac
15742
15743 fi
15744
15745 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
15746 if test "x$ac_cv_func_pwrite" = xyes; then :
15747   $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
15748
15749 else
15750   case " $LIBOBJS " in
15751   *" pwrite.$ac_objext "* ) ;;
15752   *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
15753  ;;
15754 esac
15755
15756 fi
15757
15758 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15759 if test "x$ac_cv_func_random" = xyes; then :
15760   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15761
15762 else
15763   case " $LIBOBJS " in
15764   *" random.$ac_objext "* ) ;;
15765   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15766  ;;
15767 esac
15768
15769 fi
15770
15771 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15772 if test "x$ac_cv_func_rint" = xyes; then :
15773   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15774
15775 else
15776   case " $LIBOBJS " in
15777   *" rint.$ac_objext "* ) ;;
15778   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15779  ;;
15780 esac
15781
15782 fi
15783
15784 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15785 if test "x$ac_cv_func_srandom" = xyes; then :
15786   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15787
15788 else
15789   case " $LIBOBJS " in
15790   *" srandom.$ac_objext "* ) ;;
15791   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15792  ;;
15793 esac
15794
15795 fi
15796
15797 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15798 if test "x$ac_cv_func_strlcat" = xyes; then :
15799   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15800
15801 else
15802   case " $LIBOBJS " in
15803   *" strlcat.$ac_objext "* ) ;;
15804   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15805  ;;
15806 esac
15807
15808 fi
15809
15810 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15811 if test "x$ac_cv_func_strlcpy" = xyes; then :
15812   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15813
15814 else
15815   case " $LIBOBJS " in
15816   *" strlcpy.$ac_objext "* ) ;;
15817   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15818  ;;
15819 esac
15820
15821 fi
15822
15823 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15824 if test "x$ac_cv_func_strnlen" = xyes; then :
15825   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15826
15827 else
15828   case " $LIBOBJS " in
15829   *" strnlen.$ac_objext "* ) ;;
15830   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15831  ;;
15832 esac
15833
15834 fi
15835
15836
15837
15838 case $host_os in
15839
15840         # Windows uses a specialised env handler
15841         # and doesn't need a replacement getpeereid because it doesn't use
15842         # Unix sockets.
15843         mingw*)
15844
15845 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15846
15847
15848 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15849
15850                 ac_cv_func_unsetenv=yes
15851                 ac_cv_func_getpeereid=yes;;
15852         *)
15853                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15854 if test "x$ac_cv_func_unsetenv" = xyes; then :
15855   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15856
15857 else
15858   case " $LIBOBJS " in
15859   *" unsetenv.$ac_objext "* ) ;;
15860   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15861  ;;
15862 esac
15863
15864 fi
15865
15866 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15867 if test "x$ac_cv_func_getpeereid" = xyes; then :
15868   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15869
15870 else
15871   case " $LIBOBJS " in
15872   *" getpeereid.$ac_objext "* ) ;;
15873   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15874  ;;
15875 esac
15876
15877 fi
15878
15879
15880                 ;;
15881 esac
15882
15883 # System's version of getaddrinfo(), if any, may be used only if we found
15884 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15885 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15886 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15887    test "$PORTNAME" != "win32"; then
15888   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15889 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15890   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15891
15892 else
15893   case " $LIBOBJS " in
15894   *" getaddrinfo.$ac_objext "* ) ;;
15895   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15896  ;;
15897 esac
15898
15899 fi
15900
15901
15902 else
15903   case " $LIBOBJS " in
15904   *" getaddrinfo.$ac_objext "* ) ;;
15905   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15906  ;;
15907 esac
15908
15909 fi
15910
15911 # Similarly, use system's getopt_long() only if system provides struct option.
15912 if test x"$ac_cv_type_struct_option" = xyes ; then
15913   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15914 if test "x$ac_cv_func_getopt_long" = xyes; then :
15915   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15916
15917 else
15918   case " $LIBOBJS " in
15919   *" getopt_long.$ac_objext "* ) ;;
15920   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15921  ;;
15922 esac
15923
15924 fi
15925
15926
15927 else
15928   case " $LIBOBJS " in
15929   *" getopt_long.$ac_objext "* ) ;;
15930   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15931  ;;
15932 esac
15933
15934 fi
15935
15936 # Solaris' getopt() doesn't do what we want for long options, so always use
15937 # our version on that platform.
15938 if test "$PORTNAME" = "solaris"; then
15939   case " $LIBOBJS " in
15940   *" getopt.$ac_objext "* ) ;;
15941   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15942  ;;
15943 esac
15944
15945 fi
15946
15947 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15948 # so always use our version on Windows.
15949 if test "$PORTNAME" = "win32"; then
15950   case " $LIBOBJS " in
15951   *" getopt.$ac_objext "* ) ;;
15952   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15953  ;;
15954 esac
15955
15956   case " $LIBOBJS " in
15957   *" getopt_long.$ac_objext "* ) ;;
15958   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15959  ;;
15960 esac
15961
15962 fi
15963
15964 # Win32 (really MinGW) support
15965 if test "$PORTNAME" = "win32"; then
15966   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15967 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15968   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15969
15970 else
15971   case " $LIBOBJS " in
15972   *" gettimeofday.$ac_objext "* ) ;;
15973   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15974  ;;
15975 esac
15976
15977 fi
15978
15979
15980   case " $LIBOBJS " in
15981   *" dirmod.$ac_objext "* ) ;;
15982   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15983  ;;
15984 esac
15985
15986   case " $LIBOBJS " in
15987   *" kill.$ac_objext "* ) ;;
15988   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15989  ;;
15990 esac
15991
15992   case " $LIBOBJS " in
15993   *" open.$ac_objext "* ) ;;
15994   *) LIBOBJS="$LIBOBJS open.$ac_objext"
15995  ;;
15996 esac
15997
15998   case " $LIBOBJS " in
15999   *" system.$ac_objext "* ) ;;
16000   *) LIBOBJS="$LIBOBJS system.$ac_objext"
16001  ;;
16002 esac
16003
16004   case " $LIBOBJS " in
16005   *" win32env.$ac_objext "* ) ;;
16006   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16007  ;;
16008 esac
16009
16010   case " $LIBOBJS " in
16011   *" win32error.$ac_objext "* ) ;;
16012   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16013  ;;
16014 esac
16015
16016   case " $LIBOBJS " in
16017   *" win32security.$ac_objext "* ) ;;
16018   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16019  ;;
16020 esac
16021
16022   case " $LIBOBJS " in
16023   *" win32setlocale.$ac_objext "* ) ;;
16024   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16025  ;;
16026 esac
16027
16028
16029 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16030
16031   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16032 #define WIN32_LEAN_AND_MEAN
16033 #include <windows.h>
16034 #include <string.h>
16035 #include <dbghelp.h>
16036 "
16037 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16038
16039 cat >>confdefs.h <<_ACEOF
16040 #define HAVE_MINIDUMP_TYPE 1
16041 _ACEOF
16042
16043 pgac_minidump_type=yes
16044 else
16045   pgac_minidump_type=no
16046 fi
16047
16048 fi
16049 if test x"$pgac_minidump_type" = x"yes" ; then
16050   have_win32_dbghelp=yes
16051
16052 else
16053   have_win32_dbghelp=no
16054
16055 fi
16056
16057 # Cygwin needs only a bit of that
16058 if test "$PORTNAME" = "cygwin"; then
16059   case " $LIBOBJS " in
16060   *" dirmod.$ac_objext "* ) ;;
16061   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16062  ;;
16063 esac
16064
16065 fi
16066
16067 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
16068 /* NetBSD declares sys_siglist in unistd.h.  */
16069 #ifdef HAVE_UNISTD_H
16070 # include <unistd.h>
16071 #endif
16072
16073 "
16074 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
16075   ac_have_decl=1
16076 else
16077   ac_have_decl=0
16078 fi
16079
16080 cat >>confdefs.h <<_ACEOF
16081 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
16082 _ACEOF
16083
16084
16085 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16086 if test "x$ac_cv_func_syslog" = xyes; then :
16087   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16088 if test "x$ac_cv_header_syslog_h" = xyes; then :
16089
16090 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16091
16092 fi
16093
16094
16095 fi
16096
16097
16098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16099 $as_echo_n "checking for opterr... " >&6; }
16100 if ${pgac_cv_var_int_opterr+:} false; then :
16101   $as_echo_n "(cached) " >&6
16102 else
16103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16104 /* end confdefs.h.  */
16105 #include <unistd.h>
16106 int
16107 main ()
16108 {
16109 extern int opterr; opterr = 1;
16110   ;
16111   return 0;
16112 }
16113 _ACEOF
16114 if ac_fn_c_try_link "$LINENO"; then :
16115   pgac_cv_var_int_opterr=yes
16116 else
16117   pgac_cv_var_int_opterr=no
16118 fi
16119 rm -f core conftest.err conftest.$ac_objext \
16120     conftest$ac_exeext conftest.$ac_ext
16121 fi
16122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16123 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16124 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16125
16126 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16127
16128 fi
16129
16130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16131 $as_echo_n "checking for optreset... " >&6; }
16132 if ${pgac_cv_var_int_optreset+:} false; then :
16133   $as_echo_n "(cached) " >&6
16134 else
16135   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16136 /* end confdefs.h.  */
16137 #include <unistd.h>
16138 int
16139 main ()
16140 {
16141 extern int optreset; optreset = 1;
16142   ;
16143   return 0;
16144 }
16145 _ACEOF
16146 if ac_fn_c_try_link "$LINENO"; then :
16147   pgac_cv_var_int_optreset=yes
16148 else
16149   pgac_cv_var_int_optreset=no
16150 fi
16151 rm -f core conftest.err conftest.$ac_objext \
16152     conftest$ac_exeext conftest.$ac_ext
16153 fi
16154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16155 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16156 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16157
16158 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16159
16160 fi
16161
16162 for ac_func in strtoll __strtoll strtoq
16163 do :
16164   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16165 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16166 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16167   cat >>confdefs.h <<_ACEOF
16168 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16169 _ACEOF
16170  break
16171 fi
16172 done
16173
16174 for ac_func in strtoull __strtoull strtouq
16175 do :
16176   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16177 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16178 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16179   cat >>confdefs.h <<_ACEOF
16180 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16181 _ACEOF
16182  break
16183 fi
16184 done
16185
16186 # strto[u]ll may exist but not be declared
16187 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16188 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16189   ac_have_decl=1
16190 else
16191   ac_have_decl=0
16192 fi
16193
16194 cat >>confdefs.h <<_ACEOF
16195 #define HAVE_DECL_STRTOLL $ac_have_decl
16196 _ACEOF
16197 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16198 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16199   ac_have_decl=1
16200 else
16201   ac_have_decl=0
16202 fi
16203
16204 cat >>confdefs.h <<_ACEOF
16205 #define HAVE_DECL_STRTOULL $ac_have_decl
16206 _ACEOF
16207
16208
16209 if test "$with_icu" = yes; then
16210   ac_save_CPPFLAGS=$CPPFLAGS
16211   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16212
16213   # Verify we have ICU's header files
16214   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16215 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16216
16217 else
16218   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16219 fi
16220
16221
16222
16223   CPPFLAGS=$ac_save_CPPFLAGS
16224 fi
16225
16226 if test "$with_llvm" = yes; then
16227
16228   # Check which functionality is present
16229   SAVE_CPPFLAGS="$CPPFLAGS"
16230   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16231   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16232 "
16233 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16234   ac_have_decl=1
16235 else
16236   ac_have_decl=0
16237 fi
16238
16239 cat >>confdefs.h <<_ACEOF
16240 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16241 _ACEOF
16242
16243   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16244 "
16245 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16246   ac_have_decl=1
16247 else
16248   ac_have_decl=0
16249 fi
16250
16251 cat >>confdefs.h <<_ACEOF
16252 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16253 _ACEOF
16254 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16255 "
16256 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16257   ac_have_decl=1
16258 else
16259   ac_have_decl=0
16260 fi
16261
16262 cat >>confdefs.h <<_ACEOF
16263 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16264 _ACEOF
16265
16266   ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16267 "
16268 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16269   ac_have_decl=1
16270 else
16271   ac_have_decl=0
16272 fi
16273
16274 cat >>confdefs.h <<_ACEOF
16275 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16276 _ACEOF
16277 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16278 "
16279 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16280   ac_have_decl=1
16281 else
16282   ac_have_decl=0
16283 fi
16284
16285 cat >>confdefs.h <<_ACEOF
16286 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16287 _ACEOF
16288
16289   CPPFLAGS="$SAVE_CPPFLAGS"
16290
16291 fi
16292
16293 # Lastly, restore full LIBS list and check for readline/libedit symbols
16294 LIBS="$LIBS_including_readline"
16295
16296 if test "$with_readline" = yes; then
16297   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16298 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16299 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16300   $as_echo_n "(cached) " >&6
16301 else
16302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16303 /* end confdefs.h.  */
16304 #include <stdio.h>
16305 #ifdef HAVE_READLINE_READLINE_H
16306 # include <readline/readline.h>
16307 #elif defined(HAVE_READLINE_H)
16308 # include <readline.h>
16309 #endif
16310
16311 int
16312 main ()
16313 {
16314 rl_completion_append_character = 'x';
16315   ;
16316   return 0;
16317 }
16318 _ACEOF
16319 if ac_fn_c_try_link "$LINENO"; then :
16320   pgac_cv_var_rl_completion_append_character=yes
16321 else
16322   pgac_cv_var_rl_completion_append_character=no
16323 fi
16324 rm -f core conftest.err conftest.$ac_objext \
16325     conftest$ac_exeext conftest.$ac_ext
16326 fi
16327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16328 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16329 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16330
16331 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16332
16333 fi
16334   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16335 do :
16336   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16337 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16338 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16339   cat >>confdefs.h <<_ACEOF
16340 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16341 _ACEOF
16342
16343 fi
16344 done
16345
16346   for ac_func in append_history history_truncate_file
16347 do :
16348   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16349 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16350 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16351   cat >>confdefs.h <<_ACEOF
16352 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16353 _ACEOF
16354
16355 fi
16356 done
16357
16358 fi
16359
16360
16361 # This test makes sure that run tests work at all.  Sometimes a shared
16362 # library is found by the linker, but the runtime linker can't find it.
16363 # This check should come after all modifications of compiler or linker
16364 # variables, and before any other run tests.
16365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16366 $as_echo_n "checking test program... " >&6; }
16367 if test "$cross_compiling" = yes; then :
16368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16369 $as_echo "cross-compiling" >&6; }
16370 else
16371   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16372 /* end confdefs.h.  */
16373 int main() { return 0; }
16374 _ACEOF
16375 if ac_fn_c_try_run "$LINENO"; then :
16376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16377 $as_echo "ok" >&6; }
16378 else
16379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16380 $as_echo "failed" >&6; }
16381 as_fn_error $? "
16382 Could not execute a simple test program.  This may be a problem
16383 related to locating shared libraries.  Check the file 'config.log'
16384 for the exact reason." "$LINENO" 5
16385 fi
16386 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16387   conftest.$ac_objext conftest.beam conftest.$ac_ext
16388 fi
16389
16390
16391 # --------------------
16392 # Run tests below here
16393 # --------------------
16394
16395
16396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16397 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16398 if ${pgac_cv_type_long_int_64+:} false; then :
16399   $as_echo_n "(cached) " >&6
16400 else
16401   if test "$cross_compiling" = yes; then :
16402   # If cross-compiling, check the size reported by the compiler and
16403 # trust that the arithmetic works.
16404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16405 /* end confdefs.h.  */
16406
16407 int
16408 main ()
16409 {
16410 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16411 test_array [0] = 0;
16412 return test_array [0];
16413
16414   ;
16415   return 0;
16416 }
16417 _ACEOF
16418 if ac_fn_c_try_compile "$LINENO"; then :
16419   pgac_cv_type_long_int_64=yes
16420 else
16421   pgac_cv_type_long_int_64=no
16422 fi
16423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16424 else
16425   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16426 /* end confdefs.h.  */
16427 typedef long int ac_int64;
16428
16429 /*
16430  * These are globals to discourage the compiler from folding all the
16431  * arithmetic tests down to compile-time constants.
16432  */
16433 ac_int64 a = 20000001;
16434 ac_int64 b = 40000005;
16435
16436 int does_int64_work()
16437 {
16438   ac_int64 c,d;
16439
16440   if (sizeof(ac_int64) != 8)
16441     return 0;                   /* definitely not the right size */
16442
16443   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16444   c = a * b;
16445   d = (c + b) / b;
16446   if (d != a+1)
16447     return 0;
16448   return 1;
16449 }
16450
16451 int
16452 main() {
16453   return (! does_int64_work());
16454 }
16455 _ACEOF
16456 if ac_fn_c_try_run "$LINENO"; then :
16457   pgac_cv_type_long_int_64=yes
16458 else
16459   pgac_cv_type_long_int_64=no
16460 fi
16461 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16462   conftest.$ac_objext conftest.beam conftest.$ac_ext
16463 fi
16464
16465 fi
16466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16467 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16468
16469 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16470 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16471
16472 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16473
16474 fi
16475
16476
16477 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16478   pg_int64_type="long int"
16479 else
16480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16481 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16482 if ${pgac_cv_type_long_long_int_64+:} false; then :
16483   $as_echo_n "(cached) " >&6
16484 else
16485   if test "$cross_compiling" = yes; then :
16486   # If cross-compiling, check the size reported by the compiler and
16487 # trust that the arithmetic works.
16488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16489 /* end confdefs.h.  */
16490
16491 int
16492 main ()
16493 {
16494 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16495 test_array [0] = 0;
16496 return test_array [0];
16497
16498   ;
16499   return 0;
16500 }
16501 _ACEOF
16502 if ac_fn_c_try_compile "$LINENO"; then :
16503   pgac_cv_type_long_long_int_64=yes
16504 else
16505   pgac_cv_type_long_long_int_64=no
16506 fi
16507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16508 else
16509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16510 /* end confdefs.h.  */
16511 typedef long long int ac_int64;
16512
16513 /*
16514  * These are globals to discourage the compiler from folding all the
16515  * arithmetic tests down to compile-time constants.
16516  */
16517 ac_int64 a = 20000001;
16518 ac_int64 b = 40000005;
16519
16520 int does_int64_work()
16521 {
16522   ac_int64 c,d;
16523
16524   if (sizeof(ac_int64) != 8)
16525     return 0;                   /* definitely not the right size */
16526
16527   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16528   c = a * b;
16529   d = (c + b) / b;
16530   if (d != a+1)
16531     return 0;
16532   return 1;
16533 }
16534
16535 int
16536 main() {
16537   return (! does_int64_work());
16538 }
16539 _ACEOF
16540 if ac_fn_c_try_run "$LINENO"; then :
16541   pgac_cv_type_long_long_int_64=yes
16542 else
16543   pgac_cv_type_long_long_int_64=no
16544 fi
16545 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16546   conftest.$ac_objext conftest.beam conftest.$ac_ext
16547 fi
16548
16549 fi
16550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16551 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16552
16553 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16554 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16555
16556 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16557
16558 fi
16559
16560   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16561     pg_int64_type="long long int"
16562   else
16563     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16564   fi
16565 fi
16566
16567
16568 cat >>confdefs.h <<_ACEOF
16569 #define PG_INT64_TYPE $pg_int64_type
16570 _ACEOF
16571
16572
16573 # Select the printf length modifier that goes with that, too.
16574 if test x"$pg_int64_type" = x"long long int" ; then
16575   INT64_MODIFIER='"ll"'
16576 else
16577   INT64_MODIFIER='"l"'
16578 fi
16579
16580
16581 cat >>confdefs.h <<_ACEOF
16582 #define INT64_MODIFIER $INT64_MODIFIER
16583 _ACEOF
16584
16585
16586 # has to be down here, rather than with the other builtins, because
16587 # the test uses PG_INT64_TYPE.
16588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16589 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16590 if ${pgac_cv__builtin_op_overflow+:} false; then :
16591   $as_echo_n "(cached) " >&6
16592 else
16593   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16594 /* end confdefs.h.  */
16595
16596 PG_INT64_TYPE a = 1;
16597 PG_INT64_TYPE b = 1;
16598 PG_INT64_TYPE result;
16599 int oflo;
16600
16601 int
16602 main ()
16603 {
16604 oflo = __builtin_mul_overflow(a, b, &result);
16605   ;
16606   return 0;
16607 }
16608 _ACEOF
16609 if ac_fn_c_try_link "$LINENO"; then :
16610   pgac_cv__builtin_op_overflow=yes
16611 else
16612   pgac_cv__builtin_op_overflow=no
16613 fi
16614 rm -f core conftest.err conftest.$ac_objext \
16615     conftest$ac_exeext conftest.$ac_ext
16616 fi
16617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16618 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16619 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16620
16621 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16622
16623 fi
16624
16625 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16626 # The cast to long int works around a bug in the HP C Compiler
16627 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16628 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16629 # This bug is HP SR number 8606223364.
16630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16631 $as_echo_n "checking size of void *... " >&6; }
16632 if ${ac_cv_sizeof_void_p+:} false; then :
16633   $as_echo_n "(cached) " >&6
16634 else
16635   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16636
16637 else
16638   if test "$ac_cv_type_void_p" = yes; then
16639      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16640 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16641 as_fn_error 77 "cannot compute sizeof (void *)
16642 See \`config.log' for more details" "$LINENO" 5; }
16643    else
16644      ac_cv_sizeof_void_p=0
16645    fi
16646 fi
16647
16648 fi
16649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16650 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16651
16652
16653
16654 cat >>confdefs.h <<_ACEOF
16655 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16656 _ACEOF
16657
16658
16659 # The cast to long int works around a bug in the HP C Compiler
16660 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16661 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16662 # This bug is HP SR number 8606223364.
16663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16664 $as_echo_n "checking size of size_t... " >&6; }
16665 if ${ac_cv_sizeof_size_t+:} false; then :
16666   $as_echo_n "(cached) " >&6
16667 else
16668   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16669
16670 else
16671   if test "$ac_cv_type_size_t" = yes; then
16672      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16673 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16674 as_fn_error 77 "cannot compute sizeof (size_t)
16675 See \`config.log' for more details" "$LINENO" 5; }
16676    else
16677      ac_cv_sizeof_size_t=0
16678    fi
16679 fi
16680
16681 fi
16682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16683 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16684
16685
16686
16687 cat >>confdefs.h <<_ACEOF
16688 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16689 _ACEOF
16690
16691
16692 # The cast to long int works around a bug in the HP C Compiler
16693 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16694 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16695 # This bug is HP SR number 8606223364.
16696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16697 $as_echo_n "checking size of long... " >&6; }
16698 if ${ac_cv_sizeof_long+:} false; then :
16699   $as_echo_n "(cached) " >&6
16700 else
16701   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16702
16703 else
16704   if test "$ac_cv_type_long" = yes; then
16705      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16706 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16707 as_fn_error 77 "cannot compute sizeof (long)
16708 See \`config.log' for more details" "$LINENO" 5; }
16709    else
16710      ac_cv_sizeof_long=0
16711    fi
16712 fi
16713
16714 fi
16715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16716 $as_echo "$ac_cv_sizeof_long" >&6; }
16717
16718
16719
16720 cat >>confdefs.h <<_ACEOF
16721 #define SIZEOF_LONG $ac_cv_sizeof_long
16722 _ACEOF
16723
16724
16725
16726 # Decide whether float4 is passed by value: user-selectable, enabled by default
16727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16728 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16729
16730
16731 # Check whether --enable-float4-byval was given.
16732 if test "${enable_float4_byval+set}" = set; then :
16733   enableval=$enable_float4_byval;
16734   case $enableval in
16735     yes)
16736
16737 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16738
16739                float4passbyval=true
16740       ;;
16741     no)
16742       float4passbyval=false
16743       ;;
16744     *)
16745       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16746       ;;
16747   esac
16748
16749 else
16750   enable_float4_byval=yes
16751
16752 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16753
16754                float4passbyval=true
16755 fi
16756
16757
16758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16759 $as_echo "$enable_float4_byval" >&6; }
16760
16761 cat >>confdefs.h <<_ACEOF
16762 #define FLOAT4PASSBYVAL $float4passbyval
16763 _ACEOF
16764
16765
16766 # Decide whether float8 is passed by value.
16767 # Note: this setting also controls int8 and related types such as timestamp.
16768 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16769 # If not, trying to select it is an error.
16770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16771 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16772 if test $ac_cv_sizeof_void_p -ge 8 ; then
16773
16774
16775 # Check whether --enable-float8-byval was given.
16776 if test "${enable_float8_byval+set}" = set; then :
16777   enableval=$enable_float8_byval;
16778   case $enableval in
16779     yes)
16780       :
16781       ;;
16782     no)
16783       :
16784       ;;
16785     *)
16786       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16787       ;;
16788   esac
16789
16790 else
16791   enable_float8_byval=yes
16792
16793 fi
16794
16795
16796 else
16797
16798
16799 # Check whether --enable-float8-byval was given.
16800 if test "${enable_float8_byval+set}" = set; then :
16801   enableval=$enable_float8_byval;
16802   case $enableval in
16803     yes)
16804       :
16805       ;;
16806     no)
16807       :
16808       ;;
16809     *)
16810       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16811       ;;
16812   esac
16813
16814 else
16815   enable_float8_byval=no
16816
16817 fi
16818
16819
16820   if test "$enable_float8_byval" = yes ; then
16821     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16822   fi
16823 fi
16824 if test "$enable_float8_byval" = yes ; then
16825
16826 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16827
16828   float8passbyval=true
16829 else
16830   float8passbyval=false
16831 fi
16832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16833 $as_echo "$enable_float8_byval" >&6; }
16834
16835 cat >>confdefs.h <<_ACEOF
16836 #define FLOAT8PASSBYVAL $float8passbyval
16837 _ACEOF
16838
16839
16840 # Determine memory alignment requirements for the basic C data types.
16841
16842 # The cast to long int works around a bug in the HP C Compiler,
16843 # see AC_CHECK_SIZEOF for more information.
16844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16845 $as_echo_n "checking alignment of short... " >&6; }
16846 if ${ac_cv_alignof_short+:} false; then :
16847   $as_echo_n "(cached) " >&6
16848 else
16849   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16850 #ifndef offsetof
16851 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16852 #endif
16853 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16854
16855 else
16856   if test "$ac_cv_type_short" = yes; then
16857      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16858 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16859 as_fn_error 77 "cannot compute alignment of short
16860 See \`config.log' for more details" "$LINENO" 5; }
16861    else
16862      ac_cv_alignof_short=0
16863    fi
16864 fi
16865
16866 fi
16867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16868 $as_echo "$ac_cv_alignof_short" >&6; }
16869
16870
16871
16872 cat >>confdefs.h <<_ACEOF
16873 #define ALIGNOF_SHORT $ac_cv_alignof_short
16874 _ACEOF
16875
16876
16877 # The cast to long int works around a bug in the HP C Compiler,
16878 # see AC_CHECK_SIZEOF for more information.
16879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16880 $as_echo_n "checking alignment of int... " >&6; }
16881 if ${ac_cv_alignof_int+:} false; then :
16882   $as_echo_n "(cached) " >&6
16883 else
16884   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16885 #ifndef offsetof
16886 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16887 #endif
16888 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16889
16890 else
16891   if test "$ac_cv_type_int" = yes; then
16892      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16893 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16894 as_fn_error 77 "cannot compute alignment of int
16895 See \`config.log' for more details" "$LINENO" 5; }
16896    else
16897      ac_cv_alignof_int=0
16898    fi
16899 fi
16900
16901 fi
16902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16903 $as_echo "$ac_cv_alignof_int" >&6; }
16904
16905
16906
16907 cat >>confdefs.h <<_ACEOF
16908 #define ALIGNOF_INT $ac_cv_alignof_int
16909 _ACEOF
16910
16911
16912 # The cast to long int works around a bug in the HP C Compiler,
16913 # see AC_CHECK_SIZEOF for more information.
16914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16915 $as_echo_n "checking alignment of long... " >&6; }
16916 if ${ac_cv_alignof_long+:} false; then :
16917   $as_echo_n "(cached) " >&6
16918 else
16919   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16920 #ifndef offsetof
16921 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16922 #endif
16923 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16924
16925 else
16926   if test "$ac_cv_type_long" = yes; then
16927      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16928 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16929 as_fn_error 77 "cannot compute alignment of long
16930 See \`config.log' for more details" "$LINENO" 5; }
16931    else
16932      ac_cv_alignof_long=0
16933    fi
16934 fi
16935
16936 fi
16937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16938 $as_echo "$ac_cv_alignof_long" >&6; }
16939
16940
16941
16942 cat >>confdefs.h <<_ACEOF
16943 #define ALIGNOF_LONG $ac_cv_alignof_long
16944 _ACEOF
16945
16946
16947 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16948   # The cast to long int works around a bug in the HP C Compiler,
16949 # see AC_CHECK_SIZEOF for more information.
16950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16951 $as_echo_n "checking alignment of long long int... " >&6; }
16952 if ${ac_cv_alignof_long_long_int+:} false; then :
16953   $as_echo_n "(cached) " >&6
16954 else
16955   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
16956 #ifndef offsetof
16957 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16958 #endif
16959 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16960
16961 else
16962   if test "$ac_cv_type_long_long_int" = yes; then
16963      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16964 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16965 as_fn_error 77 "cannot compute alignment of long long int
16966 See \`config.log' for more details" "$LINENO" 5; }
16967    else
16968      ac_cv_alignof_long_long_int=0
16969    fi
16970 fi
16971
16972 fi
16973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16974 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16975
16976
16977
16978 cat >>confdefs.h <<_ACEOF
16979 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16980 _ACEOF
16981
16982
16983 fi
16984 # The cast to long int works around a bug in the HP C Compiler,
16985 # see AC_CHECK_SIZEOF for more information.
16986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16987 $as_echo_n "checking alignment of double... " >&6; }
16988 if ${ac_cv_alignof_double+:} false; then :
16989   $as_echo_n "(cached) " >&6
16990 else
16991   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
16992 #ifndef offsetof
16993 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16994 #endif
16995 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16996
16997 else
16998   if test "$ac_cv_type_double" = yes; then
16999      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17000 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17001 as_fn_error 77 "cannot compute alignment of double
17002 See \`config.log' for more details" "$LINENO" 5; }
17003    else
17004      ac_cv_alignof_double=0
17005    fi
17006 fi
17007
17008 fi
17009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17010 $as_echo "$ac_cv_alignof_double" >&6; }
17011
17012
17013
17014 cat >>confdefs.h <<_ACEOF
17015 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17016 _ACEOF
17017
17018
17019
17020 # Compute maximum alignment of any basic type.
17021 # We assume long's alignment is at least as strong as char, short, or int;
17022 # but we must check long long (if it is being used for int64) and double.
17023 # Note that we intentionally do not consider any types wider than 64 bits,
17024 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17025 # for disk and memory space.
17026
17027 MAX_ALIGNOF=$ac_cv_alignof_long
17028 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17029   MAX_ALIGNOF=$ac_cv_alignof_double
17030 fi
17031 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17032   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17033 fi
17034
17035 cat >>confdefs.h <<_ACEOF
17036 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17037 _ACEOF
17038
17039
17040
17041 # Some platforms predefine the types int8, int16, etc.  Only check
17042 # a (hopefully) representative subset.
17043 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17044 "
17045 if test "x$ac_cv_type_int8" = xyes; then :
17046
17047 cat >>confdefs.h <<_ACEOF
17048 #define HAVE_INT8 1
17049 _ACEOF
17050
17051
17052 fi
17053 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17054 "
17055 if test "x$ac_cv_type_uint8" = xyes; then :
17056
17057 cat >>confdefs.h <<_ACEOF
17058 #define HAVE_UINT8 1
17059 _ACEOF
17060
17061
17062 fi
17063 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17064 "
17065 if test "x$ac_cv_type_int64" = xyes; then :
17066
17067 cat >>confdefs.h <<_ACEOF
17068 #define HAVE_INT64 1
17069 _ACEOF
17070
17071
17072 fi
17073 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17074 "
17075 if test "x$ac_cv_type_uint64" = xyes; then :
17076
17077 cat >>confdefs.h <<_ACEOF
17078 #define HAVE_UINT64 1
17079 _ACEOF
17080
17081
17082 fi
17083
17084
17085 # Some compilers offer a 128-bit integer scalar type.
17086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17087 $as_echo_n "checking for __int128... " >&6; }
17088 if ${pgac_cv__128bit_int+:} false; then :
17089   $as_echo_n "(cached) " >&6
17090 else
17091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17092 /* end confdefs.h.  */
17093
17094 /*
17095  * We don't actually run this test, just link it to verify that any support
17096  * functions needed for __int128 are present.
17097  *
17098  * These are globals to discourage the compiler from folding all the
17099  * arithmetic tests down to compile-time constants.  We do not have
17100  * convenient support for 128bit literals at this point...
17101  */
17102 __int128 a = 48828125;
17103 __int128 b = 97656250;
17104
17105 int
17106 main ()
17107 {
17108
17109 __int128 c,d;
17110 a = (a << 12) + 1; /* 200000000001 */
17111 b = (b << 12) + 5; /* 400000000005 */
17112 /* try the most relevant arithmetic ops */
17113 c = a * b;
17114 d = (c + b) / b;
17115 /* must use the results, else compiler may optimize arithmetic away */
17116 if (d != a+1)
17117   return 1;
17118
17119   ;
17120   return 0;
17121 }
17122 _ACEOF
17123 if ac_fn_c_try_link "$LINENO"; then :
17124   pgac_cv__128bit_int=yes
17125 else
17126   pgac_cv__128bit_int=no
17127 fi
17128 rm -f core conftest.err conftest.$ac_objext \
17129     conftest$ac_exeext conftest.$ac_ext
17130 fi
17131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17132 $as_echo "$pgac_cv__128bit_int" >&6; }
17133 if test x"$pgac_cv__128bit_int" = xyes ; then
17134   # Use of non-default alignment with __int128 tickles bugs in some compilers.
17135   # If not cross-compiling, we can test for bugs and disable use of __int128
17136   # with buggy compilers.  If cross-compiling, hope for the best.
17137   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17138   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17139 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17140 if ${pgac_cv__128bit_int_bug+:} false; then :
17141   $as_echo_n "(cached) " >&6
17142 else
17143   if test "$cross_compiling" = yes; then :
17144   pgac_cv__128bit_int_bug="assuming ok"
17145 else
17146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17147 /* end confdefs.h.  */
17148
17149 /* This must match the corresponding code in c.h: */
17150 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17151 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17152 #endif
17153 typedef __int128 int128a
17154 #if defined(pg_attribute_aligned)
17155 pg_attribute_aligned(8)
17156 #endif
17157 ;
17158 int128a holder;
17159 void pass_by_val(void *buffer, int128a par) { holder = par; }
17160
17161 int
17162 main ()
17163 {
17164
17165 long int i64 = 97656225L << 12;
17166 int128a q;
17167 pass_by_val(main, (int128a) i64);
17168 q = (int128a) i64;
17169 if (q != holder)
17170   return 1;
17171
17172   ;
17173   return 0;
17174 }
17175 _ACEOF
17176 if ac_fn_c_try_run "$LINENO"; then :
17177   pgac_cv__128bit_int_bug=ok
17178 else
17179   pgac_cv__128bit_int_bug=broken
17180 fi
17181 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17182   conftest.$ac_objext conftest.beam conftest.$ac_ext
17183 fi
17184
17185 fi
17186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17187 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17188   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17189
17190 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17191
17192     # The cast to long int works around a bug in the HP C Compiler,
17193 # see AC_CHECK_SIZEOF for more information.
17194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17195 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17196 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17197   $as_echo_n "(cached) " >&6
17198 else
17199   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
17200 #ifndef offsetof
17201 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17202 #endif
17203 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17204
17205 else
17206   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17207      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17208 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17209 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17210 See \`config.log' for more details" "$LINENO" 5; }
17211    else
17212      ac_cv_alignof_PG_INT128_TYPE=0
17213    fi
17214 fi
17215
17216 fi
17217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17218 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17219
17220
17221
17222 cat >>confdefs.h <<_ACEOF
17223 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17224 _ACEOF
17225
17226
17227   fi
17228 fi
17229
17230 # Check for various atomic operations now that we have checked how to declare
17231 # 64bit integers.
17232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17233 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17234 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17235   $as_echo_n "(cached) " >&6
17236 else
17237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17238 /* end confdefs.h.  */
17239
17240 int
17241 main ()
17242 {
17243 char lock = 0;
17244    __sync_lock_test_and_set(&lock, 1);
17245    __sync_lock_release(&lock);
17246   ;
17247   return 0;
17248 }
17249 _ACEOF
17250 if ac_fn_c_try_link "$LINENO"; then :
17251   pgac_cv_gcc_sync_char_tas="yes"
17252 else
17253   pgac_cv_gcc_sync_char_tas="no"
17254 fi
17255 rm -f core conftest.err conftest.$ac_objext \
17256     conftest$ac_exeext conftest.$ac_ext
17257 fi
17258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17259 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17260 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17261
17262 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17263
17264 fi
17265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17266 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17267 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17268   $as_echo_n "(cached) " >&6
17269 else
17270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17271 /* end confdefs.h.  */
17272
17273 int
17274 main ()
17275 {
17276 int lock = 0;
17277    __sync_lock_test_and_set(&lock, 1);
17278    __sync_lock_release(&lock);
17279   ;
17280   return 0;
17281 }
17282 _ACEOF
17283 if ac_fn_c_try_link "$LINENO"; then :
17284   pgac_cv_gcc_sync_int32_tas="yes"
17285 else
17286   pgac_cv_gcc_sync_int32_tas="no"
17287 fi
17288 rm -f core conftest.err conftest.$ac_objext \
17289     conftest$ac_exeext conftest.$ac_ext
17290 fi
17291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17292 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17293 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17294
17295 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17296
17297 fi
17298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17299 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17300 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17301   $as_echo_n "(cached) " >&6
17302 else
17303   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17304 /* end confdefs.h.  */
17305
17306 int
17307 main ()
17308 {
17309 int val = 0;
17310    __sync_val_compare_and_swap(&val, 0, 37);
17311   ;
17312   return 0;
17313 }
17314 _ACEOF
17315 if ac_fn_c_try_link "$LINENO"; then :
17316   pgac_cv_gcc_sync_int32_cas="yes"
17317 else
17318   pgac_cv_gcc_sync_int32_cas="no"
17319 fi
17320 rm -f core conftest.err conftest.$ac_objext \
17321     conftest$ac_exeext conftest.$ac_ext
17322 fi
17323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17324 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17325 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17326
17327 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17328
17329 fi
17330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17331 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17332 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17333   $as_echo_n "(cached) " >&6
17334 else
17335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17336 /* end confdefs.h.  */
17337
17338 int
17339 main ()
17340 {
17341 PG_INT64_TYPE lock = 0;
17342    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17343   ;
17344   return 0;
17345 }
17346 _ACEOF
17347 if ac_fn_c_try_link "$LINENO"; then :
17348   pgac_cv_gcc_sync_int64_cas="yes"
17349 else
17350   pgac_cv_gcc_sync_int64_cas="no"
17351 fi
17352 rm -f core conftest.err conftest.$ac_objext \
17353     conftest$ac_exeext conftest.$ac_ext
17354 fi
17355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17356 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17357 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17358
17359 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17360
17361 fi
17362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17363 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17364 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17365   $as_echo_n "(cached) " >&6
17366 else
17367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17368 /* end confdefs.h.  */
17369
17370 int
17371 main ()
17372 {
17373 int val = 0;
17374    int expect = 0;
17375    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17376   ;
17377   return 0;
17378 }
17379 _ACEOF
17380 if ac_fn_c_try_link "$LINENO"; then :
17381   pgac_cv_gcc_atomic_int32_cas="yes"
17382 else
17383   pgac_cv_gcc_atomic_int32_cas="no"
17384 fi
17385 rm -f core conftest.err conftest.$ac_objext \
17386     conftest$ac_exeext conftest.$ac_ext
17387 fi
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17389 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17390 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17391
17392 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17393
17394 fi
17395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17396 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17397 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17398   $as_echo_n "(cached) " >&6
17399 else
17400   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17401 /* end confdefs.h.  */
17402
17403 int
17404 main ()
17405 {
17406 PG_INT64_TYPE val = 0;
17407    PG_INT64_TYPE expect = 0;
17408    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17409   ;
17410   return 0;
17411 }
17412 _ACEOF
17413 if ac_fn_c_try_link "$LINENO"; then :
17414   pgac_cv_gcc_atomic_int64_cas="yes"
17415 else
17416   pgac_cv_gcc_atomic_int64_cas="no"
17417 fi
17418 rm -f core conftest.err conftest.$ac_objext \
17419     conftest$ac_exeext conftest.$ac_ext
17420 fi
17421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17422 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17423 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17424
17425 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17426
17427 fi
17428
17429
17430 # Check for x86 cpuid instruction
17431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17432 $as_echo_n "checking for __get_cpuid... " >&6; }
17433 if ${pgac_cv__get_cpuid+:} false; then :
17434   $as_echo_n "(cached) " >&6
17435 else
17436   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17437 /* end confdefs.h.  */
17438 #include <cpuid.h>
17439 int
17440 main ()
17441 {
17442 unsigned int exx[4] = {0, 0, 0, 0};
17443   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17444
17445   ;
17446   return 0;
17447 }
17448 _ACEOF
17449 if ac_fn_c_try_link "$LINENO"; then :
17450   pgac_cv__get_cpuid="yes"
17451 else
17452   pgac_cv__get_cpuid="no"
17453 fi
17454 rm -f core conftest.err conftest.$ac_objext \
17455     conftest$ac_exeext conftest.$ac_ext
17456 fi
17457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17458 $as_echo "$pgac_cv__get_cpuid" >&6; }
17459 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17460
17461 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17462
17463 fi
17464
17465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17466 $as_echo_n "checking for __cpuid... " >&6; }
17467 if ${pgac_cv__cpuid+:} false; then :
17468   $as_echo_n "(cached) " >&6
17469 else
17470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17471 /* end confdefs.h.  */
17472 #include <intrin.h>
17473 int
17474 main ()
17475 {
17476 unsigned int exx[4] = {0, 0, 0, 0};
17477   __get_cpuid(exx[0], 1);
17478
17479   ;
17480   return 0;
17481 }
17482 _ACEOF
17483 if ac_fn_c_try_link "$LINENO"; then :
17484   pgac_cv__cpuid="yes"
17485 else
17486   pgac_cv__cpuid="no"
17487 fi
17488 rm -f core conftest.err conftest.$ac_objext \
17489     conftest$ac_exeext conftest.$ac_ext
17490 fi
17491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17492 $as_echo "$pgac_cv__cpuid" >&6; }
17493 if test x"$pgac_cv__cpuid" = x"yes"; then
17494
17495 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17496
17497 fi
17498
17499 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17500 #
17501 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17502 # with the default compiler flags. If not, check if adding the -msse4.2
17503 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17505 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17506 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17507   $as_echo_n "(cached) " >&6
17508 else
17509   pgac_save_CFLAGS=$CFLAGS
17510 CFLAGS="$pgac_save_CFLAGS "
17511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17512 /* end confdefs.h.  */
17513 #include <nmmintrin.h>
17514 int
17515 main ()
17516 {
17517 unsigned int crc = 0;
17518    crc = _mm_crc32_u8(crc, 0);
17519    crc = _mm_crc32_u32(crc, 0);
17520    /* return computed value, to prevent the above being optimized away */
17521    return crc == 0;
17522   ;
17523   return 0;
17524 }
17525 _ACEOF
17526 if ac_fn_c_try_link "$LINENO"; then :
17527   pgac_cv_sse42_crc32_intrinsics_=yes
17528 else
17529   pgac_cv_sse42_crc32_intrinsics_=no
17530 fi
17531 rm -f core conftest.err conftest.$ac_objext \
17532     conftest$ac_exeext conftest.$ac_ext
17533 CFLAGS="$pgac_save_CFLAGS"
17534 fi
17535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17536 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17537 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17538   CFLAGS_SSE42=""
17539   pgac_sse42_crc32_intrinsics=yes
17540 fi
17541
17542 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17543   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17544 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17545 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17546   $as_echo_n "(cached) " >&6
17547 else
17548   pgac_save_CFLAGS=$CFLAGS
17549 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17551 /* end confdefs.h.  */
17552 #include <nmmintrin.h>
17553 int
17554 main ()
17555 {
17556 unsigned int crc = 0;
17557    crc = _mm_crc32_u8(crc, 0);
17558    crc = _mm_crc32_u32(crc, 0);
17559    /* return computed value, to prevent the above being optimized away */
17560    return crc == 0;
17561   ;
17562   return 0;
17563 }
17564 _ACEOF
17565 if ac_fn_c_try_link "$LINENO"; then :
17566   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17567 else
17568   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17569 fi
17570 rm -f core conftest.err conftest.$ac_objext \
17571     conftest$ac_exeext conftest.$ac_ext
17572 CFLAGS="$pgac_save_CFLAGS"
17573 fi
17574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17575 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17576 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17577   CFLAGS_SSE42="-msse4.2"
17578   pgac_sse42_crc32_intrinsics=yes
17579 fi
17580
17581 fi
17582
17583
17584 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17585 # define __SSE4_2__ in that case.
17586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17587 /* end confdefs.h.  */
17588
17589 int
17590 main ()
17591 {
17592
17593 #ifndef __SSE4_2__
17594 #error __SSE4_2__ not defined
17595 #endif
17596
17597   ;
17598   return 0;
17599 }
17600 _ACEOF
17601 if ac_fn_c_try_compile "$LINENO"; then :
17602   SSE4_2_TARGETED=1
17603 fi
17604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17605
17606 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17607 #
17608 # First check if __crc32c* intrinsics can be used with the default compiler
17609 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17610 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17612 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17613 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17614   $as_echo_n "(cached) " >&6
17615 else
17616   pgac_save_CFLAGS=$CFLAGS
17617 CFLAGS="$pgac_save_CFLAGS "
17618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17619 /* end confdefs.h.  */
17620 #include <arm_acle.h>
17621 int
17622 main ()
17623 {
17624 unsigned int crc = 0;
17625    crc = __crc32cb(crc, 0);
17626    crc = __crc32ch(crc, 0);
17627    crc = __crc32cw(crc, 0);
17628    crc = __crc32cd(crc, 0);
17629    /* return computed value, to prevent the above being optimized away */
17630    return crc == 0;
17631   ;
17632   return 0;
17633 }
17634 _ACEOF
17635 if ac_fn_c_try_link "$LINENO"; then :
17636   pgac_cv_armv8_crc32c_intrinsics_=yes
17637 else
17638   pgac_cv_armv8_crc32c_intrinsics_=no
17639 fi
17640 rm -f core conftest.err conftest.$ac_objext \
17641     conftest$ac_exeext conftest.$ac_ext
17642 CFLAGS="$pgac_save_CFLAGS"
17643 fi
17644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17645 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17646 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17647   CFLAGS_ARMV8_CRC32C=""
17648   pgac_armv8_crc32c_intrinsics=yes
17649 fi
17650
17651 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17652   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17653 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17654 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17655   $as_echo_n "(cached) " >&6
17656 else
17657   pgac_save_CFLAGS=$CFLAGS
17658 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17660 /* end confdefs.h.  */
17661 #include <arm_acle.h>
17662 int
17663 main ()
17664 {
17665 unsigned int crc = 0;
17666    crc = __crc32cb(crc, 0);
17667    crc = __crc32ch(crc, 0);
17668    crc = __crc32cw(crc, 0);
17669    crc = __crc32cd(crc, 0);
17670    /* return computed value, to prevent the above being optimized away */
17671    return crc == 0;
17672   ;
17673   return 0;
17674 }
17675 _ACEOF
17676 if ac_fn_c_try_link "$LINENO"; then :
17677   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17678 else
17679   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17680 fi
17681 rm -f core conftest.err conftest.$ac_objext \
17682     conftest$ac_exeext conftest.$ac_ext
17683 CFLAGS="$pgac_save_CFLAGS"
17684 fi
17685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17686 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17687 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17688   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17689   pgac_armv8_crc32c_intrinsics=yes
17690 fi
17691
17692 fi
17693
17694
17695 # Select CRC-32C implementation.
17696 #
17697 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17698 # use the special CRC instructions for calculating CRC-32C. If we're not
17699 # targeting such a processor, but we can nevertheless produce code that uses
17700 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17701 # implementations and select which one to use at runtime, depending on whether
17702 # SSE 4.2 is supported by the processor we're running on.
17703 #
17704 # Similarly, if we are targeting an ARM processor that has the CRC
17705 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17706 # we're not targeting such a processor, but can nevertheless produce code that
17707 # uses the CRC instructions, compile both, and select at runtime.
17708 #
17709 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17710 # in the template or configure command line.
17711 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
17712   # Use Intel SSE 4.2 if available.
17713   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17714     USE_SSE42_CRC32C=1
17715   else
17716     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17717     # the runtime check.
17718     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
17719       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17720     else
17721       # Use ARM CRC Extension if available.
17722       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17723         USE_ARMV8_CRC32C=1
17724       else
17725         # ARM CRC Extension, with runtime check?
17726         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17727           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17728         else
17729           # fall back to slicing-by-8 algorithm, which doesn't require any
17730           # special CPU support.
17731           USE_SLICING_BY_8_CRC32C=1
17732         fi
17733       fi
17734     fi
17735   fi
17736 fi
17737
17738 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17740 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17741 if test x"$USE_SSE42_CRC32C" = x"1"; then
17742
17743 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17744
17745   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17747 $as_echo "SSE 4.2" >&6; }
17748 else
17749   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17750
17751 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17752
17753     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17754     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17755 $as_echo "SSE 4.2 with runtime check" >&6; }
17756   else
17757     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17758
17759 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17760
17761       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17762       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17763 $as_echo "ARMv8 CRC instructions" >&6; }
17764     else
17765       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17766
17767 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17768
17769         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17770         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17771 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17772       else
17773
17774 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17775
17776         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17777         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17778 $as_echo "slicing-by-8" >&6; }
17779       fi
17780     fi
17781   fi
17782 fi
17783
17784
17785
17786 # Select semaphore implementation type.
17787 if test "$PORTNAME" != "win32"; then
17788   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17789     # Need sem_open for this
17790     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17791 $as_echo_n "checking for library containing sem_open... " >&6; }
17792 if ${ac_cv_search_sem_open+:} false; then :
17793   $as_echo_n "(cached) " >&6
17794 else
17795   ac_func_search_save_LIBS=$LIBS
17796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17797 /* end confdefs.h.  */
17798
17799 /* Override any GCC internal prototype to avoid an error.
17800    Use char because int might match the return type of a GCC
17801    builtin and then its argument prototype would still apply.  */
17802 #ifdef __cplusplus
17803 extern "C"
17804 #endif
17805 char sem_open ();
17806 int
17807 main ()
17808 {
17809 return sem_open ();
17810   ;
17811   return 0;
17812 }
17813 _ACEOF
17814 for ac_lib in '' rt pthread; do
17815   if test -z "$ac_lib"; then
17816     ac_res="none required"
17817   else
17818     ac_res=-l$ac_lib
17819     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17820   fi
17821   if ac_fn_c_try_link "$LINENO"; then :
17822   ac_cv_search_sem_open=$ac_res
17823 fi
17824 rm -f core conftest.err conftest.$ac_objext \
17825     conftest$ac_exeext
17826   if ${ac_cv_search_sem_open+:} false; then :
17827   break
17828 fi
17829 done
17830 if ${ac_cv_search_sem_open+:} false; then :
17831
17832 else
17833   ac_cv_search_sem_open=no
17834 fi
17835 rm conftest.$ac_ext
17836 LIBS=$ac_func_search_save_LIBS
17837 fi
17838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17839 $as_echo "$ac_cv_search_sem_open" >&6; }
17840 ac_res=$ac_cv_search_sem_open
17841 if test "$ac_res" != no; then :
17842   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17843   USE_NAMED_POSIX_SEMAPHORES=1
17844 fi
17845
17846   fi
17847   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17848     # Need sem_init for this
17849     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17850 $as_echo_n "checking for library containing sem_init... " >&6; }
17851 if ${ac_cv_search_sem_init+:} false; then :
17852   $as_echo_n "(cached) " >&6
17853 else
17854   ac_func_search_save_LIBS=$LIBS
17855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17856 /* end confdefs.h.  */
17857
17858 /* Override any GCC internal prototype to avoid an error.
17859    Use char because int might match the return type of a GCC
17860    builtin and then its argument prototype would still apply.  */
17861 #ifdef __cplusplus
17862 extern "C"
17863 #endif
17864 char sem_init ();
17865 int
17866 main ()
17867 {
17868 return sem_init ();
17869   ;
17870   return 0;
17871 }
17872 _ACEOF
17873 for ac_lib in '' rt pthread; do
17874   if test -z "$ac_lib"; then
17875     ac_res="none required"
17876   else
17877     ac_res=-l$ac_lib
17878     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17879   fi
17880   if ac_fn_c_try_link "$LINENO"; then :
17881   ac_cv_search_sem_init=$ac_res
17882 fi
17883 rm -f core conftest.err conftest.$ac_objext \
17884     conftest$ac_exeext
17885   if ${ac_cv_search_sem_init+:} false; then :
17886   break
17887 fi
17888 done
17889 if ${ac_cv_search_sem_init+:} false; then :
17890
17891 else
17892   ac_cv_search_sem_init=no
17893 fi
17894 rm conftest.$ac_ext
17895 LIBS=$ac_func_search_save_LIBS
17896 fi
17897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17898 $as_echo "$ac_cv_search_sem_init" >&6; }
17899 ac_res=$ac_cv_search_sem_init
17900 if test "$ac_res" != no; then :
17901   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17902   USE_UNNAMED_POSIX_SEMAPHORES=1
17903 fi
17904
17905   fi
17906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17907 $as_echo_n "checking which semaphore API to use... " >&6; }
17908   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17909
17910 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17911
17912     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17913     sematype="named POSIX"
17914   else
17915     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17916
17917 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17918
17919       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17920       sematype="unnamed POSIX"
17921     else
17922
17923 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17924
17925       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17926       sematype="System V"
17927     fi
17928   fi
17929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17930 $as_echo "$sematype" >&6; }
17931 else
17932
17933 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17934
17935   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17936 fi
17937
17938
17939 # Select shared-memory implementation type.
17940 if test "$PORTNAME" != "win32"; then
17941
17942 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17943
17944   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17945 else
17946
17947 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17948
17949   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17950 fi
17951
17952 # Select random number source
17953 #
17954 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17955 # in the template or configure command line.
17956
17957 # If not selected manually, try to select a source automatically.
17958 if test "$enable_strong_random" = "yes" && test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
17959   if test x"$with_openssl" = x"yes" ; then
17960     USE_OPENSSL_RANDOM=1
17961   elif test "$PORTNAME" = "win32" ; then
17962     USE_WIN32_RANDOM=1
17963   else
17964     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17965 $as_echo_n "checking for /dev/urandom... " >&6; }
17966 if ${ac_cv_file__dev_urandom+:} false; then :
17967   $as_echo_n "(cached) " >&6
17968 else
17969   test "$cross_compiling" = yes &&
17970   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17971 if test -r "/dev/urandom"; then
17972   ac_cv_file__dev_urandom=yes
17973 else
17974   ac_cv_file__dev_urandom=no
17975 fi
17976 fi
17977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17978 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17979 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17980
17981 fi
17982
17983
17984     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17985       USE_DEV_URANDOM=1
17986     fi
17987   fi
17988 fi
17989
17990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17991 $as_echo_n "checking which random number source to use... " >&6; }
17992 if test "$enable_strong_random" = yes ; then
17993   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17994
17995 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17996
17997     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17998 $as_echo "OpenSSL" >&6; }
17999   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
18000
18001 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
18002
18003     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18004 $as_echo "Windows native" >&6; }
18005   elif test x"$USE_DEV_URANDOM" = x"1" ; then
18006
18007 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
18008
18009     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18010 $as_echo "/dev/urandom" >&6; }
18011   else
18012     as_fn_error $? "
18013 no source of strong random numbers was found
18014 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
18015 for authentication protocols. You can use --disable-strong-random to use a
18016 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
18017   fi
18018
18019 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
18020
18021 else
18022     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
18023 $as_echo "weak builtin PRNG" >&6; }
18024     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18025 *** Not using a strong random number source may be insecure." >&5
18026 $as_echo "$as_me: WARNING:
18027 *** Not using a strong random number source may be insecure." >&2;}
18028 fi
18029
18030 # If not set in template file, set bytes to use libc memset()
18031 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18032   MEMSET_LOOP_LIMIT=1024
18033 fi
18034
18035 cat >>confdefs.h <<_ACEOF
18036 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18037 _ACEOF
18038
18039
18040
18041 if test "$enable_nls" = yes ; then
18042
18043   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18044 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18045 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18046   $as_echo_n "(cached) " >&6
18047 else
18048   ac_func_search_save_LIBS=$LIBS
18049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18050 /* end confdefs.h.  */
18051
18052 /* Override any GCC internal prototype to avoid an error.
18053    Use char because int might match the return type of a GCC
18054    builtin and then its argument prototype would still apply.  */
18055 #ifdef __cplusplus
18056 extern "C"
18057 #endif
18058 char bind_textdomain_codeset ();
18059 int
18060 main ()
18061 {
18062 return bind_textdomain_codeset ();
18063   ;
18064   return 0;
18065 }
18066 _ACEOF
18067 for ac_lib in '' intl; do
18068   if test -z "$ac_lib"; then
18069     ac_res="none required"
18070   else
18071     ac_res=-l$ac_lib
18072     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18073   fi
18074   if ac_fn_c_try_link "$LINENO"; then :
18075   ac_cv_search_bind_textdomain_codeset=$ac_res
18076 fi
18077 rm -f core conftest.err conftest.$ac_objext \
18078     conftest$ac_exeext
18079   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18080   break
18081 fi
18082 done
18083 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18084
18085 else
18086   ac_cv_search_bind_textdomain_codeset=no
18087 fi
18088 rm conftest.$ac_ext
18089 LIBS=$ac_func_search_save_LIBS
18090 fi
18091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18092 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18093 ac_res=$ac_cv_search_bind_textdomain_codeset
18094 if test "$ac_res" != no; then :
18095   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18096
18097 else
18098   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18099 fi
18100
18101   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18102 if test "x$ac_cv_header_libintl_h" = xyes; then :
18103
18104 else
18105   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18106 fi
18107
18108
18109   if test -z "$MSGFMT"; then
18110   for ac_prog in msgfmt
18111 do
18112   # Extract the first word of "$ac_prog", so it can be a program name with args.
18113 set dummy $ac_prog; ac_word=$2
18114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18115 $as_echo_n "checking for $ac_word... " >&6; }
18116 if ${ac_cv_path_MSGFMT+:} false; then :
18117   $as_echo_n "(cached) " >&6
18118 else
18119   case $MSGFMT in
18120   [\\/]* | ?:[\\/]*)
18121   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18122   ;;
18123   *)
18124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18125 for as_dir in $PATH
18126 do
18127   IFS=$as_save_IFS
18128   test -z "$as_dir" && as_dir=.
18129     for ac_exec_ext in '' $ac_executable_extensions; do
18130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18131     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18133     break 2
18134   fi
18135 done
18136   done
18137 IFS=$as_save_IFS
18138
18139   ;;
18140 esac
18141 fi
18142 MSGFMT=$ac_cv_path_MSGFMT
18143 if test -n "$MSGFMT"; then
18144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18145 $as_echo "$MSGFMT" >&6; }
18146 else
18147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18148 $as_echo "no" >&6; }
18149 fi
18150
18151
18152   test -n "$MSGFMT" && break
18153 done
18154
18155 else
18156   # Report the value of MSGFMT in configure's output in all cases.
18157   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18158 $as_echo_n "checking for MSGFMT... " >&6; }
18159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18160 $as_echo "$MSGFMT" >&6; }
18161 fi
18162
18163   if test -z "$MSGFMT"; then
18164     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18165   fi
18166   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18167 $as_echo_n "checking for msgfmt flags... " >&6; }
18168 if ${pgac_cv_msgfmt_flags+:} false; then :
18169   $as_echo_n "(cached) " >&6
18170 else
18171   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18172     pgac_cv_msgfmt_flags=-c
18173 fi
18174 fi
18175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18176 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18177   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18178
18179   if test -z "$MSGMERGE"; then
18180   for ac_prog in msgmerge
18181 do
18182   # Extract the first word of "$ac_prog", so it can be a program name with args.
18183 set dummy $ac_prog; ac_word=$2
18184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18185 $as_echo_n "checking for $ac_word... " >&6; }
18186 if ${ac_cv_path_MSGMERGE+:} false; then :
18187   $as_echo_n "(cached) " >&6
18188 else
18189   case $MSGMERGE in
18190   [\\/]* | ?:[\\/]*)
18191   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18192   ;;
18193   *)
18194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18195 for as_dir in $PATH
18196 do
18197   IFS=$as_save_IFS
18198   test -z "$as_dir" && as_dir=.
18199     for ac_exec_ext in '' $ac_executable_extensions; do
18200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18201     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18203     break 2
18204   fi
18205 done
18206   done
18207 IFS=$as_save_IFS
18208
18209   ;;
18210 esac
18211 fi
18212 MSGMERGE=$ac_cv_path_MSGMERGE
18213 if test -n "$MSGMERGE"; then
18214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18215 $as_echo "$MSGMERGE" >&6; }
18216 else
18217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18218 $as_echo "no" >&6; }
18219 fi
18220
18221
18222   test -n "$MSGMERGE" && break
18223 done
18224
18225 else
18226   # Report the value of MSGMERGE in configure's output in all cases.
18227   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18228 $as_echo_n "checking for MSGMERGE... " >&6; }
18229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18230 $as_echo "$MSGMERGE" >&6; }
18231 fi
18232
18233   if test -z "$XGETTEXT"; then
18234   for ac_prog in xgettext
18235 do
18236   # Extract the first word of "$ac_prog", so it can be a program name with args.
18237 set dummy $ac_prog; ac_word=$2
18238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18239 $as_echo_n "checking for $ac_word... " >&6; }
18240 if ${ac_cv_path_XGETTEXT+:} false; then :
18241   $as_echo_n "(cached) " >&6
18242 else
18243   case $XGETTEXT in
18244   [\\/]* | ?:[\\/]*)
18245   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18246   ;;
18247   *)
18248   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18249 for as_dir in $PATH
18250 do
18251   IFS=$as_save_IFS
18252   test -z "$as_dir" && as_dir=.
18253     for ac_exec_ext in '' $ac_executable_extensions; do
18254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18255     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18257     break 2
18258   fi
18259 done
18260   done
18261 IFS=$as_save_IFS
18262
18263   ;;
18264 esac
18265 fi
18266 XGETTEXT=$ac_cv_path_XGETTEXT
18267 if test -n "$XGETTEXT"; then
18268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18269 $as_echo "$XGETTEXT" >&6; }
18270 else
18271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18272 $as_echo "no" >&6; }
18273 fi
18274
18275
18276   test -n "$XGETTEXT" && break
18277 done
18278
18279 else
18280   # Report the value of XGETTEXT in configure's output in all cases.
18281   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18282 $as_echo_n "checking for XGETTEXT... " >&6; }
18283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18284 $as_echo "$XGETTEXT" >&6; }
18285 fi
18286
18287
18288 fi
18289
18290 # Check for Tcl configuration script tclConfig.sh
18291 if test "$with_tcl" = yes; then
18292     if test -z "$TCLSH"; then
18293   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18294 do
18295   # Extract the first word of "$ac_prog", so it can be a program name with args.
18296 set dummy $ac_prog; ac_word=$2
18297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18298 $as_echo_n "checking for $ac_word... " >&6; }
18299 if ${ac_cv_path_TCLSH+:} false; then :
18300   $as_echo_n "(cached) " >&6
18301 else
18302   case $TCLSH in
18303   [\\/]* | ?:[\\/]*)
18304   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18305   ;;
18306   *)
18307   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18308 for as_dir in $PATH
18309 do
18310   IFS=$as_save_IFS
18311   test -z "$as_dir" && as_dir=.
18312     for ac_exec_ext in '' $ac_executable_extensions; do
18313   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18314     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18315     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18316     break 2
18317   fi
18318 done
18319   done
18320 IFS=$as_save_IFS
18321
18322   ;;
18323 esac
18324 fi
18325 TCLSH=$ac_cv_path_TCLSH
18326 if test -n "$TCLSH"; then
18327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18328 $as_echo "$TCLSH" >&6; }
18329 else
18330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18331 $as_echo "no" >&6; }
18332 fi
18333
18334
18335   test -n "$TCLSH" && break
18336 done
18337
18338 else
18339   # Report the value of TCLSH in configure's output in all cases.
18340   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18341 $as_echo_n "checking for TCLSH... " >&6; }
18342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18343 $as_echo "$TCLSH" >&6; }
18344 fi
18345
18346 if test x"$TCLSH" = x""; then
18347   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18348 fi
18349
18350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18351 $as_echo_n "checking for tclConfig.sh... " >&6; }
18352 # Let user override test
18353 if test -z "$TCL_CONFIG_SH"; then
18354     pgac_test_dirs="$with_tclconfig"
18355
18356     set X $pgac_test_dirs; shift
18357     if test $# -eq 0; then
18358         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18359         pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18360         # On newer macOS, $auto_path frequently doesn't include the place
18361         # where tclConfig.sh actually lives.  Append that to the end, so as not
18362         # to break cases where a non-default Tcl installation is being used.
18363         if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18364             pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18365         fi
18366         set X $pgac_test_dirs; shift
18367     fi
18368
18369     for pgac_dir do
18370         if test -r "$pgac_dir/tclConfig.sh"; then
18371             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18372             break
18373         fi
18374     done
18375 fi
18376
18377 if test -z "$TCL_CONFIG_SH"; then
18378     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18379 $as_echo "no" >&6; }
18380     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18381 else
18382     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18383 $as_echo "$TCL_CONFIG_SH" >&6; }
18384 fi
18385
18386
18387
18388     . "$TCL_CONFIG_SH"
18389 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18390 eval TCL_LIBS=\"$TCL_LIBS\"
18391 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18392 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18393
18394         if test "$TCL_SHARED_BUILD" != 1; then
18395       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18396 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18397     fi
18398     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18399     ac_save_CPPFLAGS=$CPPFLAGS
18400     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18401     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18402 if test "x$ac_cv_header_tcl_h" = xyes; then :
18403
18404 else
18405   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18406 fi
18407
18408
18409     CPPFLAGS=$ac_save_CPPFLAGS
18410 fi
18411
18412 # check for <perl.h>
18413 if test "$with_perl" = yes; then
18414   ac_save_CPPFLAGS=$CPPFLAGS
18415   CPPFLAGS="$CPPFLAGS $perl_includespec"
18416   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18417 "
18418 if test "x$ac_cv_header_perl_h" = xyes; then :
18419
18420 else
18421   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18422 fi
18423
18424
18425   # While we're at it, check that we can link to libperl.
18426   # On most platforms, if perl.h is there then libperl.so will be too, but at
18427   # this writing Debian packages them separately.  There is no known reason to
18428   # waste cycles on separate probes for the Tcl or Python libraries, though.
18429   pgac_save_LIBS=$LIBS
18430   LIBS="$perl_embed_ldflags"
18431   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18432 $as_echo_n "checking for libperl... " >&6; }
18433   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18434 /* end confdefs.h.  */
18435
18436 #include <EXTERN.h>
18437 #include <perl.h>
18438
18439 int
18440 main ()
18441 {
18442 perl_alloc();
18443   ;
18444   return 0;
18445 }
18446 _ACEOF
18447 if ac_fn_c_try_link "$LINENO"; then :
18448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18449 $as_echo "yes" >&6; }
18450 else
18451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18452 $as_echo "no" >&6; }
18453      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18454 fi
18455 rm -f core conftest.err conftest.$ac_objext \
18456     conftest$ac_exeext conftest.$ac_ext
18457   LIBS=$pgac_save_LIBS
18458   CPPFLAGS=$ac_save_CPPFLAGS
18459 fi
18460
18461 # check for <Python.h>
18462 if test "$with_python" = yes; then
18463   ac_save_CPPFLAGS=$CPPFLAGS
18464   CPPFLAGS="$python_includespec $CPPFLAGS"
18465   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18466 if test "x$ac_cv_header_Python_h" = xyes; then :
18467
18468 else
18469   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18470 fi
18471
18472
18473   CPPFLAGS=$ac_save_CPPFLAGS
18474 fi
18475
18476 #
18477 # Check for DocBook and tools
18478 #
18479 if test -z "$XMLLINT"; then
18480   for ac_prog in xmllint
18481 do
18482   # Extract the first word of "$ac_prog", so it can be a program name with args.
18483 set dummy $ac_prog; ac_word=$2
18484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18485 $as_echo_n "checking for $ac_word... " >&6; }
18486 if ${ac_cv_path_XMLLINT+:} false; then :
18487   $as_echo_n "(cached) " >&6
18488 else
18489   case $XMLLINT in
18490   [\\/]* | ?:[\\/]*)
18491   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18492   ;;
18493   *)
18494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18495 for as_dir in $PATH
18496 do
18497   IFS=$as_save_IFS
18498   test -z "$as_dir" && as_dir=.
18499     for ac_exec_ext in '' $ac_executable_extensions; do
18500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18501     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18503     break 2
18504   fi
18505 done
18506   done
18507 IFS=$as_save_IFS
18508
18509   ;;
18510 esac
18511 fi
18512 XMLLINT=$ac_cv_path_XMLLINT
18513 if test -n "$XMLLINT"; then
18514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18515 $as_echo "$XMLLINT" >&6; }
18516 else
18517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18518 $as_echo "no" >&6; }
18519 fi
18520
18521
18522   test -n "$XMLLINT" && break
18523 done
18524
18525 else
18526   # Report the value of XMLLINT in configure's output in all cases.
18527   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18528 $as_echo_n "checking for XMLLINT... " >&6; }
18529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18530 $as_echo "$XMLLINT" >&6; }
18531 fi
18532
18533
18534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18535 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18536 if ${pgac_cv_check_docbook+:} false; then :
18537   $as_echo_n "(cached) " >&6
18538 else
18539   cat >conftest.xml <<EOF
18540 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18541 <book>
18542  <title>test</title>
18543  <chapter>
18544   <title>random</title>
18545    <sect1>
18546     <title>testsect</title>
18547     <para>text</para>
18548   </sect1>
18549  </chapter>
18550 </book>
18551 EOF
18552
18553 pgac_cv_check_docbook=no
18554
18555 if test -n "$XMLLINT"; then
18556   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18557   if test $? -eq 0; then
18558     pgac_cv_check_docbook=yes
18559   fi
18560 fi
18561 rm -f conftest.xml
18562 fi
18563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18564 $as_echo "$pgac_cv_check_docbook" >&6; }
18565
18566 have_docbook=$pgac_cv_check_docbook
18567
18568
18569 if test -z "$DBTOEPUB"; then
18570   for ac_prog in dbtoepub
18571 do
18572   # Extract the first word of "$ac_prog", so it can be a program name with args.
18573 set dummy $ac_prog; ac_word=$2
18574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18575 $as_echo_n "checking for $ac_word... " >&6; }
18576 if ${ac_cv_path_DBTOEPUB+:} false; then :
18577   $as_echo_n "(cached) " >&6
18578 else
18579   case $DBTOEPUB in
18580   [\\/]* | ?:[\\/]*)
18581   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18582   ;;
18583   *)
18584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18585 for as_dir in $PATH
18586 do
18587   IFS=$as_save_IFS
18588   test -z "$as_dir" && as_dir=.
18589     for ac_exec_ext in '' $ac_executable_extensions; do
18590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18591     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18593     break 2
18594   fi
18595 done
18596   done
18597 IFS=$as_save_IFS
18598
18599   ;;
18600 esac
18601 fi
18602 DBTOEPUB=$ac_cv_path_DBTOEPUB
18603 if test -n "$DBTOEPUB"; then
18604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18605 $as_echo "$DBTOEPUB" >&6; }
18606 else
18607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18608 $as_echo "no" >&6; }
18609 fi
18610
18611
18612   test -n "$DBTOEPUB" && break
18613 done
18614
18615 else
18616   # Report the value of DBTOEPUB in configure's output in all cases.
18617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18618 $as_echo_n "checking for DBTOEPUB... " >&6; }
18619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18620 $as_echo "$DBTOEPUB" >&6; }
18621 fi
18622
18623 if test -z "$XSLTPROC"; then
18624   for ac_prog in xsltproc
18625 do
18626   # Extract the first word of "$ac_prog", so it can be a program name with args.
18627 set dummy $ac_prog; ac_word=$2
18628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18629 $as_echo_n "checking for $ac_word... " >&6; }
18630 if ${ac_cv_path_XSLTPROC+:} false; then :
18631   $as_echo_n "(cached) " >&6
18632 else
18633   case $XSLTPROC in
18634   [\\/]* | ?:[\\/]*)
18635   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18636   ;;
18637   *)
18638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18639 for as_dir in $PATH
18640 do
18641   IFS=$as_save_IFS
18642   test -z "$as_dir" && as_dir=.
18643     for ac_exec_ext in '' $ac_executable_extensions; do
18644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18645     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18647     break 2
18648   fi
18649 done
18650   done
18651 IFS=$as_save_IFS
18652
18653   ;;
18654 esac
18655 fi
18656 XSLTPROC=$ac_cv_path_XSLTPROC
18657 if test -n "$XSLTPROC"; then
18658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18659 $as_echo "$XSLTPROC" >&6; }
18660 else
18661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18662 $as_echo "no" >&6; }
18663 fi
18664
18665
18666   test -n "$XSLTPROC" && break
18667 done
18668
18669 else
18670   # Report the value of XSLTPROC in configure's output in all cases.
18671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18672 $as_echo_n "checking for XSLTPROC... " >&6; }
18673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18674 $as_echo "$XSLTPROC" >&6; }
18675 fi
18676
18677 if test -z "$FOP"; then
18678   for ac_prog in fop
18679 do
18680   # Extract the first word of "$ac_prog", so it can be a program name with args.
18681 set dummy $ac_prog; ac_word=$2
18682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18683 $as_echo_n "checking for $ac_word... " >&6; }
18684 if ${ac_cv_path_FOP+:} false; then :
18685   $as_echo_n "(cached) " >&6
18686 else
18687   case $FOP in
18688   [\\/]* | ?:[\\/]*)
18689   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18690   ;;
18691   *)
18692   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18693 for as_dir in $PATH
18694 do
18695   IFS=$as_save_IFS
18696   test -z "$as_dir" && as_dir=.
18697     for ac_exec_ext in '' $ac_executable_extensions; do
18698   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18699     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18700     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18701     break 2
18702   fi
18703 done
18704   done
18705 IFS=$as_save_IFS
18706
18707   ;;
18708 esac
18709 fi
18710 FOP=$ac_cv_path_FOP
18711 if test -n "$FOP"; then
18712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18713 $as_echo "$FOP" >&6; }
18714 else
18715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18716 $as_echo "no" >&6; }
18717 fi
18718
18719
18720   test -n "$FOP" && break
18721 done
18722
18723 else
18724   # Report the value of FOP in configure's output in all cases.
18725   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18726 $as_echo_n "checking for FOP... " >&6; }
18727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18728 $as_echo "$FOP" >&6; }
18729 fi
18730
18731
18732 #
18733 # Check for test tools
18734 #
18735 if test "$enable_tap_tests" = yes; then
18736   # Check for necessary modules, unless user has specified the "prove" to use;
18737   # in that case it's her responsibility to have a working configuration.
18738   # (prove might be part of a different Perl installation than perl, eg on
18739   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18740   if test -z "$PROVE"; then
18741     # Test::More and Time::HiRes are supposed to be part of core Perl,
18742     # but some distros omit them in a minimal installation.
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753 # Make sure we have perl
18754 if test -z "$PERL"; then
18755 # Extract the first word of "perl", so it can be a program name with args.
18756 set dummy perl; ac_word=$2
18757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18758 $as_echo_n "checking for $ac_word... " >&6; }
18759 if ${ac_cv_prog_PERL+:} false; then :
18760   $as_echo_n "(cached) " >&6
18761 else
18762   if test -n "$PERL"; then
18763   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18764 else
18765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18766 for as_dir in $PATH
18767 do
18768   IFS=$as_save_IFS
18769   test -z "$as_dir" && as_dir=.
18770     for ac_exec_ext in '' $ac_executable_extensions; do
18771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18772     ac_cv_prog_PERL="perl"
18773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18774     break 2
18775   fi
18776 done
18777   done
18778 IFS=$as_save_IFS
18779
18780 fi
18781 fi
18782 PERL=$ac_cv_prog_PERL
18783 if test -n "$PERL"; then
18784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18785 $as_echo "$PERL" >&6; }
18786 else
18787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18788 $as_echo "no" >&6; }
18789 fi
18790
18791
18792 fi
18793
18794 if test "x$PERL" != x; then
18795   ax_perl_modules_failed=0
18796   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18797     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18798 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18799
18800     # Would be nice to log result here, but can't rely on autoconf internals
18801     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18802     if test $? -ne 0; then
18803       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18804 $as_echo "no" >&6; };
18805       ax_perl_modules_failed=1
18806    else
18807       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18808 $as_echo "ok" >&6; };
18809     fi
18810   done
18811
18812   # Run optional shell commands
18813   if test "$ax_perl_modules_failed" = 0; then
18814     :
18815
18816   else
18817     :
18818     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18819   fi
18820 else
18821   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18822 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18823 fi
18824   fi
18825   # Now make sure we know where prove is
18826   if test -z "$PROVE"; then
18827   for ac_prog in prove
18828 do
18829   # Extract the first word of "$ac_prog", so it can be a program name with args.
18830 set dummy $ac_prog; ac_word=$2
18831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18832 $as_echo_n "checking for $ac_word... " >&6; }
18833 if ${ac_cv_path_PROVE+:} false; then :
18834   $as_echo_n "(cached) " >&6
18835 else
18836   case $PROVE in
18837   [\\/]* | ?:[\\/]*)
18838   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18839   ;;
18840   *)
18841   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18842 for as_dir in $PATH
18843 do
18844   IFS=$as_save_IFS
18845   test -z "$as_dir" && as_dir=.
18846     for ac_exec_ext in '' $ac_executable_extensions; do
18847   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18848     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18849     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18850     break 2
18851   fi
18852 done
18853   done
18854 IFS=$as_save_IFS
18855
18856   ;;
18857 esac
18858 fi
18859 PROVE=$ac_cv_path_PROVE
18860 if test -n "$PROVE"; then
18861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18862 $as_echo "$PROVE" >&6; }
18863 else
18864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18865 $as_echo "no" >&6; }
18866 fi
18867
18868
18869   test -n "$PROVE" && break
18870 done
18871
18872 else
18873   # Report the value of PROVE in configure's output in all cases.
18874   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18875 $as_echo_n "checking for PROVE... " >&6; }
18876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18877 $as_echo "$PROVE" >&6; }
18878 fi
18879
18880   if test -z "$PROVE"; then
18881     as_fn_error $? "prove not found" "$LINENO" 5
18882   fi
18883 fi
18884
18885 # Thread testing
18886
18887 # We have to run the thread test near the end so we have all our symbols
18888 # defined.  Cross compiling throws a warning.
18889 #
18890 if test "$enable_thread_safety" = yes; then
18891 if test "$PORTNAME" != "win32"
18892 then
18893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18894 $as_echo_n "checking thread safety of required library functions... " >&6; }
18895
18896 _CFLAGS="$CFLAGS"
18897 _LIBS="$LIBS"
18898 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18899 LIBS="$LIBS $PTHREAD_LIBS"
18900 if test "$cross_compiling" = yes; then :
18901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18902 $as_echo "maybe" >&6; }
18903   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18904 *** Skipping thread test program because of cross-compile build.
18905 *** Run the program in src/test/thread on the target machine.
18906 " >&5
18907 $as_echo "$as_me: WARNING:
18908 *** Skipping thread test program because of cross-compile build.
18909 *** Run the program in src/test/thread on the target machine.
18910 " >&2;}
18911 else
18912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18913 /* end confdefs.h.  */
18914 #include "$srcdir/src/test/thread/thread_test.c"
18915 _ACEOF
18916 if ac_fn_c_try_run "$LINENO"; then :
18917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18918 $as_echo "yes" >&6; }
18919 else
18920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18921 $as_echo "no" >&6; }
18922   as_fn_error $? "thread test program failed
18923 This platform is not thread-safe.  Check the file 'config.log' or compile
18924 and run src/test/thread/thread_test for the exact reason.
18925 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18926 fi
18927 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18928   conftest.$ac_objext conftest.beam conftest.$ac_ext
18929 fi
18930
18931 CFLAGS="$_CFLAGS"
18932 LIBS="$_LIBS"
18933 else
18934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18935 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18936 fi
18937 fi
18938
18939 # If compiler will take -Wl,--as-needed (or various platform-specific
18940 # spellings thereof) then add that to LDFLAGS.  This is much easier than
18941 # trying to filter LIBS to the minimum for each executable.
18942 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18943 # libreadline; therefore we postpone testing it until we know what library
18944 # dependencies readline has.  The test code will try to link with $LIBS.
18945 if test "$with_readline" = yes; then
18946   link_test_func=readline
18947 else
18948   link_test_func=exit
18949 fi
18950
18951 if test "$PORTNAME" = "darwin"; then
18952   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18953 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18954 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18955   $as_echo_n "(cached) " >&6
18956 else
18957   pgac_save_LDFLAGS=$LDFLAGS
18958 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18959 if test "$cross_compiling" = yes; then :
18960   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18961 else
18962   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18963 /* end confdefs.h.  */
18964 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18965 int
18966 main ()
18967 {
18968
18969   ;
18970   return 0;
18971 }
18972 _ACEOF
18973 if ac_fn_c_try_run "$LINENO"; then :
18974   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18975 else
18976   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18977 fi
18978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18979   conftest.$ac_objext conftest.beam conftest.$ac_ext
18980 fi
18981
18982 LDFLAGS="$pgac_save_LDFLAGS"
18983 fi
18984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18985 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18986 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18987   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18988 fi
18989
18990 elif test "$PORTNAME" = "openbsd"; then
18991   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18992 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18993 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18994   $as_echo_n "(cached) " >&6
18995 else
18996   pgac_save_LDFLAGS=$LDFLAGS
18997 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18998 if test "$cross_compiling" = yes; then :
18999   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19000 else
19001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19002 /* end confdefs.h.  */
19003 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19004 int
19005 main ()
19006 {
19007
19008   ;
19009   return 0;
19010 }
19011 _ACEOF
19012 if ac_fn_c_try_run "$LINENO"; then :
19013   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19014 else
19015   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19016 fi
19017 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19018   conftest.$ac_objext conftest.beam conftest.$ac_ext
19019 fi
19020
19021 LDFLAGS="$pgac_save_LDFLAGS"
19022 fi
19023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19024 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19025 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19026   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19027 fi
19028
19029 else
19030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19031 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19032 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19033   $as_echo_n "(cached) " >&6
19034 else
19035   pgac_save_LDFLAGS=$LDFLAGS
19036 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19037 if test "$cross_compiling" = yes; then :
19038   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19039 else
19040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19041 /* end confdefs.h.  */
19042 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19043 int
19044 main ()
19045 {
19046
19047   ;
19048   return 0;
19049 }
19050 _ACEOF
19051 if ac_fn_c_try_run "$LINENO"; then :
19052   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19053 else
19054   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19055 fi
19056 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19057   conftest.$ac_objext conftest.beam conftest.$ac_ext
19058 fi
19059
19060 LDFLAGS="$pgac_save_LDFLAGS"
19061 fi
19062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19063 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19064 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19065   LDFLAGS="$LDFLAGS -Wl,--as-needed"
19066 fi
19067
19068 fi
19069
19070 # Create compiler version string
19071 if test x"$GCC" = x"yes" ; then
19072   cc_string=`${CC} --version | sed q`
19073   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19074 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19075   cc_string=`${CC} -V 2>&1 | sed q`
19076 else
19077   cc_string=$CC
19078 fi
19079
19080
19081 cat >>confdefs.h <<_ACEOF
19082 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19083 _ACEOF
19084
19085
19086 # Supply a numeric version string for use by 3rd party add-ons
19087 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19088 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
19089 tr '.' '        ' |
19090 $AWK '{printf "%d%04d", $1, $2}'`"
19091
19092 cat >>confdefs.h <<_ACEOF
19093 #define PG_VERSION_NUM $PG_VERSION_NUM
19094 _ACEOF
19095
19096
19097
19098 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19099 # literally, so that it's possible to override it at build time using
19100 # a command like "make ... PG_SYSROOT=path".  This has to be done after
19101 # we've finished all configure checks that depend on CPPFLAGS.
19102 if test x"$PG_SYSROOT" != x; then
19103   CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19104 fi
19105
19106
19107
19108 # Begin output steps
19109
19110 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19111 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19112 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19113 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19114 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19115 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19116 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19117 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19118 # Currently only used when LLVM is used
19119 if test "$with_llvm" = yes ; then
19120    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19121 $as_echo "$as_me: using CXX=$CXX" >&6;}
19122    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19123 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19124    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19125 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19126    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19127 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19128    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19129 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19130 fi
19131
19132 # prepare build tree if outside source tree
19133 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19134 # Note 2: /bin/pwd might be better than shell's built-in at getting
19135 #         a symlink-free name.
19136 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19137   vpath_build=no
19138 else
19139   vpath_build=yes
19140   if test "$no_create" != yes; then
19141     $as_echo_n "preparing build tree... " >&6
19142     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19143     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19144       || as_fn_error $? "failed" "$LINENO" 5
19145     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19146 $as_echo "done" >&6; }
19147   fi
19148 fi
19149
19150
19151
19152 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19153
19154
19155 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}"
19156
19157
19158 if test "$PORTNAME" = "win32"; then
19159 ac_config_commands="$ac_config_commands check_win32_symlinks"
19160
19161 fi
19162
19163 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19164
19165
19166 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19167
19168
19169 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19170
19171
19172 cat >confcache <<\_ACEOF
19173 # This file is a shell script that caches the results of configure
19174 # tests run on this system so they can be shared between configure
19175 # scripts and configure runs, see configure's option --config-cache.
19176 # It is not useful on other systems.  If it contains results you don't
19177 # want to keep, you may remove or edit it.
19178 #
19179 # config.status only pays attention to the cache file if you give it
19180 # the --recheck option to rerun configure.
19181 #
19182 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19183 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19184 # following values.
19185
19186 _ACEOF
19187
19188 # The following way of writing the cache mishandles newlines in values,
19189 # but we know of no workaround that is simple, portable, and efficient.
19190 # So, we kill variables containing newlines.
19191 # Ultrix sh set writes to stderr and can't be redirected directly,
19192 # and sets the high bit in the cache file unless we assign to the vars.
19193 (
19194   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19195     eval ac_val=\$$ac_var
19196     case $ac_val in #(
19197     *${as_nl}*)
19198       case $ac_var in #(
19199       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19200 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19201       esac
19202       case $ac_var in #(
19203       _ | IFS | as_nl) ;; #(
19204       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19205       *) { eval $ac_var=; unset $ac_var;} ;;
19206       esac ;;
19207     esac
19208   done
19209
19210   (set) 2>&1 |
19211     case $as_nl`(ac_space=' '; set) 2>&1` in #(
19212     *${as_nl}ac_space=\ *)
19213       # `set' does not quote correctly, so add quotes: double-quote
19214       # substitution turns \\\\ into \\, and sed turns \\ into \.
19215       sed -n \
19216         "s/'/'\\\\''/g;
19217           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19218       ;; #(
19219     *)
19220       # `set' quotes correctly as required by POSIX, so do not add quotes.
19221       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19222       ;;
19223     esac |
19224     sort
19225 ) |
19226   sed '
19227      /^ac_cv_env_/b end
19228      t clear
19229      :clear
19230      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19231      t end
19232      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19233      :end' >>confcache
19234 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19235   if test -w "$cache_file"; then
19236     if test "x$cache_file" != "x/dev/null"; then
19237       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19238 $as_echo "$as_me: updating cache $cache_file" >&6;}
19239       if test ! -f "$cache_file" || test -h "$cache_file"; then
19240         cat confcache >"$cache_file"
19241       else
19242         case $cache_file in #(
19243         */* | ?:*)
19244           mv -f confcache "$cache_file"$$ &&
19245           mv -f "$cache_file"$$ "$cache_file" ;; #(
19246         *)
19247           mv -f confcache "$cache_file" ;;
19248         esac
19249       fi
19250     fi
19251   else
19252     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19253 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19254   fi
19255 fi
19256 rm -f confcache
19257
19258 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19259 # Let make expand exec_prefix.
19260 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19261
19262 DEFS=-DHAVE_CONFIG_H
19263
19264 ac_libobjs=
19265 ac_ltlibobjs=
19266 U=
19267 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19268   # 1. Remove the extension, and $U if already installed.
19269   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19270   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19271   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19272   #    will be set to the directory where LIBOBJS objects are built.
19273   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19274   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19275 done
19276 LIBOBJS=$ac_libobjs
19277
19278 LTLIBOBJS=$ac_ltlibobjs
19279
19280
19281
19282
19283 : "${CONFIG_STATUS=./config.status}"
19284 ac_write_fail=0
19285 ac_clean_files_save=$ac_clean_files
19286 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19287 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19288 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19289 as_write_fail=0
19290 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19291 #! $SHELL
19292 # Generated by $as_me.
19293 # Run this file to recreate the current configuration.
19294 # Compiler output produced by configure, useful for debugging
19295 # configure, is in config.log if it exists.
19296
19297 debug=false
19298 ac_cs_recheck=false
19299 ac_cs_silent=false
19300
19301 SHELL=\${CONFIG_SHELL-$SHELL}
19302 export SHELL
19303 _ASEOF
19304 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19305 ## -------------------- ##
19306 ## M4sh Initialization. ##
19307 ## -------------------- ##
19308
19309 # Be more Bourne compatible
19310 DUALCASE=1; export DUALCASE # for MKS sh
19311 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19312   emulate sh
19313   NULLCMD=:
19314   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19315   # is contrary to our usage.  Disable this feature.
19316   alias -g '${1+"$@"}'='"$@"'
19317   setopt NO_GLOB_SUBST
19318 else
19319   case `(set -o) 2>/dev/null` in #(
19320   *posix*) :
19321     set -o posix ;; #(
19322   *) :
19323      ;;
19324 esac
19325 fi
19326
19327
19328 as_nl='
19329 '
19330 export as_nl
19331 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19332 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19333 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19334 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19335 # Prefer a ksh shell builtin over an external printf program on Solaris,
19336 # but without wasting forks for bash or zsh.
19337 if test -z "$BASH_VERSION$ZSH_VERSION" \
19338     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19339   as_echo='print -r --'
19340   as_echo_n='print -rn --'
19341 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19342   as_echo='printf %s\n'
19343   as_echo_n='printf %s'
19344 else
19345   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19346     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19347     as_echo_n='/usr/ucb/echo -n'
19348   else
19349     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19350     as_echo_n_body='eval
19351       arg=$1;
19352       case $arg in #(
19353       *"$as_nl"*)
19354         expr "X$arg" : "X\\(.*\\)$as_nl";
19355         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19356       esac;
19357       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19358     '
19359     export as_echo_n_body
19360     as_echo_n='sh -c $as_echo_n_body as_echo'
19361   fi
19362   export as_echo_body
19363   as_echo='sh -c $as_echo_body as_echo'
19364 fi
19365
19366 # The user is always right.
19367 if test "${PATH_SEPARATOR+set}" != set; then
19368   PATH_SEPARATOR=:
19369   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19370     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19371       PATH_SEPARATOR=';'
19372   }
19373 fi
19374
19375
19376 # IFS
19377 # We need space, tab and new line, in precisely that order.  Quoting is
19378 # there to prevent editors from complaining about space-tab.
19379 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19380 # splitting by setting IFS to empty value.)
19381 IFS=" ""        $as_nl"
19382
19383 # Find who we are.  Look in the path if we contain no directory separator.
19384 as_myself=
19385 case $0 in #((
19386   *[\\/]* ) as_myself=$0 ;;
19387   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19388 for as_dir in $PATH
19389 do
19390   IFS=$as_save_IFS
19391   test -z "$as_dir" && as_dir=.
19392     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19393   done
19394 IFS=$as_save_IFS
19395
19396      ;;
19397 esac
19398 # We did not find ourselves, most probably we were run as `sh COMMAND'
19399 # in which case we are not to be found in the path.
19400 if test "x$as_myself" = x; then
19401   as_myself=$0
19402 fi
19403 if test ! -f "$as_myself"; then
19404   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19405   exit 1
19406 fi
19407
19408 # Unset variables that we do not need and which cause bugs (e.g. in
19409 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19410 # suppresses any "Segmentation fault" message there.  '((' could
19411 # trigger a bug in pdksh 5.2.14.
19412 for as_var in BASH_ENV ENV MAIL MAILPATH
19413 do eval test x\${$as_var+set} = xset \
19414   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19415 done
19416 PS1='$ '
19417 PS2='> '
19418 PS4='+ '
19419
19420 # NLS nuisances.
19421 LC_ALL=C
19422 export LC_ALL
19423 LANGUAGE=C
19424 export LANGUAGE
19425
19426 # CDPATH.
19427 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19428
19429
19430 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19431 # ----------------------------------------
19432 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19433 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19434 # script with STATUS, using 1 if that was 0.
19435 as_fn_error ()
19436 {
19437   as_status=$1; test $as_status -eq 0 && as_status=1
19438   if test "$4"; then
19439     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19440     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19441   fi
19442   $as_echo "$as_me: error: $2" >&2
19443   as_fn_exit $as_status
19444 } # as_fn_error
19445
19446
19447 # as_fn_set_status STATUS
19448 # -----------------------
19449 # Set $? to STATUS, without forking.
19450 as_fn_set_status ()
19451 {
19452   return $1
19453 } # as_fn_set_status
19454
19455 # as_fn_exit STATUS
19456 # -----------------
19457 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19458 as_fn_exit ()
19459 {
19460   set +e
19461   as_fn_set_status $1
19462   exit $1
19463 } # as_fn_exit
19464
19465 # as_fn_unset VAR
19466 # ---------------
19467 # Portably unset VAR.
19468 as_fn_unset ()
19469 {
19470   { eval $1=; unset $1;}
19471 }
19472 as_unset=as_fn_unset
19473 # as_fn_append VAR VALUE
19474 # ----------------------
19475 # Append the text in VALUE to the end of the definition contained in VAR. Take
19476 # advantage of any shell optimizations that allow amortized linear growth over
19477 # repeated appends, instead of the typical quadratic growth present in naive
19478 # implementations.
19479 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19480   eval 'as_fn_append ()
19481   {
19482     eval $1+=\$2
19483   }'
19484 else
19485   as_fn_append ()
19486   {
19487     eval $1=\$$1\$2
19488   }
19489 fi # as_fn_append
19490
19491 # as_fn_arith ARG...
19492 # ------------------
19493 # Perform arithmetic evaluation on the ARGs, and store the result in the
19494 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19495 # must be portable across $(()) and expr.
19496 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19497   eval 'as_fn_arith ()
19498   {
19499     as_val=$(( $* ))
19500   }'
19501 else
19502   as_fn_arith ()
19503   {
19504     as_val=`expr "$@" || test $? -eq 1`
19505   }
19506 fi # as_fn_arith
19507
19508
19509 if expr a : '\(a\)' >/dev/null 2>&1 &&
19510    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19511   as_expr=expr
19512 else
19513   as_expr=false
19514 fi
19515
19516 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19517   as_basename=basename
19518 else
19519   as_basename=false
19520 fi
19521
19522 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19523   as_dirname=dirname
19524 else
19525   as_dirname=false
19526 fi
19527
19528 as_me=`$as_basename -- "$0" ||
19529 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19530          X"$0" : 'X\(//\)$' \| \
19531          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19532 $as_echo X/"$0" |
19533     sed '/^.*\/\([^/][^/]*\)\/*$/{
19534             s//\1/
19535             q
19536           }
19537           /^X\/\(\/\/\)$/{
19538             s//\1/
19539             q
19540           }
19541           /^X\/\(\/\).*/{
19542             s//\1/
19543             q
19544           }
19545           s/.*/./; q'`
19546
19547 # Avoid depending upon Character Ranges.
19548 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19549 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19550 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19551 as_cr_digits='0123456789'
19552 as_cr_alnum=$as_cr_Letters$as_cr_digits
19553
19554 ECHO_C= ECHO_N= ECHO_T=
19555 case `echo -n x` in #(((((
19556 -n*)
19557   case `echo 'xy\c'` in
19558   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19559   xy)  ECHO_C='\c';;
19560   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19561        ECHO_T=' ';;
19562   esac;;
19563 *)
19564   ECHO_N='-n';;
19565 esac
19566
19567 rm -f conf$$ conf$$.exe conf$$.file
19568 if test -d conf$$.dir; then
19569   rm -f conf$$.dir/conf$$.file
19570 else
19571   rm -f conf$$.dir
19572   mkdir conf$$.dir 2>/dev/null
19573 fi
19574 if (echo >conf$$.file) 2>/dev/null; then
19575   if ln -s conf$$.file conf$$ 2>/dev/null; then
19576     as_ln_s='ln -s'
19577     # ... but there are two gotchas:
19578     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19579     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19580     # In both cases, we have to default to `cp -pR'.
19581     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19582       as_ln_s='cp -pR'
19583   elif ln conf$$.file conf$$ 2>/dev/null; then
19584     as_ln_s=ln
19585   else
19586     as_ln_s='cp -pR'
19587   fi
19588 else
19589   as_ln_s='cp -pR'
19590 fi
19591 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19592 rmdir conf$$.dir 2>/dev/null
19593
19594
19595 # as_fn_mkdir_p
19596 # -------------
19597 # Create "$as_dir" as a directory, including parents if necessary.
19598 as_fn_mkdir_p ()
19599 {
19600
19601   case $as_dir in #(
19602   -*) as_dir=./$as_dir;;
19603   esac
19604   test -d "$as_dir" || eval $as_mkdir_p || {
19605     as_dirs=
19606     while :; do
19607       case $as_dir in #(
19608       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19609       *) as_qdir=$as_dir;;
19610       esac
19611       as_dirs="'$as_qdir' $as_dirs"
19612       as_dir=`$as_dirname -- "$as_dir" ||
19613 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19614          X"$as_dir" : 'X\(//\)[^/]' \| \
19615          X"$as_dir" : 'X\(//\)$' \| \
19616          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19617 $as_echo X"$as_dir" |
19618     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19619             s//\1/
19620             q
19621           }
19622           /^X\(\/\/\)[^/].*/{
19623             s//\1/
19624             q
19625           }
19626           /^X\(\/\/\)$/{
19627             s//\1/
19628             q
19629           }
19630           /^X\(\/\).*/{
19631             s//\1/
19632             q
19633           }
19634           s/.*/./; q'`
19635       test -d "$as_dir" && break
19636     done
19637     test -z "$as_dirs" || eval "mkdir $as_dirs"
19638   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19639
19640
19641 } # as_fn_mkdir_p
19642 if mkdir -p . 2>/dev/null; then
19643   as_mkdir_p='mkdir -p "$as_dir"'
19644 else
19645   test -d ./-p && rmdir ./-p
19646   as_mkdir_p=false
19647 fi
19648
19649
19650 # as_fn_executable_p FILE
19651 # -----------------------
19652 # Test if FILE is an executable regular file.
19653 as_fn_executable_p ()
19654 {
19655   test -f "$1" && test -x "$1"
19656 } # as_fn_executable_p
19657 as_test_x='test -x'
19658 as_executable_p=as_fn_executable_p
19659
19660 # Sed expression to map a string onto a valid CPP name.
19661 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19662
19663 # Sed expression to map a string onto a valid variable name.
19664 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19665
19666
19667 exec 6>&1
19668 ## ----------------------------------- ##
19669 ## Main body of $CONFIG_STATUS script. ##
19670 ## ----------------------------------- ##
19671 _ASEOF
19672 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19673
19674 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19675 # Save the log message, to keep $0 and so on meaningful, and to
19676 # report actual input values of CONFIG_FILES etc. instead of their
19677 # values after options handling.
19678 ac_log="
19679 This file was extended by PostgreSQL $as_me 12devel, which was
19680 generated by GNU Autoconf 2.69.  Invocation command line was
19681
19682   CONFIG_FILES    = $CONFIG_FILES
19683   CONFIG_HEADERS  = $CONFIG_HEADERS
19684   CONFIG_LINKS    = $CONFIG_LINKS
19685   CONFIG_COMMANDS = $CONFIG_COMMANDS
19686   $ $0 $@
19687
19688 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19689 "
19690
19691 _ACEOF
19692
19693 case $ac_config_files in *"
19694 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19695 esac
19696
19697 case $ac_config_headers in *"
19698 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19699 esac
19700
19701
19702 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19703 # Files that config.status was made for.
19704 config_files="$ac_config_files"
19705 config_headers="$ac_config_headers"
19706 config_links="$ac_config_links"
19707 config_commands="$ac_config_commands"
19708
19709 _ACEOF
19710
19711 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19712 ac_cs_usage="\
19713 \`$as_me' instantiates files and other configuration actions
19714 from templates according to the current configuration.  Unless the files
19715 and actions are specified as TAGs, all are instantiated by default.
19716
19717 Usage: $0 [OPTION]... [TAG]...
19718
19719   -h, --help       print this help, then exit
19720   -V, --version    print version number and configuration settings, then exit
19721       --config     print configuration, then exit
19722   -q, --quiet, --silent
19723                    do not print progress messages
19724   -d, --debug      don't remove temporary files
19725       --recheck    update $as_me by reconfiguring in the same conditions
19726       --file=FILE[:TEMPLATE]
19727                    instantiate the configuration file FILE
19728       --header=FILE[:TEMPLATE]
19729                    instantiate the configuration header FILE
19730
19731 Configuration files:
19732 $config_files
19733
19734 Configuration headers:
19735 $config_headers
19736
19737 Configuration links:
19738 $config_links
19739
19740 Configuration commands:
19741 $config_commands
19742
19743 Report bugs to <pgsql-bugs@postgresql.org>."
19744
19745 _ACEOF
19746 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19747 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19748 ac_cs_version="\\
19749 PostgreSQL config.status 12devel
19750 configured by $0, generated by GNU Autoconf 2.69,
19751   with options \\"\$ac_cs_config\\"
19752
19753 Copyright (C) 2012 Free Software Foundation, Inc.
19754 This config.status script is free software; the Free Software Foundation
19755 gives unlimited permission to copy, distribute and modify it."
19756
19757 ac_pwd='$ac_pwd'
19758 srcdir='$srcdir'
19759 INSTALL='$INSTALL'
19760 MKDIR_P='$MKDIR_P'
19761 AWK='$AWK'
19762 test -n "\$AWK" || AWK=awk
19763 _ACEOF
19764
19765 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19766 # The default lists apply if the user does not specify any file.
19767 ac_need_defaults=:
19768 while test $# != 0
19769 do
19770   case $1 in
19771   --*=?*)
19772     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19773     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19774     ac_shift=:
19775     ;;
19776   --*=)
19777     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19778     ac_optarg=
19779     ac_shift=:
19780     ;;
19781   *)
19782     ac_option=$1
19783     ac_optarg=$2
19784     ac_shift=shift
19785     ;;
19786   esac
19787
19788   case $ac_option in
19789   # Handling of the options.
19790   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19791     ac_cs_recheck=: ;;
19792   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19793     $as_echo "$ac_cs_version"; exit ;;
19794   --config | --confi | --conf | --con | --co | --c )
19795     $as_echo "$ac_cs_config"; exit ;;
19796   --debug | --debu | --deb | --de | --d | -d )
19797     debug=: ;;
19798   --file | --fil | --fi | --f )
19799     $ac_shift
19800     case $ac_optarg in
19801     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19802     '') as_fn_error $? "missing file argument" ;;
19803     esac
19804     as_fn_append CONFIG_FILES " '$ac_optarg'"
19805     ac_need_defaults=false;;
19806   --header | --heade | --head | --hea )
19807     $ac_shift
19808     case $ac_optarg in
19809     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19810     esac
19811     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19812     ac_need_defaults=false;;
19813   --he | --h)
19814     # Conflict between --help and --header
19815     as_fn_error $? "ambiguous option: \`$1'
19816 Try \`$0 --help' for more information.";;
19817   --help | --hel | -h )
19818     $as_echo "$ac_cs_usage"; exit ;;
19819   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19820   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19821     ac_cs_silent=: ;;
19822
19823   # This is an error.
19824   -*) as_fn_error $? "unrecognized option: \`$1'
19825 Try \`$0 --help' for more information." ;;
19826
19827   *) as_fn_append ac_config_targets " $1"
19828      ac_need_defaults=false ;;
19829
19830   esac
19831   shift
19832 done
19833
19834 ac_configure_extra_args=
19835
19836 if $ac_cs_silent; then
19837   exec 6>/dev/null
19838   ac_configure_extra_args="$ac_configure_extra_args --silent"
19839 fi
19840
19841 _ACEOF
19842 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19843 if \$ac_cs_recheck; then
19844   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19845   shift
19846   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19847   CONFIG_SHELL='$SHELL'
19848   export CONFIG_SHELL
19849   exec "\$@"
19850 fi
19851
19852 _ACEOF
19853 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19854 exec 5>>config.log
19855 {
19856   echo
19857   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19858 ## Running $as_me. ##
19859 _ASBOX
19860   $as_echo "$ac_log"
19861 } >&5
19862
19863 _ACEOF
19864 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19865 _ACEOF
19866
19867 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19868
19869 # Handling of arguments.
19870 for ac_config_target in $ac_config_targets
19871 do
19872   case $ac_config_target in
19873     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19874     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19875     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19876     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19877     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19878     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19879     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19880     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19881     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19882     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19883     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19884
19885   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19886   esac
19887 done
19888
19889
19890 # If the user did not use the arguments to specify the items to instantiate,
19891 # then the envvar interface is used.  Set only those that are not.
19892 # We use the long form for the default assignment because of an extremely
19893 # bizarre bug on SunOS 4.1.3.
19894 if $ac_need_defaults; then
19895   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19896   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19897   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19898   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19899 fi
19900
19901 # Have a temporary directory for convenience.  Make it in the build tree
19902 # simply because there is no reason against having it here, and in addition,
19903 # creating and moving files from /tmp can sometimes cause problems.
19904 # Hook for its removal unless debugging.
19905 # Note that there is a small window in which the directory will not be cleaned:
19906 # after its creation but before its name has been assigned to `$tmp'.
19907 $debug ||
19908 {
19909   tmp= ac_tmp=
19910   trap 'exit_status=$?
19911   : "${ac_tmp:=$tmp}"
19912   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19913 ' 0
19914   trap 'as_fn_exit 1' 1 2 13 15
19915 }
19916 # Create a (secure) tmp directory for tmp files.
19917
19918 {
19919   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19920   test -d "$tmp"
19921 }  ||
19922 {
19923   tmp=./conf$$-$RANDOM
19924   (umask 077 && mkdir "$tmp")
19925 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19926 ac_tmp=$tmp
19927
19928 # Set up the scripts for CONFIG_FILES section.
19929 # No need to generate them if there are no CONFIG_FILES.
19930 # This happens for instance with `./config.status config.h'.
19931 if test -n "$CONFIG_FILES"; then
19932
19933
19934 ac_cr=`echo X | tr X '\015'`
19935 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19936 # But we know of no other shell where ac_cr would be empty at this
19937 # point, so we can use a bashism as a fallback.
19938 if test "x$ac_cr" = x; then
19939   eval ac_cr=\$\'\\r\'
19940 fi
19941 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19942 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19943   ac_cs_awk_cr='\\r'
19944 else
19945   ac_cs_awk_cr=$ac_cr
19946 fi
19947
19948 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19949 _ACEOF
19950
19951
19952 {
19953   echo "cat >conf$$subs.awk <<_ACEOF" &&
19954   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19955   echo "_ACEOF"
19956 } >conf$$subs.sh ||
19957   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19958 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19959 ac_delim='%!_!# '
19960 for ac_last_try in false false false false false :; do
19961   . ./conf$$subs.sh ||
19962     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19963
19964   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19965   if test $ac_delim_n = $ac_delim_num; then
19966     break
19967   elif $ac_last_try; then
19968     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19969   else
19970     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19971   fi
19972 done
19973 rm -f conf$$subs.sh
19974
19975 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19976 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19977 _ACEOF
19978 sed -n '
19979 h
19980 s/^/S["/; s/!.*/"]=/
19981 p
19982 g
19983 s/^[^!]*!//
19984 :repl
19985 t repl
19986 s/'"$ac_delim"'$//
19987 t delim
19988 :nl
19989 h
19990 s/\(.\{148\}\)..*/\1/
19991 t more1
19992 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19993 p
19994 n
19995 b repl
19996 :more1
19997 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19998 p
19999 g
20000 s/.\{148\}//
20001 t nl
20002 :delim
20003 h
20004 s/\(.\{148\}\)..*/\1/
20005 t more2
20006 s/["\\]/\\&/g; s/^/"/; s/$/"/
20007 p
20008 b
20009 :more2
20010 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20011 p
20012 g
20013 s/.\{148\}//
20014 t delim
20015 ' <conf$$subs.awk | sed '
20016 /^[^""]/{
20017   N
20018   s/\n//
20019 }
20020 ' >>$CONFIG_STATUS || ac_write_fail=1
20021 rm -f conf$$subs.awk
20022 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20023 _ACAWK
20024 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20025   for (key in S) S_is_set[key] = 1
20026   FS = "\a"
20027
20028 }
20029 {
20030   line = $ 0
20031   nfields = split(line, field, "@")
20032   substed = 0
20033   len = length(field[1])
20034   for (i = 2; i < nfields; i++) {
20035     key = field[i]
20036     keylen = length(key)
20037     if (S_is_set[key]) {
20038       value = S[key]
20039       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20040       len += length(value) + length(field[++i])
20041       substed = 1
20042     } else
20043       len += 1 + keylen
20044   }
20045
20046   print line
20047 }
20048
20049 _ACAWK
20050 _ACEOF
20051 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20052 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20053   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20054 else
20055   cat
20056 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20057   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20058 _ACEOF
20059
20060 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20061 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20062 # trailing colons and then remove the whole line if VPATH becomes empty
20063 # (actually we leave an empty line to preserve line numbers).
20064 if test "x$srcdir" = x.; then
20065   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
20066 h
20067 s///
20068 s/^/:/
20069 s/[      ]*$/:/
20070 s/:\$(srcdir):/:/g
20071 s/:\${srcdir}:/:/g
20072 s/:@srcdir@:/:/g
20073 s/^:*//
20074 s/:*$//
20075 x
20076 s/\(=[   ]*\).*/\1/
20077 G
20078 s/\n//
20079 s/^[^=]*=[       ]*$//
20080 }'
20081 fi
20082
20083 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20084 fi # test -n "$CONFIG_FILES"
20085
20086 # Set up the scripts for CONFIG_HEADERS section.
20087 # No need to generate them if there are no CONFIG_HEADERS.
20088 # This happens for instance with `./config.status Makefile'.
20089 if test -n "$CONFIG_HEADERS"; then
20090 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20091 BEGIN {
20092 _ACEOF
20093
20094 # Transform confdefs.h into an awk script `defines.awk', embedded as
20095 # here-document in config.status, that substitutes the proper values into
20096 # config.h.in to produce config.h.
20097
20098 # Create a delimiter string that does not exist in confdefs.h, to ease
20099 # handling of long lines.
20100 ac_delim='%!_!# '
20101 for ac_last_try in false false :; do
20102   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20103   if test -z "$ac_tt"; then
20104     break
20105   elif $ac_last_try; then
20106     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20107   else
20108     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20109   fi
20110 done
20111
20112 # For the awk script, D is an array of macro values keyed by name,
20113 # likewise P contains macro parameters if any.  Preserve backslash
20114 # newline sequences.
20115
20116 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20117 sed -n '
20118 s/.\{148\}/&'"$ac_delim"'/g
20119 t rset
20120 :rset
20121 s/^[     ]*#[    ]*define[       ][      ]*/ /
20122 t def
20123 d
20124 :def
20125 s/\\$//
20126 t bsnl
20127 s/["\\]/\\&/g
20128 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20129 D["\1"]=" \3"/p
20130 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
20131 d
20132 :bsnl
20133 s/["\\]/\\&/g
20134 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20135 D["\1"]=" \3\\\\\\n"\\/p
20136 t cont
20137 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20138 t cont
20139 d
20140 :cont
20141 n
20142 s/.\{148\}/&'"$ac_delim"'/g
20143 t clear
20144 :clear
20145 s/\\$//
20146 t bsnlc
20147 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20148 d
20149 :bsnlc
20150 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20151 b cont
20152 ' <confdefs.h | sed '
20153 s/'"$ac_delim"'/"\\\
20154 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20155
20156 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20157   for (key in D) D_is_set[key] = 1
20158   FS = "\a"
20159 }
20160 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20161   line = \$ 0
20162   split(line, arg, " ")
20163   if (arg[1] == "#") {
20164     defundef = arg[2]
20165     mac1 = arg[3]
20166   } else {
20167     defundef = substr(arg[1], 2)
20168     mac1 = arg[2]
20169   }
20170   split(mac1, mac2, "(") #)
20171   macro = mac2[1]
20172   prefix = substr(line, 1, index(line, defundef) - 1)
20173   if (D_is_set[macro]) {
20174     # Preserve the white space surrounding the "#".
20175     print prefix "define", macro P[macro] D[macro]
20176     next
20177   } else {
20178     # Replace #undef with comments.  This is necessary, for example,
20179     # in the case of _POSIX_SOURCE, which is predefined and required
20180     # on some systems where configure will not decide to define it.
20181     if (defundef == "undef") {
20182       print "/*", prefix defundef, macro, "*/"
20183       next
20184     }
20185   }
20186 }
20187 { print }
20188 _ACAWK
20189 _ACEOF
20190 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20191   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20192 fi # test -n "$CONFIG_HEADERS"
20193
20194
20195 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
20196 shift
20197 for ac_tag
20198 do
20199   case $ac_tag in
20200   :[FHLC]) ac_mode=$ac_tag; continue;;
20201   esac
20202   case $ac_mode$ac_tag in
20203   :[FHL]*:*);;
20204   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20205   :[FH]-) ac_tag=-:-;;
20206   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20207   esac
20208   ac_save_IFS=$IFS
20209   IFS=:
20210   set x $ac_tag
20211   IFS=$ac_save_IFS
20212   shift
20213   ac_file=$1
20214   shift
20215
20216   case $ac_mode in
20217   :L) ac_source=$1;;
20218   :[FH])
20219     ac_file_inputs=
20220     for ac_f
20221     do
20222       case $ac_f in
20223       -) ac_f="$ac_tmp/stdin";;
20224       *) # Look for the file first in the build tree, then in the source tree
20225          # (if the path is not absolute).  The absolute path cannot be DOS-style,
20226          # because $ac_f cannot contain `:'.
20227          test -f "$ac_f" ||
20228            case $ac_f in
20229            [\\/$]*) false;;
20230            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20231            esac ||
20232            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20233       esac
20234       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20235       as_fn_append ac_file_inputs " '$ac_f'"
20236     done
20237
20238     # Let's still pretend it is `configure' which instantiates (i.e., don't
20239     # use $as_me), people would be surprised to read:
20240     #    /* config.h.  Generated by config.status.  */
20241     configure_input='Generated from '`
20242           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20243         `' by configure.'
20244     if test x"$ac_file" != x-; then
20245       configure_input="$ac_file.  $configure_input"
20246       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20247 $as_echo "$as_me: creating $ac_file" >&6;}
20248     fi
20249     # Neutralize special characters interpreted by sed in replacement strings.
20250     case $configure_input in #(
20251     *\&* | *\|* | *\\* )
20252        ac_sed_conf_input=`$as_echo "$configure_input" |
20253        sed 's/[\\\\&|]/\\\\&/g'`;; #(
20254     *) ac_sed_conf_input=$configure_input;;
20255     esac
20256
20257     case $ac_tag in
20258     *:-:* | *:-) cat >"$ac_tmp/stdin" \
20259       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20260     esac
20261     ;;
20262   esac
20263
20264   ac_dir=`$as_dirname -- "$ac_file" ||
20265 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20266          X"$ac_file" : 'X\(//\)[^/]' \| \
20267          X"$ac_file" : 'X\(//\)$' \| \
20268          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20269 $as_echo X"$ac_file" |
20270     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20271             s//\1/
20272             q
20273           }
20274           /^X\(\/\/\)[^/].*/{
20275             s//\1/
20276             q
20277           }
20278           /^X\(\/\/\)$/{
20279             s//\1/
20280             q
20281           }
20282           /^X\(\/\).*/{
20283             s//\1/
20284             q
20285           }
20286           s/.*/./; q'`
20287   as_dir="$ac_dir"; as_fn_mkdir_p
20288   ac_builddir=.
20289
20290 case "$ac_dir" in
20291 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20292 *)
20293   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20294   # A ".." for each directory in $ac_dir_suffix.
20295   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20296   case $ac_top_builddir_sub in
20297   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20298   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20299   esac ;;
20300 esac
20301 ac_abs_top_builddir=$ac_pwd
20302 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20303 # for backward compatibility:
20304 ac_top_builddir=$ac_top_build_prefix
20305
20306 case $srcdir in
20307   .)  # We are building in place.
20308     ac_srcdir=.
20309     ac_top_srcdir=$ac_top_builddir_sub
20310     ac_abs_top_srcdir=$ac_pwd ;;
20311   [\\/]* | ?:[\\/]* )  # Absolute name.
20312     ac_srcdir=$srcdir$ac_dir_suffix;
20313     ac_top_srcdir=$srcdir
20314     ac_abs_top_srcdir=$srcdir ;;
20315   *) # Relative name.
20316     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20317     ac_top_srcdir=$ac_top_build_prefix$srcdir
20318     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20319 esac
20320 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20321
20322
20323   case $ac_mode in
20324   :F)
20325   #
20326   # CONFIG_FILE
20327   #
20328
20329   case $INSTALL in
20330   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20331   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20332   esac
20333   ac_MKDIR_P=$MKDIR_P
20334   case $MKDIR_P in
20335   [\\/$]* | ?:[\\/]* ) ;;
20336   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20337   esac
20338 _ACEOF
20339
20340 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20341 # If the template does not know about datarootdir, expand it.
20342 # FIXME: This hack should be removed a few years after 2.60.
20343 ac_datarootdir_hack=; ac_datarootdir_seen=
20344 ac_sed_dataroot='
20345 /datarootdir/ {
20346   p
20347   q
20348 }
20349 /@datadir@/p
20350 /@docdir@/p
20351 /@infodir@/p
20352 /@localedir@/p
20353 /@mandir@/p'
20354 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20355 *datarootdir*) ac_datarootdir_seen=yes;;
20356 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20357   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20358 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20359 _ACEOF
20360 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20361   ac_datarootdir_hack='
20362   s&@datadir@&$datadir&g
20363   s&@docdir@&$docdir&g
20364   s&@infodir@&$infodir&g
20365   s&@localedir@&$localedir&g
20366   s&@mandir@&$mandir&g
20367   s&\\\${datarootdir}&$datarootdir&g' ;;
20368 esac
20369 _ACEOF
20370
20371 # Neutralize VPATH when `$srcdir' = `.'.
20372 # Shell code in configure.ac might set extrasub.
20373 # FIXME: do we really want to maintain this feature?
20374 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20375 ac_sed_extra="$ac_vpsub
20376 $extrasub
20377 _ACEOF
20378 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20379 :t
20380 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20381 s|@configure_input@|$ac_sed_conf_input|;t t
20382 s&@top_builddir@&$ac_top_builddir_sub&;t t
20383 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20384 s&@srcdir@&$ac_srcdir&;t t
20385 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20386 s&@top_srcdir@&$ac_top_srcdir&;t t
20387 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20388 s&@builddir@&$ac_builddir&;t t
20389 s&@abs_builddir@&$ac_abs_builddir&;t t
20390 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20391 s&@INSTALL@&$ac_INSTALL&;t t
20392 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20393 $ac_datarootdir_hack
20394 "
20395 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20396   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20397
20398 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20399   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20400   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20401       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20402   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20403 which seems to be undefined.  Please make sure it is defined" >&5
20404 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20405 which seems to be undefined.  Please make sure it is defined" >&2;}
20406
20407   rm -f "$ac_tmp/stdin"
20408   case $ac_file in
20409   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20410   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20411   esac \
20412   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20413  ;;
20414   :H)
20415   #
20416   # CONFIG_HEADER
20417   #
20418   if test x"$ac_file" != x-; then
20419     {
20420       $as_echo "/* $configure_input  */" \
20421       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20422     } >"$ac_tmp/config.h" \
20423       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20424     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20425       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20426 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20427     else
20428       rm -f "$ac_file"
20429       mv "$ac_tmp/config.h" "$ac_file" \
20430         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20431     fi
20432   else
20433     $as_echo "/* $configure_input  */" \
20434       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20435       || as_fn_error $? "could not create -" "$LINENO" 5
20436   fi
20437  ;;
20438   :L)
20439   #
20440   # CONFIG_LINK
20441   #
20442
20443   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20444     :
20445   else
20446     # Prefer the file from the source tree if names are identical.
20447     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20448       ac_source=$srcdir/$ac_source
20449     fi
20450
20451     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20452 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20453
20454     if test ! -r "$ac_source"; then
20455       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20456     fi
20457     rm -f "$ac_file"
20458
20459     # Try a relative symlink, then a hard link, then a copy.
20460     case $ac_source in
20461     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20462         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20463     esac
20464     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20465       ln "$ac_source" "$ac_file" 2>/dev/null ||
20466       cp -p "$ac_source" "$ac_file" ||
20467       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20468   fi
20469  ;;
20470   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20471 $as_echo "$as_me: executing $ac_file commands" >&6;}
20472  ;;
20473   esac
20474
20475
20476   case $ac_file$ac_mode in
20477     "check_win32_symlinks":C)
20478 # Links sometimes fail undetected on Mingw -
20479 # so here we detect it and warn the user
20480 for FILE in $CONFIG_LINKS
20481  do
20482         # test -e works for symlinks in the MinGW console
20483         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20484 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20485  done
20486  ;;
20487     "src/include/pg_config.h":H)
20488 # Update timestamp for pg_config.h (see Makefile.global)
20489 echo >src/include/stamp-h
20490  ;;
20491     "src/include/pg_config_ext.h":H)
20492 # Update timestamp for pg_config_ext.h (see Makefile.global)
20493 echo >src/include/stamp-ext-h
20494  ;;
20495     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20496
20497   esac
20498 done # for ac_tag
20499
20500
20501 as_fn_exit 0
20502 _ACEOF
20503 ac_clean_files=$ac_clean_files_save
20504
20505 test $ac_write_fail = 0 ||
20506   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20507
20508
20509 # configure is writing to config.log, and then calls config.status.
20510 # config.status does its own redirection, appending to config.log.
20511 # Unfortunately, on DOS this fails, as config.log is still kept open
20512 # by configure, so config.status won't be able to write to it; its
20513 # output is simply discarded.  So we exec the FD to /dev/null,
20514 # effectively closing config.log, so it can be properly (re)opened and
20515 # appended to by config.status.  When coming back to configure, we
20516 # need to make the FD available again.
20517 if test "$no_create" != yes; then
20518   ac_cs_success=:
20519   ac_config_status_args=
20520   test "$silent" = yes &&
20521     ac_config_status_args="$ac_config_status_args --quiet"
20522   exec 5>/dev/null
20523   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20524   exec 5>>config.log
20525   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20526   # would make configure fail if this is the last instruction.
20527   $ac_cs_success || as_fn_exit 1
20528 fi
20529 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20530   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20531 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20532 fi
20533