]> granicus.if.org Git - postgresql/blob - configure
Replace @postgresql.org with @lists.postgresql.org for mailinglists
[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@lists.postgresql.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 #
14 # Copyright (c) 1996-2019, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else
29   case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='print -r --'
50   as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in #(
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order.  Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" ""        $as_nl"
92
93 # Find who we are.  Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96   *[\\/]* ) as_myself=$0 ;;
97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100   IFS=$as_save_IFS
101   test -z "$as_dir" && as_dir=.
102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103   done
104 IFS=$as_save_IFS
105
106      ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111   as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115   exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there.  '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 # Use a proper internal environment variable to ensure we don't fall
140   # into an infinite loop, continuously re-executing ourselves.
141   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142     _as_can_reexec=no; export _as_can_reexec;
143     # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151   *v*x* | *x*v* ) as_opts=-vx ;;
152   *v* ) as_opts=-v ;;
153   *x* ) as_opts=-x ;;
154   * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
161   fi
162   # We don't want this to propagate to other subprocesses.
163           { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166   emulate sh
167   NULLCMD=:
168   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169   # is contrary to our usage.  Disable this feature.
170   alias -g '\${1+\"\$@\"}'='\"\$@\"'
171   setopt NO_GLOB_SUBST
172 else
173   case \`(set -o) 2>/dev/null\` in #(
174   *posix*) :
175     set -o posix ;; #(
176   *) :
177      ;;
178 esac
179 fi
180 "
181   as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
186
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194 else
195   exitcode=1; echo positional parameters were not saved.
196 fi
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204   if (eval "$as_required") 2>/dev/null; then :
205   as_have_required=yes
206 else
207   as_have_required=no
208 fi
209   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211 else
212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 do
216   IFS=$as_save_IFS
217   test -z "$as_dir" && as_dir=.
218   as_found=:
219   case $as_dir in #(
220          /*)
221            for as_base in sh bash ksh sh5; do
222              # Try only shells that exist, to save several forks.
223              as_shell=$as_dir/$as_base
224              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   CONFIG_SHELL=$as_shell as_have_required=yes
227                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228   break 2
229 fi
230 fi
231            done;;
232        esac
233   as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237   CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
240
241
242       if test "x$CONFIG_SHELL" != x; then :
243   export CONFIG_SHELL
244              # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252   *v*x* | *x*v* ) as_opts=-vx ;;
253   *v* ) as_opts=-v ;;
254   *x* ) as_opts=-x ;;
255   * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
262 fi
263
264     if test x$as_have_required = xno; then :
265   $as_echo "$0: This script requires a shell more modern than all"
266   $as_echo "$0: the shells that I found on your system."
267   if test x${ZSH_VERSION+set} = xset ; then
268     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270   else
271     $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@lists.postgresql.org about your system,
273 $0: including any error possibly output before this
274 $0: message. Then install a modern shell, or manually run
275 $0: the script under such a shell if you do have one."
276   fi
277   exit 1
278 fi
279 fi
280 fi
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
286
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
294 {
295   { eval $1=; unset $1;}
296 }
297 as_unset=as_fn_unset
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304   return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312   set +e
313   as_fn_set_status $1
314   exit $1
315 } # as_fn_exit
316
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
321 {
322
323   case $as_dir in #(
324   -*) as_dir=./$as_dir;;
325   esac
326   test -d "$as_dir" || eval $as_mkdir_p || {
327     as_dirs=
328     while :; do
329       case $as_dir in #(
330       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331       *) as_qdir=$as_dir;;
332       esac
333       as_dirs="'$as_qdir' $as_dirs"
334       as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336          X"$as_dir" : 'X\(//\)[^/]' \| \
337          X"$as_dir" : 'X\(//\)$' \| \
338          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341             s//\1/
342             q
343           }
344           /^X\(\/\/\)[^/].*/{
345             s//\1/
346             q
347           }
348           /^X\(\/\/\)$/{
349             s//\1/
350             q
351           }
352           /^X\(\/\).*/{
353             s//\1/
354             q
355           }
356           s/.*/./; q'`
357       test -d "$as_dir" && break
358     done
359     test -z "$as_dirs" || eval "mkdir $as_dirs"
360   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363 } # as_fn_mkdir_p
364
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
369 {
370   test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379   eval 'as_fn_append ()
380   {
381     eval $1+=\$2
382   }'
383 else
384   as_fn_append ()
385   {
386     eval $1=\$$1\$2
387   }
388 fi # as_fn_append
389
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396   eval 'as_fn_arith ()
397   {
398     as_val=$(( $* ))
399   }'
400 else
401   as_fn_arith ()
402   {
403     as_val=`expr "$@" || test $? -eq 1`
404   }
405 fi # as_fn_arith
406
407
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
414 {
415   as_status=$1; test $as_status -eq 0 && as_status=1
416   if test "$4"; then
417     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419   fi
420   $as_echo "$as_me: error: $2" >&2
421   as_fn_exit $as_status
422 } # as_fn_error
423
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425    test "X`expr 00001 : '.*\(...\)'`" = X001; then
426   as_expr=expr
427 else
428   as_expr=false
429 fi
430
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432   as_basename=basename
433 else
434   as_basename=false
435 fi
436
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438   as_dirname=dirname
439 else
440   as_dirname=false
441 fi
442
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445          X"$0" : 'X\(//\)$' \| \
446          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448     sed '/^.*\/\([^/][^/]*\)\/*$/{
449             s//\1/
450             q
451           }
452           /^X\/\(\/\/\)$/{
453             s//\1/
454             q
455           }
456           /^X\/\(\/\).*/{
457             s//\1/
458             q
459           }
460           s/.*/./; q'`
461
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
468
469
470   as_lineno_1=$LINENO as_lineno_1a=$LINENO
471   as_lineno_2=$LINENO as_lineno_2a=$LINENO
472   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
475   sed -n '
476     p
477     /[$]LINENO/=
478   ' <$as_myself |
479     sed '
480       s/[$]LINENO.*/&-/
481       t lineno
482       b
483       :lineno
484       N
485       :loop
486       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487       t loop
488       s/-\n.*//
489     ' >$as_me.lineno &&
490   chmod +x "$as_me.lineno" ||
491     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
492
493   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494   # already done that, so ensure we don't try to do so again and fall
495   # in an infinite loop.  This has already happened in practice.
496   _as_can_reexec=no; export _as_can_reexec
497   # Don't try to exec as it changes $[0], causing all sort of problems
498   # (the dirname of $[0] is not the place where we might find the
499   # original and so on.  Autoconf is especially sensitive to this).
500   . "./$as_me.lineno"
501   # Exit status is that of the last command.
502   exit
503 }
504
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508   case `echo 'xy\c'` in
509   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
510   xy)  ECHO_C='\c';;
511   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
512        ECHO_T=' ';;
513   esac;;
514 *)
515   ECHO_N='-n';;
516 esac
517
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520   rm -f conf$$.dir/conf$$.file
521 else
522   rm -f conf$$.dir
523   mkdir conf$$.dir 2>/dev/null
524 fi
525 if (echo >conf$$.file) 2>/dev/null; then
526   if ln -s conf$$.file conf$$ 2>/dev/null; then
527     as_ln_s='ln -s'
528     # ... but there are two gotchas:
529     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531     # In both cases, we have to default to `cp -pR'.
532     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533       as_ln_s='cp -pR'
534   elif ln conf$$.file conf$$ 2>/dev/null; then
535     as_ln_s=ln
536   else
537     as_ln_s='cp -pR'
538   fi
539 else
540   as_ln_s='cp -pR'
541 fi
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
544
545 if mkdir -p . 2>/dev/null; then
546   as_mkdir_p='mkdir -p "$as_dir"'
547 else
548   test -d ./-p && rmdir ./-p
549   as_mkdir_p=false
550 fi
551
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
554
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
564
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
569
570 #
571 # Initializations.
572 #
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
581
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='12devel'
586 PACKAGE_STRING='PostgreSQL 12devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL=''
589
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 #  include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 #  include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
627
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 PROVE
633 FOP
634 XSLTPROC
635 DBTOEPUB
636 have_docbook
637 XMLLINT
638 TCL_SHLIB_LD_LIBS
639 TCL_SHARED_BUILD
640 TCL_LIB_SPEC
641 TCL_LIBS
642 TCL_INCLUDE_SPEC
643 TCL_CONFIG_SH
644 TCLSH
645 XGETTEXT
646 MSGMERGE
647 MSGFMT_FLAGS
648 MSGFMT
649 PG_CRC32C_OBJS
650 CFLAGS_ARMV8_CRC32C
651 CFLAGS_SSE42
652 have_win32_dbghelp
653 LIBOBJS
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 PTHREAD_CFLAGS
658 PTHREAD_LIBS
659 PTHREAD_CC
660 ax_pthread_config
661 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_rpath
765 default_port
766 WANTED_LANGUAGES
767 enable_nls
768 PORTNAME
769 host_os
770 host_vendor
771 host_cpu
772 host
773 build_os
774 build_vendor
775 build_cpu
776 build
777 PG_MAJORVERSION
778 configure_args
779 target_alias
780 host_alias
781 build_alias
782 LIBS
783 ECHO_T
784 ECHO_N
785 ECHO_C
786 DEFS
787 mandir
788 localedir
789 libdir
790 psdir
791 pdfdir
792 dvidir
793 htmldir
794 infodir
795 docdir
796 oldincludedir
797 includedir
798 localstatedir
799 sharedstatedir
800 sysconfdir
801 datadir
802 datarootdir
803 libexecdir
804 sbindir
805 bindir
806 program_transform_name
807 prefix
808 exec_prefix
809 PACKAGE_URL
810 PACKAGE_BUGREPORT
811 PACKAGE_STRING
812 PACKAGE_VERSION
813 PACKAGE_TARNAME
814 PACKAGE_NAME
815 PATH_SEPARATOR
816 SHELL'
817 ac_subst_files=''
818 ac_user_opts='
819 enable_option_checking
820 with_extra_version
821 with_template
822 with_includes
823 with_libraries
824 with_libs
825 enable_integer_datetimes
826 enable_nls
827 with_pgport
828 enable_rpath
829 enable_spinlocks
830 enable_atomics
831 enable_debug
832 enable_profiling
833 enable_coverage
834 enable_dtrace
835 enable_tap_tests
836 with_blocksize
837 with_segsize
838 with_wal_blocksize
839 with_CC
840 with_llvm
841 enable_depend
842 enable_cassert
843 enable_thread_safety
844 with_icu
845 with_tcl
846 with_tclconfig
847 with_perl
848 with_python
849 with_gssapi
850 with_krb_srvnam
851 with_pam
852 with_bsd_auth
853 with_ldap
854 with_bonjour
855 with_openssl
856 with_selinux
857 with_systemd
858 with_readline
859 with_libedit_preferred
860 with_uuid
861 with_ossp_uuid
862 with_libxml
863 with_libxslt
864 with_system_tzdata
865 with_zlib
866 with_gnu_ld
867 enable_largefile
868 enable_float4_byval
869 enable_float8_byval
870 '
871       ac_precious_vars='build_alias
872 host_alias
873 target_alias
874 CC
875 CFLAGS
876 LDFLAGS
877 LIBS
878 CPPFLAGS
879 CXX
880 CXXFLAGS
881 CCC
882 LLVM_CONFIG
883 CLANG
884 CPP
885 PKG_CONFIG
886 PKG_CONFIG_PATH
887 PKG_CONFIG_LIBDIR
888 ICU_CFLAGS
889 ICU_LIBS
890 XML2_CONFIG
891 LDFLAGS_EX
892 LDFLAGS_SL
893 PERL
894 PYTHON
895 MSGFMT
896 TCLSH'
897
898
899 # Initialize some variables set by options.
900 ac_init_help=
901 ac_init_version=false
902 ac_unrecognized_opts=
903 ac_unrecognized_sep=
904 # The variables have the same names as the options, with
905 # dashes changed to underlines.
906 cache_file=/dev/null
907 exec_prefix=NONE
908 no_create=
909 no_recursion=
910 prefix=NONE
911 program_prefix=NONE
912 program_suffix=NONE
913 program_transform_name=s,x,x,
914 silent=
915 site=
916 srcdir=
917 verbose=
918 x_includes=NONE
919 x_libraries=NONE
920
921 # Installation directory options.
922 # These are left unexpanded so users can "make install exec_prefix=/foo"
923 # and all the variables that are supposed to be based on exec_prefix
924 # by default will actually change.
925 # Use braces instead of parens because sh, perl, etc. also accept them.
926 # (The list follows the same order as the GNU Coding Standards.)
927 bindir='${exec_prefix}/bin'
928 sbindir='${exec_prefix}/sbin'
929 libexecdir='${exec_prefix}/libexec'
930 datarootdir='${prefix}/share'
931 datadir='${datarootdir}'
932 sysconfdir='${prefix}/etc'
933 sharedstatedir='${prefix}/com'
934 localstatedir='${prefix}/var'
935 includedir='${prefix}/include'
936 oldincludedir='/usr/include'
937 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
938 infodir='${datarootdir}/info'
939 htmldir='${docdir}'
940 dvidir='${docdir}'
941 pdfdir='${docdir}'
942 psdir='${docdir}'
943 libdir='${exec_prefix}/lib'
944 localedir='${datarootdir}/locale'
945 mandir='${datarootdir}/man'
946
947 ac_prev=
948 ac_dashdash=
949 for ac_option
950 do
951   # If the previous option needs an argument, assign it.
952   if test -n "$ac_prev"; then
953     eval $ac_prev=\$ac_option
954     ac_prev=
955     continue
956   fi
957
958   case $ac_option in
959   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
960   *=)   ac_optarg= ;;
961   *)    ac_optarg=yes ;;
962   esac
963
964   # Accept the important Cygnus configure options, so we can diagnose typos.
965
966   case $ac_dashdash$ac_option in
967   --)
968     ac_dashdash=yes ;;
969
970   -bindir | --bindir | --bindi | --bind | --bin | --bi)
971     ac_prev=bindir ;;
972   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
973     bindir=$ac_optarg ;;
974
975   -build | --build | --buil | --bui | --bu)
976     ac_prev=build_alias ;;
977   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
978     build_alias=$ac_optarg ;;
979
980   -cache-file | --cache-file | --cache-fil | --cache-fi \
981   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
982     ac_prev=cache_file ;;
983   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
984   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
985     cache_file=$ac_optarg ;;
986
987   --config-cache | -C)
988     cache_file=config.cache ;;
989
990   -datadir | --datadir | --datadi | --datad)
991     ac_prev=datadir ;;
992   -datadir=* | --datadir=* | --datadi=* | --datad=*)
993     datadir=$ac_optarg ;;
994
995   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
996   | --dataroo | --dataro | --datar)
997     ac_prev=datarootdir ;;
998   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
999   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1000     datarootdir=$ac_optarg ;;
1001
1002   -disable-* | --disable-*)
1003     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1004     # Reject names that are not valid shell variable names.
1005     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1006       as_fn_error $? "invalid feature name: $ac_useropt"
1007     ac_useropt_orig=$ac_useropt
1008     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1009     case $ac_user_opts in
1010       *"
1011 "enable_$ac_useropt"
1012 "*) ;;
1013       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1014          ac_unrecognized_sep=', ';;
1015     esac
1016     eval enable_$ac_useropt=no ;;
1017
1018   -docdir | --docdir | --docdi | --doc | --do)
1019     ac_prev=docdir ;;
1020   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1021     docdir=$ac_optarg ;;
1022
1023   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1024     ac_prev=dvidir ;;
1025   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1026     dvidir=$ac_optarg ;;
1027
1028   -enable-* | --enable-*)
1029     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1030     # Reject names that are not valid shell variable names.
1031     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1032       as_fn_error $? "invalid feature name: $ac_useropt"
1033     ac_useropt_orig=$ac_useropt
1034     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1035     case $ac_user_opts in
1036       *"
1037 "enable_$ac_useropt"
1038 "*) ;;
1039       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1040          ac_unrecognized_sep=', ';;
1041     esac
1042     eval enable_$ac_useropt=\$ac_optarg ;;
1043
1044   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1045   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1046   | --exec | --exe | --ex)
1047     ac_prev=exec_prefix ;;
1048   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1049   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1050   | --exec=* | --exe=* | --ex=*)
1051     exec_prefix=$ac_optarg ;;
1052
1053   -gas | --gas | --ga | --g)
1054     # Obsolete; use --with-gas.
1055     with_gas=yes ;;
1056
1057   -help | --help | --hel | --he | -h)
1058     ac_init_help=long ;;
1059   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1060     ac_init_help=recursive ;;
1061   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1062     ac_init_help=short ;;
1063
1064   -host | --host | --hos | --ho)
1065     ac_prev=host_alias ;;
1066   -host=* | --host=* | --hos=* | --ho=*)
1067     host_alias=$ac_optarg ;;
1068
1069   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1070     ac_prev=htmldir ;;
1071   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1072   | --ht=*)
1073     htmldir=$ac_optarg ;;
1074
1075   -includedir | --includedir | --includedi | --included | --include \
1076   | --includ | --inclu | --incl | --inc)
1077     ac_prev=includedir ;;
1078   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1079   | --includ=* | --inclu=* | --incl=* | --inc=*)
1080     includedir=$ac_optarg ;;
1081
1082   -infodir | --infodir | --infodi | --infod | --info | --inf)
1083     ac_prev=infodir ;;
1084   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1085     infodir=$ac_optarg ;;
1086
1087   -libdir | --libdir | --libdi | --libd)
1088     ac_prev=libdir ;;
1089   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1090     libdir=$ac_optarg ;;
1091
1092   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1093   | --libexe | --libex | --libe)
1094     ac_prev=libexecdir ;;
1095   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1096   | --libexe=* | --libex=* | --libe=*)
1097     libexecdir=$ac_optarg ;;
1098
1099   -localedir | --localedir | --localedi | --localed | --locale)
1100     ac_prev=localedir ;;
1101   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1102     localedir=$ac_optarg ;;
1103
1104   -localstatedir | --localstatedir | --localstatedi | --localstated \
1105   | --localstate | --localstat | --localsta | --localst | --locals)
1106     ac_prev=localstatedir ;;
1107   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1108   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1109     localstatedir=$ac_optarg ;;
1110
1111   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1112     ac_prev=mandir ;;
1113   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1114     mandir=$ac_optarg ;;
1115
1116   -nfp | --nfp | --nf)
1117     # Obsolete; use --without-fp.
1118     with_fp=no ;;
1119
1120   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1121   | --no-cr | --no-c | -n)
1122     no_create=yes ;;
1123
1124   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1125   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1126     no_recursion=yes ;;
1127
1128   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1129   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1130   | --oldin | --oldi | --old | --ol | --o)
1131     ac_prev=oldincludedir ;;
1132   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1133   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1134   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1135     oldincludedir=$ac_optarg ;;
1136
1137   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1138     ac_prev=prefix ;;
1139   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1140     prefix=$ac_optarg ;;
1141
1142   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1143   | --program-pre | --program-pr | --program-p)
1144     ac_prev=program_prefix ;;
1145   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1146   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1147     program_prefix=$ac_optarg ;;
1148
1149   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1150   | --program-suf | --program-su | --program-s)
1151     ac_prev=program_suffix ;;
1152   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1153   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1154     program_suffix=$ac_optarg ;;
1155
1156   -program-transform-name | --program-transform-name \
1157   | --program-transform-nam | --program-transform-na \
1158   | --program-transform-n | --program-transform- \
1159   | --program-transform | --program-transfor \
1160   | --program-transfo | --program-transf \
1161   | --program-trans | --program-tran \
1162   | --progr-tra | --program-tr | --program-t)
1163     ac_prev=program_transform_name ;;
1164   -program-transform-name=* | --program-transform-name=* \
1165   | --program-transform-nam=* | --program-transform-na=* \
1166   | --program-transform-n=* | --program-transform-=* \
1167   | --program-transform=* | --program-transfor=* \
1168   | --program-transfo=* | --program-transf=* \
1169   | --program-trans=* | --program-tran=* \
1170   | --progr-tra=* | --program-tr=* | --program-t=*)
1171     program_transform_name=$ac_optarg ;;
1172
1173   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1174     ac_prev=pdfdir ;;
1175   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1176     pdfdir=$ac_optarg ;;
1177
1178   -psdir | --psdir | --psdi | --psd | --ps)
1179     ac_prev=psdir ;;
1180   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1181     psdir=$ac_optarg ;;
1182
1183   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1184   | -silent | --silent | --silen | --sile | --sil)
1185     silent=yes ;;
1186
1187   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1188     ac_prev=sbindir ;;
1189   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1190   | --sbi=* | --sb=*)
1191     sbindir=$ac_optarg ;;
1192
1193   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1194   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1195   | --sharedst | --shareds | --shared | --share | --shar \
1196   | --sha | --sh)
1197     ac_prev=sharedstatedir ;;
1198   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1199   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1200   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1201   | --sha=* | --sh=*)
1202     sharedstatedir=$ac_optarg ;;
1203
1204   -site | --site | --sit)
1205     ac_prev=site ;;
1206   -site=* | --site=* | --sit=*)
1207     site=$ac_optarg ;;
1208
1209   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1210     ac_prev=srcdir ;;
1211   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1212     srcdir=$ac_optarg ;;
1213
1214   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1215   | --syscon | --sysco | --sysc | --sys | --sy)
1216     ac_prev=sysconfdir ;;
1217   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1218   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1219     sysconfdir=$ac_optarg ;;
1220
1221   -target | --target | --targe | --targ | --tar | --ta | --t)
1222     ac_prev=target_alias ;;
1223   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1224     target_alias=$ac_optarg ;;
1225
1226   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1227     verbose=yes ;;
1228
1229   -version | --version | --versio | --versi | --vers | -V)
1230     ac_init_version=: ;;
1231
1232   -with-* | --with-*)
1233     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1234     # Reject names that are not valid shell variable names.
1235     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1236       as_fn_error $? "invalid package name: $ac_useropt"
1237     ac_useropt_orig=$ac_useropt
1238     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1239     case $ac_user_opts in
1240       *"
1241 "with_$ac_useropt"
1242 "*) ;;
1243       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1244          ac_unrecognized_sep=', ';;
1245     esac
1246     eval with_$ac_useropt=\$ac_optarg ;;
1247
1248   -without-* | --without-*)
1249     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1250     # Reject names that are not valid shell variable names.
1251     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1252       as_fn_error $? "invalid package name: $ac_useropt"
1253     ac_useropt_orig=$ac_useropt
1254     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1255     case $ac_user_opts in
1256       *"
1257 "with_$ac_useropt"
1258 "*) ;;
1259       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1260          ac_unrecognized_sep=', ';;
1261     esac
1262     eval with_$ac_useropt=no ;;
1263
1264   --x)
1265     # Obsolete; use --with-x.
1266     with_x=yes ;;
1267
1268   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1269   | --x-incl | --x-inc | --x-in | --x-i)
1270     ac_prev=x_includes ;;
1271   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1272   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1273     x_includes=$ac_optarg ;;
1274
1275   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1276   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1277     ac_prev=x_libraries ;;
1278   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1279   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1280     x_libraries=$ac_optarg ;;
1281
1282   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1283 Try \`$0 --help' for more information"
1284     ;;
1285
1286   *=*)
1287     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1288     # Reject names that are not valid shell variable names.
1289     case $ac_envvar in #(
1290       '' | [0-9]* | *[!_$as_cr_alnum]* )
1291       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1292     esac
1293     eval $ac_envvar=\$ac_optarg
1294     export $ac_envvar ;;
1295
1296   *)
1297     # FIXME: should be removed in autoconf 3.0.
1298     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1299     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1300       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1301     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1302     ;;
1303
1304   esac
1305 done
1306
1307 if test -n "$ac_prev"; then
1308   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1309   as_fn_error $? "missing argument to $ac_option"
1310 fi
1311
1312 if test -n "$ac_unrecognized_opts"; then
1313   case $enable_option_checking in
1314     no) ;;
1315     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1316     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1317   esac
1318 fi
1319
1320 # Check all directory arguments for consistency.
1321 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1322                 datadir sysconfdir sharedstatedir localstatedir includedir \
1323                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1324                 libdir localedir mandir
1325 do
1326   eval ac_val=\$$ac_var
1327   # Remove trailing slashes.
1328   case $ac_val in
1329     */ )
1330       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1331       eval $ac_var=\$ac_val;;
1332   esac
1333   # Be sure to have absolute directory names.
1334   case $ac_val in
1335     [\\/$]* | ?:[\\/]* )  continue;;
1336     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1337   esac
1338   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1339 done
1340
1341 # There might be people who depend on the old broken behavior: `$host'
1342 # used to hold the argument of --host etc.
1343 # FIXME: To remove some day.
1344 build=$build_alias
1345 host=$host_alias
1346 target=$target_alias
1347
1348 # FIXME: To remove some day.
1349 if test "x$host_alias" != x; then
1350   if test "x$build_alias" = x; then
1351     cross_compiling=maybe
1352   elif test "x$build_alias" != "x$host_alias"; then
1353     cross_compiling=yes
1354   fi
1355 fi
1356
1357 ac_tool_prefix=
1358 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1359
1360 test "$silent" = yes && exec 6>/dev/null
1361
1362
1363 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1364 ac_ls_di=`ls -di .` &&
1365 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1366   as_fn_error $? "working directory cannot be determined"
1367 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1368   as_fn_error $? "pwd does not report name of working directory"
1369
1370
1371 # Find the source files, if location was not specified.
1372 if test -z "$srcdir"; then
1373   ac_srcdir_defaulted=yes
1374   # Try the directory containing this script, then the parent directory.
1375   ac_confdir=`$as_dirname -- "$as_myself" ||
1376 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1377          X"$as_myself" : 'X\(//\)[^/]' \| \
1378          X"$as_myself" : 'X\(//\)$' \| \
1379          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1380 $as_echo X"$as_myself" |
1381     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1382             s//\1/
1383             q
1384           }
1385           /^X\(\/\/\)[^/].*/{
1386             s//\1/
1387             q
1388           }
1389           /^X\(\/\/\)$/{
1390             s//\1/
1391             q
1392           }
1393           /^X\(\/\).*/{
1394             s//\1/
1395             q
1396           }
1397           s/.*/./; q'`
1398   srcdir=$ac_confdir
1399   if test ! -r "$srcdir/$ac_unique_file"; then
1400     srcdir=..
1401   fi
1402 else
1403   ac_srcdir_defaulted=no
1404 fi
1405 if test ! -r "$srcdir/$ac_unique_file"; then
1406   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1407   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1408 fi
1409 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1410 ac_abs_confdir=`(
1411         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1412         pwd)`
1413 # When building in place, set srcdir=.
1414 if test "$ac_abs_confdir" = "$ac_pwd"; then
1415   srcdir=.
1416 fi
1417 # Remove unnecessary trailing slashes from srcdir.
1418 # Double slashes in file names in object file debugging info
1419 # mess up M-x gdb in Emacs.
1420 case $srcdir in
1421 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1422 esac
1423 for ac_var in $ac_precious_vars; do
1424   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1425   eval ac_env_${ac_var}_value=\$${ac_var}
1426   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1427   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1428 done
1429
1430 #
1431 # Report the --help message.
1432 #
1433 if test "$ac_init_help" = "long"; then
1434   # Omit some internal or obsolete options to make the list less imposing.
1435   # This message is too long to be a string in the A/UX 3.1 sh.
1436   cat <<_ACEOF
1437 \`configure' configures PostgreSQL 12devel to adapt to many kinds of systems.
1438
1439 Usage: $0 [OPTION]... [VAR=VALUE]...
1440
1441 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1442 VAR=VALUE.  See below for descriptions of some of the useful variables.
1443
1444 Defaults for the options are specified in brackets.
1445
1446 Configuration:
1447   -h, --help              display this help and exit
1448       --help=short        display options specific to this package
1449       --help=recursive    display the short help of all the included packages
1450   -V, --version           display version information and exit
1451   -q, --quiet, --silent   do not print \`checking ...' messages
1452       --cache-file=FILE   cache test results in FILE [disabled]
1453   -C, --config-cache      alias for \`--cache-file=config.cache'
1454   -n, --no-create         do not create output files
1455       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1456
1457 Installation directories:
1458   --prefix=PREFIX         install architecture-independent files in PREFIX
1459                           [$ac_default_prefix]
1460   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1461                           [PREFIX]
1462
1463 By default, \`make install' will install all the files in
1464 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1465 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1466 for instance \`--prefix=\$HOME'.
1467
1468 For better control, use the options below.
1469
1470 Fine tuning of the installation directories:
1471   --bindir=DIR            user executables [EPREFIX/bin]
1472   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1473   --libexecdir=DIR        program executables [EPREFIX/libexec]
1474   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1475   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1476   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1477   --libdir=DIR            object code libraries [EPREFIX/lib]
1478   --includedir=DIR        C header files [PREFIX/include]
1479   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1480   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1481   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1482   --infodir=DIR           info documentation [DATAROOTDIR/info]
1483   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1484   --mandir=DIR            man documentation [DATAROOTDIR/man]
1485   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1486   --htmldir=DIR           html documentation [DOCDIR]
1487   --dvidir=DIR            dvi documentation [DOCDIR]
1488   --pdfdir=DIR            pdf documentation [DOCDIR]
1489   --psdir=DIR             ps documentation [DOCDIR]
1490 _ACEOF
1491
1492   cat <<\_ACEOF
1493
1494 System types:
1495   --build=BUILD     configure for building on BUILD [guessed]
1496   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1497 _ACEOF
1498 fi
1499
1500 if test -n "$ac_init_help"; then
1501   case $ac_init_help in
1502      short | recursive ) echo "Configuration of PostgreSQL 12devel:";;
1503    esac
1504   cat <<\_ACEOF
1505
1506 Optional Features:
1507   --disable-option-checking  ignore unrecognized --enable/--with options
1508   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1509   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1510   --disable-integer-datetimes
1511                           obsolete option, no longer supported
1512   --enable-nls[=LANGUAGES]
1513                           enable Native Language Support
1514   --disable-rpath         do not embed shared library search path in
1515                           executables
1516   --disable-spinlocks     do not use spinlocks
1517   --disable-atomics       do not use atomic operations
1518   --enable-debug          build with debugging symbols (-g)
1519   --enable-profiling      build with profiling enabled
1520   --enable-coverage       build with coverage testing instrumentation
1521   --enable-dtrace         build with DTrace support
1522   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1523   --enable-depend         turn on automatic dependency tracking
1524   --enable-cassert        enable assertion checks (for debugging)
1525   --disable-thread-safety disable thread-safety in client libraries
1526   --disable-largefile     omit support for large files
1527   --disable-float4-byval  disable float4 passed by value
1528   --disable-float8-byval  disable float8 passed by value
1529
1530 Optional Packages:
1531   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1532   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1533   --with-extra-version=STRING
1534                           append STRING to version
1535   --with-template=NAME    override operating system template
1536   --with-includes=DIRS    look for additional header files in DIRS
1537   --with-libraries=DIRS   look for additional libraries in DIRS
1538   --with-libs=DIRS        alternative spelling of --with-libraries
1539   --with-pgport=PORTNUM   set default port number [5432]
1540   --with-blocksize=BLOCKSIZE
1541                           set table block size in kB [8]
1542   --with-segsize=SEGSIZE  set table segment size in GB [1]
1543   --with-wal-blocksize=BLOCKSIZE
1544                           set WAL block size in kB [8]
1545   --with-CC=CMD           set compiler (deprecated)
1546   --with-llvm             build with LLVM based JIT support
1547   --with-icu              build with ICU support
1548   --with-tcl              build Tcl modules (PL/Tcl)
1549   --with-tclconfig=DIR    tclConfig.sh is in DIR
1550   --with-perl             build Perl modules (PL/Perl)
1551   --with-python           build Python modules (PL/Python)
1552   --with-gssapi           build with GSSAPI support
1553   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1554                           [postgres]
1555   --with-pam              build with PAM support
1556   --with-bsd-auth         build with BSD Authentication support
1557   --with-ldap             build with LDAP support
1558   --with-bonjour          build with Bonjour support
1559   --with-openssl          build with OpenSSL support
1560   --with-selinux          build with SELinux support
1561   --with-systemd          build with systemd support
1562   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1563   --with-libedit-preferred
1564                           prefer BSD Libedit over GNU Readline
1565   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1566   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1567   --with-libxml           build with XML support
1568   --with-libxslt          use XSLT support when building contrib/xml2
1569   --with-system-tzdata=DIR
1570                           use system time zone data in DIR
1571   --without-zlib          do not use Zlib
1572   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1573
1574 Some influential environment variables:
1575   CC          C compiler command
1576   CFLAGS      C compiler flags
1577   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1578               nonstandard directory <lib dir>
1579   LIBS        libraries to pass to the linker, e.g. -l<library>
1580   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1581               you have headers in a nonstandard directory <include dir>
1582   CXX         C++ compiler command
1583   CXXFLAGS    C++ compiler flags
1584   LLVM_CONFIG path to llvm-config command
1585   CLANG       path to clang compiler to generate bitcode
1586   CPP         C preprocessor
1587   PKG_CONFIG  path to pkg-config utility
1588   PKG_CONFIG_PATH
1589               directories to add to pkg-config's search path
1590   PKG_CONFIG_LIBDIR
1591               path overriding pkg-config's built-in search path
1592   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1593   ICU_LIBS    linker flags for ICU, overriding pkg-config
1594   XML2_CONFIG path to xml2-config utility
1595   LDFLAGS_EX  extra linker flags for linking executables only
1596   LDFLAGS_SL  extra linker flags for linking shared libraries only
1597   PERL        Perl program
1598   PYTHON      Python program
1599   MSGFMT      msgfmt program for NLS
1600   TCLSH       Tcl interpreter program (tclsh)
1601
1602 Use these variables to override the choices made by `configure' or to help
1603 it to find libraries and programs with nonstandard names/locations.
1604
1605 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1606 _ACEOF
1607 ac_status=$?
1608 fi
1609
1610 if test "$ac_init_help" = "recursive"; then
1611   # If there are subdirs, report their specific --help.
1612   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1613     test -d "$ac_dir" ||
1614       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1615       continue
1616     ac_builddir=.
1617
1618 case "$ac_dir" in
1619 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1620 *)
1621   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1622   # A ".." for each directory in $ac_dir_suffix.
1623   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1624   case $ac_top_builddir_sub in
1625   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1626   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1627   esac ;;
1628 esac
1629 ac_abs_top_builddir=$ac_pwd
1630 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1631 # for backward compatibility:
1632 ac_top_builddir=$ac_top_build_prefix
1633
1634 case $srcdir in
1635   .)  # We are building in place.
1636     ac_srcdir=.
1637     ac_top_srcdir=$ac_top_builddir_sub
1638     ac_abs_top_srcdir=$ac_pwd ;;
1639   [\\/]* | ?:[\\/]* )  # Absolute name.
1640     ac_srcdir=$srcdir$ac_dir_suffix;
1641     ac_top_srcdir=$srcdir
1642     ac_abs_top_srcdir=$srcdir ;;
1643   *) # Relative name.
1644     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1645     ac_top_srcdir=$ac_top_build_prefix$srcdir
1646     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1647 esac
1648 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1649
1650     cd "$ac_dir" || { ac_status=$?; continue; }
1651     # Check for guested configure.
1652     if test -f "$ac_srcdir/configure.gnu"; then
1653       echo &&
1654       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1655     elif test -f "$ac_srcdir/configure"; then
1656       echo &&
1657       $SHELL "$ac_srcdir/configure" --help=recursive
1658     else
1659       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1660     fi || ac_status=$?
1661     cd "$ac_pwd" || { ac_status=$?; break; }
1662   done
1663 fi
1664
1665 test -n "$ac_init_help" && exit $ac_status
1666 if $ac_init_version; then
1667   cat <<\_ACEOF
1668 PostgreSQL configure 12devel
1669 generated by GNU Autoconf 2.69
1670
1671 Copyright (C) 2012 Free Software Foundation, Inc.
1672 This configure script is free software; the Free Software Foundation
1673 gives unlimited permission to copy, distribute and modify it.
1674
1675 Copyright (c) 1996-2019, PostgreSQL Global Development Group
1676 _ACEOF
1677   exit
1678 fi
1679
1680 ## ------------------------ ##
1681 ## Autoconf initialization. ##
1682 ## ------------------------ ##
1683
1684 # ac_fn_c_try_compile LINENO
1685 # --------------------------
1686 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1687 ac_fn_c_try_compile ()
1688 {
1689   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690   rm -f conftest.$ac_objext
1691   if { { ac_try="$ac_compile"
1692 case "(($ac_try" in
1693   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694   *) ac_try_echo=$ac_try;;
1695 esac
1696 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697 $as_echo "$ac_try_echo"; } >&5
1698   (eval "$ac_compile") 2>conftest.err
1699   ac_status=$?
1700   if test -s conftest.err; then
1701     grep -v '^ *+' conftest.err >conftest.er1
1702     cat conftest.er1 >&5
1703     mv -f conftest.er1 conftest.err
1704   fi
1705   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706   test $ac_status = 0; } && {
1707          test -z "$ac_c_werror_flag" ||
1708          test ! -s conftest.err
1709        } && test -s conftest.$ac_objext; then :
1710   ac_retval=0
1711 else
1712   $as_echo "$as_me: failed program was:" >&5
1713 sed 's/^/| /' conftest.$ac_ext >&5
1714
1715         ac_retval=1
1716 fi
1717   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1718   as_fn_set_status $ac_retval
1719
1720 } # ac_fn_c_try_compile
1721
1722 # ac_fn_cxx_try_compile LINENO
1723 # ----------------------------
1724 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1725 ac_fn_cxx_try_compile ()
1726 {
1727   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728   rm -f conftest.$ac_objext
1729   if { { ac_try="$ac_compile"
1730 case "(($ac_try" in
1731   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732   *) ac_try_echo=$ac_try;;
1733 esac
1734 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735 $as_echo "$ac_try_echo"; } >&5
1736   (eval "$ac_compile") 2>conftest.err
1737   ac_status=$?
1738   if test -s conftest.err; then
1739     grep -v '^ *+' conftest.err >conftest.er1
1740     cat conftest.er1 >&5
1741     mv -f conftest.er1 conftest.err
1742   fi
1743   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744   test $ac_status = 0; } && {
1745          test -z "$ac_cxx_werror_flag" ||
1746          test ! -s conftest.err
1747        } && test -s conftest.$ac_objext; then :
1748   ac_retval=0
1749 else
1750   $as_echo "$as_me: failed program was:" >&5
1751 sed 's/^/| /' conftest.$ac_ext >&5
1752
1753         ac_retval=1
1754 fi
1755   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1756   as_fn_set_status $ac_retval
1757
1758 } # ac_fn_cxx_try_compile
1759
1760 # ac_fn_c_try_link LINENO
1761 # -----------------------
1762 # Try to link conftest.$ac_ext, and return whether this succeeded.
1763 ac_fn_c_try_link ()
1764 {
1765   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766   rm -f conftest.$ac_objext conftest$ac_exeext
1767   if { { ac_try="$ac_link"
1768 case "(($ac_try" in
1769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770   *) ac_try_echo=$ac_try;;
1771 esac
1772 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773 $as_echo "$ac_try_echo"; } >&5
1774   (eval "$ac_link") 2>conftest.err
1775   ac_status=$?
1776   if test -s conftest.err; then
1777     grep -v '^ *+' conftest.err >conftest.er1
1778     cat conftest.er1 >&5
1779     mv -f conftest.er1 conftest.err
1780   fi
1781   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782   test $ac_status = 0; } && {
1783          test -z "$ac_c_werror_flag" ||
1784          test ! -s conftest.err
1785        } && test -s conftest$ac_exeext && {
1786          test "$cross_compiling" = yes ||
1787          test -x conftest$ac_exeext
1788        }; then :
1789   ac_retval=0
1790 else
1791   $as_echo "$as_me: failed program was:" >&5
1792 sed 's/^/| /' conftest.$ac_ext >&5
1793
1794         ac_retval=1
1795 fi
1796   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1797   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1798   # interfere with the next link command; also delete a directory that is
1799   # left behind by Apple's compiler.  We do this before executing the actions.
1800   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1801   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1802   as_fn_set_status $ac_retval
1803
1804 } # ac_fn_c_try_link
1805
1806 # ac_fn_c_try_cpp LINENO
1807 # ----------------------
1808 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1809 ac_fn_c_try_cpp ()
1810 {
1811   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812   if { { ac_try="$ac_cpp conftest.$ac_ext"
1813 case "(($ac_try" in
1814   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1815   *) ac_try_echo=$ac_try;;
1816 esac
1817 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1818 $as_echo "$ac_try_echo"; } >&5
1819   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1820   ac_status=$?
1821   if test -s conftest.err; then
1822     grep -v '^ *+' conftest.err >conftest.er1
1823     cat conftest.er1 >&5
1824     mv -f conftest.er1 conftest.err
1825   fi
1826   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1827   test $ac_status = 0; } > conftest.i && {
1828          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1829          test ! -s conftest.err
1830        }; then :
1831   ac_retval=0
1832 else
1833   $as_echo "$as_me: failed program was:" >&5
1834 sed 's/^/| /' conftest.$ac_ext >&5
1835
1836     ac_retval=1
1837 fi
1838   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1839   as_fn_set_status $ac_retval
1840
1841 } # ac_fn_c_try_cpp
1842
1843 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1844 # -------------------------------------------------------
1845 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1846 # the include files in INCLUDES and setting the cache variable VAR
1847 # accordingly.
1848 ac_fn_c_check_header_mongrel ()
1849 {
1850   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1851   if eval \${$3+:} false; then :
1852   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1853 $as_echo_n "checking for $2... " >&6; }
1854 if eval \${$3+:} false; then :
1855   $as_echo_n "(cached) " >&6
1856 fi
1857 eval ac_res=\$$3
1858                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1859 $as_echo "$ac_res" >&6; }
1860 else
1861   # Is the header compilable?
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1863 $as_echo_n "checking $2 usability... " >&6; }
1864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1865 /* end confdefs.h.  */
1866 $4
1867 #include <$2>
1868 _ACEOF
1869 if ac_fn_c_try_compile "$LINENO"; then :
1870   ac_header_compiler=yes
1871 else
1872   ac_header_compiler=no
1873 fi
1874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1876 $as_echo "$ac_header_compiler" >&6; }
1877
1878 # Is the header present?
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1880 $as_echo_n "checking $2 presence... " >&6; }
1881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1882 /* end confdefs.h.  */
1883 #include <$2>
1884 _ACEOF
1885 if ac_fn_c_try_cpp "$LINENO"; then :
1886   ac_header_preproc=yes
1887 else
1888   ac_header_preproc=no
1889 fi
1890 rm -f conftest.err conftest.i conftest.$ac_ext
1891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1892 $as_echo "$ac_header_preproc" >&6; }
1893
1894 # So?  What about this header?
1895 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1896   yes:no: )
1897     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1898 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1899     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1900 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1901     ;;
1902   no:yes:* )
1903     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1904 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1905     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1906 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1907     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1908 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1909     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1910 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1911     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1912 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1913 ( $as_echo "## ---------------------------------------------- ##
1914 ## Report this to pgsql-bugs@lists.postgresql.org ##
1915 ## ---------------------------------------------- ##"
1916      ) | sed "s/^/$as_me: WARNING:     /" >&2
1917     ;;
1918 esac
1919   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1920 $as_echo_n "checking for $2... " >&6; }
1921 if eval \${$3+:} false; then :
1922   $as_echo_n "(cached) " >&6
1923 else
1924   eval "$3=\$ac_header_compiler"
1925 fi
1926 eval ac_res=\$$3
1927                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928 $as_echo "$ac_res" >&6; }
1929 fi
1930   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1931
1932 } # ac_fn_c_check_header_mongrel
1933
1934 # ac_fn_c_try_run LINENO
1935 # ----------------------
1936 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1937 # that executables *can* be run.
1938 ac_fn_c_try_run ()
1939 {
1940   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941   if { { ac_try="$ac_link"
1942 case "(($ac_try" in
1943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1944   *) ac_try_echo=$ac_try;;
1945 esac
1946 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1947 $as_echo "$ac_try_echo"; } >&5
1948   (eval "$ac_link") 2>&5
1949   ac_status=$?
1950   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1951   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1952   { { case "(($ac_try" in
1953   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1954   *) ac_try_echo=$ac_try;;
1955 esac
1956 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1957 $as_echo "$ac_try_echo"; } >&5
1958   (eval "$ac_try") 2>&5
1959   ac_status=$?
1960   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1961   test $ac_status = 0; }; }; then :
1962   ac_retval=0
1963 else
1964   $as_echo "$as_me: program exited with status $ac_status" >&5
1965        $as_echo "$as_me: failed program was:" >&5
1966 sed 's/^/| /' conftest.$ac_ext >&5
1967
1968        ac_retval=$ac_status
1969 fi
1970   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1971   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1972   as_fn_set_status $ac_retval
1973
1974 } # ac_fn_c_try_run
1975
1976 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1977 # -------------------------------------------------------
1978 # Tests whether HEADER exists and can be compiled using the include files in
1979 # INCLUDES, setting the cache variable VAR accordingly.
1980 ac_fn_c_check_header_compile ()
1981 {
1982   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1983   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1984 $as_echo_n "checking for $2... " >&6; }
1985 if eval \${$3+:} false; then :
1986   $as_echo_n "(cached) " >&6
1987 else
1988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989 /* end confdefs.h.  */
1990 $4
1991 #include <$2>
1992 _ACEOF
1993 if ac_fn_c_try_compile "$LINENO"; then :
1994   eval "$3=yes"
1995 else
1996   eval "$3=no"
1997 fi
1998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1999 fi
2000 eval ac_res=\$$3
2001                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002 $as_echo "$ac_res" >&6; }
2003   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2004
2005 } # ac_fn_c_check_header_compile
2006
2007 # ac_fn_c_check_func LINENO FUNC VAR
2008 # ----------------------------------
2009 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2010 ac_fn_c_check_func ()
2011 {
2012   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2014 $as_echo_n "checking for $2... " >&6; }
2015 if eval \${$3+:} false; then :
2016   $as_echo_n "(cached) " >&6
2017 else
2018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019 /* end confdefs.h.  */
2020 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2021    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2022 #define $2 innocuous_$2
2023
2024 /* System header to define __stub macros and hopefully few prototypes,
2025     which can conflict with char $2 (); below.
2026     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2027     <limits.h> exists even on freestanding compilers.  */
2028
2029 #ifdef __STDC__
2030 # include <limits.h>
2031 #else
2032 # include <assert.h>
2033 #endif
2034
2035 #undef $2
2036
2037 /* Override any GCC internal prototype to avoid an error.
2038    Use char because int might match the return type of a GCC
2039    builtin and then its argument prototype would still apply.  */
2040 #ifdef __cplusplus
2041 extern "C"
2042 #endif
2043 char $2 ();
2044 /* The GNU C library defines this for functions which it implements
2045     to always fail with ENOSYS.  Some functions are actually named
2046     something starting with __ and the normal name is an alias.  */
2047 #if defined __stub_$2 || defined __stub___$2
2048 choke me
2049 #endif
2050
2051 int
2052 main ()
2053 {
2054 return $2 ();
2055   ;
2056   return 0;
2057 }
2058 _ACEOF
2059 if ac_fn_c_try_link "$LINENO"; then :
2060   eval "$3=yes"
2061 else
2062   eval "$3=no"
2063 fi
2064 rm -f core conftest.err conftest.$ac_objext \
2065     conftest$ac_exeext conftest.$ac_ext
2066 fi
2067 eval ac_res=\$$3
2068                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2069 $as_echo "$ac_res" >&6; }
2070   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2071
2072 } # ac_fn_c_check_func
2073
2074 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2075 # -------------------------------------------
2076 # Tests whether TYPE exists after having included INCLUDES, setting cache
2077 # variable VAR accordingly.
2078 ac_fn_c_check_type ()
2079 {
2080   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2082 $as_echo_n "checking for $2... " >&6; }
2083 if eval \${$3+:} false; then :
2084   $as_echo_n "(cached) " >&6
2085 else
2086   eval "$3=no"
2087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088 /* end confdefs.h.  */
2089 $4
2090 int
2091 main ()
2092 {
2093 if (sizeof ($2))
2094          return 0;
2095   ;
2096   return 0;
2097 }
2098 _ACEOF
2099 if ac_fn_c_try_compile "$LINENO"; then :
2100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101 /* end confdefs.h.  */
2102 $4
2103 int
2104 main ()
2105 {
2106 if (sizeof (($2)))
2107             return 0;
2108   ;
2109   return 0;
2110 }
2111 _ACEOF
2112 if ac_fn_c_try_compile "$LINENO"; then :
2113
2114 else
2115   eval "$3=yes"
2116 fi
2117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118 fi
2119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120 fi
2121 eval ac_res=\$$3
2122                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2123 $as_echo "$ac_res" >&6; }
2124   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2125
2126 } # ac_fn_c_check_type
2127
2128 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2129 # ----------------------------------------------------
2130 # Tries to find if the field MEMBER exists in type AGGR, after including
2131 # INCLUDES, setting cache variable VAR accordingly.
2132 ac_fn_c_check_member ()
2133 {
2134   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2136 $as_echo_n "checking for $2.$3... " >&6; }
2137 if eval \${$4+:} false; then :
2138   $as_echo_n "(cached) " >&6
2139 else
2140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141 /* end confdefs.h.  */
2142 $5
2143 int
2144 main ()
2145 {
2146 static $2 ac_aggr;
2147 if (ac_aggr.$3)
2148 return 0;
2149   ;
2150   return 0;
2151 }
2152 _ACEOF
2153 if ac_fn_c_try_compile "$LINENO"; then :
2154   eval "$4=yes"
2155 else
2156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157 /* end confdefs.h.  */
2158 $5
2159 int
2160 main ()
2161 {
2162 static $2 ac_aggr;
2163 if (sizeof ac_aggr.$3)
2164 return 0;
2165   ;
2166   return 0;
2167 }
2168 _ACEOF
2169 if ac_fn_c_try_compile "$LINENO"; then :
2170   eval "$4=yes"
2171 else
2172   eval "$4=no"
2173 fi
2174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2175 fi
2176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177 fi
2178 eval ac_res=\$$4
2179                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2180 $as_echo "$ac_res" >&6; }
2181   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2182
2183 } # ac_fn_c_check_member
2184
2185 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2186 # --------------------------------------------
2187 # Tries to find the compile-time value of EXPR in a program that includes
2188 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2189 # computed
2190 ac_fn_c_compute_int ()
2191 {
2192   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2193   if test "$cross_compiling" = yes; then
2194     # Depending upon the size, compute the lo and hi bounds.
2195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2196 /* end confdefs.h.  */
2197 $4
2198 int
2199 main ()
2200 {
2201 static int test_array [1 - 2 * !(($2) >= 0)];
2202 test_array [0] = 0;
2203 return test_array [0];
2204
2205   ;
2206   return 0;
2207 }
2208 _ACEOF
2209 if ac_fn_c_try_compile "$LINENO"; then :
2210   ac_lo=0 ac_mid=0
2211   while :; do
2212     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2213 /* end confdefs.h.  */
2214 $4
2215 int
2216 main ()
2217 {
2218 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2219 test_array [0] = 0;
2220 return test_array [0];
2221
2222   ;
2223   return 0;
2224 }
2225 _ACEOF
2226 if ac_fn_c_try_compile "$LINENO"; then :
2227   ac_hi=$ac_mid; break
2228 else
2229   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2230                         if test $ac_lo -le $ac_mid; then
2231                           ac_lo= ac_hi=
2232                           break
2233                         fi
2234                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2235 fi
2236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2237   done
2238 else
2239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240 /* end confdefs.h.  */
2241 $4
2242 int
2243 main ()
2244 {
2245 static int test_array [1 - 2 * !(($2) < 0)];
2246 test_array [0] = 0;
2247 return test_array [0];
2248
2249   ;
2250   return 0;
2251 }
2252 _ACEOF
2253 if ac_fn_c_try_compile "$LINENO"; then :
2254   ac_hi=-1 ac_mid=-1
2255   while :; do
2256     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257 /* end confdefs.h.  */
2258 $4
2259 int
2260 main ()
2261 {
2262 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2263 test_array [0] = 0;
2264 return test_array [0];
2265
2266   ;
2267   return 0;
2268 }
2269 _ACEOF
2270 if ac_fn_c_try_compile "$LINENO"; then :
2271   ac_lo=$ac_mid; break
2272 else
2273   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2274                         if test $ac_mid -le $ac_hi; then
2275                           ac_lo= ac_hi=
2276                           break
2277                         fi
2278                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2279 fi
2280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281   done
2282 else
2283   ac_lo= ac_hi=
2284 fi
2285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286 fi
2287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288 # Binary search between lo and hi bounds.
2289 while test "x$ac_lo" != "x$ac_hi"; do
2290   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2291   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2292 /* end confdefs.h.  */
2293 $4
2294 int
2295 main ()
2296 {
2297 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2298 test_array [0] = 0;
2299 return test_array [0];
2300
2301   ;
2302   return 0;
2303 }
2304 _ACEOF
2305 if ac_fn_c_try_compile "$LINENO"; then :
2306   ac_hi=$ac_mid
2307 else
2308   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2309 fi
2310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311 done
2312 case $ac_lo in #((
2313 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2314 '') ac_retval=1 ;;
2315 esac
2316   else
2317     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318 /* end confdefs.h.  */
2319 $4
2320 static long int longval () { return $2; }
2321 static unsigned long int ulongval () { return $2; }
2322 #include <stdio.h>
2323 #include <stdlib.h>
2324 int
2325 main ()
2326 {
2327
2328   FILE *f = fopen ("conftest.val", "w");
2329   if (! f)
2330     return 1;
2331   if (($2) < 0)
2332     {
2333       long int i = longval ();
2334       if (i != ($2))
2335         return 1;
2336       fprintf (f, "%ld", i);
2337     }
2338   else
2339     {
2340       unsigned long int i = ulongval ();
2341       if (i != ($2))
2342         return 1;
2343       fprintf (f, "%lu", i);
2344     }
2345   /* Do not output a trailing newline, as this causes \r\n confusion
2346      on some platforms.  */
2347   return ferror (f) || fclose (f) != 0;
2348
2349   ;
2350   return 0;
2351 }
2352 _ACEOF
2353 if ac_fn_c_try_run "$LINENO"; then :
2354   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2355 else
2356   ac_retval=1
2357 fi
2358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2359   conftest.$ac_objext conftest.beam conftest.$ac_ext
2360 rm -f conftest.val
2361
2362   fi
2363   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2364   as_fn_set_status $ac_retval
2365
2366 } # ac_fn_c_compute_int
2367
2368 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2369 # ---------------------------------------------
2370 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2371 # accordingly.
2372 ac_fn_c_check_decl ()
2373 {
2374   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2375   # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2376       as_decl_name=`echo $2|sed 's/ *(.*//'`
2377   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2378   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2379 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2380 if eval \${$3+:} false; then :
2381   $as_echo_n "(cached) " >&6
2382 else
2383   ac_save_werror_flag=$ac_c_werror_flag
2384   ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2385   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386 /* end confdefs.h.  */
2387 $4
2388 int
2389 main ()
2390 {
2391 #ifndef $as_decl_name
2392 #ifdef __cplusplus
2393   (void) $as_decl_use;
2394 #else
2395   (void) $as_decl_name;
2396 #endif
2397 #endif
2398
2399   ;
2400   return 0;
2401 }
2402 _ACEOF
2403 if ac_fn_c_try_compile "$LINENO"; then :
2404   eval "$3=yes"
2405 else
2406   eval "$3=no"
2407 fi
2408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409   ac_c_werror_flag=$ac_save_werror_flag
2410 fi
2411 eval ac_res=\$$3
2412                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2413 $as_echo "$ac_res" >&6; }
2414   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2415
2416 } # ac_fn_c_check_decl
2417 cat >config.log <<_ACEOF
2418 This file contains any messages produced by compilers while
2419 running configure, to aid debugging if configure makes a mistake.
2420
2421 It was created by PostgreSQL $as_me 12devel, which was
2422 generated by GNU Autoconf 2.69.  Invocation command line was
2423
2424   $ $0 $@
2425
2426 _ACEOF
2427 exec 5>>config.log
2428 {
2429 cat <<_ASUNAME
2430 ## --------- ##
2431 ## Platform. ##
2432 ## --------- ##
2433
2434 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2435 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2436 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2437 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2438 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2439
2440 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2441 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2442
2443 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2444 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2445 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2446 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2447 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2448 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2449 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2450
2451 _ASUNAME
2452
2453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2454 for as_dir in $PATH
2455 do
2456   IFS=$as_save_IFS
2457   test -z "$as_dir" && as_dir=.
2458     $as_echo "PATH: $as_dir"
2459   done
2460 IFS=$as_save_IFS
2461
2462 } >&5
2463
2464 cat >&5 <<_ACEOF
2465
2466
2467 ## ----------- ##
2468 ## Core tests. ##
2469 ## ----------- ##
2470
2471 _ACEOF
2472
2473
2474 # Keep a trace of the command line.
2475 # Strip out --no-create and --no-recursion so they do not pile up.
2476 # Strip out --silent because we don't want to record it for future runs.
2477 # Also quote any args containing shell meta-characters.
2478 # Make two passes to allow for proper duplicate-argument suppression.
2479 ac_configure_args=
2480 ac_configure_args0=
2481 ac_configure_args1=
2482 ac_must_keep_next=false
2483 for ac_pass in 1 2
2484 do
2485   for ac_arg
2486   do
2487     case $ac_arg in
2488     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2489     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2490     | -silent | --silent | --silen | --sile | --sil)
2491       continue ;;
2492     *\'*)
2493       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2494     esac
2495     case $ac_pass in
2496     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2497     2)
2498       as_fn_append ac_configure_args1 " '$ac_arg'"
2499       if test $ac_must_keep_next = true; then
2500         ac_must_keep_next=false # Got value, back to normal.
2501       else
2502         case $ac_arg in
2503           *=* | --config-cache | -C | -disable-* | --disable-* \
2504           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2505           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2506           | -with-* | --with-* | -without-* | --without-* | --x)
2507             case "$ac_configure_args0 " in
2508               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2509             esac
2510             ;;
2511           -* ) ac_must_keep_next=true ;;
2512         esac
2513       fi
2514       as_fn_append ac_configure_args " '$ac_arg'"
2515       ;;
2516     esac
2517   done
2518 done
2519 { ac_configure_args0=; unset ac_configure_args0;}
2520 { ac_configure_args1=; unset ac_configure_args1;}
2521
2522 # When interrupted or exit'd, cleanup temporary files, and complete
2523 # config.log.  We remove comments because anyway the quotes in there
2524 # would cause problems or look ugly.
2525 # WARNING: Use '\'' to represent an apostrophe within the trap.
2526 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2527 trap 'exit_status=$?
2528   # Save into config.log some information that might help in debugging.
2529   {
2530     echo
2531
2532     $as_echo "## ---------------- ##
2533 ## Cache variables. ##
2534 ## ---------------- ##"
2535     echo
2536     # The following way of writing the cache mishandles newlines in values,
2537 (
2538   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2539     eval ac_val=\$$ac_var
2540     case $ac_val in #(
2541     *${as_nl}*)
2542       case $ac_var in #(
2543       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2544 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2545       esac
2546       case $ac_var in #(
2547       _ | IFS | as_nl) ;; #(
2548       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2549       *) { eval $ac_var=; unset $ac_var;} ;;
2550       esac ;;
2551     esac
2552   done
2553   (set) 2>&1 |
2554     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2555     *${as_nl}ac_space=\ *)
2556       sed -n \
2557         "s/'\''/'\''\\\\'\'''\''/g;
2558           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2559       ;; #(
2560     *)
2561       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2562       ;;
2563     esac |
2564     sort
2565 )
2566     echo
2567
2568     $as_echo "## ----------------- ##
2569 ## Output variables. ##
2570 ## ----------------- ##"
2571     echo
2572     for ac_var in $ac_subst_vars
2573     do
2574       eval ac_val=\$$ac_var
2575       case $ac_val in
2576       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2577       esac
2578       $as_echo "$ac_var='\''$ac_val'\''"
2579     done | sort
2580     echo
2581
2582     if test -n "$ac_subst_files"; then
2583       $as_echo "## ------------------- ##
2584 ## File substitutions. ##
2585 ## ------------------- ##"
2586       echo
2587       for ac_var in $ac_subst_files
2588       do
2589         eval ac_val=\$$ac_var
2590         case $ac_val in
2591         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2592         esac
2593         $as_echo "$ac_var='\''$ac_val'\''"
2594       done | sort
2595       echo
2596     fi
2597
2598     if test -s confdefs.h; then
2599       $as_echo "## ----------- ##
2600 ## confdefs.h. ##
2601 ## ----------- ##"
2602       echo
2603       cat confdefs.h
2604       echo
2605     fi
2606     test "$ac_signal" != 0 &&
2607       $as_echo "$as_me: caught signal $ac_signal"
2608     $as_echo "$as_me: exit $exit_status"
2609   } >&5
2610   rm -f core *.core core.conftest.* &&
2611     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2612     exit $exit_status
2613 ' 0
2614 for ac_signal in 1 2 13 15; do
2615   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2616 done
2617 ac_signal=0
2618
2619 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2620 rm -f -r conftest* confdefs.h
2621
2622 $as_echo "/* confdefs.h */" > confdefs.h
2623
2624 # Predefined preprocessor variables.
2625
2626 cat >>confdefs.h <<_ACEOF
2627 #define PACKAGE_NAME "$PACKAGE_NAME"
2628 _ACEOF
2629
2630 cat >>confdefs.h <<_ACEOF
2631 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2632 _ACEOF
2633
2634 cat >>confdefs.h <<_ACEOF
2635 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2636 _ACEOF
2637
2638 cat >>confdefs.h <<_ACEOF
2639 #define PACKAGE_STRING "$PACKAGE_STRING"
2640 _ACEOF
2641
2642 cat >>confdefs.h <<_ACEOF
2643 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2644 _ACEOF
2645
2646 cat >>confdefs.h <<_ACEOF
2647 #define PACKAGE_URL "$PACKAGE_URL"
2648 _ACEOF
2649
2650
2651 # Let the site file select an alternate cache file if it wants to.
2652 # Prefer an explicitly selected file to automatically selected ones.
2653 ac_site_file1=NONE
2654 ac_site_file2=NONE
2655 if test -n "$CONFIG_SITE"; then
2656   # We do not want a PATH search for config.site.
2657   case $CONFIG_SITE in #((
2658     -*)  ac_site_file1=./$CONFIG_SITE;;
2659     */*) ac_site_file1=$CONFIG_SITE;;
2660     *)   ac_site_file1=./$CONFIG_SITE;;
2661   esac
2662 elif test "x$prefix" != xNONE; then
2663   ac_site_file1=$prefix/share/config.site
2664   ac_site_file2=$prefix/etc/config.site
2665 else
2666   ac_site_file1=$ac_default_prefix/share/config.site
2667   ac_site_file2=$ac_default_prefix/etc/config.site
2668 fi
2669 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2670 do
2671   test "x$ac_site_file" = xNONE && continue
2672   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2673     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2674 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2675     sed 's/^/| /' "$ac_site_file" >&5
2676     . "$ac_site_file" \
2677       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2678 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2679 as_fn_error $? "failed to load site script $ac_site_file
2680 See \`config.log' for more details" "$LINENO" 5; }
2681   fi
2682 done
2683
2684 if test -r "$cache_file"; then
2685   # Some versions of bash will fail to source /dev/null (special files
2686   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2687   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2688     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2689 $as_echo "$as_me: loading cache $cache_file" >&6;}
2690     case $cache_file in
2691       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2692       *)                      . "./$cache_file";;
2693     esac
2694   fi
2695 else
2696   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2697 $as_echo "$as_me: creating cache $cache_file" >&6;}
2698   >$cache_file
2699 fi
2700
2701 # Check that the precious variables saved in the cache have kept the same
2702 # value.
2703 ac_cache_corrupted=false
2704 for ac_var in $ac_precious_vars; do
2705   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2706   eval ac_new_set=\$ac_env_${ac_var}_set
2707   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2708   eval ac_new_val=\$ac_env_${ac_var}_value
2709   case $ac_old_set,$ac_new_set in
2710     set,)
2711       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2712 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2713       ac_cache_corrupted=: ;;
2714     ,set)
2715       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2716 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2717       ac_cache_corrupted=: ;;
2718     ,);;
2719     *)
2720       if test "x$ac_old_val" != "x$ac_new_val"; then
2721         # differences in whitespace do not lead to failure.
2722         ac_old_val_w=`echo x $ac_old_val`
2723         ac_new_val_w=`echo x $ac_new_val`
2724         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2725           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2726 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2727           ac_cache_corrupted=:
2728         else
2729           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2730 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2731           eval $ac_var=\$ac_old_val
2732         fi
2733         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2734 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2735         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2736 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2737       fi;;
2738   esac
2739   # Pass precious variables to config.status.
2740   if test "$ac_new_set" = set; then
2741     case $ac_new_val in
2742     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2743     *) ac_arg=$ac_var=$ac_new_val ;;
2744     esac
2745     case " $ac_configure_args " in
2746       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2747       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2748     esac
2749   fi
2750 done
2751 if $ac_cache_corrupted; then
2752   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2753 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2754   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2755 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2756   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2757 fi
2758 ## -------------------- ##
2759 ## Main body of script. ##
2760 ## -------------------- ##
2761
2762 ac_ext=c
2763 ac_cpp='$CPP $CPPFLAGS'
2764 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2765 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2766 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2767
2768
2769
2770
2771
2772
2773 ac_aux_dir=
2774 for ac_dir in config "$srcdir"/config; do
2775   if test -f "$ac_dir/install-sh"; then
2776     ac_aux_dir=$ac_dir
2777     ac_install_sh="$ac_aux_dir/install-sh -c"
2778     break
2779   elif test -f "$ac_dir/install.sh"; then
2780     ac_aux_dir=$ac_dir
2781     ac_install_sh="$ac_aux_dir/install.sh -c"
2782     break
2783   elif test -f "$ac_dir/shtool"; then
2784     ac_aux_dir=$ac_dir
2785     ac_install_sh="$ac_aux_dir/shtool install -c"
2786     break
2787   fi
2788 done
2789 if test -z "$ac_aux_dir"; then
2790   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2791 fi
2792
2793 # These three variables are undocumented and unsupported,
2794 # and are intended to be withdrawn in a future Autoconf release.
2795 # They can cause serious problems if a builder's source tree is in a directory
2796 # whose full name contains unusual characters.
2797 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2798 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2799 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2800
2801
2802
2803 configure_args=$ac_configure_args
2804
2805
2806 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2807
2808
2809 cat >>confdefs.h <<_ACEOF
2810 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2811 _ACEOF
2812
2813
2814
2815
2816
2817 # Check whether --with-extra-version was given.
2818 if test "${with_extra_version+set}" = set; then :
2819   withval=$with_extra_version;
2820   case $withval in
2821     yes)
2822       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2823       ;;
2824     no)
2825       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2826       ;;
2827     *)
2828       PG_VERSION="$PACKAGE_VERSION$withval"
2829       ;;
2830   esac
2831
2832 else
2833   PG_VERSION="$PACKAGE_VERSION"
2834 fi
2835
2836
2837
2838 cat >>confdefs.h <<_ACEOF
2839 #define PG_VERSION "$PG_VERSION"
2840 _ACEOF
2841
2842
2843 # Make sure we can run config.sub.
2844 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2845   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2846
2847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2848 $as_echo_n "checking build system type... " >&6; }
2849 if ${ac_cv_build+:} false; then :
2850   $as_echo_n "(cached) " >&6
2851 else
2852   ac_build_alias=$build_alias
2853 test "x$ac_build_alias" = x &&
2854   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2855 test "x$ac_build_alias" = x &&
2856   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2857 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2858   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2859
2860 fi
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2862 $as_echo "$ac_cv_build" >&6; }
2863 case $ac_cv_build in
2864 *-*-*) ;;
2865 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2866 esac
2867 build=$ac_cv_build
2868 ac_save_IFS=$IFS; IFS='-'
2869 set x $ac_cv_build
2870 shift
2871 build_cpu=$1
2872 build_vendor=$2
2873 shift; shift
2874 # Remember, the first character of IFS is used to create $*,
2875 # except with old shells:
2876 build_os=$*
2877 IFS=$ac_save_IFS
2878 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2879
2880
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2882 $as_echo_n "checking host system type... " >&6; }
2883 if ${ac_cv_host+:} false; then :
2884   $as_echo_n "(cached) " >&6
2885 else
2886   if test "x$host_alias" = x; then
2887   ac_cv_host=$ac_cv_build
2888 else
2889   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2890     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2891 fi
2892
2893 fi
2894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2895 $as_echo "$ac_cv_host" >&6; }
2896 case $ac_cv_host in
2897 *-*-*) ;;
2898 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2899 esac
2900 host=$ac_cv_host
2901 ac_save_IFS=$IFS; IFS='-'
2902 set x $ac_cv_host
2903 shift
2904 host_cpu=$1
2905 host_vendor=$2
2906 shift; shift
2907 # Remember, the first character of IFS is used to create $*,
2908 # except with old shells:
2909 host_os=$*
2910 IFS=$ac_save_IFS
2911 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2912
2913
2914
2915 template=
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2917 $as_echo_n "checking which template to use... " >&6; }
2918
2919
2920
2921
2922 # Check whether --with-template was given.
2923 if test "${with_template+set}" = set; then :
2924   withval=$with_template;
2925   case $withval in
2926     yes)
2927       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2928       ;;
2929     no)
2930       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2931       ;;
2932     *)
2933
2934   case $withval in
2935     list)   echo; ls "$srcdir/src/template"; exit;;
2936     *)      if test -f "$srcdir/src/template/$with_template" ; then
2937               template=$withval
2938             else
2939               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2940             fi;;
2941   esac
2942
2943       ;;
2944   esac
2945
2946 else
2947
2948 # --with-template not given
2949
2950 case $host_os in
2951      aix*) template=aix ;;
2952   cygwin*) template=cygwin ;;
2953   darwin*) template=darwin ;;
2954 dragonfly*) template=netbsd ;;
2955  freebsd*) template=freebsd ;;
2956     hpux*) template=hpux ;;
2957  linux*|gnu*|k*bsd*-gnu)
2958            template=linux ;;
2959    mingw*) template=win32 ;;
2960   netbsd*) template=netbsd ;;
2961  openbsd*) template=openbsd ;;
2962  solaris*) template=solaris ;;
2963 esac
2964
2965   if test x"$template" = x"" ; then
2966     as_fn_error $? "
2967 *******************************************************************
2968 PostgreSQL has apparently not been ported to your platform yet.
2969 To try a manual configuration, look into the src/template directory
2970 for a similar platform and use the '--with-template=' option.
2971
2972 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
2973 rectifying this.  Include the above 'checking host system type...'
2974 line.
2975 *******************************************************************
2976 " "$LINENO" 5
2977   fi
2978
2979
2980 fi
2981
2982
2983
2984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2985 $as_echo "$template" >&6; }
2986
2987 PORTNAME=$template
2988
2989
2990 # Initialize default assumption that we do not need separate assembly code
2991 # for TAS (test-and-set).  This can be overridden by the template file
2992 # when it's executed.
2993 need_tas=no
2994 tas_file=dummy.s
2995
2996
2997
2998 ##
2999 ## Command line options
3000 ##
3001
3002 #
3003 # Add non-standard directories to the include path
3004 #
3005
3006
3007
3008 # Check whether --with-includes was given.
3009 if test "${with_includes+set}" = set; then :
3010   withval=$with_includes;
3011   case $withval in
3012     yes)
3013       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3014       ;;
3015     no)
3016       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3017       ;;
3018     *)
3019
3020       ;;
3021   esac
3022
3023 fi
3024
3025
3026
3027
3028 #
3029 # Add non-standard directories to the library search path
3030 #
3031
3032
3033
3034 # Check whether --with-libraries was given.
3035 if test "${with_libraries+set}" = set; then :
3036   withval=$with_libraries;
3037   case $withval in
3038     yes)
3039       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3040       ;;
3041     no)
3042       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3043       ;;
3044     *)
3045       LIBRARY_DIRS=$withval
3046       ;;
3047   esac
3048
3049 fi
3050
3051
3052
3053
3054
3055
3056 # Check whether --with-libs was given.
3057 if test "${with_libs+set}" = set; then :
3058   withval=$with_libs;
3059   case $withval in
3060     yes)
3061       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3062       ;;
3063     no)
3064       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3065       ;;
3066     *)
3067       LIBRARY_DIRS=$withval
3068       ;;
3069   esac
3070
3071 fi
3072
3073
3074
3075
3076 #
3077 # 64-bit integer date/time storage is now the only option, but to avoid
3078 # unnecessary breakage of build scripts, continue to accept an explicit
3079 # "--enable-integer-datetimes" switch.
3080 #
3081
3082
3083 # Check whether --enable-integer-datetimes was given.
3084 if test "${enable_integer_datetimes+set}" = set; then :
3085   enableval=$enable_integer_datetimes;
3086   case $enableval in
3087     yes)
3088       :
3089       ;;
3090     no)
3091       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3092       ;;
3093     *)
3094       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3095       ;;
3096   esac
3097
3098 else
3099   enable_integer_datetimes=yes
3100
3101 fi
3102
3103
3104
3105
3106 #
3107 # NLS
3108 #
3109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3110 $as_echo_n "checking whether NLS is wanted... " >&6; }
3111
3112
3113 # Check whether --enable-nls was given.
3114 if test "${enable_nls+set}" = set; then :
3115   enableval=$enable_nls;
3116   case $enableval in
3117     yes)
3118       :
3119       ;;
3120     no)
3121       :
3122       ;;
3123     *)
3124       enable_nls=yes
3125 WANTED_LANGUAGES=$enableval
3126       ;;
3127   esac
3128
3129 else
3130   enable_nls=no
3131 fi
3132
3133
3134
3135 if test "$enable_nls" = yes; then
3136
3137 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3138
3139 fi
3140
3141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3142 $as_echo "$enable_nls" >&6; }
3143
3144
3145
3146 #
3147 # Default port number (--with-pgport), default 5432
3148 #
3149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3150 $as_echo_n "checking for default port number... " >&6; }
3151
3152
3153
3154 # Check whether --with-pgport was given.
3155 if test "${with_pgport+set}" = set; then :
3156   withval=$with_pgport;
3157   case $withval in
3158     yes)
3159       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3160       ;;
3161     no)
3162       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3163       ;;
3164     *)
3165       default_port=$withval
3166       ;;
3167   esac
3168
3169 else
3170   default_port=5432
3171 fi
3172
3173
3174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3175 $as_echo "$default_port" >&6; }
3176 # Need both of these because some places want an integer and some a string
3177
3178 cat >>confdefs.h <<_ACEOF
3179 #define DEF_PGPORT ${default_port}
3180 _ACEOF
3181
3182
3183 cat >>confdefs.h <<_ACEOF
3184 #define DEF_PGPORT_STR "${default_port}"
3185 _ACEOF
3186
3187
3188
3189 # It's worth validating port; you can get very confusing errors otherwise
3190 if test x"$default_port" = x""; then
3191   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3192 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3193   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3194 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3195   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3196 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3197   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3198 fi
3199
3200 #
3201 # '-rpath'-like feature can be disabled
3202 #
3203
3204
3205 # Check whether --enable-rpath was given.
3206 if test "${enable_rpath+set}" = set; then :
3207   enableval=$enable_rpath;
3208   case $enableval in
3209     yes)
3210       :
3211       ;;
3212     no)
3213       :
3214       ;;
3215     *)
3216       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3217       ;;
3218   esac
3219
3220 else
3221   enable_rpath=yes
3222
3223 fi
3224
3225
3226
3227
3228 #
3229 # Spinlocks
3230 #
3231
3232
3233 # Check whether --enable-spinlocks was given.
3234 if test "${enable_spinlocks+set}" = set; then :
3235   enableval=$enable_spinlocks;
3236   case $enableval in
3237     yes)
3238       :
3239       ;;
3240     no)
3241       :
3242       ;;
3243     *)
3244       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3245       ;;
3246   esac
3247
3248 else
3249   enable_spinlocks=yes
3250
3251 fi
3252
3253
3254
3255 #
3256 # Atomic operations
3257 #
3258
3259
3260 # Check whether --enable-atomics was given.
3261 if test "${enable_atomics+set}" = set; then :
3262   enableval=$enable_atomics;
3263   case $enableval in
3264     yes)
3265       :
3266       ;;
3267     no)
3268       :
3269       ;;
3270     *)
3271       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3272       ;;
3273   esac
3274
3275 else
3276   enable_atomics=yes
3277
3278 fi
3279
3280
3281
3282 #
3283 # --enable-debug adds -g to compiler flags
3284 #
3285
3286
3287 # Check whether --enable-debug was given.
3288 if test "${enable_debug+set}" = set; then :
3289   enableval=$enable_debug;
3290   case $enableval in
3291     yes)
3292       :
3293       ;;
3294     no)
3295       :
3296       ;;
3297     *)
3298       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3299       ;;
3300   esac
3301
3302 else
3303   enable_debug=no
3304
3305 fi
3306
3307
3308
3309
3310 #
3311 # --enable-profiling enables gcc profiling
3312 #
3313
3314
3315 # Check whether --enable-profiling was given.
3316 if test "${enable_profiling+set}" = set; then :
3317   enableval=$enable_profiling;
3318   case $enableval in
3319     yes)
3320       :
3321       ;;
3322     no)
3323       :
3324       ;;
3325     *)
3326       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3327       ;;
3328   esac
3329
3330 else
3331   enable_profiling=no
3332
3333 fi
3334
3335
3336
3337 #
3338 # --enable-coverage enables generation of code coverage metrics with gcov
3339 #
3340
3341
3342 # Check whether --enable-coverage was given.
3343 if test "${enable_coverage+set}" = set; then :
3344   enableval=$enable_coverage;
3345   case $enableval in
3346     yes)
3347       if test -z "$GCOV"; then
3348   for ac_prog in gcov
3349 do
3350   # Extract the first word of "$ac_prog", so it can be a program name with args.
3351 set dummy $ac_prog; ac_word=$2
3352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3353 $as_echo_n "checking for $ac_word... " >&6; }
3354 if ${ac_cv_path_GCOV+:} false; then :
3355   $as_echo_n "(cached) " >&6
3356 else
3357   case $GCOV in
3358   [\\/]* | ?:[\\/]*)
3359   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3360   ;;
3361   *)
3362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3363 for as_dir in $PATH
3364 do
3365   IFS=$as_save_IFS
3366   test -z "$as_dir" && as_dir=.
3367     for ac_exec_ext in '' $ac_executable_extensions; do
3368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3369     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3371     break 2
3372   fi
3373 done
3374   done
3375 IFS=$as_save_IFS
3376
3377   ;;
3378 esac
3379 fi
3380 GCOV=$ac_cv_path_GCOV
3381 if test -n "$GCOV"; then
3382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3383 $as_echo "$GCOV" >&6; }
3384 else
3385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3386 $as_echo "no" >&6; }
3387 fi
3388
3389
3390   test -n "$GCOV" && break
3391 done
3392
3393 else
3394   # Report the value of GCOV in configure's output in all cases.
3395   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3396 $as_echo_n "checking for GCOV... " >&6; }
3397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3398 $as_echo "$GCOV" >&6; }
3399 fi
3400
3401 if test -z "$GCOV"; then
3402   as_fn_error $? "gcov not found" "$LINENO" 5
3403 fi
3404 if test -z "$LCOV"; then
3405   for ac_prog in lcov
3406 do
3407   # Extract the first word of "$ac_prog", so it can be a program name with args.
3408 set dummy $ac_prog; ac_word=$2
3409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3410 $as_echo_n "checking for $ac_word... " >&6; }
3411 if ${ac_cv_path_LCOV+:} false; then :
3412   $as_echo_n "(cached) " >&6
3413 else
3414   case $LCOV in
3415   [\\/]* | ?:[\\/]*)
3416   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3417   ;;
3418   *)
3419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3420 for as_dir in $PATH
3421 do
3422   IFS=$as_save_IFS
3423   test -z "$as_dir" && as_dir=.
3424     for ac_exec_ext in '' $ac_executable_extensions; do
3425   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3426     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3428     break 2
3429   fi
3430 done
3431   done
3432 IFS=$as_save_IFS
3433
3434   ;;
3435 esac
3436 fi
3437 LCOV=$ac_cv_path_LCOV
3438 if test -n "$LCOV"; then
3439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3440 $as_echo "$LCOV" >&6; }
3441 else
3442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3443 $as_echo "no" >&6; }
3444 fi
3445
3446
3447   test -n "$LCOV" && break
3448 done
3449
3450 else
3451   # Report the value of LCOV in configure's output in all cases.
3452   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3453 $as_echo_n "checking for LCOV... " >&6; }
3454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3455 $as_echo "$LCOV" >&6; }
3456 fi
3457
3458 if test -z "$LCOV"; then
3459   as_fn_error $? "lcov not found" "$LINENO" 5
3460 fi
3461 if test -z "$GENHTML"; then
3462   for ac_prog in genhtml
3463 do
3464   # Extract the first word of "$ac_prog", so it can be a program name with args.
3465 set dummy $ac_prog; ac_word=$2
3466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3467 $as_echo_n "checking for $ac_word... " >&6; }
3468 if ${ac_cv_path_GENHTML+:} false; then :
3469   $as_echo_n "(cached) " >&6
3470 else
3471   case $GENHTML in
3472   [\\/]* | ?:[\\/]*)
3473   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3474   ;;
3475   *)
3476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3477 for as_dir in $PATH
3478 do
3479   IFS=$as_save_IFS
3480   test -z "$as_dir" && as_dir=.
3481     for ac_exec_ext in '' $ac_executable_extensions; do
3482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3483     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3485     break 2
3486   fi
3487 done
3488   done
3489 IFS=$as_save_IFS
3490
3491   ;;
3492 esac
3493 fi
3494 GENHTML=$ac_cv_path_GENHTML
3495 if test -n "$GENHTML"; then
3496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3497 $as_echo "$GENHTML" >&6; }
3498 else
3499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3500 $as_echo "no" >&6; }
3501 fi
3502
3503
3504   test -n "$GENHTML" && break
3505 done
3506
3507 else
3508   # Report the value of GENHTML in configure's output in all cases.
3509   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3510 $as_echo_n "checking for GENHTML... " >&6; }
3511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3512 $as_echo "$GENHTML" >&6; }
3513 fi
3514
3515 if test -z "$GENHTML"; then
3516   as_fn_error $? "genhtml not found" "$LINENO" 5
3517 fi
3518       ;;
3519     no)
3520       :
3521       ;;
3522     *)
3523       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3524       ;;
3525   esac
3526
3527 else
3528   enable_coverage=no
3529
3530 fi
3531
3532
3533
3534
3535 #
3536 # DTrace
3537 #
3538
3539
3540 # Check whether --enable-dtrace was given.
3541 if test "${enable_dtrace+set}" = set; then :
3542   enableval=$enable_dtrace;
3543   case $enableval in
3544     yes)
3545       if test -z "$DTRACE"; then
3546   for ac_prog in dtrace
3547 do
3548   # Extract the first word of "$ac_prog", so it can be a program name with args.
3549 set dummy $ac_prog; ac_word=$2
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3551 $as_echo_n "checking for $ac_word... " >&6; }
3552 if ${ac_cv_path_DTRACE+:} false; then :
3553   $as_echo_n "(cached) " >&6
3554 else
3555   case $DTRACE in
3556   [\\/]* | ?:[\\/]*)
3557   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3558   ;;
3559   *)
3560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3561 for as_dir in $PATH
3562 do
3563   IFS=$as_save_IFS
3564   test -z "$as_dir" && as_dir=.
3565     for ac_exec_ext in '' $ac_executable_extensions; do
3566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3567     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3569     break 2
3570   fi
3571 done
3572   done
3573 IFS=$as_save_IFS
3574
3575   ;;
3576 esac
3577 fi
3578 DTRACE=$ac_cv_path_DTRACE
3579 if test -n "$DTRACE"; then
3580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3581 $as_echo "$DTRACE" >&6; }
3582 else
3583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3584 $as_echo "no" >&6; }
3585 fi
3586
3587
3588   test -n "$DTRACE" && break
3589 done
3590
3591 else
3592   # Report the value of DTRACE in configure's output in all cases.
3593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3594 $as_echo_n "checking for DTRACE... " >&6; }
3595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3596 $as_echo "$DTRACE" >&6; }
3597 fi
3598
3599 if test -z "$DTRACE"; then
3600   as_fn_error $? "dtrace not found" "$LINENO" 5
3601 fi
3602
3603       ;;
3604     no)
3605       :
3606       ;;
3607     *)
3608       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3609       ;;
3610   esac
3611
3612 else
3613   enable_dtrace=no
3614
3615 fi
3616
3617
3618
3619
3620 #
3621 # TAP tests
3622 #
3623
3624
3625 # Check whether --enable-tap-tests was given.
3626 if test "${enable_tap_tests+set}" = set; then :
3627   enableval=$enable_tap_tests;
3628   case $enableval in
3629     yes)
3630       :
3631       ;;
3632     no)
3633       :
3634       ;;
3635     *)
3636       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3637       ;;
3638   esac
3639
3640 else
3641   enable_tap_tests=no
3642
3643 fi
3644
3645
3646
3647
3648 #
3649 # Block size
3650 #
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3652 $as_echo_n "checking for block size... " >&6; }
3653
3654
3655
3656 # Check whether --with-blocksize was given.
3657 if test "${with_blocksize+set}" = set; then :
3658   withval=$with_blocksize;
3659   case $withval in
3660     yes)
3661       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3662       ;;
3663     no)
3664       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3665       ;;
3666     *)
3667       blocksize=$withval
3668       ;;
3669   esac
3670
3671 else
3672   blocksize=8
3673 fi
3674
3675
3676 case ${blocksize} in
3677   1) BLCKSZ=1024;;
3678   2) BLCKSZ=2048;;
3679   4) BLCKSZ=4096;;
3680   8) BLCKSZ=8192;;
3681  16) BLCKSZ=16384;;
3682  32) BLCKSZ=32768;;
3683   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3684 esac
3685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3686 $as_echo "${blocksize}kB" >&6; }
3687
3688
3689 cat >>confdefs.h <<_ACEOF
3690 #define BLCKSZ ${BLCKSZ}
3691 _ACEOF
3692
3693
3694 #
3695 # Relation segment size
3696 #
3697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3698 $as_echo_n "checking for segment size... " >&6; }
3699
3700
3701
3702 # Check whether --with-segsize was given.
3703 if test "${with_segsize+set}" = set; then :
3704   withval=$with_segsize;
3705   case $withval in
3706     yes)
3707       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3708       ;;
3709     no)
3710       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3711       ;;
3712     *)
3713       segsize=$withval
3714       ;;
3715   esac
3716
3717 else
3718   segsize=1
3719 fi
3720
3721
3722 # this expression is set up to avoid unnecessary integer overflow
3723 # blocksize is already guaranteed to be a factor of 1024
3724 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3725 test $? -eq 0 || exit 1
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3727 $as_echo "${segsize}GB" >&6; }
3728
3729
3730 cat >>confdefs.h <<_ACEOF
3731 #define RELSEG_SIZE ${RELSEG_SIZE}
3732 _ACEOF
3733
3734
3735 #
3736 # WAL block size
3737 #
3738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3739 $as_echo_n "checking for WAL block size... " >&6; }
3740
3741
3742
3743 # Check whether --with-wal-blocksize was given.
3744 if test "${with_wal_blocksize+set}" = set; then :
3745   withval=$with_wal_blocksize;
3746   case $withval in
3747     yes)
3748       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3749       ;;
3750     no)
3751       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3752       ;;
3753     *)
3754       wal_blocksize=$withval
3755       ;;
3756   esac
3757
3758 else
3759   wal_blocksize=8
3760 fi
3761
3762
3763 case ${wal_blocksize} in
3764   1) XLOG_BLCKSZ=1024;;
3765   2) XLOG_BLCKSZ=2048;;
3766   4) XLOG_BLCKSZ=4096;;
3767   8) XLOG_BLCKSZ=8192;;
3768  16) XLOG_BLCKSZ=16384;;
3769  32) XLOG_BLCKSZ=32768;;
3770  64) XLOG_BLCKSZ=65536;;
3771   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3772 esac
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3774 $as_echo "${wal_blocksize}kB" >&6; }
3775
3776
3777 cat >>confdefs.h <<_ACEOF
3778 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3779 _ACEOF
3780
3781
3782 #
3783 # C compiler
3784 #
3785
3786 # For historical reasons you can also use --with-CC to specify the C compiler
3787 # to use, although the standard way to do this is to set the CC environment
3788 # variable.
3789
3790
3791
3792 # Check whether --with-CC was given.
3793 if test "${with_CC+set}" = set; then :
3794   withval=$with_CC;
3795   case $withval in
3796     yes)
3797       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3798       ;;
3799     no)
3800       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3801       ;;
3802     *)
3803       CC=$with_CC
3804       ;;
3805   esac
3806
3807 fi
3808
3809
3810
3811 case $template in
3812   aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3813     *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3814 esac
3815
3816 ac_ext=c
3817 ac_cpp='$CPP $CPPFLAGS'
3818 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3819 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3820 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3821 if test -n "$ac_tool_prefix"; then
3822   for ac_prog in $pgac_cc_list
3823   do
3824     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3825 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3827 $as_echo_n "checking for $ac_word... " >&6; }
3828 if ${ac_cv_prog_CC+:} false; then :
3829   $as_echo_n "(cached) " >&6
3830 else
3831   if test -n "$CC"; then
3832   ac_cv_prog_CC="$CC" # Let the user override the test.
3833 else
3834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3835 for as_dir in $PATH
3836 do
3837   IFS=$as_save_IFS
3838   test -z "$as_dir" && as_dir=.
3839     for ac_exec_ext in '' $ac_executable_extensions; do
3840   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3841     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3843     break 2
3844   fi
3845 done
3846   done
3847 IFS=$as_save_IFS
3848
3849 fi
3850 fi
3851 CC=$ac_cv_prog_CC
3852 if test -n "$CC"; then
3853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3854 $as_echo "$CC" >&6; }
3855 else
3856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3857 $as_echo "no" >&6; }
3858 fi
3859
3860
3861     test -n "$CC" && break
3862   done
3863 fi
3864 if test -z "$CC"; then
3865   ac_ct_CC=$CC
3866   for ac_prog in $pgac_cc_list
3867 do
3868   # Extract the first word of "$ac_prog", so it can be a program name with args.
3869 set dummy $ac_prog; ac_word=$2
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3871 $as_echo_n "checking for $ac_word... " >&6; }
3872 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3873   $as_echo_n "(cached) " >&6
3874 else
3875   if test -n "$ac_ct_CC"; then
3876   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3877 else
3878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3879 for as_dir in $PATH
3880 do
3881   IFS=$as_save_IFS
3882   test -z "$as_dir" && as_dir=.
3883     for ac_exec_ext in '' $ac_executable_extensions; do
3884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3885     ac_cv_prog_ac_ct_CC="$ac_prog"
3886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3887     break 2
3888   fi
3889 done
3890   done
3891 IFS=$as_save_IFS
3892
3893 fi
3894 fi
3895 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3896 if test -n "$ac_ct_CC"; then
3897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3898 $as_echo "$ac_ct_CC" >&6; }
3899 else
3900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3901 $as_echo "no" >&6; }
3902 fi
3903
3904
3905   test -n "$ac_ct_CC" && break
3906 done
3907
3908   if test "x$ac_ct_CC" = x; then
3909     CC=""
3910   else
3911     case $cross_compiling:$ac_tool_warned in
3912 yes:)
3913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3914 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3915 ac_tool_warned=yes ;;
3916 esac
3917     CC=$ac_ct_CC
3918   fi
3919 fi
3920
3921
3922 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3923 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3924 as_fn_error $? "no acceptable C compiler found in \$PATH
3925 See \`config.log' for more details" "$LINENO" 5; }
3926
3927 # Provide some information about the compiler.
3928 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3929 set X $ac_compile
3930 ac_compiler=$2
3931 for ac_option in --version -v -V -qversion; do
3932   { { ac_try="$ac_compiler $ac_option >&5"
3933 case "(($ac_try" in
3934   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3935   *) ac_try_echo=$ac_try;;
3936 esac
3937 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3938 $as_echo "$ac_try_echo"; } >&5
3939   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3940   ac_status=$?
3941   if test -s conftest.err; then
3942     sed '10a\
3943 ... rest of stderr output deleted ...
3944          10q' conftest.err >conftest.er1
3945     cat conftest.er1 >&5
3946   fi
3947   rm -f conftest.er1 conftest.err
3948   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3949   test $ac_status = 0; }
3950 done
3951
3952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3953 /* end confdefs.h.  */
3954
3955 int
3956 main ()
3957 {
3958
3959   ;
3960   return 0;
3961 }
3962 _ACEOF
3963 ac_clean_files_save=$ac_clean_files
3964 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3965 # Try to create an executable without -o first, disregard a.out.
3966 # It will help us diagnose broken compilers, and finding out an intuition
3967 # of exeext.
3968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3969 $as_echo_n "checking whether the C compiler works... " >&6; }
3970 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3971
3972 # The possible output files:
3973 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3974
3975 ac_rmfiles=
3976 for ac_file in $ac_files
3977 do
3978   case $ac_file in
3979     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3980     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3981   esac
3982 done
3983 rm -f $ac_rmfiles
3984
3985 if { { ac_try="$ac_link_default"
3986 case "(($ac_try" in
3987   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3988   *) ac_try_echo=$ac_try;;
3989 esac
3990 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3991 $as_echo "$ac_try_echo"; } >&5
3992   (eval "$ac_link_default") 2>&5
3993   ac_status=$?
3994   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3995   test $ac_status = 0; }; then :
3996   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3997 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3998 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3999 # so that the user can short-circuit this test for compilers unknown to
4000 # Autoconf.
4001 for ac_file in $ac_files ''
4002 do
4003   test -f "$ac_file" || continue
4004   case $ac_file in
4005     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4006         ;;
4007     [ab].out )
4008         # We found the default executable, but exeext='' is most
4009         # certainly right.
4010         break;;
4011     *.* )
4012         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4013         then :; else
4014            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4015         fi
4016         # We set ac_cv_exeext here because the later test for it is not
4017         # safe: cross compilers may not add the suffix if given an `-o'
4018         # argument, so we may need to know it at that point already.
4019         # Even if this section looks crufty: it has the advantage of
4020         # actually working.
4021         break;;
4022     * )
4023         break;;
4024   esac
4025 done
4026 test "$ac_cv_exeext" = no && ac_cv_exeext=
4027
4028 else
4029   ac_file=''
4030 fi
4031 if test -z "$ac_file"; then :
4032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033 $as_echo "no" >&6; }
4034 $as_echo "$as_me: failed program was:" >&5
4035 sed 's/^/| /' conftest.$ac_ext >&5
4036
4037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4039 as_fn_error 77 "C compiler cannot create executables
4040 See \`config.log' for more details" "$LINENO" 5; }
4041 else
4042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4043 $as_echo "yes" >&6; }
4044 fi
4045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4046 $as_echo_n "checking for C compiler default output file name... " >&6; }
4047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4048 $as_echo "$ac_file" >&6; }
4049 ac_exeext=$ac_cv_exeext
4050
4051 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4052 ac_clean_files=$ac_clean_files_save
4053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4054 $as_echo_n "checking for suffix of executables... " >&6; }
4055 if { { ac_try="$ac_link"
4056 case "(($ac_try" in
4057   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4058   *) ac_try_echo=$ac_try;;
4059 esac
4060 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4061 $as_echo "$ac_try_echo"; } >&5
4062   (eval "$ac_link") 2>&5
4063   ac_status=$?
4064   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4065   test $ac_status = 0; }; then :
4066   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4067 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4068 # work properly (i.e., refer to `conftest.exe'), while it won't with
4069 # `rm'.
4070 for ac_file in conftest.exe conftest conftest.*; do
4071   test -f "$ac_file" || continue
4072   case $ac_file in
4073     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4074     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4075           break;;
4076     * ) break;;
4077   esac
4078 done
4079 else
4080   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4081 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4082 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4083 See \`config.log' for more details" "$LINENO" 5; }
4084 fi
4085 rm -f conftest conftest$ac_cv_exeext
4086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4087 $as_echo "$ac_cv_exeext" >&6; }
4088
4089 rm -f conftest.$ac_ext
4090 EXEEXT=$ac_cv_exeext
4091 ac_exeext=$EXEEXT
4092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4093 /* end confdefs.h.  */
4094 #include <stdio.h>
4095 int
4096 main ()
4097 {
4098 FILE *f = fopen ("conftest.out", "w");
4099  return ferror (f) || fclose (f) != 0;
4100
4101   ;
4102   return 0;
4103 }
4104 _ACEOF
4105 ac_clean_files="$ac_clean_files conftest.out"
4106 # Check that the compiler produces executables we can run.  If not, either
4107 # the compiler is broken, or we cross compile.
4108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4109 $as_echo_n "checking whether we are cross compiling... " >&6; }
4110 if test "$cross_compiling" != yes; then
4111   { { ac_try="$ac_link"
4112 case "(($ac_try" in
4113   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4114   *) ac_try_echo=$ac_try;;
4115 esac
4116 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4117 $as_echo "$ac_try_echo"; } >&5
4118   (eval "$ac_link") 2>&5
4119   ac_status=$?
4120   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4121   test $ac_status = 0; }
4122   if { ac_try='./conftest$ac_cv_exeext'
4123   { { case "(($ac_try" in
4124   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4125   *) ac_try_echo=$ac_try;;
4126 esac
4127 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4128 $as_echo "$ac_try_echo"; } >&5
4129   (eval "$ac_try") 2>&5
4130   ac_status=$?
4131   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4132   test $ac_status = 0; }; }; then
4133     cross_compiling=no
4134   else
4135     if test "$cross_compiling" = maybe; then
4136         cross_compiling=yes
4137     else
4138         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4139 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4140 as_fn_error $? "cannot run C compiled programs.
4141 If you meant to cross compile, use \`--host'.
4142 See \`config.log' for more details" "$LINENO" 5; }
4143     fi
4144   fi
4145 fi
4146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4147 $as_echo "$cross_compiling" >&6; }
4148
4149 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4150 ac_clean_files=$ac_clean_files_save
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4152 $as_echo_n "checking for suffix of object files... " >&6; }
4153 if ${ac_cv_objext+:} false; then :
4154   $as_echo_n "(cached) " >&6
4155 else
4156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4157 /* end confdefs.h.  */
4158
4159 int
4160 main ()
4161 {
4162
4163   ;
4164   return 0;
4165 }
4166 _ACEOF
4167 rm -f conftest.o conftest.obj
4168 if { { ac_try="$ac_compile"
4169 case "(($ac_try" in
4170   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4171   *) ac_try_echo=$ac_try;;
4172 esac
4173 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4174 $as_echo "$ac_try_echo"; } >&5
4175   (eval "$ac_compile") 2>&5
4176   ac_status=$?
4177   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4178   test $ac_status = 0; }; then :
4179   for ac_file in conftest.o conftest.obj conftest.*; do
4180   test -f "$ac_file" || continue;
4181   case $ac_file in
4182     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4183     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4184        break;;
4185   esac
4186 done
4187 else
4188   $as_echo "$as_me: failed program was:" >&5
4189 sed 's/^/| /' conftest.$ac_ext >&5
4190
4191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4192 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4193 as_fn_error $? "cannot compute suffix of object files: cannot compile
4194 See \`config.log' for more details" "$LINENO" 5; }
4195 fi
4196 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4197 fi
4198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4199 $as_echo "$ac_cv_objext" >&6; }
4200 OBJEXT=$ac_cv_objext
4201 ac_objext=$OBJEXT
4202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4203 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4204 if ${ac_cv_c_compiler_gnu+:} false; then :
4205   $as_echo_n "(cached) " >&6
4206 else
4207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4208 /* end confdefs.h.  */
4209
4210 int
4211 main ()
4212 {
4213 #ifndef __GNUC__
4214        choke me
4215 #endif
4216
4217   ;
4218   return 0;
4219 }
4220 _ACEOF
4221 if ac_fn_c_try_compile "$LINENO"; then :
4222   ac_compiler_gnu=yes
4223 else
4224   ac_compiler_gnu=no
4225 fi
4226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4227 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4228
4229 fi
4230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4231 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4232 if test $ac_compiler_gnu = yes; then
4233   GCC=yes
4234 else
4235   GCC=
4236 fi
4237 ac_test_CFLAGS=${CFLAGS+set}
4238 ac_save_CFLAGS=$CFLAGS
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4240 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4241 if ${ac_cv_prog_cc_g+:} false; then :
4242   $as_echo_n "(cached) " >&6
4243 else
4244   ac_save_c_werror_flag=$ac_c_werror_flag
4245    ac_c_werror_flag=yes
4246    ac_cv_prog_cc_g=no
4247    CFLAGS="-g"
4248    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4249 /* end confdefs.h.  */
4250
4251 int
4252 main ()
4253 {
4254
4255   ;
4256   return 0;
4257 }
4258 _ACEOF
4259 if ac_fn_c_try_compile "$LINENO"; then :
4260   ac_cv_prog_cc_g=yes
4261 else
4262   CFLAGS=""
4263       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4264 /* end confdefs.h.  */
4265
4266 int
4267 main ()
4268 {
4269
4270   ;
4271   return 0;
4272 }
4273 _ACEOF
4274 if ac_fn_c_try_compile "$LINENO"; then :
4275
4276 else
4277   ac_c_werror_flag=$ac_save_c_werror_flag
4278          CFLAGS="-g"
4279          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4280 /* end confdefs.h.  */
4281
4282 int
4283 main ()
4284 {
4285
4286   ;
4287   return 0;
4288 }
4289 _ACEOF
4290 if ac_fn_c_try_compile "$LINENO"; then :
4291   ac_cv_prog_cc_g=yes
4292 fi
4293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4294 fi
4295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4296 fi
4297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4298    ac_c_werror_flag=$ac_save_c_werror_flag
4299 fi
4300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4301 $as_echo "$ac_cv_prog_cc_g" >&6; }
4302 if test "$ac_test_CFLAGS" = set; then
4303   CFLAGS=$ac_save_CFLAGS
4304 elif test $ac_cv_prog_cc_g = yes; then
4305   if test "$GCC" = yes; then
4306     CFLAGS="-g -O2"
4307   else
4308     CFLAGS="-g"
4309   fi
4310 else
4311   if test "$GCC" = yes; then
4312     CFLAGS="-O2"
4313   else
4314     CFLAGS=
4315   fi
4316 fi
4317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4318 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4319 if ${ac_cv_prog_cc_c89+:} false; then :
4320   $as_echo_n "(cached) " >&6
4321 else
4322   ac_cv_prog_cc_c89=no
4323 ac_save_CC=$CC
4324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4325 /* end confdefs.h.  */
4326 #include <stdarg.h>
4327 #include <stdio.h>
4328 struct stat;
4329 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4330 struct buf { int x; };
4331 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4332 static char *e (p, i)
4333      char **p;
4334      int i;
4335 {
4336   return p[i];
4337 }
4338 static char *f (char * (*g) (char **, int), char **p, ...)
4339 {
4340   char *s;
4341   va_list v;
4342   va_start (v,p);
4343   s = g (p, va_arg (v,int));
4344   va_end (v);
4345   return s;
4346 }
4347
4348 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4349    function prototypes and stuff, but not '\xHH' hex character constants.
4350    These don't provoke an error unfortunately, instead are silently treated
4351    as 'x'.  The following induces an error, until -std is added to get
4352    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4353    array size at least.  It's necessary to write '\x00'==0 to get something
4354    that's true only with -std.  */
4355 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4356
4357 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4358    inside strings and character constants.  */
4359 #define FOO(x) 'x'
4360 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4361
4362 int test (int i, double x);
4363 struct s1 {int (*f) (int a);};
4364 struct s2 {int (*f) (double a);};
4365 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4366 int argc;
4367 char **argv;
4368 int
4369 main ()
4370 {
4371 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4372   ;
4373   return 0;
4374 }
4375 _ACEOF
4376 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4377         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4378 do
4379   CC="$ac_save_CC $ac_arg"
4380   if ac_fn_c_try_compile "$LINENO"; then :
4381   ac_cv_prog_cc_c89=$ac_arg
4382 fi
4383 rm -f core conftest.err conftest.$ac_objext
4384   test "x$ac_cv_prog_cc_c89" != "xno" && break
4385 done
4386 rm -f conftest.$ac_ext
4387 CC=$ac_save_CC
4388
4389 fi
4390 # AC_CACHE_VAL
4391 case "x$ac_cv_prog_cc_c89" in
4392   x)
4393     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4394 $as_echo "none needed" >&6; } ;;
4395   xno)
4396     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4397 $as_echo "unsupported" >&6; } ;;
4398   *)
4399     CC="$CC $ac_cv_prog_cc_c89"
4400     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4401 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4402 esac
4403 if test "x$ac_cv_prog_cc_c89" != xno; then :
4404
4405 fi
4406
4407 ac_ext=c
4408 ac_cpp='$CPP $CPPFLAGS'
4409 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4410 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4411 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4412
4413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4414 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4415 if ${ac_cv_prog_cc_c99+:} false; then :
4416   $as_echo_n "(cached) " >&6
4417 else
4418   ac_cv_prog_cc_c99=no
4419 ac_save_CC=$CC
4420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4421 /* end confdefs.h.  */
4422 #include <stdarg.h>
4423 #include <stdbool.h>
4424 #include <stdlib.h>
4425 #include <wchar.h>
4426 #include <stdio.h>
4427
4428 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4429 #define debug(...) fprintf (stderr, __VA_ARGS__)
4430 #define showlist(...) puts (#__VA_ARGS__)
4431 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4432 static void
4433 test_varargs_macros (void)
4434 {
4435   int x = 1234;
4436   int y = 5678;
4437   debug ("Flag");
4438   debug ("X = %d\n", x);
4439   showlist (The first, second, and third items.);
4440   report (x>y, "x is %d but y is %d", x, y);
4441 }
4442
4443 // Check long long types.
4444 #define BIG64 18446744073709551615ull
4445 #define BIG32 4294967295ul
4446 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4447 #if !BIG_OK
4448   your preprocessor is broken;
4449 #endif
4450 #if BIG_OK
4451 #else
4452   your preprocessor is broken;
4453 #endif
4454 static long long int bignum = -9223372036854775807LL;
4455 static unsigned long long int ubignum = BIG64;
4456
4457 struct incomplete_array
4458 {
4459   int datasize;
4460   double data[];
4461 };
4462
4463 struct named_init {
4464   int number;
4465   const wchar_t *name;
4466   double average;
4467 };
4468
4469 typedef const char *ccp;
4470
4471 static inline int
4472 test_restrict (ccp restrict text)
4473 {
4474   // See if C++-style comments work.
4475   // Iterate through items via the restricted pointer.
4476   // Also check for declarations in for loops.
4477   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4478     continue;
4479   return 0;
4480 }
4481
4482 // Check varargs and va_copy.
4483 static void
4484 test_varargs (const char *format, ...)
4485 {
4486   va_list args;
4487   va_start (args, format);
4488   va_list args_copy;
4489   va_copy (args_copy, args);
4490
4491   const char *str;
4492   int number;
4493   float fnumber;
4494
4495   while (*format)
4496     {
4497       switch (*format++)
4498         {
4499         case 's': // string
4500           str = va_arg (args_copy, const char *);
4501           break;
4502         case 'd': // int
4503           number = va_arg (args_copy, int);
4504           break;
4505         case 'f': // float
4506           fnumber = va_arg (args_copy, double);
4507           break;
4508         default:
4509           break;
4510         }
4511     }
4512   va_end (args_copy);
4513   va_end (args);
4514 }
4515
4516 int
4517 main ()
4518 {
4519
4520   // Check bool.
4521   _Bool success = false;
4522
4523   // Check restrict.
4524   if (test_restrict ("String literal") == 0)
4525     success = true;
4526   char *restrict newvar = "Another string";
4527
4528   // Check varargs.
4529   test_varargs ("s, d' f .", "string", 65, 34.234);
4530   test_varargs_macros ();
4531
4532   // Check flexible array members.
4533   struct incomplete_array *ia =
4534     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4535   ia->datasize = 10;
4536   for (int i = 0; i < ia->datasize; ++i)
4537     ia->data[i] = i * 1.234;
4538
4539   // Check named initializers.
4540   struct named_init ni = {
4541     .number = 34,
4542     .name = L"Test wide string",
4543     .average = 543.34343,
4544   };
4545
4546   ni.number = 58;
4547
4548   int dynamic_array[ni.number];
4549   dynamic_array[ni.number - 1] = 543;
4550
4551   // work around unused variable warnings
4552   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4553           || dynamic_array[ni.number - 1] != 543);
4554
4555   ;
4556   return 0;
4557 }
4558 _ACEOF
4559 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4560 do
4561   CC="$ac_save_CC $ac_arg"
4562   if ac_fn_c_try_compile "$LINENO"; then :
4563   ac_cv_prog_cc_c99=$ac_arg
4564 fi
4565 rm -f core conftest.err conftest.$ac_objext
4566   test "x$ac_cv_prog_cc_c99" != "xno" && break
4567 done
4568 rm -f conftest.$ac_ext
4569 CC=$ac_save_CC
4570
4571 fi
4572 # AC_CACHE_VAL
4573 case "x$ac_cv_prog_cc_c99" in
4574   x)
4575     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4576 $as_echo "none needed" >&6; } ;;
4577   xno)
4578     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4579 $as_echo "unsupported" >&6; } ;;
4580   *)
4581     CC="$CC $ac_cv_prog_cc_c99"
4582     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4583 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4584 esac
4585 if test "x$ac_cv_prog_cc_c99" != xno; then :
4586
4587 fi
4588
4589
4590
4591 # Error out if the compiler does not support C99, as the codebase
4592 # relies on that.
4593 if test "$ac_cv_prog_cc_c99" = no; then
4594     as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4595 fi
4596
4597 ac_ext=cpp
4598 ac_cpp='$CXXCPP $CPPFLAGS'
4599 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4600 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4601 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4602 if test -z "$CXX"; then
4603   if test -n "$CCC"; then
4604     CXX=$CCC
4605   else
4606     if test -n "$ac_tool_prefix"; then
4607   for ac_prog in $pgac_cxx_list
4608   do
4609     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4610 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4612 $as_echo_n "checking for $ac_word... " >&6; }
4613 if ${ac_cv_prog_CXX+:} false; then :
4614   $as_echo_n "(cached) " >&6
4615 else
4616   if test -n "$CXX"; then
4617   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4618 else
4619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4620 for as_dir in $PATH
4621 do
4622   IFS=$as_save_IFS
4623   test -z "$as_dir" && as_dir=.
4624     for ac_exec_ext in '' $ac_executable_extensions; do
4625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4626     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4628     break 2
4629   fi
4630 done
4631   done
4632 IFS=$as_save_IFS
4633
4634 fi
4635 fi
4636 CXX=$ac_cv_prog_CXX
4637 if test -n "$CXX"; then
4638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4639 $as_echo "$CXX" >&6; }
4640 else
4641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4642 $as_echo "no" >&6; }
4643 fi
4644
4645
4646     test -n "$CXX" && break
4647   done
4648 fi
4649 if test -z "$CXX"; then
4650   ac_ct_CXX=$CXX
4651   for ac_prog in $pgac_cxx_list
4652 do
4653   # Extract the first word of "$ac_prog", so it can be a program name with args.
4654 set dummy $ac_prog; ac_word=$2
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656 $as_echo_n "checking for $ac_word... " >&6; }
4657 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4658   $as_echo_n "(cached) " >&6
4659 else
4660   if test -n "$ac_ct_CXX"; then
4661   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4662 else
4663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664 for as_dir in $PATH
4665 do
4666   IFS=$as_save_IFS
4667   test -z "$as_dir" && as_dir=.
4668     for ac_exec_ext in '' $ac_executable_extensions; do
4669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4670     ac_cv_prog_ac_ct_CXX="$ac_prog"
4671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672     break 2
4673   fi
4674 done
4675   done
4676 IFS=$as_save_IFS
4677
4678 fi
4679 fi
4680 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4681 if test -n "$ac_ct_CXX"; then
4682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4683 $as_echo "$ac_ct_CXX" >&6; }
4684 else
4685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686 $as_echo "no" >&6; }
4687 fi
4688
4689
4690   test -n "$ac_ct_CXX" && break
4691 done
4692
4693   if test "x$ac_ct_CXX" = x; then
4694     CXX="g++"
4695   else
4696     case $cross_compiling:$ac_tool_warned in
4697 yes:)
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4699 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4700 ac_tool_warned=yes ;;
4701 esac
4702     CXX=$ac_ct_CXX
4703   fi
4704 fi
4705
4706   fi
4707 fi
4708 # Provide some information about the compiler.
4709 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4710 set X $ac_compile
4711 ac_compiler=$2
4712 for ac_option in --version -v -V -qversion; do
4713   { { ac_try="$ac_compiler $ac_option >&5"
4714 case "(($ac_try" in
4715   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4716   *) ac_try_echo=$ac_try;;
4717 esac
4718 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4719 $as_echo "$ac_try_echo"; } >&5
4720   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4721   ac_status=$?
4722   if test -s conftest.err; then
4723     sed '10a\
4724 ... rest of stderr output deleted ...
4725          10q' conftest.err >conftest.er1
4726     cat conftest.er1 >&5
4727   fi
4728   rm -f conftest.er1 conftest.err
4729   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4730   test $ac_status = 0; }
4731 done
4732
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4734 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4735 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4736   $as_echo_n "(cached) " >&6
4737 else
4738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4739 /* end confdefs.h.  */
4740
4741 int
4742 main ()
4743 {
4744 #ifndef __GNUC__
4745        choke me
4746 #endif
4747
4748   ;
4749   return 0;
4750 }
4751 _ACEOF
4752 if ac_fn_cxx_try_compile "$LINENO"; then :
4753   ac_compiler_gnu=yes
4754 else
4755   ac_compiler_gnu=no
4756 fi
4757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4758 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4759
4760 fi
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4762 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4763 if test $ac_compiler_gnu = yes; then
4764   GXX=yes
4765 else
4766   GXX=
4767 fi
4768 ac_test_CXXFLAGS=${CXXFLAGS+set}
4769 ac_save_CXXFLAGS=$CXXFLAGS
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4771 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4772 if ${ac_cv_prog_cxx_g+:} false; then :
4773   $as_echo_n "(cached) " >&6
4774 else
4775   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4776    ac_cxx_werror_flag=yes
4777    ac_cv_prog_cxx_g=no
4778    CXXFLAGS="-g"
4779    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4780 /* end confdefs.h.  */
4781
4782 int
4783 main ()
4784 {
4785
4786   ;
4787   return 0;
4788 }
4789 _ACEOF
4790 if ac_fn_cxx_try_compile "$LINENO"; then :
4791   ac_cv_prog_cxx_g=yes
4792 else
4793   CXXFLAGS=""
4794       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4795 /* end confdefs.h.  */
4796
4797 int
4798 main ()
4799 {
4800
4801   ;
4802   return 0;
4803 }
4804 _ACEOF
4805 if ac_fn_cxx_try_compile "$LINENO"; then :
4806
4807 else
4808   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4809          CXXFLAGS="-g"
4810          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4811 /* end confdefs.h.  */
4812
4813 int
4814 main ()
4815 {
4816
4817   ;
4818   return 0;
4819 }
4820 _ACEOF
4821 if ac_fn_cxx_try_compile "$LINENO"; then :
4822   ac_cv_prog_cxx_g=yes
4823 fi
4824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4825 fi
4826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4827 fi
4828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4829    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4830 fi
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4832 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4833 if test "$ac_test_CXXFLAGS" = set; then
4834   CXXFLAGS=$ac_save_CXXFLAGS
4835 elif test $ac_cv_prog_cxx_g = yes; then
4836   if test "$GXX" = yes; then
4837     CXXFLAGS="-g -O2"
4838   else
4839     CXXFLAGS="-g"
4840   fi
4841 else
4842   if test "$GXX" = yes; then
4843     CXXFLAGS="-O2"
4844   else
4845     CXXFLAGS=
4846   fi
4847 fi
4848 ac_ext=c
4849 ac_cpp='$CPP $CPPFLAGS'
4850 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4851 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4852 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4853
4854
4855 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4856 # but has idiosyncrasies of its own.  We assume icc will define
4857 # __INTEL_COMPILER regardless of CFLAGS.
4858
4859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4860 /* end confdefs.h.  */
4861
4862 int
4863 main ()
4864 {
4865 #ifndef __INTEL_COMPILER
4866 choke me
4867 #endif
4868   ;
4869   return 0;
4870 }
4871 _ACEOF
4872 if ac_fn_c_try_compile "$LINENO"; then :
4873   ICC=yes
4874 else
4875   ICC=no
4876 fi
4877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4878
4879 # Check if it's Sun Studio compiler. We assume that
4880 # __SUNPRO_C will be defined for Sun Studio compilers
4881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4882 /* end confdefs.h.  */
4883
4884 int
4885 main ()
4886 {
4887 #ifndef __SUNPRO_C
4888 choke me
4889 #endif
4890   ;
4891   return 0;
4892 }
4893 _ACEOF
4894 if ac_fn_c_try_compile "$LINENO"; then :
4895   SUN_STUDIO_CC=yes
4896 else
4897   SUN_STUDIO_CC=no
4898 fi
4899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4900
4901
4902
4903
4904 #
4905 # LLVM
4906 #
4907 # Checked early because subsequent tests depend on it.
4908
4909
4910
4911 # Check whether --with-llvm was given.
4912 if test "${with_llvm+set}" = set; then :
4913   withval=$with_llvm;
4914   case $withval in
4915     yes)
4916
4917 $as_echo "#define USE_LLVM 1" >>confdefs.h
4918
4919       ;;
4920     no)
4921       :
4922       ;;
4923     *)
4924       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4925       ;;
4926   esac
4927
4928 else
4929   with_llvm=no
4930
4931 fi
4932
4933
4934
4935 for ac_prog in gawk mawk nawk awk
4936 do
4937   # Extract the first word of "$ac_prog", so it can be a program name with args.
4938 set dummy $ac_prog; ac_word=$2
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4940 $as_echo_n "checking for $ac_word... " >&6; }
4941 if ${ac_cv_prog_AWK+:} false; then :
4942   $as_echo_n "(cached) " >&6
4943 else
4944   if test -n "$AWK"; then
4945   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4946 else
4947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948 for as_dir in $PATH
4949 do
4950   IFS=$as_save_IFS
4951   test -z "$as_dir" && as_dir=.
4952     for ac_exec_ext in '' $ac_executable_extensions; do
4953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4954     ac_cv_prog_AWK="$ac_prog"
4955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4956     break 2
4957   fi
4958 done
4959   done
4960 IFS=$as_save_IFS
4961
4962 fi
4963 fi
4964 AWK=$ac_cv_prog_AWK
4965 if test -n "$AWK"; then
4966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4967 $as_echo "$AWK" >&6; }
4968 else
4969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970 $as_echo "no" >&6; }
4971 fi
4972
4973
4974   test -n "$AWK" && break
4975 done
4976
4977 if test "$with_llvm" = yes; then :
4978
4979
4980
4981
4982
4983   if test -z "$LLVM_CONFIG"; then
4984   for ac_prog in llvm-config llvm-config-7 llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
4985 do
4986   # Extract the first word of "$ac_prog", so it can be a program name with args.
4987 set dummy $ac_prog; ac_word=$2
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4989 $as_echo_n "checking for $ac_word... " >&6; }
4990 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4991   $as_echo_n "(cached) " >&6
4992 else
4993   case $LLVM_CONFIG in
4994   [\\/]* | ?:[\\/]*)
4995   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
4996   ;;
4997   *)
4998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4999 for as_dir in $PATH
5000 do
5001   IFS=$as_save_IFS
5002   test -z "$as_dir" && as_dir=.
5003     for ac_exec_ext in '' $ac_executable_extensions; do
5004   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5005     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5006     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5007     break 2
5008   fi
5009 done
5010   done
5011 IFS=$as_save_IFS
5012
5013   ;;
5014 esac
5015 fi
5016 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5017 if test -n "$LLVM_CONFIG"; then
5018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5019 $as_echo "$LLVM_CONFIG" >&6; }
5020 else
5021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5022 $as_echo "no" >&6; }
5023 fi
5024
5025
5026   test -n "$LLVM_CONFIG" && break
5027 done
5028
5029 else
5030   # Report the value of LLVM_CONFIG in configure's output in all cases.
5031   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5032 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5034 $as_echo "$LLVM_CONFIG" >&6; }
5035 fi
5036
5037
5038   # no point continuing if llvm wasn't found
5039   if test -z "$LLVM_CONFIG"; then
5040     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5041   fi
5042   # check if detected $LLVM_CONFIG is executable
5043   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5044   if test "x$pgac_llvm_version" = "xno"; then
5045     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5046   fi
5047   # and whether the version is supported
5048   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5049     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5050   fi
5051
5052   # need clang to create some bitcode files
5053
5054   if test -z "$CLANG"; then
5055   for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5056 do
5057   # Extract the first word of "$ac_prog", so it can be a program name with args.
5058 set dummy $ac_prog; ac_word=$2
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5060 $as_echo_n "checking for $ac_word... " >&6; }
5061 if ${ac_cv_path_CLANG+:} false; then :
5062   $as_echo_n "(cached) " >&6
5063 else
5064   case $CLANG in
5065   [\\/]* | ?:[\\/]*)
5066   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5067   ;;
5068   *)
5069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5070 for as_dir in $PATH
5071 do
5072   IFS=$as_save_IFS
5073   test -z "$as_dir" && as_dir=.
5074     for ac_exec_ext in '' $ac_executable_extensions; do
5075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5076     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5078     break 2
5079   fi
5080 done
5081   done
5082 IFS=$as_save_IFS
5083
5084   ;;
5085 esac
5086 fi
5087 CLANG=$ac_cv_path_CLANG
5088 if test -n "$CLANG"; then
5089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5090 $as_echo "$CLANG" >&6; }
5091 else
5092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5093 $as_echo "no" >&6; }
5094 fi
5095
5096
5097   test -n "$CLANG" && break
5098 done
5099
5100 else
5101   # Report the value of CLANG in configure's output in all cases.
5102   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5103 $as_echo_n "checking for CLANG... " >&6; }
5104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5105 $as_echo "$CLANG" >&6; }
5106 fi
5107
5108   if test -z "$CLANG"; then
5109     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5110   fi
5111   # make sure clang is executable
5112   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5113     as_fn_error $? "$CLANG does not work" "$LINENO" 5
5114   fi
5115   # Could check clang version, but it doesn't seem that
5116   # important. Systems with a new enough LLVM version are usually
5117   # going to have a decent clang version too. It's also not entirely
5118   # clear what the minimum version is.
5119
5120   # Collect compiler flags necessary to build the LLVM dependent
5121   # shared library.
5122   for pgac_option in `$LLVM_CONFIG --cppflags`; do
5123     case $pgac_option in
5124       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5125     esac
5126   done
5127
5128   for pgac_option in `$LLVM_CONFIG --ldflags`; do
5129     case $pgac_option in
5130       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5131     esac
5132   done
5133
5134   # ABI influencing options, standard influencing options
5135   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5136     case $pgac_option in
5137       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5138       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5139     esac
5140   done
5141
5142   # Look for components we're interested in, collect necessary
5143   # libs. As some components are optional, we can't just list all of
5144   # them as it'd raise an error.
5145   pgac_components='';
5146   for pgac_component in `$LLVM_CONFIG --components`; do
5147     case $pgac_component in
5148       engine) pgac_components="$pgac_components $pgac_component";;
5149       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5150       orcjit) pgac_components="$pgac_components $pgac_component";;
5151       passes) pgac_components="$pgac_components $pgac_component";;
5152       perfjitevents) pgac_components="$pgac_components $pgac_component";;
5153     esac
5154   done;
5155
5156   # And then get the libraries that need to be linked in for the
5157   # selected components.  They're large libraries, we only want to
5158   # link them into the LLVM using shared library.
5159   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5160     case $pgac_option in
5161       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5162     esac
5163   done
5164
5165   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5166
5167   # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5168
5169
5170
5171
5172
5173
5174
5175
5176 fi # fi
5177
5178
5179 unset CFLAGS
5180 unset CXXFLAGS
5181
5182 #
5183 # Read the template
5184 #
5185 . "$srcdir/src/template/$template" || exit
5186
5187 # C[XX]FLAGS are selected so:
5188 # If the user specifies something in the environment, that is used.
5189 # else:  If the template file set something, that is used.
5190 # else:  If coverage was enabled, don't set anything.
5191 # else:  If the compiler is GCC, then we use -O2.
5192 # else:  If the compiler is something else, then we use -O, unless debugging.
5193
5194 if test "$ac_env_CFLAGS_set" = set; then
5195   CFLAGS=$ac_env_CFLAGS_value
5196 elif test "${CFLAGS+set}" = set; then
5197   : # (keep what template set)
5198 elif test "$enable_coverage" = yes; then
5199   : # no optimization by default
5200 elif test "$GCC" = yes; then
5201   CFLAGS="-O2"
5202 else
5203   # if the user selected debug mode, don't use -O
5204   if test "$enable_debug" != yes; then
5205     CFLAGS="-O"
5206   fi
5207 fi
5208
5209 if test "$ac_env_CXXFLAGS_set" = set; then
5210   CXXFLAGS=$ac_env_CXXFLAGS_value
5211 elif test "${CXXFLAGS+set}" = set; then
5212   : # (keep what template set)
5213 elif test "$enable_coverage" = yes; then
5214   : # no optimization by default
5215 elif test "$GCC" = yes; then
5216   CXXFLAGS="-O2"
5217 else
5218   # if the user selected debug mode, don't use -O
5219   if test "$enable_debug" != yes; then
5220     CXXFLAGS="-O"
5221   fi
5222 fi
5223
5224 # When generating bitcode (for inlining) we always want to use -O2
5225 # even when --enable-debug is specified. The bitcode it's not going to
5226 # be used for line-by-line debugging, and JIT inlining doesn't work
5227 # without at least -O1 (otherwise clang will emit 'noinline'
5228 # attributes everywhere), which is bad for testing.  Still allow the
5229 # environment to override if done explicitly.
5230 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5231   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5232 else
5233   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5234 fi
5235 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5236   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5237 else
5238   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5239 fi
5240
5241 # C[XX]FLAGS we determined above will be added back at the end
5242 user_CFLAGS=$CFLAGS
5243 CFLAGS=""
5244 user_CXXFLAGS=$CXXFLAGS
5245 CXXFLAGS=""
5246 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5247 BITCODE_CFLAGS=""
5248 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5249 BITCODE_CXXFLAGS=""
5250
5251 # set CFLAGS_VECTOR from the environment, if available
5252 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5253   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5254 fi
5255
5256 # Some versions of GCC support some additional useful warning flags.
5257 # Check whether they are supported, and add them to CFLAGS if so.
5258 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5259 # but has its own.  Also check other compiler-specific flags here.
5260
5261 if test "$GCC" = yes -a "$ICC" = no; then
5262   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5263   CXXFLAGS="-Wall -Wpointer-arith"
5264   # These work in some but not all gcc versions
5265
5266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5267 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5268 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5269   $as_echo_n "(cached) " >&6
5270 else
5271   pgac_save_CFLAGS=$CFLAGS
5272 pgac_save_CC=$CC
5273 CC=${CC}
5274 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5275 ac_save_c_werror_flag=$ac_c_werror_flag
5276 ac_c_werror_flag=yes
5277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5278 /* end confdefs.h.  */
5279
5280 int
5281 main ()
5282 {
5283
5284   ;
5285   return 0;
5286 }
5287 _ACEOF
5288 if ac_fn_c_try_compile "$LINENO"; then :
5289   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5290 else
5291   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5292 fi
5293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5294 ac_c_werror_flag=$ac_save_c_werror_flag
5295 CFLAGS="$pgac_save_CFLAGS"
5296 CC="$pgac_save_CC"
5297 fi
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5299 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5300 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5301   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5302 fi
5303
5304
5305   # -Wdeclaration-after-statement isn't applicable for C++
5306   # Really don't want VLAs to be used in our dialect of C
5307
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5309 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5310 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5311   $as_echo_n "(cached) " >&6
5312 else
5313   pgac_save_CFLAGS=$CFLAGS
5314 pgac_save_CC=$CC
5315 CC=${CC}
5316 CFLAGS="${CFLAGS} -Werror=vla"
5317 ac_save_c_werror_flag=$ac_c_werror_flag
5318 ac_c_werror_flag=yes
5319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5320 /* end confdefs.h.  */
5321
5322 int
5323 main ()
5324 {
5325
5326   ;
5327   return 0;
5328 }
5329 _ACEOF
5330 if ac_fn_c_try_compile "$LINENO"; then :
5331   pgac_cv_prog_CC_cflags__Werror_vla=yes
5332 else
5333   pgac_cv_prog_CC_cflags__Werror_vla=no
5334 fi
5335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5336 ac_c_werror_flag=$ac_save_c_werror_flag
5337 CFLAGS="$pgac_save_CFLAGS"
5338 CC="$pgac_save_CC"
5339 fi
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5341 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5342 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5343   CFLAGS="${CFLAGS} -Werror=vla"
5344 fi
5345
5346
5347   # -Wvla is not applicable for C++
5348
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5350 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5351 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5352   $as_echo_n "(cached) " >&6
5353 else
5354   pgac_save_CFLAGS=$CFLAGS
5355 pgac_save_CC=$CC
5356 CC=${CC}
5357 CFLAGS="${CFLAGS} -Wendif-labels"
5358 ac_save_c_werror_flag=$ac_c_werror_flag
5359 ac_c_werror_flag=yes
5360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5361 /* end confdefs.h.  */
5362
5363 int
5364 main ()
5365 {
5366
5367   ;
5368   return 0;
5369 }
5370 _ACEOF
5371 if ac_fn_c_try_compile "$LINENO"; then :
5372   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5373 else
5374   pgac_cv_prog_CC_cflags__Wendif_labels=no
5375 fi
5376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5377 ac_c_werror_flag=$ac_save_c_werror_flag
5378 CFLAGS="$pgac_save_CFLAGS"
5379 CC="$pgac_save_CC"
5380 fi
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5382 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5383 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5384   CFLAGS="${CFLAGS} -Wendif-labels"
5385 fi
5386
5387
5388   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5389 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5390 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5391   $as_echo_n "(cached) " >&6
5392 else
5393   pgac_save_CXXFLAGS=$CXXFLAGS
5394 pgac_save_CXX=$CXX
5395 CXX=${CXX}
5396 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5397 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5398 ac_cxx_werror_flag=yes
5399 ac_ext=cpp
5400 ac_cpp='$CXXCPP $CPPFLAGS'
5401 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5402 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5403 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5404
5405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5406 /* end confdefs.h.  */
5407
5408 int
5409 main ()
5410 {
5411
5412   ;
5413   return 0;
5414 }
5415 _ACEOF
5416 if ac_fn_cxx_try_compile "$LINENO"; then :
5417   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5418 else
5419   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5420 fi
5421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5422 ac_ext=c
5423 ac_cpp='$CPP $CPPFLAGS'
5424 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5425 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5426 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5427
5428 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5429 CXXFLAGS="$pgac_save_CXXFLAGS"
5430 CXX="$pgac_save_CXX"
5431 fi
5432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5433 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5434 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5435   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5436 fi
5437
5438
5439
5440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5441 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5442 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5443   $as_echo_n "(cached) " >&6
5444 else
5445   pgac_save_CFLAGS=$CFLAGS
5446 pgac_save_CC=$CC
5447 CC=${CC}
5448 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5449 ac_save_c_werror_flag=$ac_c_werror_flag
5450 ac_c_werror_flag=yes
5451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5452 /* end confdefs.h.  */
5453
5454 int
5455 main ()
5456 {
5457
5458   ;
5459   return 0;
5460 }
5461 _ACEOF
5462 if ac_fn_c_try_compile "$LINENO"; then :
5463   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5464 else
5465   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5466 fi
5467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5468 ac_c_werror_flag=$ac_save_c_werror_flag
5469 CFLAGS="$pgac_save_CFLAGS"
5470 CC="$pgac_save_CC"
5471 fi
5472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5473 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5474 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5475   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5476 fi
5477
5478
5479   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5480 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5481 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5482   $as_echo_n "(cached) " >&6
5483 else
5484   pgac_save_CXXFLAGS=$CXXFLAGS
5485 pgac_save_CXX=$CXX
5486 CXX=${CXX}
5487 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5488 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5489 ac_cxx_werror_flag=yes
5490 ac_ext=cpp
5491 ac_cpp='$CXXCPP $CPPFLAGS'
5492 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5493 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5494 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5495
5496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5497 /* end confdefs.h.  */
5498
5499 int
5500 main ()
5501 {
5502
5503   ;
5504   return 0;
5505 }
5506 _ACEOF
5507 if ac_fn_cxx_try_compile "$LINENO"; then :
5508   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5509 else
5510   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5511 fi
5512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5513 ac_ext=c
5514 ac_cpp='$CPP $CPPFLAGS'
5515 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5516 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5517 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5518
5519 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5520 CXXFLAGS="$pgac_save_CXXFLAGS"
5521 CXX="$pgac_save_CXX"
5522 fi
5523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5524 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5525 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5526   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5527 fi
5528
5529
5530   # This was included in -Wall/-Wformat in older GCC versions
5531
5532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5533 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5534 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5535   $as_echo_n "(cached) " >&6
5536 else
5537   pgac_save_CFLAGS=$CFLAGS
5538 pgac_save_CC=$CC
5539 CC=${CC}
5540 CFLAGS="${CFLAGS} -Wformat-security"
5541 ac_save_c_werror_flag=$ac_c_werror_flag
5542 ac_c_werror_flag=yes
5543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5544 /* end confdefs.h.  */
5545
5546 int
5547 main ()
5548 {
5549
5550   ;
5551   return 0;
5552 }
5553 _ACEOF
5554 if ac_fn_c_try_compile "$LINENO"; then :
5555   pgac_cv_prog_CC_cflags__Wformat_security=yes
5556 else
5557   pgac_cv_prog_CC_cflags__Wformat_security=no
5558 fi
5559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5560 ac_c_werror_flag=$ac_save_c_werror_flag
5561 CFLAGS="$pgac_save_CFLAGS"
5562 CC="$pgac_save_CC"
5563 fi
5564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5565 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5566 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5567   CFLAGS="${CFLAGS} -Wformat-security"
5568 fi
5569
5570
5571   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5572 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5573 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5574   $as_echo_n "(cached) " >&6
5575 else
5576   pgac_save_CXXFLAGS=$CXXFLAGS
5577 pgac_save_CXX=$CXX
5578 CXX=${CXX}
5579 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5580 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5581 ac_cxx_werror_flag=yes
5582 ac_ext=cpp
5583 ac_cpp='$CXXCPP $CPPFLAGS'
5584 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5585 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5586 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5587
5588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5589 /* end confdefs.h.  */
5590
5591 int
5592 main ()
5593 {
5594
5595   ;
5596   return 0;
5597 }
5598 _ACEOF
5599 if ac_fn_cxx_try_compile "$LINENO"; then :
5600   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5601 else
5602   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5603 fi
5604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5605 ac_ext=c
5606 ac_cpp='$CPP $CPPFLAGS'
5607 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5608 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5609 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5610
5611 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5612 CXXFLAGS="$pgac_save_CXXFLAGS"
5613 CXX="$pgac_save_CXX"
5614 fi
5615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5616 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5617 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5618   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5619 fi
5620
5621
5622   # Disable strict-aliasing rules; needed for gcc 3.3+
5623
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5625 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5626 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5627   $as_echo_n "(cached) " >&6
5628 else
5629   pgac_save_CFLAGS=$CFLAGS
5630 pgac_save_CC=$CC
5631 CC=${CC}
5632 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5633 ac_save_c_werror_flag=$ac_c_werror_flag
5634 ac_c_werror_flag=yes
5635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5636 /* end confdefs.h.  */
5637
5638 int
5639 main ()
5640 {
5641
5642   ;
5643   return 0;
5644 }
5645 _ACEOF
5646 if ac_fn_c_try_compile "$LINENO"; then :
5647   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5648 else
5649   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5650 fi
5651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5652 ac_c_werror_flag=$ac_save_c_werror_flag
5653 CFLAGS="$pgac_save_CFLAGS"
5654 CC="$pgac_save_CC"
5655 fi
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5657 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5658 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5659   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5660 fi
5661
5662
5663   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5664 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5665 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5666   $as_echo_n "(cached) " >&6
5667 else
5668   pgac_save_CXXFLAGS=$CXXFLAGS
5669 pgac_save_CXX=$CXX
5670 CXX=${CXX}
5671 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5672 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5673 ac_cxx_werror_flag=yes
5674 ac_ext=cpp
5675 ac_cpp='$CXXCPP $CPPFLAGS'
5676 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5677 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5678 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5679
5680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5681 /* end confdefs.h.  */
5682
5683 int
5684 main ()
5685 {
5686
5687   ;
5688   return 0;
5689 }
5690 _ACEOF
5691 if ac_fn_cxx_try_compile "$LINENO"; then :
5692   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5693 else
5694   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5695 fi
5696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5697 ac_ext=c
5698 ac_cpp='$CPP $CPPFLAGS'
5699 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5700 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5701 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5702
5703 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5704 CXXFLAGS="$pgac_save_CXXFLAGS"
5705 CXX="$pgac_save_CXX"
5706 fi
5707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5708 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5709 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5710   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5711 fi
5712
5713
5714   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5715
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5717 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5718 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5719   $as_echo_n "(cached) " >&6
5720 else
5721   pgac_save_CFLAGS=$CFLAGS
5722 pgac_save_CC=$CC
5723 CC=${CC}
5724 CFLAGS="${CFLAGS} -fwrapv"
5725 ac_save_c_werror_flag=$ac_c_werror_flag
5726 ac_c_werror_flag=yes
5727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5728 /* end confdefs.h.  */
5729
5730 int
5731 main ()
5732 {
5733
5734   ;
5735   return 0;
5736 }
5737 _ACEOF
5738 if ac_fn_c_try_compile "$LINENO"; then :
5739   pgac_cv_prog_CC_cflags__fwrapv=yes
5740 else
5741   pgac_cv_prog_CC_cflags__fwrapv=no
5742 fi
5743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5744 ac_c_werror_flag=$ac_save_c_werror_flag
5745 CFLAGS="$pgac_save_CFLAGS"
5746 CC="$pgac_save_CC"
5747 fi
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5749 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5750 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5751   CFLAGS="${CFLAGS} -fwrapv"
5752 fi
5753
5754
5755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5756 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5757 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5758   $as_echo_n "(cached) " >&6
5759 else
5760   pgac_save_CXXFLAGS=$CXXFLAGS
5761 pgac_save_CXX=$CXX
5762 CXX=${CXX}
5763 CXXFLAGS="${CXXFLAGS} -fwrapv"
5764 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5765 ac_cxx_werror_flag=yes
5766 ac_ext=cpp
5767 ac_cpp='$CXXCPP $CPPFLAGS'
5768 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5769 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5770 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5771
5772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5773 /* end confdefs.h.  */
5774
5775 int
5776 main ()
5777 {
5778
5779   ;
5780   return 0;
5781 }
5782 _ACEOF
5783 if ac_fn_cxx_try_compile "$LINENO"; then :
5784   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5785 else
5786   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5787 fi
5788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5789 ac_ext=c
5790 ac_cpp='$CPP $CPPFLAGS'
5791 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5792 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5793 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5794
5795 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5796 CXXFLAGS="$pgac_save_CXXFLAGS"
5797 CXX="$pgac_save_CXX"
5798 fi
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5800 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5801 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5802   CXXFLAGS="${CXXFLAGS} -fwrapv"
5803 fi
5804
5805
5806   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5807
5808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5809 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5810 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5811   $as_echo_n "(cached) " >&6
5812 else
5813   pgac_save_CFLAGS=$CFLAGS
5814 pgac_save_CC=$CC
5815 CC=${CC}
5816 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5817 ac_save_c_werror_flag=$ac_c_werror_flag
5818 ac_c_werror_flag=yes
5819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5820 /* end confdefs.h.  */
5821
5822 int
5823 main ()
5824 {
5825
5826   ;
5827   return 0;
5828 }
5829 _ACEOF
5830 if ac_fn_c_try_compile "$LINENO"; then :
5831   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5832 else
5833   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5834 fi
5835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5836 ac_c_werror_flag=$ac_save_c_werror_flag
5837 CFLAGS="$pgac_save_CFLAGS"
5838 CC="$pgac_save_CC"
5839 fi
5840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5841 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5842 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5843   CFLAGS="${CFLAGS} -fexcess-precision=standard"
5844 fi
5845
5846
5847   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5848 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5849 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5850   $as_echo_n "(cached) " >&6
5851 else
5852   pgac_save_CXXFLAGS=$CXXFLAGS
5853 pgac_save_CXX=$CXX
5854 CXX=${CXX}
5855 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5856 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5857 ac_cxx_werror_flag=yes
5858 ac_ext=cpp
5859 ac_cpp='$CXXCPP $CPPFLAGS'
5860 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5861 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5862 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5863
5864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5865 /* end confdefs.h.  */
5866
5867 int
5868 main ()
5869 {
5870
5871   ;
5872   return 0;
5873 }
5874 _ACEOF
5875 if ac_fn_cxx_try_compile "$LINENO"; then :
5876   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5877 else
5878   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5879 fi
5880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5881 ac_ext=c
5882 ac_cpp='$CPP $CPPFLAGS'
5883 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5884 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5885 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5886
5887 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5888 CXXFLAGS="$pgac_save_CXXFLAGS"
5889 CXX="$pgac_save_CXX"
5890 fi
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5892 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5893 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5894   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5895 fi
5896
5897
5898   # Optimization flags for specific files that benefit from vectorization
5899   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5900 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5901 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5902   $as_echo_n "(cached) " >&6
5903 else
5904   pgac_save_CFLAGS=$CFLAGS
5905 pgac_save_CC=$CC
5906 CC=${CC}
5907 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5908 ac_save_c_werror_flag=$ac_c_werror_flag
5909 ac_c_werror_flag=yes
5910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5911 /* end confdefs.h.  */
5912
5913 int
5914 main ()
5915 {
5916
5917   ;
5918   return 0;
5919 }
5920 _ACEOF
5921 if ac_fn_c_try_compile "$LINENO"; then :
5922   pgac_cv_prog_CC_cflags__funroll_loops=yes
5923 else
5924   pgac_cv_prog_CC_cflags__funroll_loops=no
5925 fi
5926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5927 ac_c_werror_flag=$ac_save_c_werror_flag
5928 CFLAGS="$pgac_save_CFLAGS"
5929 CC="$pgac_save_CC"
5930 fi
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5932 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5933 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5934   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5935 fi
5936
5937
5938   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5939 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5940 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5941   $as_echo_n "(cached) " >&6
5942 else
5943   pgac_save_CFLAGS=$CFLAGS
5944 pgac_save_CC=$CC
5945 CC=${CC}
5946 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5947 ac_save_c_werror_flag=$ac_c_werror_flag
5948 ac_c_werror_flag=yes
5949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5950 /* end confdefs.h.  */
5951
5952 int
5953 main ()
5954 {
5955
5956   ;
5957   return 0;
5958 }
5959 _ACEOF
5960 if ac_fn_c_try_compile "$LINENO"; then :
5961   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5962 else
5963   pgac_cv_prog_CC_cflags__ftree_vectorize=no
5964 fi
5965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5966 ac_c_werror_flag=$ac_save_c_werror_flag
5967 CFLAGS="$pgac_save_CFLAGS"
5968 CC="$pgac_save_CC"
5969 fi
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5971 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5972 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5973   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5974 fi
5975
5976
5977   # We want to suppress clang's unhelpful unused-command-line-argument warnings
5978   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5979   # test for the positive form and if that works, add the negative form
5980   NOT_THE_CFLAGS=""
5981   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5982 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5983 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
5984   $as_echo_n "(cached) " >&6
5985 else
5986   pgac_save_CFLAGS=$CFLAGS
5987 pgac_save_CC=$CC
5988 CC=${CC}
5989 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5990 ac_save_c_werror_flag=$ac_c_werror_flag
5991 ac_c_werror_flag=yes
5992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5993 /* end confdefs.h.  */
5994
5995 int
5996 main ()
5997 {
5998
5999   ;
6000   return 0;
6001 }
6002 _ACEOF
6003 if ac_fn_c_try_compile "$LINENO"; then :
6004   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6005 else
6006   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6007 fi
6008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6009 ac_c_werror_flag=$ac_save_c_werror_flag
6010 CFLAGS="$pgac_save_CFLAGS"
6011 CC="$pgac_save_CC"
6012 fi
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6014 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6015 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6016   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6017 fi
6018
6019
6020   if test -n "$NOT_THE_CFLAGS"; then
6021     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6022   fi
6023   # Similarly disable useless truncation warnings from gcc 8+
6024   NOT_THE_CFLAGS=""
6025   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6026 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6027 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6028   $as_echo_n "(cached) " >&6
6029 else
6030   pgac_save_CFLAGS=$CFLAGS
6031 pgac_save_CC=$CC
6032 CC=${CC}
6033 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6034 ac_save_c_werror_flag=$ac_c_werror_flag
6035 ac_c_werror_flag=yes
6036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6037 /* end confdefs.h.  */
6038
6039 int
6040 main ()
6041 {
6042
6043   ;
6044   return 0;
6045 }
6046 _ACEOF
6047 if ac_fn_c_try_compile "$LINENO"; then :
6048   pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6049 else
6050   pgac_cv_prog_CC_cflags__Wformat_truncation=no
6051 fi
6052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6053 ac_c_werror_flag=$ac_save_c_werror_flag
6054 CFLAGS="$pgac_save_CFLAGS"
6055 CC="$pgac_save_CC"
6056 fi
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6058 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6059 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6060   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6061 fi
6062
6063
6064   if test -n "$NOT_THE_CFLAGS"; then
6065     CFLAGS="$CFLAGS -Wno-format-truncation"
6066   fi
6067   NOT_THE_CFLAGS=""
6068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6069 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6070 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6071   $as_echo_n "(cached) " >&6
6072 else
6073   pgac_save_CFLAGS=$CFLAGS
6074 pgac_save_CC=$CC
6075 CC=${CC}
6076 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6077 ac_save_c_werror_flag=$ac_c_werror_flag
6078 ac_c_werror_flag=yes
6079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6080 /* end confdefs.h.  */
6081
6082 int
6083 main ()
6084 {
6085
6086   ;
6087   return 0;
6088 }
6089 _ACEOF
6090 if ac_fn_c_try_compile "$LINENO"; then :
6091   pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6092 else
6093   pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6094 fi
6095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6096 ac_c_werror_flag=$ac_save_c_werror_flag
6097 CFLAGS="$pgac_save_CFLAGS"
6098 CC="$pgac_save_CC"
6099 fi
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6101 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6102 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6103   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6104 fi
6105
6106
6107   if test -n "$NOT_THE_CFLAGS"; then
6108     CFLAGS="$CFLAGS -Wno-stringop-truncation"
6109   fi
6110 elif test "$ICC" = yes; then
6111   # Intel's compiler has a bug/misoptimization in checking for
6112   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6113
6114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6115 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6116 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6117   $as_echo_n "(cached) " >&6
6118 else
6119   pgac_save_CFLAGS=$CFLAGS
6120 pgac_save_CC=$CC
6121 CC=${CC}
6122 CFLAGS="${CFLAGS} -mp1"
6123 ac_save_c_werror_flag=$ac_c_werror_flag
6124 ac_c_werror_flag=yes
6125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6126 /* end confdefs.h.  */
6127
6128 int
6129 main ()
6130 {
6131
6132   ;
6133   return 0;
6134 }
6135 _ACEOF
6136 if ac_fn_c_try_compile "$LINENO"; then :
6137   pgac_cv_prog_CC_cflags__mp1=yes
6138 else
6139   pgac_cv_prog_CC_cflags__mp1=no
6140 fi
6141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6142 ac_c_werror_flag=$ac_save_c_werror_flag
6143 CFLAGS="$pgac_save_CFLAGS"
6144 CC="$pgac_save_CC"
6145 fi
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6147 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6148 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6149   CFLAGS="${CFLAGS} -mp1"
6150 fi
6151
6152
6153   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6154 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6155 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6156   $as_echo_n "(cached) " >&6
6157 else
6158   pgac_save_CXXFLAGS=$CXXFLAGS
6159 pgac_save_CXX=$CXX
6160 CXX=${CXX}
6161 CXXFLAGS="${CXXFLAGS} -mp1"
6162 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6163 ac_cxx_werror_flag=yes
6164 ac_ext=cpp
6165 ac_cpp='$CXXCPP $CPPFLAGS'
6166 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6167 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6168 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6169
6170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6171 /* end confdefs.h.  */
6172
6173 int
6174 main ()
6175 {
6176
6177   ;
6178   return 0;
6179 }
6180 _ACEOF
6181 if ac_fn_cxx_try_compile "$LINENO"; then :
6182   pgac_cv_prog_CXX_cxxflags__mp1=yes
6183 else
6184   pgac_cv_prog_CXX_cxxflags__mp1=no
6185 fi
6186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6187 ac_ext=c
6188 ac_cpp='$CPP $CPPFLAGS'
6189 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6190 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6191 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6192
6193 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6194 CXXFLAGS="$pgac_save_CXXFLAGS"
6195 CXX="$pgac_save_CXX"
6196 fi
6197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6198 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6199 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6200   CXXFLAGS="${CXXFLAGS} -mp1"
6201 fi
6202
6203
6204   # Make sure strict aliasing is off (though this is said to be the default)
6205
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6207 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6208 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6209   $as_echo_n "(cached) " >&6
6210 else
6211   pgac_save_CFLAGS=$CFLAGS
6212 pgac_save_CC=$CC
6213 CC=${CC}
6214 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6215 ac_save_c_werror_flag=$ac_c_werror_flag
6216 ac_c_werror_flag=yes
6217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6218 /* end confdefs.h.  */
6219
6220 int
6221 main ()
6222 {
6223
6224   ;
6225   return 0;
6226 }
6227 _ACEOF
6228 if ac_fn_c_try_compile "$LINENO"; then :
6229   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6230 else
6231   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6232 fi
6233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6234 ac_c_werror_flag=$ac_save_c_werror_flag
6235 CFLAGS="$pgac_save_CFLAGS"
6236 CC="$pgac_save_CC"
6237 fi
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6239 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6240 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6241   CFLAGS="${CFLAGS} -fno-strict-aliasing"
6242 fi
6243
6244
6245   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6246 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6247 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6248   $as_echo_n "(cached) " >&6
6249 else
6250   pgac_save_CXXFLAGS=$CXXFLAGS
6251 pgac_save_CXX=$CXX
6252 CXX=${CXX}
6253 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6254 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6255 ac_cxx_werror_flag=yes
6256 ac_ext=cpp
6257 ac_cpp='$CXXCPP $CPPFLAGS'
6258 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6259 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6260 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6261
6262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6263 /* end confdefs.h.  */
6264
6265 int
6266 main ()
6267 {
6268
6269   ;
6270   return 0;
6271 }
6272 _ACEOF
6273 if ac_fn_cxx_try_compile "$LINENO"; then :
6274   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6275 else
6276   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6277 fi
6278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6279 ac_ext=c
6280 ac_cpp='$CPP $CPPFLAGS'
6281 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6282 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6283 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6284
6285 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6286 CXXFLAGS="$pgac_save_CXXFLAGS"
6287 CXX="$pgac_save_CXX"
6288 fi
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6290 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6291 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6292   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6293 fi
6294
6295
6296 elif test "$PORTNAME" = "aix"; then
6297   # AIX's xlc has to have strict aliasing turned off too
6298
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6300 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6301 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6302   $as_echo_n "(cached) " >&6
6303 else
6304   pgac_save_CFLAGS=$CFLAGS
6305 pgac_save_CC=$CC
6306 CC=${CC}
6307 CFLAGS="${CFLAGS} -qnoansialias"
6308 ac_save_c_werror_flag=$ac_c_werror_flag
6309 ac_c_werror_flag=yes
6310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6311 /* end confdefs.h.  */
6312
6313 int
6314 main ()
6315 {
6316
6317   ;
6318   return 0;
6319 }
6320 _ACEOF
6321 if ac_fn_c_try_compile "$LINENO"; then :
6322   pgac_cv_prog_CC_cflags__qnoansialias=yes
6323 else
6324   pgac_cv_prog_CC_cflags__qnoansialias=no
6325 fi
6326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6327 ac_c_werror_flag=$ac_save_c_werror_flag
6328 CFLAGS="$pgac_save_CFLAGS"
6329 CC="$pgac_save_CC"
6330 fi
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6332 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6333 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6334   CFLAGS="${CFLAGS} -qnoansialias"
6335 fi
6336
6337
6338   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6339 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6340 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6341   $as_echo_n "(cached) " >&6
6342 else
6343   pgac_save_CXXFLAGS=$CXXFLAGS
6344 pgac_save_CXX=$CXX
6345 CXX=${CXX}
6346 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6347 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6348 ac_cxx_werror_flag=yes
6349 ac_ext=cpp
6350 ac_cpp='$CXXCPP $CPPFLAGS'
6351 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6352 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6353 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6354
6355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6356 /* end confdefs.h.  */
6357
6358 int
6359 main ()
6360 {
6361
6362   ;
6363   return 0;
6364 }
6365 _ACEOF
6366 if ac_fn_cxx_try_compile "$LINENO"; then :
6367   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6368 else
6369   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6370 fi
6371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6372 ac_ext=c
6373 ac_cpp='$CPP $CPPFLAGS'
6374 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6375 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6376 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6377
6378 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6379 CXXFLAGS="$pgac_save_CXXFLAGS"
6380 CXX="$pgac_save_CXX"
6381 fi
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6383 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6384 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6385   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6386 fi
6387
6388
6389
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6391 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6392 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6393   $as_echo_n "(cached) " >&6
6394 else
6395   pgac_save_CFLAGS=$CFLAGS
6396 pgac_save_CC=$CC
6397 CC=${CC}
6398 CFLAGS="${CFLAGS} -qlonglong"
6399 ac_save_c_werror_flag=$ac_c_werror_flag
6400 ac_c_werror_flag=yes
6401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6402 /* end confdefs.h.  */
6403
6404 int
6405 main ()
6406 {
6407
6408   ;
6409   return 0;
6410 }
6411 _ACEOF
6412 if ac_fn_c_try_compile "$LINENO"; then :
6413   pgac_cv_prog_CC_cflags__qlonglong=yes
6414 else
6415   pgac_cv_prog_CC_cflags__qlonglong=no
6416 fi
6417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6418 ac_c_werror_flag=$ac_save_c_werror_flag
6419 CFLAGS="$pgac_save_CFLAGS"
6420 CC="$pgac_save_CC"
6421 fi
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6423 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6424 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6425   CFLAGS="${CFLAGS} -qlonglong"
6426 fi
6427
6428
6429   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6430 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6431 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6432   $as_echo_n "(cached) " >&6
6433 else
6434   pgac_save_CXXFLAGS=$CXXFLAGS
6435 pgac_save_CXX=$CXX
6436 CXX=${CXX}
6437 CXXFLAGS="${CXXFLAGS} -qlonglong"
6438 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6439 ac_cxx_werror_flag=yes
6440 ac_ext=cpp
6441 ac_cpp='$CXXCPP $CPPFLAGS'
6442 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6443 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6444 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6445
6446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6447 /* end confdefs.h.  */
6448
6449 int
6450 main ()
6451 {
6452
6453   ;
6454   return 0;
6455 }
6456 _ACEOF
6457 if ac_fn_cxx_try_compile "$LINENO"; then :
6458   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6459 else
6460   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6461 fi
6462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6463 ac_ext=c
6464 ac_cpp='$CPP $CPPFLAGS'
6465 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6466 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6467 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6468
6469 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6470 CXXFLAGS="$pgac_save_CXXFLAGS"
6471 CXX="$pgac_save_CXX"
6472 fi
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6474 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6475 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6476   CXXFLAGS="${CXXFLAGS} -qlonglong"
6477 fi
6478
6479
6480 elif test "$PORTNAME" = "hpux"; then
6481   # On some versions of HP-UX, libm functions do not set errno by default.
6482   # Fix that by using +Olibmerrno if the compiler recognizes it.
6483
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6485 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6486 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6487   $as_echo_n "(cached) " >&6
6488 else
6489   pgac_save_CFLAGS=$CFLAGS
6490 pgac_save_CC=$CC
6491 CC=${CC}
6492 CFLAGS="${CFLAGS} +Olibmerrno"
6493 ac_save_c_werror_flag=$ac_c_werror_flag
6494 ac_c_werror_flag=yes
6495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6496 /* end confdefs.h.  */
6497
6498 int
6499 main ()
6500 {
6501
6502   ;
6503   return 0;
6504 }
6505 _ACEOF
6506 if ac_fn_c_try_compile "$LINENO"; then :
6507   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6508 else
6509   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6510 fi
6511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6512 ac_c_werror_flag=$ac_save_c_werror_flag
6513 CFLAGS="$pgac_save_CFLAGS"
6514 CC="$pgac_save_CC"
6515 fi
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6517 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6518 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6519   CFLAGS="${CFLAGS} +Olibmerrno"
6520 fi
6521
6522
6523   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6524 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6525 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6526   $as_echo_n "(cached) " >&6
6527 else
6528   pgac_save_CXXFLAGS=$CXXFLAGS
6529 pgac_save_CXX=$CXX
6530 CXX=${CXX}
6531 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6532 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6533 ac_cxx_werror_flag=yes
6534 ac_ext=cpp
6535 ac_cpp='$CXXCPP $CPPFLAGS'
6536 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6537 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6538 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6539
6540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6541 /* end confdefs.h.  */
6542
6543 int
6544 main ()
6545 {
6546
6547   ;
6548   return 0;
6549 }
6550 _ACEOF
6551 if ac_fn_cxx_try_compile "$LINENO"; then :
6552   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6553 else
6554   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6555 fi
6556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6557 ac_ext=c
6558 ac_cpp='$CPP $CPPFLAGS'
6559 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6560 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6561 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6562
6563 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6564 CXXFLAGS="$pgac_save_CXXFLAGS"
6565 CXX="$pgac_save_CXX"
6566 fi
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6568 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6569 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6570   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6571 fi
6572
6573
6574 fi
6575
6576 CFLAGS_VECTOR=$CFLAGS_VECTOR
6577
6578
6579 # Determine flags used to emit bitcode for JIT inlining. Need to test
6580 # for behaviour changing compiler flags, to keep compatibility with
6581 # compiler used for normal postgres code.
6582 if test "$with_llvm" = yes ; then
6583   CLANGXX="$CLANG -xc++"
6584
6585   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6586 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6587 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6588   $as_echo_n "(cached) " >&6
6589 else
6590   pgac_save_CFLAGS=$CFLAGS
6591 pgac_save_CC=$CC
6592 CC=${CLANG}
6593 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6594 ac_save_c_werror_flag=$ac_c_werror_flag
6595 ac_c_werror_flag=yes
6596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6597 /* end confdefs.h.  */
6598
6599 int
6600 main ()
6601 {
6602
6603   ;
6604   return 0;
6605 }
6606 _ACEOF
6607 if ac_fn_c_try_compile "$LINENO"; then :
6608   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6609 else
6610   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6611 fi
6612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6613 ac_c_werror_flag=$ac_save_c_werror_flag
6614 CFLAGS="$pgac_save_CFLAGS"
6615 CC="$pgac_save_CC"
6616 fi
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6618 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6619 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6620   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6621 fi
6622
6623   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6624 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6625 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6626   $as_echo_n "(cached) " >&6
6627 else
6628   pgac_save_CXXFLAGS=$CXXFLAGS
6629 pgac_save_CXX=$CXX
6630 CXX=${CLANGXX}
6631 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6632 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6633 ac_cxx_werror_flag=yes
6634 ac_ext=cpp
6635 ac_cpp='$CXXCPP $CPPFLAGS'
6636 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6637 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6638 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6639
6640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6641 /* end confdefs.h.  */
6642
6643 int
6644 main ()
6645 {
6646
6647   ;
6648   return 0;
6649 }
6650 _ACEOF
6651 if ac_fn_cxx_try_compile "$LINENO"; then :
6652   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6653 else
6654   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6655 fi
6656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6657 ac_ext=c
6658 ac_cpp='$CPP $CPPFLAGS'
6659 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6660 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6661 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6662
6663 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6664 CXXFLAGS="$pgac_save_CXXFLAGS"
6665 CXX="$pgac_save_CXX"
6666 fi
6667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6668 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6669 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6670   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6671 fi
6672
6673   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6674 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6675 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6676   $as_echo_n "(cached) " >&6
6677 else
6678   pgac_save_CFLAGS=$CFLAGS
6679 pgac_save_CC=$CC
6680 CC=${CLANG}
6681 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6682 ac_save_c_werror_flag=$ac_c_werror_flag
6683 ac_c_werror_flag=yes
6684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6685 /* end confdefs.h.  */
6686
6687 int
6688 main ()
6689 {
6690
6691   ;
6692   return 0;
6693 }
6694 _ACEOF
6695 if ac_fn_c_try_compile "$LINENO"; then :
6696   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6697 else
6698   pgac_cv_prog_CLANG_cflags__fwrapv=no
6699 fi
6700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6701 ac_c_werror_flag=$ac_save_c_werror_flag
6702 CFLAGS="$pgac_save_CFLAGS"
6703 CC="$pgac_save_CC"
6704 fi
6705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6706 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6707 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6708   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6709 fi
6710
6711   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6712 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6713 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6714   $as_echo_n "(cached) " >&6
6715 else
6716   pgac_save_CXXFLAGS=$CXXFLAGS
6717 pgac_save_CXX=$CXX
6718 CXX=${CLANGXX}
6719 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6720 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6721 ac_cxx_werror_flag=yes
6722 ac_ext=cpp
6723 ac_cpp='$CXXCPP $CPPFLAGS'
6724 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6725 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6726 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6727
6728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6729 /* end confdefs.h.  */
6730
6731 int
6732 main ()
6733 {
6734
6735   ;
6736   return 0;
6737 }
6738 _ACEOF
6739 if ac_fn_cxx_try_compile "$LINENO"; then :
6740   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6741 else
6742   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6743 fi
6744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6745 ac_ext=c
6746 ac_cpp='$CPP $CPPFLAGS'
6747 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6748 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6749 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6750
6751 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6752 CXXFLAGS="$pgac_save_CXXFLAGS"
6753 CXX="$pgac_save_CXX"
6754 fi
6755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6756 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6757 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6758   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6759 fi
6760
6761   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6762 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6763 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6764   $as_echo_n "(cached) " >&6
6765 else
6766   pgac_save_CFLAGS=$CFLAGS
6767 pgac_save_CC=$CC
6768 CC=${CLANG}
6769 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6770 ac_save_c_werror_flag=$ac_c_werror_flag
6771 ac_c_werror_flag=yes
6772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6773 /* end confdefs.h.  */
6774
6775 int
6776 main ()
6777 {
6778
6779   ;
6780   return 0;
6781 }
6782 _ACEOF
6783 if ac_fn_c_try_compile "$LINENO"; then :
6784   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6785 else
6786   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6787 fi
6788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6789 ac_c_werror_flag=$ac_save_c_werror_flag
6790 CFLAGS="$pgac_save_CFLAGS"
6791 CC="$pgac_save_CC"
6792 fi
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6794 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6795 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6796   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6797 fi
6798
6799   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6800 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6801 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6802   $as_echo_n "(cached) " >&6
6803 else
6804   pgac_save_CXXFLAGS=$CXXFLAGS
6805 pgac_save_CXX=$CXX
6806 CXX=${CLANGXX}
6807 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6808 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6809 ac_cxx_werror_flag=yes
6810 ac_ext=cpp
6811 ac_cpp='$CXXCPP $CPPFLAGS'
6812 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6813 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6814 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6815
6816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6817 /* end confdefs.h.  */
6818
6819 int
6820 main ()
6821 {
6822
6823   ;
6824   return 0;
6825 }
6826 _ACEOF
6827 if ac_fn_cxx_try_compile "$LINENO"; then :
6828   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6829 else
6830   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6831 fi
6832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6833 ac_ext=c
6834 ac_cpp='$CPP $CPPFLAGS'
6835 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6836 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6837 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6838
6839 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6840 CXXFLAGS="$pgac_save_CXXFLAGS"
6841 CXX="$pgac_save_CXX"
6842 fi
6843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6844 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6845 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6846   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6847 fi
6848
6849 fi
6850
6851 # supply -g if --enable-debug
6852 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6853   CFLAGS="$CFLAGS -g"
6854 fi
6855
6856 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6857   CXXFLAGS="$CXXFLAGS -g"
6858 fi
6859
6860 # enable code coverage if --enable-coverage
6861 if test "$enable_coverage" = yes; then
6862   if test "$GCC" = yes; then
6863     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6864     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6865   else
6866     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6867   fi
6868 fi
6869
6870 # enable profiling if --enable-profiling
6871 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6872   if test "$GCC" = yes; then
6873
6874 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6875
6876     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6877     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6878   else
6879     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6880   fi
6881 fi
6882
6883 # We already have this in Makefile.win32, but configure needs it too
6884 if test "$PORTNAME" = "win32"; then
6885   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6886 fi
6887
6888 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6889 # user-specified flags (if any) at the end.  This lets users override
6890 # the automatic additions.
6891 CFLAGS="$CFLAGS $user_CFLAGS"
6892 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6893 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6894 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6895
6896 BITCODE_CFLAGS=$BITCODE_CFLAGS
6897
6898 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6899
6900
6901 # Check if the compiler still works with the final flag settings
6902 # (note, we're not checking that for CXX, which is optional)
6903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6904 $as_echo_n "checking whether the C compiler still works... " >&6; }
6905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6906 /* end confdefs.h.  */
6907
6908 int
6909 main ()
6910 {
6911 return 0;
6912   ;
6913   return 0;
6914 }
6915 _ACEOF
6916 if ac_fn_c_try_link "$LINENO"; then :
6917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6918 $as_echo "yes" >&6; }
6919 else
6920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6921 $as_echo "no" >&6; }
6922    as_fn_error $? "cannot proceed" "$LINENO" 5
6923 fi
6924 rm -f core conftest.err conftest.$ac_objext \
6925     conftest$ac_exeext conftest.$ac_ext
6926
6927 # Defend against gcc -ffast-math
6928 if test "$GCC" = yes; then
6929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6930 /* end confdefs.h.  */
6931
6932 int
6933 main ()
6934 {
6935 #ifdef __FAST_MATH__
6936 choke me
6937 #endif
6938   ;
6939   return 0;
6940 }
6941 _ACEOF
6942 if ac_fn_c_try_compile "$LINENO"; then :
6943
6944 else
6945   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6946 fi
6947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6948 fi
6949
6950 # Defend against clang being used on x86-32 without SSE2 enabled.  As current
6951 # versions of clang do not understand -fexcess-precision=standard, the use of
6952 # x87 floating point operations leads to problems like isinf possibly returning
6953 # false for a value that is infinite when converted from the 80bit register to
6954 # the 8byte memory representation.
6955 #
6956 # Only perform the test if the compiler doesn't understand
6957 # -fexcess-precision=standard, that way a potentially fixed compiler will work
6958 # automatically.
6959 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
6960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6961 /* end confdefs.h.  */
6962
6963 int
6964 main ()
6965 {
6966
6967 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
6968 choke me
6969 #endif
6970
6971   ;
6972   return 0;
6973 }
6974 _ACEOF
6975 if ac_fn_c_try_compile "$LINENO"; then :
6976
6977 else
6978   as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
6979 fi
6980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6981 fi
6982
6983 ac_ext=c
6984 ac_cpp='$CPP $CPPFLAGS'
6985 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6986 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6987 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6989 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6990 # On Suns, sometimes $CPP names a directory.
6991 if test -n "$CPP" && test -d "$CPP"; then
6992   CPP=
6993 fi
6994 if test -z "$CPP"; then
6995   if ${ac_cv_prog_CPP+:} false; then :
6996   $as_echo_n "(cached) " >&6
6997 else
6998       # Double quotes because CPP needs to be expanded
6999     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7000     do
7001       ac_preproc_ok=false
7002 for ac_c_preproc_warn_flag in '' yes
7003 do
7004   # Use a header file that comes with gcc, so configuring glibc
7005   # with a fresh cross-compiler works.
7006   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7007   # <limits.h> exists even on freestanding compilers.
7008   # On the NeXT, cc -E runs the code through the compiler's parser,
7009   # not just through cpp. "Syntax error" is here to catch this case.
7010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7011 /* end confdefs.h.  */
7012 #ifdef __STDC__
7013 # include <limits.h>
7014 #else
7015 # include <assert.h>
7016 #endif
7017                      Syntax error
7018 _ACEOF
7019 if ac_fn_c_try_cpp "$LINENO"; then :
7020
7021 else
7022   # Broken: fails on valid input.
7023 continue
7024 fi
7025 rm -f conftest.err conftest.i conftest.$ac_ext
7026
7027   # OK, works on sane cases.  Now check whether nonexistent headers
7028   # can be detected and how.
7029   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7030 /* end confdefs.h.  */
7031 #include <ac_nonexistent.h>
7032 _ACEOF
7033 if ac_fn_c_try_cpp "$LINENO"; then :
7034   # Broken: success on invalid input.
7035 continue
7036 else
7037   # Passes both tests.
7038 ac_preproc_ok=:
7039 break
7040 fi
7041 rm -f conftest.err conftest.i conftest.$ac_ext
7042
7043 done
7044 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7045 rm -f conftest.i conftest.err conftest.$ac_ext
7046 if $ac_preproc_ok; then :
7047   break
7048 fi
7049
7050     done
7051     ac_cv_prog_CPP=$CPP
7052
7053 fi
7054   CPP=$ac_cv_prog_CPP
7055 else
7056   ac_cv_prog_CPP=$CPP
7057 fi
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7059 $as_echo "$CPP" >&6; }
7060 ac_preproc_ok=false
7061 for ac_c_preproc_warn_flag in '' yes
7062 do
7063   # Use a header file that comes with gcc, so configuring glibc
7064   # with a fresh cross-compiler works.
7065   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7066   # <limits.h> exists even on freestanding compilers.
7067   # On the NeXT, cc -E runs the code through the compiler's parser,
7068   # not just through cpp. "Syntax error" is here to catch this case.
7069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7070 /* end confdefs.h.  */
7071 #ifdef __STDC__
7072 # include <limits.h>
7073 #else
7074 # include <assert.h>
7075 #endif
7076                      Syntax error
7077 _ACEOF
7078 if ac_fn_c_try_cpp "$LINENO"; then :
7079
7080 else
7081   # Broken: fails on valid input.
7082 continue
7083 fi
7084 rm -f conftest.err conftest.i conftest.$ac_ext
7085
7086   # OK, works on sane cases.  Now check whether nonexistent headers
7087   # can be detected and how.
7088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7089 /* end confdefs.h.  */
7090 #include <ac_nonexistent.h>
7091 _ACEOF
7092 if ac_fn_c_try_cpp "$LINENO"; then :
7093   # Broken: success on invalid input.
7094 continue
7095 else
7096   # Passes both tests.
7097 ac_preproc_ok=:
7098 break
7099 fi
7100 rm -f conftest.err conftest.i conftest.$ac_ext
7101
7102 done
7103 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7104 rm -f conftest.i conftest.err conftest.$ac_ext
7105 if $ac_preproc_ok; then :
7106
7107 else
7108   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7109 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7110 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7111 See \`config.log' for more details" "$LINENO" 5; }
7112 fi
7113
7114 ac_ext=c
7115 ac_cpp='$CPP $CPPFLAGS'
7116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7119
7120
7121
7122
7123 #
7124 # Set up TAS assembly code if needed; the template file has now had its
7125 # chance to request this.
7126 #
7127 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7128
7129
7130 if test "$need_tas" = yes ; then
7131   TAS=tas.o
7132 else
7133   TAS=""
7134 fi
7135
7136
7137
7138 #
7139 # Automatic dependency tracking
7140 #
7141
7142
7143 # Check whether --enable-depend was given.
7144 if test "${enable_depend+set}" = set; then :
7145   enableval=$enable_depend;
7146   case $enableval in
7147     yes)
7148       autodepend=yes
7149       ;;
7150     no)
7151       :
7152       ;;
7153     *)
7154       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7155       ;;
7156   esac
7157
7158 else
7159   enable_depend=no
7160
7161 fi
7162
7163
7164
7165
7166
7167 #
7168 # Enable assert checks
7169 #
7170
7171
7172 # Check whether --enable-cassert was given.
7173 if test "${enable_cassert+set}" = set; then :
7174   enableval=$enable_cassert;
7175   case $enableval in
7176     yes)
7177
7178 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7179
7180       ;;
7181     no)
7182       :
7183       ;;
7184     *)
7185       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7186       ;;
7187   esac
7188
7189 else
7190   enable_cassert=no
7191
7192 fi
7193
7194
7195
7196
7197 #
7198 # Include directories
7199 #
7200 ac_save_IFS=$IFS
7201 IFS="${IFS}${PATH_SEPARATOR}"
7202 # SRCH_INC comes from the template file
7203 for dir in $with_includes $SRCH_INC; do
7204   if test -d "$dir"; then
7205     INCLUDES="$INCLUDES -I$dir"
7206   else
7207     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7208 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7209   fi
7210 done
7211 IFS=$ac_save_IFS
7212
7213
7214
7215 #
7216 # Library directories
7217 #
7218 ac_save_IFS=$IFS
7219 IFS="${IFS}${PATH_SEPARATOR}"
7220 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7221 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7222   if test -d "$dir"; then
7223     LIBDIRS="$LIBDIRS -L$dir"
7224   else
7225     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7226 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7227   fi
7228 done
7229 IFS=$ac_save_IFS
7230
7231 #
7232 # Enable thread-safe client libraries
7233 #
7234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7235 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7236
7237
7238 # Check whether --enable-thread-safety was given.
7239 if test "${enable_thread_safety+set}" = set; then :
7240   enableval=$enable_thread_safety;
7241   case $enableval in
7242     yes)
7243       :
7244       ;;
7245     no)
7246       :
7247       ;;
7248     *)
7249       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7250       ;;
7251   esac
7252
7253 else
7254   enable_thread_safety=yes
7255
7256 fi
7257
7258
7259 if test "$enable_thread_safety" = yes; then
7260
7261 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7262
7263 fi
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7265 $as_echo "$enable_thread_safety" >&6; }
7266
7267
7268 #
7269 # ICU
7270 #
7271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7272 $as_echo_n "checking whether to build with ICU support... " >&6; }
7273
7274
7275
7276 # Check whether --with-icu was given.
7277 if test "${with_icu+set}" = set; then :
7278   withval=$with_icu;
7279   case $withval in
7280     yes)
7281
7282 $as_echo "#define USE_ICU 1" >>confdefs.h
7283
7284       ;;
7285     no)
7286       :
7287       ;;
7288     *)
7289       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7290       ;;
7291   esac
7292
7293 else
7294   with_icu=no
7295
7296 fi
7297
7298
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7300 $as_echo "$with_icu" >&6; }
7301
7302
7303 if test "$with_icu" = yes; then
7304
7305
7306
7307
7308
7309
7310
7311 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7312         if test -n "$ac_tool_prefix"; then
7313   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7314 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7316 $as_echo_n "checking for $ac_word... " >&6; }
7317 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7318   $as_echo_n "(cached) " >&6
7319 else
7320   case $PKG_CONFIG in
7321   [\\/]* | ?:[\\/]*)
7322   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7323   ;;
7324   *)
7325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7326 for as_dir in $PATH
7327 do
7328   IFS=$as_save_IFS
7329   test -z "$as_dir" && as_dir=.
7330     for ac_exec_ext in '' $ac_executable_extensions; do
7331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7332     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7334     break 2
7335   fi
7336 done
7337   done
7338 IFS=$as_save_IFS
7339
7340   ;;
7341 esac
7342 fi
7343 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7344 if test -n "$PKG_CONFIG"; then
7345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7346 $as_echo "$PKG_CONFIG" >&6; }
7347 else
7348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7349 $as_echo "no" >&6; }
7350 fi
7351
7352
7353 fi
7354 if test -z "$ac_cv_path_PKG_CONFIG"; then
7355   ac_pt_PKG_CONFIG=$PKG_CONFIG
7356   # Extract the first word of "pkg-config", so it can be a program name with args.
7357 set dummy pkg-config; ac_word=$2
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7359 $as_echo_n "checking for $ac_word... " >&6; }
7360 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7361   $as_echo_n "(cached) " >&6
7362 else
7363   case $ac_pt_PKG_CONFIG in
7364   [\\/]* | ?:[\\/]*)
7365   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7366   ;;
7367   *)
7368   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7369 for as_dir in $PATH
7370 do
7371   IFS=$as_save_IFS
7372   test -z "$as_dir" && as_dir=.
7373     for ac_exec_ext in '' $ac_executable_extensions; do
7374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7375     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7377     break 2
7378   fi
7379 done
7380   done
7381 IFS=$as_save_IFS
7382
7383   ;;
7384 esac
7385 fi
7386 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7387 if test -n "$ac_pt_PKG_CONFIG"; then
7388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7389 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7390 else
7391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7392 $as_echo "no" >&6; }
7393 fi
7394
7395   if test "x$ac_pt_PKG_CONFIG" = x; then
7396     PKG_CONFIG=""
7397   else
7398     case $cross_compiling:$ac_tool_warned in
7399 yes:)
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7401 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7402 ac_tool_warned=yes ;;
7403 esac
7404     PKG_CONFIG=$ac_pt_PKG_CONFIG
7405   fi
7406 else
7407   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7408 fi
7409
7410 fi
7411 if test -n "$PKG_CONFIG"; then
7412         _pkg_min_version=0.9.0
7413         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7414 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7415         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7416                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7417 $as_echo "yes" >&6; }
7418         else
7419                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7420 $as_echo "no" >&6; }
7421                 PKG_CONFIG=""
7422         fi
7423 fi
7424
7425 pkg_failed=no
7426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7427 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7428
7429 if test -n "$ICU_CFLAGS"; then
7430     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7431  elif test -n "$PKG_CONFIG"; then
7432     if test -n "$PKG_CONFIG" && \
7433     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7434   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7435   ac_status=$?
7436   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7437   test $ac_status = 0; }; then
7438   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7439                       test "x$?" != "x0" && pkg_failed=yes
7440 else
7441   pkg_failed=yes
7442 fi
7443  else
7444     pkg_failed=untried
7445 fi
7446 if test -n "$ICU_LIBS"; then
7447     pkg_cv_ICU_LIBS="$ICU_LIBS"
7448  elif test -n "$PKG_CONFIG"; then
7449     if test -n "$PKG_CONFIG" && \
7450     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7451   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7452   ac_status=$?
7453   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7454   test $ac_status = 0; }; then
7455   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7456                       test "x$?" != "x0" && pkg_failed=yes
7457 else
7458   pkg_failed=yes
7459 fi
7460  else
7461     pkg_failed=untried
7462 fi
7463
7464
7465
7466 if test $pkg_failed = yes; then
7467         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468 $as_echo "no" >&6; }
7469
7470 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7471         _pkg_short_errors_supported=yes
7472 else
7473         _pkg_short_errors_supported=no
7474 fi
7475         if test $_pkg_short_errors_supported = yes; then
7476                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7477         else
7478                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7479         fi
7480         # Put the nasty error message in config.log where it belongs
7481         echo "$ICU_PKG_ERRORS" >&5
7482
7483         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7484
7485 $ICU_PKG_ERRORS
7486
7487 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7488 installed software in a non-standard prefix.
7489
7490 Alternatively, you may set the environment variables ICU_CFLAGS
7491 and ICU_LIBS to avoid the need to call pkg-config.
7492 See the pkg-config man page for more details." "$LINENO" 5
7493 elif test $pkg_failed = untried; then
7494         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7495 $as_echo "no" >&6; }
7496         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7497 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7498 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7499 is in your PATH or set the PKG_CONFIG environment variable to the full
7500 path to pkg-config.
7501
7502 Alternatively, you may set the environment variables ICU_CFLAGS
7503 and ICU_LIBS to avoid the need to call pkg-config.
7504 See the pkg-config man page for more details.
7505
7506 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7507 See \`config.log' for more details" "$LINENO" 5; }
7508 else
7509         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7510         ICU_LIBS=$pkg_cv_ICU_LIBS
7511         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7512 $as_echo "yes" >&6; }
7513
7514 fi
7515 fi
7516
7517 #
7518 # Optionally build Tcl modules (PL/Tcl)
7519 #
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7521 $as_echo_n "checking whether to build with Tcl... " >&6; }
7522
7523
7524
7525 # Check whether --with-tcl was given.
7526 if test "${with_tcl+set}" = set; then :
7527   withval=$with_tcl;
7528   case $withval in
7529     yes)
7530       :
7531       ;;
7532     no)
7533       :
7534       ;;
7535     *)
7536       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7537       ;;
7538   esac
7539
7540 else
7541   with_tcl=no
7542
7543 fi
7544
7545
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7547 $as_echo "$with_tcl" >&6; }
7548
7549
7550 # We see if the path to the Tcl/Tk configuration scripts is specified.
7551 # This will override the use of tclsh to find the paths to search.
7552
7553
7554
7555
7556 # Check whether --with-tclconfig was given.
7557 if test "${with_tclconfig+set}" = set; then :
7558   withval=$with_tclconfig;
7559   case $withval in
7560     yes)
7561       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7562       ;;
7563     no)
7564       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7565       ;;
7566     *)
7567
7568       ;;
7569   esac
7570
7571 fi
7572
7573
7574
7575 #
7576 # Optionally build Perl modules (PL/Perl)
7577 #
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7579 $as_echo_n "checking whether to build Perl modules... " >&6; }
7580
7581
7582
7583 # Check whether --with-perl was given.
7584 if test "${with_perl+set}" = set; then :
7585   withval=$with_perl;
7586   case $withval in
7587     yes)
7588       :
7589       ;;
7590     no)
7591       :
7592       ;;
7593     *)
7594       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7595       ;;
7596   esac
7597
7598 else
7599   with_perl=no
7600
7601 fi
7602
7603
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7605 $as_echo "$with_perl" >&6; }
7606
7607
7608 #
7609 # Optionally build Python modules (PL/Python)
7610 #
7611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7612 $as_echo_n "checking whether to build Python modules... " >&6; }
7613
7614
7615
7616 # Check whether --with-python was given.
7617 if test "${with_python+set}" = set; then :
7618   withval=$with_python;
7619   case $withval in
7620     yes)
7621       :
7622       ;;
7623     no)
7624       :
7625       ;;
7626     *)
7627       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7628       ;;
7629   esac
7630
7631 else
7632   with_python=no
7633
7634 fi
7635
7636
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7638 $as_echo "$with_python" >&6; }
7639
7640
7641 #
7642 # GSSAPI
7643 #
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7645 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7646
7647
7648
7649 # Check whether --with-gssapi was given.
7650 if test "${with_gssapi+set}" = set; then :
7651   withval=$with_gssapi;
7652   case $withval in
7653     yes)
7654
7655
7656 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7657
7658   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7659
7660       ;;
7661     no)
7662       :
7663       ;;
7664     *)
7665       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7666       ;;
7667   esac
7668
7669 else
7670   with_gssapi=no
7671
7672 fi
7673
7674
7675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7676 $as_echo "$with_gssapi" >&6; }
7677
7678
7679
7680
7681
7682
7683 #
7684 # Kerberos configuration parameters
7685 #
7686
7687
7688
7689 # Check whether --with-krb-srvnam was given.
7690 if test "${with_krb_srvnam+set}" = set; then :
7691   withval=$with_krb_srvnam;
7692   case $withval in
7693     yes)
7694       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7695       ;;
7696     no)
7697       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7698       ;;
7699     *)
7700
7701       ;;
7702   esac
7703
7704 else
7705   with_krb_srvnam="postgres"
7706 fi
7707
7708
7709
7710
7711 cat >>confdefs.h <<_ACEOF
7712 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7713 _ACEOF
7714
7715
7716
7717 #
7718 # PAM
7719 #
7720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7721 $as_echo_n "checking whether to build with PAM support... " >&6; }
7722
7723
7724
7725 # Check whether --with-pam was given.
7726 if test "${with_pam+set}" = set; then :
7727   withval=$with_pam;
7728   case $withval in
7729     yes)
7730
7731 $as_echo "#define USE_PAM 1" >>confdefs.h
7732
7733       ;;
7734     no)
7735       :
7736       ;;
7737     *)
7738       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7739       ;;
7740   esac
7741
7742 else
7743   with_pam=no
7744
7745 fi
7746
7747
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7749 $as_echo "$with_pam" >&6; }
7750
7751
7752 #
7753 # BSD AUTH
7754 #
7755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7756 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7757
7758
7759
7760 # Check whether --with-bsd-auth was given.
7761 if test "${with_bsd_auth+set}" = set; then :
7762   withval=$with_bsd_auth;
7763   case $withval in
7764     yes)
7765
7766 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7767
7768       ;;
7769     no)
7770       :
7771       ;;
7772     *)
7773       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7774       ;;
7775   esac
7776
7777 else
7778   with_bsd_auth=no
7779
7780 fi
7781
7782
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7784 $as_echo "$with_bsd_auth" >&6; }
7785
7786
7787 #
7788 # LDAP
7789 #
7790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7791 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7792
7793
7794
7795 # Check whether --with-ldap was given.
7796 if test "${with_ldap+set}" = set; then :
7797   withval=$with_ldap;
7798   case $withval in
7799     yes)
7800
7801 $as_echo "#define USE_LDAP 1" >>confdefs.h
7802
7803       ;;
7804     no)
7805       :
7806       ;;
7807     *)
7808       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7809       ;;
7810   esac
7811
7812 else
7813   with_ldap=no
7814
7815 fi
7816
7817
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7819 $as_echo "$with_ldap" >&6; }
7820
7821
7822
7823 #
7824 # Bonjour
7825 #
7826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7827 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7828
7829
7830
7831 # Check whether --with-bonjour was given.
7832 if test "${with_bonjour+set}" = set; then :
7833   withval=$with_bonjour;
7834   case $withval in
7835     yes)
7836
7837 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7838
7839       ;;
7840     no)
7841       :
7842       ;;
7843     *)
7844       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7845       ;;
7846   esac
7847
7848 else
7849   with_bonjour=no
7850
7851 fi
7852
7853
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7855 $as_echo "$with_bonjour" >&6; }
7856
7857
7858 #
7859 # OpenSSL
7860 #
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7862 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7863
7864
7865
7866 # Check whether --with-openssl was given.
7867 if test "${with_openssl+set}" = set; then :
7868   withval=$with_openssl;
7869   case $withval in
7870     yes)
7871
7872 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7873
7874       ;;
7875     no)
7876       :
7877       ;;
7878     *)
7879       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7880       ;;
7881   esac
7882
7883 else
7884   with_openssl=no
7885
7886 fi
7887
7888
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7890 $as_echo "$with_openssl" >&6; }
7891
7892
7893 #
7894 # SELinux
7895 #
7896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7897 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7898
7899
7900
7901 # Check whether --with-selinux was given.
7902 if test "${with_selinux+set}" = set; then :
7903   withval=$with_selinux;
7904   case $withval in
7905     yes)
7906       :
7907       ;;
7908     no)
7909       :
7910       ;;
7911     *)
7912       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7913       ;;
7914   esac
7915
7916 else
7917   with_selinux=no
7918
7919 fi
7920
7921
7922
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7924 $as_echo "$with_selinux" >&6; }
7925
7926 #
7927 # Systemd
7928 #
7929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7930 $as_echo_n "checking whether to build with systemd support... " >&6; }
7931
7932
7933
7934 # Check whether --with-systemd was given.
7935 if test "${with_systemd+set}" = set; then :
7936   withval=$with_systemd;
7937   case $withval in
7938     yes)
7939
7940 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7941
7942       ;;
7943     no)
7944       :
7945       ;;
7946     *)
7947       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7948       ;;
7949   esac
7950
7951 else
7952   with_systemd=no
7953
7954 fi
7955
7956
7957
7958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7959 $as_echo "$with_systemd" >&6; }
7960
7961 #
7962 # Readline
7963 #
7964
7965
7966
7967 # Check whether --with-readline was given.
7968 if test "${with_readline+set}" = set; then :
7969   withval=$with_readline;
7970   case $withval in
7971     yes)
7972       :
7973       ;;
7974     no)
7975       :
7976       ;;
7977     *)
7978       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7979       ;;
7980   esac
7981
7982 else
7983   with_readline=yes
7984
7985 fi
7986
7987
7988 # readline on MinGW has problems with backslashes in psql and other bugs.
7989 # This is particularly a problem with non-US code pages.
7990 # Therefore disable its use until we understand the cause. 2004-07-20
7991 if test "$PORTNAME" = "win32"; then
7992   if test "$with_readline" = yes; then
7993     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
7994 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
7995     with_readline=no
7996   fi
7997 fi
7998
7999
8000 #
8001 # Prefer libedit
8002 #
8003
8004
8005
8006 # Check whether --with-libedit-preferred was given.
8007 if test "${with_libedit_preferred+set}" = set; then :
8008   withval=$with_libedit_preferred;
8009   case $withval in
8010     yes)
8011       :
8012       ;;
8013     no)
8014       :
8015       ;;
8016     *)
8017       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8018       ;;
8019   esac
8020
8021 else
8022   with_libedit_preferred=no
8023
8024 fi
8025
8026
8027
8028
8029 #
8030 # UUID library
8031 #
8032 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8033 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8034 # UUID library.  More than one of these might be present on a given platform,
8035 # so we make the user say which one she wants.
8036 #
8037
8038
8039
8040 # Check whether --with-uuid was given.
8041 if test "${with_uuid+set}" = set; then :
8042   withval=$with_uuid;
8043   case $withval in
8044     yes)
8045       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8046       ;;
8047     no)
8048       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8049       ;;
8050     *)
8051
8052       ;;
8053   esac
8054
8055 fi
8056
8057
8058 if test x"$with_uuid" = x"" ; then
8059   with_uuid=no
8060 fi
8061
8062
8063
8064 # Check whether --with-ossp-uuid was given.
8065 if test "${with_ossp_uuid+set}" = set; then :
8066   withval=$with_ossp_uuid;
8067   case $withval in
8068     yes)
8069       :
8070       ;;
8071     no)
8072       :
8073       ;;
8074     *)
8075       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8076       ;;
8077   esac
8078
8079 else
8080   with_ossp_uuid=no
8081
8082 fi
8083
8084
8085 if test "$with_ossp_uuid" = yes ; then
8086   with_uuid=ossp
8087 fi
8088
8089 if test "$with_uuid" = bsd ; then
8090
8091 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8092
8093   UUID_EXTRA_OBJS="md5.o sha1.o"
8094 elif test "$with_uuid" = e2fs ; then
8095
8096 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8097
8098   UUID_EXTRA_OBJS="md5.o sha1.o"
8099 elif test "$with_uuid" = ossp ; then
8100
8101 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8102
8103   UUID_EXTRA_OBJS=""
8104 elif test "$with_uuid" = no ; then
8105   UUID_EXTRA_OBJS=""
8106 else
8107   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8108 fi
8109
8110
8111
8112
8113 #
8114 # XML
8115 #
8116
8117
8118
8119 # Check whether --with-libxml was given.
8120 if test "${with_libxml+set}" = set; then :
8121   withval=$with_libxml;
8122   case $withval in
8123     yes)
8124
8125 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8126
8127       ;;
8128     no)
8129       :
8130       ;;
8131     *)
8132       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8133       ;;
8134   esac
8135
8136 else
8137   with_libxml=no
8138
8139 fi
8140
8141
8142
8143 if test "$with_libxml" = yes ; then
8144   if test -z "$XML2_CONFIG"; then
8145   for ac_prog in xml2-config
8146 do
8147   # Extract the first word of "$ac_prog", so it can be a program name with args.
8148 set dummy $ac_prog; ac_word=$2
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8150 $as_echo_n "checking for $ac_word... " >&6; }
8151 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8152   $as_echo_n "(cached) " >&6
8153 else
8154   case $XML2_CONFIG in
8155   [\\/]* | ?:[\\/]*)
8156   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8157   ;;
8158   *)
8159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8160 for as_dir in $PATH
8161 do
8162   IFS=$as_save_IFS
8163   test -z "$as_dir" && as_dir=.
8164     for ac_exec_ext in '' $ac_executable_extensions; do
8165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8166     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8168     break 2
8169   fi
8170 done
8171   done
8172 IFS=$as_save_IFS
8173
8174   ;;
8175 esac
8176 fi
8177 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8178 if test -n "$XML2_CONFIG"; then
8179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8180 $as_echo "$XML2_CONFIG" >&6; }
8181 else
8182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8183 $as_echo "no" >&6; }
8184 fi
8185
8186
8187   test -n "$XML2_CONFIG" && break
8188 done
8189
8190 else
8191   # Report the value of XML2_CONFIG in configure's output in all cases.
8192   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8193 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8195 $as_echo "$XML2_CONFIG" >&6; }
8196 fi
8197
8198     if test -n "$XML2_CONFIG"; then
8199     for pgac_option in `$XML2_CONFIG --cflags`; do
8200       case $pgac_option in
8201         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8202       esac
8203     done
8204     for pgac_option in `$XML2_CONFIG --libs`; do
8205       case $pgac_option in
8206         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8207       esac
8208     done
8209   fi
8210 fi
8211
8212
8213
8214 #
8215 # XSLT
8216 #
8217
8218
8219
8220 # Check whether --with-libxslt was given.
8221 if test "${with_libxslt+set}" = set; then :
8222   withval=$with_libxslt;
8223   case $withval in
8224     yes)
8225
8226 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8227
8228       ;;
8229     no)
8230       :
8231       ;;
8232     *)
8233       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8234       ;;
8235   esac
8236
8237 else
8238   with_libxslt=no
8239
8240 fi
8241
8242
8243
8244
8245
8246
8247 #
8248 # tzdata
8249 #
8250
8251
8252
8253 # Check whether --with-system-tzdata was given.
8254 if test "${with_system_tzdata+set}" = set; then :
8255   withval=$with_system_tzdata;
8256   case $withval in
8257     yes)
8258       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8259       ;;
8260     no)
8261       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8262       ;;
8263     *)
8264
8265       ;;
8266   esac
8267
8268 fi
8269
8270
8271
8272
8273 #
8274 # Zlib
8275 #
8276
8277
8278
8279 # Check whether --with-zlib was given.
8280 if test "${with_zlib+set}" = set; then :
8281   withval=$with_zlib;
8282   case $withval in
8283     yes)
8284       :
8285       ;;
8286     no)
8287       :
8288       ;;
8289     *)
8290       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8291       ;;
8292   esac
8293
8294 else
8295   with_zlib=yes
8296
8297 fi
8298
8299
8300
8301
8302 #
8303 # Elf
8304 #
8305
8306 # Assume system is ELF if it predefines __ELF__ as 1,
8307 # otherwise believe host_os based default.
8308 case $host_os in
8309     freebsd1*|freebsd2*) elf=no;;
8310     freebsd3*|freebsd4*) elf=yes;;
8311 esac
8312
8313
8314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8315 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8316 if ${ac_cv_path_GREP+:} false; then :
8317   $as_echo_n "(cached) " >&6
8318 else
8319   if test -z "$GREP"; then
8320   ac_path_GREP_found=false
8321   # Loop through the user's path and test for each of PROGNAME-LIST
8322   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8323 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8324 do
8325   IFS=$as_save_IFS
8326   test -z "$as_dir" && as_dir=.
8327     for ac_prog in grep ggrep; do
8328     for ac_exec_ext in '' $ac_executable_extensions; do
8329       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8330       as_fn_executable_p "$ac_path_GREP" || continue
8331 # Check for GNU ac_path_GREP and select it if it is found.
8332   # Check for GNU $ac_path_GREP
8333 case `"$ac_path_GREP" --version 2>&1` in
8334 *GNU*)
8335   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8336 *)
8337   ac_count=0
8338   $as_echo_n 0123456789 >"conftest.in"
8339   while :
8340   do
8341     cat "conftest.in" "conftest.in" >"conftest.tmp"
8342     mv "conftest.tmp" "conftest.in"
8343     cp "conftest.in" "conftest.nl"
8344     $as_echo 'GREP' >> "conftest.nl"
8345     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8346     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8347     as_fn_arith $ac_count + 1 && ac_count=$as_val
8348     if test $ac_count -gt ${ac_path_GREP_max-0}; then
8349       # Best one so far, save it but keep looking for a better one
8350       ac_cv_path_GREP="$ac_path_GREP"
8351       ac_path_GREP_max=$ac_count
8352     fi
8353     # 10*(2^10) chars as input seems more than enough
8354     test $ac_count -gt 10 && break
8355   done
8356   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8357 esac
8358
8359       $ac_path_GREP_found && break 3
8360     done
8361   done
8362   done
8363 IFS=$as_save_IFS
8364   if test -z "$ac_cv_path_GREP"; then
8365     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8366   fi
8367 else
8368   ac_cv_path_GREP=$GREP
8369 fi
8370
8371 fi
8372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8373 $as_echo "$ac_cv_path_GREP" >&6; }
8374  GREP="$ac_cv_path_GREP"
8375
8376
8377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8378 $as_echo_n "checking for egrep... " >&6; }
8379 if ${ac_cv_path_EGREP+:} false; then :
8380   $as_echo_n "(cached) " >&6
8381 else
8382   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8383    then ac_cv_path_EGREP="$GREP -E"
8384    else
8385      if test -z "$EGREP"; then
8386   ac_path_EGREP_found=false
8387   # Loop through the user's path and test for each of PROGNAME-LIST
8388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8389 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8390 do
8391   IFS=$as_save_IFS
8392   test -z "$as_dir" && as_dir=.
8393     for ac_prog in egrep; do
8394     for ac_exec_ext in '' $ac_executable_extensions; do
8395       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8396       as_fn_executable_p "$ac_path_EGREP" || continue
8397 # Check for GNU ac_path_EGREP and select it if it is found.
8398   # Check for GNU $ac_path_EGREP
8399 case `"$ac_path_EGREP" --version 2>&1` in
8400 *GNU*)
8401   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8402 *)
8403   ac_count=0
8404   $as_echo_n 0123456789 >"conftest.in"
8405   while :
8406   do
8407     cat "conftest.in" "conftest.in" >"conftest.tmp"
8408     mv "conftest.tmp" "conftest.in"
8409     cp "conftest.in" "conftest.nl"
8410     $as_echo 'EGREP' >> "conftest.nl"
8411     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8412     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8413     as_fn_arith $ac_count + 1 && ac_count=$as_val
8414     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8415       # Best one so far, save it but keep looking for a better one
8416       ac_cv_path_EGREP="$ac_path_EGREP"
8417       ac_path_EGREP_max=$ac_count
8418     fi
8419     # 10*(2^10) chars as input seems more than enough
8420     test $ac_count -gt 10 && break
8421   done
8422   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8423 esac
8424
8425       $ac_path_EGREP_found && break 3
8426     done
8427   done
8428   done
8429 IFS=$as_save_IFS
8430   if test -z "$ac_cv_path_EGREP"; then
8431     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8432   fi
8433 else
8434   ac_cv_path_EGREP=$EGREP
8435 fi
8436
8437    fi
8438 fi
8439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8440 $as_echo "$ac_cv_path_EGREP" >&6; }
8441  EGREP="$ac_cv_path_EGREP"
8442
8443
8444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8445 /* end confdefs.h.  */
8446 #if __ELF__
8447   yes
8448 #endif
8449
8450 _ACEOF
8451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8452   $EGREP "yes" >/dev/null 2>&1; then :
8453   ELF_SYS=true
8454 else
8455   if test "X$elf" = "Xyes" ; then
8456   ELF_SYS=true
8457 else
8458   ELF_SYS=
8459 fi
8460 fi
8461 rm -f conftest*
8462
8463
8464
8465 #
8466 # Assignments
8467 #
8468
8469 CPPFLAGS="$CPPFLAGS $INCLUDES"
8470 LDFLAGS="$LDFLAGS $LIBDIRS"
8471
8472
8473
8474
8475
8476 # Check whether --with-gnu-ld was given.
8477 if test "${with_gnu_ld+set}" = set; then :
8478   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8479 else
8480   with_gnu_ld=no
8481 fi
8482
8483 ac_prog=ld
8484 if test "$GCC" = yes; then
8485   # Check if gcc -print-prog-name=ld gives a path.
8486   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8487 $as_echo_n "checking for ld used by GCC... " >&6; }
8488   case $host in
8489   *-*-mingw*)
8490     # gcc leaves a trailing carriage return which upsets mingw
8491     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8492   *)
8493     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8494   esac
8495   case "$ac_prog" in
8496     # Accept absolute paths.
8497     [\\/]* | [A-Za-z]:[\\/]*)
8498       re_direlt='/[^/][^/]*/\.\./'
8499       # Canonicalize the path of ld
8500       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8501       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8502         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8503       done
8504       test -z "$LD" && LD="$ac_prog"
8505       ;;
8506   "")
8507     # If it fails, then pretend we aren't using GCC.
8508     ac_prog=ld
8509     ;;
8510   *)
8511     # If it is relative, then search for the first ld in PATH.
8512     with_gnu_ld=unknown
8513     ;;
8514   esac
8515 elif test "$with_gnu_ld" = yes; then
8516   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8517 $as_echo_n "checking for GNU ld... " >&6; }
8518 else
8519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8520 $as_echo_n "checking for non-GNU ld... " >&6; }
8521 fi
8522 if ${ac_cv_path_LD+:} false; then :
8523   $as_echo_n "(cached) " >&6
8524 else
8525   if test -z "$LD"; then
8526   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8527   for ac_dir in $PATH; do
8528     test -z "$ac_dir" && ac_dir=.
8529     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8530       ac_cv_path_LD="$ac_dir/$ac_prog"
8531       # Check to see if the program is GNU ld.  I'd rather use --version,
8532       # but apparently some GNU ld's only accept -v.
8533       # Break only if it was the GNU/non-GNU ld that we prefer.
8534       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8535         test "$with_gnu_ld" != no && break
8536       else
8537         test "$with_gnu_ld" != yes && break
8538       fi
8539     fi
8540   done
8541   IFS="$ac_save_ifs"
8542 else
8543   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8544 fi
8545 fi
8546
8547 LD="$ac_cv_path_LD"
8548 if test -n "$LD"; then
8549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8550 $as_echo "$LD" >&6; }
8551 else
8552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8553 $as_echo "no" >&6; }
8554 fi
8555 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8557 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8558 if ${ac_cv_prog_gnu_ld+:} false; then :
8559   $as_echo_n "(cached) " >&6
8560 else
8561   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8562 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8563   ac_cv_prog_gnu_ld=yes
8564 else
8565   ac_cv_prog_gnu_ld=no
8566 fi
8567 fi
8568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8569 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8570 with_gnu_ld=$ac_cv_prog_gnu_ld
8571
8572
8573
8574
8575 if test -n "$ac_tool_prefix"; then
8576   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8577 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8579 $as_echo_n "checking for $ac_word... " >&6; }
8580 if ${ac_cv_prog_RANLIB+:} false; then :
8581   $as_echo_n "(cached) " >&6
8582 else
8583   if test -n "$RANLIB"; then
8584   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8585 else
8586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8587 for as_dir in $PATH
8588 do
8589   IFS=$as_save_IFS
8590   test -z "$as_dir" && as_dir=.
8591     for ac_exec_ext in '' $ac_executable_extensions; do
8592   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8593     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8594     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8595     break 2
8596   fi
8597 done
8598   done
8599 IFS=$as_save_IFS
8600
8601 fi
8602 fi
8603 RANLIB=$ac_cv_prog_RANLIB
8604 if test -n "$RANLIB"; then
8605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8606 $as_echo "$RANLIB" >&6; }
8607 else
8608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8609 $as_echo "no" >&6; }
8610 fi
8611
8612
8613 fi
8614 if test -z "$ac_cv_prog_RANLIB"; then
8615   ac_ct_RANLIB=$RANLIB
8616   # Extract the first word of "ranlib", so it can be a program name with args.
8617 set dummy ranlib; ac_word=$2
8618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8619 $as_echo_n "checking for $ac_word... " >&6; }
8620 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8621   $as_echo_n "(cached) " >&6
8622 else
8623   if test -n "$ac_ct_RANLIB"; then
8624   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8625 else
8626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8627 for as_dir in $PATH
8628 do
8629   IFS=$as_save_IFS
8630   test -z "$as_dir" && as_dir=.
8631     for ac_exec_ext in '' $ac_executable_extensions; do
8632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8633     ac_cv_prog_ac_ct_RANLIB="ranlib"
8634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8635     break 2
8636   fi
8637 done
8638   done
8639 IFS=$as_save_IFS
8640
8641 fi
8642 fi
8643 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8644 if test -n "$ac_ct_RANLIB"; then
8645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8646 $as_echo "$ac_ct_RANLIB" >&6; }
8647 else
8648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8649 $as_echo "no" >&6; }
8650 fi
8651
8652   if test "x$ac_ct_RANLIB" = x; then
8653     RANLIB=":"
8654   else
8655     case $cross_compiling:$ac_tool_warned in
8656 yes:)
8657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8658 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8659 ac_tool_warned=yes ;;
8660 esac
8661     RANLIB=$ac_ct_RANLIB
8662   fi
8663 else
8664   RANLIB="$ac_cv_prog_RANLIB"
8665 fi
8666
8667
8668   if test -n "$ac_tool_prefix"; then
8669   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8670 set dummy ${ac_tool_prefix}strip; ac_word=$2
8671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8672 $as_echo_n "checking for $ac_word... " >&6; }
8673 if ${ac_cv_prog_STRIP+:} false; then :
8674   $as_echo_n "(cached) " >&6
8675 else
8676   if test -n "$STRIP"; then
8677   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8678 else
8679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8680 for as_dir in $PATH
8681 do
8682   IFS=$as_save_IFS
8683   test -z "$as_dir" && as_dir=.
8684     for ac_exec_ext in '' $ac_executable_extensions; do
8685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8686     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8688     break 2
8689   fi
8690 done
8691   done
8692 IFS=$as_save_IFS
8693
8694 fi
8695 fi
8696 STRIP=$ac_cv_prog_STRIP
8697 if test -n "$STRIP"; then
8698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8699 $as_echo "$STRIP" >&6; }
8700 else
8701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8702 $as_echo "no" >&6; }
8703 fi
8704
8705
8706 fi
8707 if test -z "$ac_cv_prog_STRIP"; then
8708   ac_ct_STRIP=$STRIP
8709   # Extract the first word of "strip", so it can be a program name with args.
8710 set dummy strip; ac_word=$2
8711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8712 $as_echo_n "checking for $ac_word... " >&6; }
8713 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8714   $as_echo_n "(cached) " >&6
8715 else
8716   if test -n "$ac_ct_STRIP"; then
8717   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8718 else
8719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8720 for as_dir in $PATH
8721 do
8722   IFS=$as_save_IFS
8723   test -z "$as_dir" && as_dir=.
8724     for ac_exec_ext in '' $ac_executable_extensions; do
8725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8726     ac_cv_prog_ac_ct_STRIP="strip"
8727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8728     break 2
8729   fi
8730 done
8731   done
8732 IFS=$as_save_IFS
8733
8734 fi
8735 fi
8736 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8737 if test -n "$ac_ct_STRIP"; then
8738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8739 $as_echo "$ac_ct_STRIP" >&6; }
8740 else
8741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8742 $as_echo "no" >&6; }
8743 fi
8744
8745   if test "x$ac_ct_STRIP" = x; then
8746     STRIP=":"
8747   else
8748     case $cross_compiling:$ac_tool_warned in
8749 yes:)
8750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8751 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8752 ac_tool_warned=yes ;;
8753 esac
8754     STRIP=$ac_ct_STRIP
8755   fi
8756 else
8757   STRIP="$ac_cv_prog_STRIP"
8758 fi
8759
8760
8761   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8762 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8763   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8764     STRIP_STATIC_LIB="$STRIP -x"
8765     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8766     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8767 $as_echo "yes" >&6; }
8768   else
8769     case $host_os in
8770       darwin*)
8771         STRIP="$STRIP -x"
8772         STRIP_STATIC_LIB=$STRIP
8773         STRIP_SHARED_LIB=$STRIP
8774         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8775 $as_echo "yes" >&6; }
8776         ;;
8777       *)
8778         STRIP_STATIC_LIB=:
8779         STRIP_SHARED_LIB=:
8780         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8781 $as_echo "no" >&6; }
8782         ;;
8783     esac
8784   fi
8785
8786
8787
8788 if test -n "$ac_tool_prefix"; then
8789   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8790 set dummy ${ac_tool_prefix}ar; ac_word=$2
8791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8792 $as_echo_n "checking for $ac_word... " >&6; }
8793 if ${ac_cv_prog_AR+:} false; then :
8794   $as_echo_n "(cached) " >&6
8795 else
8796   if test -n "$AR"; then
8797   ac_cv_prog_AR="$AR" # Let the user override the test.
8798 else
8799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8800 for as_dir in $PATH
8801 do
8802   IFS=$as_save_IFS
8803   test -z "$as_dir" && as_dir=.
8804     for ac_exec_ext in '' $ac_executable_extensions; do
8805   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8806     ac_cv_prog_AR="${ac_tool_prefix}ar"
8807     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8808     break 2
8809   fi
8810 done
8811   done
8812 IFS=$as_save_IFS
8813
8814 fi
8815 fi
8816 AR=$ac_cv_prog_AR
8817 if test -n "$AR"; then
8818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8819 $as_echo "$AR" >&6; }
8820 else
8821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8822 $as_echo "no" >&6; }
8823 fi
8824
8825
8826 fi
8827 if test -z "$ac_cv_prog_AR"; then
8828   ac_ct_AR=$AR
8829   # Extract the first word of "ar", so it can be a program name with args.
8830 set dummy ar; ac_word=$2
8831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8832 $as_echo_n "checking for $ac_word... " >&6; }
8833 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8834   $as_echo_n "(cached) " >&6
8835 else
8836   if test -n "$ac_ct_AR"; then
8837   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8838 else
8839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8840 for as_dir in $PATH
8841 do
8842   IFS=$as_save_IFS
8843   test -z "$as_dir" && as_dir=.
8844     for ac_exec_ext in '' $ac_executable_extensions; do
8845   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8846     ac_cv_prog_ac_ct_AR="ar"
8847     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8848     break 2
8849   fi
8850 done
8851   done
8852 IFS=$as_save_IFS
8853
8854 fi
8855 fi
8856 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8857 if test -n "$ac_ct_AR"; then
8858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8859 $as_echo "$ac_ct_AR" >&6; }
8860 else
8861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8862 $as_echo "no" >&6; }
8863 fi
8864
8865   if test "x$ac_ct_AR" = x; then
8866     AR="ar"
8867   else
8868     case $cross_compiling:$ac_tool_warned in
8869 yes:)
8870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8871 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8872 ac_tool_warned=yes ;;
8873 esac
8874     AR=$ac_ct_AR
8875   fi
8876 else
8877   AR="$ac_cv_prog_AR"
8878 fi
8879
8880 if test "$PORTNAME" = "win32"; then
8881   if test -n "$ac_tool_prefix"; then
8882   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8883 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8885 $as_echo_n "checking for $ac_word... " >&6; }
8886 if ${ac_cv_prog_DLLTOOL+:} false; then :
8887   $as_echo_n "(cached) " >&6
8888 else
8889   if test -n "$DLLTOOL"; then
8890   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8891 else
8892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8893 for as_dir in $PATH
8894 do
8895   IFS=$as_save_IFS
8896   test -z "$as_dir" && as_dir=.
8897     for ac_exec_ext in '' $ac_executable_extensions; do
8898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8899     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8901     break 2
8902   fi
8903 done
8904   done
8905 IFS=$as_save_IFS
8906
8907 fi
8908 fi
8909 DLLTOOL=$ac_cv_prog_DLLTOOL
8910 if test -n "$DLLTOOL"; then
8911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8912 $as_echo "$DLLTOOL" >&6; }
8913 else
8914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8915 $as_echo "no" >&6; }
8916 fi
8917
8918
8919 fi
8920 if test -z "$ac_cv_prog_DLLTOOL"; then
8921   ac_ct_DLLTOOL=$DLLTOOL
8922   # Extract the first word of "dlltool", so it can be a program name with args.
8923 set dummy dlltool; ac_word=$2
8924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8925 $as_echo_n "checking for $ac_word... " >&6; }
8926 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8927   $as_echo_n "(cached) " >&6
8928 else
8929   if test -n "$ac_ct_DLLTOOL"; then
8930   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8931 else
8932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8933 for as_dir in $PATH
8934 do
8935   IFS=$as_save_IFS
8936   test -z "$as_dir" && as_dir=.
8937     for ac_exec_ext in '' $ac_executable_extensions; do
8938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8939     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8941     break 2
8942   fi
8943 done
8944   done
8945 IFS=$as_save_IFS
8946
8947 fi
8948 fi
8949 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8950 if test -n "$ac_ct_DLLTOOL"; then
8951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8952 $as_echo "$ac_ct_DLLTOOL" >&6; }
8953 else
8954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8955 $as_echo "no" >&6; }
8956 fi
8957
8958   if test "x$ac_ct_DLLTOOL" = x; then
8959     DLLTOOL="dlltool"
8960   else
8961     case $cross_compiling:$ac_tool_warned in
8962 yes:)
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8964 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8965 ac_tool_warned=yes ;;
8966 esac
8967     DLLTOOL=$ac_ct_DLLTOOL
8968   fi
8969 else
8970   DLLTOOL="$ac_cv_prog_DLLTOOL"
8971 fi
8972
8973   if test -n "$ac_tool_prefix"; then
8974   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8975 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8977 $as_echo_n "checking for $ac_word... " >&6; }
8978 if ${ac_cv_prog_DLLWRAP+:} false; then :
8979   $as_echo_n "(cached) " >&6
8980 else
8981   if test -n "$DLLWRAP"; then
8982   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
8983 else
8984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8985 for as_dir in $PATH
8986 do
8987   IFS=$as_save_IFS
8988   test -z "$as_dir" && as_dir=.
8989     for ac_exec_ext in '' $ac_executable_extensions; do
8990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8991     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
8992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8993     break 2
8994   fi
8995 done
8996   done
8997 IFS=$as_save_IFS
8998
8999 fi
9000 fi
9001 DLLWRAP=$ac_cv_prog_DLLWRAP
9002 if test -n "$DLLWRAP"; then
9003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9004 $as_echo "$DLLWRAP" >&6; }
9005 else
9006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9007 $as_echo "no" >&6; }
9008 fi
9009
9010
9011 fi
9012 if test -z "$ac_cv_prog_DLLWRAP"; then
9013   ac_ct_DLLWRAP=$DLLWRAP
9014   # Extract the first word of "dllwrap", so it can be a program name with args.
9015 set dummy dllwrap; ac_word=$2
9016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9017 $as_echo_n "checking for $ac_word... " >&6; }
9018 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9019   $as_echo_n "(cached) " >&6
9020 else
9021   if test -n "$ac_ct_DLLWRAP"; then
9022   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9023 else
9024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9025 for as_dir in $PATH
9026 do
9027   IFS=$as_save_IFS
9028   test -z "$as_dir" && as_dir=.
9029     for ac_exec_ext in '' $ac_executable_extensions; do
9030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9031     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9033     break 2
9034   fi
9035 done
9036   done
9037 IFS=$as_save_IFS
9038
9039 fi
9040 fi
9041 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9042 if test -n "$ac_ct_DLLWRAP"; then
9043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9044 $as_echo "$ac_ct_DLLWRAP" >&6; }
9045 else
9046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9047 $as_echo "no" >&6; }
9048 fi
9049
9050   if test "x$ac_ct_DLLWRAP" = x; then
9051     DLLWRAP="dllwrap"
9052   else
9053     case $cross_compiling:$ac_tool_warned in
9054 yes:)
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9056 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9057 ac_tool_warned=yes ;;
9058 esac
9059     DLLWRAP=$ac_ct_DLLWRAP
9060   fi
9061 else
9062   DLLWRAP="$ac_cv_prog_DLLWRAP"
9063 fi
9064
9065   if test -n "$ac_tool_prefix"; then
9066   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9067 set dummy ${ac_tool_prefix}windres; ac_word=$2
9068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9069 $as_echo_n "checking for $ac_word... " >&6; }
9070 if ${ac_cv_prog_WINDRES+:} false; then :
9071   $as_echo_n "(cached) " >&6
9072 else
9073   if test -n "$WINDRES"; then
9074   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9075 else
9076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9077 for as_dir in $PATH
9078 do
9079   IFS=$as_save_IFS
9080   test -z "$as_dir" && as_dir=.
9081     for ac_exec_ext in '' $ac_executable_extensions; do
9082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9083     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9085     break 2
9086   fi
9087 done
9088   done
9089 IFS=$as_save_IFS
9090
9091 fi
9092 fi
9093 WINDRES=$ac_cv_prog_WINDRES
9094 if test -n "$WINDRES"; then
9095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9096 $as_echo "$WINDRES" >&6; }
9097 else
9098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9099 $as_echo "no" >&6; }
9100 fi
9101
9102
9103 fi
9104 if test -z "$ac_cv_prog_WINDRES"; then
9105   ac_ct_WINDRES=$WINDRES
9106   # Extract the first word of "windres", so it can be a program name with args.
9107 set dummy windres; ac_word=$2
9108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9109 $as_echo_n "checking for $ac_word... " >&6; }
9110 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9111   $as_echo_n "(cached) " >&6
9112 else
9113   if test -n "$ac_ct_WINDRES"; then
9114   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9115 else
9116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9117 for as_dir in $PATH
9118 do
9119   IFS=$as_save_IFS
9120   test -z "$as_dir" && as_dir=.
9121     for ac_exec_ext in '' $ac_executable_extensions; do
9122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9123     ac_cv_prog_ac_ct_WINDRES="windres"
9124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9125     break 2
9126   fi
9127 done
9128   done
9129 IFS=$as_save_IFS
9130
9131 fi
9132 fi
9133 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9134 if test -n "$ac_ct_WINDRES"; then
9135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9136 $as_echo "$ac_ct_WINDRES" >&6; }
9137 else
9138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9139 $as_echo "no" >&6; }
9140 fi
9141
9142   if test "x$ac_ct_WINDRES" = x; then
9143     WINDRES="windres"
9144   else
9145     case $cross_compiling:$ac_tool_warned in
9146 yes:)
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9148 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9149 ac_tool_warned=yes ;;
9150 esac
9151     WINDRES=$ac_ct_WINDRES
9152   fi
9153 else
9154   WINDRES="$ac_cv_prog_WINDRES"
9155 fi
9156
9157 fi
9158
9159 # Find a good install program.  We prefer a C program (faster),
9160 # so one script is as good as another.  But avoid the broken or
9161 # incompatible versions:
9162 # SysV /etc/install, /usr/sbin/install
9163 # SunOS /usr/etc/install
9164 # IRIX /sbin/install
9165 # AIX /bin/install
9166 # AmigaOS /C/install, which installs bootblocks on floppy discs
9167 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9168 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9169 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9170 # OS/2's system install, which has a completely different semantic
9171 # ./install, which can be erroneously created by make from ./install.sh.
9172 # Reject install programs that cannot install multiple files.
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9174 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9175 if test -z "$INSTALL"; then
9176 if ${ac_cv_path_install+:} false; then :
9177   $as_echo_n "(cached) " >&6
9178 else
9179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9180 for as_dir in $PATH
9181 do
9182   IFS=$as_save_IFS
9183   test -z "$as_dir" && as_dir=.
9184     # Account for people who put trailing slashes in PATH elements.
9185 case $as_dir/ in #((
9186   ./ | .// | /[cC]/* | \
9187   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9188   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9189   /usr/ucb/* ) ;;
9190   *)
9191     # OSF1 and SCO ODT 3.0 have their own names for install.
9192     # Don't use installbsd from OSF since it installs stuff as root
9193     # by default.
9194     for ac_prog in ginstall scoinst install; do
9195       for ac_exec_ext in '' $ac_executable_extensions; do
9196         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9197           if test $ac_prog = install &&
9198             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9199             # AIX install.  It has an incompatible calling convention.
9200             :
9201           elif test $ac_prog = install &&
9202             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9203             # program-specific install script used by HP pwplus--don't use.
9204             :
9205           else
9206             rm -rf conftest.one conftest.two conftest.dir
9207             echo one > conftest.one
9208             echo two > conftest.two
9209             mkdir conftest.dir
9210             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9211               test -s conftest.one && test -s conftest.two &&
9212               test -s conftest.dir/conftest.one &&
9213               test -s conftest.dir/conftest.two
9214             then
9215               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9216               break 3
9217             fi
9218           fi
9219         fi
9220       done
9221     done
9222     ;;
9223 esac
9224
9225   done
9226 IFS=$as_save_IFS
9227
9228 rm -rf conftest.one conftest.two conftest.dir
9229
9230 fi
9231   if test "${ac_cv_path_install+set}" = set; then
9232     INSTALL=$ac_cv_path_install
9233   else
9234     # As a last resort, use the slow shell script.  Don't cache a
9235     # value for INSTALL within a source directory, because that will
9236     # break other packages using the cache if that directory is
9237     # removed, or if the value is a relative name.
9238     INSTALL=$ac_install_sh
9239   fi
9240 fi
9241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9242 $as_echo "$INSTALL" >&6; }
9243
9244 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9245 # It thinks the first close brace ends the variable substitution.
9246 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9247
9248 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9249
9250 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9251
9252 # When Autoconf chooses install-sh as install program it tries to generate
9253 # a relative path to it in each makefile where it substitutes it. This clashes
9254 # with our Makefile.global concept. This workaround helps.
9255 case $INSTALL in
9256   *install-sh*) install_bin='';;
9257   *) install_bin=$INSTALL;;
9258 esac
9259
9260
9261 if test -z "$TAR"; then
9262   for ac_prog in tar
9263 do
9264   # Extract the first word of "$ac_prog", so it can be a program name with args.
9265 set dummy $ac_prog; ac_word=$2
9266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9267 $as_echo_n "checking for $ac_word... " >&6; }
9268 if ${ac_cv_path_TAR+:} false; then :
9269   $as_echo_n "(cached) " >&6
9270 else
9271   case $TAR in
9272   [\\/]* | ?:[\\/]*)
9273   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9274   ;;
9275   *)
9276   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9277 for as_dir in $PATH
9278 do
9279   IFS=$as_save_IFS
9280   test -z "$as_dir" && as_dir=.
9281     for ac_exec_ext in '' $ac_executable_extensions; do
9282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9283     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9285     break 2
9286   fi
9287 done
9288   done
9289 IFS=$as_save_IFS
9290
9291   ;;
9292 esac
9293 fi
9294 TAR=$ac_cv_path_TAR
9295 if test -n "$TAR"; then
9296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9297 $as_echo "$TAR" >&6; }
9298 else
9299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9300 $as_echo "no" >&6; }
9301 fi
9302
9303
9304   test -n "$TAR" && break
9305 done
9306
9307 else
9308   # Report the value of TAR in configure's output in all cases.
9309   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9310 $as_echo_n "checking for TAR... " >&6; }
9311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9312 $as_echo "$TAR" >&6; }
9313 fi
9314
9315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9316 $as_echo_n "checking whether ln -s works... " >&6; }
9317 LN_S=$as_ln_s
9318 if test "$LN_S" = "ln -s"; then
9319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9320 $as_echo "yes" >&6; }
9321 else
9322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9323 $as_echo "no, using $LN_S" >&6; }
9324 fi
9325
9326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9327 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9328 if test -z "$MKDIR_P"; then
9329   if ${ac_cv_path_mkdir+:} false; then :
9330   $as_echo_n "(cached) " >&6
9331 else
9332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9333 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9334 do
9335   IFS=$as_save_IFS
9336   test -z "$as_dir" && as_dir=.
9337     for ac_prog in mkdir gmkdir; do
9338          for ac_exec_ext in '' $ac_executable_extensions; do
9339            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9340            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9341              'mkdir (GNU coreutils) '* | \
9342              'mkdir (coreutils) '* | \
9343              'mkdir (fileutils) '4.1*)
9344                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9345                break 3;;
9346            esac
9347          done
9348        done
9349   done
9350 IFS=$as_save_IFS
9351
9352 fi
9353
9354   test -d ./--version && rmdir ./--version
9355   if test "${ac_cv_path_mkdir+set}" = set; then
9356     MKDIR_P="$ac_cv_path_mkdir -p"
9357   else
9358     # As a last resort, use the slow shell script.  Don't cache a
9359     # value for MKDIR_P within a source directory, because that will
9360     # break other packages using the cache if that directory is
9361     # removed, or if the value is a relative name.
9362     MKDIR_P="$ac_install_sh -d"
9363   fi
9364 fi
9365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9366 $as_echo "$MKDIR_P" >&6; }
9367
9368 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9369 # a relative path to it in each makefile where it substitutes it. This clashes
9370 # with our Makefile.global concept. This workaround helps.
9371 case $MKDIR_P in
9372   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9373 esac
9374
9375 if test -z "$BISON"; then
9376   for ac_prog in bison
9377 do
9378   # Extract the first word of "$ac_prog", so it can be a program name with args.
9379 set dummy $ac_prog; ac_word=$2
9380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9381 $as_echo_n "checking for $ac_word... " >&6; }
9382 if ${ac_cv_path_BISON+:} false; then :
9383   $as_echo_n "(cached) " >&6
9384 else
9385   case $BISON in
9386   [\\/]* | ?:[\\/]*)
9387   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9388   ;;
9389   *)
9390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9391 for as_dir in $PATH
9392 do
9393   IFS=$as_save_IFS
9394   test -z "$as_dir" && as_dir=.
9395     for ac_exec_ext in '' $ac_executable_extensions; do
9396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9397     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9399     break 2
9400   fi
9401 done
9402   done
9403 IFS=$as_save_IFS
9404
9405   ;;
9406 esac
9407 fi
9408 BISON=$ac_cv_path_BISON
9409 if test -n "$BISON"; then
9410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9411 $as_echo "$BISON" >&6; }
9412 else
9413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9414 $as_echo "no" >&6; }
9415 fi
9416
9417
9418   test -n "$BISON" && break
9419 done
9420
9421 else
9422   # Report the value of BISON in configure's output in all cases.
9423   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9424 $as_echo_n "checking for BISON... " >&6; }
9425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9426 $as_echo "$BISON" >&6; }
9427 fi
9428
9429
9430 if test "$BISON"; then
9431   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9432   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9433 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9434   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9435   then
9436     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9437 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9438 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9439 $as_echo "$as_me: WARNING:
9440 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9441 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9442     BISON=""
9443   fi
9444   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9445   # of the now preferred %name-prefix "base_yy", but the latter
9446   # doesn't work with Bison 2.3 or less.  So for now we silence the
9447   # deprecation warnings.
9448   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9449   then
9450     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9451   fi
9452 fi
9453
9454 if test -z "$BISON"; then
9455   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9456 *** Without Bison you will not be able to build PostgreSQL from Git nor
9457 *** change any of the parser definition files.  You can obtain Bison from
9458 *** a GNU mirror site.  (If you are using the official distribution of
9459 *** PostgreSQL then you do not need to worry about this, because the Bison
9460 *** output is pre-generated.)" >&5
9461 $as_echo "$as_me: WARNING:
9462 *** Without Bison you will not be able to build PostgreSQL from Git nor
9463 *** change any of the parser definition files.  You can obtain Bison from
9464 *** a GNU mirror site.  (If you are using the official distribution of
9465 *** PostgreSQL then you do not need to worry about this, because the Bison
9466 *** output is pre-generated.)" >&2;}
9467 fi
9468 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9469
9470
9471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9472 $as_echo_n "checking for flex... " >&6; }
9473 if ${pgac_cv_path_flex+:} false; then :
9474   $as_echo_n "(cached) " >&6
9475 else
9476   # Let the user override the test
9477 if test -n "$FLEX"; then
9478   pgac_cv_path_flex=$FLEX
9479 else
9480   pgac_save_IFS=$IFS
9481   IFS=$PATH_SEPARATOR
9482   for pgac_dir in $PATH; do
9483     IFS=$pgac_save_IFS
9484     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9485       pgac_dir=`pwd`
9486     fi
9487     for pgac_prog in flex lex; do
9488       pgac_candidate="$pgac_dir/$pgac_prog"
9489       if test -f "$pgac_candidate" \
9490         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9491       then
9492         echo '%%'  > conftest.l
9493         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9494           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9495           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;}'
9496           then
9497             pgac_cv_path_flex=$pgac_candidate
9498             break 2
9499           else
9500             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9501 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9502 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9503 $as_echo "$as_me: WARNING:
9504 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9505 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9506           fi
9507         fi
9508       fi
9509     done
9510   done
9511   rm -f conftest.l lex.yy.c
9512   : ${pgac_cv_path_flex=no}
9513 fi
9514
9515 fi
9516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9517 $as_echo "$pgac_cv_path_flex" >&6; }
9518 if test x"$pgac_cv_path_flex" = x"no"; then
9519   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9520 *** Without Flex you will not be able to build PostgreSQL from Git nor
9521 *** change any of the scanner definition files.  You can obtain Flex from
9522 *** a GNU mirror site.  (If you are using the official distribution of
9523 *** PostgreSQL then you do not need to worry about this because the Flex
9524 *** output is pre-generated.)" >&5
9525 $as_echo "$as_me: WARNING:
9526 *** Without Flex you will not be able to build PostgreSQL from Git nor
9527 *** change any of the scanner definition files.  You can obtain Flex from
9528 *** a GNU mirror site.  (If you are using the official distribution of
9529 *** PostgreSQL then you do not need to worry about this because the Flex
9530 *** output is pre-generated.)" >&2;}
9531
9532   FLEX=
9533 else
9534   FLEX=$pgac_cv_path_flex
9535   pgac_flex_version=`$FLEX --version 2>/dev/null`
9536   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9537 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9538 fi
9539
9540
9541
9542
9543
9544 if test -z "$PERL"; then
9545   for ac_prog in perl
9546 do
9547   # Extract the first word of "$ac_prog", so it can be a program name with args.
9548 set dummy $ac_prog; ac_word=$2
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9550 $as_echo_n "checking for $ac_word... " >&6; }
9551 if ${ac_cv_path_PERL+:} false; then :
9552   $as_echo_n "(cached) " >&6
9553 else
9554   case $PERL in
9555   [\\/]* | ?:[\\/]*)
9556   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9557   ;;
9558   *)
9559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9560 for as_dir in $PATH
9561 do
9562   IFS=$as_save_IFS
9563   test -z "$as_dir" && as_dir=.
9564     for ac_exec_ext in '' $ac_executable_extensions; do
9565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9566     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9568     break 2
9569   fi
9570 done
9571   done
9572 IFS=$as_save_IFS
9573
9574   ;;
9575 esac
9576 fi
9577 PERL=$ac_cv_path_PERL
9578 if test -n "$PERL"; then
9579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9580 $as_echo "$PERL" >&6; }
9581 else
9582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9583 $as_echo "no" >&6; }
9584 fi
9585
9586
9587   test -n "$PERL" && break
9588 done
9589
9590 else
9591   # Report the value of PERL in configure's output in all cases.
9592   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9593 $as_echo_n "checking for PERL... " >&6; }
9594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9595 $as_echo "$PERL" >&6; }
9596 fi
9597
9598
9599 if test "$PERL"; then
9600   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'`
9601   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9602 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9603   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9604     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9605   then
9606     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9607 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9608 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9609 $as_echo "$as_me: WARNING:
9610 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9611 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9612     PERL=""
9613   fi
9614 fi
9615
9616 if test -z "$PERL"; then
9617   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9618 *** Without Perl you will not be able to build PostgreSQL from Git.
9619 *** You can obtain Perl from any CPAN mirror site.
9620 *** (If you are using the official distribution of PostgreSQL then you do not
9621 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9622 $as_echo "$as_me: WARNING:
9623 *** Without Perl you will not be able to build PostgreSQL from Git.
9624 *** You can obtain Perl from any CPAN mirror site.
9625 *** (If you are using the official distribution of PostgreSQL then you do not
9626 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9627 fi
9628
9629 if test "$with_perl" = yes; then
9630   if test -z "$PERL"; then
9631     as_fn_error $? "Perl not found" "$LINENO" 5
9632   fi
9633
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9635 $as_echo_n "checking for Perl archlibexp... " >&6; }
9636 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9637 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9639 $as_echo "$perl_archlibexp" >&6; }
9640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9641 $as_echo_n "checking for Perl privlibexp... " >&6; }
9642 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9643 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9645 $as_echo "$perl_privlibexp" >&6; }
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9647 $as_echo_n "checking for Perl useshrplib... " >&6; }
9648 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9649 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9651 $as_echo "$perl_useshrplib" >&6; }
9652   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9653     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9654 You might have to rebuild your Perl installation.  Refer to the
9655 documentation for details.  Use --without-perl to disable building
9656 PL/Perl." "$LINENO" 5
9657   fi
9658   # On most platforms, archlibexp is also where the Perl include files live ...
9659   perl_includespec="-I$perl_archlibexp/CORE"
9660   # ... but on newer macOS versions, we must use -iwithsysroot to look
9661   # under $PG_SYSROOT
9662   if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9663     if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9664       perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9665     fi
9666   fi
9667
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9669 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9670 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9672 $as_echo "$perl_ccflags" >&6; }
9673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9674 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9675 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9677 $as_echo "$perl_embed_ccflags" >&6; }
9678
9679
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9681 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9682 if test "$PORTNAME" = "win32" ; then
9683         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9684         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9685                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9686         else
9687                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9688                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9689                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9690                 fi
9691         fi
9692 else
9693         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9694         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9695         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9696 fi
9697 if test -z "$perl_embed_ldflags" ; then
9698         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9699 $as_echo "no" >&6; }
9700         as_fn_error $? "could not determine flags for linking embedded Perl.
9701 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9702 installed." "$LINENO" 5
9703 else
9704         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9705 $as_echo "$perl_embed_ldflags" >&6; }
9706 fi
9707
9708 fi
9709
9710 if test "$with_python" = yes; then
9711   if test -z "$PYTHON"; then
9712   for ac_prog in python python3 python2
9713 do
9714   # Extract the first word of "$ac_prog", so it can be a program name with args.
9715 set dummy $ac_prog; ac_word=$2
9716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9717 $as_echo_n "checking for $ac_word... " >&6; }
9718 if ${ac_cv_path_PYTHON+:} false; then :
9719   $as_echo_n "(cached) " >&6
9720 else
9721   case $PYTHON in
9722   [\\/]* | ?:[\\/]*)
9723   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9724   ;;
9725   *)
9726   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9727 for as_dir in $PATH
9728 do
9729   IFS=$as_save_IFS
9730   test -z "$as_dir" && as_dir=.
9731     for ac_exec_ext in '' $ac_executable_extensions; do
9732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9733     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9735     break 2
9736   fi
9737 done
9738   done
9739 IFS=$as_save_IFS
9740
9741   ;;
9742 esac
9743 fi
9744 PYTHON=$ac_cv_path_PYTHON
9745 if test -n "$PYTHON"; then
9746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9747 $as_echo "$PYTHON" >&6; }
9748 else
9749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9750 $as_echo "no" >&6; }
9751 fi
9752
9753
9754   test -n "$PYTHON" && break
9755 done
9756
9757 else
9758   # Report the value of PYTHON in configure's output in all cases.
9759   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9760 $as_echo_n "checking for PYTHON... " >&6; }
9761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9762 $as_echo "$PYTHON" >&6; }
9763 fi
9764
9765 if test x"$PYTHON" = x""; then
9766   as_fn_error $? "Python not found" "$LINENO" 5
9767 fi
9768
9769
9770 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9772 $as_echo "$as_me: using python $python_fullversion" >&6;}
9773 # python_fullversion is typically n.n.n plus some trailing junk
9774 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9775 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9776 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9777 # Reject unsupported Python versions as soon as practical.
9778 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9779   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9780 fi
9781
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9783 $as_echo_n "checking for Python distutils module... " >&6; }
9784 if "${PYTHON}" -c 'import distutils' 2>&5
9785 then
9786     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9787 $as_echo "yes" >&6; }
9788 else
9789     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9790 $as_echo "no" >&6; }
9791     as_fn_error $? "distutils module not found" "$LINENO" 5
9792 fi
9793
9794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9795 $as_echo_n "checking Python configuration directory... " >&6; }
9796 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9798 $as_echo "$python_configdir" >&6; }
9799
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9801 $as_echo_n "checking Python include directories... " >&6; }
9802 python_includespec=`${PYTHON} -c "
9803 import distutils.sysconfig
9804 a = '-I' + distutils.sysconfig.get_python_inc(False)
9805 b = '-I' + distutils.sysconfig.get_python_inc(True)
9806 if a == b:
9807     print(a)
9808 else:
9809     print(a + ' ' + b)"`
9810 if test "$PORTNAME" = win32 ; then
9811     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9812 fi
9813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9814 $as_echo "$python_includespec" >&6; }
9815
9816
9817
9818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9819 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9820
9821 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9822 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9823
9824 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9825 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9826 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9827 then
9828         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9829         found_shlib=1
9830 else
9831         # Otherwise, guess the base name of the shlib.
9832         # LDVERSION was added in Python 3.2, before that use VERSION,
9833         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9834         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9835         if test x"${python_ldversion}" != x""; then
9836                 ldlibrary="python${python_ldversion}"
9837         else
9838                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9839                 if test x"${python_version_var}" != x""; then
9840                         ldlibrary="python${python_version_var}"
9841                 else
9842                         ldlibrary="python${python_version}"
9843                 fi
9844         fi
9845         # Search for a likely-looking file.
9846         found_shlib=0
9847         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9848         do
9849                 # We don't know the platform DLSUFFIX here, so check 'em all.
9850                 for e in .so .dll .dylib .sl; do
9851                         if test -e "$d/lib${ldlibrary}$e"; then
9852                                 python_libdir="$d"
9853                                 found_shlib=1
9854                                 break 2
9855                         fi
9856                 done
9857         done
9858         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9859         # (".so.n.n") as well. However, check this only after failing to find
9860         # ".so" anywhere, because yet other platforms (Debian) put the .so
9861         # symlink in a different directory from the underlying versioned shlib.
9862         if test "$found_shlib" != 1; then
9863                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9864                 do
9865                         for f in "$d/lib${ldlibrary}.so."* ; do
9866                                 if test -e "$f"; then
9867                                         python_libdir="$d"
9868                                         found_shlib=1
9869                                         break 2
9870                                 fi
9871                         done
9872                 done
9873         fi
9874         # As usual, Windows has its own ideas.  Possible default library
9875         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9876         # and the "lib" prefix might not be there.
9877         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9878                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9879                 do
9880                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9881                                 if test -e "$f"; then
9882                                         python_libdir="$d"
9883                                         found_shlib=1
9884                                         break 2
9885                                 fi
9886                         done
9887                 done
9888         fi
9889 fi
9890 if test "$found_shlib" != 1; then
9891         as_fn_error $? "could not find shared library for Python
9892 You might have to rebuild your Python installation.  Refer to the
9893 documentation for details.  Use --without-python to disable building
9894 PL/Python." "$LINENO" 5
9895 fi
9896 python_libspec="-L${python_libdir} -l${ldlibrary}"
9897
9898 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9899
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9901 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9902
9903
9904
9905 fi
9906
9907 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9908   if test -z "$ZIC"; then
9909   for ac_prog in zic
9910 do
9911   # Extract the first word of "$ac_prog", so it can be a program name with args.
9912 set dummy $ac_prog; ac_word=$2
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9914 $as_echo_n "checking for $ac_word... " >&6; }
9915 if ${ac_cv_path_ZIC+:} false; then :
9916   $as_echo_n "(cached) " >&6
9917 else
9918   case $ZIC in
9919   [\\/]* | ?:[\\/]*)
9920   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9921   ;;
9922   *)
9923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9924 for as_dir in $PATH
9925 do
9926   IFS=$as_save_IFS
9927   test -z "$as_dir" && as_dir=.
9928     for ac_exec_ext in '' $ac_executable_extensions; do
9929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9930     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9932     break 2
9933   fi
9934 done
9935   done
9936 IFS=$as_save_IFS
9937
9938   ;;
9939 esac
9940 fi
9941 ZIC=$ac_cv_path_ZIC
9942 if test -n "$ZIC"; then
9943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9944 $as_echo "$ZIC" >&6; }
9945 else
9946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947 $as_echo "no" >&6; }
9948 fi
9949
9950
9951   test -n "$ZIC" && break
9952 done
9953
9954 else
9955   # Report the value of ZIC in configure's output in all cases.
9956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9957 $as_echo_n "checking for ZIC... " >&6; }
9958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9959 $as_echo "$ZIC" >&6; }
9960 fi
9961
9962   if test -z "$ZIC"; then
9963     as_fn_error $? "
9964 When cross-compiling, either use the option --with-system-tzdata to use
9965 existing time-zone data, or set the environment variable ZIC to a zic
9966 program to use during the build." "$LINENO" 5
9967   fi
9968 fi
9969
9970 #
9971 # Pthreads
9972 #
9973 # For each platform, we need to know about any special compile and link
9974 # libraries, and whether the normal C function names are thread-safe.
9975 # See the comment at the top of src/port/thread.c for more information.
9976 # WIN32 doesn't need the pthread tests;  it always uses threads
9977 #
9978 # These tests are run before the library-tests, because linking with the
9979 # other libraries can pull in the pthread functions as a side-effect.  We
9980 # want to use the -pthread or similar flags directly, and not rely on
9981 # the side-effects of linking with some other library.
9982 #
9983 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
9984 # invocation below is the first one in the script, and autoconf generates
9985 # additional code for that, which must not be inside the if-block. AS_IF
9986 # knows how to do that.
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
9988 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
9989 if ${ac_cv_path_SED+:} false; then :
9990   $as_echo_n "(cached) " >&6
9991 else
9992             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
9993      for ac_i in 1 2 3 4 5 6 7; do
9994        ac_script="$ac_script$as_nl$ac_script"
9995      done
9996      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
9997      { ac_script=; unset ac_script;}
9998      if test -z "$SED"; then
9999   ac_path_SED_found=false
10000   # Loop through the user's path and test for each of PROGNAME-LIST
10001   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10002 for as_dir in $PATH
10003 do
10004   IFS=$as_save_IFS
10005   test -z "$as_dir" && as_dir=.
10006     for ac_prog in sed gsed; do
10007     for ac_exec_ext in '' $ac_executable_extensions; do
10008       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10009       as_fn_executable_p "$ac_path_SED" || continue
10010 # Check for GNU ac_path_SED and select it if it is found.
10011   # Check for GNU $ac_path_SED
10012 case `"$ac_path_SED" --version 2>&1` in
10013 *GNU*)
10014   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10015 *)
10016   ac_count=0
10017   $as_echo_n 0123456789 >"conftest.in"
10018   while :
10019   do
10020     cat "conftest.in" "conftest.in" >"conftest.tmp"
10021     mv "conftest.tmp" "conftest.in"
10022     cp "conftest.in" "conftest.nl"
10023     $as_echo '' >> "conftest.nl"
10024     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10025     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10026     as_fn_arith $ac_count + 1 && ac_count=$as_val
10027     if test $ac_count -gt ${ac_path_SED_max-0}; then
10028       # Best one so far, save it but keep looking for a better one
10029       ac_cv_path_SED="$ac_path_SED"
10030       ac_path_SED_max=$ac_count
10031     fi
10032     # 10*(2^10) chars as input seems more than enough
10033     test $ac_count -gt 10 && break
10034   done
10035   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10036 esac
10037
10038       $ac_path_SED_found && break 3
10039     done
10040   done
10041   done
10042 IFS=$as_save_IFS
10043   if test -z "$ac_cv_path_SED"; then
10044     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10045   fi
10046 else
10047   ac_cv_path_SED=$SED
10048 fi
10049
10050 fi
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10052 $as_echo "$ac_cv_path_SED" >&6; }
10053  SED="$ac_cv_path_SED"
10054   rm -f conftest.sed
10055
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10057 $as_echo_n "checking for ANSI C header files... " >&6; }
10058 if ${ac_cv_header_stdc+:} false; then :
10059   $as_echo_n "(cached) " >&6
10060 else
10061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10062 /* end confdefs.h.  */
10063 #include <stdlib.h>
10064 #include <stdarg.h>
10065 #include <string.h>
10066 #include <float.h>
10067
10068 int
10069 main ()
10070 {
10071
10072   ;
10073   return 0;
10074 }
10075 _ACEOF
10076 if ac_fn_c_try_compile "$LINENO"; then :
10077   ac_cv_header_stdc=yes
10078 else
10079   ac_cv_header_stdc=no
10080 fi
10081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10082
10083 if test $ac_cv_header_stdc = yes; then
10084   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10086 /* end confdefs.h.  */
10087 #include <string.h>
10088
10089 _ACEOF
10090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10091   $EGREP "memchr" >/dev/null 2>&1; then :
10092
10093 else
10094   ac_cv_header_stdc=no
10095 fi
10096 rm -f conftest*
10097
10098 fi
10099
10100 if test $ac_cv_header_stdc = yes; then
10101   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10103 /* end confdefs.h.  */
10104 #include <stdlib.h>
10105
10106 _ACEOF
10107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10108   $EGREP "free" >/dev/null 2>&1; then :
10109
10110 else
10111   ac_cv_header_stdc=no
10112 fi
10113 rm -f conftest*
10114
10115 fi
10116
10117 if test $ac_cv_header_stdc = yes; then
10118   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10119   if test "$cross_compiling" = yes; then :
10120   :
10121 else
10122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10123 /* end confdefs.h.  */
10124 #include <ctype.h>
10125 #include <stdlib.h>
10126 #if ((' ' & 0x0FF) == 0x020)
10127 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10128 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10129 #else
10130 # define ISLOWER(c) \
10131                    (('a' <= (c) && (c) <= 'i') \
10132                      || ('j' <= (c) && (c) <= 'r') \
10133                      || ('s' <= (c) && (c) <= 'z'))
10134 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10135 #endif
10136
10137 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10138 int
10139 main ()
10140 {
10141   int i;
10142   for (i = 0; i < 256; i++)
10143     if (XOR (islower (i), ISLOWER (i))
10144         || toupper (i) != TOUPPER (i))
10145       return 2;
10146   return 0;
10147 }
10148 _ACEOF
10149 if ac_fn_c_try_run "$LINENO"; then :
10150
10151 else
10152   ac_cv_header_stdc=no
10153 fi
10154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10155   conftest.$ac_objext conftest.beam conftest.$ac_ext
10156 fi
10157
10158 fi
10159 fi
10160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10161 $as_echo "$ac_cv_header_stdc" >&6; }
10162 if test $ac_cv_header_stdc = yes; then
10163
10164 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10165
10166 fi
10167
10168 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10169 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10170                   inttypes.h stdint.h unistd.h
10171 do :
10172   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10173 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10174 "
10175 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10176   cat >>confdefs.h <<_ACEOF
10177 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10178 _ACEOF
10179
10180 fi
10181
10182 done
10183
10184
10185 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10186    # then
10187
10188
10189
10190
10191 ac_ext=c
10192 ac_cpp='$CPP $CPPFLAGS'
10193 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10194 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10195 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10196
10197 ax_pthread_ok=no
10198
10199 # We used to check for pthread.h first, but this fails if pthread.h
10200 # requires special compiler flags (e.g. on Tru64 or Sequent).
10201 # It gets checked for in the link test anyway.
10202
10203 # First of all, check if the user has set any of the PTHREAD_LIBS,
10204 # etcetera environment variables, and if threads linking works using
10205 # them:
10206 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10207         ax_pthread_save_CC="$CC"
10208         ax_pthread_save_CFLAGS="$CFLAGS"
10209         ax_pthread_save_LIBS="$LIBS"
10210         if test "x$PTHREAD_CC" != "x"; then :
10211   CC="$PTHREAD_CC"
10212 fi
10213         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10214         LIBS="$PTHREAD_LIBS $LIBS"
10215         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10216 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10217         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10218 /* end confdefs.h.  */
10219
10220 /* Override any GCC internal prototype to avoid an error.
10221    Use char because int might match the return type of a GCC
10222    builtin and then its argument prototype would still apply.  */
10223 #ifdef __cplusplus
10224 extern "C"
10225 #endif
10226 char pthread_join ();
10227 int
10228 main ()
10229 {
10230 return pthread_join ();
10231   ;
10232   return 0;
10233 }
10234 _ACEOF
10235 if ac_fn_c_try_link "$LINENO"; then :
10236   ax_pthread_ok=yes
10237 fi
10238 rm -f core conftest.err conftest.$ac_objext \
10239     conftest$ac_exeext conftest.$ac_ext
10240         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10241 $as_echo "$ax_pthread_ok" >&6; }
10242         if test "x$ax_pthread_ok" = "xno"; then
10243                 PTHREAD_LIBS=""
10244                 PTHREAD_CFLAGS=""
10245         fi
10246         CC="$ax_pthread_save_CC"
10247         CFLAGS="$ax_pthread_save_CFLAGS"
10248         LIBS="$ax_pthread_save_LIBS"
10249 fi
10250
10251 # We must check for the threads library under a number of different
10252 # names; the ordering is very important because some systems
10253 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10254 # libraries is broken (non-POSIX).
10255
10256 # Create a list of thread flags to try.  Items starting with a "-" are
10257 # C compiler flags, and other items are library names, except for "none"
10258 # which indicates that we try without any flags at all, and "pthread-config"
10259 # which is a program returning the flags for the Pth emulation library.
10260
10261 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10262
10263 # The ordering *is* (sometimes) important.  Some notes on the
10264 # individual items follow:
10265
10266 # pthreads: AIX (must check this before -lpthread)
10267 # none: in case threads are in libc; should be tried before -Kthread and
10268 #       other compiler flags to prevent continual compiler warnings
10269 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10270 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10271 #           (Note: HP C rejects this with "bad form for `-t' option")
10272 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10273 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10274 #      doesn't hurt to check since this sometimes defines pthreads and
10275 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10276 #      is present but should not be used directly; and before -mthreads,
10277 #      because the compiler interprets this as "-mt" + "-hreads")
10278 # -mthreads: Mingw32/gcc, Lynx/gcc
10279 # pthread: Linux, etcetera
10280 # --thread-safe: KAI C++
10281 # pthread-config: use pthread-config program (for GNU Pth library)
10282
10283 case $host_os in
10284
10285         freebsd*)
10286
10287         # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10288         # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10289
10290         ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10291         ;;
10292
10293         hpux*)
10294
10295         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10296         # multi-threading and also sets -lpthread."
10297
10298         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10299         ;;
10300
10301         openedition*)
10302
10303         # IBM z/OS requires a feature-test macro to be defined in order to
10304         # enable POSIX threads at all, so give the user a hint if this is
10305         # not set. (We don't define these ourselves, as they can affect
10306         # other portions of the system API in unpredictable ways.)
10307
10308         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10309 /* end confdefs.h.  */
10310
10311 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10312              AX_PTHREAD_ZOS_MISSING
10313 #            endif
10314
10315 _ACEOF
10316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10317   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10318   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10319 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10320 fi
10321 rm -f conftest*
10322
10323         ;;
10324
10325         solaris*)
10326
10327         # On Solaris (at least, for some versions), libc contains stubbed
10328         # (non-functional) versions of the pthreads routines, so link-based
10329         # tests will erroneously succeed. (N.B.: The stubs are missing
10330         # pthread_cleanup_push, or rather a function called by this macro,
10331         # so we could check for that, but who knows whether they'll stub
10332         # that too in a future libc.)  So we'll check first for the
10333         # standard Solaris way of linking pthreads (-mt -lpthread).
10334
10335         ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10336         ;;
10337 esac
10338
10339 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10340
10341 if test "x$GCC" = "xyes"; then :
10342   ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10343 fi
10344
10345 # The presence of a feature test macro requesting re-entrant function
10346 # definitions is, on some systems, a strong hint that pthreads support is
10347 # correctly enabled
10348
10349 case $host_os in
10350         darwin* | hpux* | linux* | osf* | solaris*)
10351         ax_pthread_check_macro="_REENTRANT"
10352         ;;
10353
10354         aix*)
10355         ax_pthread_check_macro="_THREAD_SAFE"
10356         ;;
10357
10358         *)
10359         ax_pthread_check_macro="--"
10360         ;;
10361 esac
10362 if test "x$ax_pthread_check_macro" = "x--"; then :
10363   ax_pthread_check_cond=0
10364 else
10365   ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10366 fi
10367
10368 # Are we compiling with Clang?
10369
10370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10371 $as_echo_n "checking whether $CC is Clang... " >&6; }
10372 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10373   $as_echo_n "(cached) " >&6
10374 else
10375   ax_cv_PTHREAD_CLANG=no
10376      # Note that Autoconf sets GCC=yes for Clang as well as GCC
10377      if test "x$GCC" = "xyes"; then
10378         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10379 /* end confdefs.h.  */
10380 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10381 #            if defined(__clang__) && defined(__llvm__)
10382              AX_PTHREAD_CC_IS_CLANG
10383 #            endif
10384
10385 _ACEOF
10386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10387   $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10388   ax_cv_PTHREAD_CLANG=yes
10389 fi
10390 rm -f conftest*
10391
10392      fi
10393
10394 fi
10395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10396 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10397 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10398
10399 ax_pthread_clang_warning=no
10400
10401 # Clang needs special handling, because older versions handle the -pthread
10402 # option in a rather... idiosyncratic way
10403
10404 if test "x$ax_pthread_clang" = "xyes"; then
10405
10406         # Clang takes -pthread; it has never supported any other flag
10407
10408         # (Note 1: This will need to be revisited if a system that Clang
10409         # supports has POSIX threads in a separate library.  This tends not
10410         # to be the way of modern systems, but it's conceivable.)
10411
10412         # (Note 2: On some systems, notably Darwin, -pthread is not needed
10413         # to get POSIX threads support; the API is always present and
10414         # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
10415         # -pthread does define _REENTRANT, and while the Darwin headers
10416         # ignore this macro, third-party headers might not.)
10417
10418         PTHREAD_CFLAGS="-pthread"
10419         PTHREAD_LIBS=
10420
10421         ax_pthread_ok=yes
10422
10423         # However, older versions of Clang make a point of warning the user
10424         # that, in an invocation where only linking and no compilation is
10425         # taking place, the -pthread option has no effect ("argument unused
10426         # during compilation").  They expect -pthread to be passed in only
10427         # when source code is being compiled.
10428         #
10429         # Problem is, this is at odds with the way Automake and most other
10430         # C build frameworks function, which is that the same flags used in
10431         # compilation (CFLAGS) are also used in linking.  Many systems
10432         # supported by AX_PTHREAD require exactly this for POSIX threads
10433         # support, and in fact it is often not straightforward to specify a
10434         # flag that is used only in the compilation phase and not in
10435         # linking.  Such a scenario is extremely rare in practice.
10436         #
10437         # Even though use of the -pthread flag in linking would only print
10438         # a warning, this can be a nuisance for well-run software projects
10439         # that build with -Werror.  So if the active version of Clang has
10440         # this misfeature, we search for an option to squash it.
10441
10442         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10443 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10444 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10445   $as_echo_n "(cached) " >&6
10446 else
10447   ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10448              # Create an alternate version of $ac_link that compiles and
10449              # links in two steps (.c -> .o, .o -> exe) instead of one
10450              # (.c -> exe), because the warning occurs only in the second
10451              # step
10452              ax_pthread_save_ac_link="$ac_link"
10453              ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10454              ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10455              ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10456              ax_pthread_save_CFLAGS="$CFLAGS"
10457              for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10458                 if test "x$ax_pthread_try" = "xunknown"; then :
10459   break
10460 fi
10461                 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10462                 ac_link="$ax_pthread_save_ac_link"
10463                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10464 /* end confdefs.h.  */
10465 int main(void){return 0;}
10466 _ACEOF
10467 if ac_fn_c_try_link "$LINENO"; then :
10468   ac_link="$ax_pthread_2step_ac_link"
10469                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10470 /* end confdefs.h.  */
10471 int main(void){return 0;}
10472 _ACEOF
10473 if ac_fn_c_try_link "$LINENO"; then :
10474   break
10475 fi
10476 rm -f core conftest.err conftest.$ac_objext \
10477     conftest$ac_exeext conftest.$ac_ext
10478
10479 fi
10480 rm -f core conftest.err conftest.$ac_objext \
10481     conftest$ac_exeext conftest.$ac_ext
10482              done
10483              ac_link="$ax_pthread_save_ac_link"
10484              CFLAGS="$ax_pthread_save_CFLAGS"
10485              if test "x$ax_pthread_try" = "x"; then :
10486   ax_pthread_try=no
10487 fi
10488              ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10489
10490 fi
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10492 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10493
10494         case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10495                 no | unknown) ;;
10496                 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10497         esac
10498
10499 fi # $ax_pthread_clang = yes
10500
10501 if test "x$ax_pthread_ok" = "xno"; then
10502 for ax_pthread_try_flag in $ax_pthread_flags; do
10503
10504         case $ax_pthread_try_flag in
10505                 none)
10506                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10507 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10508                 ;;
10509
10510                 -mt,pthread)
10511                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10512 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10513                 PTHREAD_CFLAGS="-mt"
10514                 PTHREAD_LIBS="-lpthread"
10515                 ;;
10516
10517                 -*)
10518                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10519 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10520                 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10521                 ;;
10522
10523                 pthread-config)
10524                 # Extract the first word of "pthread-config", so it can be a program name with args.
10525 set dummy pthread-config; ac_word=$2
10526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10527 $as_echo_n "checking for $ac_word... " >&6; }
10528 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10529   $as_echo_n "(cached) " >&6
10530 else
10531   if test -n "$ax_pthread_config"; then
10532   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10533 else
10534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10535 for as_dir in $PATH
10536 do
10537   IFS=$as_save_IFS
10538   test -z "$as_dir" && as_dir=.
10539     for ac_exec_ext in '' $ac_executable_extensions; do
10540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10541     ac_cv_prog_ax_pthread_config="yes"
10542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10543     break 2
10544   fi
10545 done
10546   done
10547 IFS=$as_save_IFS
10548
10549   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10550 fi
10551 fi
10552 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10553 if test -n "$ax_pthread_config"; then
10554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10555 $as_echo "$ax_pthread_config" >&6; }
10556 else
10557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10558 $as_echo "no" >&6; }
10559 fi
10560
10561
10562                 if test "x$ax_pthread_config" = "xno"; then :
10563   continue
10564 fi
10565                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10566                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10567                 ;;
10568
10569                 *)
10570                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
10571 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
10572                 PTHREAD_LIBS="-l$ax_pthread_try_flag"
10573                 ;;
10574         esac
10575
10576         ax_pthread_save_CFLAGS="$CFLAGS"
10577         ax_pthread_save_LIBS="$LIBS"
10578         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10579         LIBS="$PTHREAD_LIBS $LIBS"
10580
10581         # Check for various functions.  We must include pthread.h,
10582         # since some functions may be macros.  (On the Sequent, we
10583         # need a special flag -Kthread to make this header compile.)
10584         # We check for pthread_join because it is in -lpthread on IRIX
10585         # while pthread_create is in libc.  We check for pthread_attr_init
10586         # due to DEC craziness with -lpthreads.  We check for
10587         # pthread_cleanup_push because it is one of the few pthread
10588         # functions on Solaris that doesn't have a non-functional libc stub.
10589         # We try pthread_create on general principles.
10590
10591         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10592 /* end confdefs.h.  */
10593 #include <pthread.h>
10594 #                       if $ax_pthread_check_cond
10595 #                        error "$ax_pthread_check_macro must be defined"
10596 #                       endif
10597                         static void routine(void *a) { a = 0; }
10598                         static void *start_routine(void *a) { return a; }
10599 int
10600 main ()
10601 {
10602 pthread_t th; pthread_attr_t attr;
10603                         pthread_create(&th, 0, start_routine, 0);
10604                         pthread_join(th, 0);
10605                         pthread_attr_init(&attr);
10606                         pthread_cleanup_push(routine, 0);
10607                         pthread_cleanup_pop(0) /* ; */
10608   ;
10609   return 0;
10610 }
10611 _ACEOF
10612 if ac_fn_c_try_link "$LINENO"; then :
10613   ax_pthread_ok=yes
10614 fi
10615 rm -f core conftest.err conftest.$ac_objext \
10616     conftest$ac_exeext conftest.$ac_ext
10617
10618         CFLAGS="$ax_pthread_save_CFLAGS"
10619         LIBS="$ax_pthread_save_LIBS"
10620
10621         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10622 $as_echo "$ax_pthread_ok" >&6; }
10623         if test "x$ax_pthread_ok" = "xyes"; then :
10624   break
10625 fi
10626
10627         PTHREAD_LIBS=""
10628         PTHREAD_CFLAGS=""
10629 done
10630 fi
10631
10632 # Various other checks:
10633 if test "x$ax_pthread_ok" = "xyes"; then
10634         ax_pthread_save_CFLAGS="$CFLAGS"
10635         ax_pthread_save_LIBS="$LIBS"
10636         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10637         LIBS="$PTHREAD_LIBS $LIBS"
10638
10639         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10640         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10641 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10642 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10643   $as_echo_n "(cached) " >&6
10644 else
10645   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10646              for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10647                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10648 /* end confdefs.h.  */
10649 #include <pthread.h>
10650 int
10651 main ()
10652 {
10653 int attr = $ax_pthread_attr; return attr /* ; */
10654   ;
10655   return 0;
10656 }
10657 _ACEOF
10658 if ac_fn_c_try_link "$LINENO"; then :
10659   ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
10660 fi
10661 rm -f core conftest.err conftest.$ac_objext \
10662     conftest$ac_exeext conftest.$ac_ext
10663              done
10664
10665 fi
10666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10667 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10668         if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
10669                test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
10670                test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
10671
10672 cat >>confdefs.h <<_ACEOF
10673 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10674 _ACEOF
10675
10676                ax_pthread_joinable_attr_defined=yes
10677
10678 fi
10679
10680         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
10681 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
10682 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10683   $as_echo_n "(cached) " >&6
10684 else
10685   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10686              case $host_os in
10687              solaris*)
10688              ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
10689              ;;
10690              esac
10691
10692 fi
10693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10694 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10695         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10696                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10697   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10698                ax_pthread_special_flags_added=yes
10699 fi
10700
10701         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10702 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10703 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10704   $as_echo_n "(cached) " >&6
10705 else
10706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10707 /* end confdefs.h.  */
10708 #include <pthread.h>
10709 int
10710 main ()
10711 {
10712 int i = PTHREAD_PRIO_INHERIT;
10713   ;
10714   return 0;
10715 }
10716 _ACEOF
10717 if ac_fn_c_try_link "$LINENO"; then :
10718   ax_cv_PTHREAD_PRIO_INHERIT=yes
10719 else
10720   ax_cv_PTHREAD_PRIO_INHERIT=no
10721 fi
10722 rm -f core conftest.err conftest.$ac_objext \
10723     conftest$ac_exeext conftest.$ac_ext
10724
10725 fi
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10727 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10728         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
10729                test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
10730
10731 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10732
10733                ax_pthread_prio_inherit_defined=yes
10734
10735 fi
10736
10737         CFLAGS="$ax_pthread_save_CFLAGS"
10738         LIBS="$ax_pthread_save_LIBS"
10739
10740         # More AIX lossage: compile with *_r variant
10741         if test "x$GCC" != "xyes"; then
10742             case $host_os in
10743                 aix*)
10744                 case "x/$CC" in #(
10745   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10746     #handle absolute path differently from PATH based program lookup
10747                      case "x$CC" in #(
10748   x/*) :
10749     if as_fn_executable_p ${CC}_r; then :
10750   PTHREAD_CC="${CC}_r"
10751 fi ;; #(
10752   *) :
10753     for ac_prog in ${CC}_r
10754 do
10755   # Extract the first word of "$ac_prog", so it can be a program name with args.
10756 set dummy $ac_prog; ac_word=$2
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10758 $as_echo_n "checking for $ac_word... " >&6; }
10759 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10760   $as_echo_n "(cached) " >&6
10761 else
10762   if test -n "$PTHREAD_CC"; then
10763   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10764 else
10765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10766 for as_dir in $PATH
10767 do
10768   IFS=$as_save_IFS
10769   test -z "$as_dir" && as_dir=.
10770     for ac_exec_ext in '' $ac_executable_extensions; do
10771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10772     ac_cv_prog_PTHREAD_CC="$ac_prog"
10773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10774     break 2
10775   fi
10776 done
10777   done
10778 IFS=$as_save_IFS
10779
10780 fi
10781 fi
10782 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10783 if test -n "$PTHREAD_CC"; then
10784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10785 $as_echo "$PTHREAD_CC" >&6; }
10786 else
10787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10788 $as_echo "no" >&6; }
10789 fi
10790
10791
10792   test -n "$PTHREAD_CC" && break
10793 done
10794 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10795  ;;
10796 esac ;; #(
10797   *) :
10798      ;;
10799 esac
10800                 ;;
10801             esac
10802         fi
10803 fi
10804
10805 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10806
10807
10808
10809
10810
10811 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10812 if test "x$ax_pthread_ok" = "xyes"; then
10813
10814 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10815
10816         :
10817 else
10818         ax_pthread_ok=no
10819
10820 fi
10821 ac_ext=c
10822 ac_cpp='$CPP $CPPFLAGS'
10823 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10824 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10825 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10826
10827         # set thread flags
10828
10829 # Some platforms use these, so just define them.  They can't hurt if they
10830 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10831 # enables 5-arg getpwuid_r, among other things.
10832 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10833
10834 # Check for *_r functions
10835 _CFLAGS="$CFLAGS"
10836 _LIBS="$LIBS"
10837 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10838 LIBS="$LIBS $PTHREAD_LIBS"
10839
10840 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10841 if test "x$ac_cv_header_pthread_h" = xyes; then :
10842
10843 else
10844   as_fn_error $? "
10845 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10846 fi
10847
10848
10849
10850 for ac_func in strerror_r getpwuid_r gethostbyname_r
10851 do :
10852   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10853 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10854 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10855   cat >>confdefs.h <<_ACEOF
10856 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10857 _ACEOF
10858
10859 fi
10860 done
10861
10862
10863 # Do test here with the proper thread flags
10864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10865 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10866 if ${pgac_cv_func_strerror_r_int+:} false; then :
10867   $as_echo_n "(cached) " >&6
10868 else
10869   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10870 /* end confdefs.h.  */
10871 #include <string.h>
10872 int
10873 main ()
10874 {
10875 char buf[100];
10876   switch (strerror_r(1, buf, sizeof(buf)))
10877   { case 0: break; default: break; }
10878
10879   ;
10880   return 0;
10881 }
10882 _ACEOF
10883 if ac_fn_c_try_compile "$LINENO"; then :
10884   pgac_cv_func_strerror_r_int=yes
10885 else
10886   pgac_cv_func_strerror_r_int=no
10887 fi
10888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10889 fi
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10891 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10892 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10893
10894 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10895
10896 fi
10897
10898
10899 CFLAGS="$_CFLAGS"
10900 LIBS="$_LIBS"
10901
10902
10903 else
10904    # else
10905 # do not use values from template file
10906 PTHREAD_CFLAGS=
10907 PTHREAD_LIBS=
10908
10909 fi # fi
10910
10911
10912
10913
10914
10915 ##
10916 ## Libraries
10917 ##
10918 ## Most libraries are included only if they demonstrably provide a function
10919 ## we need, but libm is an exception: always include it, because there are
10920 ## too many compilers that play cute optimization games that will break
10921 ## probes for standard functions such as pow().
10922 ##
10923
10924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10925 $as_echo_n "checking for main in -lm... " >&6; }
10926 if ${ac_cv_lib_m_main+:} false; then :
10927   $as_echo_n "(cached) " >&6
10928 else
10929   ac_check_lib_save_LIBS=$LIBS
10930 LIBS="-lm  $LIBS"
10931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10932 /* end confdefs.h.  */
10933
10934
10935 int
10936 main ()
10937 {
10938 return main ();
10939   ;
10940   return 0;
10941 }
10942 _ACEOF
10943 if ac_fn_c_try_link "$LINENO"; then :
10944   ac_cv_lib_m_main=yes
10945 else
10946   ac_cv_lib_m_main=no
10947 fi
10948 rm -f core conftest.err conftest.$ac_objext \
10949     conftest$ac_exeext conftest.$ac_ext
10950 LIBS=$ac_check_lib_save_LIBS
10951 fi
10952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10953 $as_echo "$ac_cv_lib_m_main" >&6; }
10954 if test "x$ac_cv_lib_m_main" = xyes; then :
10955   cat >>confdefs.h <<_ACEOF
10956 #define HAVE_LIBM 1
10957 _ACEOF
10958
10959   LIBS="-lm $LIBS"
10960
10961 fi
10962
10963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10964 $as_echo_n "checking for library containing setproctitle... " >&6; }
10965 if ${ac_cv_search_setproctitle+:} false; then :
10966   $as_echo_n "(cached) " >&6
10967 else
10968   ac_func_search_save_LIBS=$LIBS
10969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10970 /* end confdefs.h.  */
10971
10972 /* Override any GCC internal prototype to avoid an error.
10973    Use char because int might match the return type of a GCC
10974    builtin and then its argument prototype would still apply.  */
10975 #ifdef __cplusplus
10976 extern "C"
10977 #endif
10978 char setproctitle ();
10979 int
10980 main ()
10981 {
10982 return setproctitle ();
10983   ;
10984   return 0;
10985 }
10986 _ACEOF
10987 for ac_lib in '' util; do
10988   if test -z "$ac_lib"; then
10989     ac_res="none required"
10990   else
10991     ac_res=-l$ac_lib
10992     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10993   fi
10994   if ac_fn_c_try_link "$LINENO"; then :
10995   ac_cv_search_setproctitle=$ac_res
10996 fi
10997 rm -f core conftest.err conftest.$ac_objext \
10998     conftest$ac_exeext
10999   if ${ac_cv_search_setproctitle+:} false; then :
11000   break
11001 fi
11002 done
11003 if ${ac_cv_search_setproctitle+:} false; then :
11004
11005 else
11006   ac_cv_search_setproctitle=no
11007 fi
11008 rm conftest.$ac_ext
11009 LIBS=$ac_func_search_save_LIBS
11010 fi
11011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11012 $as_echo "$ac_cv_search_setproctitle" >&6; }
11013 ac_res=$ac_cv_search_setproctitle
11014 if test "$ac_res" != no; then :
11015   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11016
11017 fi
11018
11019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11020 $as_echo_n "checking for library containing dlopen... " >&6; }
11021 if ${ac_cv_search_dlopen+:} false; then :
11022   $as_echo_n "(cached) " >&6
11023 else
11024   ac_func_search_save_LIBS=$LIBS
11025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11026 /* end confdefs.h.  */
11027
11028 /* Override any GCC internal prototype to avoid an error.
11029    Use char because int might match the return type of a GCC
11030    builtin and then its argument prototype would still apply.  */
11031 #ifdef __cplusplus
11032 extern "C"
11033 #endif
11034 char dlopen ();
11035 int
11036 main ()
11037 {
11038 return dlopen ();
11039   ;
11040   return 0;
11041 }
11042 _ACEOF
11043 for ac_lib in '' dl; do
11044   if test -z "$ac_lib"; then
11045     ac_res="none required"
11046   else
11047     ac_res=-l$ac_lib
11048     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11049   fi
11050   if ac_fn_c_try_link "$LINENO"; then :
11051   ac_cv_search_dlopen=$ac_res
11052 fi
11053 rm -f core conftest.err conftest.$ac_objext \
11054     conftest$ac_exeext
11055   if ${ac_cv_search_dlopen+:} false; then :
11056   break
11057 fi
11058 done
11059 if ${ac_cv_search_dlopen+:} false; then :
11060
11061 else
11062   ac_cv_search_dlopen=no
11063 fi
11064 rm conftest.$ac_ext
11065 LIBS=$ac_func_search_save_LIBS
11066 fi
11067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11068 $as_echo "$ac_cv_search_dlopen" >&6; }
11069 ac_res=$ac_cv_search_dlopen
11070 if test "$ac_res" != no; then :
11071   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11072
11073 fi
11074
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11076 $as_echo_n "checking for library containing socket... " >&6; }
11077 if ${ac_cv_search_socket+:} false; then :
11078   $as_echo_n "(cached) " >&6
11079 else
11080   ac_func_search_save_LIBS=$LIBS
11081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11082 /* end confdefs.h.  */
11083
11084 /* Override any GCC internal prototype to avoid an error.
11085    Use char because int might match the return type of a GCC
11086    builtin and then its argument prototype would still apply.  */
11087 #ifdef __cplusplus
11088 extern "C"
11089 #endif
11090 char socket ();
11091 int
11092 main ()
11093 {
11094 return socket ();
11095   ;
11096   return 0;
11097 }
11098 _ACEOF
11099 for ac_lib in '' socket ws2_32; do
11100   if test -z "$ac_lib"; then
11101     ac_res="none required"
11102   else
11103     ac_res=-l$ac_lib
11104     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11105   fi
11106   if ac_fn_c_try_link "$LINENO"; then :
11107   ac_cv_search_socket=$ac_res
11108 fi
11109 rm -f core conftest.err conftest.$ac_objext \
11110     conftest$ac_exeext
11111   if ${ac_cv_search_socket+:} false; then :
11112   break
11113 fi
11114 done
11115 if ${ac_cv_search_socket+:} false; then :
11116
11117 else
11118   ac_cv_search_socket=no
11119 fi
11120 rm conftest.$ac_ext
11121 LIBS=$ac_func_search_save_LIBS
11122 fi
11123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11124 $as_echo "$ac_cv_search_socket" >&6; }
11125 ac_res=$ac_cv_search_socket
11126 if test "$ac_res" != no; then :
11127   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11128
11129 fi
11130
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11132 $as_echo_n "checking for library containing shl_load... " >&6; }
11133 if ${ac_cv_search_shl_load+:} false; then :
11134   $as_echo_n "(cached) " >&6
11135 else
11136   ac_func_search_save_LIBS=$LIBS
11137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11138 /* end confdefs.h.  */
11139
11140 /* Override any GCC internal prototype to avoid an error.
11141    Use char because int might match the return type of a GCC
11142    builtin and then its argument prototype would still apply.  */
11143 #ifdef __cplusplus
11144 extern "C"
11145 #endif
11146 char shl_load ();
11147 int
11148 main ()
11149 {
11150 return shl_load ();
11151   ;
11152   return 0;
11153 }
11154 _ACEOF
11155 for ac_lib in '' dld; do
11156   if test -z "$ac_lib"; then
11157     ac_res="none required"
11158   else
11159     ac_res=-l$ac_lib
11160     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11161   fi
11162   if ac_fn_c_try_link "$LINENO"; then :
11163   ac_cv_search_shl_load=$ac_res
11164 fi
11165 rm -f core conftest.err conftest.$ac_objext \
11166     conftest$ac_exeext
11167   if ${ac_cv_search_shl_load+:} false; then :
11168   break
11169 fi
11170 done
11171 if ${ac_cv_search_shl_load+:} false; then :
11172
11173 else
11174   ac_cv_search_shl_load=no
11175 fi
11176 rm conftest.$ac_ext
11177 LIBS=$ac_func_search_save_LIBS
11178 fi
11179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11180 $as_echo "$ac_cv_search_shl_load" >&6; }
11181 ac_res=$ac_cv_search_shl_load
11182 if test "$ac_res" != no; then :
11183   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11184
11185 fi
11186
11187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11188 $as_echo_n "checking for library containing getopt_long... " >&6; }
11189 if ${ac_cv_search_getopt_long+:} false; then :
11190   $as_echo_n "(cached) " >&6
11191 else
11192   ac_func_search_save_LIBS=$LIBS
11193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11194 /* end confdefs.h.  */
11195
11196 /* Override any GCC internal prototype to avoid an error.
11197    Use char because int might match the return type of a GCC
11198    builtin and then its argument prototype would still apply.  */
11199 #ifdef __cplusplus
11200 extern "C"
11201 #endif
11202 char getopt_long ();
11203 int
11204 main ()
11205 {
11206 return getopt_long ();
11207   ;
11208   return 0;
11209 }
11210 _ACEOF
11211 for ac_lib in '' getopt gnugetopt; do
11212   if test -z "$ac_lib"; then
11213     ac_res="none required"
11214   else
11215     ac_res=-l$ac_lib
11216     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11217   fi
11218   if ac_fn_c_try_link "$LINENO"; then :
11219   ac_cv_search_getopt_long=$ac_res
11220 fi
11221 rm -f core conftest.err conftest.$ac_objext \
11222     conftest$ac_exeext
11223   if ${ac_cv_search_getopt_long+:} false; then :
11224   break
11225 fi
11226 done
11227 if ${ac_cv_search_getopt_long+:} false; then :
11228
11229 else
11230   ac_cv_search_getopt_long=no
11231 fi
11232 rm conftest.$ac_ext
11233 LIBS=$ac_func_search_save_LIBS
11234 fi
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11236 $as_echo "$ac_cv_search_getopt_long" >&6; }
11237 ac_res=$ac_cv_search_getopt_long
11238 if test "$ac_res" != no; then :
11239   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11240
11241 fi
11242
11243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11244 $as_echo_n "checking for library containing crypt... " >&6; }
11245 if ${ac_cv_search_crypt+:} false; then :
11246   $as_echo_n "(cached) " >&6
11247 else
11248   ac_func_search_save_LIBS=$LIBS
11249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11250 /* end confdefs.h.  */
11251
11252 /* Override any GCC internal prototype to avoid an error.
11253    Use char because int might match the return type of a GCC
11254    builtin and then its argument prototype would still apply.  */
11255 #ifdef __cplusplus
11256 extern "C"
11257 #endif
11258 char crypt ();
11259 int
11260 main ()
11261 {
11262 return crypt ();
11263   ;
11264   return 0;
11265 }
11266 _ACEOF
11267 for ac_lib in '' crypt; do
11268   if test -z "$ac_lib"; then
11269     ac_res="none required"
11270   else
11271     ac_res=-l$ac_lib
11272     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11273   fi
11274   if ac_fn_c_try_link "$LINENO"; then :
11275   ac_cv_search_crypt=$ac_res
11276 fi
11277 rm -f core conftest.err conftest.$ac_objext \
11278     conftest$ac_exeext
11279   if ${ac_cv_search_crypt+:} false; then :
11280   break
11281 fi
11282 done
11283 if ${ac_cv_search_crypt+:} false; then :
11284
11285 else
11286   ac_cv_search_crypt=no
11287 fi
11288 rm conftest.$ac_ext
11289 LIBS=$ac_func_search_save_LIBS
11290 fi
11291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11292 $as_echo "$ac_cv_search_crypt" >&6; }
11293 ac_res=$ac_cv_search_crypt
11294 if test "$ac_res" != no; then :
11295   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11296
11297 fi
11298
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11300 $as_echo_n "checking for library containing shm_open... " >&6; }
11301 if ${ac_cv_search_shm_open+:} false; then :
11302   $as_echo_n "(cached) " >&6
11303 else
11304   ac_func_search_save_LIBS=$LIBS
11305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11306 /* end confdefs.h.  */
11307
11308 /* Override any GCC internal prototype to avoid an error.
11309    Use char because int might match the return type of a GCC
11310    builtin and then its argument prototype would still apply.  */
11311 #ifdef __cplusplus
11312 extern "C"
11313 #endif
11314 char shm_open ();
11315 int
11316 main ()
11317 {
11318 return shm_open ();
11319   ;
11320   return 0;
11321 }
11322 _ACEOF
11323 for ac_lib in '' rt; do
11324   if test -z "$ac_lib"; then
11325     ac_res="none required"
11326   else
11327     ac_res=-l$ac_lib
11328     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11329   fi
11330   if ac_fn_c_try_link "$LINENO"; then :
11331   ac_cv_search_shm_open=$ac_res
11332 fi
11333 rm -f core conftest.err conftest.$ac_objext \
11334     conftest$ac_exeext
11335   if ${ac_cv_search_shm_open+:} false; then :
11336   break
11337 fi
11338 done
11339 if ${ac_cv_search_shm_open+:} false; then :
11340
11341 else
11342   ac_cv_search_shm_open=no
11343 fi
11344 rm conftest.$ac_ext
11345 LIBS=$ac_func_search_save_LIBS
11346 fi
11347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11348 $as_echo "$ac_cv_search_shm_open" >&6; }
11349 ac_res=$ac_cv_search_shm_open
11350 if test "$ac_res" != no; then :
11351   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11352
11353 fi
11354
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11356 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11357 if ${ac_cv_search_shm_unlink+:} false; then :
11358   $as_echo_n "(cached) " >&6
11359 else
11360   ac_func_search_save_LIBS=$LIBS
11361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11362 /* end confdefs.h.  */
11363
11364 /* Override any GCC internal prototype to avoid an error.
11365    Use char because int might match the return type of a GCC
11366    builtin and then its argument prototype would still apply.  */
11367 #ifdef __cplusplus
11368 extern "C"
11369 #endif
11370 char shm_unlink ();
11371 int
11372 main ()
11373 {
11374 return shm_unlink ();
11375   ;
11376   return 0;
11377 }
11378 _ACEOF
11379 for ac_lib in '' rt; do
11380   if test -z "$ac_lib"; then
11381     ac_res="none required"
11382   else
11383     ac_res=-l$ac_lib
11384     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11385   fi
11386   if ac_fn_c_try_link "$LINENO"; then :
11387   ac_cv_search_shm_unlink=$ac_res
11388 fi
11389 rm -f core conftest.err conftest.$ac_objext \
11390     conftest$ac_exeext
11391   if ${ac_cv_search_shm_unlink+:} false; then :
11392   break
11393 fi
11394 done
11395 if ${ac_cv_search_shm_unlink+:} false; then :
11396
11397 else
11398   ac_cv_search_shm_unlink=no
11399 fi
11400 rm conftest.$ac_ext
11401 LIBS=$ac_func_search_save_LIBS
11402 fi
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11404 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11405 ac_res=$ac_cv_search_shm_unlink
11406 if test "$ac_res" != no; then :
11407   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11408
11409 fi
11410
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11412 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11413 if ${ac_cv_search_clock_gettime+:} false; then :
11414   $as_echo_n "(cached) " >&6
11415 else
11416   ac_func_search_save_LIBS=$LIBS
11417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11418 /* end confdefs.h.  */
11419
11420 /* Override any GCC internal prototype to avoid an error.
11421    Use char because int might match the return type of a GCC
11422    builtin and then its argument prototype would still apply.  */
11423 #ifdef __cplusplus
11424 extern "C"
11425 #endif
11426 char clock_gettime ();
11427 int
11428 main ()
11429 {
11430 return clock_gettime ();
11431   ;
11432   return 0;
11433 }
11434 _ACEOF
11435 for ac_lib in '' rt posix4; do
11436   if test -z "$ac_lib"; then
11437     ac_res="none required"
11438   else
11439     ac_res=-l$ac_lib
11440     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11441   fi
11442   if ac_fn_c_try_link "$LINENO"; then :
11443   ac_cv_search_clock_gettime=$ac_res
11444 fi
11445 rm -f core conftest.err conftest.$ac_objext \
11446     conftest$ac_exeext
11447   if ${ac_cv_search_clock_gettime+:} false; then :
11448   break
11449 fi
11450 done
11451 if ${ac_cv_search_clock_gettime+:} false; then :
11452
11453 else
11454   ac_cv_search_clock_gettime=no
11455 fi
11456 rm conftest.$ac_ext
11457 LIBS=$ac_func_search_save_LIBS
11458 fi
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11460 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11461 ac_res=$ac_cv_search_clock_gettime
11462 if test "$ac_res" != no; then :
11463   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11464
11465 fi
11466
11467 # Solaris:
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11469 $as_echo_n "checking for library containing fdatasync... " >&6; }
11470 if ${ac_cv_search_fdatasync+:} false; then :
11471   $as_echo_n "(cached) " >&6
11472 else
11473   ac_func_search_save_LIBS=$LIBS
11474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11475 /* end confdefs.h.  */
11476
11477 /* Override any GCC internal prototype to avoid an error.
11478    Use char because int might match the return type of a GCC
11479    builtin and then its argument prototype would still apply.  */
11480 #ifdef __cplusplus
11481 extern "C"
11482 #endif
11483 char fdatasync ();
11484 int
11485 main ()
11486 {
11487 return fdatasync ();
11488   ;
11489   return 0;
11490 }
11491 _ACEOF
11492 for ac_lib in '' rt posix4; do
11493   if test -z "$ac_lib"; then
11494     ac_res="none required"
11495   else
11496     ac_res=-l$ac_lib
11497     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11498   fi
11499   if ac_fn_c_try_link "$LINENO"; then :
11500   ac_cv_search_fdatasync=$ac_res
11501 fi
11502 rm -f core conftest.err conftest.$ac_objext \
11503     conftest$ac_exeext
11504   if ${ac_cv_search_fdatasync+:} false; then :
11505   break
11506 fi
11507 done
11508 if ${ac_cv_search_fdatasync+:} false; then :
11509
11510 else
11511   ac_cv_search_fdatasync=no
11512 fi
11513 rm conftest.$ac_ext
11514 LIBS=$ac_func_search_save_LIBS
11515 fi
11516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11517 $as_echo "$ac_cv_search_fdatasync" >&6; }
11518 ac_res=$ac_cv_search_fdatasync
11519 if test "$ac_res" != no; then :
11520   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11521
11522 fi
11523
11524 # Required for thread_test.c on Solaris
11525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11526 $as_echo_n "checking for library containing sched_yield... " >&6; }
11527 if ${ac_cv_search_sched_yield+:} false; then :
11528   $as_echo_n "(cached) " >&6
11529 else
11530   ac_func_search_save_LIBS=$LIBS
11531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11532 /* end confdefs.h.  */
11533
11534 /* Override any GCC internal prototype to avoid an error.
11535    Use char because int might match the return type of a GCC
11536    builtin and then its argument prototype would still apply.  */
11537 #ifdef __cplusplus
11538 extern "C"
11539 #endif
11540 char sched_yield ();
11541 int
11542 main ()
11543 {
11544 return sched_yield ();
11545   ;
11546   return 0;
11547 }
11548 _ACEOF
11549 for ac_lib in '' rt; do
11550   if test -z "$ac_lib"; then
11551     ac_res="none required"
11552   else
11553     ac_res=-l$ac_lib
11554     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11555   fi
11556   if ac_fn_c_try_link "$LINENO"; then :
11557   ac_cv_search_sched_yield=$ac_res
11558 fi
11559 rm -f core conftest.err conftest.$ac_objext \
11560     conftest$ac_exeext
11561   if ${ac_cv_search_sched_yield+:} false; then :
11562   break
11563 fi
11564 done
11565 if ${ac_cv_search_sched_yield+:} false; then :
11566
11567 else
11568   ac_cv_search_sched_yield=no
11569 fi
11570 rm conftest.$ac_ext
11571 LIBS=$ac_func_search_save_LIBS
11572 fi
11573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11574 $as_echo "$ac_cv_search_sched_yield" >&6; }
11575 ac_res=$ac_cv_search_sched_yield
11576 if test "$ac_res" != no; then :
11577   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11578
11579 fi
11580
11581 # Required for thread_test.c on Solaris 2.5:
11582 # Other ports use it too (HP-UX) so test unconditionally
11583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11584 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11585 if ${ac_cv_search_gethostbyname_r+:} false; then :
11586   $as_echo_n "(cached) " >&6
11587 else
11588   ac_func_search_save_LIBS=$LIBS
11589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11590 /* end confdefs.h.  */
11591
11592 /* Override any GCC internal prototype to avoid an error.
11593    Use char because int might match the return type of a GCC
11594    builtin and then its argument prototype would still apply.  */
11595 #ifdef __cplusplus
11596 extern "C"
11597 #endif
11598 char gethostbyname_r ();
11599 int
11600 main ()
11601 {
11602 return gethostbyname_r ();
11603   ;
11604   return 0;
11605 }
11606 _ACEOF
11607 for ac_lib in '' nsl; do
11608   if test -z "$ac_lib"; then
11609     ac_res="none required"
11610   else
11611     ac_res=-l$ac_lib
11612     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11613   fi
11614   if ac_fn_c_try_link "$LINENO"; then :
11615   ac_cv_search_gethostbyname_r=$ac_res
11616 fi
11617 rm -f core conftest.err conftest.$ac_objext \
11618     conftest$ac_exeext
11619   if ${ac_cv_search_gethostbyname_r+:} false; then :
11620   break
11621 fi
11622 done
11623 if ${ac_cv_search_gethostbyname_r+:} false; then :
11624
11625 else
11626   ac_cv_search_gethostbyname_r=no
11627 fi
11628 rm conftest.$ac_ext
11629 LIBS=$ac_func_search_save_LIBS
11630 fi
11631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11632 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11633 ac_res=$ac_cv_search_gethostbyname_r
11634 if test "$ac_res" != no; then :
11635   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11636
11637 fi
11638
11639 # Cygwin:
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11641 $as_echo_n "checking for library containing shmget... " >&6; }
11642 if ${ac_cv_search_shmget+:} false; then :
11643   $as_echo_n "(cached) " >&6
11644 else
11645   ac_func_search_save_LIBS=$LIBS
11646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11647 /* end confdefs.h.  */
11648
11649 /* Override any GCC internal prototype to avoid an error.
11650    Use char because int might match the return type of a GCC
11651    builtin and then its argument prototype would still apply.  */
11652 #ifdef __cplusplus
11653 extern "C"
11654 #endif
11655 char shmget ();
11656 int
11657 main ()
11658 {
11659 return shmget ();
11660   ;
11661   return 0;
11662 }
11663 _ACEOF
11664 for ac_lib in '' cygipc; do
11665   if test -z "$ac_lib"; then
11666     ac_res="none required"
11667   else
11668     ac_res=-l$ac_lib
11669     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11670   fi
11671   if ac_fn_c_try_link "$LINENO"; then :
11672   ac_cv_search_shmget=$ac_res
11673 fi
11674 rm -f core conftest.err conftest.$ac_objext \
11675     conftest$ac_exeext
11676   if ${ac_cv_search_shmget+:} false; then :
11677   break
11678 fi
11679 done
11680 if ${ac_cv_search_shmget+:} false; then :
11681
11682 else
11683   ac_cv_search_shmget=no
11684 fi
11685 rm conftest.$ac_ext
11686 LIBS=$ac_func_search_save_LIBS
11687 fi
11688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11689 $as_echo "$ac_cv_search_shmget" >&6; }
11690 ac_res=$ac_cv_search_shmget
11691 if test "$ac_res" != no; then :
11692   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11693
11694 fi
11695
11696
11697 if test "$with_readline" = yes; then
11698
11699
11700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11701 $as_echo_n "checking for library containing readline... " >&6; }
11702 if ${pgac_cv_check_readline+:} false; then :
11703   $as_echo_n "(cached) " >&6
11704 else
11705   pgac_cv_check_readline=no
11706 pgac_save_LIBS=$LIBS
11707 if test x"$with_libedit_preferred" != x"yes"
11708 then    READLINE_ORDER="-lreadline -ledit"
11709 else    READLINE_ORDER="-ledit -lreadline"
11710 fi
11711 for pgac_rllib in $READLINE_ORDER ; do
11712   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11713     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11714     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11715 /* end confdefs.h.  */
11716
11717 /* Override any GCC internal prototype to avoid an error.
11718    Use char because int might match the return type of a GCC
11719    builtin and then its argument prototype would still apply.  */
11720 #ifdef __cplusplus
11721 extern "C"
11722 #endif
11723 char readline ();
11724 int
11725 main ()
11726 {
11727 return readline ();
11728   ;
11729   return 0;
11730 }
11731 _ACEOF
11732 if ac_fn_c_try_link "$LINENO"; then :
11733
11734       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11735       # recognize dependent libraries; assume curses is needed if we didn't
11736       # find any dependency.
11737       case $host_os in
11738         netbsd* | openbsd* | irix*)
11739           if test x"$pgac_lib" = x"" ; then
11740             pgac_lib=" -lcurses"
11741           fi ;;
11742       esac
11743
11744       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11745       break
11746
11747 fi
11748 rm -f core conftest.err conftest.$ac_objext \
11749     conftest$ac_exeext conftest.$ac_ext
11750   done
11751   if test "$pgac_cv_check_readline" != no ; then
11752     break
11753   fi
11754 done
11755 LIBS=$pgac_save_LIBS
11756
11757 fi
11758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11759 $as_echo "$pgac_cv_check_readline" >&6; }
11760 if test "$pgac_cv_check_readline" != no ; then
11761   LIBS="$pgac_cv_check_readline $LIBS"
11762
11763 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11764
11765 fi
11766
11767
11768   if test x"$pgac_cv_check_readline" = x"no"; then
11769     as_fn_error $? "readline library not found
11770 If you have readline already installed, see config.log for details on the
11771 failure.  It is possible the compiler isn't looking in the proper directory.
11772 Use --without-readline to disable readline support." "$LINENO" 5
11773   fi
11774 fi
11775
11776 if test "$with_zlib" = yes; then
11777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11778 $as_echo_n "checking for inflate in -lz... " >&6; }
11779 if ${ac_cv_lib_z_inflate+:} false; then :
11780   $as_echo_n "(cached) " >&6
11781 else
11782   ac_check_lib_save_LIBS=$LIBS
11783 LIBS="-lz  $LIBS"
11784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11785 /* end confdefs.h.  */
11786
11787 /* Override any GCC internal prototype to avoid an error.
11788    Use char because int might match the return type of a GCC
11789    builtin and then its argument prototype would still apply.  */
11790 #ifdef __cplusplus
11791 extern "C"
11792 #endif
11793 char inflate ();
11794 int
11795 main ()
11796 {
11797 return inflate ();
11798   ;
11799   return 0;
11800 }
11801 _ACEOF
11802 if ac_fn_c_try_link "$LINENO"; then :
11803   ac_cv_lib_z_inflate=yes
11804 else
11805   ac_cv_lib_z_inflate=no
11806 fi
11807 rm -f core conftest.err conftest.$ac_objext \
11808     conftest$ac_exeext conftest.$ac_ext
11809 LIBS=$ac_check_lib_save_LIBS
11810 fi
11811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11812 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11813 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11814   cat >>confdefs.h <<_ACEOF
11815 #define HAVE_LIBZ 1
11816 _ACEOF
11817
11818   LIBS="-lz $LIBS"
11819
11820 else
11821   as_fn_error $? "zlib library not found
11822 If you have zlib already installed, see config.log for details on the
11823 failure.  It is possible the compiler isn't looking in the proper directory.
11824 Use --without-zlib to disable zlib support." "$LINENO" 5
11825 fi
11826
11827 fi
11828
11829 if test "$enable_spinlocks" = yes; then
11830
11831 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11832
11833 else
11834   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11835 *** Not using spinlocks will cause poor performance." >&5
11836 $as_echo "$as_me: WARNING:
11837 *** Not using spinlocks will cause poor performance." >&2;}
11838 fi
11839
11840 if test "$enable_atomics" = yes; then
11841
11842 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11843
11844 else
11845   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11846 *** Not using atomic operations will cause poor performance." >&5
11847 $as_echo "$as_me: WARNING:
11848 *** Not using atomic operations will cause poor performance." >&2;}
11849 fi
11850
11851 if test "$with_gssapi" = yes ; then
11852   if test "$PORTNAME" != "win32"; then
11853     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11854 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11855 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11856   $as_echo_n "(cached) " >&6
11857 else
11858   ac_func_search_save_LIBS=$LIBS
11859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11860 /* end confdefs.h.  */
11861
11862 /* Override any GCC internal prototype to avoid an error.
11863    Use char because int might match the return type of a GCC
11864    builtin and then its argument prototype would still apply.  */
11865 #ifdef __cplusplus
11866 extern "C"
11867 #endif
11868 char gss_init_sec_context ();
11869 int
11870 main ()
11871 {
11872 return gss_init_sec_context ();
11873   ;
11874   return 0;
11875 }
11876 _ACEOF
11877 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11878   if test -z "$ac_lib"; then
11879     ac_res="none required"
11880   else
11881     ac_res=-l$ac_lib
11882     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11883   fi
11884   if ac_fn_c_try_link "$LINENO"; then :
11885   ac_cv_search_gss_init_sec_context=$ac_res
11886 fi
11887 rm -f core conftest.err conftest.$ac_objext \
11888     conftest$ac_exeext
11889   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11890   break
11891 fi
11892 done
11893 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11894
11895 else
11896   ac_cv_search_gss_init_sec_context=no
11897 fi
11898 rm conftest.$ac_ext
11899 LIBS=$ac_func_search_save_LIBS
11900 fi
11901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11902 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11903 ac_res=$ac_cv_search_gss_init_sec_context
11904 if test "$ac_res" != no; then :
11905   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11906
11907 else
11908   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11909 fi
11910
11911   else
11912     LIBS="$LIBS -lgssapi32"
11913   fi
11914 fi
11915
11916 if test "$with_openssl" = yes ; then
11917     if test "$PORTNAME" != "win32"; then
11918      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11919 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11920 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11921   $as_echo_n "(cached) " >&6
11922 else
11923   ac_check_lib_save_LIBS=$LIBS
11924 LIBS="-lcrypto  $LIBS"
11925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11926 /* end confdefs.h.  */
11927
11928 /* Override any GCC internal prototype to avoid an error.
11929    Use char because int might match the return type of a GCC
11930    builtin and then its argument prototype would still apply.  */
11931 #ifdef __cplusplus
11932 extern "C"
11933 #endif
11934 char CRYPTO_new_ex_data ();
11935 int
11936 main ()
11937 {
11938 return CRYPTO_new_ex_data ();
11939   ;
11940   return 0;
11941 }
11942 _ACEOF
11943 if ac_fn_c_try_link "$LINENO"; then :
11944   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11945 else
11946   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11947 fi
11948 rm -f core conftest.err conftest.$ac_objext \
11949     conftest$ac_exeext conftest.$ac_ext
11950 LIBS=$ac_check_lib_save_LIBS
11951 fi
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11953 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11954 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11955   cat >>confdefs.h <<_ACEOF
11956 #define HAVE_LIBCRYPTO 1
11957 _ACEOF
11958
11959   LIBS="-lcrypto $LIBS"
11960
11961 else
11962   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11963 fi
11964
11965      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11966 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11967 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11968   $as_echo_n "(cached) " >&6
11969 else
11970   ac_check_lib_save_LIBS=$LIBS
11971 LIBS="-lssl  $LIBS"
11972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11973 /* end confdefs.h.  */
11974
11975 /* Override any GCC internal prototype to avoid an error.
11976    Use char because int might match the return type of a GCC
11977    builtin and then its argument prototype would still apply.  */
11978 #ifdef __cplusplus
11979 extern "C"
11980 #endif
11981 char SSL_new ();
11982 int
11983 main ()
11984 {
11985 return SSL_new ();
11986   ;
11987   return 0;
11988 }
11989 _ACEOF
11990 if ac_fn_c_try_link "$LINENO"; then :
11991   ac_cv_lib_ssl_SSL_new=yes
11992 else
11993   ac_cv_lib_ssl_SSL_new=no
11994 fi
11995 rm -f core conftest.err conftest.$ac_objext \
11996     conftest$ac_exeext conftest.$ac_ext
11997 LIBS=$ac_check_lib_save_LIBS
11998 fi
11999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12000 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12001 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12002   cat >>confdefs.h <<_ACEOF
12003 #define HAVE_LIBSSL 1
12004 _ACEOF
12005
12006   LIBS="-lssl $LIBS"
12007
12008 else
12009   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12010 fi
12011
12012   else
12013      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12014 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12015 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12016   $as_echo_n "(cached) " >&6
12017 else
12018   ac_func_search_save_LIBS=$LIBS
12019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12020 /* end confdefs.h.  */
12021
12022 /* Override any GCC internal prototype to avoid an error.
12023    Use char because int might match the return type of a GCC
12024    builtin and then its argument prototype would still apply.  */
12025 #ifdef __cplusplus
12026 extern "C"
12027 #endif
12028 char CRYPTO_new_ex_data ();
12029 int
12030 main ()
12031 {
12032 return CRYPTO_new_ex_data ();
12033   ;
12034   return 0;
12035 }
12036 _ACEOF
12037 for ac_lib in '' eay32 crypto; do
12038   if test -z "$ac_lib"; then
12039     ac_res="none required"
12040   else
12041     ac_res=-l$ac_lib
12042     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12043   fi
12044   if ac_fn_c_try_link "$LINENO"; then :
12045   ac_cv_search_CRYPTO_new_ex_data=$ac_res
12046 fi
12047 rm -f core conftest.err conftest.$ac_objext \
12048     conftest$ac_exeext
12049   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12050   break
12051 fi
12052 done
12053 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12054
12055 else
12056   ac_cv_search_CRYPTO_new_ex_data=no
12057 fi
12058 rm conftest.$ac_ext
12059 LIBS=$ac_func_search_save_LIBS
12060 fi
12061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12062 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12063 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12064 if test "$ac_res" != no; then :
12065   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12066
12067 else
12068   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12069 fi
12070
12071      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12072 $as_echo_n "checking for library containing SSL_new... " >&6; }
12073 if ${ac_cv_search_SSL_new+:} false; then :
12074   $as_echo_n "(cached) " >&6
12075 else
12076   ac_func_search_save_LIBS=$LIBS
12077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12078 /* end confdefs.h.  */
12079
12080 /* Override any GCC internal prototype to avoid an error.
12081    Use char because int might match the return type of a GCC
12082    builtin and then its argument prototype would still apply.  */
12083 #ifdef __cplusplus
12084 extern "C"
12085 #endif
12086 char SSL_new ();
12087 int
12088 main ()
12089 {
12090 return SSL_new ();
12091   ;
12092   return 0;
12093 }
12094 _ACEOF
12095 for ac_lib in '' ssleay32 ssl; do
12096   if test -z "$ac_lib"; then
12097     ac_res="none required"
12098   else
12099     ac_res=-l$ac_lib
12100     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12101   fi
12102   if ac_fn_c_try_link "$LINENO"; then :
12103   ac_cv_search_SSL_new=$ac_res
12104 fi
12105 rm -f core conftest.err conftest.$ac_objext \
12106     conftest$ac_exeext
12107   if ${ac_cv_search_SSL_new+:} false; then :
12108   break
12109 fi
12110 done
12111 if ${ac_cv_search_SSL_new+:} false; then :
12112
12113 else
12114   ac_cv_search_SSL_new=no
12115 fi
12116 rm conftest.$ac_ext
12117 LIBS=$ac_func_search_save_LIBS
12118 fi
12119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12120 $as_echo "$ac_cv_search_SSL_new" >&6; }
12121 ac_res=$ac_cv_search_SSL_new
12122 if test "$ac_res" != no; then :
12123   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12124
12125 else
12126   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12127 fi
12128
12129   fi
12130   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
12131 do :
12132   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12133 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12134 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12135   cat >>confdefs.h <<_ACEOF
12136 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12137 _ACEOF
12138
12139 fi
12140 done
12141
12142   # Functions introduced in OpenSSL 1.1.0. We used to check for
12143   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12144   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12145   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12146   # functions.
12147   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
12148 do :
12149   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12150 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12151 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12152   cat >>confdefs.h <<_ACEOF
12153 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12154 _ACEOF
12155
12156 fi
12157 done
12158
12159   # OpenSSL versions before 1.1.0 required setting callback functions, for
12160   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12161   # function was removed.
12162   for ac_func in CRYPTO_lock
12163 do :
12164   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12165 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12166   cat >>confdefs.h <<_ACEOF
12167 #define HAVE_CRYPTO_LOCK 1
12168 _ACEOF
12169
12170 fi
12171 done
12172
12173 fi
12174
12175 if test "$with_pam" = yes ; then
12176   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12177 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12178 if ${ac_cv_lib_pam_pam_start+:} false; then :
12179   $as_echo_n "(cached) " >&6
12180 else
12181   ac_check_lib_save_LIBS=$LIBS
12182 LIBS="-lpam  $LIBS"
12183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12184 /* end confdefs.h.  */
12185
12186 /* Override any GCC internal prototype to avoid an error.
12187    Use char because int might match the return type of a GCC
12188    builtin and then its argument prototype would still apply.  */
12189 #ifdef __cplusplus
12190 extern "C"
12191 #endif
12192 char pam_start ();
12193 int
12194 main ()
12195 {
12196 return pam_start ();
12197   ;
12198   return 0;
12199 }
12200 _ACEOF
12201 if ac_fn_c_try_link "$LINENO"; then :
12202   ac_cv_lib_pam_pam_start=yes
12203 else
12204   ac_cv_lib_pam_pam_start=no
12205 fi
12206 rm -f core conftest.err conftest.$ac_objext \
12207     conftest$ac_exeext conftest.$ac_ext
12208 LIBS=$ac_check_lib_save_LIBS
12209 fi
12210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12211 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12212 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12213   cat >>confdefs.h <<_ACEOF
12214 #define HAVE_LIBPAM 1
12215 _ACEOF
12216
12217   LIBS="-lpam $LIBS"
12218
12219 else
12220   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12221 fi
12222
12223 fi
12224
12225 if test "$with_libxml" = yes ; then
12226   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12227 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12228 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12229   $as_echo_n "(cached) " >&6
12230 else
12231   ac_check_lib_save_LIBS=$LIBS
12232 LIBS="-lxml2  $LIBS"
12233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12234 /* end confdefs.h.  */
12235
12236 /* Override any GCC internal prototype to avoid an error.
12237    Use char because int might match the return type of a GCC
12238    builtin and then its argument prototype would still apply.  */
12239 #ifdef __cplusplus
12240 extern "C"
12241 #endif
12242 char xmlSaveToBuffer ();
12243 int
12244 main ()
12245 {
12246 return xmlSaveToBuffer ();
12247   ;
12248   return 0;
12249 }
12250 _ACEOF
12251 if ac_fn_c_try_link "$LINENO"; then :
12252   ac_cv_lib_xml2_xmlSaveToBuffer=yes
12253 else
12254   ac_cv_lib_xml2_xmlSaveToBuffer=no
12255 fi
12256 rm -f core conftest.err conftest.$ac_objext \
12257     conftest$ac_exeext conftest.$ac_ext
12258 LIBS=$ac_check_lib_save_LIBS
12259 fi
12260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12261 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12262 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12263   cat >>confdefs.h <<_ACEOF
12264 #define HAVE_LIBXML2 1
12265 _ACEOF
12266
12267   LIBS="-lxml2 $LIBS"
12268
12269 else
12270   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12271 fi
12272
12273 fi
12274
12275 if test "$with_libxslt" = yes ; then
12276   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12277 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12278 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12279   $as_echo_n "(cached) " >&6
12280 else
12281   ac_check_lib_save_LIBS=$LIBS
12282 LIBS="-lxslt  $LIBS"
12283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12284 /* end confdefs.h.  */
12285
12286 /* Override any GCC internal prototype to avoid an error.
12287    Use char because int might match the return type of a GCC
12288    builtin and then its argument prototype would still apply.  */
12289 #ifdef __cplusplus
12290 extern "C"
12291 #endif
12292 char xsltCleanupGlobals ();
12293 int
12294 main ()
12295 {
12296 return xsltCleanupGlobals ();
12297   ;
12298   return 0;
12299 }
12300 _ACEOF
12301 if ac_fn_c_try_link "$LINENO"; then :
12302   ac_cv_lib_xslt_xsltCleanupGlobals=yes
12303 else
12304   ac_cv_lib_xslt_xsltCleanupGlobals=no
12305 fi
12306 rm -f core conftest.err conftest.$ac_objext \
12307     conftest$ac_exeext conftest.$ac_ext
12308 LIBS=$ac_check_lib_save_LIBS
12309 fi
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12311 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12312 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12313   cat >>confdefs.h <<_ACEOF
12314 #define HAVE_LIBXSLT 1
12315 _ACEOF
12316
12317   LIBS="-lxslt $LIBS"
12318
12319 else
12320   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12321 fi
12322
12323 fi
12324
12325 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12326 if test "$with_ldap" = yes ; then
12327   _LIBS="$LIBS"
12328   if test "$PORTNAME" != "win32"; then
12329     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12330 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12331 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12332   $as_echo_n "(cached) " >&6
12333 else
12334   ac_check_lib_save_LIBS=$LIBS
12335 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12337 /* end confdefs.h.  */
12338
12339 /* Override any GCC internal prototype to avoid an error.
12340    Use char because int might match the return type of a GCC
12341    builtin and then its argument prototype would still apply.  */
12342 #ifdef __cplusplus
12343 extern "C"
12344 #endif
12345 char ldap_bind ();
12346 int
12347 main ()
12348 {
12349 return ldap_bind ();
12350   ;
12351   return 0;
12352 }
12353 _ACEOF
12354 if ac_fn_c_try_link "$LINENO"; then :
12355   ac_cv_lib_ldap_ldap_bind=yes
12356 else
12357   ac_cv_lib_ldap_ldap_bind=no
12358 fi
12359 rm -f core conftest.err conftest.$ac_objext \
12360     conftest$ac_exeext conftest.$ac_ext
12361 LIBS=$ac_check_lib_save_LIBS
12362 fi
12363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12364 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12365 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12366   cat >>confdefs.h <<_ACEOF
12367 #define HAVE_LIBLDAP 1
12368 _ACEOF
12369
12370   LIBS="-lldap $LIBS"
12371
12372 else
12373   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12374 fi
12375
12376     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12377     if test "$enable_thread_safety" = yes; then
12378       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12379       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12380 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12381 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12382   $as_echo_n "(cached) " >&6
12383 else
12384   ac_check_lib_save_LIBS=$LIBS
12385 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12387 /* end confdefs.h.  */
12388
12389 /* Override any GCC internal prototype to avoid an error.
12390    Use char because int might match the return type of a GCC
12391    builtin and then its argument prototype would still apply.  */
12392 #ifdef __cplusplus
12393 extern "C"
12394 #endif
12395 char ldap_simple_bind ();
12396 int
12397 main ()
12398 {
12399 return ldap_simple_bind ();
12400   ;
12401   return 0;
12402 }
12403 _ACEOF
12404 if ac_fn_c_try_link "$LINENO"; then :
12405   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12406 else
12407   ac_cv_lib_ldap_r_ldap_simple_bind=no
12408 fi
12409 rm -f core conftest.err conftest.$ac_objext \
12410     conftest$ac_exeext conftest.$ac_ext
12411 LIBS=$ac_check_lib_save_LIBS
12412 fi
12413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12414 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12415 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12416   cat >>confdefs.h <<_ACEOF
12417 #define HAVE_LIBLDAP_R 1
12418 _ACEOF
12419
12420   LIBS="-lldap_r $LIBS"
12421
12422 else
12423   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12424 fi
12425
12426       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12427     else
12428       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12429     fi
12430     for ac_func in ldap_initialize
12431 do :
12432   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12433 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12434   cat >>confdefs.h <<_ACEOF
12435 #define HAVE_LDAP_INITIALIZE 1
12436 _ACEOF
12437
12438 fi
12439 done
12440
12441   else
12442     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12443 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12444 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12445   $as_echo_n "(cached) " >&6
12446 else
12447   ac_check_lib_save_LIBS=$LIBS
12448 LIBS="-lwldap32  $LIBS"
12449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12450 /* end confdefs.h.  */
12451
12452 /* Override any GCC internal prototype to avoid an error.
12453    Use char because int might match the return type of a GCC
12454    builtin and then its argument prototype would still apply.  */
12455 #ifdef __cplusplus
12456 extern "C"
12457 #endif
12458 char ldap_bind ();
12459 int
12460 main ()
12461 {
12462 return ldap_bind ();
12463   ;
12464   return 0;
12465 }
12466 _ACEOF
12467 if ac_fn_c_try_link "$LINENO"; then :
12468   ac_cv_lib_wldap32_ldap_bind=yes
12469 else
12470   ac_cv_lib_wldap32_ldap_bind=no
12471 fi
12472 rm -f core conftest.err conftest.$ac_objext \
12473     conftest$ac_exeext conftest.$ac_ext
12474 LIBS=$ac_check_lib_save_LIBS
12475 fi
12476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12477 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12478 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12479   cat >>confdefs.h <<_ACEOF
12480 #define HAVE_LIBWLDAP32 1
12481 _ACEOF
12482
12483   LIBS="-lwldap32 $LIBS"
12484
12485 else
12486   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12487 fi
12488
12489     LDAP_LIBS_FE="-lwldap32"
12490     LDAP_LIBS_BE="-lwldap32"
12491   fi
12492   LIBS="$_LIBS"
12493 fi
12494
12495
12496
12497 # for contrib/sepgsql
12498 if test "$with_selinux" = yes; then
12499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12500 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12501 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12502   $as_echo_n "(cached) " >&6
12503 else
12504   ac_check_lib_save_LIBS=$LIBS
12505 LIBS="-lselinux  $LIBS"
12506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12507 /* end confdefs.h.  */
12508
12509 /* Override any GCC internal prototype to avoid an error.
12510    Use char because int might match the return type of a GCC
12511    builtin and then its argument prototype would still apply.  */
12512 #ifdef __cplusplus
12513 extern "C"
12514 #endif
12515 char security_compute_create_name ();
12516 int
12517 main ()
12518 {
12519 return security_compute_create_name ();
12520   ;
12521   return 0;
12522 }
12523 _ACEOF
12524 if ac_fn_c_try_link "$LINENO"; then :
12525   ac_cv_lib_selinux_security_compute_create_name=yes
12526 else
12527   ac_cv_lib_selinux_security_compute_create_name=no
12528 fi
12529 rm -f core conftest.err conftest.$ac_objext \
12530     conftest$ac_exeext conftest.$ac_ext
12531 LIBS=$ac_check_lib_save_LIBS
12532 fi
12533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12534 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12535 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12536   cat >>confdefs.h <<_ACEOF
12537 #define HAVE_LIBSELINUX 1
12538 _ACEOF
12539
12540   LIBS="-lselinux $LIBS"
12541
12542 else
12543   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12544 fi
12545
12546 fi
12547
12548 # for contrib/uuid-ossp
12549 if test "$with_uuid" = bsd ; then
12550   # On BSD, the UUID functions are in libc
12551   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12552 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12553   UUID_LIBS=""
12554 else
12555   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12556 fi
12557
12558 elif test "$with_uuid" = e2fs ; then
12559   # On macOS, the UUID functions are in libc
12560   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12561 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12562   UUID_LIBS=""
12563 else
12564   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12565 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12566 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12567   $as_echo_n "(cached) " >&6
12568 else
12569   ac_check_lib_save_LIBS=$LIBS
12570 LIBS="-luuid  $LIBS"
12571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12572 /* end confdefs.h.  */
12573
12574 /* Override any GCC internal prototype to avoid an error.
12575    Use char because int might match the return type of a GCC
12576    builtin and then its argument prototype would still apply.  */
12577 #ifdef __cplusplus
12578 extern "C"
12579 #endif
12580 char uuid_generate ();
12581 int
12582 main ()
12583 {
12584 return uuid_generate ();
12585   ;
12586   return 0;
12587 }
12588 _ACEOF
12589 if ac_fn_c_try_link "$LINENO"; then :
12590   ac_cv_lib_uuid_uuid_generate=yes
12591 else
12592   ac_cv_lib_uuid_uuid_generate=no
12593 fi
12594 rm -f core conftest.err conftest.$ac_objext \
12595     conftest$ac_exeext conftest.$ac_ext
12596 LIBS=$ac_check_lib_save_LIBS
12597 fi
12598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12599 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12600 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12601   UUID_LIBS="-luuid"
12602 else
12603   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12604 fi
12605
12606 fi
12607
12608 elif test "$with_uuid" = ossp ; then
12609   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12610 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12611 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12612   $as_echo_n "(cached) " >&6
12613 else
12614   ac_check_lib_save_LIBS=$LIBS
12615 LIBS="-lossp-uuid  $LIBS"
12616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12617 /* end confdefs.h.  */
12618
12619 /* Override any GCC internal prototype to avoid an error.
12620    Use char because int might match the return type of a GCC
12621    builtin and then its argument prototype would still apply.  */
12622 #ifdef __cplusplus
12623 extern "C"
12624 #endif
12625 char uuid_export ();
12626 int
12627 main ()
12628 {
12629 return uuid_export ();
12630   ;
12631   return 0;
12632 }
12633 _ACEOF
12634 if ac_fn_c_try_link "$LINENO"; then :
12635   ac_cv_lib_ossp_uuid_uuid_export=yes
12636 else
12637   ac_cv_lib_ossp_uuid_uuid_export=no
12638 fi
12639 rm -f core conftest.err conftest.$ac_objext \
12640     conftest$ac_exeext conftest.$ac_ext
12641 LIBS=$ac_check_lib_save_LIBS
12642 fi
12643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12644 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12645 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12646   UUID_LIBS="-lossp-uuid"
12647 else
12648   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12649 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12650 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12651   $as_echo_n "(cached) " >&6
12652 else
12653   ac_check_lib_save_LIBS=$LIBS
12654 LIBS="-luuid  $LIBS"
12655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12656 /* end confdefs.h.  */
12657
12658 /* Override any GCC internal prototype to avoid an error.
12659    Use char because int might match the return type of a GCC
12660    builtin and then its argument prototype would still apply.  */
12661 #ifdef __cplusplus
12662 extern "C"
12663 #endif
12664 char uuid_export ();
12665 int
12666 main ()
12667 {
12668 return uuid_export ();
12669   ;
12670   return 0;
12671 }
12672 _ACEOF
12673 if ac_fn_c_try_link "$LINENO"; then :
12674   ac_cv_lib_uuid_uuid_export=yes
12675 else
12676   ac_cv_lib_uuid_uuid_export=no
12677 fi
12678 rm -f core conftest.err conftest.$ac_objext \
12679     conftest$ac_exeext conftest.$ac_ext
12680 LIBS=$ac_check_lib_save_LIBS
12681 fi
12682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12683 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12684 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12685   UUID_LIBS="-luuid"
12686 else
12687   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12688 fi
12689
12690 fi
12691
12692 fi
12693
12694
12695
12696 ##
12697 ## Header files
12698 ##
12699
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12701 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12702 if ${ac_cv_header_stdbool_h+:} false; then :
12703   $as_echo_n "(cached) " >&6
12704 else
12705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12706 /* end confdefs.h.  */
12707
12708              #include <stdbool.h>
12709              #ifndef bool
12710               "error: bool is not defined"
12711              #endif
12712              #ifndef false
12713               "error: false is not defined"
12714              #endif
12715              #if false
12716               "error: false is not 0"
12717              #endif
12718              #ifndef true
12719               "error: true is not defined"
12720              #endif
12721              #if true != 1
12722               "error: true is not 1"
12723              #endif
12724              #ifndef __bool_true_false_are_defined
12725               "error: __bool_true_false_are_defined is not defined"
12726              #endif
12727
12728              struct s { _Bool s: 1; _Bool t; } s;
12729
12730              char a[true == 1 ? 1 : -1];
12731              char b[false == 0 ? 1 : -1];
12732              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12733              char d[(bool) 0.5 == true ? 1 : -1];
12734              /* See body of main program for 'e'.  */
12735              char f[(_Bool) 0.0 == false ? 1 : -1];
12736              char g[true];
12737              char h[sizeof (_Bool)];
12738              char i[sizeof s.t];
12739              enum { j = false, k = true, l = false * true, m = true * 256 };
12740              /* The following fails for
12741                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12742              _Bool n[m];
12743              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12744              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12745              /* Catch a bug in an HP-UX C compiler.  See
12746                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12747                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12748               */
12749              _Bool q = true;
12750              _Bool *pq = &q;
12751
12752 int
12753 main ()
12754 {
12755
12756              bool e = &s;
12757              *pq |= q;
12758              *pq |= ! q;
12759              /* Refer to every declared value, to avoid compiler optimizations.  */
12760              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12761                      + !m + !n + !o + !p + !q + !pq);
12762
12763   ;
12764   return 0;
12765 }
12766 _ACEOF
12767 if ac_fn_c_try_compile "$LINENO"; then :
12768   ac_cv_header_stdbool_h=yes
12769 else
12770   ac_cv_header_stdbool_h=no
12771 fi
12772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12773 fi
12774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12775 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12776    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12777 if test "x$ac_cv_type__Bool" = xyes; then :
12778
12779 cat >>confdefs.h <<_ACEOF
12780 #define HAVE__BOOL 1
12781 _ACEOF
12782
12783
12784 fi
12785
12786
12787 if test $ac_cv_header_stdbool_h = yes; then
12788
12789 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12790
12791 fi
12792
12793
12794 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
12795 do :
12796   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12797 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12798 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12799   cat >>confdefs.h <<_ACEOF
12800 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12801 _ACEOF
12802
12803 fi
12804
12805 done
12806
12807
12808 # On BSD, test for net/if.h will fail unless sys/socket.h
12809 # is included first.
12810 for ac_header in net/if.h
12811 do :
12812   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12813 #include <sys/socket.h>
12814
12815 "
12816 if test "x$ac_cv_header_net_if_h" = xyes; then :
12817   cat >>confdefs.h <<_ACEOF
12818 #define HAVE_NET_IF_H 1
12819 _ACEOF
12820
12821 fi
12822
12823 done
12824
12825
12826 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12827 # is included first.
12828 for ac_header in sys/ucred.h
12829 do :
12830   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12831 #include <sys/param.h>
12832
12833 "
12834 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12835   cat >>confdefs.h <<_ACEOF
12836 #define HAVE_SYS_UCRED_H 1
12837 _ACEOF
12838
12839 fi
12840
12841 done
12842
12843
12844 # At least on IRIX, test for netinet/tcp.h will fail unless
12845 # netinet/in.h is included first.
12846 for ac_header in netinet/tcp.h
12847 do :
12848   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12849 #include <netinet/in.h>
12850
12851 "
12852 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12853   cat >>confdefs.h <<_ACEOF
12854 #define HAVE_NETINET_TCP_H 1
12855 _ACEOF
12856
12857 fi
12858
12859 done
12860
12861
12862 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12863   for ac_header in readline/readline.h
12864 do :
12865   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12866 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12867   cat >>confdefs.h <<_ACEOF
12868 #define HAVE_READLINE_READLINE_H 1
12869 _ACEOF
12870
12871 else
12872   for ac_header in readline.h
12873 do :
12874   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12875 if test "x$ac_cv_header_readline_h" = xyes; then :
12876   cat >>confdefs.h <<_ACEOF
12877 #define HAVE_READLINE_H 1
12878 _ACEOF
12879
12880 else
12881   as_fn_error $? "readline header not found
12882 If you have readline already installed, see config.log for details on the
12883 failure.  It is possible the compiler isn't looking in the proper directory.
12884 Use --without-readline to disable readline support." "$LINENO" 5
12885 fi
12886
12887 done
12888
12889 fi
12890
12891 done
12892
12893   for ac_header in readline/history.h
12894 do :
12895   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12896 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12897   cat >>confdefs.h <<_ACEOF
12898 #define HAVE_READLINE_HISTORY_H 1
12899 _ACEOF
12900
12901 else
12902   for ac_header in history.h
12903 do :
12904   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12905 if test "x$ac_cv_header_history_h" = xyes; then :
12906   cat >>confdefs.h <<_ACEOF
12907 #define HAVE_HISTORY_H 1
12908 _ACEOF
12909
12910 else
12911   as_fn_error $? "history header not found
12912 If you have readline already installed, see config.log for details on the
12913 failure.  It is possible the compiler isn't looking in the proper directory.
12914 Use --without-readline to disable readline support." "$LINENO" 5
12915 fi
12916
12917 done
12918
12919 fi
12920
12921 done
12922
12923 fi
12924
12925 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12926 # Some installations of libedit usurp /usr/include/readline/, which seems
12927 # bad practice, since in combined installations readline will have its headers
12928 # there.  We might have to resort to AC_EGREP checks to make sure we found
12929 # the proper header...
12930   for ac_header in editline/readline.h
12931 do :
12932   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12933 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12934   cat >>confdefs.h <<_ACEOF
12935 #define HAVE_EDITLINE_READLINE_H 1
12936 _ACEOF
12937
12938 else
12939   for ac_header in readline.h
12940 do :
12941   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12942 if test "x$ac_cv_header_readline_h" = xyes; then :
12943   cat >>confdefs.h <<_ACEOF
12944 #define HAVE_READLINE_H 1
12945 _ACEOF
12946
12947 else
12948   for ac_header in readline/readline.h
12949 do :
12950   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12951 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12952   cat >>confdefs.h <<_ACEOF
12953 #define HAVE_READLINE_READLINE_H 1
12954 _ACEOF
12955
12956 else
12957   as_fn_error $? "readline header not found
12958 If you have libedit already installed, see config.log for details on the
12959 failure.  It is possible the compiler isn't looking in the proper directory.
12960 Use --without-readline to disable libedit support." "$LINENO" 5
12961 fi
12962
12963 done
12964
12965 fi
12966
12967 done
12968
12969 fi
12970
12971 done
12972
12973 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12974 # not be there at all.  Hence, don't complain if not found.  We must check
12975 # though, since in yet other versions it is an independent header.
12976   for ac_header in editline/history.h
12977 do :
12978   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12979 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12980   cat >>confdefs.h <<_ACEOF
12981 #define HAVE_EDITLINE_HISTORY_H 1
12982 _ACEOF
12983
12984 else
12985   for ac_header in history.h
12986 do :
12987   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12988 if test "x$ac_cv_header_history_h" = xyes; then :
12989   cat >>confdefs.h <<_ACEOF
12990 #define HAVE_HISTORY_H 1
12991 _ACEOF
12992
12993 else
12994   for ac_header in readline/history.h
12995 do :
12996   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12997 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12998   cat >>confdefs.h <<_ACEOF
12999 #define HAVE_READLINE_HISTORY_H 1
13000 _ACEOF
13001
13002 fi
13003
13004 done
13005
13006 fi
13007
13008 done
13009
13010 fi
13011
13012 done
13013
13014 fi
13015
13016 if test "$with_zlib" = yes; then
13017   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13018 if test "x$ac_cv_header_zlib_h" = xyes; then :
13019
13020 else
13021   as_fn_error $? "zlib header not found
13022 If you have zlib already installed, see config.log for details on the
13023 failure.  It is possible the compiler isn't looking in the proper directory.
13024 Use --without-zlib to disable zlib support." "$LINENO" 5
13025 fi
13026
13027
13028 fi
13029
13030 if test "$with_gssapi" = yes ; then
13031   for ac_header in gssapi/gssapi.h
13032 do :
13033   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13034 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13035   cat >>confdefs.h <<_ACEOF
13036 #define HAVE_GSSAPI_GSSAPI_H 1
13037 _ACEOF
13038
13039 else
13040   for ac_header in gssapi.h
13041 do :
13042   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13043 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13044   cat >>confdefs.h <<_ACEOF
13045 #define HAVE_GSSAPI_H 1
13046 _ACEOF
13047
13048 else
13049   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13050 fi
13051
13052 done
13053
13054 fi
13055
13056 done
13057
13058 fi
13059
13060 if test "$with_openssl" = yes ; then
13061   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13062 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13063
13064 else
13065   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13066 fi
13067
13068
13069   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13070 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13071
13072 else
13073   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13074 fi
13075
13076
13077 fi
13078
13079 if test "$with_pam" = yes ; then
13080   for ac_header in security/pam_appl.h
13081 do :
13082   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13083 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13084   cat >>confdefs.h <<_ACEOF
13085 #define HAVE_SECURITY_PAM_APPL_H 1
13086 _ACEOF
13087
13088 else
13089   for ac_header in pam/pam_appl.h
13090 do :
13091   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13092 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13093   cat >>confdefs.h <<_ACEOF
13094 #define HAVE_PAM_PAM_APPL_H 1
13095 _ACEOF
13096
13097 else
13098   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13099 fi
13100
13101 done
13102
13103 fi
13104
13105 done
13106
13107 fi
13108
13109 if test "$with_bsd_auth" = yes ; then
13110   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13111 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13112
13113 else
13114   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13115 fi
13116
13117
13118 fi
13119
13120 if test "$with_systemd" = yes ; then
13121   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13122 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13123
13124 else
13125   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13126 fi
13127
13128
13129 fi
13130
13131 if test "$with_libxml" = yes ; then
13132   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13133 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13134
13135 else
13136   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13137 fi
13138
13139
13140 fi
13141
13142 if test "$with_libxslt" = yes ; then
13143   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13144 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13145
13146 else
13147   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13148 fi
13149
13150
13151 fi
13152
13153 if test "$with_ldap" = yes ; then
13154   if test "$PORTNAME" != "win32"; then
13155      for ac_header in ldap.h
13156 do :
13157   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13158 if test "x$ac_cv_header_ldap_h" = xyes; then :
13159   cat >>confdefs.h <<_ACEOF
13160 #define HAVE_LDAP_H 1
13161 _ACEOF
13162
13163 else
13164   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13165 fi
13166
13167 done
13168
13169      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13170 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13171 if ${pgac_cv_ldap_safe+:} false; then :
13172   $as_echo_n "(cached) " >&6
13173 else
13174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13175 /* end confdefs.h.  */
13176 #include <ldap.h>
13177 #if !defined(LDAP_VENDOR_VERSION) || \
13178      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13179       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13180 choke me
13181 #endif
13182 int
13183 main ()
13184 {
13185
13186   ;
13187   return 0;
13188 }
13189 _ACEOF
13190 if ac_fn_c_try_compile "$LINENO"; then :
13191   pgac_cv_ldap_safe=yes
13192 else
13193   pgac_cv_ldap_safe=no
13194 fi
13195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13196 fi
13197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13198 $as_echo "$pgac_cv_ldap_safe" >&6; }
13199
13200 if test "$pgac_cv_ldap_safe" != yes; then
13201   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13202 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13203 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13204 *** also uses LDAP will crash on exit." >&5
13205 $as_echo "$as_me: WARNING:
13206 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13207 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13208 *** also uses LDAP will crash on exit." >&2;}
13209 fi
13210   else
13211      for ac_header in winldap.h
13212 do :
13213   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13214 #include <windows.h>
13215
13216 "
13217 if test "x$ac_cv_header_winldap_h" = xyes; then :
13218   cat >>confdefs.h <<_ACEOF
13219 #define HAVE_WINLDAP_H 1
13220 _ACEOF
13221
13222 else
13223   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13224 fi
13225
13226 done
13227
13228   fi
13229 fi
13230
13231 if test "$with_bonjour" = yes ; then
13232   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13233 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13234
13235 else
13236   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13237 fi
13238
13239
13240 fi
13241
13242 # for contrib/uuid-ossp
13243 if test "$with_uuid" = bsd ; then
13244   for ac_header in uuid.h
13245 do :
13246   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13247 if test "x$ac_cv_header_uuid_h" = xyes; then :
13248   cat >>confdefs.h <<_ACEOF
13249 #define HAVE_UUID_H 1
13250 _ACEOF
13251  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13252 /* end confdefs.h.  */
13253 #include <uuid.h>
13254
13255 _ACEOF
13256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13257   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13258
13259 else
13260   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13261 fi
13262 rm -f conftest*
13263
13264 else
13265   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13266 fi
13267
13268 done
13269
13270 elif test "$with_uuid" = e2fs ; then
13271   for ac_header in uuid/uuid.h
13272 do :
13273   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13274 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13275   cat >>confdefs.h <<_ACEOF
13276 #define HAVE_UUID_UUID_H 1
13277 _ACEOF
13278  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13279 /* end confdefs.h.  */
13280 #include <uuid/uuid.h>
13281
13282 _ACEOF
13283 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13284   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13285
13286 else
13287   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13288 fi
13289 rm -f conftest*
13290
13291 else
13292   for ac_header in uuid.h
13293 do :
13294   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13295 if test "x$ac_cv_header_uuid_h" = xyes; then :
13296   cat >>confdefs.h <<_ACEOF
13297 #define HAVE_UUID_H 1
13298 _ACEOF
13299  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13300 /* end confdefs.h.  */
13301 #include <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.h> does not match E2FS UUID library" "$LINENO" 5
13309 fi
13310 rm -f conftest*
13311
13312 else
13313   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13314 fi
13315
13316 done
13317
13318 fi
13319
13320 done
13321
13322 elif test "$with_uuid" = ossp ; then
13323   for ac_header in ossp/uuid.h
13324 do :
13325   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13326 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13327   cat >>confdefs.h <<_ACEOF
13328 #define HAVE_OSSP_UUID_H 1
13329 _ACEOF
13330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13331 /* end confdefs.h.  */
13332 #include <ossp/uuid.h>
13333
13334 _ACEOF
13335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13336   $EGREP "uuid_export" >/dev/null 2>&1; then :
13337
13338 else
13339   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13340 fi
13341 rm -f conftest*
13342
13343 else
13344   for ac_header in uuid.h
13345 do :
13346   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13347 if test "x$ac_cv_header_uuid_h" = xyes; then :
13348   cat >>confdefs.h <<_ACEOF
13349 #define HAVE_UUID_H 1
13350 _ACEOF
13351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13352 /* end confdefs.h.  */
13353 #include <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 <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13361 fi
13362 rm -f conftest*
13363
13364 else
13365   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13366 fi
13367
13368 done
13369
13370 fi
13371
13372 done
13373
13374 fi
13375
13376 if test "$PORTNAME" = "win32" ; then
13377    for ac_header in crtdefs.h
13378 do :
13379   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13380 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13381   cat >>confdefs.h <<_ACEOF
13382 #define HAVE_CRTDEFS_H 1
13383 _ACEOF
13384
13385 fi
13386
13387 done
13388
13389 fi
13390
13391 ##
13392 ## Types, structures, compiler characteristics
13393 ##
13394
13395   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13396 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13397 if ${ac_cv_c_bigendian+:} false; then :
13398   $as_echo_n "(cached) " >&6
13399 else
13400   ac_cv_c_bigendian=unknown
13401     # See if we're dealing with a universal compiler.
13402     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13403 /* end confdefs.h.  */
13404 #ifndef __APPLE_CC__
13405                not a universal capable compiler
13406              #endif
13407              typedef int dummy;
13408
13409 _ACEOF
13410 if ac_fn_c_try_compile "$LINENO"; then :
13411
13412         # Check for potential -arch flags.  It is not universal unless
13413         # there are at least two -arch flags with different values.
13414         ac_arch=
13415         ac_prev=
13416         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13417          if test -n "$ac_prev"; then
13418            case $ac_word in
13419              i?86 | x86_64 | ppc | ppc64)
13420                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13421                  ac_arch=$ac_word
13422                else
13423                  ac_cv_c_bigendian=universal
13424                  break
13425                fi
13426                ;;
13427            esac
13428            ac_prev=
13429          elif test "x$ac_word" = "x-arch"; then
13430            ac_prev=arch
13431          fi
13432        done
13433 fi
13434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13435     if test $ac_cv_c_bigendian = unknown; then
13436       # See if sys/param.h defines the BYTE_ORDER macro.
13437       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13438 /* end confdefs.h.  */
13439 #include <sys/types.h>
13440              #include <sys/param.h>
13441
13442 int
13443 main ()
13444 {
13445 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13446                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13447                      && LITTLE_ENDIAN)
13448               bogus endian macros
13449              #endif
13450
13451   ;
13452   return 0;
13453 }
13454 _ACEOF
13455 if ac_fn_c_try_compile "$LINENO"; then :
13456   # It does; now see whether it defined to BIG_ENDIAN or not.
13457          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13458 /* end confdefs.h.  */
13459 #include <sys/types.h>
13460                 #include <sys/param.h>
13461
13462 int
13463 main ()
13464 {
13465 #if BYTE_ORDER != BIG_ENDIAN
13466                  not big endian
13467                 #endif
13468
13469   ;
13470   return 0;
13471 }
13472 _ACEOF
13473 if ac_fn_c_try_compile "$LINENO"; then :
13474   ac_cv_c_bigendian=yes
13475 else
13476   ac_cv_c_bigendian=no
13477 fi
13478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13479 fi
13480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13481     fi
13482     if test $ac_cv_c_bigendian = unknown; then
13483       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13484       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13485 /* end confdefs.h.  */
13486 #include <limits.h>
13487
13488 int
13489 main ()
13490 {
13491 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13492               bogus endian macros
13493              #endif
13494
13495   ;
13496   return 0;
13497 }
13498 _ACEOF
13499 if ac_fn_c_try_compile "$LINENO"; then :
13500   # It does; now see whether it defined to _BIG_ENDIAN or not.
13501          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13502 /* end confdefs.h.  */
13503 #include <limits.h>
13504
13505 int
13506 main ()
13507 {
13508 #ifndef _BIG_ENDIAN
13509                  not big endian
13510                 #endif
13511
13512   ;
13513   return 0;
13514 }
13515 _ACEOF
13516 if ac_fn_c_try_compile "$LINENO"; then :
13517   ac_cv_c_bigendian=yes
13518 else
13519   ac_cv_c_bigendian=no
13520 fi
13521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13522 fi
13523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13524     fi
13525     if test $ac_cv_c_bigendian = unknown; then
13526       # Compile a test program.
13527       if test "$cross_compiling" = yes; then :
13528   # Try to guess by grepping values from an object file.
13529          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13530 /* end confdefs.h.  */
13531 short int ascii_mm[] =
13532                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13533                 short int ascii_ii[] =
13534                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13535                 int use_ascii (int i) {
13536                   return ascii_mm[i] + ascii_ii[i];
13537                 }
13538                 short int ebcdic_ii[] =
13539                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13540                 short int ebcdic_mm[] =
13541                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13542                 int use_ebcdic (int i) {
13543                   return ebcdic_mm[i] + ebcdic_ii[i];
13544                 }
13545                 extern int foo;
13546
13547 int
13548 main ()
13549 {
13550 return use_ascii (foo) == use_ebcdic (foo);
13551   ;
13552   return 0;
13553 }
13554 _ACEOF
13555 if ac_fn_c_try_compile "$LINENO"; then :
13556   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13557               ac_cv_c_bigendian=yes
13558             fi
13559             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13560               if test "$ac_cv_c_bigendian" = unknown; then
13561                 ac_cv_c_bigendian=no
13562               else
13563                 # finding both strings is unlikely to happen, but who knows?
13564                 ac_cv_c_bigendian=unknown
13565               fi
13566             fi
13567 fi
13568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13569 else
13570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13571 /* end confdefs.h.  */
13572 $ac_includes_default
13573 int
13574 main ()
13575 {
13576
13577              /* Are we little or big endian?  From Harbison&Steele.  */
13578              union
13579              {
13580                long int l;
13581                char c[sizeof (long int)];
13582              } u;
13583              u.l = 1;
13584              return u.c[sizeof (long int) - 1] == 1;
13585
13586   ;
13587   return 0;
13588 }
13589 _ACEOF
13590 if ac_fn_c_try_run "$LINENO"; then :
13591   ac_cv_c_bigendian=no
13592 else
13593   ac_cv_c_bigendian=yes
13594 fi
13595 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13596   conftest.$ac_objext conftest.beam conftest.$ac_ext
13597 fi
13598
13599     fi
13600 fi
13601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13602 $as_echo "$ac_cv_c_bigendian" >&6; }
13603  case $ac_cv_c_bigendian in #(
13604    yes)
13605      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13606 ;; #(
13607    no)
13608       ;; #(
13609    universal)
13610
13611 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13612
13613      ;; #(
13614    *)
13615      as_fn_error $? "unknown endianness
13616  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13617  esac
13618
13619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13620 $as_echo_n "checking for inline... " >&6; }
13621 if ${ac_cv_c_inline+:} false; then :
13622   $as_echo_n "(cached) " >&6
13623 else
13624   ac_cv_c_inline=no
13625 for ac_kw in inline __inline__ __inline; do
13626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13627 /* end confdefs.h.  */
13628 #ifndef __cplusplus
13629 typedef int foo_t;
13630 static $ac_kw foo_t static_foo () {return 0; }
13631 $ac_kw foo_t foo () {return 0; }
13632 #endif
13633
13634 _ACEOF
13635 if ac_fn_c_try_compile "$LINENO"; then :
13636   ac_cv_c_inline=$ac_kw
13637 fi
13638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13639   test "$ac_cv_c_inline" != no && break
13640 done
13641
13642 fi
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13644 $as_echo "$ac_cv_c_inline" >&6; }
13645
13646 case $ac_cv_c_inline in
13647   inline | yes) ;;
13648   *)
13649     case $ac_cv_c_inline in
13650       no) ac_val=;;
13651       *) ac_val=$ac_cv_c_inline;;
13652     esac
13653     cat >>confdefs.h <<_ACEOF
13654 #ifndef __cplusplus
13655 #define inline $ac_val
13656 #endif
13657 _ACEOF
13658     ;;
13659 esac
13660
13661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13662 $as_echo_n "checking for printf format archetype... " >&6; }
13663 if ${pgac_cv_printf_archetype+:} false; then :
13664   $as_echo_n "(cached) " >&6
13665 else
13666   pgac_cv_printf_archetype=gnu_printf
13667 ac_save_c_werror_flag=$ac_c_werror_flag
13668 ac_c_werror_flag=yes
13669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13670 /* end confdefs.h.  */
13671 extern void pgac_write(int ignore, const char *fmt,...)
13672 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13673 int
13674 main ()
13675 {
13676 pgac_write(0, "error %s: %m", "foo");
13677   ;
13678   return 0;
13679 }
13680 _ACEOF
13681 if ac_fn_c_try_compile "$LINENO"; then :
13682   ac_archetype_ok=yes
13683 else
13684   ac_archetype_ok=no
13685 fi
13686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13687 ac_c_werror_flag=$ac_save_c_werror_flag
13688
13689 if [ "$ac_archetype_ok" = no ]; then
13690   pgac_cv_printf_archetype=__syslog__
13691   ac_save_c_werror_flag=$ac_c_werror_flag
13692 ac_c_werror_flag=yes
13693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13694 /* end confdefs.h.  */
13695 extern void pgac_write(int ignore, const char *fmt,...)
13696 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13697 int
13698 main ()
13699 {
13700 pgac_write(0, "error %s: %m", "foo");
13701   ;
13702   return 0;
13703 }
13704 _ACEOF
13705 if ac_fn_c_try_compile "$LINENO"; then :
13706   ac_archetype_ok=yes
13707 else
13708   ac_archetype_ok=no
13709 fi
13710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13711 ac_c_werror_flag=$ac_save_c_werror_flag
13712
13713   if [ "$ac_archetype_ok" = no ]; then
13714     pgac_cv_printf_archetype=printf
13715   fi
13716 fi
13717 fi
13718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13719 $as_echo "$pgac_cv_printf_archetype" >&6; }
13720
13721 cat >>confdefs.h <<_ACEOF
13722 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13723 _ACEOF
13724
13725
13726
13727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13728 $as_echo_n "checking for flexible array members... " >&6; }
13729 if ${ac_cv_c_flexmember+:} false; then :
13730   $as_echo_n "(cached) " >&6
13731 else
13732   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13733 /* end confdefs.h.  */
13734 #include <stdlib.h>
13735             #include <stdio.h>
13736             #include <stddef.h>
13737             struct s { int n; double d[]; };
13738 int
13739 main ()
13740 {
13741 int m = getchar ();
13742             struct s *p = malloc (offsetof (struct s, d)
13743                                   + m * sizeof (double));
13744             p->d[0] = 0.0;
13745             return p->d != (double *) NULL;
13746   ;
13747   return 0;
13748 }
13749 _ACEOF
13750 if ac_fn_c_try_compile "$LINENO"; then :
13751   ac_cv_c_flexmember=yes
13752 else
13753   ac_cv_c_flexmember=no
13754 fi
13755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13756 fi
13757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13758 $as_echo "$ac_cv_c_flexmember" >&6; }
13759   if test $ac_cv_c_flexmember = yes; then
13760
13761 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13762
13763   else
13764     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13765
13766   fi
13767
13768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13769 $as_echo_n "checking for signed types... " >&6; }
13770 if ${pgac_cv_c_signed+:} false; then :
13771   $as_echo_n "(cached) " >&6
13772 else
13773   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13774 /* end confdefs.h.  */
13775
13776 int
13777 main ()
13778 {
13779 signed char c; signed short s; signed int i;
13780   ;
13781   return 0;
13782 }
13783 _ACEOF
13784 if ac_fn_c_try_compile "$LINENO"; then :
13785   pgac_cv_c_signed=yes
13786 else
13787   pgac_cv_c_signed=no
13788 fi
13789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13790 fi
13791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13792 $as_echo "$pgac_cv_c_signed" >&6; }
13793 if test x"$pgac_cv_c_signed" = xno ; then
13794
13795 $as_echo "#define signed /**/" >>confdefs.h
13796
13797 fi
13798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13799 $as_echo_n "checking for __func__... " >&6; }
13800 if ${pgac_cv_funcname_func_support+:} false; then :
13801   $as_echo_n "(cached) " >&6
13802 else
13803   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13804 /* end confdefs.h.  */
13805 #include <stdio.h>
13806 int
13807 main ()
13808 {
13809 printf("%s\n", __func__);
13810   ;
13811   return 0;
13812 }
13813 _ACEOF
13814 if ac_fn_c_try_compile "$LINENO"; then :
13815   pgac_cv_funcname_func_support=yes
13816 else
13817   pgac_cv_funcname_func_support=no
13818 fi
13819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13820 fi
13821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13822 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13823 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13824
13825 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13826
13827 else
13828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13829 $as_echo_n "checking for __FUNCTION__... " >&6; }
13830 if ${pgac_cv_funcname_function_support+:} false; then :
13831   $as_echo_n "(cached) " >&6
13832 else
13833   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13834 /* end confdefs.h.  */
13835 #include <stdio.h>
13836 int
13837 main ()
13838 {
13839 printf("%s\n", __FUNCTION__);
13840   ;
13841   return 0;
13842 }
13843 _ACEOF
13844 if ac_fn_c_try_compile "$LINENO"; then :
13845   pgac_cv_funcname_function_support=yes
13846 else
13847   pgac_cv_funcname_function_support=no
13848 fi
13849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13850 fi
13851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13852 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13853 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13854
13855 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13856
13857 fi
13858 fi
13859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13860 $as_echo_n "checking for _Static_assert... " >&6; }
13861 if ${pgac_cv__static_assert+:} false; then :
13862   $as_echo_n "(cached) " >&6
13863 else
13864   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13865 /* end confdefs.h.  */
13866
13867 int
13868 main ()
13869 {
13870 ({ _Static_assert(1, "foo"); })
13871   ;
13872   return 0;
13873 }
13874 _ACEOF
13875 if ac_fn_c_try_link "$LINENO"; then :
13876   pgac_cv__static_assert=yes
13877 else
13878   pgac_cv__static_assert=no
13879 fi
13880 rm -f core conftest.err conftest.$ac_objext \
13881     conftest$ac_exeext conftest.$ac_ext
13882 fi
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13884 $as_echo "$pgac_cv__static_assert" >&6; }
13885 if test x"$pgac_cv__static_assert" = xyes ; then
13886
13887 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13888
13889 fi
13890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13891 $as_echo_n "checking for typeof... " >&6; }
13892 if ${pgac_cv_c_typeof+:} false; then :
13893   $as_echo_n "(cached) " >&6
13894 else
13895   pgac_cv_c_typeof=no
13896 for pgac_kw in typeof __typeof__ decltype; do
13897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13898 /* end confdefs.h.  */
13899
13900 int
13901 main ()
13902 {
13903 int x = 0;
13904 $pgac_kw(x) y;
13905 y = x;
13906 return y;
13907   ;
13908   return 0;
13909 }
13910 _ACEOF
13911 if ac_fn_c_try_compile "$LINENO"; then :
13912   pgac_cv_c_typeof=$pgac_kw
13913 fi
13914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13915   test "$pgac_cv_c_typeof" != no && break
13916 done
13917 fi
13918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13919 $as_echo "$pgac_cv_c_typeof" >&6; }
13920 if test "$pgac_cv_c_typeof" != no; then
13921
13922 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13923
13924   if test "$pgac_cv_c_typeof" != typeof; then
13925
13926 cat >>confdefs.h <<_ACEOF
13927 #define typeof $pgac_cv_c_typeof
13928 _ACEOF
13929
13930   fi
13931 fi
13932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13933 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13934 if ${pgac_cv__types_compatible+:} false; then :
13935   $as_echo_n "(cached) " >&6
13936 else
13937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13938 /* end confdefs.h.  */
13939
13940 int
13941 main ()
13942 {
13943  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13944   ;
13945   return 0;
13946 }
13947 _ACEOF
13948 if ac_fn_c_try_compile "$LINENO"; then :
13949   pgac_cv__types_compatible=yes
13950 else
13951   pgac_cv__types_compatible=no
13952 fi
13953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13954 fi
13955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13956 $as_echo "$pgac_cv__types_compatible" >&6; }
13957 if test x"$pgac_cv__types_compatible" = xyes ; then
13958
13959 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13960
13961 fi
13962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13963 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13964 if ${pgac_cv__builtin_bswap16+:} false; then :
13965   $as_echo_n "(cached) " >&6
13966 else
13967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13968 /* end confdefs.h.  */
13969 static unsigned long int x = __builtin_bswap16(0xaabb);
13970
13971 _ACEOF
13972 if ac_fn_c_try_compile "$LINENO"; then :
13973   pgac_cv__builtin_bswap16=yes
13974 else
13975   pgac_cv__builtin_bswap16=no
13976 fi
13977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13978 fi
13979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13980 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13981 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13982
13983 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13984
13985 fi
13986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13987 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13988 if ${pgac_cv__builtin_bswap32+:} false; then :
13989   $as_echo_n "(cached) " >&6
13990 else
13991   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13992 /* end confdefs.h.  */
13993 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13994
13995 _ACEOF
13996 if ac_fn_c_try_compile "$LINENO"; then :
13997   pgac_cv__builtin_bswap32=yes
13998 else
13999   pgac_cv__builtin_bswap32=no
14000 fi
14001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14002 fi
14003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
14004 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
14005 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
14006
14007 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
14008
14009 fi
14010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
14011 $as_echo_n "checking for __builtin_bswap64... " >&6; }
14012 if ${pgac_cv__builtin_bswap64+:} false; then :
14013   $as_echo_n "(cached) " >&6
14014 else
14015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14016 /* end confdefs.h.  */
14017 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
14018
14019 _ACEOF
14020 if ac_fn_c_try_compile "$LINENO"; then :
14021   pgac_cv__builtin_bswap64=yes
14022 else
14023   pgac_cv__builtin_bswap64=no
14024 fi
14025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14026 fi
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
14028 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
14029 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
14030
14031 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
14032
14033 fi
14034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14035 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14036 if ${pgac_cv__builtin_constant_p+:} false; then :
14037   $as_echo_n "(cached) " >&6
14038 else
14039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14040 /* end confdefs.h.  */
14041 static int x;
14042   static int y[__builtin_constant_p(x) ? x : 1];
14043   static int z[__builtin_constant_p("string literal") ? 1 : x];
14044
14045
14046 _ACEOF
14047 if ac_fn_c_try_compile "$LINENO"; then :
14048   pgac_cv__builtin_constant_p=yes
14049 else
14050   pgac_cv__builtin_constant_p=no
14051 fi
14052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14053 fi
14054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14055 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14056 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14057
14058 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14059
14060 fi
14061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14062 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14063 if ${pgac_cv__builtin_unreachable+:} false; then :
14064   $as_echo_n "(cached) " >&6
14065 else
14066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14067 /* end confdefs.h.  */
14068
14069 int
14070 main ()
14071 {
14072 __builtin_unreachable();
14073   ;
14074   return 0;
14075 }
14076 _ACEOF
14077 if ac_fn_c_try_link "$LINENO"; then :
14078   pgac_cv__builtin_unreachable=yes
14079 else
14080   pgac_cv__builtin_unreachable=no
14081 fi
14082 rm -f core conftest.err conftest.$ac_objext \
14083     conftest$ac_exeext conftest.$ac_ext
14084 fi
14085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14086 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14087 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14088
14089 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14090
14091 fi
14092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14093 $as_echo_n "checking for computed goto support... " >&6; }
14094 if ${pgac_cv_computed_goto+:} false; then :
14095   $as_echo_n "(cached) " >&6
14096 else
14097   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14098 /* end confdefs.h.  */
14099
14100 int
14101 main ()
14102 {
14103 void *labeladdrs[] = {&&my_label};
14104   goto *labeladdrs[0];
14105   my_label:
14106   return 1;
14107
14108   ;
14109   return 0;
14110 }
14111 _ACEOF
14112 if ac_fn_c_try_compile "$LINENO"; then :
14113   pgac_cv_computed_goto=yes
14114 else
14115   pgac_cv_computed_goto=no
14116 fi
14117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14118 fi
14119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14120 $as_echo "$pgac_cv_computed_goto" >&6; }
14121 if test x"$pgac_cv_computed_goto" = xyes ; then
14122
14123 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14124
14125 fi
14126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14127 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14128 if ${ac_cv_struct_tm+:} false; then :
14129   $as_echo_n "(cached) " >&6
14130 else
14131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14132 /* end confdefs.h.  */
14133 #include <sys/types.h>
14134 #include <time.h>
14135
14136 int
14137 main ()
14138 {
14139 struct tm tm;
14140                                      int *p = &tm.tm_sec;
14141                                      return !p;
14142   ;
14143   return 0;
14144 }
14145 _ACEOF
14146 if ac_fn_c_try_compile "$LINENO"; then :
14147   ac_cv_struct_tm=time.h
14148 else
14149   ac_cv_struct_tm=sys/time.h
14150 fi
14151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14152 fi
14153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14154 $as_echo "$ac_cv_struct_tm" >&6; }
14155 if test $ac_cv_struct_tm = sys/time.h; then
14156
14157 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14158
14159 fi
14160
14161 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14162 #include <$ac_cv_struct_tm>
14163
14164 "
14165 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14166
14167 cat >>confdefs.h <<_ACEOF
14168 #define HAVE_STRUCT_TM_TM_ZONE 1
14169 _ACEOF
14170
14171
14172 fi
14173
14174 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14175
14176 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14177
14178 fi
14179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14180 $as_echo_n "checking for tzname... " >&6; }
14181 if ${ac_cv_var_tzname+:} false; then :
14182   $as_echo_n "(cached) " >&6
14183 else
14184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14185 /* end confdefs.h.  */
14186 #include <stdlib.h>
14187 #include <time.h>
14188 #ifndef tzname /* For SGI.  */
14189 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
14190 #endif
14191
14192 int
14193 main ()
14194 {
14195 atoi(*tzname);
14196   ;
14197   return 0;
14198 }
14199 _ACEOF
14200 if ac_fn_c_try_link "$LINENO"; then :
14201   ac_cv_var_tzname=yes
14202 else
14203   ac_cv_var_tzname=no
14204 fi
14205 rm -f core conftest.err conftest.$ac_objext \
14206     conftest$ac_exeext conftest.$ac_ext
14207 fi
14208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14209 $as_echo "$ac_cv_var_tzname" >&6; }
14210 if test $ac_cv_var_tzname = yes; then
14211
14212 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14213
14214 fi
14215
14216 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14217 #ifdef HAVE_SYS_IPC_H
14218 #include <sys/ipc.h>
14219 #endif
14220 #ifdef HAVE_SYS_SEM_H
14221 #include <sys/sem.h>
14222 #endif
14223 "
14224 if test "x$ac_cv_type_union_semun" = xyes; then :
14225
14226 cat >>confdefs.h <<_ACEOF
14227 #define HAVE_UNION_SEMUN 1
14228 _ACEOF
14229
14230
14231 fi
14232
14233 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14234 #ifdef HAVE_SYS_UN_H
14235 #include <sys/un.h>
14236 #endif
14237
14238 "
14239 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14240
14241 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14242
14243 fi
14244
14245 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14246 #include <sys/socket.h>
14247
14248 "
14249 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14250
14251 cat >>confdefs.h <<_ACEOF
14252 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14253 _ACEOF
14254
14255
14256 fi
14257
14258 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14259 #include <sys/socket.h>
14260
14261 "
14262 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14263
14264 cat >>confdefs.h <<_ACEOF
14265 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14266 _ACEOF
14267
14268
14269 fi
14270 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14271 #include <sys/socket.h>
14272
14273 "
14274 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14275
14276 cat >>confdefs.h <<_ACEOF
14277 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14278 _ACEOF
14279
14280
14281 fi
14282 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14283 #include <sys/socket.h>
14284
14285 "
14286 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14287
14288 cat >>confdefs.h <<_ACEOF
14289 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14290 _ACEOF
14291
14292
14293 fi
14294 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14295 #include <sys/socket.h>
14296
14297 "
14298 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14299
14300 cat >>confdefs.h <<_ACEOF
14301 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14302 _ACEOF
14303
14304
14305 fi
14306 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14307 #include <sys/socket.h>
14308
14309 "
14310 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14311
14312 cat >>confdefs.h <<_ACEOF
14313 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14314 _ACEOF
14315
14316
14317 fi
14318
14319 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14320 #include <sys/socket.h>
14321 #include <netdb.h>
14322
14323 "
14324 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14325
14326 cat >>confdefs.h <<_ACEOF
14327 #define HAVE_STRUCT_ADDRINFO 1
14328 _ACEOF
14329
14330
14331 fi
14332
14333
14334   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14335 if test "x$ac_cv_type_intptr_t" = xyes; then :
14336
14337 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14338
14339 else
14340   for ac_type in 'int' 'long int' 'long long int'; do
14341        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14342 /* end confdefs.h.  */
14343 $ac_includes_default
14344 int
14345 main ()
14346 {
14347 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14348 test_array [0] = 0;
14349 return test_array [0];
14350
14351   ;
14352   return 0;
14353 }
14354 _ACEOF
14355 if ac_fn_c_try_compile "$LINENO"; then :
14356
14357 cat >>confdefs.h <<_ACEOF
14358 #define intptr_t $ac_type
14359 _ACEOF
14360
14361           ac_type=
14362 fi
14363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14364        test -z "$ac_type" && break
14365      done
14366 fi
14367
14368
14369
14370   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14371 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14372
14373 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14374
14375 else
14376   for ac_type in 'unsigned int' 'unsigned long int' \
14377         'unsigned long long int'; do
14378        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14379 /* end confdefs.h.  */
14380 $ac_includes_default
14381 int
14382 main ()
14383 {
14384 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14385 test_array [0] = 0;
14386 return test_array [0];
14387
14388   ;
14389   return 0;
14390 }
14391 _ACEOF
14392 if ac_fn_c_try_compile "$LINENO"; then :
14393
14394 cat >>confdefs.h <<_ACEOF
14395 #define uintptr_t $ac_type
14396 _ACEOF
14397
14398           ac_type=
14399 fi
14400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14401        test -z "$ac_type" && break
14402      done
14403 fi
14404
14405
14406
14407   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14408 $as_echo_n "checking for unsigned long long int... " >&6; }
14409 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14410   $as_echo_n "(cached) " >&6
14411 else
14412   ac_cv_type_unsigned_long_long_int=yes
14413      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14414        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14415 /* end confdefs.h.  */
14416
14417   /* For now, do not test the preprocessor; as of 2007 there are too many
14418          implementations with broken preprocessors.  Perhaps this can
14419          be revisited in 2012.  In the meantime, code should not expect
14420          #if to work with literals wider than 32 bits.  */
14421       /* Test literals.  */
14422       long long int ll = 9223372036854775807ll;
14423       long long int nll = -9223372036854775807LL;
14424       unsigned long long int ull = 18446744073709551615ULL;
14425       /* Test constant expressions.   */
14426       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14427                      ? 1 : -1)];
14428       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14429                      ? 1 : -1)];
14430       int i = 63;
14431 int
14432 main ()
14433 {
14434 /* Test availability of runtime routines for shift and division.  */
14435       long long int llmax = 9223372036854775807ll;
14436       unsigned long long int ullmax = 18446744073709551615ull;
14437       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14438               | (llmax / ll) | (llmax % ll)
14439               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14440               | (ullmax / ull) | (ullmax % ull));
14441   ;
14442   return 0;
14443 }
14444
14445 _ACEOF
14446 if ac_fn_c_try_link "$LINENO"; then :
14447
14448 else
14449   ac_cv_type_unsigned_long_long_int=no
14450 fi
14451 rm -f core conftest.err conftest.$ac_objext \
14452     conftest$ac_exeext conftest.$ac_ext
14453      fi
14454 fi
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14456 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14457   if test $ac_cv_type_unsigned_long_long_int = yes; then
14458
14459 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14460
14461   fi
14462
14463
14464
14465   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14466 $as_echo_n "checking for long long int... " >&6; }
14467 if ${ac_cv_type_long_long_int+:} false; then :
14468   $as_echo_n "(cached) " >&6
14469 else
14470   ac_cv_type_long_long_int=yes
14471       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14472         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14473         if test $ac_cv_type_long_long_int = yes; then
14474                                   if test "$cross_compiling" = yes; then :
14475   :
14476 else
14477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14478 /* end confdefs.h.  */
14479 #include <limits.h>
14480                  #ifndef LLONG_MAX
14481                  # define HALF \
14482                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14483                  # define LLONG_MAX (HALF - 1 + HALF)
14484                  #endif
14485 int
14486 main ()
14487 {
14488 long long int n = 1;
14489                  int i;
14490                  for (i = 0; ; i++)
14491                    {
14492                      long long int m = n << i;
14493                      if (m >> i != n)
14494                        return 1;
14495                      if (LLONG_MAX / 2 < m)
14496                        break;
14497                    }
14498                  return 0;
14499   ;
14500   return 0;
14501 }
14502 _ACEOF
14503 if ac_fn_c_try_run "$LINENO"; then :
14504
14505 else
14506   ac_cv_type_long_long_int=no
14507 fi
14508 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14509   conftest.$ac_objext conftest.beam conftest.$ac_ext
14510 fi
14511
14512         fi
14513       fi
14514 fi
14515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14516 $as_echo "$ac_cv_type_long_long_int" >&6; }
14517   if test $ac_cv_type_long_long_int = yes; then
14518
14519 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14520
14521   fi
14522
14523
14524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14525 $as_echo_n "checking for locale_t... " >&6; }
14526 if ${pgac_cv_type_locale_t+:} false; then :
14527   $as_echo_n "(cached) " >&6
14528 else
14529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14530 /* end confdefs.h.  */
14531 #include <locale.h>
14532 locale_t x;
14533 int
14534 main ()
14535 {
14536
14537   ;
14538   return 0;
14539 }
14540 _ACEOF
14541 if ac_fn_c_try_compile "$LINENO"; then :
14542   pgac_cv_type_locale_t=yes
14543 else
14544   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14545 /* end confdefs.h.  */
14546 #include <xlocale.h>
14547 locale_t x;
14548 int
14549 main ()
14550 {
14551
14552   ;
14553   return 0;
14554 }
14555 _ACEOF
14556 if ac_fn_c_try_compile "$LINENO"; then :
14557   pgac_cv_type_locale_t='yes (in xlocale.h)'
14558 else
14559   pgac_cv_type_locale_t=no
14560 fi
14561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14562 fi
14563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14564 fi
14565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14566 $as_echo "$pgac_cv_type_locale_t" >&6; }
14567 if test "$pgac_cv_type_locale_t" != no; then
14568
14569 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14570
14571 fi
14572 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14573
14574 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14575
14576 fi
14577
14578 # MSVC doesn't cope well with defining restrict to __restrict, the
14579 # spelling it understands, because it conflicts with
14580 # __declspec(restrict). Therefore we define pg_restrict to the
14581 # appropriate definition, which presumably won't conflict.
14582 #
14583 # Allow platforms with buggy compilers to force restrict to not be
14584 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14585 # template.
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14587 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14588 if ${ac_cv_c_restrict+:} false; then :
14589   $as_echo_n "(cached) " >&6
14590 else
14591   ac_cv_c_restrict=no
14592    # The order here caters to the fact that C++ does not require restrict.
14593    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14594      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14595 /* end confdefs.h.  */
14596 typedef int * int_ptr;
14597         int foo (int_ptr $ac_kw ip) {
14598         return ip[0];
14599        }
14600 int
14601 main ()
14602 {
14603 int s[1];
14604         int * $ac_kw t = s;
14605         t[0] = 0;
14606         return foo(t)
14607   ;
14608   return 0;
14609 }
14610 _ACEOF
14611 if ac_fn_c_try_compile "$LINENO"; then :
14612   ac_cv_c_restrict=$ac_kw
14613 fi
14614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14615      test "$ac_cv_c_restrict" != no && break
14616    done
14617
14618 fi
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14620 $as_echo "$ac_cv_c_restrict" >&6; }
14621
14622  case $ac_cv_c_restrict in
14623    restrict) ;;
14624    no) $as_echo "#define restrict /**/" >>confdefs.h
14625  ;;
14626    *)  cat >>confdefs.h <<_ACEOF
14627 #define restrict $ac_cv_c_restrict
14628 _ACEOF
14629  ;;
14630  esac
14631
14632 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14633   pg_restrict=""
14634 else
14635   pg_restrict="$ac_cv_c_restrict"
14636 fi
14637
14638 cat >>confdefs.h <<_ACEOF
14639 #define pg_restrict $pg_restrict
14640 _ACEOF
14641
14642
14643 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14644 #include <sys/param.h>
14645 #ifdef HAVE_SYS_UCRED_H
14646 #include <sys/ucred.h>
14647 #endif
14648 "
14649 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14650
14651 cat >>confdefs.h <<_ACEOF
14652 #define HAVE_STRUCT_CMSGCRED 1
14653 _ACEOF
14654
14655
14656 fi
14657
14658
14659 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14660 #include <getopt.h>
14661 #endif
14662 "
14663 if test "x$ac_cv_type_struct_option" = xyes; then :
14664
14665 cat >>confdefs.h <<_ACEOF
14666 #define HAVE_STRUCT_OPTION 1
14667 _ACEOF
14668
14669
14670 fi
14671
14672
14673 if test "$with_zlib" = yes; then
14674   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14675   # did not).  While we could work around the lack of z_streamp, it
14676   # seems unwise to encourage people to use such old zlib versions...
14677   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14678 "
14679 if test "x$ac_cv_type_z_streamp" = xyes; then :
14680
14681 else
14682   as_fn_error $? "zlib version is too old
14683 Use --without-zlib to disable zlib support." "$LINENO" 5
14684 fi
14685
14686 fi
14687
14688 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14689 case $host_cpu in
14690   ppc*|powerpc*)
14691     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14692 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14693     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14694 /* end confdefs.h.  */
14695
14696 int
14697 main ()
14698 {
14699 int a = 0; int *p = &a; int r;
14700          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14701   ;
14702   return 0;
14703 }
14704 _ACEOF
14705 if ac_fn_c_try_compile "$LINENO"; then :
14706   pgac_cv_have_ppc_mutex_hint=yes
14707 else
14708   pgac_cv_have_ppc_mutex_hint=no
14709 fi
14710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14711     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14712 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14713     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14714
14715 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14716
14717     fi
14718   ;;
14719 esac
14720
14721 # Check largefile support.  You might think this is a system service not a
14722 # compiler characteristic, but you'd be wrong.  We must check this before
14723 # probing existence of related functions such as fseeko, since the largefile
14724 # defines can affect what is generated for that.
14725 if test "$PORTNAME" != "win32"; then
14726    # Check whether --enable-largefile was given.
14727 if test "${enable_largefile+set}" = set; then :
14728   enableval=$enable_largefile;
14729 fi
14730
14731 if test "$enable_largefile" != no; then
14732
14733   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14734 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14735 if ${ac_cv_sys_largefile_CC+:} false; then :
14736   $as_echo_n "(cached) " >&6
14737 else
14738   ac_cv_sys_largefile_CC=no
14739      if test "$GCC" != yes; then
14740        ac_save_CC=$CC
14741        while :; do
14742          # IRIX 6.2 and later do not support large files by default,
14743          # so use the C compiler's -n32 option if that helps.
14744          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14745 /* end confdefs.h.  */
14746 #include <sys/types.h>
14747  /* Check that off_t can represent 2**63 - 1 correctly.
14748     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14749     since some C++ compilers masquerading as C compilers
14750     incorrectly reject 9223372036854775807.  */
14751 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14752   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14753                        && LARGE_OFF_T % 2147483647 == 1)
14754                       ? 1 : -1];
14755 int
14756 main ()
14757 {
14758
14759   ;
14760   return 0;
14761 }
14762 _ACEOF
14763          if ac_fn_c_try_compile "$LINENO"; then :
14764   break
14765 fi
14766 rm -f core conftest.err conftest.$ac_objext
14767          CC="$CC -n32"
14768          if ac_fn_c_try_compile "$LINENO"; then :
14769   ac_cv_sys_largefile_CC=' -n32'; break
14770 fi
14771 rm -f core conftest.err conftest.$ac_objext
14772          break
14773        done
14774        CC=$ac_save_CC
14775        rm -f conftest.$ac_ext
14776     fi
14777 fi
14778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14779 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14780   if test "$ac_cv_sys_largefile_CC" != no; then
14781     CC=$CC$ac_cv_sys_largefile_CC
14782   fi
14783
14784   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14785 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14786 if ${ac_cv_sys_file_offset_bits+:} false; then :
14787   $as_echo_n "(cached) " >&6
14788 else
14789   while :; do
14790   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14791 /* end confdefs.h.  */
14792 #include <sys/types.h>
14793  /* Check that off_t can represent 2**63 - 1 correctly.
14794     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14795     since some C++ compilers masquerading as C compilers
14796     incorrectly reject 9223372036854775807.  */
14797 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14798   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14799                        && LARGE_OFF_T % 2147483647 == 1)
14800                       ? 1 : -1];
14801 int
14802 main ()
14803 {
14804
14805   ;
14806   return 0;
14807 }
14808 _ACEOF
14809 if ac_fn_c_try_compile "$LINENO"; then :
14810   ac_cv_sys_file_offset_bits=no; break
14811 fi
14812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14814 /* end confdefs.h.  */
14815 #define _FILE_OFFSET_BITS 64
14816 #include <sys/types.h>
14817  /* Check that off_t can represent 2**63 - 1 correctly.
14818     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14819     since some C++ compilers masquerading as C compilers
14820     incorrectly reject 9223372036854775807.  */
14821 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14822   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14823                        && LARGE_OFF_T % 2147483647 == 1)
14824                       ? 1 : -1];
14825 int
14826 main ()
14827 {
14828
14829   ;
14830   return 0;
14831 }
14832 _ACEOF
14833 if ac_fn_c_try_compile "$LINENO"; then :
14834   ac_cv_sys_file_offset_bits=64; break
14835 fi
14836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14837   ac_cv_sys_file_offset_bits=unknown
14838   break
14839 done
14840 fi
14841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14842 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14843 case $ac_cv_sys_file_offset_bits in #(
14844   no | unknown) ;;
14845   *)
14846 cat >>confdefs.h <<_ACEOF
14847 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14848 _ACEOF
14849 ;;
14850 esac
14851 rm -rf conftest*
14852   if test $ac_cv_sys_file_offset_bits = unknown; then
14853     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14854 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14855 if ${ac_cv_sys_large_files+:} false; then :
14856   $as_echo_n "(cached) " >&6
14857 else
14858   while :; do
14859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14860 /* end confdefs.h.  */
14861 #include <sys/types.h>
14862  /* Check that off_t can represent 2**63 - 1 correctly.
14863     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14864     since some C++ compilers masquerading as C compilers
14865     incorrectly reject 9223372036854775807.  */
14866 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14867   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14868                        && LARGE_OFF_T % 2147483647 == 1)
14869                       ? 1 : -1];
14870 int
14871 main ()
14872 {
14873
14874   ;
14875   return 0;
14876 }
14877 _ACEOF
14878 if ac_fn_c_try_compile "$LINENO"; then :
14879   ac_cv_sys_large_files=no; break
14880 fi
14881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14883 /* end confdefs.h.  */
14884 #define _LARGE_FILES 1
14885 #include <sys/types.h>
14886  /* Check that off_t can represent 2**63 - 1 correctly.
14887     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14888     since some C++ compilers masquerading as C compilers
14889     incorrectly reject 9223372036854775807.  */
14890 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14891   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14892                        && LARGE_OFF_T % 2147483647 == 1)
14893                       ? 1 : -1];
14894 int
14895 main ()
14896 {
14897
14898   ;
14899   return 0;
14900 }
14901 _ACEOF
14902 if ac_fn_c_try_compile "$LINENO"; then :
14903   ac_cv_sys_large_files=1; break
14904 fi
14905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14906   ac_cv_sys_large_files=unknown
14907   break
14908 done
14909 fi
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14911 $as_echo "$ac_cv_sys_large_files" >&6; }
14912 case $ac_cv_sys_large_files in #(
14913   no | unknown) ;;
14914   *)
14915 cat >>confdefs.h <<_ACEOF
14916 #define _LARGE_FILES $ac_cv_sys_large_files
14917 _ACEOF
14918 ;;
14919 esac
14920 rm -rf conftest*
14921   fi
14922
14923
14924 fi
14925
14926
14927 fi
14928
14929 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14930 # The cast to long int works around a bug in the HP C Compiler
14931 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14932 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14933 # This bug is HP SR number 8606223364.
14934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14935 $as_echo_n "checking size of off_t... " >&6; }
14936 if ${ac_cv_sizeof_off_t+:} false; then :
14937   $as_echo_n "(cached) " >&6
14938 else
14939   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14940
14941 else
14942   if test "$ac_cv_type_off_t" = yes; then
14943      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14944 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14945 as_fn_error 77 "cannot compute sizeof (off_t)
14946 See \`config.log' for more details" "$LINENO" 5; }
14947    else
14948      ac_cv_sizeof_off_t=0
14949    fi
14950 fi
14951
14952 fi
14953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14954 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14955
14956
14957
14958 cat >>confdefs.h <<_ACEOF
14959 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14960 _ACEOF
14961
14962
14963
14964 # If we don't have largefile support, can't handle segsize >= 2GB.
14965 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14966    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14967 fi
14968
14969 # The cast to long int works around a bug in the HP C Compiler
14970 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14971 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14972 # This bug is HP SR number 8606223364.
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14974 $as_echo_n "checking size of bool... " >&6; }
14975 if ${ac_cv_sizeof_bool+:} false; then :
14976   $as_echo_n "(cached) " >&6
14977 else
14978   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
14979 #include <stdbool.h>
14980 #endif
14981 "; then :
14982
14983 else
14984   if test "$ac_cv_type_bool" = yes; then
14985      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14986 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14987 as_fn_error 77 "cannot compute sizeof (bool)
14988 See \`config.log' for more details" "$LINENO" 5; }
14989    else
14990      ac_cv_sizeof_bool=0
14991    fi
14992 fi
14993
14994 fi
14995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14996 $as_echo "$ac_cv_sizeof_bool" >&6; }
14997
14998
14999
15000 cat >>confdefs.h <<_ACEOF
15001 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15002 _ACEOF
15003
15004
15005
15006
15007 ##
15008 ## Functions, global variables
15009 ##
15010
15011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15012 $as_echo_n "checking for int timezone... " >&6; }
15013 if ${pgac_cv_var_int_timezone+:} false; then :
15014   $as_echo_n "(cached) " >&6
15015 else
15016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15017 /* end confdefs.h.  */
15018 #include <time.h>
15019 int res;
15020 int
15021 main ()
15022 {
15023 #ifndef __CYGWIN__
15024 res = timezone / 60;
15025 #else
15026 res = _timezone / 60;
15027 #endif
15028   ;
15029   return 0;
15030 }
15031 _ACEOF
15032 if ac_fn_c_try_link "$LINENO"; then :
15033   pgac_cv_var_int_timezone=yes
15034 else
15035   pgac_cv_var_int_timezone=no
15036 fi
15037 rm -f core conftest.err conftest.$ac_objext \
15038     conftest$ac_exeext conftest.$ac_ext
15039 fi
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15041 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15042 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15043
15044 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15045
15046 fi
15047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15048 $as_echo_n "checking types of arguments for accept()... " >&6; }
15049  if ${ac_cv_func_accept_return+:} false; then :
15050   $as_echo_n "(cached) " >&6
15051 else
15052    if ${ac_cv_func_accept_arg1+:} false; then :
15053   $as_echo_n "(cached) " >&6
15054 else
15055     if ${ac_cv_func_accept_arg2+:} false; then :
15056   $as_echo_n "(cached) " >&6
15057 else
15058      if ${ac_cv_func_accept_arg3+:} false; then :
15059   $as_echo_n "(cached) " >&6
15060 else
15061       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
15062       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
15063        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15064         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15065          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15066 /* end confdefs.h.  */
15067 #include <sys/types.h>
15068 #include <sys/socket.h>
15069 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15070 _ACEOF
15071 if ac_fn_c_try_compile "$LINENO"; then :
15072   ac_not_found=no; break 4
15073 else
15074   ac_not_found=yes
15075 fi
15076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15077        done
15078       done
15079      done
15080     done
15081     if test "$ac_not_found" = yes; then
15082       as_fn_error $? "could not determine argument types" "$LINENO" 5
15083     fi
15084     if test "$ac_cv_func_accept_arg3" = "void"; then
15085       ac_cv_func_accept_arg3=int
15086     fi
15087
15088 fi
15089
15090 fi
15091
15092 fi
15093
15094 fi
15095  { $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
15096 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15097
15098 cat >>confdefs.h <<_ACEOF
15099 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15100 _ACEOF
15101
15102
15103 cat >>confdefs.h <<_ACEOF
15104 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15105 _ACEOF
15106
15107
15108 cat >>confdefs.h <<_ACEOF
15109 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15110 _ACEOF
15111
15112
15113 cat >>confdefs.h <<_ACEOF
15114 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15115 _ACEOF
15116
15117
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15119 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15120 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15121   $as_echo_n "(cached) " >&6
15122 else
15123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15124 /* end confdefs.h.  */
15125 #include <sys/time.h>
15126 int
15127 main ()
15128 {
15129 struct timeval *tp;
15130 struct timezone *tzp;
15131 gettimeofday(tp,tzp);
15132   ;
15133   return 0;
15134 }
15135 _ACEOF
15136 if ac_fn_c_try_compile "$LINENO"; then :
15137   pgac_cv_func_gettimeofday_1arg=no
15138 else
15139   pgac_cv_func_gettimeofday_1arg=yes
15140 fi
15141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15142 fi
15143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15144 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15145 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15146
15147 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15148
15149 fi
15150
15151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15152 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15153 if ${pgac_cv_func_wcstombs_l+:} false; then :
15154   $as_echo_n "(cached) " >&6
15155 else
15156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15157 /* end confdefs.h.  */
15158 #include <stdlib.h>
15159 #include <locale.h>
15160 int
15161 main ()
15162 {
15163 #ifndef wcstombs_l
15164 (void) wcstombs_l;
15165 #endif
15166   ;
15167   return 0;
15168 }
15169 _ACEOF
15170 if ac_fn_c_try_compile "$LINENO"; then :
15171   pgac_cv_func_wcstombs_l='yes'
15172 else
15173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15174 /* end confdefs.h.  */
15175 #include <stdlib.h>
15176 #include <locale.h>
15177 #include <xlocale.h>
15178 int
15179 main ()
15180 {
15181 #ifndef wcstombs_l
15182 (void) wcstombs_l;
15183 #endif
15184   ;
15185   return 0;
15186 }
15187 _ACEOF
15188 if ac_fn_c_try_compile "$LINENO"; then :
15189   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15190 else
15191   pgac_cv_func_wcstombs_l='no'
15192 fi
15193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15194 fi
15195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15196 fi
15197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15198 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15199 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15200
15201 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15202
15203 fi
15204
15205 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15206 # symbols that that library has no business exposing to the world.  Pending
15207 # acquisition of a clue by those developers, ignore libedit (including its
15208 # possible alias of libreadline) while checking for everything else.
15209 LIBS_including_readline="$LIBS"
15210 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15211
15212 for ac_func in cbrt clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range utime utimes wcstombs_l
15213 do :
15214   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15215 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15216 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15217   cat >>confdefs.h <<_ACEOF
15218 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15219 _ACEOF
15220
15221 fi
15222 done
15223
15224
15225 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15226 if test "x$ac_cv_func_fseeko" = xyes; then :
15227   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15228
15229 else
15230   case " $LIBOBJS " in
15231   *" fseeko.$ac_objext "* ) ;;
15232   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15233  ;;
15234 esac
15235
15236 fi
15237
15238
15239 case $host_os in
15240         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15241         # Mingw uses macros to access Win32 API calls
15242         netbsd*|mingw*)
15243
15244 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15245
15246                 ac_cv_func_fseeko=yes;;
15247         *)
15248                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15249 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15250 if ${ac_cv_sys_largefile_source+:} false; then :
15251   $as_echo_n "(cached) " >&6
15252 else
15253   while :; do
15254   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15255 /* end confdefs.h.  */
15256 #include <sys/types.h> /* for off_t */
15257      #include <stdio.h>
15258 int
15259 main ()
15260 {
15261 int (*fp) (FILE *, off_t, int) = fseeko;
15262      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15263   ;
15264   return 0;
15265 }
15266 _ACEOF
15267 if ac_fn_c_try_link "$LINENO"; then :
15268   ac_cv_sys_largefile_source=no; break
15269 fi
15270 rm -f core conftest.err conftest.$ac_objext \
15271     conftest$ac_exeext conftest.$ac_ext
15272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15273 /* end confdefs.h.  */
15274 #define _LARGEFILE_SOURCE 1
15275 #include <sys/types.h> /* for off_t */
15276      #include <stdio.h>
15277 int
15278 main ()
15279 {
15280 int (*fp) (FILE *, off_t, int) = fseeko;
15281      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15282   ;
15283   return 0;
15284 }
15285 _ACEOF
15286 if ac_fn_c_try_link "$LINENO"; then :
15287   ac_cv_sys_largefile_source=1; break
15288 fi
15289 rm -f core conftest.err conftest.$ac_objext \
15290     conftest$ac_exeext conftest.$ac_ext
15291   ac_cv_sys_largefile_source=unknown
15292   break
15293 done
15294 fi
15295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15296 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15297 case $ac_cv_sys_largefile_source in #(
15298   no | unknown) ;;
15299   *)
15300 cat >>confdefs.h <<_ACEOF
15301 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15302 _ACEOF
15303 ;;
15304 esac
15305 rm -rf conftest*
15306
15307 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15308 # in glibc 2.1.3, but that breaks too many other things.
15309 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15310 if test $ac_cv_sys_largefile_source != unknown; then
15311
15312 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15313
15314 fi
15315 ;;
15316 esac
15317
15318 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15319 # by calling it, 2009-04-02
15320 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15321 # The Clang compiler raises a warning for an undeclared identifier that matches
15322 # a compiler builtin function.  All extant Clang versions are affected, as of
15323 # Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
15324 # C and Objective C languages, but Clang does report an error under C++ and
15325 # Objective C++.
15326 #
15327 # Passing -fno-builtin to the compiler would suppress this problem.  That
15328 # strategy would have the advantage of being insensitive to stray warnings, but
15329 # it would make tests less realistic.
15330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15331 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15332 if ${ac_cv_c_decl_report+:} false; then :
15333   $as_echo_n "(cached) " >&6
15334 else
15335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15336 /* end confdefs.h.  */
15337
15338 int
15339 main ()
15340 {
15341 (void) strchr;
15342   ;
15343   return 0;
15344 }
15345 _ACEOF
15346 if ac_fn_c_try_compile "$LINENO"; then :
15347   if test -s conftest.err; then :
15348       # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15349     # valid AC_CHECK_DECL input.  No library function is consistently available
15350     # on freestanding implementations, so test against a dummy declaration.
15351     # Include always-available headers on the off chance that they somehow
15352     # elicit warnings.
15353     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15354 /* end confdefs.h.  */
15355 #include <float.h>
15356 #include <limits.h>
15357 #include <stdarg.h>
15358 #include <stddef.h>
15359 extern void ac_decl (int, char *);
15360 int
15361 main ()
15362 {
15363 #ifdef __cplusplus
15364   (void) ac_decl ((int) 0, (char *) 0);
15365   (void) ac_decl;
15366 #else
15367   (void) ac_decl;
15368 #endif
15369
15370   ;
15371   return 0;
15372 }
15373 _ACEOF
15374 if ac_fn_c_try_compile "$LINENO"; then :
15375   if test -s conftest.err; then :
15376   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15377 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15378 as_fn_error $? "cannot detect from compiler exit status or warnings
15379 See \`config.log' for more details" "$LINENO" 5; }
15380 else
15381   ac_cv_c_decl_report=warning
15382 fi
15383 else
15384   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15385 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15386 as_fn_error $? "cannot compile a simple declaration test
15387 See \`config.log' for more details" "$LINENO" 5; }
15388 fi
15389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15390 else
15391   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15392 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15393 as_fn_error $? "compiler does not report undeclared identifiers
15394 See \`config.log' for more details" "$LINENO" 5; }
15395 fi
15396 else
15397   ac_cv_c_decl_report=error
15398 fi
15399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15400 fi
15401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15402 $as_echo "$ac_cv_c_decl_report" >&6; }
15403
15404 case $ac_cv_c_decl_report in
15405   warning) ac_c_decl_warn_flag=yes ;;
15406   *) ac_c_decl_warn_flag= ;;
15407 esac
15408
15409 if test "$PORTNAME" != "solaris"; then :
15410
15411 for ac_func in posix_fadvise
15412 do :
15413   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15414 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15415   cat >>confdefs.h <<_ACEOF
15416 #define HAVE_POSIX_FADVISE 1
15417 _ACEOF
15418
15419 fi
15420 done
15421
15422 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15423 "
15424 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15425   ac_have_decl=1
15426 else
15427   ac_have_decl=0
15428 fi
15429
15430 cat >>confdefs.h <<_ACEOF
15431 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15432 _ACEOF
15433
15434
15435 fi # fi
15436
15437 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15438 "
15439 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15440   ac_have_decl=1
15441 else
15442   ac_have_decl=0
15443 fi
15444
15445 cat >>confdefs.h <<_ACEOF
15446 #define HAVE_DECL_FDATASYNC $ac_have_decl
15447 _ACEOF
15448
15449 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15450 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15451   ac_have_decl=1
15452 else
15453   ac_have_decl=0
15454 fi
15455
15456 cat >>confdefs.h <<_ACEOF
15457 #define HAVE_DECL_STRLCAT $ac_have_decl
15458 _ACEOF
15459 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15460 if test "x$ac_cv_have_decl_strlcpy" = 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_STRLCPY $ac_have_decl
15468 _ACEOF
15469 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15470 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15471   ac_have_decl=1
15472 else
15473   ac_have_decl=0
15474 fi
15475
15476 cat >>confdefs.h <<_ACEOF
15477 #define HAVE_DECL_STRNLEN $ac_have_decl
15478 _ACEOF
15479
15480 # This is probably only present on macOS, but may as well check always
15481 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15482 "
15483 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15484   ac_have_decl=1
15485 else
15486   ac_have_decl=0
15487 fi
15488
15489 cat >>confdefs.h <<_ACEOF
15490 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15491 _ACEOF
15492
15493
15494 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15495 "
15496 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15497   ac_have_decl=1
15498 else
15499   ac_have_decl=0
15500 fi
15501
15502 cat >>confdefs.h <<_ACEOF
15503 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15504 _ACEOF
15505 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15506 "
15507 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15508   ac_have_decl=1
15509 else
15510   ac_have_decl=0
15511 fi
15512
15513 cat >>confdefs.h <<_ACEOF
15514 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15515 _ACEOF
15516
15517
15518 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15519 #include <netinet/in.h>
15520 "
15521 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15522
15523 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15524
15525 fi
15526
15527
15528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15529 $as_echo_n "checking for PS_STRINGS... " >&6; }
15530 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15531   $as_echo_n "(cached) " >&6
15532 else
15533   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15534 /* end confdefs.h.  */
15535 #include <machine/vmparam.h>
15536 #include <sys/exec.h>
15537
15538 int
15539 main ()
15540 {
15541 PS_STRINGS->ps_nargvstr = 1;
15542 PS_STRINGS->ps_argvstr = "foo";
15543   ;
15544   return 0;
15545 }
15546 _ACEOF
15547 if ac_fn_c_try_link "$LINENO"; then :
15548   pgac_cv_var_PS_STRINGS=yes
15549 else
15550   pgac_cv_var_PS_STRINGS=no
15551 fi
15552 rm -f core conftest.err conftest.$ac_objext \
15553     conftest$ac_exeext conftest.$ac_ext
15554 fi
15555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15556 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15557 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15558
15559 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15560
15561 fi
15562
15563
15564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15565 $as_echo_n "checking for isinf... " >&6; }
15566 if ${ac_cv_func_isinf+:} false; then :
15567   $as_echo_n "(cached) " >&6
15568 else
15569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15570 /* end confdefs.h.  */
15571
15572 #include <math.h>
15573 double glob_double;
15574
15575 int
15576 main ()
15577 {
15578 return isinf(glob_double) ? 0 : 1;
15579   ;
15580   return 0;
15581 }
15582 _ACEOF
15583 if ac_fn_c_try_link "$LINENO"; then :
15584   ac_cv_func_isinf=yes
15585 else
15586   ac_cv_func_isinf=no
15587 fi
15588 rm -f core conftest.err conftest.$ac_objext \
15589     conftest$ac_exeext conftest.$ac_ext
15590 fi
15591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15592 $as_echo "$ac_cv_func_isinf" >&6; }
15593
15594 if test $ac_cv_func_isinf = yes ; then
15595
15596 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15597
15598 else
15599   case " $LIBOBJS " in
15600   *" isinf.$ac_objext "* ) ;;
15601   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15602  ;;
15603 esac
15604
15605   # Look for a way to implement a substitute for isinf()
15606   for ac_func in fpclass fp_class fp_class_d class
15607 do :
15608   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15609 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15610 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15611   cat >>confdefs.h <<_ACEOF
15612 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15613 _ACEOF
15614  break
15615 fi
15616 done
15617
15618 fi
15619
15620 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15621 if test "x$ac_cv_func_crypt" = xyes; then :
15622   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15623
15624 else
15625   case " $LIBOBJS " in
15626   *" crypt.$ac_objext "* ) ;;
15627   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15628  ;;
15629 esac
15630
15631 fi
15632
15633 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15634 if test "x$ac_cv_func_dlopen" = xyes; then :
15635   $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15636
15637 else
15638   case " $LIBOBJS " in
15639   *" dlopen.$ac_objext "* ) ;;
15640   *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15641  ;;
15642 esac
15643
15644 fi
15645
15646 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15647 if test "x$ac_cv_func_fls" = xyes; then :
15648   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15649
15650 else
15651   case " $LIBOBJS " in
15652   *" fls.$ac_objext "* ) ;;
15653   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15654  ;;
15655 esac
15656
15657 fi
15658
15659 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15660 if test "x$ac_cv_func_getopt" = xyes; then :
15661   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15662
15663 else
15664   case " $LIBOBJS " in
15665   *" getopt.$ac_objext "* ) ;;
15666   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15667  ;;
15668 esac
15669
15670 fi
15671
15672 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15673 if test "x$ac_cv_func_getrusage" = xyes; then :
15674   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15675
15676 else
15677   case " $LIBOBJS " in
15678   *" getrusage.$ac_objext "* ) ;;
15679   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15680  ;;
15681 esac
15682
15683 fi
15684
15685 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15686 if test "x$ac_cv_func_inet_aton" = xyes; then :
15687   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15688
15689 else
15690   case " $LIBOBJS " in
15691   *" inet_aton.$ac_objext "* ) ;;
15692   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15693  ;;
15694 esac
15695
15696 fi
15697
15698 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15699 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15700   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15701
15702 else
15703   case " $LIBOBJS " in
15704   *" mkdtemp.$ac_objext "* ) ;;
15705   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15706  ;;
15707 esac
15708
15709 fi
15710
15711 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
15712 if test "x$ac_cv_func_pread" = xyes; then :
15713   $as_echo "#define HAVE_PREAD 1" >>confdefs.h
15714
15715 else
15716   case " $LIBOBJS " in
15717   *" pread.$ac_objext "* ) ;;
15718   *) LIBOBJS="$LIBOBJS pread.$ac_objext"
15719  ;;
15720 esac
15721
15722 fi
15723
15724 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
15725 if test "x$ac_cv_func_pwrite" = xyes; then :
15726   $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
15727
15728 else
15729   case " $LIBOBJS " in
15730   *" pwrite.$ac_objext "* ) ;;
15731   *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
15732  ;;
15733 esac
15734
15735 fi
15736
15737 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15738 if test "x$ac_cv_func_random" = xyes; then :
15739   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15740
15741 else
15742   case " $LIBOBJS " in
15743   *" random.$ac_objext "* ) ;;
15744   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15745  ;;
15746 esac
15747
15748 fi
15749
15750 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15751 if test "x$ac_cv_func_rint" = xyes; then :
15752   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15753
15754 else
15755   case " $LIBOBJS " in
15756   *" rint.$ac_objext "* ) ;;
15757   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15758  ;;
15759 esac
15760
15761 fi
15762
15763 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15764 if test "x$ac_cv_func_srandom" = xyes; then :
15765   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15766
15767 else
15768   case " $LIBOBJS " in
15769   *" srandom.$ac_objext "* ) ;;
15770   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15771  ;;
15772 esac
15773
15774 fi
15775
15776 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15777 if test "x$ac_cv_func_strlcat" = xyes; then :
15778   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15779
15780 else
15781   case " $LIBOBJS " in
15782   *" strlcat.$ac_objext "* ) ;;
15783   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15784  ;;
15785 esac
15786
15787 fi
15788
15789 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15790 if test "x$ac_cv_func_strlcpy" = xyes; then :
15791   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15792
15793 else
15794   case " $LIBOBJS " in
15795   *" strlcpy.$ac_objext "* ) ;;
15796   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15797  ;;
15798 esac
15799
15800 fi
15801
15802 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15803 if test "x$ac_cv_func_strnlen" = xyes; then :
15804   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15805
15806 else
15807   case " $LIBOBJS " in
15808   *" strnlen.$ac_objext "* ) ;;
15809   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15810  ;;
15811 esac
15812
15813 fi
15814
15815
15816
15817 case $host_os in
15818
15819         # Windows uses a specialised env handler
15820         # and doesn't need a replacement getpeereid because it doesn't use
15821         # Unix sockets.
15822         mingw*)
15823
15824 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15825
15826
15827 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15828
15829                 ac_cv_func_unsetenv=yes
15830                 ac_cv_func_getpeereid=yes;;
15831         *)
15832                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15833 if test "x$ac_cv_func_unsetenv" = xyes; then :
15834   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15835
15836 else
15837   case " $LIBOBJS " in
15838   *" unsetenv.$ac_objext "* ) ;;
15839   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15840  ;;
15841 esac
15842
15843 fi
15844
15845 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15846 if test "x$ac_cv_func_getpeereid" = xyes; then :
15847   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15848
15849 else
15850   case " $LIBOBJS " in
15851   *" getpeereid.$ac_objext "* ) ;;
15852   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15853  ;;
15854 esac
15855
15856 fi
15857
15858
15859                 ;;
15860 esac
15861
15862 # System's version of getaddrinfo(), if any, may be used only if we found
15863 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15864 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15865 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15866    test "$PORTNAME" != "win32"; then
15867   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15868 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15869   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15870
15871 else
15872   case " $LIBOBJS " in
15873   *" getaddrinfo.$ac_objext "* ) ;;
15874   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15875  ;;
15876 esac
15877
15878 fi
15879
15880
15881 else
15882   case " $LIBOBJS " in
15883   *" getaddrinfo.$ac_objext "* ) ;;
15884   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15885  ;;
15886 esac
15887
15888 fi
15889
15890 # Similarly, use system's getopt_long() only if system provides struct option.
15891 if test x"$ac_cv_type_struct_option" = xyes ; then
15892   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15893 if test "x$ac_cv_func_getopt_long" = xyes; then :
15894   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15895
15896 else
15897   case " $LIBOBJS " in
15898   *" getopt_long.$ac_objext "* ) ;;
15899   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15900  ;;
15901 esac
15902
15903 fi
15904
15905
15906 else
15907   case " $LIBOBJS " in
15908   *" getopt_long.$ac_objext "* ) ;;
15909   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15910  ;;
15911 esac
15912
15913 fi
15914
15915 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15916 # (i.e., allow '-' as a flag character), so use our version on those platforms.
15917 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
15918   case " $LIBOBJS " in
15919   *" getopt.$ac_objext "* ) ;;
15920   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15921  ;;
15922 esac
15923
15924 fi
15925
15926 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15927 # so always use our version on Windows.
15928 if test "$PORTNAME" = "win32"; then
15929   case " $LIBOBJS " in
15930   *" getopt.$ac_objext "* ) ;;
15931   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15932  ;;
15933 esac
15934
15935   case " $LIBOBJS " in
15936   *" getopt_long.$ac_objext "* ) ;;
15937   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15938  ;;
15939 esac
15940
15941 fi
15942
15943 # Win32 (really MinGW) support
15944 if test "$PORTNAME" = "win32"; then
15945   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15946 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15947   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15948
15949 else
15950   case " $LIBOBJS " in
15951   *" gettimeofday.$ac_objext "* ) ;;
15952   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15953  ;;
15954 esac
15955
15956 fi
15957
15958
15959   case " $LIBOBJS " in
15960   *" dirmod.$ac_objext "* ) ;;
15961   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15962  ;;
15963 esac
15964
15965   case " $LIBOBJS " in
15966   *" kill.$ac_objext "* ) ;;
15967   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15968  ;;
15969 esac
15970
15971   case " $LIBOBJS " in
15972   *" open.$ac_objext "* ) ;;
15973   *) LIBOBJS="$LIBOBJS open.$ac_objext"
15974  ;;
15975 esac
15976
15977   case " $LIBOBJS " in
15978   *" system.$ac_objext "* ) ;;
15979   *) LIBOBJS="$LIBOBJS system.$ac_objext"
15980  ;;
15981 esac
15982
15983   case " $LIBOBJS " in
15984   *" win32env.$ac_objext "* ) ;;
15985   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15986  ;;
15987 esac
15988
15989   case " $LIBOBJS " in
15990   *" win32error.$ac_objext "* ) ;;
15991   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15992  ;;
15993 esac
15994
15995   case " $LIBOBJS " in
15996   *" win32security.$ac_objext "* ) ;;
15997   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15998  ;;
15999 esac
16000
16001   case " $LIBOBJS " in
16002   *" win32setlocale.$ac_objext "* ) ;;
16003   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16004  ;;
16005 esac
16006
16007
16008 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16009
16010   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16011 #define WIN32_LEAN_AND_MEAN
16012 #include <windows.h>
16013 #include <string.h>
16014 #include <dbghelp.h>
16015 "
16016 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16017
16018 cat >>confdefs.h <<_ACEOF
16019 #define HAVE_MINIDUMP_TYPE 1
16020 _ACEOF
16021
16022 pgac_minidump_type=yes
16023 else
16024   pgac_minidump_type=no
16025 fi
16026
16027 fi
16028 if test x"$pgac_minidump_type" = x"yes" ; then
16029   have_win32_dbghelp=yes
16030
16031 else
16032   have_win32_dbghelp=no
16033
16034 fi
16035
16036 # Cygwin needs only a bit of that
16037 if test "$PORTNAME" = "cygwin"; then
16038   case " $LIBOBJS " in
16039   *" dirmod.$ac_objext "* ) ;;
16040   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16041  ;;
16042 esac
16043
16044 fi
16045
16046 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16047 if test "x$ac_cv_func_syslog" = xyes; then :
16048   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16049 if test "x$ac_cv_header_syslog_h" = xyes; then :
16050
16051 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16052
16053 fi
16054
16055
16056 fi
16057
16058
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16060 $as_echo_n "checking for opterr... " >&6; }
16061 if ${pgac_cv_var_int_opterr+:} false; then :
16062   $as_echo_n "(cached) " >&6
16063 else
16064   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16065 /* end confdefs.h.  */
16066 #include <unistd.h>
16067 int
16068 main ()
16069 {
16070 extern int opterr; opterr = 1;
16071   ;
16072   return 0;
16073 }
16074 _ACEOF
16075 if ac_fn_c_try_link "$LINENO"; then :
16076   pgac_cv_var_int_opterr=yes
16077 else
16078   pgac_cv_var_int_opterr=no
16079 fi
16080 rm -f core conftest.err conftest.$ac_objext \
16081     conftest$ac_exeext conftest.$ac_ext
16082 fi
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16084 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16085 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16086
16087 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16088
16089 fi
16090
16091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16092 $as_echo_n "checking for optreset... " >&6; }
16093 if ${pgac_cv_var_int_optreset+:} false; then :
16094   $as_echo_n "(cached) " >&6
16095 else
16096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16097 /* end confdefs.h.  */
16098 #include <unistd.h>
16099 int
16100 main ()
16101 {
16102 extern int optreset; optreset = 1;
16103   ;
16104   return 0;
16105 }
16106 _ACEOF
16107 if ac_fn_c_try_link "$LINENO"; then :
16108   pgac_cv_var_int_optreset=yes
16109 else
16110   pgac_cv_var_int_optreset=no
16111 fi
16112 rm -f core conftest.err conftest.$ac_objext \
16113     conftest$ac_exeext conftest.$ac_ext
16114 fi
16115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16116 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16117 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16118
16119 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16120
16121 fi
16122
16123 for ac_func in strtoll __strtoll strtoq
16124 do :
16125   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16126 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16127 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16128   cat >>confdefs.h <<_ACEOF
16129 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16130 _ACEOF
16131  break
16132 fi
16133 done
16134
16135 for ac_func in strtoull __strtoull strtouq
16136 do :
16137   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16138 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16139 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16140   cat >>confdefs.h <<_ACEOF
16141 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16142 _ACEOF
16143  break
16144 fi
16145 done
16146
16147 # strto[u]ll may exist but not be declared
16148 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16149 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16150   ac_have_decl=1
16151 else
16152   ac_have_decl=0
16153 fi
16154
16155 cat >>confdefs.h <<_ACEOF
16156 #define HAVE_DECL_STRTOLL $ac_have_decl
16157 _ACEOF
16158 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16159 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16160   ac_have_decl=1
16161 else
16162   ac_have_decl=0
16163 fi
16164
16165 cat >>confdefs.h <<_ACEOF
16166 #define HAVE_DECL_STRTOULL $ac_have_decl
16167 _ACEOF
16168
16169
16170 if test "$with_icu" = yes; then
16171   ac_save_CPPFLAGS=$CPPFLAGS
16172   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16173
16174   # Verify we have ICU's header files
16175   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16176 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16177
16178 else
16179   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16180 fi
16181
16182
16183
16184   CPPFLAGS=$ac_save_CPPFLAGS
16185 fi
16186
16187 if test "$with_llvm" = yes; then
16188
16189   # Check which functionality is present
16190   SAVE_CPPFLAGS="$CPPFLAGS"
16191   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16192   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16193 "
16194 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16195   ac_have_decl=1
16196 else
16197   ac_have_decl=0
16198 fi
16199
16200 cat >>confdefs.h <<_ACEOF
16201 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16202 _ACEOF
16203
16204   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16205 "
16206 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16207   ac_have_decl=1
16208 else
16209   ac_have_decl=0
16210 fi
16211
16212 cat >>confdefs.h <<_ACEOF
16213 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16214 _ACEOF
16215 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16216 "
16217 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16218   ac_have_decl=1
16219 else
16220   ac_have_decl=0
16221 fi
16222
16223 cat >>confdefs.h <<_ACEOF
16224 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16225 _ACEOF
16226
16227   ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16228 "
16229 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16230   ac_have_decl=1
16231 else
16232   ac_have_decl=0
16233 fi
16234
16235 cat >>confdefs.h <<_ACEOF
16236 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16237 _ACEOF
16238 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16239 "
16240 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16241   ac_have_decl=1
16242 else
16243   ac_have_decl=0
16244 fi
16245
16246 cat >>confdefs.h <<_ACEOF
16247 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16248 _ACEOF
16249
16250   CPPFLAGS="$SAVE_CPPFLAGS"
16251
16252 fi
16253
16254 # Lastly, restore full LIBS list and check for readline/libedit symbols
16255 LIBS="$LIBS_including_readline"
16256
16257 if test "$with_readline" = yes; then
16258   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16259 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16260 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16261   $as_echo_n "(cached) " >&6
16262 else
16263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16264 /* end confdefs.h.  */
16265 #include <stdio.h>
16266 #ifdef HAVE_READLINE_READLINE_H
16267 # include <readline/readline.h>
16268 #elif defined(HAVE_READLINE_H)
16269 # include <readline.h>
16270 #endif
16271
16272 int
16273 main ()
16274 {
16275 rl_completion_append_character = 'x';
16276   ;
16277   return 0;
16278 }
16279 _ACEOF
16280 if ac_fn_c_try_link "$LINENO"; then :
16281   pgac_cv_var_rl_completion_append_character=yes
16282 else
16283   pgac_cv_var_rl_completion_append_character=no
16284 fi
16285 rm -f core conftest.err conftest.$ac_objext \
16286     conftest$ac_exeext conftest.$ac_ext
16287 fi
16288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16289 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16290 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16291
16292 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16293
16294 fi
16295   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16296 do :
16297   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16298 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16299 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16300   cat >>confdefs.h <<_ACEOF
16301 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16302 _ACEOF
16303
16304 fi
16305 done
16306
16307   for ac_func in append_history history_truncate_file
16308 do :
16309   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16310 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16311 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16312   cat >>confdefs.h <<_ACEOF
16313 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16314 _ACEOF
16315
16316 fi
16317 done
16318
16319 fi
16320
16321
16322 # This test makes sure that run tests work at all.  Sometimes a shared
16323 # library is found by the linker, but the runtime linker can't find it.
16324 # This check should come after all modifications of compiler or linker
16325 # variables, and before any other run tests.
16326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16327 $as_echo_n "checking test program... " >&6; }
16328 if test "$cross_compiling" = yes; then :
16329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16330 $as_echo "cross-compiling" >&6; }
16331 else
16332   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16333 /* end confdefs.h.  */
16334 int main() { return 0; }
16335 _ACEOF
16336 if ac_fn_c_try_run "$LINENO"; then :
16337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16338 $as_echo "ok" >&6; }
16339 else
16340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16341 $as_echo "failed" >&6; }
16342 as_fn_error $? "
16343 Could not execute a simple test program.  This may be a problem
16344 related to locating shared libraries.  Check the file 'config.log'
16345 for the exact reason." "$LINENO" 5
16346 fi
16347 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16348   conftest.$ac_objext conftest.beam conftest.$ac_ext
16349 fi
16350
16351
16352 # --------------------
16353 # Run tests below here
16354 # --------------------
16355
16356
16357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16358 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16359 if ${pgac_cv_type_long_int_64+:} false; then :
16360   $as_echo_n "(cached) " >&6
16361 else
16362   if test "$cross_compiling" = yes; then :
16363   # If cross-compiling, check the size reported by the compiler and
16364 # trust that the arithmetic works.
16365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16366 /* end confdefs.h.  */
16367
16368 int
16369 main ()
16370 {
16371 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16372 test_array [0] = 0;
16373 return test_array [0];
16374
16375   ;
16376   return 0;
16377 }
16378 _ACEOF
16379 if ac_fn_c_try_compile "$LINENO"; then :
16380   pgac_cv_type_long_int_64=yes
16381 else
16382   pgac_cv_type_long_int_64=no
16383 fi
16384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16385 else
16386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16387 /* end confdefs.h.  */
16388 typedef long int ac_int64;
16389
16390 /*
16391  * These are globals to discourage the compiler from folding all the
16392  * arithmetic tests down to compile-time constants.
16393  */
16394 ac_int64 a = 20000001;
16395 ac_int64 b = 40000005;
16396
16397 int does_int64_work()
16398 {
16399   ac_int64 c,d;
16400
16401   if (sizeof(ac_int64) != 8)
16402     return 0;                   /* definitely not the right size */
16403
16404   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16405   c = a * b;
16406   d = (c + b) / b;
16407   if (d != a+1)
16408     return 0;
16409   return 1;
16410 }
16411
16412 int
16413 main() {
16414   return (! does_int64_work());
16415 }
16416 _ACEOF
16417 if ac_fn_c_try_run "$LINENO"; then :
16418   pgac_cv_type_long_int_64=yes
16419 else
16420   pgac_cv_type_long_int_64=no
16421 fi
16422 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16423   conftest.$ac_objext conftest.beam conftest.$ac_ext
16424 fi
16425
16426 fi
16427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16428 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16429
16430 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16431 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16432
16433 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16434
16435 fi
16436
16437
16438 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16439   pg_int64_type="long int"
16440 else
16441   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16442 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16443 if ${pgac_cv_type_long_long_int_64+:} false; then :
16444   $as_echo_n "(cached) " >&6
16445 else
16446   if test "$cross_compiling" = yes; then :
16447   # If cross-compiling, check the size reported by the compiler and
16448 # trust that the arithmetic works.
16449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16450 /* end confdefs.h.  */
16451
16452 int
16453 main ()
16454 {
16455 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16456 test_array [0] = 0;
16457 return test_array [0];
16458
16459   ;
16460   return 0;
16461 }
16462 _ACEOF
16463 if ac_fn_c_try_compile "$LINENO"; then :
16464   pgac_cv_type_long_long_int_64=yes
16465 else
16466   pgac_cv_type_long_long_int_64=no
16467 fi
16468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16469 else
16470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16471 /* end confdefs.h.  */
16472 typedef long long int ac_int64;
16473
16474 /*
16475  * These are globals to discourage the compiler from folding all the
16476  * arithmetic tests down to compile-time constants.
16477  */
16478 ac_int64 a = 20000001;
16479 ac_int64 b = 40000005;
16480
16481 int does_int64_work()
16482 {
16483   ac_int64 c,d;
16484
16485   if (sizeof(ac_int64) != 8)
16486     return 0;                   /* definitely not the right size */
16487
16488   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16489   c = a * b;
16490   d = (c + b) / b;
16491   if (d != a+1)
16492     return 0;
16493   return 1;
16494 }
16495
16496 int
16497 main() {
16498   return (! does_int64_work());
16499 }
16500 _ACEOF
16501 if ac_fn_c_try_run "$LINENO"; then :
16502   pgac_cv_type_long_long_int_64=yes
16503 else
16504   pgac_cv_type_long_long_int_64=no
16505 fi
16506 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16507   conftest.$ac_objext conftest.beam conftest.$ac_ext
16508 fi
16509
16510 fi
16511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16512 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16513
16514 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16515 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16516
16517 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16518
16519 fi
16520
16521   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16522     pg_int64_type="long long int"
16523   else
16524     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16525   fi
16526 fi
16527
16528
16529 cat >>confdefs.h <<_ACEOF
16530 #define PG_INT64_TYPE $pg_int64_type
16531 _ACEOF
16532
16533
16534 # Select the printf length modifier that goes with that, too.
16535 if test x"$pg_int64_type" = x"long long int" ; then
16536   INT64_MODIFIER='"ll"'
16537 else
16538   INT64_MODIFIER='"l"'
16539 fi
16540
16541
16542 cat >>confdefs.h <<_ACEOF
16543 #define INT64_MODIFIER $INT64_MODIFIER
16544 _ACEOF
16545
16546
16547 # has to be down here, rather than with the other builtins, because
16548 # the test uses PG_INT64_TYPE.
16549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16550 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16551 if ${pgac_cv__builtin_op_overflow+:} false; then :
16552   $as_echo_n "(cached) " >&6
16553 else
16554   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16555 /* end confdefs.h.  */
16556
16557 PG_INT64_TYPE a = 1;
16558 PG_INT64_TYPE b = 1;
16559 PG_INT64_TYPE result;
16560 int oflo;
16561
16562 int
16563 main ()
16564 {
16565 oflo = __builtin_mul_overflow(a, b, &result);
16566   ;
16567   return 0;
16568 }
16569 _ACEOF
16570 if ac_fn_c_try_link "$LINENO"; then :
16571   pgac_cv__builtin_op_overflow=yes
16572 else
16573   pgac_cv__builtin_op_overflow=no
16574 fi
16575 rm -f core conftest.err conftest.$ac_objext \
16576     conftest$ac_exeext conftest.$ac_ext
16577 fi
16578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16579 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16580 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16581
16582 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16583
16584 fi
16585
16586 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16587 # The cast to long int works around a bug in the HP C Compiler
16588 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16589 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16590 # This bug is HP SR number 8606223364.
16591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16592 $as_echo_n "checking size of void *... " >&6; }
16593 if ${ac_cv_sizeof_void_p+:} false; then :
16594   $as_echo_n "(cached) " >&6
16595 else
16596   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16597
16598 else
16599   if test "$ac_cv_type_void_p" = yes; then
16600      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16601 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16602 as_fn_error 77 "cannot compute sizeof (void *)
16603 See \`config.log' for more details" "$LINENO" 5; }
16604    else
16605      ac_cv_sizeof_void_p=0
16606    fi
16607 fi
16608
16609 fi
16610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16611 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16612
16613
16614
16615 cat >>confdefs.h <<_ACEOF
16616 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16617 _ACEOF
16618
16619
16620 # The cast to long int works around a bug in the HP C Compiler
16621 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16622 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16623 # This bug is HP SR number 8606223364.
16624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16625 $as_echo_n "checking size of size_t... " >&6; }
16626 if ${ac_cv_sizeof_size_t+:} false; then :
16627   $as_echo_n "(cached) " >&6
16628 else
16629   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16630
16631 else
16632   if test "$ac_cv_type_size_t" = yes; then
16633      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16634 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16635 as_fn_error 77 "cannot compute sizeof (size_t)
16636 See \`config.log' for more details" "$LINENO" 5; }
16637    else
16638      ac_cv_sizeof_size_t=0
16639    fi
16640 fi
16641
16642 fi
16643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16644 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16645
16646
16647
16648 cat >>confdefs.h <<_ACEOF
16649 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16650 _ACEOF
16651
16652
16653 # The cast to long int works around a bug in the HP C Compiler
16654 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16655 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16656 # This bug is HP SR number 8606223364.
16657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16658 $as_echo_n "checking size of long... " >&6; }
16659 if ${ac_cv_sizeof_long+:} false; then :
16660   $as_echo_n "(cached) " >&6
16661 else
16662   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16663
16664 else
16665   if test "$ac_cv_type_long" = yes; then
16666      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16667 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16668 as_fn_error 77 "cannot compute sizeof (long)
16669 See \`config.log' for more details" "$LINENO" 5; }
16670    else
16671      ac_cv_sizeof_long=0
16672    fi
16673 fi
16674
16675 fi
16676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16677 $as_echo "$ac_cv_sizeof_long" >&6; }
16678
16679
16680
16681 cat >>confdefs.h <<_ACEOF
16682 #define SIZEOF_LONG $ac_cv_sizeof_long
16683 _ACEOF
16684
16685
16686
16687 # Decide whether float4 is passed by value: user-selectable, enabled by default
16688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16689 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16690
16691
16692 # Check whether --enable-float4-byval was given.
16693 if test "${enable_float4_byval+set}" = set; then :
16694   enableval=$enable_float4_byval;
16695   case $enableval in
16696     yes)
16697
16698 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16699
16700                float4passbyval=true
16701       ;;
16702     no)
16703       float4passbyval=false
16704       ;;
16705     *)
16706       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16707       ;;
16708   esac
16709
16710 else
16711   enable_float4_byval=yes
16712
16713 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16714
16715                float4passbyval=true
16716 fi
16717
16718
16719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16720 $as_echo "$enable_float4_byval" >&6; }
16721
16722 cat >>confdefs.h <<_ACEOF
16723 #define FLOAT4PASSBYVAL $float4passbyval
16724 _ACEOF
16725
16726
16727 # Decide whether float8 is passed by value.
16728 # Note: this setting also controls int8 and related types such as timestamp.
16729 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16730 # If not, trying to select it is an error.
16731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16732 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16733 if test $ac_cv_sizeof_void_p -ge 8 ; then
16734
16735
16736 # Check whether --enable-float8-byval was given.
16737 if test "${enable_float8_byval+set}" = set; then :
16738   enableval=$enable_float8_byval;
16739   case $enableval in
16740     yes)
16741       :
16742       ;;
16743     no)
16744       :
16745       ;;
16746     *)
16747       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16748       ;;
16749   esac
16750
16751 else
16752   enable_float8_byval=yes
16753
16754 fi
16755
16756
16757 else
16758
16759
16760 # Check whether --enable-float8-byval was given.
16761 if test "${enable_float8_byval+set}" = set; then :
16762   enableval=$enable_float8_byval;
16763   case $enableval in
16764     yes)
16765       :
16766       ;;
16767     no)
16768       :
16769       ;;
16770     *)
16771       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16772       ;;
16773   esac
16774
16775 else
16776   enable_float8_byval=no
16777
16778 fi
16779
16780
16781   if test "$enable_float8_byval" = yes ; then
16782     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16783   fi
16784 fi
16785 if test "$enable_float8_byval" = yes ; then
16786
16787 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16788
16789   float8passbyval=true
16790 else
16791   float8passbyval=false
16792 fi
16793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16794 $as_echo "$enable_float8_byval" >&6; }
16795
16796 cat >>confdefs.h <<_ACEOF
16797 #define FLOAT8PASSBYVAL $float8passbyval
16798 _ACEOF
16799
16800
16801 # Determine memory alignment requirements for the basic C data types.
16802
16803 # The cast to long int works around a bug in the HP C Compiler,
16804 # see AC_CHECK_SIZEOF for more information.
16805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16806 $as_echo_n "checking alignment of short... " >&6; }
16807 if ${ac_cv_alignof_short+:} false; then :
16808   $as_echo_n "(cached) " >&6
16809 else
16810   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16811 #ifndef offsetof
16812 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16813 #endif
16814 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16815
16816 else
16817   if test "$ac_cv_type_short" = yes; then
16818      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16819 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16820 as_fn_error 77 "cannot compute alignment of short
16821 See \`config.log' for more details" "$LINENO" 5; }
16822    else
16823      ac_cv_alignof_short=0
16824    fi
16825 fi
16826
16827 fi
16828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16829 $as_echo "$ac_cv_alignof_short" >&6; }
16830
16831
16832
16833 cat >>confdefs.h <<_ACEOF
16834 #define ALIGNOF_SHORT $ac_cv_alignof_short
16835 _ACEOF
16836
16837
16838 # The cast to long int works around a bug in the HP C Compiler,
16839 # see AC_CHECK_SIZEOF for more information.
16840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16841 $as_echo_n "checking alignment of int... " >&6; }
16842 if ${ac_cv_alignof_int+:} false; then :
16843   $as_echo_n "(cached) " >&6
16844 else
16845   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16846 #ifndef offsetof
16847 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16848 #endif
16849 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16850
16851 else
16852   if test "$ac_cv_type_int" = yes; then
16853      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16854 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16855 as_fn_error 77 "cannot compute alignment of int
16856 See \`config.log' for more details" "$LINENO" 5; }
16857    else
16858      ac_cv_alignof_int=0
16859    fi
16860 fi
16861
16862 fi
16863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16864 $as_echo "$ac_cv_alignof_int" >&6; }
16865
16866
16867
16868 cat >>confdefs.h <<_ACEOF
16869 #define ALIGNOF_INT $ac_cv_alignof_int
16870 _ACEOF
16871
16872
16873 # The cast to long int works around a bug in the HP C Compiler,
16874 # see AC_CHECK_SIZEOF for more information.
16875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16876 $as_echo_n "checking alignment of long... " >&6; }
16877 if ${ac_cv_alignof_long+:} false; then :
16878   $as_echo_n "(cached) " >&6
16879 else
16880   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16881 #ifndef offsetof
16882 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16883 #endif
16884 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16885
16886 else
16887   if test "$ac_cv_type_long" = yes; then
16888      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16889 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16890 as_fn_error 77 "cannot compute alignment of long
16891 See \`config.log' for more details" "$LINENO" 5; }
16892    else
16893      ac_cv_alignof_long=0
16894    fi
16895 fi
16896
16897 fi
16898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16899 $as_echo "$ac_cv_alignof_long" >&6; }
16900
16901
16902
16903 cat >>confdefs.h <<_ACEOF
16904 #define ALIGNOF_LONG $ac_cv_alignof_long
16905 _ACEOF
16906
16907
16908 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16909   # The cast to long int works around a bug in the HP C Compiler,
16910 # see AC_CHECK_SIZEOF for more information.
16911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16912 $as_echo_n "checking alignment of long long int... " >&6; }
16913 if ${ac_cv_alignof_long_long_int+:} false; then :
16914   $as_echo_n "(cached) " >&6
16915 else
16916   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
16917 #ifndef offsetof
16918 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16919 #endif
16920 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16921
16922 else
16923   if test "$ac_cv_type_long_long_int" = yes; then
16924      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16925 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16926 as_fn_error 77 "cannot compute alignment of long long int
16927 See \`config.log' for more details" "$LINENO" 5; }
16928    else
16929      ac_cv_alignof_long_long_int=0
16930    fi
16931 fi
16932
16933 fi
16934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16935 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16936
16937
16938
16939 cat >>confdefs.h <<_ACEOF
16940 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16941 _ACEOF
16942
16943
16944 fi
16945 # The cast to long int works around a bug in the HP C Compiler,
16946 # see AC_CHECK_SIZEOF for more information.
16947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16948 $as_echo_n "checking alignment of double... " >&6; }
16949 if ${ac_cv_alignof_double+:} false; then :
16950   $as_echo_n "(cached) " >&6
16951 else
16952   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
16953 #ifndef offsetof
16954 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16955 #endif
16956 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16957
16958 else
16959   if test "$ac_cv_type_double" = yes; then
16960      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16961 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16962 as_fn_error 77 "cannot compute alignment of double
16963 See \`config.log' for more details" "$LINENO" 5; }
16964    else
16965      ac_cv_alignof_double=0
16966    fi
16967 fi
16968
16969 fi
16970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16971 $as_echo "$ac_cv_alignof_double" >&6; }
16972
16973
16974
16975 cat >>confdefs.h <<_ACEOF
16976 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16977 _ACEOF
16978
16979
16980
16981 # Compute maximum alignment of any basic type.
16982 # We assume long's alignment is at least as strong as char, short, or int;
16983 # but we must check long long (if it is being used for int64) and double.
16984 # Note that we intentionally do not consider any types wider than 64 bits,
16985 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
16986 # for disk and memory space.
16987
16988 MAX_ALIGNOF=$ac_cv_alignof_long
16989 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
16990   MAX_ALIGNOF=$ac_cv_alignof_double
16991 fi
16992 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
16993   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
16994 fi
16995
16996 cat >>confdefs.h <<_ACEOF
16997 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16998 _ACEOF
16999
17000
17001
17002 # Some platforms predefine the types int8, int16, etc.  Only check
17003 # a (hopefully) representative subset.
17004 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17005 "
17006 if test "x$ac_cv_type_int8" = xyes; then :
17007
17008 cat >>confdefs.h <<_ACEOF
17009 #define HAVE_INT8 1
17010 _ACEOF
17011
17012
17013 fi
17014 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17015 "
17016 if test "x$ac_cv_type_uint8" = xyes; then :
17017
17018 cat >>confdefs.h <<_ACEOF
17019 #define HAVE_UINT8 1
17020 _ACEOF
17021
17022
17023 fi
17024 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17025 "
17026 if test "x$ac_cv_type_int64" = xyes; then :
17027
17028 cat >>confdefs.h <<_ACEOF
17029 #define HAVE_INT64 1
17030 _ACEOF
17031
17032
17033 fi
17034 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17035 "
17036 if test "x$ac_cv_type_uint64" = xyes; then :
17037
17038 cat >>confdefs.h <<_ACEOF
17039 #define HAVE_UINT64 1
17040 _ACEOF
17041
17042
17043 fi
17044
17045
17046 # Some compilers offer a 128-bit integer scalar type.
17047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17048 $as_echo_n "checking for __int128... " >&6; }
17049 if ${pgac_cv__128bit_int+:} false; then :
17050   $as_echo_n "(cached) " >&6
17051 else
17052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17053 /* end confdefs.h.  */
17054
17055 /*
17056  * We don't actually run this test, just link it to verify that any support
17057  * functions needed for __int128 are present.
17058  *
17059  * These are globals to discourage the compiler from folding all the
17060  * arithmetic tests down to compile-time constants.  We do not have
17061  * convenient support for 128bit literals at this point...
17062  */
17063 __int128 a = 48828125;
17064 __int128 b = 97656250;
17065
17066 int
17067 main ()
17068 {
17069
17070 __int128 c,d;
17071 a = (a << 12) + 1; /* 200000000001 */
17072 b = (b << 12) + 5; /* 400000000005 */
17073 /* try the most relevant arithmetic ops */
17074 c = a * b;
17075 d = (c + b) / b;
17076 /* must use the results, else compiler may optimize arithmetic away */
17077 if (d != a+1)
17078   return 1;
17079
17080   ;
17081   return 0;
17082 }
17083 _ACEOF
17084 if ac_fn_c_try_link "$LINENO"; then :
17085   pgac_cv__128bit_int=yes
17086 else
17087   pgac_cv__128bit_int=no
17088 fi
17089 rm -f core conftest.err conftest.$ac_objext \
17090     conftest$ac_exeext conftest.$ac_ext
17091 fi
17092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17093 $as_echo "$pgac_cv__128bit_int" >&6; }
17094 if test x"$pgac_cv__128bit_int" = xyes ; then
17095   # Use of non-default alignment with __int128 tickles bugs in some compilers.
17096   # If not cross-compiling, we can test for bugs and disable use of __int128
17097   # with buggy compilers.  If cross-compiling, hope for the best.
17098   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17099   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17100 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17101 if ${pgac_cv__128bit_int_bug+:} false; then :
17102   $as_echo_n "(cached) " >&6
17103 else
17104   if test "$cross_compiling" = yes; then :
17105   pgac_cv__128bit_int_bug="assuming ok"
17106 else
17107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17108 /* end confdefs.h.  */
17109
17110 /* This must match the corresponding code in c.h: */
17111 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17112 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17113 #endif
17114 typedef __int128 int128a
17115 #if defined(pg_attribute_aligned)
17116 pg_attribute_aligned(8)
17117 #endif
17118 ;
17119 int128a holder;
17120 void pass_by_val(void *buffer, int128a par) { holder = par; }
17121
17122 int
17123 main ()
17124 {
17125
17126 long int i64 = 97656225L << 12;
17127 int128a q;
17128 pass_by_val(main, (int128a) i64);
17129 q = (int128a) i64;
17130 if (q != holder)
17131   return 1;
17132
17133   ;
17134   return 0;
17135 }
17136 _ACEOF
17137 if ac_fn_c_try_run "$LINENO"; then :
17138   pgac_cv__128bit_int_bug=ok
17139 else
17140   pgac_cv__128bit_int_bug=broken
17141 fi
17142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17143   conftest.$ac_objext conftest.beam conftest.$ac_ext
17144 fi
17145
17146 fi
17147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17148 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17149   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17150
17151 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17152
17153     # The cast to long int works around a bug in the HP C Compiler,
17154 # see AC_CHECK_SIZEOF for more information.
17155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17156 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17157 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17158   $as_echo_n "(cached) " >&6
17159 else
17160   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
17161 #ifndef offsetof
17162 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17163 #endif
17164 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17165
17166 else
17167   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17168      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17169 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17170 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17171 See \`config.log' for more details" "$LINENO" 5; }
17172    else
17173      ac_cv_alignof_PG_INT128_TYPE=0
17174    fi
17175 fi
17176
17177 fi
17178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17179 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17180
17181
17182
17183 cat >>confdefs.h <<_ACEOF
17184 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17185 _ACEOF
17186
17187
17188   fi
17189 fi
17190
17191 # Check for various atomic operations now that we have checked how to declare
17192 # 64bit integers.
17193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17194 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17195 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17196   $as_echo_n "(cached) " >&6
17197 else
17198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17199 /* end confdefs.h.  */
17200
17201 int
17202 main ()
17203 {
17204 char lock = 0;
17205    __sync_lock_test_and_set(&lock, 1);
17206    __sync_lock_release(&lock);
17207   ;
17208   return 0;
17209 }
17210 _ACEOF
17211 if ac_fn_c_try_link "$LINENO"; then :
17212   pgac_cv_gcc_sync_char_tas="yes"
17213 else
17214   pgac_cv_gcc_sync_char_tas="no"
17215 fi
17216 rm -f core conftest.err conftest.$ac_objext \
17217     conftest$ac_exeext conftest.$ac_ext
17218 fi
17219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17220 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17221 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17222
17223 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17224
17225 fi
17226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17227 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17228 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17229   $as_echo_n "(cached) " >&6
17230 else
17231   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17232 /* end confdefs.h.  */
17233
17234 int
17235 main ()
17236 {
17237 int lock = 0;
17238    __sync_lock_test_and_set(&lock, 1);
17239    __sync_lock_release(&lock);
17240   ;
17241   return 0;
17242 }
17243 _ACEOF
17244 if ac_fn_c_try_link "$LINENO"; then :
17245   pgac_cv_gcc_sync_int32_tas="yes"
17246 else
17247   pgac_cv_gcc_sync_int32_tas="no"
17248 fi
17249 rm -f core conftest.err conftest.$ac_objext \
17250     conftest$ac_exeext conftest.$ac_ext
17251 fi
17252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17253 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17254 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17255
17256 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17257
17258 fi
17259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17260 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17261 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17262   $as_echo_n "(cached) " >&6
17263 else
17264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17265 /* end confdefs.h.  */
17266
17267 int
17268 main ()
17269 {
17270 int val = 0;
17271    __sync_val_compare_and_swap(&val, 0, 37);
17272   ;
17273   return 0;
17274 }
17275 _ACEOF
17276 if ac_fn_c_try_link "$LINENO"; then :
17277   pgac_cv_gcc_sync_int32_cas="yes"
17278 else
17279   pgac_cv_gcc_sync_int32_cas="no"
17280 fi
17281 rm -f core conftest.err conftest.$ac_objext \
17282     conftest$ac_exeext conftest.$ac_ext
17283 fi
17284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17285 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17286 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17287
17288 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17289
17290 fi
17291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17292 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17293 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17294   $as_echo_n "(cached) " >&6
17295 else
17296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17297 /* end confdefs.h.  */
17298
17299 int
17300 main ()
17301 {
17302 PG_INT64_TYPE lock = 0;
17303    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17304   ;
17305   return 0;
17306 }
17307 _ACEOF
17308 if ac_fn_c_try_link "$LINENO"; then :
17309   pgac_cv_gcc_sync_int64_cas="yes"
17310 else
17311   pgac_cv_gcc_sync_int64_cas="no"
17312 fi
17313 rm -f core conftest.err conftest.$ac_objext \
17314     conftest$ac_exeext conftest.$ac_ext
17315 fi
17316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17317 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17318 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17319
17320 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17321
17322 fi
17323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17324 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17325 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17326   $as_echo_n "(cached) " >&6
17327 else
17328   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17329 /* end confdefs.h.  */
17330
17331 int
17332 main ()
17333 {
17334 int val = 0;
17335    int expect = 0;
17336    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17337   ;
17338   return 0;
17339 }
17340 _ACEOF
17341 if ac_fn_c_try_link "$LINENO"; then :
17342   pgac_cv_gcc_atomic_int32_cas="yes"
17343 else
17344   pgac_cv_gcc_atomic_int32_cas="no"
17345 fi
17346 rm -f core conftest.err conftest.$ac_objext \
17347     conftest$ac_exeext conftest.$ac_ext
17348 fi
17349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17350 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17351 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17352
17353 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17354
17355 fi
17356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17357 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17358 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17359   $as_echo_n "(cached) " >&6
17360 else
17361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17362 /* end confdefs.h.  */
17363
17364 int
17365 main ()
17366 {
17367 PG_INT64_TYPE val = 0;
17368    PG_INT64_TYPE expect = 0;
17369    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17370   ;
17371   return 0;
17372 }
17373 _ACEOF
17374 if ac_fn_c_try_link "$LINENO"; then :
17375   pgac_cv_gcc_atomic_int64_cas="yes"
17376 else
17377   pgac_cv_gcc_atomic_int64_cas="no"
17378 fi
17379 rm -f core conftest.err conftest.$ac_objext \
17380     conftest$ac_exeext conftest.$ac_ext
17381 fi
17382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17383 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17384 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17385
17386 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17387
17388 fi
17389
17390
17391 # Check for x86 cpuid instruction
17392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17393 $as_echo_n "checking for __get_cpuid... " >&6; }
17394 if ${pgac_cv__get_cpuid+:} false; then :
17395   $as_echo_n "(cached) " >&6
17396 else
17397   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17398 /* end confdefs.h.  */
17399 #include <cpuid.h>
17400 int
17401 main ()
17402 {
17403 unsigned int exx[4] = {0, 0, 0, 0};
17404   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17405
17406   ;
17407   return 0;
17408 }
17409 _ACEOF
17410 if ac_fn_c_try_link "$LINENO"; then :
17411   pgac_cv__get_cpuid="yes"
17412 else
17413   pgac_cv__get_cpuid="no"
17414 fi
17415 rm -f core conftest.err conftest.$ac_objext \
17416     conftest$ac_exeext conftest.$ac_ext
17417 fi
17418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17419 $as_echo "$pgac_cv__get_cpuid" >&6; }
17420 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17421
17422 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17423
17424 fi
17425
17426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17427 $as_echo_n "checking for __cpuid... " >&6; }
17428 if ${pgac_cv__cpuid+:} false; then :
17429   $as_echo_n "(cached) " >&6
17430 else
17431   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17432 /* end confdefs.h.  */
17433 #include <intrin.h>
17434 int
17435 main ()
17436 {
17437 unsigned int exx[4] = {0, 0, 0, 0};
17438   __get_cpuid(exx[0], 1);
17439
17440   ;
17441   return 0;
17442 }
17443 _ACEOF
17444 if ac_fn_c_try_link "$LINENO"; then :
17445   pgac_cv__cpuid="yes"
17446 else
17447   pgac_cv__cpuid="no"
17448 fi
17449 rm -f core conftest.err conftest.$ac_objext \
17450     conftest$ac_exeext conftest.$ac_ext
17451 fi
17452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17453 $as_echo "$pgac_cv__cpuid" >&6; }
17454 if test x"$pgac_cv__cpuid" = x"yes"; then
17455
17456 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17457
17458 fi
17459
17460 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17461 #
17462 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17463 # with the default compiler flags. If not, check if adding the -msse4.2
17464 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17466 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17467 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17468   $as_echo_n "(cached) " >&6
17469 else
17470   pgac_save_CFLAGS=$CFLAGS
17471 CFLAGS="$pgac_save_CFLAGS "
17472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17473 /* end confdefs.h.  */
17474 #include <nmmintrin.h>
17475 int
17476 main ()
17477 {
17478 unsigned int crc = 0;
17479    crc = _mm_crc32_u8(crc, 0);
17480    crc = _mm_crc32_u32(crc, 0);
17481    /* return computed value, to prevent the above being optimized away */
17482    return crc == 0;
17483   ;
17484   return 0;
17485 }
17486 _ACEOF
17487 if ac_fn_c_try_link "$LINENO"; then :
17488   pgac_cv_sse42_crc32_intrinsics_=yes
17489 else
17490   pgac_cv_sse42_crc32_intrinsics_=no
17491 fi
17492 rm -f core conftest.err conftest.$ac_objext \
17493     conftest$ac_exeext conftest.$ac_ext
17494 CFLAGS="$pgac_save_CFLAGS"
17495 fi
17496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17497 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17498 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17499   CFLAGS_SSE42=""
17500   pgac_sse42_crc32_intrinsics=yes
17501 fi
17502
17503 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17504   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17505 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17506 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17507   $as_echo_n "(cached) " >&6
17508 else
17509   pgac_save_CFLAGS=$CFLAGS
17510 CFLAGS="$pgac_save_CFLAGS -msse4.2"
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__msse4_2=yes
17528 else
17529   pgac_cv_sse42_crc32_intrinsics__msse4_2=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__msse4_2" >&5
17536 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17537 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17538   CFLAGS_SSE42="-msse4.2"
17539   pgac_sse42_crc32_intrinsics=yes
17540 fi
17541
17542 fi
17543
17544
17545 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17546 # define __SSE4_2__ in that case.
17547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17548 /* end confdefs.h.  */
17549
17550 int
17551 main ()
17552 {
17553
17554 #ifndef __SSE4_2__
17555 #error __SSE4_2__ not defined
17556 #endif
17557
17558   ;
17559   return 0;
17560 }
17561 _ACEOF
17562 if ac_fn_c_try_compile "$LINENO"; then :
17563   SSE4_2_TARGETED=1
17564 fi
17565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17566
17567 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17568 #
17569 # First check if __crc32c* intrinsics can be used with the default compiler
17570 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17571 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17573 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17574 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17575   $as_echo_n "(cached) " >&6
17576 else
17577   pgac_save_CFLAGS=$CFLAGS
17578 CFLAGS="$pgac_save_CFLAGS "
17579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17580 /* end confdefs.h.  */
17581 #include <arm_acle.h>
17582 int
17583 main ()
17584 {
17585 unsigned int crc = 0;
17586    crc = __crc32cb(crc, 0);
17587    crc = __crc32ch(crc, 0);
17588    crc = __crc32cw(crc, 0);
17589    crc = __crc32cd(crc, 0);
17590    /* return computed value, to prevent the above being optimized away */
17591    return crc == 0;
17592   ;
17593   return 0;
17594 }
17595 _ACEOF
17596 if ac_fn_c_try_link "$LINENO"; then :
17597   pgac_cv_armv8_crc32c_intrinsics_=yes
17598 else
17599   pgac_cv_armv8_crc32c_intrinsics_=no
17600 fi
17601 rm -f core conftest.err conftest.$ac_objext \
17602     conftest$ac_exeext conftest.$ac_ext
17603 CFLAGS="$pgac_save_CFLAGS"
17604 fi
17605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17606 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17607 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17608   CFLAGS_ARMV8_CRC32C=""
17609   pgac_armv8_crc32c_intrinsics=yes
17610 fi
17611
17612 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17613   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17614 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17615 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17616   $as_echo_n "(cached) " >&6
17617 else
17618   pgac_save_CFLAGS=$CFLAGS
17619 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17621 /* end confdefs.h.  */
17622 #include <arm_acle.h>
17623 int
17624 main ()
17625 {
17626 unsigned int crc = 0;
17627    crc = __crc32cb(crc, 0);
17628    crc = __crc32ch(crc, 0);
17629    crc = __crc32cw(crc, 0);
17630    crc = __crc32cd(crc, 0);
17631    /* return computed value, to prevent the above being optimized away */
17632    return crc == 0;
17633   ;
17634   return 0;
17635 }
17636 _ACEOF
17637 if ac_fn_c_try_link "$LINENO"; then :
17638   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17639 else
17640   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17641 fi
17642 rm -f core conftest.err conftest.$ac_objext \
17643     conftest$ac_exeext conftest.$ac_ext
17644 CFLAGS="$pgac_save_CFLAGS"
17645 fi
17646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17647 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17648 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17649   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17650   pgac_armv8_crc32c_intrinsics=yes
17651 fi
17652
17653 fi
17654
17655
17656 # Select CRC-32C implementation.
17657 #
17658 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17659 # use the special CRC instructions for calculating CRC-32C. If we're not
17660 # targeting such a processor, but we can nevertheless produce code that uses
17661 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17662 # implementations and select which one to use at runtime, depending on whether
17663 # SSE 4.2 is supported by the processor we're running on.
17664 #
17665 # Similarly, if we are targeting an ARM processor that has the CRC
17666 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17667 # we're not targeting such a processor, but can nevertheless produce code that
17668 # uses the CRC instructions, compile both, and select at runtime.
17669 #
17670 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17671 # in the template or configure command line.
17672 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
17673   # Use Intel SSE 4.2 if available.
17674   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17675     USE_SSE42_CRC32C=1
17676   else
17677     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17678     # the runtime check.
17679     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
17680       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17681     else
17682       # Use ARM CRC Extension if available.
17683       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17684         USE_ARMV8_CRC32C=1
17685       else
17686         # ARM CRC Extension, with runtime check?
17687         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17688           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17689         else
17690           # fall back to slicing-by-8 algorithm, which doesn't require any
17691           # special CPU support.
17692           USE_SLICING_BY_8_CRC32C=1
17693         fi
17694       fi
17695     fi
17696   fi
17697 fi
17698
17699 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17701 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17702 if test x"$USE_SSE42_CRC32C" = x"1"; then
17703
17704 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17705
17706   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17708 $as_echo "SSE 4.2" >&6; }
17709 else
17710   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17711
17712 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17713
17714     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17715     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17716 $as_echo "SSE 4.2 with runtime check" >&6; }
17717   else
17718     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17719
17720 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17721
17722       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17723       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17724 $as_echo "ARMv8 CRC instructions" >&6; }
17725     else
17726       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17727
17728 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17729
17730         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17731         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17732 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17733       else
17734
17735 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17736
17737         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17738         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17739 $as_echo "slicing-by-8" >&6; }
17740       fi
17741     fi
17742   fi
17743 fi
17744
17745
17746
17747 # Select semaphore implementation type.
17748 if test "$PORTNAME" != "win32"; then
17749   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17750     # Need sem_open for this
17751     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17752 $as_echo_n "checking for library containing sem_open... " >&6; }
17753 if ${ac_cv_search_sem_open+:} false; then :
17754   $as_echo_n "(cached) " >&6
17755 else
17756   ac_func_search_save_LIBS=$LIBS
17757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17758 /* end confdefs.h.  */
17759
17760 /* Override any GCC internal prototype to avoid an error.
17761    Use char because int might match the return type of a GCC
17762    builtin and then its argument prototype would still apply.  */
17763 #ifdef __cplusplus
17764 extern "C"
17765 #endif
17766 char sem_open ();
17767 int
17768 main ()
17769 {
17770 return sem_open ();
17771   ;
17772   return 0;
17773 }
17774 _ACEOF
17775 for ac_lib in '' rt pthread; do
17776   if test -z "$ac_lib"; then
17777     ac_res="none required"
17778   else
17779     ac_res=-l$ac_lib
17780     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17781   fi
17782   if ac_fn_c_try_link "$LINENO"; then :
17783   ac_cv_search_sem_open=$ac_res
17784 fi
17785 rm -f core conftest.err conftest.$ac_objext \
17786     conftest$ac_exeext
17787   if ${ac_cv_search_sem_open+:} false; then :
17788   break
17789 fi
17790 done
17791 if ${ac_cv_search_sem_open+:} false; then :
17792
17793 else
17794   ac_cv_search_sem_open=no
17795 fi
17796 rm conftest.$ac_ext
17797 LIBS=$ac_func_search_save_LIBS
17798 fi
17799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17800 $as_echo "$ac_cv_search_sem_open" >&6; }
17801 ac_res=$ac_cv_search_sem_open
17802 if test "$ac_res" != no; then :
17803   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17804   USE_NAMED_POSIX_SEMAPHORES=1
17805 fi
17806
17807   fi
17808   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17809     # Need sem_init for this
17810     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17811 $as_echo_n "checking for library containing sem_init... " >&6; }
17812 if ${ac_cv_search_sem_init+:} false; then :
17813   $as_echo_n "(cached) " >&6
17814 else
17815   ac_func_search_save_LIBS=$LIBS
17816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17817 /* end confdefs.h.  */
17818
17819 /* Override any GCC internal prototype to avoid an error.
17820    Use char because int might match the return type of a GCC
17821    builtin and then its argument prototype would still apply.  */
17822 #ifdef __cplusplus
17823 extern "C"
17824 #endif
17825 char sem_init ();
17826 int
17827 main ()
17828 {
17829 return sem_init ();
17830   ;
17831   return 0;
17832 }
17833 _ACEOF
17834 for ac_lib in '' rt pthread; do
17835   if test -z "$ac_lib"; then
17836     ac_res="none required"
17837   else
17838     ac_res=-l$ac_lib
17839     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17840   fi
17841   if ac_fn_c_try_link "$LINENO"; then :
17842   ac_cv_search_sem_init=$ac_res
17843 fi
17844 rm -f core conftest.err conftest.$ac_objext \
17845     conftest$ac_exeext
17846   if ${ac_cv_search_sem_init+:} false; then :
17847   break
17848 fi
17849 done
17850 if ${ac_cv_search_sem_init+:} false; then :
17851
17852 else
17853   ac_cv_search_sem_init=no
17854 fi
17855 rm conftest.$ac_ext
17856 LIBS=$ac_func_search_save_LIBS
17857 fi
17858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17859 $as_echo "$ac_cv_search_sem_init" >&6; }
17860 ac_res=$ac_cv_search_sem_init
17861 if test "$ac_res" != no; then :
17862   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17863   USE_UNNAMED_POSIX_SEMAPHORES=1
17864 fi
17865
17866   fi
17867   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17868 $as_echo_n "checking which semaphore API to use... " >&6; }
17869   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17870
17871 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17872
17873     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17874     sematype="named POSIX"
17875   else
17876     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17877
17878 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17879
17880       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17881       sematype="unnamed POSIX"
17882     else
17883
17884 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17885
17886       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17887       sematype="System V"
17888     fi
17889   fi
17890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17891 $as_echo "$sematype" >&6; }
17892 else
17893
17894 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17895
17896   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17897 fi
17898
17899
17900 # Select shared-memory implementation type.
17901 if test "$PORTNAME" != "win32"; then
17902
17903 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17904
17905   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17906 else
17907
17908 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17909
17910   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17911 fi
17912
17913 # Select random number source
17914 #
17915 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17916 # in the template or configure command line.
17917
17918 # If not selected manually, try to select a source automatically.
17919 if test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
17920   if test x"$with_openssl" = x"yes" ; then
17921     USE_OPENSSL_RANDOM=1
17922   elif test "$PORTNAME" = "win32" ; then
17923     USE_WIN32_RANDOM=1
17924   else
17925     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17926 $as_echo_n "checking for /dev/urandom... " >&6; }
17927 if ${ac_cv_file__dev_urandom+:} false; then :
17928   $as_echo_n "(cached) " >&6
17929 else
17930   test "$cross_compiling" = yes &&
17931   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17932 if test -r "/dev/urandom"; then
17933   ac_cv_file__dev_urandom=yes
17934 else
17935   ac_cv_file__dev_urandom=no
17936 fi
17937 fi
17938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17939 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17940 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17941
17942 fi
17943
17944
17945     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17946       USE_DEV_URANDOM=1
17947     fi
17948   fi
17949 fi
17950
17951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17952 $as_echo_n "checking which random number source to use... " >&6; }
17953 if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17954
17955 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17956
17957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17958 $as_echo "OpenSSL" >&6; }
17959 elif test x"$USE_WIN32_RANDOM" = x"1" ; then
17960
17961 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
17962
17963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17964 $as_echo "Windows native" >&6; }
17965 elif test x"$USE_DEV_URANDOM" = x"1" ; then
17966
17967 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
17968
17969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17970 $as_echo "/dev/urandom" >&6; }
17971 else
17972   as_fn_error $? "
17973 no source of strong random numbers was found
17974 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers." "$LINENO" 5
17975 fi
17976
17977 # If not set in template file, set bytes to use libc memset()
17978 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17979   MEMSET_LOOP_LIMIT=1024
17980 fi
17981
17982 cat >>confdefs.h <<_ACEOF
17983 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17984 _ACEOF
17985
17986
17987
17988 if test "$enable_nls" = yes ; then
17989
17990   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17991 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17992 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17993   $as_echo_n "(cached) " >&6
17994 else
17995   ac_func_search_save_LIBS=$LIBS
17996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17997 /* end confdefs.h.  */
17998
17999 /* Override any GCC internal prototype to avoid an error.
18000    Use char because int might match the return type of a GCC
18001    builtin and then its argument prototype would still apply.  */
18002 #ifdef __cplusplus
18003 extern "C"
18004 #endif
18005 char bind_textdomain_codeset ();
18006 int
18007 main ()
18008 {
18009 return bind_textdomain_codeset ();
18010   ;
18011   return 0;
18012 }
18013 _ACEOF
18014 for ac_lib in '' intl; do
18015   if test -z "$ac_lib"; then
18016     ac_res="none required"
18017   else
18018     ac_res=-l$ac_lib
18019     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18020   fi
18021   if ac_fn_c_try_link "$LINENO"; then :
18022   ac_cv_search_bind_textdomain_codeset=$ac_res
18023 fi
18024 rm -f core conftest.err conftest.$ac_objext \
18025     conftest$ac_exeext
18026   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18027   break
18028 fi
18029 done
18030 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18031
18032 else
18033   ac_cv_search_bind_textdomain_codeset=no
18034 fi
18035 rm conftest.$ac_ext
18036 LIBS=$ac_func_search_save_LIBS
18037 fi
18038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18039 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18040 ac_res=$ac_cv_search_bind_textdomain_codeset
18041 if test "$ac_res" != no; then :
18042   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18043
18044 else
18045   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18046 fi
18047
18048   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18049 if test "x$ac_cv_header_libintl_h" = xyes; then :
18050
18051 else
18052   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18053 fi
18054
18055
18056   if test -z "$MSGFMT"; then
18057   for ac_prog in msgfmt
18058 do
18059   # Extract the first word of "$ac_prog", so it can be a program name with args.
18060 set dummy $ac_prog; ac_word=$2
18061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18062 $as_echo_n "checking for $ac_word... " >&6; }
18063 if ${ac_cv_path_MSGFMT+:} false; then :
18064   $as_echo_n "(cached) " >&6
18065 else
18066   case $MSGFMT in
18067   [\\/]* | ?:[\\/]*)
18068   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18069   ;;
18070   *)
18071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18072 for as_dir in $PATH
18073 do
18074   IFS=$as_save_IFS
18075   test -z "$as_dir" && as_dir=.
18076     for ac_exec_ext in '' $ac_executable_extensions; do
18077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18078     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18080     break 2
18081   fi
18082 done
18083   done
18084 IFS=$as_save_IFS
18085
18086   ;;
18087 esac
18088 fi
18089 MSGFMT=$ac_cv_path_MSGFMT
18090 if test -n "$MSGFMT"; then
18091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18092 $as_echo "$MSGFMT" >&6; }
18093 else
18094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18095 $as_echo "no" >&6; }
18096 fi
18097
18098
18099   test -n "$MSGFMT" && break
18100 done
18101
18102 else
18103   # Report the value of MSGFMT in configure's output in all cases.
18104   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18105 $as_echo_n "checking for MSGFMT... " >&6; }
18106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18107 $as_echo "$MSGFMT" >&6; }
18108 fi
18109
18110     if test -z "$MSGFMT"; then
18111     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18112   fi
18113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18114 $as_echo_n "checking for msgfmt flags... " >&6; }
18115 if ${pgac_cv_msgfmt_flags+:} false; then :
18116   $as_echo_n "(cached) " >&6
18117 else
18118   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18119     pgac_cv_msgfmt_flags=-c
18120 fi
18121 fi
18122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18123 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18124   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18125
18126   if test -z "$MSGMERGE"; then
18127   for ac_prog in msgmerge
18128 do
18129   # Extract the first word of "$ac_prog", so it can be a program name with args.
18130 set dummy $ac_prog; ac_word=$2
18131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18132 $as_echo_n "checking for $ac_word... " >&6; }
18133 if ${ac_cv_path_MSGMERGE+:} false; then :
18134   $as_echo_n "(cached) " >&6
18135 else
18136   case $MSGMERGE in
18137   [\\/]* | ?:[\\/]*)
18138   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18139   ;;
18140   *)
18141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18142 for as_dir in $PATH
18143 do
18144   IFS=$as_save_IFS
18145   test -z "$as_dir" && as_dir=.
18146     for ac_exec_ext in '' $ac_executable_extensions; do
18147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18148     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18150     break 2
18151   fi
18152 done
18153   done
18154 IFS=$as_save_IFS
18155
18156   ;;
18157 esac
18158 fi
18159 MSGMERGE=$ac_cv_path_MSGMERGE
18160 if test -n "$MSGMERGE"; then
18161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18162 $as_echo "$MSGMERGE" >&6; }
18163 else
18164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18165 $as_echo "no" >&6; }
18166 fi
18167
18168
18169   test -n "$MSGMERGE" && break
18170 done
18171
18172 else
18173   # Report the value of MSGMERGE in configure's output in all cases.
18174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18175 $as_echo_n "checking for MSGMERGE... " >&6; }
18176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18177 $as_echo "$MSGMERGE" >&6; }
18178 fi
18179
18180   if test -z "$XGETTEXT"; then
18181   for ac_prog in xgettext
18182 do
18183   # Extract the first word of "$ac_prog", so it can be a program name with args.
18184 set dummy $ac_prog; ac_word=$2
18185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18186 $as_echo_n "checking for $ac_word... " >&6; }
18187 if ${ac_cv_path_XGETTEXT+:} false; then :
18188   $as_echo_n "(cached) " >&6
18189 else
18190   case $XGETTEXT in
18191   [\\/]* | ?:[\\/]*)
18192   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18193   ;;
18194   *)
18195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18196 for as_dir in $PATH
18197 do
18198   IFS=$as_save_IFS
18199   test -z "$as_dir" && as_dir=.
18200     for ac_exec_ext in '' $ac_executable_extensions; do
18201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18202     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18204     break 2
18205   fi
18206 done
18207   done
18208 IFS=$as_save_IFS
18209
18210   ;;
18211 esac
18212 fi
18213 XGETTEXT=$ac_cv_path_XGETTEXT
18214 if test -n "$XGETTEXT"; then
18215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18216 $as_echo "$XGETTEXT" >&6; }
18217 else
18218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18219 $as_echo "no" >&6; }
18220 fi
18221
18222
18223   test -n "$XGETTEXT" && break
18224 done
18225
18226 else
18227   # Report the value of XGETTEXT in configure's output in all cases.
18228   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18229 $as_echo_n "checking for XGETTEXT... " >&6; }
18230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18231 $as_echo "$XGETTEXT" >&6; }
18232 fi
18233
18234
18235 fi
18236
18237 # Check for Tcl configuration script tclConfig.sh
18238 if test "$with_tcl" = yes; then
18239     if test -z "$TCLSH"; then
18240   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18241 do
18242   # Extract the first word of "$ac_prog", so it can be a program name with args.
18243 set dummy $ac_prog; ac_word=$2
18244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18245 $as_echo_n "checking for $ac_word... " >&6; }
18246 if ${ac_cv_path_TCLSH+:} false; then :
18247   $as_echo_n "(cached) " >&6
18248 else
18249   case $TCLSH in
18250   [\\/]* | ?:[\\/]*)
18251   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18252   ;;
18253   *)
18254   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18255 for as_dir in $PATH
18256 do
18257   IFS=$as_save_IFS
18258   test -z "$as_dir" && as_dir=.
18259     for ac_exec_ext in '' $ac_executable_extensions; do
18260   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18261     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18262     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18263     break 2
18264   fi
18265 done
18266   done
18267 IFS=$as_save_IFS
18268
18269   ;;
18270 esac
18271 fi
18272 TCLSH=$ac_cv_path_TCLSH
18273 if test -n "$TCLSH"; then
18274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18275 $as_echo "$TCLSH" >&6; }
18276 else
18277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18278 $as_echo "no" >&6; }
18279 fi
18280
18281
18282   test -n "$TCLSH" && break
18283 done
18284
18285 else
18286   # Report the value of TCLSH in configure's output in all cases.
18287   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18288 $as_echo_n "checking for TCLSH... " >&6; }
18289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18290 $as_echo "$TCLSH" >&6; }
18291 fi
18292
18293 if test x"$TCLSH" = x""; then
18294   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18295 fi
18296
18297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18298 $as_echo_n "checking for tclConfig.sh... " >&6; }
18299 # Let user override test
18300 if test -z "$TCL_CONFIG_SH"; then
18301     pgac_test_dirs="$with_tclconfig"
18302
18303     set X $pgac_test_dirs; shift
18304     if test $# -eq 0; then
18305         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18306         pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18307         # On newer macOS, $auto_path frequently doesn't include the place
18308         # where tclConfig.sh actually lives.  Append that to the end, so as not
18309         # to break cases where a non-default Tcl installation is being used.
18310         if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18311             pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18312         fi
18313         set X $pgac_test_dirs; shift
18314     fi
18315
18316     for pgac_dir do
18317         if test -r "$pgac_dir/tclConfig.sh"; then
18318             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18319             break
18320         fi
18321     done
18322 fi
18323
18324 if test -z "$TCL_CONFIG_SH"; then
18325     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18326 $as_echo "no" >&6; }
18327     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18328 else
18329     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18330 $as_echo "$TCL_CONFIG_SH" >&6; }
18331 fi
18332
18333
18334
18335     . "$TCL_CONFIG_SH"
18336 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18337 eval TCL_LIBS=\"$TCL_LIBS\"
18338 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18339 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18340
18341         if test "$TCL_SHARED_BUILD" != 1; then
18342       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18343 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18344     fi
18345     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18346     ac_save_CPPFLAGS=$CPPFLAGS
18347     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18348     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18349 if test "x$ac_cv_header_tcl_h" = xyes; then :
18350
18351 else
18352   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18353 fi
18354
18355
18356     CPPFLAGS=$ac_save_CPPFLAGS
18357 fi
18358
18359 # check for <perl.h>
18360 if test "$with_perl" = yes; then
18361   ac_save_CPPFLAGS=$CPPFLAGS
18362   CPPFLAGS="$CPPFLAGS $perl_includespec"
18363   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18364 "
18365 if test "x$ac_cv_header_perl_h" = xyes; then :
18366
18367 else
18368   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18369 fi
18370
18371
18372   # While we're at it, check that we can link to libperl.
18373   # On most platforms, if perl.h is there then libperl.so will be too, but at
18374   # this writing Debian packages them separately.  There is no known reason to
18375   # waste cycles on separate probes for the Tcl or Python libraries, though.
18376   pgac_save_LIBS=$LIBS
18377   LIBS="$perl_embed_ldflags"
18378   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18379 $as_echo_n "checking for libperl... " >&6; }
18380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18381 /* end confdefs.h.  */
18382
18383 #include <EXTERN.h>
18384 #include <perl.h>
18385
18386 int
18387 main ()
18388 {
18389 perl_alloc();
18390   ;
18391   return 0;
18392 }
18393 _ACEOF
18394 if ac_fn_c_try_link "$LINENO"; then :
18395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18396 $as_echo "yes" >&6; }
18397 else
18398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18399 $as_echo "no" >&6; }
18400      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18401 fi
18402 rm -f core conftest.err conftest.$ac_objext \
18403     conftest$ac_exeext conftest.$ac_ext
18404   LIBS=$pgac_save_LIBS
18405   CPPFLAGS=$ac_save_CPPFLAGS
18406 fi
18407
18408 # check for <Python.h>
18409 if test "$with_python" = yes; then
18410   ac_save_CPPFLAGS=$CPPFLAGS
18411   CPPFLAGS="$python_includespec $CPPFLAGS"
18412   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18413 if test "x$ac_cv_header_Python_h" = xyes; then :
18414
18415 else
18416   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18417 fi
18418
18419
18420   CPPFLAGS=$ac_save_CPPFLAGS
18421 fi
18422
18423 #
18424 # Check for DocBook and tools
18425 #
18426 if test -z "$XMLLINT"; then
18427   for ac_prog in xmllint
18428 do
18429   # Extract the first word of "$ac_prog", so it can be a program name with args.
18430 set dummy $ac_prog; ac_word=$2
18431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18432 $as_echo_n "checking for $ac_word... " >&6; }
18433 if ${ac_cv_path_XMLLINT+:} false; then :
18434   $as_echo_n "(cached) " >&6
18435 else
18436   case $XMLLINT in
18437   [\\/]* | ?:[\\/]*)
18438   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18439   ;;
18440   *)
18441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18442 for as_dir in $PATH
18443 do
18444   IFS=$as_save_IFS
18445   test -z "$as_dir" && as_dir=.
18446     for ac_exec_ext in '' $ac_executable_extensions; do
18447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18448     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18450     break 2
18451   fi
18452 done
18453   done
18454 IFS=$as_save_IFS
18455
18456   ;;
18457 esac
18458 fi
18459 XMLLINT=$ac_cv_path_XMLLINT
18460 if test -n "$XMLLINT"; then
18461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18462 $as_echo "$XMLLINT" >&6; }
18463 else
18464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18465 $as_echo "no" >&6; }
18466 fi
18467
18468
18469   test -n "$XMLLINT" && break
18470 done
18471
18472 else
18473   # Report the value of XMLLINT in configure's output in all cases.
18474   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18475 $as_echo_n "checking for XMLLINT... " >&6; }
18476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18477 $as_echo "$XMLLINT" >&6; }
18478 fi
18479
18480
18481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18482 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18483 if ${pgac_cv_check_docbook+:} false; then :
18484   $as_echo_n "(cached) " >&6
18485 else
18486   cat >conftest.xml <<EOF
18487 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18488 <book>
18489  <title>test</title>
18490  <chapter>
18491   <title>random</title>
18492    <sect1>
18493     <title>testsect</title>
18494     <para>text</para>
18495   </sect1>
18496  </chapter>
18497 </book>
18498 EOF
18499
18500 pgac_cv_check_docbook=no
18501
18502 if test -n "$XMLLINT"; then
18503   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18504   if test $? -eq 0; then
18505     pgac_cv_check_docbook=yes
18506   fi
18507 fi
18508 rm -f conftest.xml
18509 fi
18510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18511 $as_echo "$pgac_cv_check_docbook" >&6; }
18512
18513 have_docbook=$pgac_cv_check_docbook
18514
18515
18516 if test -z "$DBTOEPUB"; then
18517   for ac_prog in dbtoepub
18518 do
18519   # Extract the first word of "$ac_prog", so it can be a program name with args.
18520 set dummy $ac_prog; ac_word=$2
18521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18522 $as_echo_n "checking for $ac_word... " >&6; }
18523 if ${ac_cv_path_DBTOEPUB+:} false; then :
18524   $as_echo_n "(cached) " >&6
18525 else
18526   case $DBTOEPUB in
18527   [\\/]* | ?:[\\/]*)
18528   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18529   ;;
18530   *)
18531   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18532 for as_dir in $PATH
18533 do
18534   IFS=$as_save_IFS
18535   test -z "$as_dir" && as_dir=.
18536     for ac_exec_ext in '' $ac_executable_extensions; do
18537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18538     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18540     break 2
18541   fi
18542 done
18543   done
18544 IFS=$as_save_IFS
18545
18546   ;;
18547 esac
18548 fi
18549 DBTOEPUB=$ac_cv_path_DBTOEPUB
18550 if test -n "$DBTOEPUB"; then
18551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18552 $as_echo "$DBTOEPUB" >&6; }
18553 else
18554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18555 $as_echo "no" >&6; }
18556 fi
18557
18558
18559   test -n "$DBTOEPUB" && break
18560 done
18561
18562 else
18563   # Report the value of DBTOEPUB in configure's output in all cases.
18564   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18565 $as_echo_n "checking for DBTOEPUB... " >&6; }
18566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18567 $as_echo "$DBTOEPUB" >&6; }
18568 fi
18569
18570 if test -z "$XSLTPROC"; then
18571   for ac_prog in xsltproc
18572 do
18573   # Extract the first word of "$ac_prog", so it can be a program name with args.
18574 set dummy $ac_prog; ac_word=$2
18575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18576 $as_echo_n "checking for $ac_word... " >&6; }
18577 if ${ac_cv_path_XSLTPROC+:} false; then :
18578   $as_echo_n "(cached) " >&6
18579 else
18580   case $XSLTPROC in
18581   [\\/]* | ?:[\\/]*)
18582   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18583   ;;
18584   *)
18585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18586 for as_dir in $PATH
18587 do
18588   IFS=$as_save_IFS
18589   test -z "$as_dir" && as_dir=.
18590     for ac_exec_ext in '' $ac_executable_extensions; do
18591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18592     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18594     break 2
18595   fi
18596 done
18597   done
18598 IFS=$as_save_IFS
18599
18600   ;;
18601 esac
18602 fi
18603 XSLTPROC=$ac_cv_path_XSLTPROC
18604 if test -n "$XSLTPROC"; then
18605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18606 $as_echo "$XSLTPROC" >&6; }
18607 else
18608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18609 $as_echo "no" >&6; }
18610 fi
18611
18612
18613   test -n "$XSLTPROC" && break
18614 done
18615
18616 else
18617   # Report the value of XSLTPROC in configure's output in all cases.
18618   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18619 $as_echo_n "checking for XSLTPROC... " >&6; }
18620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18621 $as_echo "$XSLTPROC" >&6; }
18622 fi
18623
18624 if test -z "$FOP"; then
18625   for ac_prog in fop
18626 do
18627   # Extract the first word of "$ac_prog", so it can be a program name with args.
18628 set dummy $ac_prog; ac_word=$2
18629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18630 $as_echo_n "checking for $ac_word... " >&6; }
18631 if ${ac_cv_path_FOP+:} false; then :
18632   $as_echo_n "(cached) " >&6
18633 else
18634   case $FOP in
18635   [\\/]* | ?:[\\/]*)
18636   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18637   ;;
18638   *)
18639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18640 for as_dir in $PATH
18641 do
18642   IFS=$as_save_IFS
18643   test -z "$as_dir" && as_dir=.
18644     for ac_exec_ext in '' $ac_executable_extensions; do
18645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18646     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18648     break 2
18649   fi
18650 done
18651   done
18652 IFS=$as_save_IFS
18653
18654   ;;
18655 esac
18656 fi
18657 FOP=$ac_cv_path_FOP
18658 if test -n "$FOP"; then
18659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18660 $as_echo "$FOP" >&6; }
18661 else
18662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18663 $as_echo "no" >&6; }
18664 fi
18665
18666
18667   test -n "$FOP" && break
18668 done
18669
18670 else
18671   # Report the value of FOP in configure's output in all cases.
18672   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18673 $as_echo_n "checking for FOP... " >&6; }
18674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18675 $as_echo "$FOP" >&6; }
18676 fi
18677
18678
18679 #
18680 # Check for test tools
18681 #
18682 if test "$enable_tap_tests" = yes; then
18683   # Check for necessary modules, unless user has specified the "prove" to use;
18684   # in that case it's her responsibility to have a working configuration.
18685   # (prove might be part of a different Perl installation than perl, eg on
18686   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18687   if test -z "$PROVE"; then
18688     # Test::More and Time::HiRes are supposed to be part of core Perl,
18689     # but some distros omit them in a minimal installation.
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700 # Make sure we have perl
18701 if test -z "$PERL"; then
18702 # Extract the first word of "perl", so it can be a program name with args.
18703 set dummy perl; ac_word=$2
18704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18705 $as_echo_n "checking for $ac_word... " >&6; }
18706 if ${ac_cv_prog_PERL+:} false; then :
18707   $as_echo_n "(cached) " >&6
18708 else
18709   if test -n "$PERL"; then
18710   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18711 else
18712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18713 for as_dir in $PATH
18714 do
18715   IFS=$as_save_IFS
18716   test -z "$as_dir" && as_dir=.
18717     for ac_exec_ext in '' $ac_executable_extensions; do
18718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18719     ac_cv_prog_PERL="perl"
18720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18721     break 2
18722   fi
18723 done
18724   done
18725 IFS=$as_save_IFS
18726
18727 fi
18728 fi
18729 PERL=$ac_cv_prog_PERL
18730 if test -n "$PERL"; then
18731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18732 $as_echo "$PERL" >&6; }
18733 else
18734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18735 $as_echo "no" >&6; }
18736 fi
18737
18738
18739 fi
18740
18741 if test "x$PERL" != x; then
18742   ax_perl_modules_failed=0
18743   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18744     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18745 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18746
18747     # Would be nice to log result here, but can't rely on autoconf internals
18748     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18749     if test $? -ne 0; then
18750       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18751 $as_echo "no" >&6; };
18752       ax_perl_modules_failed=1
18753    else
18754       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18755 $as_echo "ok" >&6; };
18756     fi
18757   done
18758
18759   # Run optional shell commands
18760   if test "$ax_perl_modules_failed" = 0; then
18761     :
18762
18763   else
18764     :
18765     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18766   fi
18767 else
18768   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18769 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18770 fi
18771   fi
18772   # Now make sure we know where prove is
18773   if test -z "$PROVE"; then
18774   for ac_prog in prove
18775 do
18776   # Extract the first word of "$ac_prog", so it can be a program name with args.
18777 set dummy $ac_prog; ac_word=$2
18778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18779 $as_echo_n "checking for $ac_word... " >&6; }
18780 if ${ac_cv_path_PROVE+:} false; then :
18781   $as_echo_n "(cached) " >&6
18782 else
18783   case $PROVE in
18784   [\\/]* | ?:[\\/]*)
18785   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18786   ;;
18787   *)
18788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18789 for as_dir in $PATH
18790 do
18791   IFS=$as_save_IFS
18792   test -z "$as_dir" && as_dir=.
18793     for ac_exec_ext in '' $ac_executable_extensions; do
18794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18795     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18797     break 2
18798   fi
18799 done
18800   done
18801 IFS=$as_save_IFS
18802
18803   ;;
18804 esac
18805 fi
18806 PROVE=$ac_cv_path_PROVE
18807 if test -n "$PROVE"; then
18808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18809 $as_echo "$PROVE" >&6; }
18810 else
18811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18812 $as_echo "no" >&6; }
18813 fi
18814
18815
18816   test -n "$PROVE" && break
18817 done
18818
18819 else
18820   # Report the value of PROVE in configure's output in all cases.
18821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18822 $as_echo_n "checking for PROVE... " >&6; }
18823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18824 $as_echo "$PROVE" >&6; }
18825 fi
18826
18827   if test -z "$PROVE"; then
18828     as_fn_error $? "prove not found" "$LINENO" 5
18829   fi
18830 fi
18831
18832 # Thread testing
18833
18834 # We have to run the thread test near the end so we have all our symbols
18835 # defined.  Cross compiling throws a warning.
18836 #
18837 if test "$enable_thread_safety" = yes; then
18838 if test "$PORTNAME" != "win32"
18839 then
18840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18841 $as_echo_n "checking thread safety of required library functions... " >&6; }
18842
18843 _CFLAGS="$CFLAGS"
18844 _LIBS="$LIBS"
18845 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18846 LIBS="$LIBS $PTHREAD_LIBS"
18847 if test "$cross_compiling" = yes; then :
18848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18849 $as_echo "maybe" >&6; }
18850   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18851 *** Skipping thread test program because of cross-compile build.
18852 *** Run the program in src/test/thread on the target machine.
18853 " >&5
18854 $as_echo "$as_me: WARNING:
18855 *** Skipping thread test program because of cross-compile build.
18856 *** Run the program in src/test/thread on the target machine.
18857 " >&2;}
18858 else
18859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18860 /* end confdefs.h.  */
18861 #include "$srcdir/src/test/thread/thread_test.c"
18862 _ACEOF
18863 if ac_fn_c_try_run "$LINENO"; then :
18864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18865 $as_echo "yes" >&6; }
18866 else
18867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18868 $as_echo "no" >&6; }
18869   as_fn_error $? "thread test program failed
18870 This platform is not thread-safe.  Check the file 'config.log' or compile
18871 and run src/test/thread/thread_test for the exact reason.
18872 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18873 fi
18874 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18875   conftest.$ac_objext conftest.beam conftest.$ac_ext
18876 fi
18877
18878 CFLAGS="$_CFLAGS"
18879 LIBS="$_LIBS"
18880 else
18881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18882 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18883 fi
18884 fi
18885
18886 # If compiler will take -Wl,--as-needed (or various platform-specific
18887 # spellings thereof) then add that to LDFLAGS.  This is much easier than
18888 # trying to filter LIBS to the minimum for each executable.
18889 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18890 # libreadline; therefore we postpone testing it until we know what library
18891 # dependencies readline has.  The test code will try to link with $LIBS.
18892 if test "$with_readline" = yes; then
18893   link_test_func=readline
18894 else
18895   link_test_func=exit
18896 fi
18897
18898 if test "$PORTNAME" = "darwin"; then
18899   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18900 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18901 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18902   $as_echo_n "(cached) " >&6
18903 else
18904   pgac_save_LDFLAGS=$LDFLAGS
18905 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18906 if test "$cross_compiling" = yes; then :
18907   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18908 else
18909   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18910 /* end confdefs.h.  */
18911 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18912 int
18913 main ()
18914 {
18915
18916   ;
18917   return 0;
18918 }
18919 _ACEOF
18920 if ac_fn_c_try_run "$LINENO"; then :
18921   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18922 else
18923   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18924 fi
18925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18926   conftest.$ac_objext conftest.beam conftest.$ac_ext
18927 fi
18928
18929 LDFLAGS="$pgac_save_LDFLAGS"
18930 fi
18931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18932 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18933 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18934   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18935 fi
18936
18937 elif test "$PORTNAME" = "openbsd"; then
18938   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18939 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18940 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18941   $as_echo_n "(cached) " >&6
18942 else
18943   pgac_save_LDFLAGS=$LDFLAGS
18944 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18945 if test "$cross_compiling" = yes; then :
18946   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18947 else
18948   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18949 /* end confdefs.h.  */
18950 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18951 int
18952 main ()
18953 {
18954
18955   ;
18956   return 0;
18957 }
18958 _ACEOF
18959 if ac_fn_c_try_run "$LINENO"; then :
18960   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
18961 else
18962   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
18963 fi
18964 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18965   conftest.$ac_objext conftest.beam conftest.$ac_ext
18966 fi
18967
18968 LDFLAGS="$pgac_save_LDFLAGS"
18969 fi
18970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
18971 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
18972 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
18973   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
18974 fi
18975
18976 else
18977   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
18978 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
18979 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
18980   $as_echo_n "(cached) " >&6
18981 else
18982   pgac_save_LDFLAGS=$LDFLAGS
18983 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18984 if test "$cross_compiling" = yes; then :
18985   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
18986 else
18987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18988 /* end confdefs.h.  */
18989 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18990 int
18991 main ()
18992 {
18993
18994   ;
18995   return 0;
18996 }
18997 _ACEOF
18998 if ac_fn_c_try_run "$LINENO"; then :
18999   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19000 else
19001   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19002 fi
19003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19004   conftest.$ac_objext conftest.beam conftest.$ac_ext
19005 fi
19006
19007 LDFLAGS="$pgac_save_LDFLAGS"
19008 fi
19009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19010 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19011 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19012   LDFLAGS="$LDFLAGS -Wl,--as-needed"
19013 fi
19014
19015 fi
19016
19017 # Create compiler version string
19018 if test x"$GCC" = x"yes" ; then
19019   cc_string=`${CC} --version | sed q`
19020   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19021 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19022   cc_string=`${CC} -V 2>&1 | sed q`
19023 else
19024   cc_string=$CC
19025 fi
19026
19027
19028 cat >>confdefs.h <<_ACEOF
19029 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19030 _ACEOF
19031
19032
19033 # Supply a numeric version string for use by 3rd party add-ons
19034 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19035 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
19036 tr '.' '        ' |
19037 $AWK '{printf "%d%04d", $1, $2}'`"
19038
19039 cat >>confdefs.h <<_ACEOF
19040 #define PG_VERSION_NUM $PG_VERSION_NUM
19041 _ACEOF
19042
19043
19044
19045 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19046 # literally, so that it's possible to override it at build time using
19047 # a command like "make ... PG_SYSROOT=path".  This has to be done after
19048 # we've finished all configure checks that depend on CPPFLAGS.
19049 if test x"$PG_SYSROOT" != x; then
19050   CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19051 fi
19052
19053
19054
19055 # Begin output steps
19056
19057 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19058 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19059 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19060 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19061 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19062 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19063 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19064 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19065 # Currently only used when LLVM is used
19066 if test "$with_llvm" = yes ; then
19067    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19068 $as_echo "$as_me: using CXX=$CXX" >&6;}
19069    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19070 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19071    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19072 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19073    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19074 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19075    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19076 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19077 fi
19078
19079 # prepare build tree if outside source tree
19080 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19081 # Note 2: /bin/pwd might be better than shell's built-in at getting
19082 #         a symlink-free name.
19083 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19084   vpath_build=no
19085 else
19086   vpath_build=yes
19087   if test "$no_create" != yes; then
19088     $as_echo_n "preparing build tree... " >&6
19089     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19090     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19091       || as_fn_error $? "failed" "$LINENO" 5
19092     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19093 $as_echo "done" >&6; }
19094   fi
19095 fi
19096
19097
19098
19099 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19100
19101
19102 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}"
19103
19104
19105 if test "$PORTNAME" = "win32"; then
19106 ac_config_commands="$ac_config_commands check_win32_symlinks"
19107
19108 fi
19109
19110 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19111
19112
19113 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19114
19115
19116 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19117
19118
19119 cat >confcache <<\_ACEOF
19120 # This file is a shell script that caches the results of configure
19121 # tests run on this system so they can be shared between configure
19122 # scripts and configure runs, see configure's option --config-cache.
19123 # It is not useful on other systems.  If it contains results you don't
19124 # want to keep, you may remove or edit it.
19125 #
19126 # config.status only pays attention to the cache file if you give it
19127 # the --recheck option to rerun configure.
19128 #
19129 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19130 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19131 # following values.
19132
19133 _ACEOF
19134
19135 # The following way of writing the cache mishandles newlines in values,
19136 # but we know of no workaround that is simple, portable, and efficient.
19137 # So, we kill variables containing newlines.
19138 # Ultrix sh set writes to stderr and can't be redirected directly,
19139 # and sets the high bit in the cache file unless we assign to the vars.
19140 (
19141   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19142     eval ac_val=\$$ac_var
19143     case $ac_val in #(
19144     *${as_nl}*)
19145       case $ac_var in #(
19146       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19147 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19148       esac
19149       case $ac_var in #(
19150       _ | IFS | as_nl) ;; #(
19151       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19152       *) { eval $ac_var=; unset $ac_var;} ;;
19153       esac ;;
19154     esac
19155   done
19156
19157   (set) 2>&1 |
19158     case $as_nl`(ac_space=' '; set) 2>&1` in #(
19159     *${as_nl}ac_space=\ *)
19160       # `set' does not quote correctly, so add quotes: double-quote
19161       # substitution turns \\\\ into \\, and sed turns \\ into \.
19162       sed -n \
19163         "s/'/'\\\\''/g;
19164           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19165       ;; #(
19166     *)
19167       # `set' quotes correctly as required by POSIX, so do not add quotes.
19168       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19169       ;;
19170     esac |
19171     sort
19172 ) |
19173   sed '
19174      /^ac_cv_env_/b end
19175      t clear
19176      :clear
19177      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19178      t end
19179      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19180      :end' >>confcache
19181 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19182   if test -w "$cache_file"; then
19183     if test "x$cache_file" != "x/dev/null"; then
19184       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19185 $as_echo "$as_me: updating cache $cache_file" >&6;}
19186       if test ! -f "$cache_file" || test -h "$cache_file"; then
19187         cat confcache >"$cache_file"
19188       else
19189         case $cache_file in #(
19190         */* | ?:*)
19191           mv -f confcache "$cache_file"$$ &&
19192           mv -f "$cache_file"$$ "$cache_file" ;; #(
19193         *)
19194           mv -f confcache "$cache_file" ;;
19195         esac
19196       fi
19197     fi
19198   else
19199     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19200 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19201   fi
19202 fi
19203 rm -f confcache
19204
19205 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19206 # Let make expand exec_prefix.
19207 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19208
19209 DEFS=-DHAVE_CONFIG_H
19210
19211 ac_libobjs=
19212 ac_ltlibobjs=
19213 U=
19214 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19215   # 1. Remove the extension, and $U if already installed.
19216   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19217   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19218   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19219   #    will be set to the directory where LIBOBJS objects are built.
19220   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19221   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19222 done
19223 LIBOBJS=$ac_libobjs
19224
19225 LTLIBOBJS=$ac_ltlibobjs
19226
19227
19228
19229
19230 : "${CONFIG_STATUS=./config.status}"
19231 ac_write_fail=0
19232 ac_clean_files_save=$ac_clean_files
19233 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19234 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19235 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19236 as_write_fail=0
19237 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19238 #! $SHELL
19239 # Generated by $as_me.
19240 # Run this file to recreate the current configuration.
19241 # Compiler output produced by configure, useful for debugging
19242 # configure, is in config.log if it exists.
19243
19244 debug=false
19245 ac_cs_recheck=false
19246 ac_cs_silent=false
19247
19248 SHELL=\${CONFIG_SHELL-$SHELL}
19249 export SHELL
19250 _ASEOF
19251 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19252 ## -------------------- ##
19253 ## M4sh Initialization. ##
19254 ## -------------------- ##
19255
19256 # Be more Bourne compatible
19257 DUALCASE=1; export DUALCASE # for MKS sh
19258 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19259   emulate sh
19260   NULLCMD=:
19261   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19262   # is contrary to our usage.  Disable this feature.
19263   alias -g '${1+"$@"}'='"$@"'
19264   setopt NO_GLOB_SUBST
19265 else
19266   case `(set -o) 2>/dev/null` in #(
19267   *posix*) :
19268     set -o posix ;; #(
19269   *) :
19270      ;;
19271 esac
19272 fi
19273
19274
19275 as_nl='
19276 '
19277 export as_nl
19278 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19279 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19280 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19281 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19282 # Prefer a ksh shell builtin over an external printf program on Solaris,
19283 # but without wasting forks for bash or zsh.
19284 if test -z "$BASH_VERSION$ZSH_VERSION" \
19285     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19286   as_echo='print -r --'
19287   as_echo_n='print -rn --'
19288 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19289   as_echo='printf %s\n'
19290   as_echo_n='printf %s'
19291 else
19292   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19293     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19294     as_echo_n='/usr/ucb/echo -n'
19295   else
19296     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19297     as_echo_n_body='eval
19298       arg=$1;
19299       case $arg in #(
19300       *"$as_nl"*)
19301         expr "X$arg" : "X\\(.*\\)$as_nl";
19302         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19303       esac;
19304       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19305     '
19306     export as_echo_n_body
19307     as_echo_n='sh -c $as_echo_n_body as_echo'
19308   fi
19309   export as_echo_body
19310   as_echo='sh -c $as_echo_body as_echo'
19311 fi
19312
19313 # The user is always right.
19314 if test "${PATH_SEPARATOR+set}" != set; then
19315   PATH_SEPARATOR=:
19316   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19317     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19318       PATH_SEPARATOR=';'
19319   }
19320 fi
19321
19322
19323 # IFS
19324 # We need space, tab and new line, in precisely that order.  Quoting is
19325 # there to prevent editors from complaining about space-tab.
19326 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19327 # splitting by setting IFS to empty value.)
19328 IFS=" ""        $as_nl"
19329
19330 # Find who we are.  Look in the path if we contain no directory separator.
19331 as_myself=
19332 case $0 in #((
19333   *[\\/]* ) as_myself=$0 ;;
19334   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19335 for as_dir in $PATH
19336 do
19337   IFS=$as_save_IFS
19338   test -z "$as_dir" && as_dir=.
19339     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19340   done
19341 IFS=$as_save_IFS
19342
19343      ;;
19344 esac
19345 # We did not find ourselves, most probably we were run as `sh COMMAND'
19346 # in which case we are not to be found in the path.
19347 if test "x$as_myself" = x; then
19348   as_myself=$0
19349 fi
19350 if test ! -f "$as_myself"; then
19351   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19352   exit 1
19353 fi
19354
19355 # Unset variables that we do not need and which cause bugs (e.g. in
19356 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19357 # suppresses any "Segmentation fault" message there.  '((' could
19358 # trigger a bug in pdksh 5.2.14.
19359 for as_var in BASH_ENV ENV MAIL MAILPATH
19360 do eval test x\${$as_var+set} = xset \
19361   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19362 done
19363 PS1='$ '
19364 PS2='> '
19365 PS4='+ '
19366
19367 # NLS nuisances.
19368 LC_ALL=C
19369 export LC_ALL
19370 LANGUAGE=C
19371 export LANGUAGE
19372
19373 # CDPATH.
19374 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19375
19376
19377 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19378 # ----------------------------------------
19379 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19380 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19381 # script with STATUS, using 1 if that was 0.
19382 as_fn_error ()
19383 {
19384   as_status=$1; test $as_status -eq 0 && as_status=1
19385   if test "$4"; then
19386     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19387     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19388   fi
19389   $as_echo "$as_me: error: $2" >&2
19390   as_fn_exit $as_status
19391 } # as_fn_error
19392
19393
19394 # as_fn_set_status STATUS
19395 # -----------------------
19396 # Set $? to STATUS, without forking.
19397 as_fn_set_status ()
19398 {
19399   return $1
19400 } # as_fn_set_status
19401
19402 # as_fn_exit STATUS
19403 # -----------------
19404 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19405 as_fn_exit ()
19406 {
19407   set +e
19408   as_fn_set_status $1
19409   exit $1
19410 } # as_fn_exit
19411
19412 # as_fn_unset VAR
19413 # ---------------
19414 # Portably unset VAR.
19415 as_fn_unset ()
19416 {
19417   { eval $1=; unset $1;}
19418 }
19419 as_unset=as_fn_unset
19420 # as_fn_append VAR VALUE
19421 # ----------------------
19422 # Append the text in VALUE to the end of the definition contained in VAR. Take
19423 # advantage of any shell optimizations that allow amortized linear growth over
19424 # repeated appends, instead of the typical quadratic growth present in naive
19425 # implementations.
19426 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19427   eval 'as_fn_append ()
19428   {
19429     eval $1+=\$2
19430   }'
19431 else
19432   as_fn_append ()
19433   {
19434     eval $1=\$$1\$2
19435   }
19436 fi # as_fn_append
19437
19438 # as_fn_arith ARG...
19439 # ------------------
19440 # Perform arithmetic evaluation on the ARGs, and store the result in the
19441 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19442 # must be portable across $(()) and expr.
19443 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19444   eval 'as_fn_arith ()
19445   {
19446     as_val=$(( $* ))
19447   }'
19448 else
19449   as_fn_arith ()
19450   {
19451     as_val=`expr "$@" || test $? -eq 1`
19452   }
19453 fi # as_fn_arith
19454
19455
19456 if expr a : '\(a\)' >/dev/null 2>&1 &&
19457    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19458   as_expr=expr
19459 else
19460   as_expr=false
19461 fi
19462
19463 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19464   as_basename=basename
19465 else
19466   as_basename=false
19467 fi
19468
19469 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19470   as_dirname=dirname
19471 else
19472   as_dirname=false
19473 fi
19474
19475 as_me=`$as_basename -- "$0" ||
19476 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19477          X"$0" : 'X\(//\)$' \| \
19478          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19479 $as_echo X/"$0" |
19480     sed '/^.*\/\([^/][^/]*\)\/*$/{
19481             s//\1/
19482             q
19483           }
19484           /^X\/\(\/\/\)$/{
19485             s//\1/
19486             q
19487           }
19488           /^X\/\(\/\).*/{
19489             s//\1/
19490             q
19491           }
19492           s/.*/./; q'`
19493
19494 # Avoid depending upon Character Ranges.
19495 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19496 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19497 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19498 as_cr_digits='0123456789'
19499 as_cr_alnum=$as_cr_Letters$as_cr_digits
19500
19501 ECHO_C= ECHO_N= ECHO_T=
19502 case `echo -n x` in #(((((
19503 -n*)
19504   case `echo 'xy\c'` in
19505   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19506   xy)  ECHO_C='\c';;
19507   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19508        ECHO_T=' ';;
19509   esac;;
19510 *)
19511   ECHO_N='-n';;
19512 esac
19513
19514 rm -f conf$$ conf$$.exe conf$$.file
19515 if test -d conf$$.dir; then
19516   rm -f conf$$.dir/conf$$.file
19517 else
19518   rm -f conf$$.dir
19519   mkdir conf$$.dir 2>/dev/null
19520 fi
19521 if (echo >conf$$.file) 2>/dev/null; then
19522   if ln -s conf$$.file conf$$ 2>/dev/null; then
19523     as_ln_s='ln -s'
19524     # ... but there are two gotchas:
19525     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19526     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19527     # In both cases, we have to default to `cp -pR'.
19528     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19529       as_ln_s='cp -pR'
19530   elif ln conf$$.file conf$$ 2>/dev/null; then
19531     as_ln_s=ln
19532   else
19533     as_ln_s='cp -pR'
19534   fi
19535 else
19536   as_ln_s='cp -pR'
19537 fi
19538 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19539 rmdir conf$$.dir 2>/dev/null
19540
19541
19542 # as_fn_mkdir_p
19543 # -------------
19544 # Create "$as_dir" as a directory, including parents if necessary.
19545 as_fn_mkdir_p ()
19546 {
19547
19548   case $as_dir in #(
19549   -*) as_dir=./$as_dir;;
19550   esac
19551   test -d "$as_dir" || eval $as_mkdir_p || {
19552     as_dirs=
19553     while :; do
19554       case $as_dir in #(
19555       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19556       *) as_qdir=$as_dir;;
19557       esac
19558       as_dirs="'$as_qdir' $as_dirs"
19559       as_dir=`$as_dirname -- "$as_dir" ||
19560 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19561          X"$as_dir" : 'X\(//\)[^/]' \| \
19562          X"$as_dir" : 'X\(//\)$' \| \
19563          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19564 $as_echo X"$as_dir" |
19565     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19566             s//\1/
19567             q
19568           }
19569           /^X\(\/\/\)[^/].*/{
19570             s//\1/
19571             q
19572           }
19573           /^X\(\/\/\)$/{
19574             s//\1/
19575             q
19576           }
19577           /^X\(\/\).*/{
19578             s//\1/
19579             q
19580           }
19581           s/.*/./; q'`
19582       test -d "$as_dir" && break
19583     done
19584     test -z "$as_dirs" || eval "mkdir $as_dirs"
19585   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19586
19587
19588 } # as_fn_mkdir_p
19589 if mkdir -p . 2>/dev/null; then
19590   as_mkdir_p='mkdir -p "$as_dir"'
19591 else
19592   test -d ./-p && rmdir ./-p
19593   as_mkdir_p=false
19594 fi
19595
19596
19597 # as_fn_executable_p FILE
19598 # -----------------------
19599 # Test if FILE is an executable regular file.
19600 as_fn_executable_p ()
19601 {
19602   test -f "$1" && test -x "$1"
19603 } # as_fn_executable_p
19604 as_test_x='test -x'
19605 as_executable_p=as_fn_executable_p
19606
19607 # Sed expression to map a string onto a valid CPP name.
19608 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19609
19610 # Sed expression to map a string onto a valid variable name.
19611 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19612
19613
19614 exec 6>&1
19615 ## ----------------------------------- ##
19616 ## Main body of $CONFIG_STATUS script. ##
19617 ## ----------------------------------- ##
19618 _ASEOF
19619 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19620
19621 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19622 # Save the log message, to keep $0 and so on meaningful, and to
19623 # report actual input values of CONFIG_FILES etc. instead of their
19624 # values after options handling.
19625 ac_log="
19626 This file was extended by PostgreSQL $as_me 12devel, which was
19627 generated by GNU Autoconf 2.69.  Invocation command line was
19628
19629   CONFIG_FILES    = $CONFIG_FILES
19630   CONFIG_HEADERS  = $CONFIG_HEADERS
19631   CONFIG_LINKS    = $CONFIG_LINKS
19632   CONFIG_COMMANDS = $CONFIG_COMMANDS
19633   $ $0 $@
19634
19635 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19636 "
19637
19638 _ACEOF
19639
19640 case $ac_config_files in *"
19641 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19642 esac
19643
19644 case $ac_config_headers in *"
19645 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19646 esac
19647
19648
19649 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19650 # Files that config.status was made for.
19651 config_files="$ac_config_files"
19652 config_headers="$ac_config_headers"
19653 config_links="$ac_config_links"
19654 config_commands="$ac_config_commands"
19655
19656 _ACEOF
19657
19658 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19659 ac_cs_usage="\
19660 \`$as_me' instantiates files and other configuration actions
19661 from templates according to the current configuration.  Unless the files
19662 and actions are specified as TAGs, all are instantiated by default.
19663
19664 Usage: $0 [OPTION]... [TAG]...
19665
19666   -h, --help       print this help, then exit
19667   -V, --version    print version number and configuration settings, then exit
19668       --config     print configuration, then exit
19669   -q, --quiet, --silent
19670                    do not print progress messages
19671   -d, --debug      don't remove temporary files
19672       --recheck    update $as_me by reconfiguring in the same conditions
19673       --file=FILE[:TEMPLATE]
19674                    instantiate the configuration file FILE
19675       --header=FILE[:TEMPLATE]
19676                    instantiate the configuration header FILE
19677
19678 Configuration files:
19679 $config_files
19680
19681 Configuration headers:
19682 $config_headers
19683
19684 Configuration links:
19685 $config_links
19686
19687 Configuration commands:
19688 $config_commands
19689
19690 Report bugs to <pgsql-bugs@lists.postgresql.org>."
19691
19692 _ACEOF
19693 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19694 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19695 ac_cs_version="\\
19696 PostgreSQL config.status 12devel
19697 configured by $0, generated by GNU Autoconf 2.69,
19698   with options \\"\$ac_cs_config\\"
19699
19700 Copyright (C) 2012 Free Software Foundation, Inc.
19701 This config.status script is free software; the Free Software Foundation
19702 gives unlimited permission to copy, distribute and modify it."
19703
19704 ac_pwd='$ac_pwd'
19705 srcdir='$srcdir'
19706 INSTALL='$INSTALL'
19707 MKDIR_P='$MKDIR_P'
19708 AWK='$AWK'
19709 test -n "\$AWK" || AWK=awk
19710 _ACEOF
19711
19712 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19713 # The default lists apply if the user does not specify any file.
19714 ac_need_defaults=:
19715 while test $# != 0
19716 do
19717   case $1 in
19718   --*=?*)
19719     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19720     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19721     ac_shift=:
19722     ;;
19723   --*=)
19724     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19725     ac_optarg=
19726     ac_shift=:
19727     ;;
19728   *)
19729     ac_option=$1
19730     ac_optarg=$2
19731     ac_shift=shift
19732     ;;
19733   esac
19734
19735   case $ac_option in
19736   # Handling of the options.
19737   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19738     ac_cs_recheck=: ;;
19739   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19740     $as_echo "$ac_cs_version"; exit ;;
19741   --config | --confi | --conf | --con | --co | --c )
19742     $as_echo "$ac_cs_config"; exit ;;
19743   --debug | --debu | --deb | --de | --d | -d )
19744     debug=: ;;
19745   --file | --fil | --fi | --f )
19746     $ac_shift
19747     case $ac_optarg in
19748     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19749     '') as_fn_error $? "missing file argument" ;;
19750     esac
19751     as_fn_append CONFIG_FILES " '$ac_optarg'"
19752     ac_need_defaults=false;;
19753   --header | --heade | --head | --hea )
19754     $ac_shift
19755     case $ac_optarg in
19756     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19757     esac
19758     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19759     ac_need_defaults=false;;
19760   --he | --h)
19761     # Conflict between --help and --header
19762     as_fn_error $? "ambiguous option: \`$1'
19763 Try \`$0 --help' for more information.";;
19764   --help | --hel | -h )
19765     $as_echo "$ac_cs_usage"; exit ;;
19766   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19767   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19768     ac_cs_silent=: ;;
19769
19770   # This is an error.
19771   -*) as_fn_error $? "unrecognized option: \`$1'
19772 Try \`$0 --help' for more information." ;;
19773
19774   *) as_fn_append ac_config_targets " $1"
19775      ac_need_defaults=false ;;
19776
19777   esac
19778   shift
19779 done
19780
19781 ac_configure_extra_args=
19782
19783 if $ac_cs_silent; then
19784   exec 6>/dev/null
19785   ac_configure_extra_args="$ac_configure_extra_args --silent"
19786 fi
19787
19788 _ACEOF
19789 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19790 if \$ac_cs_recheck; then
19791   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19792   shift
19793   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19794   CONFIG_SHELL='$SHELL'
19795   export CONFIG_SHELL
19796   exec "\$@"
19797 fi
19798
19799 _ACEOF
19800 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19801 exec 5>>config.log
19802 {
19803   echo
19804   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19805 ## Running $as_me. ##
19806 _ASBOX
19807   $as_echo "$ac_log"
19808 } >&5
19809
19810 _ACEOF
19811 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19812 _ACEOF
19813
19814 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19815
19816 # Handling of arguments.
19817 for ac_config_target in $ac_config_targets
19818 do
19819   case $ac_config_target in
19820     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19821     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19822     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19823     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19824     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19825     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19826     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19827     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19828     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19829     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19830     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19831
19832   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19833   esac
19834 done
19835
19836
19837 # If the user did not use the arguments to specify the items to instantiate,
19838 # then the envvar interface is used.  Set only those that are not.
19839 # We use the long form for the default assignment because of an extremely
19840 # bizarre bug on SunOS 4.1.3.
19841 if $ac_need_defaults; then
19842   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19843   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19844   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19845   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19846 fi
19847
19848 # Have a temporary directory for convenience.  Make it in the build tree
19849 # simply because there is no reason against having it here, and in addition,
19850 # creating and moving files from /tmp can sometimes cause problems.
19851 # Hook for its removal unless debugging.
19852 # Note that there is a small window in which the directory will not be cleaned:
19853 # after its creation but before its name has been assigned to `$tmp'.
19854 $debug ||
19855 {
19856   tmp= ac_tmp=
19857   trap 'exit_status=$?
19858   : "${ac_tmp:=$tmp}"
19859   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19860 ' 0
19861   trap 'as_fn_exit 1' 1 2 13 15
19862 }
19863 # Create a (secure) tmp directory for tmp files.
19864
19865 {
19866   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19867   test -d "$tmp"
19868 }  ||
19869 {
19870   tmp=./conf$$-$RANDOM
19871   (umask 077 && mkdir "$tmp")
19872 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19873 ac_tmp=$tmp
19874
19875 # Set up the scripts for CONFIG_FILES section.
19876 # No need to generate them if there are no CONFIG_FILES.
19877 # This happens for instance with `./config.status config.h'.
19878 if test -n "$CONFIG_FILES"; then
19879
19880
19881 ac_cr=`echo X | tr X '\015'`
19882 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19883 # But we know of no other shell where ac_cr would be empty at this
19884 # point, so we can use a bashism as a fallback.
19885 if test "x$ac_cr" = x; then
19886   eval ac_cr=\$\'\\r\'
19887 fi
19888 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19889 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19890   ac_cs_awk_cr='\\r'
19891 else
19892   ac_cs_awk_cr=$ac_cr
19893 fi
19894
19895 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19896 _ACEOF
19897
19898
19899 {
19900   echo "cat >conf$$subs.awk <<_ACEOF" &&
19901   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19902   echo "_ACEOF"
19903 } >conf$$subs.sh ||
19904   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19905 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19906 ac_delim='%!_!# '
19907 for ac_last_try in false false false false false :; do
19908   . ./conf$$subs.sh ||
19909     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19910
19911   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19912   if test $ac_delim_n = $ac_delim_num; then
19913     break
19914   elif $ac_last_try; then
19915     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19916   else
19917     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19918   fi
19919 done
19920 rm -f conf$$subs.sh
19921
19922 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19923 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19924 _ACEOF
19925 sed -n '
19926 h
19927 s/^/S["/; s/!.*/"]=/
19928 p
19929 g
19930 s/^[^!]*!//
19931 :repl
19932 t repl
19933 s/'"$ac_delim"'$//
19934 t delim
19935 :nl
19936 h
19937 s/\(.\{148\}\)..*/\1/
19938 t more1
19939 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19940 p
19941 n
19942 b repl
19943 :more1
19944 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19945 p
19946 g
19947 s/.\{148\}//
19948 t nl
19949 :delim
19950 h
19951 s/\(.\{148\}\)..*/\1/
19952 t more2
19953 s/["\\]/\\&/g; s/^/"/; s/$/"/
19954 p
19955 b
19956 :more2
19957 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19958 p
19959 g
19960 s/.\{148\}//
19961 t delim
19962 ' <conf$$subs.awk | sed '
19963 /^[^""]/{
19964   N
19965   s/\n//
19966 }
19967 ' >>$CONFIG_STATUS || ac_write_fail=1
19968 rm -f conf$$subs.awk
19969 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19970 _ACAWK
19971 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19972   for (key in S) S_is_set[key] = 1
19973   FS = "\a"
19974
19975 }
19976 {
19977   line = $ 0
19978   nfields = split(line, field, "@")
19979   substed = 0
19980   len = length(field[1])
19981   for (i = 2; i < nfields; i++) {
19982     key = field[i]
19983     keylen = length(key)
19984     if (S_is_set[key]) {
19985       value = S[key]
19986       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19987       len += length(value) + length(field[++i])
19988       substed = 1
19989     } else
19990       len += 1 + keylen
19991   }
19992
19993   print line
19994 }
19995
19996 _ACAWK
19997 _ACEOF
19998 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19999 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20000   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20001 else
20002   cat
20003 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20004   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20005 _ACEOF
20006
20007 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20008 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20009 # trailing colons and then remove the whole line if VPATH becomes empty
20010 # (actually we leave an empty line to preserve line numbers).
20011 if test "x$srcdir" = x.; then
20012   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
20013 h
20014 s///
20015 s/^/:/
20016 s/[      ]*$/:/
20017 s/:\$(srcdir):/:/g
20018 s/:\${srcdir}:/:/g
20019 s/:@srcdir@:/:/g
20020 s/^:*//
20021 s/:*$//
20022 x
20023 s/\(=[   ]*\).*/\1/
20024 G
20025 s/\n//
20026 s/^[^=]*=[       ]*$//
20027 }'
20028 fi
20029
20030 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20031 fi # test -n "$CONFIG_FILES"
20032
20033 # Set up the scripts for CONFIG_HEADERS section.
20034 # No need to generate them if there are no CONFIG_HEADERS.
20035 # This happens for instance with `./config.status Makefile'.
20036 if test -n "$CONFIG_HEADERS"; then
20037 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20038 BEGIN {
20039 _ACEOF
20040
20041 # Transform confdefs.h into an awk script `defines.awk', embedded as
20042 # here-document in config.status, that substitutes the proper values into
20043 # config.h.in to produce config.h.
20044
20045 # Create a delimiter string that does not exist in confdefs.h, to ease
20046 # handling of long lines.
20047 ac_delim='%!_!# '
20048 for ac_last_try in false false :; do
20049   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20050   if test -z "$ac_tt"; then
20051     break
20052   elif $ac_last_try; then
20053     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20054   else
20055     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20056   fi
20057 done
20058
20059 # For the awk script, D is an array of macro values keyed by name,
20060 # likewise P contains macro parameters if any.  Preserve backslash
20061 # newline sequences.
20062
20063 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20064 sed -n '
20065 s/.\{148\}/&'"$ac_delim"'/g
20066 t rset
20067 :rset
20068 s/^[     ]*#[    ]*define[       ][      ]*/ /
20069 t def
20070 d
20071 :def
20072 s/\\$//
20073 t bsnl
20074 s/["\\]/\\&/g
20075 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20076 D["\1"]=" \3"/p
20077 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
20078 d
20079 :bsnl
20080 s/["\\]/\\&/g
20081 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20082 D["\1"]=" \3\\\\\\n"\\/p
20083 t cont
20084 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20085 t cont
20086 d
20087 :cont
20088 n
20089 s/.\{148\}/&'"$ac_delim"'/g
20090 t clear
20091 :clear
20092 s/\\$//
20093 t bsnlc
20094 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20095 d
20096 :bsnlc
20097 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20098 b cont
20099 ' <confdefs.h | sed '
20100 s/'"$ac_delim"'/"\\\
20101 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20102
20103 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20104   for (key in D) D_is_set[key] = 1
20105   FS = "\a"
20106 }
20107 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20108   line = \$ 0
20109   split(line, arg, " ")
20110   if (arg[1] == "#") {
20111     defundef = arg[2]
20112     mac1 = arg[3]
20113   } else {
20114     defundef = substr(arg[1], 2)
20115     mac1 = arg[2]
20116   }
20117   split(mac1, mac2, "(") #)
20118   macro = mac2[1]
20119   prefix = substr(line, 1, index(line, defundef) - 1)
20120   if (D_is_set[macro]) {
20121     # Preserve the white space surrounding the "#".
20122     print prefix "define", macro P[macro] D[macro]
20123     next
20124   } else {
20125     # Replace #undef with comments.  This is necessary, for example,
20126     # in the case of _POSIX_SOURCE, which is predefined and required
20127     # on some systems where configure will not decide to define it.
20128     if (defundef == "undef") {
20129       print "/*", prefix defundef, macro, "*/"
20130       next
20131     }
20132   }
20133 }
20134 { print }
20135 _ACAWK
20136 _ACEOF
20137 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20138   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20139 fi # test -n "$CONFIG_HEADERS"
20140
20141
20142 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
20143 shift
20144 for ac_tag
20145 do
20146   case $ac_tag in
20147   :[FHLC]) ac_mode=$ac_tag; continue;;
20148   esac
20149   case $ac_mode$ac_tag in
20150   :[FHL]*:*);;
20151   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20152   :[FH]-) ac_tag=-:-;;
20153   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20154   esac
20155   ac_save_IFS=$IFS
20156   IFS=:
20157   set x $ac_tag
20158   IFS=$ac_save_IFS
20159   shift
20160   ac_file=$1
20161   shift
20162
20163   case $ac_mode in
20164   :L) ac_source=$1;;
20165   :[FH])
20166     ac_file_inputs=
20167     for ac_f
20168     do
20169       case $ac_f in
20170       -) ac_f="$ac_tmp/stdin";;
20171       *) # Look for the file first in the build tree, then in the source tree
20172          # (if the path is not absolute).  The absolute path cannot be DOS-style,
20173          # because $ac_f cannot contain `:'.
20174          test -f "$ac_f" ||
20175            case $ac_f in
20176            [\\/$]*) false;;
20177            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20178            esac ||
20179            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20180       esac
20181       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20182       as_fn_append ac_file_inputs " '$ac_f'"
20183     done
20184
20185     # Let's still pretend it is `configure' which instantiates (i.e., don't
20186     # use $as_me), people would be surprised to read:
20187     #    /* config.h.  Generated by config.status.  */
20188     configure_input='Generated from '`
20189           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20190         `' by configure.'
20191     if test x"$ac_file" != x-; then
20192       configure_input="$ac_file.  $configure_input"
20193       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20194 $as_echo "$as_me: creating $ac_file" >&6;}
20195     fi
20196     # Neutralize special characters interpreted by sed in replacement strings.
20197     case $configure_input in #(
20198     *\&* | *\|* | *\\* )
20199        ac_sed_conf_input=`$as_echo "$configure_input" |
20200        sed 's/[\\\\&|]/\\\\&/g'`;; #(
20201     *) ac_sed_conf_input=$configure_input;;
20202     esac
20203
20204     case $ac_tag in
20205     *:-:* | *:-) cat >"$ac_tmp/stdin" \
20206       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20207     esac
20208     ;;
20209   esac
20210
20211   ac_dir=`$as_dirname -- "$ac_file" ||
20212 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20213          X"$ac_file" : 'X\(//\)[^/]' \| \
20214          X"$ac_file" : 'X\(//\)$' \| \
20215          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20216 $as_echo X"$ac_file" |
20217     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20218             s//\1/
20219             q
20220           }
20221           /^X\(\/\/\)[^/].*/{
20222             s//\1/
20223             q
20224           }
20225           /^X\(\/\/\)$/{
20226             s//\1/
20227             q
20228           }
20229           /^X\(\/\).*/{
20230             s//\1/
20231             q
20232           }
20233           s/.*/./; q'`
20234   as_dir="$ac_dir"; as_fn_mkdir_p
20235   ac_builddir=.
20236
20237 case "$ac_dir" in
20238 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20239 *)
20240   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20241   # A ".." for each directory in $ac_dir_suffix.
20242   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20243   case $ac_top_builddir_sub in
20244   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20245   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20246   esac ;;
20247 esac
20248 ac_abs_top_builddir=$ac_pwd
20249 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20250 # for backward compatibility:
20251 ac_top_builddir=$ac_top_build_prefix
20252
20253 case $srcdir in
20254   .)  # We are building in place.
20255     ac_srcdir=.
20256     ac_top_srcdir=$ac_top_builddir_sub
20257     ac_abs_top_srcdir=$ac_pwd ;;
20258   [\\/]* | ?:[\\/]* )  # Absolute name.
20259     ac_srcdir=$srcdir$ac_dir_suffix;
20260     ac_top_srcdir=$srcdir
20261     ac_abs_top_srcdir=$srcdir ;;
20262   *) # Relative name.
20263     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20264     ac_top_srcdir=$ac_top_build_prefix$srcdir
20265     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20266 esac
20267 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20268
20269
20270   case $ac_mode in
20271   :F)
20272   #
20273   # CONFIG_FILE
20274   #
20275
20276   case $INSTALL in
20277   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20278   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20279   esac
20280   ac_MKDIR_P=$MKDIR_P
20281   case $MKDIR_P in
20282   [\\/$]* | ?:[\\/]* ) ;;
20283   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20284   esac
20285 _ACEOF
20286
20287 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20288 # If the template does not know about datarootdir, expand it.
20289 # FIXME: This hack should be removed a few years after 2.60.
20290 ac_datarootdir_hack=; ac_datarootdir_seen=
20291 ac_sed_dataroot='
20292 /datarootdir/ {
20293   p
20294   q
20295 }
20296 /@datadir@/p
20297 /@docdir@/p
20298 /@infodir@/p
20299 /@localedir@/p
20300 /@mandir@/p'
20301 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20302 *datarootdir*) ac_datarootdir_seen=yes;;
20303 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20304   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20305 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20306 _ACEOF
20307 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20308   ac_datarootdir_hack='
20309   s&@datadir@&$datadir&g
20310   s&@docdir@&$docdir&g
20311   s&@infodir@&$infodir&g
20312   s&@localedir@&$localedir&g
20313   s&@mandir@&$mandir&g
20314   s&\\\${datarootdir}&$datarootdir&g' ;;
20315 esac
20316 _ACEOF
20317
20318 # Neutralize VPATH when `$srcdir' = `.'.
20319 # Shell code in configure.ac might set extrasub.
20320 # FIXME: do we really want to maintain this feature?
20321 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20322 ac_sed_extra="$ac_vpsub
20323 $extrasub
20324 _ACEOF
20325 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20326 :t
20327 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20328 s|@configure_input@|$ac_sed_conf_input|;t t
20329 s&@top_builddir@&$ac_top_builddir_sub&;t t
20330 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20331 s&@srcdir@&$ac_srcdir&;t t
20332 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20333 s&@top_srcdir@&$ac_top_srcdir&;t t
20334 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20335 s&@builddir@&$ac_builddir&;t t
20336 s&@abs_builddir@&$ac_abs_builddir&;t t
20337 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20338 s&@INSTALL@&$ac_INSTALL&;t t
20339 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20340 $ac_datarootdir_hack
20341 "
20342 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20343   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20344
20345 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20346   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20347   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20348       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20349   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20350 which seems to be undefined.  Please make sure it is defined" >&5
20351 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20352 which seems to be undefined.  Please make sure it is defined" >&2;}
20353
20354   rm -f "$ac_tmp/stdin"
20355   case $ac_file in
20356   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20357   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20358   esac \
20359   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20360  ;;
20361   :H)
20362   #
20363   # CONFIG_HEADER
20364   #
20365   if test x"$ac_file" != x-; then
20366     {
20367       $as_echo "/* $configure_input  */" \
20368       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20369     } >"$ac_tmp/config.h" \
20370       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20371     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20372       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20373 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20374     else
20375       rm -f "$ac_file"
20376       mv "$ac_tmp/config.h" "$ac_file" \
20377         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20378     fi
20379   else
20380     $as_echo "/* $configure_input  */" \
20381       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20382       || as_fn_error $? "could not create -" "$LINENO" 5
20383   fi
20384  ;;
20385   :L)
20386   #
20387   # CONFIG_LINK
20388   #
20389
20390   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20391     :
20392   else
20393     # Prefer the file from the source tree if names are identical.
20394     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20395       ac_source=$srcdir/$ac_source
20396     fi
20397
20398     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20399 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20400
20401     if test ! -r "$ac_source"; then
20402       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20403     fi
20404     rm -f "$ac_file"
20405
20406     # Try a relative symlink, then a hard link, then a copy.
20407     case $ac_source in
20408     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20409         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20410     esac
20411     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20412       ln "$ac_source" "$ac_file" 2>/dev/null ||
20413       cp -p "$ac_source" "$ac_file" ||
20414       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20415   fi
20416  ;;
20417   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20418 $as_echo "$as_me: executing $ac_file commands" >&6;}
20419  ;;
20420   esac
20421
20422
20423   case $ac_file$ac_mode in
20424     "check_win32_symlinks":C)
20425 # Links sometimes fail undetected on Mingw -
20426 # so here we detect it and warn the user
20427 for FILE in $CONFIG_LINKS
20428  do
20429         # test -e works for symlinks in the MinGW console
20430         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20431 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20432  done
20433  ;;
20434     "src/include/pg_config.h":H)
20435 # Update timestamp for pg_config.h (see Makefile.global)
20436 echo >src/include/stamp-h
20437  ;;
20438     "src/include/pg_config_ext.h":H)
20439 # Update timestamp for pg_config_ext.h (see Makefile.global)
20440 echo >src/include/stamp-ext-h
20441  ;;
20442     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20443
20444   esac
20445 done # for ac_tag
20446
20447
20448 as_fn_exit 0
20449 _ACEOF
20450 ac_clean_files=$ac_clean_files_save
20451
20452 test $ac_write_fail = 0 ||
20453   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20454
20455
20456 # configure is writing to config.log, and then calls config.status.
20457 # config.status does its own redirection, appending to config.log.
20458 # Unfortunately, on DOS this fails, as config.log is still kept open
20459 # by configure, so config.status won't be able to write to it; its
20460 # output is simply discarded.  So we exec the FD to /dev/null,
20461 # effectively closing config.log, so it can be properly (re)opened and
20462 # appended to by config.status.  When coming back to configure, we
20463 # need to make the FD available again.
20464 if test "$no_create" != yes; then
20465   ac_cs_success=:
20466   ac_config_status_args=
20467   test "$silent" = yes &&
20468     ac_config_status_args="$ac_config_status_args --quiet"
20469   exec 5>/dev/null
20470   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20471   exec 5>>config.log
20472   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20473   # would make configure fail if this is the last instruction.
20474   $ac_cs_success || as_fn_exit 1
20475 fi
20476 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20477   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20478 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20479 fi
20480