]> granicus.if.org Git - postgresql/blob - configure
Fix configure's AC_CHECK_DECLS tests to work correctly with clang.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 12devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 #
14 # Copyright (c) 1996-2018, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else
29   case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='print -r --'
50   as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in #(
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order.  Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" ""        $as_nl"
92
93 # Find who we are.  Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96   *[\\/]* ) as_myself=$0 ;;
97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100   IFS=$as_save_IFS
101   test -z "$as_dir" && as_dir=.
102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103   done
104 IFS=$as_save_IFS
105
106      ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111   as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115   exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there.  '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 # Use a proper internal environment variable to ensure we don't fall
140   # into an infinite loop, continuously re-executing ourselves.
141   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142     _as_can_reexec=no; export _as_can_reexec;
143     # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151   *v*x* | *x*v* ) as_opts=-vx ;;
152   *v* ) as_opts=-v ;;
153   *x* ) as_opts=-x ;;
154   * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
161   fi
162   # We don't want this to propagate to other subprocesses.
163           { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166   emulate sh
167   NULLCMD=:
168   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169   # is contrary to our usage.  Disable this feature.
170   alias -g '\${1+\"\$@\"}'='\"\$@\"'
171   setopt NO_GLOB_SUBST
172 else
173   case \`(set -o) 2>/dev/null\` in #(
174   *posix*) :
175     set -o posix ;; #(
176   *) :
177      ;;
178 esac
179 fi
180 "
181   as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
186
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194 else
195   exitcode=1; echo positional parameters were not saved.
196 fi
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204   if (eval "$as_required") 2>/dev/null; then :
205   as_have_required=yes
206 else
207   as_have_required=no
208 fi
209   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211 else
212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 do
216   IFS=$as_save_IFS
217   test -z "$as_dir" && as_dir=.
218   as_found=:
219   case $as_dir in #(
220          /*)
221            for as_base in sh bash ksh sh5; do
222              # Try only shells that exist, to save several forks.
223              as_shell=$as_dir/$as_base
224              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   CONFIG_SHELL=$as_shell as_have_required=yes
227                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228   break 2
229 fi
230 fi
231            done;;
232        esac
233   as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237   CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
240
241
242       if test "x$CONFIG_SHELL" != x; then :
243   export CONFIG_SHELL
244              # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252   *v*x* | *x*v* ) as_opts=-vx ;;
253   *v* ) as_opts=-v ;;
254   *x* ) as_opts=-x ;;
255   * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
262 fi
263
264     if test x$as_have_required = xno; then :
265   $as_echo "$0: This script requires a shell more modern than all"
266   $as_echo "$0: the shells that I found on your system."
267   if test x${ZSH_VERSION+set} = xset ; then
268     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270   else
271     $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@postgresql.org about your system, including
273 $0: any error possibly output before this message. Then
274 $0: install a modern shell, or manually run the script
275 $0: under such a shell if you do have one."
276   fi
277   exit 1
278 fi
279 fi
280 fi
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
286
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
294 {
295   { eval $1=; unset $1;}
296 }
297 as_unset=as_fn_unset
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304   return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312   set +e
313   as_fn_set_status $1
314   exit $1
315 } # as_fn_exit
316
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
321 {
322
323   case $as_dir in #(
324   -*) as_dir=./$as_dir;;
325   esac
326   test -d "$as_dir" || eval $as_mkdir_p || {
327     as_dirs=
328     while :; do
329       case $as_dir in #(
330       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331       *) as_qdir=$as_dir;;
332       esac
333       as_dirs="'$as_qdir' $as_dirs"
334       as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336          X"$as_dir" : 'X\(//\)[^/]' \| \
337          X"$as_dir" : 'X\(//\)$' \| \
338          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341             s//\1/
342             q
343           }
344           /^X\(\/\/\)[^/].*/{
345             s//\1/
346             q
347           }
348           /^X\(\/\/\)$/{
349             s//\1/
350             q
351           }
352           /^X\(\/\).*/{
353             s//\1/
354             q
355           }
356           s/.*/./; q'`
357       test -d "$as_dir" && break
358     done
359     test -z "$as_dirs" || eval "mkdir $as_dirs"
360   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363 } # as_fn_mkdir_p
364
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
369 {
370   test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379   eval 'as_fn_append ()
380   {
381     eval $1+=\$2
382   }'
383 else
384   as_fn_append ()
385   {
386     eval $1=\$$1\$2
387   }
388 fi # as_fn_append
389
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396   eval 'as_fn_arith ()
397   {
398     as_val=$(( $* ))
399   }'
400 else
401   as_fn_arith ()
402   {
403     as_val=`expr "$@" || test $? -eq 1`
404   }
405 fi # as_fn_arith
406
407
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
414 {
415   as_status=$1; test $as_status -eq 0 && as_status=1
416   if test "$4"; then
417     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419   fi
420   $as_echo "$as_me: error: $2" >&2
421   as_fn_exit $as_status
422 } # as_fn_error
423
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425    test "X`expr 00001 : '.*\(...\)'`" = X001; then
426   as_expr=expr
427 else
428   as_expr=false
429 fi
430
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432   as_basename=basename
433 else
434   as_basename=false
435 fi
436
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438   as_dirname=dirname
439 else
440   as_dirname=false
441 fi
442
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445          X"$0" : 'X\(//\)$' \| \
446          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448     sed '/^.*\/\([^/][^/]*\)\/*$/{
449             s//\1/
450             q
451           }
452           /^X\/\(\/\/\)$/{
453             s//\1/
454             q
455           }
456           /^X\/\(\/\).*/{
457             s//\1/
458             q
459           }
460           s/.*/./; q'`
461
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
468
469
470   as_lineno_1=$LINENO as_lineno_1a=$LINENO
471   as_lineno_2=$LINENO as_lineno_2a=$LINENO
472   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
475   sed -n '
476     p
477     /[$]LINENO/=
478   ' <$as_myself |
479     sed '
480       s/[$]LINENO.*/&-/
481       t lineno
482       b
483       :lineno
484       N
485       :loop
486       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487       t loop
488       s/-\n.*//
489     ' >$as_me.lineno &&
490   chmod +x "$as_me.lineno" ||
491     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
492
493   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494   # already done that, so ensure we don't try to do so again and fall
495   # in an infinite loop.  This has already happened in practice.
496   _as_can_reexec=no; export _as_can_reexec
497   # Don't try to exec as it changes $[0], causing all sort of problems
498   # (the dirname of $[0] is not the place where we might find the
499   # original and so on.  Autoconf is especially sensitive to this).
500   . "./$as_me.lineno"
501   # Exit status is that of the last command.
502   exit
503 }
504
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508   case `echo 'xy\c'` in
509   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
510   xy)  ECHO_C='\c';;
511   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
512        ECHO_T=' ';;
513   esac;;
514 *)
515   ECHO_N='-n';;
516 esac
517
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520   rm -f conf$$.dir/conf$$.file
521 else
522   rm -f conf$$.dir
523   mkdir conf$$.dir 2>/dev/null
524 fi
525 if (echo >conf$$.file) 2>/dev/null; then
526   if ln -s conf$$.file conf$$ 2>/dev/null; then
527     as_ln_s='ln -s'
528     # ... but there are two gotchas:
529     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531     # In both cases, we have to default to `cp -pR'.
532     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533       as_ln_s='cp -pR'
534   elif ln conf$$.file conf$$ 2>/dev/null; then
535     as_ln_s=ln
536   else
537     as_ln_s='cp -pR'
538   fi
539 else
540   as_ln_s='cp -pR'
541 fi
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
544
545 if mkdir -p . 2>/dev/null; then
546   as_mkdir_p='mkdir -p "$as_dir"'
547 else
548   test -d ./-p && rmdir ./-p
549   as_mkdir_p=false
550 fi
551
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
554
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
564
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
569
570 #
571 # Initializations.
572 #
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
581
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='12devel'
586 PACKAGE_STRING='PostgreSQL 12devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
588 PACKAGE_URL=''
589
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 #  include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 #  include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
627
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 PROVE
633 FOP
634 XSLTPROC
635 DBTOEPUB
636 have_docbook
637 XMLLINT
638 TCL_SHLIB_LD_LIBS
639 TCL_SHARED_BUILD
640 TCL_LIB_SPEC
641 TCL_LIBS
642 TCL_INCLUDE_SPEC
643 TCL_CONFIG_SH
644 TCLSH
645 XGETTEXT
646 MSGMERGE
647 MSGFMT_FLAGS
648 MSGFMT
649 PG_CRC32C_OBJS
650 CFLAGS_ARMV8_CRC32C
651 CFLAGS_SSE42
652 have_win32_dbghelp
653 LIBOBJS
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 PTHREAD_CFLAGS
658 PTHREAD_LIBS
659 PTHREAD_CC
660 ax_pthread_config
661 ZIC
662 python_additional_libs
663 python_libspec
664 python_libdir
665 python_includespec
666 python_version
667 python_majorversion
668 PYTHON
669 perl_embed_ldflags
670 perl_embed_ccflags
671 perl_includespec
672 perl_useshrplib
673 perl_privlibexp
674 perl_archlibexp
675 PERL
676 FLEXFLAGS
677 FLEX
678 BISONFLAGS
679 BISON
680 MKDIR_P
681 LN_S
682 TAR
683 install_bin
684 INSTALL_DATA
685 INSTALL_SCRIPT
686 INSTALL_PROGRAM
687 WINDRES
688 DLLWRAP
689 DLLTOOL
690 AR
691 STRIP_SHARED_LIB
692 STRIP_STATIC_LIB
693 STRIP
694 RANLIB
695 with_gnu_ld
696 LD
697 LDFLAGS_SL
698 LDFLAGS_EX
699 ELF_SYS
700 EGREP
701 GREP
702 with_zlib
703 with_system_tzdata
704 with_libxslt
705 with_libxml
706 XML2_CONFIG
707 UUID_EXTRA_OBJS
708 with_uuid
709 with_systemd
710 with_selinux
711 with_openssl
712 with_ldap
713 with_krb_srvnam
714 krb_srvtab
715 with_gssapi
716 with_python
717 with_perl
718 with_tcl
719 ICU_LIBS
720 ICU_CFLAGS
721 PKG_CONFIG_LIBDIR
722 PKG_CONFIG_PATH
723 PKG_CONFIG
724 with_icu
725 enable_thread_safety
726 INCLUDES
727 autodepend
728 TAS
729 GCC
730 CPP
731 BITCODE_CXXFLAGS
732 BITCODE_CFLAGS
733 CFLAGS_VECTOR
734 LLVM_BINPATH
735 LLVM_CXXFLAGS
736 LLVM_CFLAGS
737 LLVM_CPPFLAGS
738 LLVM_LIBS
739 CLANG
740 LLVM_CONFIG
741 AWK
742 with_llvm
743 SUN_STUDIO_CC
744 ac_ct_CXX
745 CXXFLAGS
746 CXX
747 OBJEXT
748 EXEEXT
749 ac_ct_CC
750 CPPFLAGS
751 LDFLAGS
752 CFLAGS
753 CC
754 enable_tap_tests
755 enable_dtrace
756 DTRACEFLAGS
757 DTRACE
758 enable_coverage
759 GENHTML
760 LCOV
761 GCOV
762 enable_debug
763 enable_strong_random
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_strong_random
832 enable_debug
833 enable_profiling
834 enable_coverage
835 enable_dtrace
836 enable_tap_tests
837 with_blocksize
838 with_segsize
839 with_wal_blocksize
840 with_CC
841 with_llvm
842 enable_depend
843 enable_cassert
844 enable_thread_safety
845 with_icu
846 with_tcl
847 with_tclconfig
848 with_perl
849 with_python
850 with_gssapi
851 with_krb_srvnam
852 with_pam
853 with_bsd_auth
854 with_ldap
855 with_bonjour
856 with_openssl
857 with_selinux
858 with_systemd
859 with_readline
860 with_libedit_preferred
861 with_uuid
862 with_ossp_uuid
863 with_libxml
864 with_libxslt
865 with_system_tzdata
866 with_zlib
867 with_gnu_ld
868 enable_largefile
869 enable_float4_byval
870 enable_float8_byval
871 '
872       ac_precious_vars='build_alias
873 host_alias
874 target_alias
875 CC
876 CFLAGS
877 LDFLAGS
878 LIBS
879 CPPFLAGS
880 CXX
881 CXXFLAGS
882 CCC
883 LLVM_CONFIG
884 CLANG
885 CPP
886 PKG_CONFIG
887 PKG_CONFIG_PATH
888 PKG_CONFIG_LIBDIR
889 ICU_CFLAGS
890 ICU_LIBS
891 LDFLAGS_EX
892 LDFLAGS_SL'
893
894
895 # Initialize some variables set by options.
896 ac_init_help=
897 ac_init_version=false
898 ac_unrecognized_opts=
899 ac_unrecognized_sep=
900 # The variables have the same names as the options, with
901 # dashes changed to underlines.
902 cache_file=/dev/null
903 exec_prefix=NONE
904 no_create=
905 no_recursion=
906 prefix=NONE
907 program_prefix=NONE
908 program_suffix=NONE
909 program_transform_name=s,x,x,
910 silent=
911 site=
912 srcdir=
913 verbose=
914 x_includes=NONE
915 x_libraries=NONE
916
917 # Installation directory options.
918 # These are left unexpanded so users can "make install exec_prefix=/foo"
919 # and all the variables that are supposed to be based on exec_prefix
920 # by default will actually change.
921 # Use braces instead of parens because sh, perl, etc. also accept them.
922 # (The list follows the same order as the GNU Coding Standards.)
923 bindir='${exec_prefix}/bin'
924 sbindir='${exec_prefix}/sbin'
925 libexecdir='${exec_prefix}/libexec'
926 datarootdir='${prefix}/share'
927 datadir='${datarootdir}'
928 sysconfdir='${prefix}/etc'
929 sharedstatedir='${prefix}/com'
930 localstatedir='${prefix}/var'
931 includedir='${prefix}/include'
932 oldincludedir='/usr/include'
933 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
934 infodir='${datarootdir}/info'
935 htmldir='${docdir}'
936 dvidir='${docdir}'
937 pdfdir='${docdir}'
938 psdir='${docdir}'
939 libdir='${exec_prefix}/lib'
940 localedir='${datarootdir}/locale'
941 mandir='${datarootdir}/man'
942
943 ac_prev=
944 ac_dashdash=
945 for ac_option
946 do
947   # If the previous option needs an argument, assign it.
948   if test -n "$ac_prev"; then
949     eval $ac_prev=\$ac_option
950     ac_prev=
951     continue
952   fi
953
954   case $ac_option in
955   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
956   *=)   ac_optarg= ;;
957   *)    ac_optarg=yes ;;
958   esac
959
960   # Accept the important Cygnus configure options, so we can diagnose typos.
961
962   case $ac_dashdash$ac_option in
963   --)
964     ac_dashdash=yes ;;
965
966   -bindir | --bindir | --bindi | --bind | --bin | --bi)
967     ac_prev=bindir ;;
968   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
969     bindir=$ac_optarg ;;
970
971   -build | --build | --buil | --bui | --bu)
972     ac_prev=build_alias ;;
973   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
974     build_alias=$ac_optarg ;;
975
976   -cache-file | --cache-file | --cache-fil | --cache-fi \
977   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
978     ac_prev=cache_file ;;
979   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
980   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
981     cache_file=$ac_optarg ;;
982
983   --config-cache | -C)
984     cache_file=config.cache ;;
985
986   -datadir | --datadir | --datadi | --datad)
987     ac_prev=datadir ;;
988   -datadir=* | --datadir=* | --datadi=* | --datad=*)
989     datadir=$ac_optarg ;;
990
991   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
992   | --dataroo | --dataro | --datar)
993     ac_prev=datarootdir ;;
994   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
995   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
996     datarootdir=$ac_optarg ;;
997
998   -disable-* | --disable-*)
999     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1000     # Reject names that are not valid shell variable names.
1001     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1002       as_fn_error $? "invalid feature name: $ac_useropt"
1003     ac_useropt_orig=$ac_useropt
1004     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1005     case $ac_user_opts in
1006       *"
1007 "enable_$ac_useropt"
1008 "*) ;;
1009       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1010          ac_unrecognized_sep=', ';;
1011     esac
1012     eval enable_$ac_useropt=no ;;
1013
1014   -docdir | --docdir | --docdi | --doc | --do)
1015     ac_prev=docdir ;;
1016   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1017     docdir=$ac_optarg ;;
1018
1019   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1020     ac_prev=dvidir ;;
1021   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1022     dvidir=$ac_optarg ;;
1023
1024   -enable-* | --enable-*)
1025     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1026     # Reject names that are not valid shell variable names.
1027     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1028       as_fn_error $? "invalid feature name: $ac_useropt"
1029     ac_useropt_orig=$ac_useropt
1030     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1031     case $ac_user_opts in
1032       *"
1033 "enable_$ac_useropt"
1034 "*) ;;
1035       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1036          ac_unrecognized_sep=', ';;
1037     esac
1038     eval enable_$ac_useropt=\$ac_optarg ;;
1039
1040   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1041   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1042   | --exec | --exe | --ex)
1043     ac_prev=exec_prefix ;;
1044   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1045   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1046   | --exec=* | --exe=* | --ex=*)
1047     exec_prefix=$ac_optarg ;;
1048
1049   -gas | --gas | --ga | --g)
1050     # Obsolete; use --with-gas.
1051     with_gas=yes ;;
1052
1053   -help | --help | --hel | --he | -h)
1054     ac_init_help=long ;;
1055   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1056     ac_init_help=recursive ;;
1057   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1058     ac_init_help=short ;;
1059
1060   -host | --host | --hos | --ho)
1061     ac_prev=host_alias ;;
1062   -host=* | --host=* | --hos=* | --ho=*)
1063     host_alias=$ac_optarg ;;
1064
1065   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1066     ac_prev=htmldir ;;
1067   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1068   | --ht=*)
1069     htmldir=$ac_optarg ;;
1070
1071   -includedir | --includedir | --includedi | --included | --include \
1072   | --includ | --inclu | --incl | --inc)
1073     ac_prev=includedir ;;
1074   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1075   | --includ=* | --inclu=* | --incl=* | --inc=*)
1076     includedir=$ac_optarg ;;
1077
1078   -infodir | --infodir | --infodi | --infod | --info | --inf)
1079     ac_prev=infodir ;;
1080   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1081     infodir=$ac_optarg ;;
1082
1083   -libdir | --libdir | --libdi | --libd)
1084     ac_prev=libdir ;;
1085   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1086     libdir=$ac_optarg ;;
1087
1088   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1089   | --libexe | --libex | --libe)
1090     ac_prev=libexecdir ;;
1091   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1092   | --libexe=* | --libex=* | --libe=*)
1093     libexecdir=$ac_optarg ;;
1094
1095   -localedir | --localedir | --localedi | --localed | --locale)
1096     ac_prev=localedir ;;
1097   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1098     localedir=$ac_optarg ;;
1099
1100   -localstatedir | --localstatedir | --localstatedi | --localstated \
1101   | --localstate | --localstat | --localsta | --localst | --locals)
1102     ac_prev=localstatedir ;;
1103   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1104   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1105     localstatedir=$ac_optarg ;;
1106
1107   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1108     ac_prev=mandir ;;
1109   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1110     mandir=$ac_optarg ;;
1111
1112   -nfp | --nfp | --nf)
1113     # Obsolete; use --without-fp.
1114     with_fp=no ;;
1115
1116   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1117   | --no-cr | --no-c | -n)
1118     no_create=yes ;;
1119
1120   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1121   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1122     no_recursion=yes ;;
1123
1124   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1125   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1126   | --oldin | --oldi | --old | --ol | --o)
1127     ac_prev=oldincludedir ;;
1128   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1129   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1130   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1131     oldincludedir=$ac_optarg ;;
1132
1133   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1134     ac_prev=prefix ;;
1135   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1136     prefix=$ac_optarg ;;
1137
1138   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1139   | --program-pre | --program-pr | --program-p)
1140     ac_prev=program_prefix ;;
1141   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1142   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1143     program_prefix=$ac_optarg ;;
1144
1145   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1146   | --program-suf | --program-su | --program-s)
1147     ac_prev=program_suffix ;;
1148   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1149   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1150     program_suffix=$ac_optarg ;;
1151
1152   -program-transform-name | --program-transform-name \
1153   | --program-transform-nam | --program-transform-na \
1154   | --program-transform-n | --program-transform- \
1155   | --program-transform | --program-transfor \
1156   | --program-transfo | --program-transf \
1157   | --program-trans | --program-tran \
1158   | --progr-tra | --program-tr | --program-t)
1159     ac_prev=program_transform_name ;;
1160   -program-transform-name=* | --program-transform-name=* \
1161   | --program-transform-nam=* | --program-transform-na=* \
1162   | --program-transform-n=* | --program-transform-=* \
1163   | --program-transform=* | --program-transfor=* \
1164   | --program-transfo=* | --program-transf=* \
1165   | --program-trans=* | --program-tran=* \
1166   | --progr-tra=* | --program-tr=* | --program-t=*)
1167     program_transform_name=$ac_optarg ;;
1168
1169   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1170     ac_prev=pdfdir ;;
1171   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1172     pdfdir=$ac_optarg ;;
1173
1174   -psdir | --psdir | --psdi | --psd | --ps)
1175     ac_prev=psdir ;;
1176   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1177     psdir=$ac_optarg ;;
1178
1179   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1180   | -silent | --silent | --silen | --sile | --sil)
1181     silent=yes ;;
1182
1183   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1184     ac_prev=sbindir ;;
1185   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1186   | --sbi=* | --sb=*)
1187     sbindir=$ac_optarg ;;
1188
1189   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1190   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1191   | --sharedst | --shareds | --shared | --share | --shar \
1192   | --sha | --sh)
1193     ac_prev=sharedstatedir ;;
1194   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1195   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1196   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1197   | --sha=* | --sh=*)
1198     sharedstatedir=$ac_optarg ;;
1199
1200   -site | --site | --sit)
1201     ac_prev=site ;;
1202   -site=* | --site=* | --sit=*)
1203     site=$ac_optarg ;;
1204
1205   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1206     ac_prev=srcdir ;;
1207   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1208     srcdir=$ac_optarg ;;
1209
1210   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1211   | --syscon | --sysco | --sysc | --sys | --sy)
1212     ac_prev=sysconfdir ;;
1213   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1214   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1215     sysconfdir=$ac_optarg ;;
1216
1217   -target | --target | --targe | --targ | --tar | --ta | --t)
1218     ac_prev=target_alias ;;
1219   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1220     target_alias=$ac_optarg ;;
1221
1222   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1223     verbose=yes ;;
1224
1225   -version | --version | --versio | --versi | --vers | -V)
1226     ac_init_version=: ;;
1227
1228   -with-* | --with-*)
1229     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1230     # Reject names that are not valid shell variable names.
1231     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1232       as_fn_error $? "invalid package name: $ac_useropt"
1233     ac_useropt_orig=$ac_useropt
1234     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1235     case $ac_user_opts in
1236       *"
1237 "with_$ac_useropt"
1238 "*) ;;
1239       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1240          ac_unrecognized_sep=', ';;
1241     esac
1242     eval with_$ac_useropt=\$ac_optarg ;;
1243
1244   -without-* | --without-*)
1245     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1246     # Reject names that are not valid shell variable names.
1247     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1248       as_fn_error $? "invalid package name: $ac_useropt"
1249     ac_useropt_orig=$ac_useropt
1250     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1251     case $ac_user_opts in
1252       *"
1253 "with_$ac_useropt"
1254 "*) ;;
1255       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1256          ac_unrecognized_sep=', ';;
1257     esac
1258     eval with_$ac_useropt=no ;;
1259
1260   --x)
1261     # Obsolete; use --with-x.
1262     with_x=yes ;;
1263
1264   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1265   | --x-incl | --x-inc | --x-in | --x-i)
1266     ac_prev=x_includes ;;
1267   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1268   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1269     x_includes=$ac_optarg ;;
1270
1271   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1272   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1273     ac_prev=x_libraries ;;
1274   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1275   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1276     x_libraries=$ac_optarg ;;
1277
1278   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1279 Try \`$0 --help' for more information"
1280     ;;
1281
1282   *=*)
1283     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1284     # Reject names that are not valid shell variable names.
1285     case $ac_envvar in #(
1286       '' | [0-9]* | *[!_$as_cr_alnum]* )
1287       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1288     esac
1289     eval $ac_envvar=\$ac_optarg
1290     export $ac_envvar ;;
1291
1292   *)
1293     # FIXME: should be removed in autoconf 3.0.
1294     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1295     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1296       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1297     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1298     ;;
1299
1300   esac
1301 done
1302
1303 if test -n "$ac_prev"; then
1304   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1305   as_fn_error $? "missing argument to $ac_option"
1306 fi
1307
1308 if test -n "$ac_unrecognized_opts"; then
1309   case $enable_option_checking in
1310     no) ;;
1311     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1312     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1313   esac
1314 fi
1315
1316 # Check all directory arguments for consistency.
1317 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1318                 datadir sysconfdir sharedstatedir localstatedir includedir \
1319                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1320                 libdir localedir mandir
1321 do
1322   eval ac_val=\$$ac_var
1323   # Remove trailing slashes.
1324   case $ac_val in
1325     */ )
1326       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1327       eval $ac_var=\$ac_val;;
1328   esac
1329   # Be sure to have absolute directory names.
1330   case $ac_val in
1331     [\\/$]* | ?:[\\/]* )  continue;;
1332     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1333   esac
1334   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1335 done
1336
1337 # There might be people who depend on the old broken behavior: `$host'
1338 # used to hold the argument of --host etc.
1339 # FIXME: To remove some day.
1340 build=$build_alias
1341 host=$host_alias
1342 target=$target_alias
1343
1344 # FIXME: To remove some day.
1345 if test "x$host_alias" != x; then
1346   if test "x$build_alias" = x; then
1347     cross_compiling=maybe
1348   elif test "x$build_alias" != "x$host_alias"; then
1349     cross_compiling=yes
1350   fi
1351 fi
1352
1353 ac_tool_prefix=
1354 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1355
1356 test "$silent" = yes && exec 6>/dev/null
1357
1358
1359 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1360 ac_ls_di=`ls -di .` &&
1361 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1362   as_fn_error $? "working directory cannot be determined"
1363 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1364   as_fn_error $? "pwd does not report name of working directory"
1365
1366
1367 # Find the source files, if location was not specified.
1368 if test -z "$srcdir"; then
1369   ac_srcdir_defaulted=yes
1370   # Try the directory containing this script, then the parent directory.
1371   ac_confdir=`$as_dirname -- "$as_myself" ||
1372 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1373          X"$as_myself" : 'X\(//\)[^/]' \| \
1374          X"$as_myself" : 'X\(//\)$' \| \
1375          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1376 $as_echo X"$as_myself" |
1377     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1378             s//\1/
1379             q
1380           }
1381           /^X\(\/\/\)[^/].*/{
1382             s//\1/
1383             q
1384           }
1385           /^X\(\/\/\)$/{
1386             s//\1/
1387             q
1388           }
1389           /^X\(\/\).*/{
1390             s//\1/
1391             q
1392           }
1393           s/.*/./; q'`
1394   srcdir=$ac_confdir
1395   if test ! -r "$srcdir/$ac_unique_file"; then
1396     srcdir=..
1397   fi
1398 else
1399   ac_srcdir_defaulted=no
1400 fi
1401 if test ! -r "$srcdir/$ac_unique_file"; then
1402   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1403   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1404 fi
1405 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1406 ac_abs_confdir=`(
1407         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1408         pwd)`
1409 # When building in place, set srcdir=.
1410 if test "$ac_abs_confdir" = "$ac_pwd"; then
1411   srcdir=.
1412 fi
1413 # Remove unnecessary trailing slashes from srcdir.
1414 # Double slashes in file names in object file debugging info
1415 # mess up M-x gdb in Emacs.
1416 case $srcdir in
1417 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1418 esac
1419 for ac_var in $ac_precious_vars; do
1420   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1421   eval ac_env_${ac_var}_value=\$${ac_var}
1422   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1423   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1424 done
1425
1426 #
1427 # Report the --help message.
1428 #
1429 if test "$ac_init_help" = "long"; then
1430   # Omit some internal or obsolete options to make the list less imposing.
1431   # This message is too long to be a string in the A/UX 3.1 sh.
1432   cat <<_ACEOF
1433 \`configure' configures PostgreSQL 12devel to adapt to many kinds of systems.
1434
1435 Usage: $0 [OPTION]... [VAR=VALUE]...
1436
1437 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1438 VAR=VALUE.  See below for descriptions of some of the useful variables.
1439
1440 Defaults for the options are specified in brackets.
1441
1442 Configuration:
1443   -h, --help              display this help and exit
1444       --help=short        display options specific to this package
1445       --help=recursive    display the short help of all the included packages
1446   -V, --version           display version information and exit
1447   -q, --quiet, --silent   do not print \`checking ...' messages
1448       --cache-file=FILE   cache test results in FILE [disabled]
1449   -C, --config-cache      alias for \`--cache-file=config.cache'
1450   -n, --no-create         do not create output files
1451       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1452
1453 Installation directories:
1454   --prefix=PREFIX         install architecture-independent files in PREFIX
1455                           [$ac_default_prefix]
1456   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1457                           [PREFIX]
1458
1459 By default, \`make install' will install all the files in
1460 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1461 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1462 for instance \`--prefix=\$HOME'.
1463
1464 For better control, use the options below.
1465
1466 Fine tuning of the installation directories:
1467   --bindir=DIR            user executables [EPREFIX/bin]
1468   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1469   --libexecdir=DIR        program executables [EPREFIX/libexec]
1470   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1471   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1472   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1473   --libdir=DIR            object code libraries [EPREFIX/lib]
1474   --includedir=DIR        C header files [PREFIX/include]
1475   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1476   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1477   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1478   --infodir=DIR           info documentation [DATAROOTDIR/info]
1479   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1480   --mandir=DIR            man documentation [DATAROOTDIR/man]
1481   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1482   --htmldir=DIR           html documentation [DOCDIR]
1483   --dvidir=DIR            dvi documentation [DOCDIR]
1484   --pdfdir=DIR            pdf documentation [DOCDIR]
1485   --psdir=DIR             ps documentation [DOCDIR]
1486 _ACEOF
1487
1488   cat <<\_ACEOF
1489
1490 System types:
1491   --build=BUILD     configure for building on BUILD [guessed]
1492   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1493 _ACEOF
1494 fi
1495
1496 if test -n "$ac_init_help"; then
1497   case $ac_init_help in
1498      short | recursive ) echo "Configuration of PostgreSQL 12devel:";;
1499    esac
1500   cat <<\_ACEOF
1501
1502 Optional Features:
1503   --disable-option-checking  ignore unrecognized --enable/--with options
1504   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1505   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1506   --disable-integer-datetimes
1507                           obsolete option, no longer supported
1508   --enable-nls[=LANGUAGES]
1509                           enable Native Language Support
1510   --disable-rpath         do not embed shared library search path in
1511                           executables
1512   --disable-spinlocks     do not use spinlocks
1513   --disable-atomics       do not use atomic operations
1514   --disable-strong-random do not use a strong random number source
1515   --enable-debug          build with debugging symbols (-g)
1516   --enable-profiling      build with profiling enabled
1517   --enable-coverage       build with coverage testing instrumentation
1518   --enable-dtrace         build with DTrace support
1519   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1520   --enable-depend         turn on automatic dependency tracking
1521   --enable-cassert        enable assertion checks (for debugging)
1522   --disable-thread-safety disable thread-safety in client libraries
1523   --disable-largefile     omit support for large files
1524   --disable-float4-byval  disable float4 passed by value
1525   --disable-float8-byval  disable float8 passed by value
1526
1527 Optional Packages:
1528   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1529   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1530   --with-extra-version=STRING
1531                           append STRING to version
1532   --with-template=NAME    override operating system template
1533   --with-includes=DIRS    look for additional header files in DIRS
1534   --with-libraries=DIRS   look for additional libraries in DIRS
1535   --with-libs=DIRS        alternative spelling of --with-libraries
1536   --with-pgport=PORTNUM   set default port number [5432]
1537   --with-blocksize=BLOCKSIZE
1538                           set table block size in kB [8]
1539   --with-segsize=SEGSIZE  set table segment size in GB [1]
1540   --with-wal-blocksize=BLOCKSIZE
1541                           set WAL block size in kB [8]
1542   --with-CC=CMD           set compiler (deprecated)
1543   --with-llvm             build with LLVM based JIT support
1544   --with-icu              build with ICU support
1545   --with-tcl              build Tcl modules (PL/Tcl)
1546   --with-tclconfig=DIR    tclConfig.sh is in DIR
1547   --with-perl             build Perl modules (PL/Perl)
1548   --with-python           build Python modules (PL/Python)
1549   --with-gssapi           build with GSSAPI support
1550   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1551                           [postgres]
1552   --with-pam              build with PAM support
1553   --with-bsd-auth         build with BSD Authentication support
1554   --with-ldap             build with LDAP support
1555   --with-bonjour          build with Bonjour support
1556   --with-openssl          build with OpenSSL support
1557   --with-selinux          build with SELinux support
1558   --with-systemd          build with systemd support
1559   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1560   --with-libedit-preferred
1561                           prefer BSD Libedit over GNU Readline
1562   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1563   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1564   --with-libxml           build with XML support
1565   --with-libxslt          use XSLT support when building contrib/xml2
1566   --with-system-tzdata=DIR
1567                           use system time zone data in DIR
1568   --without-zlib          do not use Zlib
1569   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1570
1571 Some influential environment variables:
1572   CC          C compiler command
1573   CFLAGS      C compiler flags
1574   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1575               nonstandard directory <lib dir>
1576   LIBS        libraries to pass to the linker, e.g. -l<library>
1577   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1578               you have headers in a nonstandard directory <include dir>
1579   CXX         C++ compiler command
1580   CXXFLAGS    C++ compiler flags
1581   LLVM_CONFIG path to llvm-config command
1582   CLANG       path to clang compiler to generate bitcode
1583   CPP         C preprocessor
1584   PKG_CONFIG  path to pkg-config utility
1585   PKG_CONFIG_PATH
1586               directories to add to pkg-config's search path
1587   PKG_CONFIG_LIBDIR
1588               path overriding pkg-config's built-in search path
1589   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1590   ICU_LIBS    linker flags for ICU, overriding pkg-config
1591   LDFLAGS_EX  extra linker flags for linking executables only
1592   LDFLAGS_SL  extra linker flags for linking shared libraries only
1593
1594 Use these variables to override the choices made by `configure' or to help
1595 it to find libraries and programs with nonstandard names/locations.
1596
1597 Report bugs to <pgsql-bugs@postgresql.org>.
1598 _ACEOF
1599 ac_status=$?
1600 fi
1601
1602 if test "$ac_init_help" = "recursive"; then
1603   # If there are subdirs, report their specific --help.
1604   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1605     test -d "$ac_dir" ||
1606       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1607       continue
1608     ac_builddir=.
1609
1610 case "$ac_dir" in
1611 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1612 *)
1613   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1614   # A ".." for each directory in $ac_dir_suffix.
1615   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1616   case $ac_top_builddir_sub in
1617   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1618   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1619   esac ;;
1620 esac
1621 ac_abs_top_builddir=$ac_pwd
1622 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1623 # for backward compatibility:
1624 ac_top_builddir=$ac_top_build_prefix
1625
1626 case $srcdir in
1627   .)  # We are building in place.
1628     ac_srcdir=.
1629     ac_top_srcdir=$ac_top_builddir_sub
1630     ac_abs_top_srcdir=$ac_pwd ;;
1631   [\\/]* | ?:[\\/]* )  # Absolute name.
1632     ac_srcdir=$srcdir$ac_dir_suffix;
1633     ac_top_srcdir=$srcdir
1634     ac_abs_top_srcdir=$srcdir ;;
1635   *) # Relative name.
1636     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1637     ac_top_srcdir=$ac_top_build_prefix$srcdir
1638     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1639 esac
1640 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1641
1642     cd "$ac_dir" || { ac_status=$?; continue; }
1643     # Check for guested configure.
1644     if test -f "$ac_srcdir/configure.gnu"; then
1645       echo &&
1646       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1647     elif test -f "$ac_srcdir/configure"; then
1648       echo &&
1649       $SHELL "$ac_srcdir/configure" --help=recursive
1650     else
1651       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1652     fi || ac_status=$?
1653     cd "$ac_pwd" || { ac_status=$?; break; }
1654   done
1655 fi
1656
1657 test -n "$ac_init_help" && exit $ac_status
1658 if $ac_init_version; then
1659   cat <<\_ACEOF
1660 PostgreSQL configure 12devel
1661 generated by GNU Autoconf 2.69
1662
1663 Copyright (C) 2012 Free Software Foundation, Inc.
1664 This configure script is free software; the Free Software Foundation
1665 gives unlimited permission to copy, distribute and modify it.
1666
1667 Copyright (c) 1996-2018, PostgreSQL Global Development Group
1668 _ACEOF
1669   exit
1670 fi
1671
1672 ## ------------------------ ##
1673 ## Autoconf initialization. ##
1674 ## ------------------------ ##
1675
1676 # ac_fn_c_try_compile LINENO
1677 # --------------------------
1678 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1679 ac_fn_c_try_compile ()
1680 {
1681   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682   rm -f conftest.$ac_objext
1683   if { { ac_try="$ac_compile"
1684 case "(($ac_try" in
1685   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1686   *) ac_try_echo=$ac_try;;
1687 esac
1688 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1689 $as_echo "$ac_try_echo"; } >&5
1690   (eval "$ac_compile") 2>conftest.err
1691   ac_status=$?
1692   if test -s conftest.err; then
1693     grep -v '^ *+' conftest.err >conftest.er1
1694     cat conftest.er1 >&5
1695     mv -f conftest.er1 conftest.err
1696   fi
1697   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1698   test $ac_status = 0; } && {
1699          test -z "$ac_c_werror_flag" ||
1700          test ! -s conftest.err
1701        } && test -s conftest.$ac_objext; then :
1702   ac_retval=0
1703 else
1704   $as_echo "$as_me: failed program was:" >&5
1705 sed 's/^/| /' conftest.$ac_ext >&5
1706
1707         ac_retval=1
1708 fi
1709   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1710   as_fn_set_status $ac_retval
1711
1712 } # ac_fn_c_try_compile
1713
1714 # ac_fn_cxx_try_compile LINENO
1715 # ----------------------------
1716 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1717 ac_fn_cxx_try_compile ()
1718 {
1719   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1720   rm -f conftest.$ac_objext
1721   if { { ac_try="$ac_compile"
1722 case "(($ac_try" in
1723   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1724   *) ac_try_echo=$ac_try;;
1725 esac
1726 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1727 $as_echo "$ac_try_echo"; } >&5
1728   (eval "$ac_compile") 2>conftest.err
1729   ac_status=$?
1730   if test -s conftest.err; then
1731     grep -v '^ *+' conftest.err >conftest.er1
1732     cat conftest.er1 >&5
1733     mv -f conftest.er1 conftest.err
1734   fi
1735   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1736   test $ac_status = 0; } && {
1737          test -z "$ac_cxx_werror_flag" ||
1738          test ! -s conftest.err
1739        } && test -s conftest.$ac_objext; then :
1740   ac_retval=0
1741 else
1742   $as_echo "$as_me: failed program was:" >&5
1743 sed 's/^/| /' conftest.$ac_ext >&5
1744
1745         ac_retval=1
1746 fi
1747   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1748   as_fn_set_status $ac_retval
1749
1750 } # ac_fn_cxx_try_compile
1751
1752 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1753 # ---------------------------------------------
1754 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1755 # accordingly.
1756 ac_fn_c_check_decl ()
1757 {
1758   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1759   # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
1760       as_decl_name=`echo $2|sed 's/ *(.*//'`
1761   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1762   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1763 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1764 if eval \${$3+:} false; then :
1765   $as_echo_n "(cached) " >&6
1766 else
1767   ac_save_werror_flag=$ac_c_werror_flag
1768   ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
1769   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1770 /* end confdefs.h.  */
1771 $4
1772 int
1773 main ()
1774 {
1775 #ifndef $as_decl_name
1776 #ifdef __cplusplus
1777   (void) $as_decl_use;
1778 #else
1779   (void) $as_decl_name;
1780 #endif
1781 #endif
1782
1783   ;
1784   return 0;
1785 }
1786 _ACEOF
1787 if ac_fn_c_try_compile "$LINENO"; then :
1788   eval "$3=yes"
1789 else
1790   eval "$3=no"
1791 fi
1792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1793   ac_c_werror_flag=$ac_save_werror_flag
1794 fi
1795 eval ac_res=\$$3
1796                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1797 $as_echo "$ac_res" >&6; }
1798   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1799
1800 } # ac_fn_c_check_decl
1801
1802 # ac_fn_c_try_link LINENO
1803 # -----------------------
1804 # Try to link conftest.$ac_ext, and return whether this succeeded.
1805 ac_fn_c_try_link ()
1806 {
1807   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808   rm -f conftest.$ac_objext conftest$ac_exeext
1809   if { { ac_try="$ac_link"
1810 case "(($ac_try" in
1811   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1812   *) ac_try_echo=$ac_try;;
1813 esac
1814 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1815 $as_echo "$ac_try_echo"; } >&5
1816   (eval "$ac_link") 2>conftest.err
1817   ac_status=$?
1818   if test -s conftest.err; then
1819     grep -v '^ *+' conftest.err >conftest.er1
1820     cat conftest.er1 >&5
1821     mv -f conftest.er1 conftest.err
1822   fi
1823   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1824   test $ac_status = 0; } && {
1825          test -z "$ac_c_werror_flag" ||
1826          test ! -s conftest.err
1827        } && test -s conftest$ac_exeext && {
1828          test "$cross_compiling" = yes ||
1829          test -x conftest$ac_exeext
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   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1839   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1840   # interfere with the next link command; also delete a directory that is
1841   # left behind by Apple's compiler.  We do this before executing the actions.
1842   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1843   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1844   as_fn_set_status $ac_retval
1845
1846 } # ac_fn_c_try_link
1847
1848 # ac_fn_c_try_cpp LINENO
1849 # ----------------------
1850 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1851 ac_fn_c_try_cpp ()
1852 {
1853   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1854   if { { ac_try="$ac_cpp conftest.$ac_ext"
1855 case "(($ac_try" in
1856   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1857   *) ac_try_echo=$ac_try;;
1858 esac
1859 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1860 $as_echo "$ac_try_echo"; } >&5
1861   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1862   ac_status=$?
1863   if test -s conftest.err; then
1864     grep -v '^ *+' conftest.err >conftest.er1
1865     cat conftest.er1 >&5
1866     mv -f conftest.er1 conftest.err
1867   fi
1868   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1869   test $ac_status = 0; } > conftest.i && {
1870          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1871          test ! -s conftest.err
1872        }; then :
1873   ac_retval=0
1874 else
1875   $as_echo "$as_me: failed program was:" >&5
1876 sed 's/^/| /' conftest.$ac_ext >&5
1877
1878     ac_retval=1
1879 fi
1880   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1881   as_fn_set_status $ac_retval
1882
1883 } # ac_fn_c_try_cpp
1884
1885 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1886 # -------------------------------------------------------
1887 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1888 # the include files in INCLUDES and setting the cache variable VAR
1889 # accordingly.
1890 ac_fn_c_check_header_mongrel ()
1891 {
1892   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893   if eval \${$3+:} false; then :
1894   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1895 $as_echo_n "checking for $2... " >&6; }
1896 if eval \${$3+:} false; then :
1897   $as_echo_n "(cached) " >&6
1898 fi
1899 eval ac_res=\$$3
1900                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1901 $as_echo "$ac_res" >&6; }
1902 else
1903   # Is the header compilable?
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1905 $as_echo_n "checking $2 usability... " >&6; }
1906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907 /* end confdefs.h.  */
1908 $4
1909 #include <$2>
1910 _ACEOF
1911 if ac_fn_c_try_compile "$LINENO"; then :
1912   ac_header_compiler=yes
1913 else
1914   ac_header_compiler=no
1915 fi
1916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1918 $as_echo "$ac_header_compiler" >&6; }
1919
1920 # Is the header present?
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1922 $as_echo_n "checking $2 presence... " >&6; }
1923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924 /* end confdefs.h.  */
1925 #include <$2>
1926 _ACEOF
1927 if ac_fn_c_try_cpp "$LINENO"; then :
1928   ac_header_preproc=yes
1929 else
1930   ac_header_preproc=no
1931 fi
1932 rm -f conftest.err conftest.i conftest.$ac_ext
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1934 $as_echo "$ac_header_preproc" >&6; }
1935
1936 # So?  What about this header?
1937 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1938   yes:no: )
1939     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1940 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1941     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1942 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1943     ;;
1944   no:yes:* )
1945     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1946 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1947     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1948 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1949     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1950 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1951     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1952 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1953     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1954 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1955 ( $as_echo "## ---------------------------------------- ##
1956 ## Report this to pgsql-bugs@postgresql.org ##
1957 ## ---------------------------------------- ##"
1958      ) | sed "s/^/$as_me: WARNING:     /" >&2
1959     ;;
1960 esac
1961   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1962 $as_echo_n "checking for $2... " >&6; }
1963 if eval \${$3+:} false; then :
1964   $as_echo_n "(cached) " >&6
1965 else
1966   eval "$3=\$ac_header_compiler"
1967 fi
1968 eval ac_res=\$$3
1969                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1970 $as_echo "$ac_res" >&6; }
1971 fi
1972   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1973
1974 } # ac_fn_c_check_header_mongrel
1975
1976 # ac_fn_c_try_run LINENO
1977 # ----------------------
1978 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1979 # that executables *can* be run.
1980 ac_fn_c_try_run ()
1981 {
1982   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1983   if { { ac_try="$ac_link"
1984 case "(($ac_try" in
1985   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1986   *) ac_try_echo=$ac_try;;
1987 esac
1988 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1989 $as_echo "$ac_try_echo"; } >&5
1990   (eval "$ac_link") 2>&5
1991   ac_status=$?
1992   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1993   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1994   { { case "(($ac_try" in
1995   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1996   *) ac_try_echo=$ac_try;;
1997 esac
1998 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1999 $as_echo "$ac_try_echo"; } >&5
2000   (eval "$ac_try") 2>&5
2001   ac_status=$?
2002   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2003   test $ac_status = 0; }; }; then :
2004   ac_retval=0
2005 else
2006   $as_echo "$as_me: program exited with status $ac_status" >&5
2007        $as_echo "$as_me: failed program was:" >&5
2008 sed 's/^/| /' conftest.$ac_ext >&5
2009
2010        ac_retval=$ac_status
2011 fi
2012   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2013   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2014   as_fn_set_status $ac_retval
2015
2016 } # ac_fn_c_try_run
2017
2018 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2019 # -------------------------------------------------------
2020 # Tests whether HEADER exists and can be compiled using the include files in
2021 # INCLUDES, setting the cache variable VAR accordingly.
2022 ac_fn_c_check_header_compile ()
2023 {
2024   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2025   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2026 $as_echo_n "checking for $2... " >&6; }
2027 if eval \${$3+:} false; then :
2028   $as_echo_n "(cached) " >&6
2029 else
2030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031 /* end confdefs.h.  */
2032 $4
2033 #include <$2>
2034 _ACEOF
2035 if ac_fn_c_try_compile "$LINENO"; then :
2036   eval "$3=yes"
2037 else
2038   eval "$3=no"
2039 fi
2040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2041 fi
2042 eval ac_res=\$$3
2043                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2044 $as_echo "$ac_res" >&6; }
2045   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2046
2047 } # ac_fn_c_check_header_compile
2048
2049 # ac_fn_c_check_func LINENO FUNC VAR
2050 # ----------------------------------
2051 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2052 ac_fn_c_check_func ()
2053 {
2054   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2055   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2056 $as_echo_n "checking for $2... " >&6; }
2057 if eval \${$3+:} false; then :
2058   $as_echo_n "(cached) " >&6
2059 else
2060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061 /* end confdefs.h.  */
2062 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2063    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2064 #define $2 innocuous_$2
2065
2066 /* System header to define __stub macros and hopefully few prototypes,
2067     which can conflict with char $2 (); below.
2068     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2069     <limits.h> exists even on freestanding compilers.  */
2070
2071 #ifdef __STDC__
2072 # include <limits.h>
2073 #else
2074 # include <assert.h>
2075 #endif
2076
2077 #undef $2
2078
2079 /* Override any GCC internal prototype to avoid an error.
2080    Use char because int might match the return type of a GCC
2081    builtin and then its argument prototype would still apply.  */
2082 #ifdef __cplusplus
2083 extern "C"
2084 #endif
2085 char $2 ();
2086 /* The GNU C library defines this for functions which it implements
2087     to always fail with ENOSYS.  Some functions are actually named
2088     something starting with __ and the normal name is an alias.  */
2089 #if defined __stub_$2 || defined __stub___$2
2090 choke me
2091 #endif
2092
2093 int
2094 main ()
2095 {
2096 return $2 ();
2097   ;
2098   return 0;
2099 }
2100 _ACEOF
2101 if ac_fn_c_try_link "$LINENO"; then :
2102   eval "$3=yes"
2103 else
2104   eval "$3=no"
2105 fi
2106 rm -f core conftest.err conftest.$ac_objext \
2107     conftest$ac_exeext conftest.$ac_ext
2108 fi
2109 eval ac_res=\$$3
2110                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2111 $as_echo "$ac_res" >&6; }
2112   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2113
2114 } # ac_fn_c_check_func
2115
2116 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2117 # -------------------------------------------
2118 # Tests whether TYPE exists after having included INCLUDES, setting cache
2119 # variable VAR accordingly.
2120 ac_fn_c_check_type ()
2121 {
2122   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2123   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2124 $as_echo_n "checking for $2... " >&6; }
2125 if eval \${$3+:} false; then :
2126   $as_echo_n "(cached) " >&6
2127 else
2128   eval "$3=no"
2129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130 /* end confdefs.h.  */
2131 $4
2132 int
2133 main ()
2134 {
2135 if (sizeof ($2))
2136          return 0;
2137   ;
2138   return 0;
2139 }
2140 _ACEOF
2141 if ac_fn_c_try_compile "$LINENO"; then :
2142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143 /* end confdefs.h.  */
2144 $4
2145 int
2146 main ()
2147 {
2148 if (sizeof (($2)))
2149             return 0;
2150   ;
2151   return 0;
2152 }
2153 _ACEOF
2154 if ac_fn_c_try_compile "$LINENO"; then :
2155
2156 else
2157   eval "$3=yes"
2158 fi
2159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2160 fi
2161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2162 fi
2163 eval ac_res=\$$3
2164                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2165 $as_echo "$ac_res" >&6; }
2166   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2167
2168 } # ac_fn_c_check_type
2169
2170 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2171 # ----------------------------------------------------
2172 # Tries to find if the field MEMBER exists in type AGGR, after including
2173 # INCLUDES, setting cache variable VAR accordingly.
2174 ac_fn_c_check_member ()
2175 {
2176   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2178 $as_echo_n "checking for $2.$3... " >&6; }
2179 if eval \${$4+:} false; then :
2180   $as_echo_n "(cached) " >&6
2181 else
2182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183 /* end confdefs.h.  */
2184 $5
2185 int
2186 main ()
2187 {
2188 static $2 ac_aggr;
2189 if (ac_aggr.$3)
2190 return 0;
2191   ;
2192   return 0;
2193 }
2194 _ACEOF
2195 if ac_fn_c_try_compile "$LINENO"; then :
2196   eval "$4=yes"
2197 else
2198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199 /* end confdefs.h.  */
2200 $5
2201 int
2202 main ()
2203 {
2204 static $2 ac_aggr;
2205 if (sizeof ac_aggr.$3)
2206 return 0;
2207   ;
2208   return 0;
2209 }
2210 _ACEOF
2211 if ac_fn_c_try_compile "$LINENO"; then :
2212   eval "$4=yes"
2213 else
2214   eval "$4=no"
2215 fi
2216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2217 fi
2218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2219 fi
2220 eval ac_res=\$$4
2221                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222 $as_echo "$ac_res" >&6; }
2223   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2224
2225 } # ac_fn_c_check_member
2226
2227 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2228 # --------------------------------------------
2229 # Tries to find the compile-time value of EXPR in a program that includes
2230 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2231 # computed
2232 ac_fn_c_compute_int ()
2233 {
2234   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235   if test "$cross_compiling" = yes; then
2236     # Depending upon the size, compute the lo and hi bounds.
2237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2238 /* end confdefs.h.  */
2239 $4
2240 int
2241 main ()
2242 {
2243 static int test_array [1 - 2 * !(($2) >= 0)];
2244 test_array [0] = 0;
2245 return test_array [0];
2246
2247   ;
2248   return 0;
2249 }
2250 _ACEOF
2251 if ac_fn_c_try_compile "$LINENO"; then :
2252   ac_lo=0 ac_mid=0
2253   while :; do
2254     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255 /* end confdefs.h.  */
2256 $4
2257 int
2258 main ()
2259 {
2260 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2261 test_array [0] = 0;
2262 return test_array [0];
2263
2264   ;
2265   return 0;
2266 }
2267 _ACEOF
2268 if ac_fn_c_try_compile "$LINENO"; then :
2269   ac_hi=$ac_mid; break
2270 else
2271   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2272                         if test $ac_lo -le $ac_mid; then
2273                           ac_lo= ac_hi=
2274                           break
2275                         fi
2276                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2277 fi
2278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279   done
2280 else
2281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282 /* end confdefs.h.  */
2283 $4
2284 int
2285 main ()
2286 {
2287 static int test_array [1 - 2 * !(($2) < 0)];
2288 test_array [0] = 0;
2289 return test_array [0];
2290
2291   ;
2292   return 0;
2293 }
2294 _ACEOF
2295 if ac_fn_c_try_compile "$LINENO"; then :
2296   ac_hi=-1 ac_mid=-1
2297   while :; do
2298     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2299 /* end confdefs.h.  */
2300 $4
2301 int
2302 main ()
2303 {
2304 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2305 test_array [0] = 0;
2306 return test_array [0];
2307
2308   ;
2309   return 0;
2310 }
2311 _ACEOF
2312 if ac_fn_c_try_compile "$LINENO"; then :
2313   ac_lo=$ac_mid; break
2314 else
2315   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2316                         if test $ac_mid -le $ac_hi; then
2317                           ac_lo= ac_hi=
2318                           break
2319                         fi
2320                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2321 fi
2322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323   done
2324 else
2325   ac_lo= ac_hi=
2326 fi
2327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328 fi
2329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330 # Binary search between lo and hi bounds.
2331 while test "x$ac_lo" != "x$ac_hi"; do
2332   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2333   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2334 /* end confdefs.h.  */
2335 $4
2336 int
2337 main ()
2338 {
2339 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2340 test_array [0] = 0;
2341 return test_array [0];
2342
2343   ;
2344   return 0;
2345 }
2346 _ACEOF
2347 if ac_fn_c_try_compile "$LINENO"; then :
2348   ac_hi=$ac_mid
2349 else
2350   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2351 fi
2352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2353 done
2354 case $ac_lo in #((
2355 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2356 '') ac_retval=1 ;;
2357 esac
2358   else
2359     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360 /* end confdefs.h.  */
2361 $4
2362 static long int longval () { return $2; }
2363 static unsigned long int ulongval () { return $2; }
2364 #include <stdio.h>
2365 #include <stdlib.h>
2366 int
2367 main ()
2368 {
2369
2370   FILE *f = fopen ("conftest.val", "w");
2371   if (! f)
2372     return 1;
2373   if (($2) < 0)
2374     {
2375       long int i = longval ();
2376       if (i != ($2))
2377         return 1;
2378       fprintf (f, "%ld", i);
2379     }
2380   else
2381     {
2382       unsigned long int i = ulongval ();
2383       if (i != ($2))
2384         return 1;
2385       fprintf (f, "%lu", i);
2386     }
2387   /* Do not output a trailing newline, as this causes \r\n confusion
2388      on some platforms.  */
2389   return ferror (f) || fclose (f) != 0;
2390
2391   ;
2392   return 0;
2393 }
2394 _ACEOF
2395 if ac_fn_c_try_run "$LINENO"; then :
2396   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2397 else
2398   ac_retval=1
2399 fi
2400 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2401   conftest.$ac_objext conftest.beam conftest.$ac_ext
2402 rm -f conftest.val
2403
2404   fi
2405   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2406   as_fn_set_status $ac_retval
2407
2408 } # ac_fn_c_compute_int
2409 cat >config.log <<_ACEOF
2410 This file contains any messages produced by compilers while
2411 running configure, to aid debugging if configure makes a mistake.
2412
2413 It was created by PostgreSQL $as_me 12devel, which was
2414 generated by GNU Autoconf 2.69.  Invocation command line was
2415
2416   $ $0 $@
2417
2418 _ACEOF
2419 exec 5>>config.log
2420 {
2421 cat <<_ASUNAME
2422 ## --------- ##
2423 ## Platform. ##
2424 ## --------- ##
2425
2426 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2427 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2428 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2429 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2430 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2431
2432 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2433 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2434
2435 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2436 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2437 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2438 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2439 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2440 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2441 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2442
2443 _ASUNAME
2444
2445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2446 for as_dir in $PATH
2447 do
2448   IFS=$as_save_IFS
2449   test -z "$as_dir" && as_dir=.
2450     $as_echo "PATH: $as_dir"
2451   done
2452 IFS=$as_save_IFS
2453
2454 } >&5
2455
2456 cat >&5 <<_ACEOF
2457
2458
2459 ## ----------- ##
2460 ## Core tests. ##
2461 ## ----------- ##
2462
2463 _ACEOF
2464
2465
2466 # Keep a trace of the command line.
2467 # Strip out --no-create and --no-recursion so they do not pile up.
2468 # Strip out --silent because we don't want to record it for future runs.
2469 # Also quote any args containing shell meta-characters.
2470 # Make two passes to allow for proper duplicate-argument suppression.
2471 ac_configure_args=
2472 ac_configure_args0=
2473 ac_configure_args1=
2474 ac_must_keep_next=false
2475 for ac_pass in 1 2
2476 do
2477   for ac_arg
2478   do
2479     case $ac_arg in
2480     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2481     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2482     | -silent | --silent | --silen | --sile | --sil)
2483       continue ;;
2484     *\'*)
2485       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2486     esac
2487     case $ac_pass in
2488     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2489     2)
2490       as_fn_append ac_configure_args1 " '$ac_arg'"
2491       if test $ac_must_keep_next = true; then
2492         ac_must_keep_next=false # Got value, back to normal.
2493       else
2494         case $ac_arg in
2495           *=* | --config-cache | -C | -disable-* | --disable-* \
2496           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2497           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2498           | -with-* | --with-* | -without-* | --without-* | --x)
2499             case "$ac_configure_args0 " in
2500               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2501             esac
2502             ;;
2503           -* ) ac_must_keep_next=true ;;
2504         esac
2505       fi
2506       as_fn_append ac_configure_args " '$ac_arg'"
2507       ;;
2508     esac
2509   done
2510 done
2511 { ac_configure_args0=; unset ac_configure_args0;}
2512 { ac_configure_args1=; unset ac_configure_args1;}
2513
2514 # When interrupted or exit'd, cleanup temporary files, and complete
2515 # config.log.  We remove comments because anyway the quotes in there
2516 # would cause problems or look ugly.
2517 # WARNING: Use '\'' to represent an apostrophe within the trap.
2518 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2519 trap 'exit_status=$?
2520   # Save into config.log some information that might help in debugging.
2521   {
2522     echo
2523
2524     $as_echo "## ---------------- ##
2525 ## Cache variables. ##
2526 ## ---------------- ##"
2527     echo
2528     # The following way of writing the cache mishandles newlines in values,
2529 (
2530   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2531     eval ac_val=\$$ac_var
2532     case $ac_val in #(
2533     *${as_nl}*)
2534       case $ac_var in #(
2535       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2536 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2537       esac
2538       case $ac_var in #(
2539       _ | IFS | as_nl) ;; #(
2540       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2541       *) { eval $ac_var=; unset $ac_var;} ;;
2542       esac ;;
2543     esac
2544   done
2545   (set) 2>&1 |
2546     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2547     *${as_nl}ac_space=\ *)
2548       sed -n \
2549         "s/'\''/'\''\\\\'\'''\''/g;
2550           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2551       ;; #(
2552     *)
2553       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2554       ;;
2555     esac |
2556     sort
2557 )
2558     echo
2559
2560     $as_echo "## ----------------- ##
2561 ## Output variables. ##
2562 ## ----------------- ##"
2563     echo
2564     for ac_var in $ac_subst_vars
2565     do
2566       eval ac_val=\$$ac_var
2567       case $ac_val in
2568       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2569       esac
2570       $as_echo "$ac_var='\''$ac_val'\''"
2571     done | sort
2572     echo
2573
2574     if test -n "$ac_subst_files"; then
2575       $as_echo "## ------------------- ##
2576 ## File substitutions. ##
2577 ## ------------------- ##"
2578       echo
2579       for ac_var in $ac_subst_files
2580       do
2581         eval ac_val=\$$ac_var
2582         case $ac_val in
2583         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2584         esac
2585         $as_echo "$ac_var='\''$ac_val'\''"
2586       done | sort
2587       echo
2588     fi
2589
2590     if test -s confdefs.h; then
2591       $as_echo "## ----------- ##
2592 ## confdefs.h. ##
2593 ## ----------- ##"
2594       echo
2595       cat confdefs.h
2596       echo
2597     fi
2598     test "$ac_signal" != 0 &&
2599       $as_echo "$as_me: caught signal $ac_signal"
2600     $as_echo "$as_me: exit $exit_status"
2601   } >&5
2602   rm -f core *.core core.conftest.* &&
2603     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2604     exit $exit_status
2605 ' 0
2606 for ac_signal in 1 2 13 15; do
2607   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2608 done
2609 ac_signal=0
2610
2611 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2612 rm -f -r conftest* confdefs.h
2613
2614 $as_echo "/* confdefs.h */" > confdefs.h
2615
2616 # Predefined preprocessor variables.
2617
2618 cat >>confdefs.h <<_ACEOF
2619 #define PACKAGE_NAME "$PACKAGE_NAME"
2620 _ACEOF
2621
2622 cat >>confdefs.h <<_ACEOF
2623 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2624 _ACEOF
2625
2626 cat >>confdefs.h <<_ACEOF
2627 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2628 _ACEOF
2629
2630 cat >>confdefs.h <<_ACEOF
2631 #define PACKAGE_STRING "$PACKAGE_STRING"
2632 _ACEOF
2633
2634 cat >>confdefs.h <<_ACEOF
2635 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2636 _ACEOF
2637
2638 cat >>confdefs.h <<_ACEOF
2639 #define PACKAGE_URL "$PACKAGE_URL"
2640 _ACEOF
2641
2642
2643 # Let the site file select an alternate cache file if it wants to.
2644 # Prefer an explicitly selected file to automatically selected ones.
2645 ac_site_file1=NONE
2646 ac_site_file2=NONE
2647 if test -n "$CONFIG_SITE"; then
2648   # We do not want a PATH search for config.site.
2649   case $CONFIG_SITE in #((
2650     -*)  ac_site_file1=./$CONFIG_SITE;;
2651     */*) ac_site_file1=$CONFIG_SITE;;
2652     *)   ac_site_file1=./$CONFIG_SITE;;
2653   esac
2654 elif test "x$prefix" != xNONE; then
2655   ac_site_file1=$prefix/share/config.site
2656   ac_site_file2=$prefix/etc/config.site
2657 else
2658   ac_site_file1=$ac_default_prefix/share/config.site
2659   ac_site_file2=$ac_default_prefix/etc/config.site
2660 fi
2661 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2662 do
2663   test "x$ac_site_file" = xNONE && continue
2664   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2665     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2666 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2667     sed 's/^/| /' "$ac_site_file" >&5
2668     . "$ac_site_file" \
2669       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2670 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2671 as_fn_error $? "failed to load site script $ac_site_file
2672 See \`config.log' for more details" "$LINENO" 5; }
2673   fi
2674 done
2675
2676 if test -r "$cache_file"; then
2677   # Some versions of bash will fail to source /dev/null (special files
2678   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2679   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2680     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2681 $as_echo "$as_me: loading cache $cache_file" >&6;}
2682     case $cache_file in
2683       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2684       *)                      . "./$cache_file";;
2685     esac
2686   fi
2687 else
2688   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2689 $as_echo "$as_me: creating cache $cache_file" >&6;}
2690   >$cache_file
2691 fi
2692
2693 # Check that the precious variables saved in the cache have kept the same
2694 # value.
2695 ac_cache_corrupted=false
2696 for ac_var in $ac_precious_vars; do
2697   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2698   eval ac_new_set=\$ac_env_${ac_var}_set
2699   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2700   eval ac_new_val=\$ac_env_${ac_var}_value
2701   case $ac_old_set,$ac_new_set in
2702     set,)
2703       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2704 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2705       ac_cache_corrupted=: ;;
2706     ,set)
2707       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2708 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2709       ac_cache_corrupted=: ;;
2710     ,);;
2711     *)
2712       if test "x$ac_old_val" != "x$ac_new_val"; then
2713         # differences in whitespace do not lead to failure.
2714         ac_old_val_w=`echo x $ac_old_val`
2715         ac_new_val_w=`echo x $ac_new_val`
2716         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2717           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2718 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2719           ac_cache_corrupted=:
2720         else
2721           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2722 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2723           eval $ac_var=\$ac_old_val
2724         fi
2725         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2726 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2727         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2728 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2729       fi;;
2730   esac
2731   # Pass precious variables to config.status.
2732   if test "$ac_new_set" = set; then
2733     case $ac_new_val in
2734     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2735     *) ac_arg=$ac_var=$ac_new_val ;;
2736     esac
2737     case " $ac_configure_args " in
2738       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2739       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2740     esac
2741   fi
2742 done
2743 if $ac_cache_corrupted; then
2744   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2745 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2746   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2747 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2748   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2749 fi
2750 ## -------------------- ##
2751 ## Main body of script. ##
2752 ## -------------------- ##
2753
2754 ac_ext=c
2755 ac_cpp='$CPP $CPPFLAGS'
2756 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2757 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2758 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2759
2760
2761
2762
2763
2764
2765 ac_aux_dir=
2766 for ac_dir in config "$srcdir"/config; do
2767   if test -f "$ac_dir/install-sh"; then
2768     ac_aux_dir=$ac_dir
2769     ac_install_sh="$ac_aux_dir/install-sh -c"
2770     break
2771   elif test -f "$ac_dir/install.sh"; then
2772     ac_aux_dir=$ac_dir
2773     ac_install_sh="$ac_aux_dir/install.sh -c"
2774     break
2775   elif test -f "$ac_dir/shtool"; then
2776     ac_aux_dir=$ac_dir
2777     ac_install_sh="$ac_aux_dir/shtool install -c"
2778     break
2779   fi
2780 done
2781 if test -z "$ac_aux_dir"; then
2782   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2783 fi
2784
2785 # These three variables are undocumented and unsupported,
2786 # and are intended to be withdrawn in a future Autoconf release.
2787 # They can cause serious problems if a builder's source tree is in a directory
2788 # whose full name contains unusual characters.
2789 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2790 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2791 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2792
2793
2794
2795 configure_args=$ac_configure_args
2796
2797
2798 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2799
2800
2801 cat >>confdefs.h <<_ACEOF
2802 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2803 _ACEOF
2804
2805
2806
2807
2808
2809 # Check whether --with-extra-version was given.
2810 if test "${with_extra_version+set}" = set; then :
2811   withval=$with_extra_version;
2812   case $withval in
2813     yes)
2814       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2815       ;;
2816     no)
2817       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2818       ;;
2819     *)
2820       PG_VERSION="$PACKAGE_VERSION$withval"
2821       ;;
2822   esac
2823
2824 else
2825   PG_VERSION="$PACKAGE_VERSION"
2826 fi
2827
2828
2829
2830 cat >>confdefs.h <<_ACEOF
2831 #define PG_VERSION "$PG_VERSION"
2832 _ACEOF
2833
2834
2835 # Make sure we can run config.sub.
2836 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2837   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2838
2839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2840 $as_echo_n "checking build system type... " >&6; }
2841 if ${ac_cv_build+:} false; then :
2842   $as_echo_n "(cached) " >&6
2843 else
2844   ac_build_alias=$build_alias
2845 test "x$ac_build_alias" = x &&
2846   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2847 test "x$ac_build_alias" = x &&
2848   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2849 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2850   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2851
2852 fi
2853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2854 $as_echo "$ac_cv_build" >&6; }
2855 case $ac_cv_build in
2856 *-*-*) ;;
2857 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2858 esac
2859 build=$ac_cv_build
2860 ac_save_IFS=$IFS; IFS='-'
2861 set x $ac_cv_build
2862 shift
2863 build_cpu=$1
2864 build_vendor=$2
2865 shift; shift
2866 # Remember, the first character of IFS is used to create $*,
2867 # except with old shells:
2868 build_os=$*
2869 IFS=$ac_save_IFS
2870 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2871
2872
2873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2874 $as_echo_n "checking host system type... " >&6; }
2875 if ${ac_cv_host+:} false; then :
2876   $as_echo_n "(cached) " >&6
2877 else
2878   if test "x$host_alias" = x; then
2879   ac_cv_host=$ac_cv_build
2880 else
2881   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2882     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2883 fi
2884
2885 fi
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2887 $as_echo "$ac_cv_host" >&6; }
2888 case $ac_cv_host in
2889 *-*-*) ;;
2890 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2891 esac
2892 host=$ac_cv_host
2893 ac_save_IFS=$IFS; IFS='-'
2894 set x $ac_cv_host
2895 shift
2896 host_cpu=$1
2897 host_vendor=$2
2898 shift; shift
2899 # Remember, the first character of IFS is used to create $*,
2900 # except with old shells:
2901 host_os=$*
2902 IFS=$ac_save_IFS
2903 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2904
2905
2906
2907 template=
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2909 $as_echo_n "checking which template to use... " >&6; }
2910
2911
2912
2913
2914 # Check whether --with-template was given.
2915 if test "${with_template+set}" = set; then :
2916   withval=$with_template;
2917   case $withval in
2918     yes)
2919       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2920       ;;
2921     no)
2922       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2923       ;;
2924     *)
2925
2926   case $withval in
2927     list)   echo; ls "$srcdir/src/template"; exit;;
2928     *)      if test -f "$srcdir/src/template/$with_template" ; then
2929               template=$withval
2930             else
2931               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2932             fi;;
2933   esac
2934
2935       ;;
2936   esac
2937
2938 else
2939
2940 # --with-template not given
2941
2942 case $host_os in
2943      aix*) template=aix ;;
2944   cygwin*) template=cygwin ;;
2945   darwin*) template=darwin ;;
2946 dragonfly*) template=netbsd ;;
2947  freebsd*) template=freebsd ;;
2948     hpux*) template=hpux ;;
2949  linux*|gnu*|k*bsd*-gnu)
2950            template=linux ;;
2951    mingw*) template=win32 ;;
2952   netbsd*) template=netbsd ;;
2953  openbsd*) template=openbsd ;;
2954  solaris*) template=solaris ;;
2955 esac
2956
2957   if test x"$template" = x"" ; then
2958     as_fn_error $? "
2959 *******************************************************************
2960 PostgreSQL has apparently not been ported to your platform yet.
2961 To try a manual configuration, look into the src/template directory
2962 for a similar platform and use the '--with-template=' option.
2963
2964 Please also contact <pgsql-bugs@postgresql.org> to see about
2965 rectifying this.  Include the above 'checking host system type...'
2966 line.
2967 *******************************************************************
2968 " "$LINENO" 5
2969   fi
2970
2971
2972 fi
2973
2974
2975
2976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2977 $as_echo "$template" >&6; }
2978
2979 PORTNAME=$template
2980
2981
2982 # Initialize default assumption that we do not need separate assembly code
2983 # for TAS (test-and-set).  This can be overridden by the template file
2984 # when it's executed.
2985 need_tas=no
2986 tas_file=dummy.s
2987
2988
2989
2990 ##
2991 ## Command line options
2992 ##
2993
2994 #
2995 # Add non-standard directories to the include path
2996 #
2997
2998
2999
3000 # Check whether --with-includes was given.
3001 if test "${with_includes+set}" = set; then :
3002   withval=$with_includes;
3003   case $withval in
3004     yes)
3005       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3006       ;;
3007     no)
3008       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3009       ;;
3010     *)
3011
3012       ;;
3013   esac
3014
3015 fi
3016
3017
3018
3019
3020 #
3021 # Add non-standard directories to the library search path
3022 #
3023
3024
3025
3026 # Check whether --with-libraries was given.
3027 if test "${with_libraries+set}" = set; then :
3028   withval=$with_libraries;
3029   case $withval in
3030     yes)
3031       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3032       ;;
3033     no)
3034       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3035       ;;
3036     *)
3037       LIBRARY_DIRS=$withval
3038       ;;
3039   esac
3040
3041 fi
3042
3043
3044
3045
3046
3047
3048 # Check whether --with-libs was given.
3049 if test "${with_libs+set}" = set; then :
3050   withval=$with_libs;
3051   case $withval in
3052     yes)
3053       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3054       ;;
3055     no)
3056       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3057       ;;
3058     *)
3059       LIBRARY_DIRS=$withval
3060       ;;
3061   esac
3062
3063 fi
3064
3065
3066
3067
3068 #
3069 # 64-bit integer date/time storage is now the only option, but to avoid
3070 # unnecessary breakage of build scripts, continue to accept an explicit
3071 # "--enable-integer-datetimes" switch.
3072 #
3073
3074
3075 # Check whether --enable-integer-datetimes was given.
3076 if test "${enable_integer_datetimes+set}" = set; then :
3077   enableval=$enable_integer_datetimes;
3078   case $enableval in
3079     yes)
3080       :
3081       ;;
3082     no)
3083       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3084       ;;
3085     *)
3086       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3087       ;;
3088   esac
3089
3090 else
3091   enable_integer_datetimes=yes
3092
3093 fi
3094
3095
3096
3097
3098 #
3099 # NLS
3100 #
3101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3102 $as_echo_n "checking whether NLS is wanted... " >&6; }
3103
3104
3105 # Check whether --enable-nls was given.
3106 if test "${enable_nls+set}" = set; then :
3107   enableval=$enable_nls;
3108   case $enableval in
3109     yes)
3110       :
3111       ;;
3112     no)
3113       :
3114       ;;
3115     *)
3116       enable_nls=yes
3117 WANTED_LANGUAGES=$enableval
3118       ;;
3119   esac
3120
3121 else
3122   enable_nls=no
3123 fi
3124
3125
3126
3127 if test "$enable_nls" = yes; then
3128
3129 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3130
3131 fi
3132
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3134 $as_echo "$enable_nls" >&6; }
3135
3136
3137
3138 #
3139 # Default port number (--with-pgport), default 5432
3140 #
3141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3142 $as_echo_n "checking for default port number... " >&6; }
3143
3144
3145
3146 # Check whether --with-pgport was given.
3147 if test "${with_pgport+set}" = set; then :
3148   withval=$with_pgport;
3149   case $withval in
3150     yes)
3151       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3152       ;;
3153     no)
3154       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3155       ;;
3156     *)
3157       default_port=$withval
3158       ;;
3159   esac
3160
3161 else
3162   default_port=5432
3163 fi
3164
3165
3166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3167 $as_echo "$default_port" >&6; }
3168 # Need both of these because some places want an integer and some a string
3169
3170 cat >>confdefs.h <<_ACEOF
3171 #define DEF_PGPORT ${default_port}
3172 _ACEOF
3173
3174
3175 cat >>confdefs.h <<_ACEOF
3176 #define DEF_PGPORT_STR "${default_port}"
3177 _ACEOF
3178
3179
3180
3181 # It's worth validating port; you can get very confusing errors otherwise
3182 if test x"$default_port" = x""; then
3183   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3184 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3185   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3186 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3187   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3188 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3189   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3190 fi
3191
3192 #
3193 # '-rpath'-like feature can be disabled
3194 #
3195
3196
3197 # Check whether --enable-rpath was given.
3198 if test "${enable_rpath+set}" = set; then :
3199   enableval=$enable_rpath;
3200   case $enableval in
3201     yes)
3202       :
3203       ;;
3204     no)
3205       :
3206       ;;
3207     *)
3208       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3209       ;;
3210   esac
3211
3212 else
3213   enable_rpath=yes
3214
3215 fi
3216
3217
3218
3219
3220 #
3221 # Spinlocks
3222 #
3223
3224
3225 # Check whether --enable-spinlocks was given.
3226 if test "${enable_spinlocks+set}" = set; then :
3227   enableval=$enable_spinlocks;
3228   case $enableval in
3229     yes)
3230       :
3231       ;;
3232     no)
3233       :
3234       ;;
3235     *)
3236       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3237       ;;
3238   esac
3239
3240 else
3241   enable_spinlocks=yes
3242
3243 fi
3244
3245
3246
3247 #
3248 # Atomic operations
3249 #
3250
3251
3252 # Check whether --enable-atomics was given.
3253 if test "${enable_atomics+set}" = set; then :
3254   enableval=$enable_atomics;
3255   case $enableval in
3256     yes)
3257       :
3258       ;;
3259     no)
3260       :
3261       ;;
3262     *)
3263       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3264       ;;
3265   esac
3266
3267 else
3268   enable_atomics=yes
3269
3270 fi
3271
3272
3273
3274 #
3275 # Random number generation
3276 #
3277
3278
3279 # Check whether --enable-strong-random was given.
3280 if test "${enable_strong_random+set}" = set; then :
3281   enableval=$enable_strong_random;
3282   case $enableval in
3283     yes)
3284       :
3285       ;;
3286     no)
3287       :
3288       ;;
3289     *)
3290       as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3291       ;;
3292   esac
3293
3294 else
3295   enable_strong_random=yes
3296
3297 fi
3298
3299
3300
3301
3302 #
3303 # --enable-debug adds -g to compiler flags
3304 #
3305
3306
3307 # Check whether --enable-debug was given.
3308 if test "${enable_debug+set}" = set; then :
3309   enableval=$enable_debug;
3310   case $enableval in
3311     yes)
3312       :
3313       ;;
3314     no)
3315       :
3316       ;;
3317     *)
3318       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3319       ;;
3320   esac
3321
3322 else
3323   enable_debug=no
3324
3325 fi
3326
3327
3328
3329
3330 #
3331 # --enable-profiling enables gcc profiling
3332 #
3333
3334
3335 # Check whether --enable-profiling was given.
3336 if test "${enable_profiling+set}" = set; then :
3337   enableval=$enable_profiling;
3338   case $enableval in
3339     yes)
3340       :
3341       ;;
3342     no)
3343       :
3344       ;;
3345     *)
3346       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3347       ;;
3348   esac
3349
3350 else
3351   enable_profiling=no
3352
3353 fi
3354
3355
3356
3357 #
3358 # --enable-coverage enables generation of code coverage metrics with gcov
3359 #
3360
3361
3362 # Check whether --enable-coverage was given.
3363 if test "${enable_coverage+set}" = set; then :
3364   enableval=$enable_coverage;
3365   case $enableval in
3366     yes)
3367       if test -z "$GCOV"; then
3368   for ac_prog in gcov
3369 do
3370   # Extract the first word of "$ac_prog", so it can be a program name with args.
3371 set dummy $ac_prog; ac_word=$2
3372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3373 $as_echo_n "checking for $ac_word... " >&6; }
3374 if ${ac_cv_path_GCOV+:} false; then :
3375   $as_echo_n "(cached) " >&6
3376 else
3377   case $GCOV in
3378   [\\/]* | ?:[\\/]*)
3379   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3380   ;;
3381   *)
3382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3383 for as_dir in $PATH
3384 do
3385   IFS=$as_save_IFS
3386   test -z "$as_dir" && as_dir=.
3387     for ac_exec_ext in '' $ac_executable_extensions; do
3388   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3389     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3390     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3391     break 2
3392   fi
3393 done
3394   done
3395 IFS=$as_save_IFS
3396
3397   ;;
3398 esac
3399 fi
3400 GCOV=$ac_cv_path_GCOV
3401 if test -n "$GCOV"; then
3402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3403 $as_echo "$GCOV" >&6; }
3404 else
3405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3406 $as_echo "no" >&6; }
3407 fi
3408
3409
3410   test -n "$GCOV" && break
3411 done
3412
3413 else
3414   # Report the value of GCOV in configure's output in all cases.
3415   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3416 $as_echo_n "checking for GCOV... " >&6; }
3417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3418 $as_echo "$GCOV" >&6; }
3419 fi
3420
3421 if test -z "$GCOV"; then
3422   as_fn_error $? "gcov not found" "$LINENO" 5
3423 fi
3424 if test -z "$LCOV"; then
3425   for ac_prog in lcov
3426 do
3427   # Extract the first word of "$ac_prog", so it can be a program name with args.
3428 set dummy $ac_prog; ac_word=$2
3429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3430 $as_echo_n "checking for $ac_word... " >&6; }
3431 if ${ac_cv_path_LCOV+:} false; then :
3432   $as_echo_n "(cached) " >&6
3433 else
3434   case $LCOV in
3435   [\\/]* | ?:[\\/]*)
3436   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3437   ;;
3438   *)
3439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3440 for as_dir in $PATH
3441 do
3442   IFS=$as_save_IFS
3443   test -z "$as_dir" && as_dir=.
3444     for ac_exec_ext in '' $ac_executable_extensions; do
3445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3446     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3448     break 2
3449   fi
3450 done
3451   done
3452 IFS=$as_save_IFS
3453
3454   ;;
3455 esac
3456 fi
3457 LCOV=$ac_cv_path_LCOV
3458 if test -n "$LCOV"; then
3459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3460 $as_echo "$LCOV" >&6; }
3461 else
3462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3463 $as_echo "no" >&6; }
3464 fi
3465
3466
3467   test -n "$LCOV" && break
3468 done
3469
3470 else
3471   # Report the value of LCOV in configure's output in all cases.
3472   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3473 $as_echo_n "checking for LCOV... " >&6; }
3474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3475 $as_echo "$LCOV" >&6; }
3476 fi
3477
3478 if test -z "$LCOV"; then
3479   as_fn_error $? "lcov not found" "$LINENO" 5
3480 fi
3481 if test -z "$GENHTML"; then
3482   for ac_prog in genhtml
3483 do
3484   # Extract the first word of "$ac_prog", so it can be a program name with args.
3485 set dummy $ac_prog; ac_word=$2
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3487 $as_echo_n "checking for $ac_word... " >&6; }
3488 if ${ac_cv_path_GENHTML+:} false; then :
3489   $as_echo_n "(cached) " >&6
3490 else
3491   case $GENHTML in
3492   [\\/]* | ?:[\\/]*)
3493   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3494   ;;
3495   *)
3496   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3497 for as_dir in $PATH
3498 do
3499   IFS=$as_save_IFS
3500   test -z "$as_dir" && as_dir=.
3501     for ac_exec_ext in '' $ac_executable_extensions; do
3502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3503     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3505     break 2
3506   fi
3507 done
3508   done
3509 IFS=$as_save_IFS
3510
3511   ;;
3512 esac
3513 fi
3514 GENHTML=$ac_cv_path_GENHTML
3515 if test -n "$GENHTML"; then
3516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3517 $as_echo "$GENHTML" >&6; }
3518 else
3519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3520 $as_echo "no" >&6; }
3521 fi
3522
3523
3524   test -n "$GENHTML" && break
3525 done
3526
3527 else
3528   # Report the value of GENHTML in configure's output in all cases.
3529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3530 $as_echo_n "checking for GENHTML... " >&6; }
3531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3532 $as_echo "$GENHTML" >&6; }
3533 fi
3534
3535 if test -z "$GENHTML"; then
3536   as_fn_error $? "genhtml not found" "$LINENO" 5
3537 fi
3538       ;;
3539     no)
3540       :
3541       ;;
3542     *)
3543       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3544       ;;
3545   esac
3546
3547 else
3548   enable_coverage=no
3549
3550 fi
3551
3552
3553
3554
3555 #
3556 # DTrace
3557 #
3558
3559
3560 # Check whether --enable-dtrace was given.
3561 if test "${enable_dtrace+set}" = set; then :
3562   enableval=$enable_dtrace;
3563   case $enableval in
3564     yes)
3565       if test -z "$DTRACE"; then
3566   for ac_prog in dtrace
3567 do
3568   # Extract the first word of "$ac_prog", so it can be a program name with args.
3569 set dummy $ac_prog; ac_word=$2
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3571 $as_echo_n "checking for $ac_word... " >&6; }
3572 if ${ac_cv_path_DTRACE+:} false; then :
3573   $as_echo_n "(cached) " >&6
3574 else
3575   case $DTRACE in
3576   [\\/]* | ?:[\\/]*)
3577   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3578   ;;
3579   *)
3580   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3581 for as_dir in $PATH
3582 do
3583   IFS=$as_save_IFS
3584   test -z "$as_dir" && as_dir=.
3585     for ac_exec_ext in '' $ac_executable_extensions; do
3586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3587     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3589     break 2
3590   fi
3591 done
3592   done
3593 IFS=$as_save_IFS
3594
3595   ;;
3596 esac
3597 fi
3598 DTRACE=$ac_cv_path_DTRACE
3599 if test -n "$DTRACE"; then
3600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3601 $as_echo "$DTRACE" >&6; }
3602 else
3603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3604 $as_echo "no" >&6; }
3605 fi
3606
3607
3608   test -n "$DTRACE" && break
3609 done
3610
3611 else
3612   # Report the value of DTRACE in configure's output in all cases.
3613   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3614 $as_echo_n "checking for DTRACE... " >&6; }
3615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3616 $as_echo "$DTRACE" >&6; }
3617 fi
3618
3619 if test -z "$DTRACE"; then
3620   as_fn_error $? "dtrace not found" "$LINENO" 5
3621 fi
3622
3623       ;;
3624     no)
3625       :
3626       ;;
3627     *)
3628       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3629       ;;
3630   esac
3631
3632 else
3633   enable_dtrace=no
3634
3635 fi
3636
3637
3638
3639
3640 #
3641 # TAP tests
3642 #
3643
3644
3645 # Check whether --enable-tap-tests was given.
3646 if test "${enable_tap_tests+set}" = set; then :
3647   enableval=$enable_tap_tests;
3648   case $enableval in
3649     yes)
3650       :
3651       ;;
3652     no)
3653       :
3654       ;;
3655     *)
3656       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3657       ;;
3658   esac
3659
3660 else
3661   enable_tap_tests=no
3662
3663 fi
3664
3665
3666
3667
3668 #
3669 # Block size
3670 #
3671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3672 $as_echo_n "checking for block size... " >&6; }
3673
3674
3675
3676 # Check whether --with-blocksize was given.
3677 if test "${with_blocksize+set}" = set; then :
3678   withval=$with_blocksize;
3679   case $withval in
3680     yes)
3681       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3682       ;;
3683     no)
3684       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3685       ;;
3686     *)
3687       blocksize=$withval
3688       ;;
3689   esac
3690
3691 else
3692   blocksize=8
3693 fi
3694
3695
3696 case ${blocksize} in
3697   1) BLCKSZ=1024;;
3698   2) BLCKSZ=2048;;
3699   4) BLCKSZ=4096;;
3700   8) BLCKSZ=8192;;
3701  16) BLCKSZ=16384;;
3702  32) BLCKSZ=32768;;
3703   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3704 esac
3705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3706 $as_echo "${blocksize}kB" >&6; }
3707
3708
3709 cat >>confdefs.h <<_ACEOF
3710 #define BLCKSZ ${BLCKSZ}
3711 _ACEOF
3712
3713
3714 #
3715 # Relation segment size
3716 #
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3718 $as_echo_n "checking for segment size... " >&6; }
3719
3720
3721
3722 # Check whether --with-segsize was given.
3723 if test "${with_segsize+set}" = set; then :
3724   withval=$with_segsize;
3725   case $withval in
3726     yes)
3727       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3728       ;;
3729     no)
3730       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3731       ;;
3732     *)
3733       segsize=$withval
3734       ;;
3735   esac
3736
3737 else
3738   segsize=1
3739 fi
3740
3741
3742 # this expression is set up to avoid unnecessary integer overflow
3743 # blocksize is already guaranteed to be a factor of 1024
3744 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3745 test $? -eq 0 || exit 1
3746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3747 $as_echo "${segsize}GB" >&6; }
3748
3749
3750 cat >>confdefs.h <<_ACEOF
3751 #define RELSEG_SIZE ${RELSEG_SIZE}
3752 _ACEOF
3753
3754
3755 #
3756 # WAL block size
3757 #
3758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3759 $as_echo_n "checking for WAL block size... " >&6; }
3760
3761
3762
3763 # Check whether --with-wal-blocksize was given.
3764 if test "${with_wal_blocksize+set}" = set; then :
3765   withval=$with_wal_blocksize;
3766   case $withval in
3767     yes)
3768       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3769       ;;
3770     no)
3771       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3772       ;;
3773     *)
3774       wal_blocksize=$withval
3775       ;;
3776   esac
3777
3778 else
3779   wal_blocksize=8
3780 fi
3781
3782
3783 case ${wal_blocksize} in
3784   1) XLOG_BLCKSZ=1024;;
3785   2) XLOG_BLCKSZ=2048;;
3786   4) XLOG_BLCKSZ=4096;;
3787   8) XLOG_BLCKSZ=8192;;
3788  16) XLOG_BLCKSZ=16384;;
3789  32) XLOG_BLCKSZ=32768;;
3790  64) XLOG_BLCKSZ=65536;;
3791   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3792 esac
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3794 $as_echo "${wal_blocksize}kB" >&6; }
3795
3796
3797 cat >>confdefs.h <<_ACEOF
3798 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3799 _ACEOF
3800
3801
3802 #
3803 # C compiler
3804 #
3805
3806 # For historical reasons you can also use --with-CC to specify the C compiler
3807 # to use, although the standard way to do this is to set the CC environment
3808 # variable.
3809
3810
3811
3812 # Check whether --with-CC was given.
3813 if test "${with_CC+set}" = set; then :
3814   withval=$with_CC;
3815   case $withval in
3816     yes)
3817       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3818       ;;
3819     no)
3820       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3821       ;;
3822     *)
3823       CC=$with_CC
3824       ;;
3825   esac
3826
3827 fi
3828
3829
3830
3831 case $template in
3832   aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3833     *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3834 esac
3835
3836 ac_ext=c
3837 ac_cpp='$CPP $CPPFLAGS'
3838 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3839 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3840 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3841 if test -n "$ac_tool_prefix"; then
3842   for ac_prog in $pgac_cc_list
3843   do
3844     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3845 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3847 $as_echo_n "checking for $ac_word... " >&6; }
3848 if ${ac_cv_prog_CC+:} false; then :
3849   $as_echo_n "(cached) " >&6
3850 else
3851   if test -n "$CC"; then
3852   ac_cv_prog_CC="$CC" # Let the user override the test.
3853 else
3854 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3855 for as_dir in $PATH
3856 do
3857   IFS=$as_save_IFS
3858   test -z "$as_dir" && as_dir=.
3859     for ac_exec_ext in '' $ac_executable_extensions; do
3860   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3861     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3862     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3863     break 2
3864   fi
3865 done
3866   done
3867 IFS=$as_save_IFS
3868
3869 fi
3870 fi
3871 CC=$ac_cv_prog_CC
3872 if test -n "$CC"; then
3873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3874 $as_echo "$CC" >&6; }
3875 else
3876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3877 $as_echo "no" >&6; }
3878 fi
3879
3880
3881     test -n "$CC" && break
3882   done
3883 fi
3884 if test -z "$CC"; then
3885   ac_ct_CC=$CC
3886   for ac_prog in $pgac_cc_list
3887 do
3888   # Extract the first word of "$ac_prog", so it can be a program name with args.
3889 set dummy $ac_prog; ac_word=$2
3890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3891 $as_echo_n "checking for $ac_word... " >&6; }
3892 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3893   $as_echo_n "(cached) " >&6
3894 else
3895   if test -n "$ac_ct_CC"; then
3896   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3897 else
3898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3899 for as_dir in $PATH
3900 do
3901   IFS=$as_save_IFS
3902   test -z "$as_dir" && as_dir=.
3903     for ac_exec_ext in '' $ac_executable_extensions; do
3904   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3905     ac_cv_prog_ac_ct_CC="$ac_prog"
3906     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3907     break 2
3908   fi
3909 done
3910   done
3911 IFS=$as_save_IFS
3912
3913 fi
3914 fi
3915 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3916 if test -n "$ac_ct_CC"; then
3917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3918 $as_echo "$ac_ct_CC" >&6; }
3919 else
3920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3921 $as_echo "no" >&6; }
3922 fi
3923
3924
3925   test -n "$ac_ct_CC" && break
3926 done
3927
3928   if test "x$ac_ct_CC" = x; then
3929     CC=""
3930   else
3931     case $cross_compiling:$ac_tool_warned in
3932 yes:)
3933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3934 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3935 ac_tool_warned=yes ;;
3936 esac
3937     CC=$ac_ct_CC
3938   fi
3939 fi
3940
3941
3942 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3943 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3944 as_fn_error $? "no acceptable C compiler found in \$PATH
3945 See \`config.log' for more details" "$LINENO" 5; }
3946
3947 # Provide some information about the compiler.
3948 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3949 set X $ac_compile
3950 ac_compiler=$2
3951 for ac_option in --version -v -V -qversion; do
3952   { { ac_try="$ac_compiler $ac_option >&5"
3953 case "(($ac_try" in
3954   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3955   *) ac_try_echo=$ac_try;;
3956 esac
3957 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3958 $as_echo "$ac_try_echo"; } >&5
3959   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3960   ac_status=$?
3961   if test -s conftest.err; then
3962     sed '10a\
3963 ... rest of stderr output deleted ...
3964          10q' conftest.err >conftest.er1
3965     cat conftest.er1 >&5
3966   fi
3967   rm -f conftest.er1 conftest.err
3968   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3969   test $ac_status = 0; }
3970 done
3971
3972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3973 /* end confdefs.h.  */
3974
3975 int
3976 main ()
3977 {
3978
3979   ;
3980   return 0;
3981 }
3982 _ACEOF
3983 ac_clean_files_save=$ac_clean_files
3984 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3985 # Try to create an executable without -o first, disregard a.out.
3986 # It will help us diagnose broken compilers, and finding out an intuition
3987 # of exeext.
3988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3989 $as_echo_n "checking whether the C compiler works... " >&6; }
3990 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3991
3992 # The possible output files:
3993 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3994
3995 ac_rmfiles=
3996 for ac_file in $ac_files
3997 do
3998   case $ac_file in
3999     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4000     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4001   esac
4002 done
4003 rm -f $ac_rmfiles
4004
4005 if { { ac_try="$ac_link_default"
4006 case "(($ac_try" in
4007   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4008   *) ac_try_echo=$ac_try;;
4009 esac
4010 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4011 $as_echo "$ac_try_echo"; } >&5
4012   (eval "$ac_link_default") 2>&5
4013   ac_status=$?
4014   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4015   test $ac_status = 0; }; then :
4016   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4017 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4018 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4019 # so that the user can short-circuit this test for compilers unknown to
4020 # Autoconf.
4021 for ac_file in $ac_files ''
4022 do
4023   test -f "$ac_file" || continue
4024   case $ac_file in
4025     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4026         ;;
4027     [ab].out )
4028         # We found the default executable, but exeext='' is most
4029         # certainly right.
4030         break;;
4031     *.* )
4032         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4033         then :; else
4034            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4035         fi
4036         # We set ac_cv_exeext here because the later test for it is not
4037         # safe: cross compilers may not add the suffix if given an `-o'
4038         # argument, so we may need to know it at that point already.
4039         # Even if this section looks crufty: it has the advantage of
4040         # actually working.
4041         break;;
4042     * )
4043         break;;
4044   esac
4045 done
4046 test "$ac_cv_exeext" = no && ac_cv_exeext=
4047
4048 else
4049   ac_file=''
4050 fi
4051 if test -z "$ac_file"; then :
4052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4053 $as_echo "no" >&6; }
4054 $as_echo "$as_me: failed program was:" >&5
4055 sed 's/^/| /' conftest.$ac_ext >&5
4056
4057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4058 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4059 as_fn_error 77 "C compiler cannot create executables
4060 See \`config.log' for more details" "$LINENO" 5; }
4061 else
4062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4063 $as_echo "yes" >&6; }
4064 fi
4065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4066 $as_echo_n "checking for C compiler default output file name... " >&6; }
4067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4068 $as_echo "$ac_file" >&6; }
4069 ac_exeext=$ac_cv_exeext
4070
4071 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4072 ac_clean_files=$ac_clean_files_save
4073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4074 $as_echo_n "checking for suffix of executables... " >&6; }
4075 if { { ac_try="$ac_link"
4076 case "(($ac_try" in
4077   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4078   *) ac_try_echo=$ac_try;;
4079 esac
4080 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4081 $as_echo "$ac_try_echo"; } >&5
4082   (eval "$ac_link") 2>&5
4083   ac_status=$?
4084   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4085   test $ac_status = 0; }; then :
4086   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4087 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4088 # work properly (i.e., refer to `conftest.exe'), while it won't with
4089 # `rm'.
4090 for ac_file in conftest.exe conftest conftest.*; do
4091   test -f "$ac_file" || continue
4092   case $ac_file in
4093     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4094     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4095           break;;
4096     * ) break;;
4097   esac
4098 done
4099 else
4100   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4101 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4102 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4103 See \`config.log' for more details" "$LINENO" 5; }
4104 fi
4105 rm -f conftest conftest$ac_cv_exeext
4106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4107 $as_echo "$ac_cv_exeext" >&6; }
4108
4109 rm -f conftest.$ac_ext
4110 EXEEXT=$ac_cv_exeext
4111 ac_exeext=$EXEEXT
4112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4113 /* end confdefs.h.  */
4114 #include <stdio.h>
4115 int
4116 main ()
4117 {
4118 FILE *f = fopen ("conftest.out", "w");
4119  return ferror (f) || fclose (f) != 0;
4120
4121   ;
4122   return 0;
4123 }
4124 _ACEOF
4125 ac_clean_files="$ac_clean_files conftest.out"
4126 # Check that the compiler produces executables we can run.  If not, either
4127 # the compiler is broken, or we cross compile.
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4129 $as_echo_n "checking whether we are cross compiling... " >&6; }
4130 if test "$cross_compiling" != yes; then
4131   { { ac_try="$ac_link"
4132 case "(($ac_try" in
4133   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4134   *) ac_try_echo=$ac_try;;
4135 esac
4136 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4137 $as_echo "$ac_try_echo"; } >&5
4138   (eval "$ac_link") 2>&5
4139   ac_status=$?
4140   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4141   test $ac_status = 0; }
4142   if { ac_try='./conftest$ac_cv_exeext'
4143   { { case "(($ac_try" in
4144   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4145   *) ac_try_echo=$ac_try;;
4146 esac
4147 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4148 $as_echo "$ac_try_echo"; } >&5
4149   (eval "$ac_try") 2>&5
4150   ac_status=$?
4151   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4152   test $ac_status = 0; }; }; then
4153     cross_compiling=no
4154   else
4155     if test "$cross_compiling" = maybe; then
4156         cross_compiling=yes
4157     else
4158         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4159 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4160 as_fn_error $? "cannot run C compiled programs.
4161 If you meant to cross compile, use \`--host'.
4162 See \`config.log' for more details" "$LINENO" 5; }
4163     fi
4164   fi
4165 fi
4166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4167 $as_echo "$cross_compiling" >&6; }
4168
4169 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4170 ac_clean_files=$ac_clean_files_save
4171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4172 $as_echo_n "checking for suffix of object files... " >&6; }
4173 if ${ac_cv_objext+:} false; then :
4174   $as_echo_n "(cached) " >&6
4175 else
4176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4177 /* end confdefs.h.  */
4178
4179 int
4180 main ()
4181 {
4182
4183   ;
4184   return 0;
4185 }
4186 _ACEOF
4187 rm -f conftest.o conftest.obj
4188 if { { ac_try="$ac_compile"
4189 case "(($ac_try" in
4190   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4191   *) ac_try_echo=$ac_try;;
4192 esac
4193 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4194 $as_echo "$ac_try_echo"; } >&5
4195   (eval "$ac_compile") 2>&5
4196   ac_status=$?
4197   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4198   test $ac_status = 0; }; then :
4199   for ac_file in conftest.o conftest.obj conftest.*; do
4200   test -f "$ac_file" || continue;
4201   case $ac_file in
4202     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4203     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4204        break;;
4205   esac
4206 done
4207 else
4208   $as_echo "$as_me: failed program was:" >&5
4209 sed 's/^/| /' conftest.$ac_ext >&5
4210
4211 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4212 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4213 as_fn_error $? "cannot compute suffix of object files: cannot compile
4214 See \`config.log' for more details" "$LINENO" 5; }
4215 fi
4216 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4217 fi
4218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4219 $as_echo "$ac_cv_objext" >&6; }
4220 OBJEXT=$ac_cv_objext
4221 ac_objext=$OBJEXT
4222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4223 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4224 if ${ac_cv_c_compiler_gnu+:} false; then :
4225   $as_echo_n "(cached) " >&6
4226 else
4227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4228 /* end confdefs.h.  */
4229
4230 int
4231 main ()
4232 {
4233 #ifndef __GNUC__
4234        choke me
4235 #endif
4236
4237   ;
4238   return 0;
4239 }
4240 _ACEOF
4241 if ac_fn_c_try_compile "$LINENO"; then :
4242   ac_compiler_gnu=yes
4243 else
4244   ac_compiler_gnu=no
4245 fi
4246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4247 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4248
4249 fi
4250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4251 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4252 if test $ac_compiler_gnu = yes; then
4253   GCC=yes
4254 else
4255   GCC=
4256 fi
4257 ac_test_CFLAGS=${CFLAGS+set}
4258 ac_save_CFLAGS=$CFLAGS
4259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4260 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4261 if ${ac_cv_prog_cc_g+:} false; then :
4262   $as_echo_n "(cached) " >&6
4263 else
4264   ac_save_c_werror_flag=$ac_c_werror_flag
4265    ac_c_werror_flag=yes
4266    ac_cv_prog_cc_g=no
4267    CFLAGS="-g"
4268    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4269 /* end confdefs.h.  */
4270
4271 int
4272 main ()
4273 {
4274
4275   ;
4276   return 0;
4277 }
4278 _ACEOF
4279 if ac_fn_c_try_compile "$LINENO"; then :
4280   ac_cv_prog_cc_g=yes
4281 else
4282   CFLAGS=""
4283       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4284 /* end confdefs.h.  */
4285
4286 int
4287 main ()
4288 {
4289
4290   ;
4291   return 0;
4292 }
4293 _ACEOF
4294 if ac_fn_c_try_compile "$LINENO"; then :
4295
4296 else
4297   ac_c_werror_flag=$ac_save_c_werror_flag
4298          CFLAGS="-g"
4299          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4300 /* end confdefs.h.  */
4301
4302 int
4303 main ()
4304 {
4305
4306   ;
4307   return 0;
4308 }
4309 _ACEOF
4310 if ac_fn_c_try_compile "$LINENO"; then :
4311   ac_cv_prog_cc_g=yes
4312 fi
4313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4314 fi
4315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4316 fi
4317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4318    ac_c_werror_flag=$ac_save_c_werror_flag
4319 fi
4320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4321 $as_echo "$ac_cv_prog_cc_g" >&6; }
4322 if test "$ac_test_CFLAGS" = set; then
4323   CFLAGS=$ac_save_CFLAGS
4324 elif test $ac_cv_prog_cc_g = yes; then
4325   if test "$GCC" = yes; then
4326     CFLAGS="-g -O2"
4327   else
4328     CFLAGS="-g"
4329   fi
4330 else
4331   if test "$GCC" = yes; then
4332     CFLAGS="-O2"
4333   else
4334     CFLAGS=
4335   fi
4336 fi
4337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4338 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4339 if ${ac_cv_prog_cc_c89+:} false; then :
4340   $as_echo_n "(cached) " >&6
4341 else
4342   ac_cv_prog_cc_c89=no
4343 ac_save_CC=$CC
4344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4345 /* end confdefs.h.  */
4346 #include <stdarg.h>
4347 #include <stdio.h>
4348 struct stat;
4349 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4350 struct buf { int x; };
4351 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4352 static char *e (p, i)
4353      char **p;
4354      int i;
4355 {
4356   return p[i];
4357 }
4358 static char *f (char * (*g) (char **, int), char **p, ...)
4359 {
4360   char *s;
4361   va_list v;
4362   va_start (v,p);
4363   s = g (p, va_arg (v,int));
4364   va_end (v);
4365   return s;
4366 }
4367
4368 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4369    function prototypes and stuff, but not '\xHH' hex character constants.
4370    These don't provoke an error unfortunately, instead are silently treated
4371    as 'x'.  The following induces an error, until -std is added to get
4372    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4373    array size at least.  It's necessary to write '\x00'==0 to get something
4374    that's true only with -std.  */
4375 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4376
4377 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4378    inside strings and character constants.  */
4379 #define FOO(x) 'x'
4380 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4381
4382 int test (int i, double x);
4383 struct s1 {int (*f) (int a);};
4384 struct s2 {int (*f) (double a);};
4385 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4386 int argc;
4387 char **argv;
4388 int
4389 main ()
4390 {
4391 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4392   ;
4393   return 0;
4394 }
4395 _ACEOF
4396 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4397         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4398 do
4399   CC="$ac_save_CC $ac_arg"
4400   if ac_fn_c_try_compile "$LINENO"; then :
4401   ac_cv_prog_cc_c89=$ac_arg
4402 fi
4403 rm -f core conftest.err conftest.$ac_objext
4404   test "x$ac_cv_prog_cc_c89" != "xno" && break
4405 done
4406 rm -f conftest.$ac_ext
4407 CC=$ac_save_CC
4408
4409 fi
4410 # AC_CACHE_VAL
4411 case "x$ac_cv_prog_cc_c89" in
4412   x)
4413     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4414 $as_echo "none needed" >&6; } ;;
4415   xno)
4416     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4417 $as_echo "unsupported" >&6; } ;;
4418   *)
4419     CC="$CC $ac_cv_prog_cc_c89"
4420     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4421 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4422 esac
4423 if test "x$ac_cv_prog_cc_c89" != xno; then :
4424
4425 fi
4426
4427 ac_ext=c
4428 ac_cpp='$CPP $CPPFLAGS'
4429 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4430 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4431 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4432
4433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4434 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4435 if ${ac_cv_prog_cc_c99+:} false; then :
4436   $as_echo_n "(cached) " >&6
4437 else
4438   ac_cv_prog_cc_c99=no
4439 ac_save_CC=$CC
4440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4441 /* end confdefs.h.  */
4442 #include <stdarg.h>
4443 #include <stdbool.h>
4444 #include <stdlib.h>
4445 #include <wchar.h>
4446 #include <stdio.h>
4447
4448 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4449 #define debug(...) fprintf (stderr, __VA_ARGS__)
4450 #define showlist(...) puts (#__VA_ARGS__)
4451 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4452 static void
4453 test_varargs_macros (void)
4454 {
4455   int x = 1234;
4456   int y = 5678;
4457   debug ("Flag");
4458   debug ("X = %d\n", x);
4459   showlist (The first, second, and third items.);
4460   report (x>y, "x is %d but y is %d", x, y);
4461 }
4462
4463 // Check long long types.
4464 #define BIG64 18446744073709551615ull
4465 #define BIG32 4294967295ul
4466 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4467 #if !BIG_OK
4468   your preprocessor is broken;
4469 #endif
4470 #if BIG_OK
4471 #else
4472   your preprocessor is broken;
4473 #endif
4474 static long long int bignum = -9223372036854775807LL;
4475 static unsigned long long int ubignum = BIG64;
4476
4477 struct incomplete_array
4478 {
4479   int datasize;
4480   double data[];
4481 };
4482
4483 struct named_init {
4484   int number;
4485   const wchar_t *name;
4486   double average;
4487 };
4488
4489 typedef const char *ccp;
4490
4491 static inline int
4492 test_restrict (ccp restrict text)
4493 {
4494   // See if C++-style comments work.
4495   // Iterate through items via the restricted pointer.
4496   // Also check for declarations in for loops.
4497   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4498     continue;
4499   return 0;
4500 }
4501
4502 // Check varargs and va_copy.
4503 static void
4504 test_varargs (const char *format, ...)
4505 {
4506   va_list args;
4507   va_start (args, format);
4508   va_list args_copy;
4509   va_copy (args_copy, args);
4510
4511   const char *str;
4512   int number;
4513   float fnumber;
4514
4515   while (*format)
4516     {
4517       switch (*format++)
4518         {
4519         case 's': // string
4520           str = va_arg (args_copy, const char *);
4521           break;
4522         case 'd': // int
4523           number = va_arg (args_copy, int);
4524           break;
4525         case 'f': // float
4526           fnumber = va_arg (args_copy, double);
4527           break;
4528         default:
4529           break;
4530         }
4531     }
4532   va_end (args_copy);
4533   va_end (args);
4534 }
4535
4536 int
4537 main ()
4538 {
4539
4540   // Check bool.
4541   _Bool success = false;
4542
4543   // Check restrict.
4544   if (test_restrict ("String literal") == 0)
4545     success = true;
4546   char *restrict newvar = "Another string";
4547
4548   // Check varargs.
4549   test_varargs ("s, d' f .", "string", 65, 34.234);
4550   test_varargs_macros ();
4551
4552   // Check flexible array members.
4553   struct incomplete_array *ia =
4554     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4555   ia->datasize = 10;
4556   for (int i = 0; i < ia->datasize; ++i)
4557     ia->data[i] = i * 1.234;
4558
4559   // Check named initializers.
4560   struct named_init ni = {
4561     .number = 34,
4562     .name = L"Test wide string",
4563     .average = 543.34343,
4564   };
4565
4566   ni.number = 58;
4567
4568   int dynamic_array[ni.number];
4569   dynamic_array[ni.number - 1] = 543;
4570
4571   // work around unused variable warnings
4572   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4573           || dynamic_array[ni.number - 1] != 543);
4574
4575   ;
4576   return 0;
4577 }
4578 _ACEOF
4579 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4580 do
4581   CC="$ac_save_CC $ac_arg"
4582   if ac_fn_c_try_compile "$LINENO"; then :
4583   ac_cv_prog_cc_c99=$ac_arg
4584 fi
4585 rm -f core conftest.err conftest.$ac_objext
4586   test "x$ac_cv_prog_cc_c99" != "xno" && break
4587 done
4588 rm -f conftest.$ac_ext
4589 CC=$ac_save_CC
4590
4591 fi
4592 # AC_CACHE_VAL
4593 case "x$ac_cv_prog_cc_c99" in
4594   x)
4595     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4596 $as_echo "none needed" >&6; } ;;
4597   xno)
4598     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4599 $as_echo "unsupported" >&6; } ;;
4600   *)
4601     CC="$CC $ac_cv_prog_cc_c99"
4602     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4603 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4604 esac
4605 if test "x$ac_cv_prog_cc_c99" != xno; then :
4606
4607 fi
4608
4609
4610
4611 # Error out if the compiler does not support C99, as the codebase
4612 # relies on that.
4613 if test "$ac_cv_prog_cc_c99" = no; then
4614     as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4615 fi
4616
4617 ac_ext=cpp
4618 ac_cpp='$CXXCPP $CPPFLAGS'
4619 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4620 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4621 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4622 if test -z "$CXX"; then
4623   if test -n "$CCC"; then
4624     CXX=$CCC
4625   else
4626     if test -n "$ac_tool_prefix"; then
4627   for ac_prog in $pgac_cxx_list
4628   do
4629     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4630 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4632 $as_echo_n "checking for $ac_word... " >&6; }
4633 if ${ac_cv_prog_CXX+:} false; then :
4634   $as_echo_n "(cached) " >&6
4635 else
4636   if test -n "$CXX"; then
4637   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4638 else
4639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4640 for as_dir in $PATH
4641 do
4642   IFS=$as_save_IFS
4643   test -z "$as_dir" && as_dir=.
4644     for ac_exec_ext in '' $ac_executable_extensions; do
4645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4646     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4648     break 2
4649   fi
4650 done
4651   done
4652 IFS=$as_save_IFS
4653
4654 fi
4655 fi
4656 CXX=$ac_cv_prog_CXX
4657 if test -n "$CXX"; then
4658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4659 $as_echo "$CXX" >&6; }
4660 else
4661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4662 $as_echo "no" >&6; }
4663 fi
4664
4665
4666     test -n "$CXX" && break
4667   done
4668 fi
4669 if test -z "$CXX"; then
4670   ac_ct_CXX=$CXX
4671   for ac_prog in $pgac_cxx_list
4672 do
4673   # Extract the first word of "$ac_prog", so it can be a program name with args.
4674 set dummy $ac_prog; ac_word=$2
4675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4676 $as_echo_n "checking for $ac_word... " >&6; }
4677 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4678   $as_echo_n "(cached) " >&6
4679 else
4680   if test -n "$ac_ct_CXX"; then
4681   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4682 else
4683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4684 for as_dir in $PATH
4685 do
4686   IFS=$as_save_IFS
4687   test -z "$as_dir" && as_dir=.
4688     for ac_exec_ext in '' $ac_executable_extensions; do
4689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4690     ac_cv_prog_ac_ct_CXX="$ac_prog"
4691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4692     break 2
4693   fi
4694 done
4695   done
4696 IFS=$as_save_IFS
4697
4698 fi
4699 fi
4700 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4701 if test -n "$ac_ct_CXX"; then
4702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4703 $as_echo "$ac_ct_CXX" >&6; }
4704 else
4705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4706 $as_echo "no" >&6; }
4707 fi
4708
4709
4710   test -n "$ac_ct_CXX" && break
4711 done
4712
4713   if test "x$ac_ct_CXX" = x; then
4714     CXX="g++"
4715   else
4716     case $cross_compiling:$ac_tool_warned in
4717 yes:)
4718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4719 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4720 ac_tool_warned=yes ;;
4721 esac
4722     CXX=$ac_ct_CXX
4723   fi
4724 fi
4725
4726   fi
4727 fi
4728 # Provide some information about the compiler.
4729 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4730 set X $ac_compile
4731 ac_compiler=$2
4732 for ac_option in --version -v -V -qversion; do
4733   { { ac_try="$ac_compiler $ac_option >&5"
4734 case "(($ac_try" in
4735   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4736   *) ac_try_echo=$ac_try;;
4737 esac
4738 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4739 $as_echo "$ac_try_echo"; } >&5
4740   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4741   ac_status=$?
4742   if test -s conftest.err; then
4743     sed '10a\
4744 ... rest of stderr output deleted ...
4745          10q' conftest.err >conftest.er1
4746     cat conftest.er1 >&5
4747   fi
4748   rm -f conftest.er1 conftest.err
4749   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4750   test $ac_status = 0; }
4751 done
4752
4753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4754 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4755 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4756   $as_echo_n "(cached) " >&6
4757 else
4758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4759 /* end confdefs.h.  */
4760
4761 int
4762 main ()
4763 {
4764 #ifndef __GNUC__
4765        choke me
4766 #endif
4767
4768   ;
4769   return 0;
4770 }
4771 _ACEOF
4772 if ac_fn_cxx_try_compile "$LINENO"; then :
4773   ac_compiler_gnu=yes
4774 else
4775   ac_compiler_gnu=no
4776 fi
4777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4778 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4779
4780 fi
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4782 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4783 if test $ac_compiler_gnu = yes; then
4784   GXX=yes
4785 else
4786   GXX=
4787 fi
4788 ac_test_CXXFLAGS=${CXXFLAGS+set}
4789 ac_save_CXXFLAGS=$CXXFLAGS
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4791 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4792 if ${ac_cv_prog_cxx_g+:} false; then :
4793   $as_echo_n "(cached) " >&6
4794 else
4795   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4796    ac_cxx_werror_flag=yes
4797    ac_cv_prog_cxx_g=no
4798    CXXFLAGS="-g"
4799    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4800 /* end confdefs.h.  */
4801
4802 int
4803 main ()
4804 {
4805
4806   ;
4807   return 0;
4808 }
4809 _ACEOF
4810 if ac_fn_cxx_try_compile "$LINENO"; then :
4811   ac_cv_prog_cxx_g=yes
4812 else
4813   CXXFLAGS=""
4814       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4815 /* end confdefs.h.  */
4816
4817 int
4818 main ()
4819 {
4820
4821   ;
4822   return 0;
4823 }
4824 _ACEOF
4825 if ac_fn_cxx_try_compile "$LINENO"; then :
4826
4827 else
4828   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4829          CXXFLAGS="-g"
4830          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4831 /* end confdefs.h.  */
4832
4833 int
4834 main ()
4835 {
4836
4837   ;
4838   return 0;
4839 }
4840 _ACEOF
4841 if ac_fn_cxx_try_compile "$LINENO"; then :
4842   ac_cv_prog_cxx_g=yes
4843 fi
4844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4845 fi
4846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4847 fi
4848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4849    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4850 fi
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4852 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4853 if test "$ac_test_CXXFLAGS" = set; then
4854   CXXFLAGS=$ac_save_CXXFLAGS
4855 elif test $ac_cv_prog_cxx_g = yes; then
4856   if test "$GXX" = yes; then
4857     CXXFLAGS="-g -O2"
4858   else
4859     CXXFLAGS="-g"
4860   fi
4861 else
4862   if test "$GXX" = yes; then
4863     CXXFLAGS="-O2"
4864   else
4865     CXXFLAGS=
4866   fi
4867 fi
4868 ac_ext=c
4869 ac_cpp='$CPP $CPPFLAGS'
4870 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4871 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4872 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4873
4874
4875 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4876 # but has idiosyncrasies of its own.  We assume icc will define
4877 # __INTEL_COMPILER regardless of CFLAGS.
4878
4879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4880 /* end confdefs.h.  */
4881
4882 int
4883 main ()
4884 {
4885 #ifndef __INTEL_COMPILER
4886 choke me
4887 #endif
4888   ;
4889   return 0;
4890 }
4891 _ACEOF
4892 if ac_fn_c_try_compile "$LINENO"; then :
4893   ICC=yes
4894 else
4895   ICC=no
4896 fi
4897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4898
4899 # Check if it's Sun Studio compiler. We assume that
4900 # __SUNPRO_C will be defined for Sun Studio compilers
4901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4902 /* end confdefs.h.  */
4903
4904 int
4905 main ()
4906 {
4907 #ifndef __SUNPRO_C
4908 choke me
4909 #endif
4910   ;
4911   return 0;
4912 }
4913 _ACEOF
4914 if ac_fn_c_try_compile "$LINENO"; then :
4915   SUN_STUDIO_CC=yes
4916 else
4917   SUN_STUDIO_CC=no
4918 fi
4919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4920
4921
4922
4923
4924 #
4925 # LLVM
4926 #
4927 # Checked early because subsequent tests depend on it.
4928
4929
4930
4931 # Check whether --with-llvm was given.
4932 if test "${with_llvm+set}" = set; then :
4933   withval=$with_llvm;
4934   case $withval in
4935     yes)
4936
4937 $as_echo "#define USE_LLVM 1" >>confdefs.h
4938
4939       ;;
4940     no)
4941       :
4942       ;;
4943     *)
4944       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4945       ;;
4946   esac
4947
4948 else
4949   with_llvm=no
4950
4951 fi
4952
4953
4954
4955 for ac_prog in gawk mawk nawk awk
4956 do
4957   # Extract the first word of "$ac_prog", so it can be a program name with args.
4958 set dummy $ac_prog; ac_word=$2
4959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4960 $as_echo_n "checking for $ac_word... " >&6; }
4961 if ${ac_cv_prog_AWK+:} false; then :
4962   $as_echo_n "(cached) " >&6
4963 else
4964   if test -n "$AWK"; then
4965   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4966 else
4967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968 for as_dir in $PATH
4969 do
4970   IFS=$as_save_IFS
4971   test -z "$as_dir" && as_dir=.
4972     for ac_exec_ext in '' $ac_executable_extensions; do
4973   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4974     ac_cv_prog_AWK="$ac_prog"
4975     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4976     break 2
4977   fi
4978 done
4979   done
4980 IFS=$as_save_IFS
4981
4982 fi
4983 fi
4984 AWK=$ac_cv_prog_AWK
4985 if test -n "$AWK"; then
4986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4987 $as_echo "$AWK" >&6; }
4988 else
4989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990 $as_echo "no" >&6; }
4991 fi
4992
4993
4994   test -n "$AWK" && break
4995 done
4996
4997 # The Clang compiler raises a warning for an undeclared identifier that matches
4998 # a compiler builtin function.  All extant Clang versions are affected, as of
4999 # Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
5000 # C and Objective C languages, but Clang does report an error under C++ and
5001 # Objective C++.
5002 #
5003 # Passing -fno-builtin to the compiler would suppress this problem.  That
5004 # strategy would have the advantage of being insensitive to stray warnings, but
5005 # it would make tests less realistic.
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
5007 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
5008 if ${ac_cv_c_decl_report+:} false; then :
5009   $as_echo_n "(cached) " >&6
5010 else
5011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5012 /* end confdefs.h.  */
5013
5014 int
5015 main ()
5016 {
5017 (void) strchr;
5018   ;
5019   return 0;
5020 }
5021 _ACEOF
5022 if ac_fn_c_try_compile "$LINENO"; then :
5023   if test -s conftest.err; then :
5024       # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
5025     # valid AC_CHECK_DECL input.  No library function is consistently available
5026     # on freestanding implementations, so test against a dummy declaration.
5027     # Include always-available headers on the off chance that they somehow
5028     # elicit warnings.
5029     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5030 /* end confdefs.h.  */
5031 #include <float.h>
5032 #include <limits.h>
5033 #include <stdarg.h>
5034 #include <stddef.h>
5035 extern void ac_decl (int, char *);
5036 int
5037 main ()
5038 {
5039 #ifdef __cplusplus
5040   (void) ac_decl ((int) 0, (char *) 0);
5041   (void) ac_decl;
5042 #else
5043   (void) ac_decl;
5044 #endif
5045
5046   ;
5047   return 0;
5048 }
5049 _ACEOF
5050 if ac_fn_c_try_compile "$LINENO"; then :
5051   if test -s conftest.err; then :
5052   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5053 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5054 as_fn_error $? "cannot detect from compiler exit status or warnings
5055 See \`config.log' for more details" "$LINENO" 5; }
5056 else
5057   ac_cv_c_decl_report=warning
5058 fi
5059 else
5060   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5061 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5062 as_fn_error $? "cannot compile a simple declaration test
5063 See \`config.log' for more details" "$LINENO" 5; }
5064 fi
5065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5066 else
5067   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5068 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5069 as_fn_error $? "compiler does not report undeclared identifiers
5070 See \`config.log' for more details" "$LINENO" 5; }
5071 fi
5072 else
5073   ac_cv_c_decl_report=error
5074 fi
5075 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5076 fi
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
5078 $as_echo "$ac_cv_c_decl_report" >&6; }
5079
5080 case $ac_cv_c_decl_report in
5081   warning) ac_c_decl_warn_flag=yes ;;
5082   *) ac_c_decl_warn_flag= ;;
5083 esac
5084
5085 if test "$with_llvm" = yes; then :
5086
5087
5088
5089
5090
5091   if test -z "$LLVM_CONFIG"; then
5092   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
5093 do
5094   # Extract the first word of "$ac_prog", so it can be a program name with args.
5095 set dummy $ac_prog; ac_word=$2
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097 $as_echo_n "checking for $ac_word... " >&6; }
5098 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5099   $as_echo_n "(cached) " >&6
5100 else
5101   case $LLVM_CONFIG in
5102   [\\/]* | ?:[\\/]*)
5103   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5104   ;;
5105   *)
5106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107 for as_dir in $PATH
5108 do
5109   IFS=$as_save_IFS
5110   test -z "$as_dir" && as_dir=.
5111     for ac_exec_ext in '' $ac_executable_extensions; do
5112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5113     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5115     break 2
5116   fi
5117 done
5118   done
5119 IFS=$as_save_IFS
5120
5121   ;;
5122 esac
5123 fi
5124 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5125 if test -n "$LLVM_CONFIG"; then
5126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5127 $as_echo "$LLVM_CONFIG" >&6; }
5128 else
5129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130 $as_echo "no" >&6; }
5131 fi
5132
5133
5134   test -n "$LLVM_CONFIG" && break
5135 done
5136
5137 else
5138   # Report the value of LLVM_CONFIG in configure's output in all cases.
5139   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5140 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5142 $as_echo "$LLVM_CONFIG" >&6; }
5143 fi
5144
5145
5146   # no point continuing if llvm wasn't found
5147   if test -z "$LLVM_CONFIG"; then
5148     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5149   fi
5150   # check if detected $LLVM_CONFIG is executable
5151   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5152   if test "x$pgac_llvm_version" = "xno"; then
5153     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5154   fi
5155   # and whether the version is supported
5156   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5157     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5158   fi
5159
5160   # need clang to create some bitcode files
5161
5162   if test -z "$CLANG"; then
5163   for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5164 do
5165   # Extract the first word of "$ac_prog", so it can be a program name with args.
5166 set dummy $ac_prog; ac_word=$2
5167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5168 $as_echo_n "checking for $ac_word... " >&6; }
5169 if ${ac_cv_path_CLANG+:} false; then :
5170   $as_echo_n "(cached) " >&6
5171 else
5172   case $CLANG in
5173   [\\/]* | ?:[\\/]*)
5174   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5175   ;;
5176   *)
5177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5178 for as_dir in $PATH
5179 do
5180   IFS=$as_save_IFS
5181   test -z "$as_dir" && as_dir=.
5182     for ac_exec_ext in '' $ac_executable_extensions; do
5183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5184     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5186     break 2
5187   fi
5188 done
5189   done
5190 IFS=$as_save_IFS
5191
5192   ;;
5193 esac
5194 fi
5195 CLANG=$ac_cv_path_CLANG
5196 if test -n "$CLANG"; then
5197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5198 $as_echo "$CLANG" >&6; }
5199 else
5200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5201 $as_echo "no" >&6; }
5202 fi
5203
5204
5205   test -n "$CLANG" && break
5206 done
5207
5208 else
5209   # Report the value of CLANG in configure's output in all cases.
5210   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5211 $as_echo_n "checking for CLANG... " >&6; }
5212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5213 $as_echo "$CLANG" >&6; }
5214 fi
5215
5216   if test -z "$CLANG"; then
5217     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5218   fi
5219   # make sure clang is executable
5220   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5221     as_fn_error $? "$CLANG does not work" "$LINENO" 5
5222   fi
5223   # Could check clang version, but it doesn't seem that
5224   # important. Systems with a new enough LLVM version are usually
5225   # going to have a decent clang version too. It's also not entirely
5226   # clear what the minimum version is.
5227
5228   # Collect compiler flags necessary to build the LLVM dependent
5229   # shared library.
5230   for pgac_option in `$LLVM_CONFIG --cppflags`; do
5231     case $pgac_option in
5232       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5233     esac
5234   done
5235
5236   for pgac_option in `$LLVM_CONFIG --ldflags`; do
5237     case $pgac_option in
5238       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5239     esac
5240   done
5241
5242   # ABI influencing options, standard influencing options
5243   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5244     case $pgac_option in
5245       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5246       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5247     esac
5248   done
5249
5250   # Look for components we're interested in, collect necessary
5251   # libs. As some components are optional, we can't just list all of
5252   # them as it'd raise an error.
5253   pgac_components='';
5254   for pgac_component in `$LLVM_CONFIG --components`; do
5255     case $pgac_component in
5256       engine) pgac_components="$pgac_components $pgac_component";;
5257       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5258       orcjit) pgac_components="$pgac_components $pgac_component";;
5259       passes) pgac_components="$pgac_components $pgac_component";;
5260       perfjitevents) pgac_components="$pgac_components $pgac_component";;
5261     esac
5262   done;
5263
5264   # And then get the libraries that need to be linked in for the
5265   # selected components.  They're large libraries, we only want to
5266   # link them into the LLVM using shared library.
5267   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5268     case $pgac_option in
5269       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5270     esac
5271   done
5272
5273   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5274
5275   # Check which functionality is present
5276   SAVE_CPPFLAGS="$CPPFLAGS"
5277   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
5278   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
5279 "
5280 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
5281   ac_have_decl=1
5282 else
5283   ac_have_decl=0
5284 fi
5285
5286 cat >>confdefs.h <<_ACEOF
5287 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
5288 _ACEOF
5289
5290   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
5291 "
5292 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
5293   ac_have_decl=1
5294 else
5295   ac_have_decl=0
5296 fi
5297
5298 cat >>confdefs.h <<_ACEOF
5299 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
5300 _ACEOF
5301 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
5302 "
5303 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
5304   ac_have_decl=1
5305 else
5306   ac_have_decl=0
5307 fi
5308
5309 cat >>confdefs.h <<_ACEOF
5310 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
5311 _ACEOF
5312
5313   ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
5314 "
5315 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
5316   ac_have_decl=1
5317 else
5318   ac_have_decl=0
5319 fi
5320
5321 cat >>confdefs.h <<_ACEOF
5322 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
5323 _ACEOF
5324 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
5325 "
5326 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
5327   ac_have_decl=1
5328 else
5329   ac_have_decl=0
5330 fi
5331
5332 cat >>confdefs.h <<_ACEOF
5333 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
5334 _ACEOF
5335
5336   CPPFLAGS="$SAVE_CPPFLAGS"
5337
5338   # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5339
5340
5341
5342
5343
5344
5345
5346
5347 fi # fi
5348
5349
5350 unset CFLAGS
5351 unset CXXFLAGS
5352
5353 #
5354 # Read the template
5355 #
5356 . "$srcdir/src/template/$template" || exit
5357
5358 # C[XX]FLAGS are selected so:
5359 # If the user specifies something in the environment, that is used.
5360 # else:  If the template file set something, that is used.
5361 # else:  If coverage was enabled, don't set anything.
5362 # else:  If the compiler is GCC, then we use -O2.
5363 # else:  If the compiler is something else, then we use -O, unless debugging.
5364
5365 if test "$ac_env_CFLAGS_set" = set; then
5366   CFLAGS=$ac_env_CFLAGS_value
5367 elif test "${CFLAGS+set}" = set; then
5368   : # (keep what template set)
5369 elif test "$enable_coverage" = yes; then
5370   : # no optimization by default
5371 elif test "$GCC" = yes; then
5372   CFLAGS="-O2"
5373 else
5374   # if the user selected debug mode, don't use -O
5375   if test "$enable_debug" != yes; then
5376     CFLAGS="-O"
5377   fi
5378 fi
5379
5380 if test "$ac_env_CXXFLAGS_set" = set; then
5381   CXXFLAGS=$ac_env_CXXFLAGS_value
5382 elif test "${CXXFLAGS+set}" = set; then
5383   : # (keep what template set)
5384 elif test "$enable_coverage" = yes; then
5385   : # no optimization by default
5386 elif test "$GCC" = yes; then
5387   CXXFLAGS="-O2"
5388 else
5389   # if the user selected debug mode, don't use -O
5390   if test "$enable_debug" != yes; then
5391     CXXFLAGS="-O"
5392   fi
5393 fi
5394
5395 # When generating bitcode (for inlining) we always want to use -O2
5396 # even when --enable-debug is specified. The bitcode it's not going to
5397 # be used for line-by-line debugging, and JIT inlining doesn't work
5398 # without at least -O1 (otherwise clang will emit 'noinline'
5399 # attributes everywhere), which is bad for testing.  Still allow the
5400 # environment to override if done explicitly.
5401 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5402   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5403 else
5404   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5405 fi
5406 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5407   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5408 else
5409   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5410 fi
5411
5412 # C[XX]FLAGS we determined above will be added back at the end
5413 user_CFLAGS=$CFLAGS
5414 CFLAGS=""
5415 user_CXXFLAGS=$CXXFLAGS
5416 CXXFLAGS=""
5417 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5418 BITCODE_CFLAGS=""
5419 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5420 BITCODE_CXXFLAGS=""
5421
5422 # set CFLAGS_VECTOR from the environment, if available
5423 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5424   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5425 fi
5426
5427 # Some versions of GCC support some additional useful warning flags.
5428 # Check whether they are supported, and add them to CFLAGS if so.
5429 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5430 # but has its own.  Also check other compiler-specific flags here.
5431
5432 if test "$GCC" = yes -a "$ICC" = no; then
5433   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5434   CXXFLAGS="-Wall -Wpointer-arith"
5435   # These work in some but not all gcc versions
5436
5437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5438 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5439 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5440   $as_echo_n "(cached) " >&6
5441 else
5442   pgac_save_CFLAGS=$CFLAGS
5443 pgac_save_CC=$CC
5444 CC=${CC}
5445 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5446 ac_save_c_werror_flag=$ac_c_werror_flag
5447 ac_c_werror_flag=yes
5448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5449 /* end confdefs.h.  */
5450
5451 int
5452 main ()
5453 {
5454
5455   ;
5456   return 0;
5457 }
5458 _ACEOF
5459 if ac_fn_c_try_compile "$LINENO"; then :
5460   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5461 else
5462   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5463 fi
5464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5465 ac_c_werror_flag=$ac_save_c_werror_flag
5466 CFLAGS="$pgac_save_CFLAGS"
5467 CC="$pgac_save_CC"
5468 fi
5469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5470 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5471 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5472   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5473 fi
5474
5475
5476   # -Wdeclaration-after-statement isn't applicable for C++
5477   # Really don't want VLAs to be used in our dialect of C
5478
5479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5480 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5481 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5482   $as_echo_n "(cached) " >&6
5483 else
5484   pgac_save_CFLAGS=$CFLAGS
5485 pgac_save_CC=$CC
5486 CC=${CC}
5487 CFLAGS="${CFLAGS} -Werror=vla"
5488 ac_save_c_werror_flag=$ac_c_werror_flag
5489 ac_c_werror_flag=yes
5490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5491 /* end confdefs.h.  */
5492
5493 int
5494 main ()
5495 {
5496
5497   ;
5498   return 0;
5499 }
5500 _ACEOF
5501 if ac_fn_c_try_compile "$LINENO"; then :
5502   pgac_cv_prog_CC_cflags__Werror_vla=yes
5503 else
5504   pgac_cv_prog_CC_cflags__Werror_vla=no
5505 fi
5506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5507 ac_c_werror_flag=$ac_save_c_werror_flag
5508 CFLAGS="$pgac_save_CFLAGS"
5509 CC="$pgac_save_CC"
5510 fi
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5512 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5513 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5514   CFLAGS="${CFLAGS} -Werror=vla"
5515 fi
5516
5517
5518   # -Wvla is not applicable for C++
5519
5520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5521 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5522 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5523   $as_echo_n "(cached) " >&6
5524 else
5525   pgac_save_CFLAGS=$CFLAGS
5526 pgac_save_CC=$CC
5527 CC=${CC}
5528 CFLAGS="${CFLAGS} -Wendif-labels"
5529 ac_save_c_werror_flag=$ac_c_werror_flag
5530 ac_c_werror_flag=yes
5531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5532 /* end confdefs.h.  */
5533
5534 int
5535 main ()
5536 {
5537
5538   ;
5539   return 0;
5540 }
5541 _ACEOF
5542 if ac_fn_c_try_compile "$LINENO"; then :
5543   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5544 else
5545   pgac_cv_prog_CC_cflags__Wendif_labels=no
5546 fi
5547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5548 ac_c_werror_flag=$ac_save_c_werror_flag
5549 CFLAGS="$pgac_save_CFLAGS"
5550 CC="$pgac_save_CC"
5551 fi
5552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5553 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5554 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5555   CFLAGS="${CFLAGS} -Wendif-labels"
5556 fi
5557
5558
5559   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5560 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5561 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5562   $as_echo_n "(cached) " >&6
5563 else
5564   pgac_save_CXXFLAGS=$CXXFLAGS
5565 pgac_save_CXX=$CXX
5566 CXX=${CXX}
5567 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5568 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5569 ac_cxx_werror_flag=yes
5570 ac_ext=cpp
5571 ac_cpp='$CXXCPP $CPPFLAGS'
5572 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5573 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5574 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5575
5576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5577 /* end confdefs.h.  */
5578
5579 int
5580 main ()
5581 {
5582
5583   ;
5584   return 0;
5585 }
5586 _ACEOF
5587 if ac_fn_cxx_try_compile "$LINENO"; then :
5588   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5589 else
5590   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5591 fi
5592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593 ac_ext=c
5594 ac_cpp='$CPP $CPPFLAGS'
5595 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5596 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5597 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5598
5599 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5600 CXXFLAGS="$pgac_save_CXXFLAGS"
5601 CXX="$pgac_save_CXX"
5602 fi
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5604 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5605 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5606   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5607 fi
5608
5609
5610
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5612 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5613 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5614   $as_echo_n "(cached) " >&6
5615 else
5616   pgac_save_CFLAGS=$CFLAGS
5617 pgac_save_CC=$CC
5618 CC=${CC}
5619 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5620 ac_save_c_werror_flag=$ac_c_werror_flag
5621 ac_c_werror_flag=yes
5622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5623 /* end confdefs.h.  */
5624
5625 int
5626 main ()
5627 {
5628
5629   ;
5630   return 0;
5631 }
5632 _ACEOF
5633 if ac_fn_c_try_compile "$LINENO"; then :
5634   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5635 else
5636   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5637 fi
5638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5639 ac_c_werror_flag=$ac_save_c_werror_flag
5640 CFLAGS="$pgac_save_CFLAGS"
5641 CC="$pgac_save_CC"
5642 fi
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5644 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5645 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5646   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5647 fi
5648
5649
5650   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5651 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5652 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5653   $as_echo_n "(cached) " >&6
5654 else
5655   pgac_save_CXXFLAGS=$CXXFLAGS
5656 pgac_save_CXX=$CXX
5657 CXX=${CXX}
5658 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5659 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5660 ac_cxx_werror_flag=yes
5661 ac_ext=cpp
5662 ac_cpp='$CXXCPP $CPPFLAGS'
5663 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5664 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5665 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5666
5667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5668 /* end confdefs.h.  */
5669
5670 int
5671 main ()
5672 {
5673
5674   ;
5675   return 0;
5676 }
5677 _ACEOF
5678 if ac_fn_cxx_try_compile "$LINENO"; then :
5679   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5680 else
5681   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5682 fi
5683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5684 ac_ext=c
5685 ac_cpp='$CPP $CPPFLAGS'
5686 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5687 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5688 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5689
5690 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5691 CXXFLAGS="$pgac_save_CXXFLAGS"
5692 CXX="$pgac_save_CXX"
5693 fi
5694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5695 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5696 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5697   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5698 fi
5699
5700
5701   # This was included in -Wall/-Wformat in older GCC versions
5702
5703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5704 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5705 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5706   $as_echo_n "(cached) " >&6
5707 else
5708   pgac_save_CFLAGS=$CFLAGS
5709 pgac_save_CC=$CC
5710 CC=${CC}
5711 CFLAGS="${CFLAGS} -Wformat-security"
5712 ac_save_c_werror_flag=$ac_c_werror_flag
5713 ac_c_werror_flag=yes
5714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5715 /* end confdefs.h.  */
5716
5717 int
5718 main ()
5719 {
5720
5721   ;
5722   return 0;
5723 }
5724 _ACEOF
5725 if ac_fn_c_try_compile "$LINENO"; then :
5726   pgac_cv_prog_CC_cflags__Wformat_security=yes
5727 else
5728   pgac_cv_prog_CC_cflags__Wformat_security=no
5729 fi
5730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5731 ac_c_werror_flag=$ac_save_c_werror_flag
5732 CFLAGS="$pgac_save_CFLAGS"
5733 CC="$pgac_save_CC"
5734 fi
5735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5736 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5737 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5738   CFLAGS="${CFLAGS} -Wformat-security"
5739 fi
5740
5741
5742   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5743 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5744 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5745   $as_echo_n "(cached) " >&6
5746 else
5747   pgac_save_CXXFLAGS=$CXXFLAGS
5748 pgac_save_CXX=$CXX
5749 CXX=${CXX}
5750 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5751 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5752 ac_cxx_werror_flag=yes
5753 ac_ext=cpp
5754 ac_cpp='$CXXCPP $CPPFLAGS'
5755 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5756 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5757 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5758
5759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5760 /* end confdefs.h.  */
5761
5762 int
5763 main ()
5764 {
5765
5766   ;
5767   return 0;
5768 }
5769 _ACEOF
5770 if ac_fn_cxx_try_compile "$LINENO"; then :
5771   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5772 else
5773   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5774 fi
5775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5776 ac_ext=c
5777 ac_cpp='$CPP $CPPFLAGS'
5778 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5779 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5780 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5781
5782 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5783 CXXFLAGS="$pgac_save_CXXFLAGS"
5784 CXX="$pgac_save_CXX"
5785 fi
5786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5787 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5788 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5789   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5790 fi
5791
5792
5793   # Disable strict-aliasing rules; needed for gcc 3.3+
5794
5795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5796 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5797 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5798   $as_echo_n "(cached) " >&6
5799 else
5800   pgac_save_CFLAGS=$CFLAGS
5801 pgac_save_CC=$CC
5802 CC=${CC}
5803 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5804 ac_save_c_werror_flag=$ac_c_werror_flag
5805 ac_c_werror_flag=yes
5806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5807 /* end confdefs.h.  */
5808
5809 int
5810 main ()
5811 {
5812
5813   ;
5814   return 0;
5815 }
5816 _ACEOF
5817 if ac_fn_c_try_compile "$LINENO"; then :
5818   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5819 else
5820   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5821 fi
5822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5823 ac_c_werror_flag=$ac_save_c_werror_flag
5824 CFLAGS="$pgac_save_CFLAGS"
5825 CC="$pgac_save_CC"
5826 fi
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5828 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5829 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5830   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5831 fi
5832
5833
5834   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5835 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5836 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5837   $as_echo_n "(cached) " >&6
5838 else
5839   pgac_save_CXXFLAGS=$CXXFLAGS
5840 pgac_save_CXX=$CXX
5841 CXX=${CXX}
5842 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5843 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5844 ac_cxx_werror_flag=yes
5845 ac_ext=cpp
5846 ac_cpp='$CXXCPP $CPPFLAGS'
5847 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5848 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5849 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5850
5851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5852 /* end confdefs.h.  */
5853
5854 int
5855 main ()
5856 {
5857
5858   ;
5859   return 0;
5860 }
5861 _ACEOF
5862 if ac_fn_cxx_try_compile "$LINENO"; then :
5863   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5864 else
5865   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5866 fi
5867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5868 ac_ext=c
5869 ac_cpp='$CPP $CPPFLAGS'
5870 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5871 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5872 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5873
5874 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5875 CXXFLAGS="$pgac_save_CXXFLAGS"
5876 CXX="$pgac_save_CXX"
5877 fi
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5879 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5880 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5881   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5882 fi
5883
5884
5885   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5886
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5888 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5889 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5890   $as_echo_n "(cached) " >&6
5891 else
5892   pgac_save_CFLAGS=$CFLAGS
5893 pgac_save_CC=$CC
5894 CC=${CC}
5895 CFLAGS="${CFLAGS} -fwrapv"
5896 ac_save_c_werror_flag=$ac_c_werror_flag
5897 ac_c_werror_flag=yes
5898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5899 /* end confdefs.h.  */
5900
5901 int
5902 main ()
5903 {
5904
5905   ;
5906   return 0;
5907 }
5908 _ACEOF
5909 if ac_fn_c_try_compile "$LINENO"; then :
5910   pgac_cv_prog_CC_cflags__fwrapv=yes
5911 else
5912   pgac_cv_prog_CC_cflags__fwrapv=no
5913 fi
5914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5915 ac_c_werror_flag=$ac_save_c_werror_flag
5916 CFLAGS="$pgac_save_CFLAGS"
5917 CC="$pgac_save_CC"
5918 fi
5919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5920 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5921 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5922   CFLAGS="${CFLAGS} -fwrapv"
5923 fi
5924
5925
5926   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5927 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5928 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5929   $as_echo_n "(cached) " >&6
5930 else
5931   pgac_save_CXXFLAGS=$CXXFLAGS
5932 pgac_save_CXX=$CXX
5933 CXX=${CXX}
5934 CXXFLAGS="${CXXFLAGS} -fwrapv"
5935 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5936 ac_cxx_werror_flag=yes
5937 ac_ext=cpp
5938 ac_cpp='$CXXCPP $CPPFLAGS'
5939 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5940 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5941 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5942
5943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5944 /* end confdefs.h.  */
5945
5946 int
5947 main ()
5948 {
5949
5950   ;
5951   return 0;
5952 }
5953 _ACEOF
5954 if ac_fn_cxx_try_compile "$LINENO"; then :
5955   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5956 else
5957   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5958 fi
5959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5960 ac_ext=c
5961 ac_cpp='$CPP $CPPFLAGS'
5962 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5963 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5964 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5965
5966 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5967 CXXFLAGS="$pgac_save_CXXFLAGS"
5968 CXX="$pgac_save_CXX"
5969 fi
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5971 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5972 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5973   CXXFLAGS="${CXXFLAGS} -fwrapv"
5974 fi
5975
5976
5977   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5978
5979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5980 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5981 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5982   $as_echo_n "(cached) " >&6
5983 else
5984   pgac_save_CFLAGS=$CFLAGS
5985 pgac_save_CC=$CC
5986 CC=${CC}
5987 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5988 ac_save_c_werror_flag=$ac_c_werror_flag
5989 ac_c_werror_flag=yes
5990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5991 /* end confdefs.h.  */
5992
5993 int
5994 main ()
5995 {
5996
5997   ;
5998   return 0;
5999 }
6000 _ACEOF
6001 if ac_fn_c_try_compile "$LINENO"; then :
6002   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6003 else
6004   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6005 fi
6006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6007 ac_c_werror_flag=$ac_save_c_werror_flag
6008 CFLAGS="$pgac_save_CFLAGS"
6009 CC="$pgac_save_CC"
6010 fi
6011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6012 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6013 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6014   CFLAGS="${CFLAGS} -fexcess-precision=standard"
6015 fi
6016
6017
6018   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6019 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6020 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6021   $as_echo_n "(cached) " >&6
6022 else
6023   pgac_save_CXXFLAGS=$CXXFLAGS
6024 pgac_save_CXX=$CXX
6025 CXX=${CXX}
6026 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6027 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6028 ac_cxx_werror_flag=yes
6029 ac_ext=cpp
6030 ac_cpp='$CXXCPP $CPPFLAGS'
6031 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6032 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6033 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6034
6035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6036 /* end confdefs.h.  */
6037
6038 int
6039 main ()
6040 {
6041
6042   ;
6043   return 0;
6044 }
6045 _ACEOF
6046 if ac_fn_cxx_try_compile "$LINENO"; then :
6047   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6048 else
6049   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6050 fi
6051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6052 ac_ext=c
6053 ac_cpp='$CPP $CPPFLAGS'
6054 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6055 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6056 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6057
6058 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6059 CXXFLAGS="$pgac_save_CXXFLAGS"
6060 CXX="$pgac_save_CXX"
6061 fi
6062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6063 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6064 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6065   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6066 fi
6067
6068
6069   # Optimization flags for specific files that benefit from vectorization
6070   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
6071 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
6072 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6073   $as_echo_n "(cached) " >&6
6074 else
6075   pgac_save_CFLAGS=$CFLAGS
6076 pgac_save_CC=$CC
6077 CC=${CC}
6078 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
6079 ac_save_c_werror_flag=$ac_c_werror_flag
6080 ac_c_werror_flag=yes
6081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6082 /* end confdefs.h.  */
6083
6084 int
6085 main ()
6086 {
6087
6088   ;
6089   return 0;
6090 }
6091 _ACEOF
6092 if ac_fn_c_try_compile "$LINENO"; then :
6093   pgac_cv_prog_CC_cflags__funroll_loops=yes
6094 else
6095   pgac_cv_prog_CC_cflags__funroll_loops=no
6096 fi
6097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6098 ac_c_werror_flag=$ac_save_c_werror_flag
6099 CFLAGS="$pgac_save_CFLAGS"
6100 CC="$pgac_save_CC"
6101 fi
6102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6103 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6104 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6105   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
6106 fi
6107
6108
6109   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
6110 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
6111 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6112   $as_echo_n "(cached) " >&6
6113 else
6114   pgac_save_CFLAGS=$CFLAGS
6115 pgac_save_CC=$CC
6116 CC=${CC}
6117 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
6118 ac_save_c_werror_flag=$ac_c_werror_flag
6119 ac_c_werror_flag=yes
6120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6121 /* end confdefs.h.  */
6122
6123 int
6124 main ()
6125 {
6126
6127   ;
6128   return 0;
6129 }
6130 _ACEOF
6131 if ac_fn_c_try_compile "$LINENO"; then :
6132   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6133 else
6134   pgac_cv_prog_CC_cflags__ftree_vectorize=no
6135 fi
6136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6137 ac_c_werror_flag=$ac_save_c_werror_flag
6138 CFLAGS="$pgac_save_CFLAGS"
6139 CC="$pgac_save_CC"
6140 fi
6141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6142 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6143 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6144   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
6145 fi
6146
6147
6148   # We want to suppress clang's unhelpful unused-command-line-argument warnings
6149   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
6150   # test for the positive form and if that works, add the negative form
6151   NOT_THE_CFLAGS=""
6152   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6153 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6154 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6155   $as_echo_n "(cached) " >&6
6156 else
6157   pgac_save_CFLAGS=$CFLAGS
6158 pgac_save_CC=$CC
6159 CC=${CC}
6160 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6161 ac_save_c_werror_flag=$ac_c_werror_flag
6162 ac_c_werror_flag=yes
6163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6164 /* end confdefs.h.  */
6165
6166 int
6167 main ()
6168 {
6169
6170   ;
6171   return 0;
6172 }
6173 _ACEOF
6174 if ac_fn_c_try_compile "$LINENO"; then :
6175   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6176 else
6177   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6178 fi
6179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6180 ac_c_werror_flag=$ac_save_c_werror_flag
6181 CFLAGS="$pgac_save_CFLAGS"
6182 CC="$pgac_save_CC"
6183 fi
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6185 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6186 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6187   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6188 fi
6189
6190
6191   if test -n "$NOT_THE_CFLAGS"; then
6192     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6193   fi
6194   # Similarly disable useless truncation warnings from gcc 8+
6195   NOT_THE_CFLAGS=""
6196   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6197 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6198 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6199   $as_echo_n "(cached) " >&6
6200 else
6201   pgac_save_CFLAGS=$CFLAGS
6202 pgac_save_CC=$CC
6203 CC=${CC}
6204 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6205 ac_save_c_werror_flag=$ac_c_werror_flag
6206 ac_c_werror_flag=yes
6207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6208 /* end confdefs.h.  */
6209
6210 int
6211 main ()
6212 {
6213
6214   ;
6215   return 0;
6216 }
6217 _ACEOF
6218 if ac_fn_c_try_compile "$LINENO"; then :
6219   pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6220 else
6221   pgac_cv_prog_CC_cflags__Wformat_truncation=no
6222 fi
6223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6224 ac_c_werror_flag=$ac_save_c_werror_flag
6225 CFLAGS="$pgac_save_CFLAGS"
6226 CC="$pgac_save_CC"
6227 fi
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6229 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6230 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6231   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6232 fi
6233
6234
6235   if test -n "$NOT_THE_CFLAGS"; then
6236     CFLAGS="$CFLAGS -Wno-format-truncation"
6237   fi
6238   NOT_THE_CFLAGS=""
6239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6240 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6241 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6242   $as_echo_n "(cached) " >&6
6243 else
6244   pgac_save_CFLAGS=$CFLAGS
6245 pgac_save_CC=$CC
6246 CC=${CC}
6247 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6248 ac_save_c_werror_flag=$ac_c_werror_flag
6249 ac_c_werror_flag=yes
6250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6251 /* end confdefs.h.  */
6252
6253 int
6254 main ()
6255 {
6256
6257   ;
6258   return 0;
6259 }
6260 _ACEOF
6261 if ac_fn_c_try_compile "$LINENO"; then :
6262   pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6263 else
6264   pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6265 fi
6266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6267 ac_c_werror_flag=$ac_save_c_werror_flag
6268 CFLAGS="$pgac_save_CFLAGS"
6269 CC="$pgac_save_CC"
6270 fi
6271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6272 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6273 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6274   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6275 fi
6276
6277
6278   if test -n "$NOT_THE_CFLAGS"; then
6279     CFLAGS="$CFLAGS -Wno-stringop-truncation"
6280   fi
6281 elif test "$ICC" = yes; then
6282   # Intel's compiler has a bug/misoptimization in checking for
6283   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6284
6285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6286 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6287 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6288   $as_echo_n "(cached) " >&6
6289 else
6290   pgac_save_CFLAGS=$CFLAGS
6291 pgac_save_CC=$CC
6292 CC=${CC}
6293 CFLAGS="${CFLAGS} -mp1"
6294 ac_save_c_werror_flag=$ac_c_werror_flag
6295 ac_c_werror_flag=yes
6296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6297 /* end confdefs.h.  */
6298
6299 int
6300 main ()
6301 {
6302
6303   ;
6304   return 0;
6305 }
6306 _ACEOF
6307 if ac_fn_c_try_compile "$LINENO"; then :
6308   pgac_cv_prog_CC_cflags__mp1=yes
6309 else
6310   pgac_cv_prog_CC_cflags__mp1=no
6311 fi
6312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6313 ac_c_werror_flag=$ac_save_c_werror_flag
6314 CFLAGS="$pgac_save_CFLAGS"
6315 CC="$pgac_save_CC"
6316 fi
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6318 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6319 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6320   CFLAGS="${CFLAGS} -mp1"
6321 fi
6322
6323
6324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6325 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6326 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6327   $as_echo_n "(cached) " >&6
6328 else
6329   pgac_save_CXXFLAGS=$CXXFLAGS
6330 pgac_save_CXX=$CXX
6331 CXX=${CXX}
6332 CXXFLAGS="${CXXFLAGS} -mp1"
6333 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6334 ac_cxx_werror_flag=yes
6335 ac_ext=cpp
6336 ac_cpp='$CXXCPP $CPPFLAGS'
6337 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6338 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6339 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6340
6341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6342 /* end confdefs.h.  */
6343
6344 int
6345 main ()
6346 {
6347
6348   ;
6349   return 0;
6350 }
6351 _ACEOF
6352 if ac_fn_cxx_try_compile "$LINENO"; then :
6353   pgac_cv_prog_CXX_cxxflags__mp1=yes
6354 else
6355   pgac_cv_prog_CXX_cxxflags__mp1=no
6356 fi
6357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6358 ac_ext=c
6359 ac_cpp='$CPP $CPPFLAGS'
6360 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6361 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6362 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6363
6364 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6365 CXXFLAGS="$pgac_save_CXXFLAGS"
6366 CXX="$pgac_save_CXX"
6367 fi
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6369 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6370 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6371   CXXFLAGS="${CXXFLAGS} -mp1"
6372 fi
6373
6374
6375   # Make sure strict aliasing is off (though this is said to be the default)
6376
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6378 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6379 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6380   $as_echo_n "(cached) " >&6
6381 else
6382   pgac_save_CFLAGS=$CFLAGS
6383 pgac_save_CC=$CC
6384 CC=${CC}
6385 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6386 ac_save_c_werror_flag=$ac_c_werror_flag
6387 ac_c_werror_flag=yes
6388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6389 /* end confdefs.h.  */
6390
6391 int
6392 main ()
6393 {
6394
6395   ;
6396   return 0;
6397 }
6398 _ACEOF
6399 if ac_fn_c_try_compile "$LINENO"; then :
6400   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6401 else
6402   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6403 fi
6404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6405 ac_c_werror_flag=$ac_save_c_werror_flag
6406 CFLAGS="$pgac_save_CFLAGS"
6407 CC="$pgac_save_CC"
6408 fi
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6410 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6411 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6412   CFLAGS="${CFLAGS} -fno-strict-aliasing"
6413 fi
6414
6415
6416   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6417 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6418 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6419   $as_echo_n "(cached) " >&6
6420 else
6421   pgac_save_CXXFLAGS=$CXXFLAGS
6422 pgac_save_CXX=$CXX
6423 CXX=${CXX}
6424 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6425 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6426 ac_cxx_werror_flag=yes
6427 ac_ext=cpp
6428 ac_cpp='$CXXCPP $CPPFLAGS'
6429 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6430 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6431 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6432
6433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6434 /* end confdefs.h.  */
6435
6436 int
6437 main ()
6438 {
6439
6440   ;
6441   return 0;
6442 }
6443 _ACEOF
6444 if ac_fn_cxx_try_compile "$LINENO"; then :
6445   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6446 else
6447   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6448 fi
6449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6450 ac_ext=c
6451 ac_cpp='$CPP $CPPFLAGS'
6452 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6453 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6455
6456 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6457 CXXFLAGS="$pgac_save_CXXFLAGS"
6458 CXX="$pgac_save_CXX"
6459 fi
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6461 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6462 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6463   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6464 fi
6465
6466
6467 elif test "$PORTNAME" = "aix"; then
6468   # AIX's xlc has to have strict aliasing turned off too
6469
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6471 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6472 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6473   $as_echo_n "(cached) " >&6
6474 else
6475   pgac_save_CFLAGS=$CFLAGS
6476 pgac_save_CC=$CC
6477 CC=${CC}
6478 CFLAGS="${CFLAGS} -qnoansialias"
6479 ac_save_c_werror_flag=$ac_c_werror_flag
6480 ac_c_werror_flag=yes
6481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6482 /* end confdefs.h.  */
6483
6484 int
6485 main ()
6486 {
6487
6488   ;
6489   return 0;
6490 }
6491 _ACEOF
6492 if ac_fn_c_try_compile "$LINENO"; then :
6493   pgac_cv_prog_CC_cflags__qnoansialias=yes
6494 else
6495   pgac_cv_prog_CC_cflags__qnoansialias=no
6496 fi
6497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6498 ac_c_werror_flag=$ac_save_c_werror_flag
6499 CFLAGS="$pgac_save_CFLAGS"
6500 CC="$pgac_save_CC"
6501 fi
6502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6503 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6504 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6505   CFLAGS="${CFLAGS} -qnoansialias"
6506 fi
6507
6508
6509   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6510 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6511 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6512   $as_echo_n "(cached) " >&6
6513 else
6514   pgac_save_CXXFLAGS=$CXXFLAGS
6515 pgac_save_CXX=$CXX
6516 CXX=${CXX}
6517 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6518 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6519 ac_cxx_werror_flag=yes
6520 ac_ext=cpp
6521 ac_cpp='$CXXCPP $CPPFLAGS'
6522 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6523 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6524 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6525
6526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6527 /* end confdefs.h.  */
6528
6529 int
6530 main ()
6531 {
6532
6533   ;
6534   return 0;
6535 }
6536 _ACEOF
6537 if ac_fn_cxx_try_compile "$LINENO"; then :
6538   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6539 else
6540   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6541 fi
6542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6543 ac_ext=c
6544 ac_cpp='$CPP $CPPFLAGS'
6545 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6546 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6547 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6548
6549 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6550 CXXFLAGS="$pgac_save_CXXFLAGS"
6551 CXX="$pgac_save_CXX"
6552 fi
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6554 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6555 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6556   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6557 fi
6558
6559
6560
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6562 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6563 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6564   $as_echo_n "(cached) " >&6
6565 else
6566   pgac_save_CFLAGS=$CFLAGS
6567 pgac_save_CC=$CC
6568 CC=${CC}
6569 CFLAGS="${CFLAGS} -qlonglong"
6570 ac_save_c_werror_flag=$ac_c_werror_flag
6571 ac_c_werror_flag=yes
6572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6573 /* end confdefs.h.  */
6574
6575 int
6576 main ()
6577 {
6578
6579   ;
6580   return 0;
6581 }
6582 _ACEOF
6583 if ac_fn_c_try_compile "$LINENO"; then :
6584   pgac_cv_prog_CC_cflags__qlonglong=yes
6585 else
6586   pgac_cv_prog_CC_cflags__qlonglong=no
6587 fi
6588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6589 ac_c_werror_flag=$ac_save_c_werror_flag
6590 CFLAGS="$pgac_save_CFLAGS"
6591 CC="$pgac_save_CC"
6592 fi
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6594 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6595 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6596   CFLAGS="${CFLAGS} -qlonglong"
6597 fi
6598
6599
6600   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6601 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6602 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6603   $as_echo_n "(cached) " >&6
6604 else
6605   pgac_save_CXXFLAGS=$CXXFLAGS
6606 pgac_save_CXX=$CXX
6607 CXX=${CXX}
6608 CXXFLAGS="${CXXFLAGS} -qlonglong"
6609 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6610 ac_cxx_werror_flag=yes
6611 ac_ext=cpp
6612 ac_cpp='$CXXCPP $CPPFLAGS'
6613 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6614 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6615 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6616
6617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6618 /* end confdefs.h.  */
6619
6620 int
6621 main ()
6622 {
6623
6624   ;
6625   return 0;
6626 }
6627 _ACEOF
6628 if ac_fn_cxx_try_compile "$LINENO"; then :
6629   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6630 else
6631   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6632 fi
6633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6634 ac_ext=c
6635 ac_cpp='$CPP $CPPFLAGS'
6636 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6637 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6638 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6639
6640 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6641 CXXFLAGS="$pgac_save_CXXFLAGS"
6642 CXX="$pgac_save_CXX"
6643 fi
6644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6645 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6646 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6647   CXXFLAGS="${CXXFLAGS} -qlonglong"
6648 fi
6649
6650
6651 elif test "$PORTNAME" = "hpux"; then
6652   # On some versions of HP-UX, libm functions do not set errno by default.
6653   # Fix that by using +Olibmerrno if the compiler recognizes it.
6654
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6656 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6657 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6658   $as_echo_n "(cached) " >&6
6659 else
6660   pgac_save_CFLAGS=$CFLAGS
6661 pgac_save_CC=$CC
6662 CC=${CC}
6663 CFLAGS="${CFLAGS} +Olibmerrno"
6664 ac_save_c_werror_flag=$ac_c_werror_flag
6665 ac_c_werror_flag=yes
6666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6667 /* end confdefs.h.  */
6668
6669 int
6670 main ()
6671 {
6672
6673   ;
6674   return 0;
6675 }
6676 _ACEOF
6677 if ac_fn_c_try_compile "$LINENO"; then :
6678   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6679 else
6680   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6681 fi
6682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6683 ac_c_werror_flag=$ac_save_c_werror_flag
6684 CFLAGS="$pgac_save_CFLAGS"
6685 CC="$pgac_save_CC"
6686 fi
6687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6688 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6689 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6690   CFLAGS="${CFLAGS} +Olibmerrno"
6691 fi
6692
6693
6694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6695 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6696 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6697   $as_echo_n "(cached) " >&6
6698 else
6699   pgac_save_CXXFLAGS=$CXXFLAGS
6700 pgac_save_CXX=$CXX
6701 CXX=${CXX}
6702 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6703 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6704 ac_cxx_werror_flag=yes
6705 ac_ext=cpp
6706 ac_cpp='$CXXCPP $CPPFLAGS'
6707 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6708 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6709 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6710
6711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6712 /* end confdefs.h.  */
6713
6714 int
6715 main ()
6716 {
6717
6718   ;
6719   return 0;
6720 }
6721 _ACEOF
6722 if ac_fn_cxx_try_compile "$LINENO"; then :
6723   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6724 else
6725   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6726 fi
6727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6728 ac_ext=c
6729 ac_cpp='$CPP $CPPFLAGS'
6730 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6731 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6732 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6733
6734 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6735 CXXFLAGS="$pgac_save_CXXFLAGS"
6736 CXX="$pgac_save_CXX"
6737 fi
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6739 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6740 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6741   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6742 fi
6743
6744
6745 fi
6746
6747 CFLAGS_VECTOR=$CFLAGS_VECTOR
6748
6749
6750 # Determine flags used to emit bitcode for JIT inlining. Need to test
6751 # for behaviour changing compiler flags, to keep compatibility with
6752 # compiler used for normal postgres code.
6753 if test "$with_llvm" = yes ; then
6754   CLANGXX="$CLANG -xc++"
6755
6756   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6757 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6758 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6759   $as_echo_n "(cached) " >&6
6760 else
6761   pgac_save_CFLAGS=$CFLAGS
6762 pgac_save_CC=$CC
6763 CC=${CLANG}
6764 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6765 ac_save_c_werror_flag=$ac_c_werror_flag
6766 ac_c_werror_flag=yes
6767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6768 /* end confdefs.h.  */
6769
6770 int
6771 main ()
6772 {
6773
6774   ;
6775   return 0;
6776 }
6777 _ACEOF
6778 if ac_fn_c_try_compile "$LINENO"; then :
6779   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6780 else
6781   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6782 fi
6783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6784 ac_c_werror_flag=$ac_save_c_werror_flag
6785 CFLAGS="$pgac_save_CFLAGS"
6786 CC="$pgac_save_CC"
6787 fi
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6789 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6790 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6791   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6792 fi
6793
6794   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6795 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6796 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6797   $as_echo_n "(cached) " >&6
6798 else
6799   pgac_save_CXXFLAGS=$CXXFLAGS
6800 pgac_save_CXX=$CXX
6801 CXX=${CLANGXX}
6802 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6803 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6804 ac_cxx_werror_flag=yes
6805 ac_ext=cpp
6806 ac_cpp='$CXXCPP $CPPFLAGS'
6807 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6808 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6809 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6810
6811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6812 /* end confdefs.h.  */
6813
6814 int
6815 main ()
6816 {
6817
6818   ;
6819   return 0;
6820 }
6821 _ACEOF
6822 if ac_fn_cxx_try_compile "$LINENO"; then :
6823   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6824 else
6825   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6826 fi
6827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6828 ac_ext=c
6829 ac_cpp='$CPP $CPPFLAGS'
6830 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6831 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6832 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6833
6834 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6835 CXXFLAGS="$pgac_save_CXXFLAGS"
6836 CXX="$pgac_save_CXX"
6837 fi
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6839 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6840 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6841   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6842 fi
6843
6844   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6845 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6846 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6847   $as_echo_n "(cached) " >&6
6848 else
6849   pgac_save_CFLAGS=$CFLAGS
6850 pgac_save_CC=$CC
6851 CC=${CLANG}
6852 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6853 ac_save_c_werror_flag=$ac_c_werror_flag
6854 ac_c_werror_flag=yes
6855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6856 /* end confdefs.h.  */
6857
6858 int
6859 main ()
6860 {
6861
6862   ;
6863   return 0;
6864 }
6865 _ACEOF
6866 if ac_fn_c_try_compile "$LINENO"; then :
6867   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6868 else
6869   pgac_cv_prog_CLANG_cflags__fwrapv=no
6870 fi
6871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6872 ac_c_werror_flag=$ac_save_c_werror_flag
6873 CFLAGS="$pgac_save_CFLAGS"
6874 CC="$pgac_save_CC"
6875 fi
6876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6877 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6878 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6879   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6880 fi
6881
6882   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6883 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6884 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6885   $as_echo_n "(cached) " >&6
6886 else
6887   pgac_save_CXXFLAGS=$CXXFLAGS
6888 pgac_save_CXX=$CXX
6889 CXX=${CLANGXX}
6890 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6891 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6892 ac_cxx_werror_flag=yes
6893 ac_ext=cpp
6894 ac_cpp='$CXXCPP $CPPFLAGS'
6895 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6896 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6897 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6898
6899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6900 /* end confdefs.h.  */
6901
6902 int
6903 main ()
6904 {
6905
6906   ;
6907   return 0;
6908 }
6909 _ACEOF
6910 if ac_fn_cxx_try_compile "$LINENO"; then :
6911   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6912 else
6913   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6914 fi
6915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6916 ac_ext=c
6917 ac_cpp='$CPP $CPPFLAGS'
6918 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6919 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6920 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6921
6922 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6923 CXXFLAGS="$pgac_save_CXXFLAGS"
6924 CXX="$pgac_save_CXX"
6925 fi
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6927 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6928 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6929   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6930 fi
6931
6932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6933 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6934 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6935   $as_echo_n "(cached) " >&6
6936 else
6937   pgac_save_CFLAGS=$CFLAGS
6938 pgac_save_CC=$CC
6939 CC=${CLANG}
6940 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6941 ac_save_c_werror_flag=$ac_c_werror_flag
6942 ac_c_werror_flag=yes
6943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6944 /* end confdefs.h.  */
6945
6946 int
6947 main ()
6948 {
6949
6950   ;
6951   return 0;
6952 }
6953 _ACEOF
6954 if ac_fn_c_try_compile "$LINENO"; then :
6955   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6956 else
6957   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6958 fi
6959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6960 ac_c_werror_flag=$ac_save_c_werror_flag
6961 CFLAGS="$pgac_save_CFLAGS"
6962 CC="$pgac_save_CC"
6963 fi
6964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6965 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6966 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6967   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6968 fi
6969
6970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6971 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6972 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6973   $as_echo_n "(cached) " >&6
6974 else
6975   pgac_save_CXXFLAGS=$CXXFLAGS
6976 pgac_save_CXX=$CXX
6977 CXX=${CLANGXX}
6978 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6979 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6980 ac_cxx_werror_flag=yes
6981 ac_ext=cpp
6982 ac_cpp='$CXXCPP $CPPFLAGS'
6983 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6984 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6985 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6986
6987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6988 /* end confdefs.h.  */
6989
6990 int
6991 main ()
6992 {
6993
6994   ;
6995   return 0;
6996 }
6997 _ACEOF
6998 if ac_fn_cxx_try_compile "$LINENO"; then :
6999   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7000 else
7001   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7002 fi
7003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7004 ac_ext=c
7005 ac_cpp='$CPP $CPPFLAGS'
7006 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7007 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7008 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7009
7010 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7011 CXXFLAGS="$pgac_save_CXXFLAGS"
7012 CXX="$pgac_save_CXX"
7013 fi
7014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7015 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7016 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7017   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7018 fi
7019
7020 fi
7021
7022 # supply -g if --enable-debug
7023 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7024   CFLAGS="$CFLAGS -g"
7025 fi
7026
7027 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7028   CXXFLAGS="$CXXFLAGS -g"
7029 fi
7030
7031 # enable code coverage if --enable-coverage
7032 if test "$enable_coverage" = yes; then
7033   if test "$GCC" = yes; then
7034     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7035     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7036   else
7037     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7038   fi
7039 fi
7040
7041 # enable profiling if --enable-profiling
7042 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7043   if test "$GCC" = yes; then
7044
7045 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7046
7047     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7048     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7049   else
7050     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7051   fi
7052 fi
7053
7054 # We already have this in Makefile.win32, but configure needs it too
7055 if test "$PORTNAME" = "win32"; then
7056   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
7057 fi
7058
7059 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7060 # user-specified flags (if any) at the end.  This lets users override
7061 # the automatic additions.
7062 CFLAGS="$CFLAGS $user_CFLAGS"
7063 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7064 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7065 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7066
7067 BITCODE_CFLAGS=$BITCODE_CFLAGS
7068
7069 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
7070
7071
7072 # Check if the compiler still works with the final flag settings
7073 # (note, we're not checking that for CXX, which is optional)
7074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7075 $as_echo_n "checking whether the C compiler still works... " >&6; }
7076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7077 /* end confdefs.h.  */
7078
7079 int
7080 main ()
7081 {
7082 return 0;
7083   ;
7084   return 0;
7085 }
7086 _ACEOF
7087 if ac_fn_c_try_link "$LINENO"; then :
7088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7089 $as_echo "yes" >&6; }
7090 else
7091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7092 $as_echo "no" >&6; }
7093    as_fn_error $? "cannot proceed" "$LINENO" 5
7094 fi
7095 rm -f core conftest.err conftest.$ac_objext \
7096     conftest$ac_exeext conftest.$ac_ext
7097
7098 # Defend against gcc -ffast-math
7099 if test "$GCC" = yes; then
7100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7101 /* end confdefs.h.  */
7102
7103 int
7104 main ()
7105 {
7106 #ifdef __FAST_MATH__
7107 choke me
7108 #endif
7109   ;
7110   return 0;
7111 }
7112 _ACEOF
7113 if ac_fn_c_try_compile "$LINENO"; then :
7114
7115 else
7116   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7117 fi
7118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7119 fi
7120
7121 # Defend against clang being used on x86-32 without SSE2 enabled.  As current
7122 # versions of clang do not understand -fexcess-precision=standard, the use of
7123 # x87 floating point operations leads to problems like isinf possibly returning
7124 # false for a value that is infinite when converted from the 80bit register to
7125 # the 8byte memory representation.
7126 #
7127 # Only perform the test if the compiler doesn't understand
7128 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7129 # automatically.
7130 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7132 /* end confdefs.h.  */
7133
7134 int
7135 main ()
7136 {
7137
7138 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7139 choke me
7140 #endif
7141
7142   ;
7143   return 0;
7144 }
7145 _ACEOF
7146 if ac_fn_c_try_compile "$LINENO"; then :
7147
7148 else
7149   as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7150 fi
7151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7152 fi
7153
7154 ac_ext=c
7155 ac_cpp='$CPP $CPPFLAGS'
7156 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7157 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7158 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7160 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7161 # On Suns, sometimes $CPP names a directory.
7162 if test -n "$CPP" && test -d "$CPP"; then
7163   CPP=
7164 fi
7165 if test -z "$CPP"; then
7166   if ${ac_cv_prog_CPP+:} false; then :
7167   $as_echo_n "(cached) " >&6
7168 else
7169       # Double quotes because CPP needs to be expanded
7170     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7171     do
7172       ac_preproc_ok=false
7173 for ac_c_preproc_warn_flag in '' yes
7174 do
7175   # Use a header file that comes with gcc, so configuring glibc
7176   # with a fresh cross-compiler works.
7177   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7178   # <limits.h> exists even on freestanding compilers.
7179   # On the NeXT, cc -E runs the code through the compiler's parser,
7180   # not just through cpp. "Syntax error" is here to catch this case.
7181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7182 /* end confdefs.h.  */
7183 #ifdef __STDC__
7184 # include <limits.h>
7185 #else
7186 # include <assert.h>
7187 #endif
7188                      Syntax error
7189 _ACEOF
7190 if ac_fn_c_try_cpp "$LINENO"; then :
7191
7192 else
7193   # Broken: fails on valid input.
7194 continue
7195 fi
7196 rm -f conftest.err conftest.i conftest.$ac_ext
7197
7198   # OK, works on sane cases.  Now check whether nonexistent headers
7199   # can be detected and how.
7200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7201 /* end confdefs.h.  */
7202 #include <ac_nonexistent.h>
7203 _ACEOF
7204 if ac_fn_c_try_cpp "$LINENO"; then :
7205   # Broken: success on invalid input.
7206 continue
7207 else
7208   # Passes both tests.
7209 ac_preproc_ok=:
7210 break
7211 fi
7212 rm -f conftest.err conftest.i conftest.$ac_ext
7213
7214 done
7215 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7216 rm -f conftest.i conftest.err conftest.$ac_ext
7217 if $ac_preproc_ok; then :
7218   break
7219 fi
7220
7221     done
7222     ac_cv_prog_CPP=$CPP
7223
7224 fi
7225   CPP=$ac_cv_prog_CPP
7226 else
7227   ac_cv_prog_CPP=$CPP
7228 fi
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7230 $as_echo "$CPP" >&6; }
7231 ac_preproc_ok=false
7232 for ac_c_preproc_warn_flag in '' yes
7233 do
7234   # Use a header file that comes with gcc, so configuring glibc
7235   # with a fresh cross-compiler works.
7236   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7237   # <limits.h> exists even on freestanding compilers.
7238   # On the NeXT, cc -E runs the code through the compiler's parser,
7239   # not just through cpp. "Syntax error" is here to catch this case.
7240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7241 /* end confdefs.h.  */
7242 #ifdef __STDC__
7243 # include <limits.h>
7244 #else
7245 # include <assert.h>
7246 #endif
7247                      Syntax error
7248 _ACEOF
7249 if ac_fn_c_try_cpp "$LINENO"; then :
7250
7251 else
7252   # Broken: fails on valid input.
7253 continue
7254 fi
7255 rm -f conftest.err conftest.i conftest.$ac_ext
7256
7257   # OK, works on sane cases.  Now check whether nonexistent headers
7258   # can be detected and how.
7259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7260 /* end confdefs.h.  */
7261 #include <ac_nonexistent.h>
7262 _ACEOF
7263 if ac_fn_c_try_cpp "$LINENO"; then :
7264   # Broken: success on invalid input.
7265 continue
7266 else
7267   # Passes both tests.
7268 ac_preproc_ok=:
7269 break
7270 fi
7271 rm -f conftest.err conftest.i conftest.$ac_ext
7272
7273 done
7274 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7275 rm -f conftest.i conftest.err conftest.$ac_ext
7276 if $ac_preproc_ok; then :
7277
7278 else
7279   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7280 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7281 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7282 See \`config.log' for more details" "$LINENO" 5; }
7283 fi
7284
7285 ac_ext=c
7286 ac_cpp='$CPP $CPPFLAGS'
7287 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7288 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7289 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7290
7291
7292
7293
7294 #
7295 # Set up TAS assembly code if needed; the template file has now had its
7296 # chance to request this.
7297 #
7298 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7299
7300
7301 if test "$need_tas" = yes ; then
7302   TAS=tas.o
7303 else
7304   TAS=""
7305 fi
7306
7307
7308
7309 #
7310 # Automatic dependency tracking
7311 #
7312
7313
7314 # Check whether --enable-depend was given.
7315 if test "${enable_depend+set}" = set; then :
7316   enableval=$enable_depend;
7317   case $enableval in
7318     yes)
7319       autodepend=yes
7320       ;;
7321     no)
7322       :
7323       ;;
7324     *)
7325       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7326       ;;
7327   esac
7328
7329 else
7330   enable_depend=no
7331
7332 fi
7333
7334
7335
7336
7337
7338 #
7339 # Enable assert checks
7340 #
7341
7342
7343 # Check whether --enable-cassert was given.
7344 if test "${enable_cassert+set}" = set; then :
7345   enableval=$enable_cassert;
7346   case $enableval in
7347     yes)
7348
7349 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7350
7351       ;;
7352     no)
7353       :
7354       ;;
7355     *)
7356       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7357       ;;
7358   esac
7359
7360 else
7361   enable_cassert=no
7362
7363 fi
7364
7365
7366
7367
7368 #
7369 # Include directories
7370 #
7371 ac_save_IFS=$IFS
7372 IFS="${IFS}${PATH_SEPARATOR}"
7373 # SRCH_INC comes from the template file
7374 for dir in $with_includes $SRCH_INC; do
7375   if test -d "$dir"; then
7376     INCLUDES="$INCLUDES -I$dir"
7377   else
7378     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7379 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7380   fi
7381 done
7382 IFS=$ac_save_IFS
7383
7384
7385
7386 #
7387 # Library directories
7388 #
7389 ac_save_IFS=$IFS
7390 IFS="${IFS}${PATH_SEPARATOR}"
7391 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7392 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7393   if test -d "$dir"; then
7394     LIBDIRS="$LIBDIRS -L$dir"
7395   else
7396     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7397 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7398   fi
7399 done
7400 IFS=$ac_save_IFS
7401
7402 #
7403 # Enable thread-safe client libraries
7404 #
7405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7406 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7407
7408
7409 # Check whether --enable-thread-safety was given.
7410 if test "${enable_thread_safety+set}" = set; then :
7411   enableval=$enable_thread_safety;
7412   case $enableval in
7413     yes)
7414       :
7415       ;;
7416     no)
7417       :
7418       ;;
7419     *)
7420       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7421       ;;
7422   esac
7423
7424 else
7425   enable_thread_safety=yes
7426
7427 fi
7428
7429
7430 if test "$enable_thread_safety" = yes; then
7431
7432 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7433
7434 fi
7435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7436 $as_echo "$enable_thread_safety" >&6; }
7437
7438
7439 #
7440 # ICU
7441 #
7442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7443 $as_echo_n "checking whether to build with ICU support... " >&6; }
7444
7445
7446
7447 # Check whether --with-icu was given.
7448 if test "${with_icu+set}" = set; then :
7449   withval=$with_icu;
7450   case $withval in
7451     yes)
7452
7453 $as_echo "#define USE_ICU 1" >>confdefs.h
7454
7455       ;;
7456     no)
7457       :
7458       ;;
7459     *)
7460       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7461       ;;
7462   esac
7463
7464 else
7465   with_icu=no
7466
7467 fi
7468
7469
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7471 $as_echo "$with_icu" >&6; }
7472
7473
7474 if test "$with_icu" = yes; then
7475
7476
7477
7478
7479
7480
7481
7482 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7483         if test -n "$ac_tool_prefix"; then
7484   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7485 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7487 $as_echo_n "checking for $ac_word... " >&6; }
7488 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7489   $as_echo_n "(cached) " >&6
7490 else
7491   case $PKG_CONFIG in
7492   [\\/]* | ?:[\\/]*)
7493   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7494   ;;
7495   *)
7496   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7497 for as_dir in $PATH
7498 do
7499   IFS=$as_save_IFS
7500   test -z "$as_dir" && as_dir=.
7501     for ac_exec_ext in '' $ac_executable_extensions; do
7502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7503     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7505     break 2
7506   fi
7507 done
7508   done
7509 IFS=$as_save_IFS
7510
7511   ;;
7512 esac
7513 fi
7514 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7515 if test -n "$PKG_CONFIG"; then
7516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7517 $as_echo "$PKG_CONFIG" >&6; }
7518 else
7519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7520 $as_echo "no" >&6; }
7521 fi
7522
7523
7524 fi
7525 if test -z "$ac_cv_path_PKG_CONFIG"; then
7526   ac_pt_PKG_CONFIG=$PKG_CONFIG
7527   # Extract the first word of "pkg-config", so it can be a program name with args.
7528 set dummy pkg-config; ac_word=$2
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7530 $as_echo_n "checking for $ac_word... " >&6; }
7531 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7532   $as_echo_n "(cached) " >&6
7533 else
7534   case $ac_pt_PKG_CONFIG in
7535   [\\/]* | ?:[\\/]*)
7536   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7537   ;;
7538   *)
7539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7540 for as_dir in $PATH
7541 do
7542   IFS=$as_save_IFS
7543   test -z "$as_dir" && as_dir=.
7544     for ac_exec_ext in '' $ac_executable_extensions; do
7545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7546     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7548     break 2
7549   fi
7550 done
7551   done
7552 IFS=$as_save_IFS
7553
7554   ;;
7555 esac
7556 fi
7557 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7558 if test -n "$ac_pt_PKG_CONFIG"; then
7559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7560 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7561 else
7562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7563 $as_echo "no" >&6; }
7564 fi
7565
7566   if test "x$ac_pt_PKG_CONFIG" = x; then
7567     PKG_CONFIG=""
7568   else
7569     case $cross_compiling:$ac_tool_warned in
7570 yes:)
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7572 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7573 ac_tool_warned=yes ;;
7574 esac
7575     PKG_CONFIG=$ac_pt_PKG_CONFIG
7576   fi
7577 else
7578   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7579 fi
7580
7581 fi
7582 if test -n "$PKG_CONFIG"; then
7583         _pkg_min_version=0.9.0
7584         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7585 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7586         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7587                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7588 $as_echo "yes" >&6; }
7589         else
7590                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7591 $as_echo "no" >&6; }
7592                 PKG_CONFIG=""
7593         fi
7594 fi
7595
7596 pkg_failed=no
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7598 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7599
7600 if test -n "$ICU_CFLAGS"; then
7601     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7602  elif test -n "$PKG_CONFIG"; then
7603     if test -n "$PKG_CONFIG" && \
7604     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7605   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7606   ac_status=$?
7607   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7608   test $ac_status = 0; }; then
7609   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7610                       test "x$?" != "x0" && pkg_failed=yes
7611 else
7612   pkg_failed=yes
7613 fi
7614  else
7615     pkg_failed=untried
7616 fi
7617 if test -n "$ICU_LIBS"; then
7618     pkg_cv_ICU_LIBS="$ICU_LIBS"
7619  elif test -n "$PKG_CONFIG"; then
7620     if test -n "$PKG_CONFIG" && \
7621     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7622   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7623   ac_status=$?
7624   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7625   test $ac_status = 0; }; then
7626   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7627                       test "x$?" != "x0" && pkg_failed=yes
7628 else
7629   pkg_failed=yes
7630 fi
7631  else
7632     pkg_failed=untried
7633 fi
7634
7635
7636
7637 if test $pkg_failed = yes; then
7638         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7639 $as_echo "no" >&6; }
7640
7641 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7642         _pkg_short_errors_supported=yes
7643 else
7644         _pkg_short_errors_supported=no
7645 fi
7646         if test $_pkg_short_errors_supported = yes; then
7647                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7648         else
7649                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7650         fi
7651         # Put the nasty error message in config.log where it belongs
7652         echo "$ICU_PKG_ERRORS" >&5
7653
7654         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7655
7656 $ICU_PKG_ERRORS
7657
7658 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7659 installed software in a non-standard prefix.
7660
7661 Alternatively, you may set the environment variables ICU_CFLAGS
7662 and ICU_LIBS to avoid the need to call pkg-config.
7663 See the pkg-config man page for more details." "$LINENO" 5
7664 elif test $pkg_failed = untried; then
7665         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7666 $as_echo "no" >&6; }
7667         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7668 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7669 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7670 is in your PATH or set the PKG_CONFIG environment variable to the full
7671 path to pkg-config.
7672
7673 Alternatively, you may set the environment variables ICU_CFLAGS
7674 and ICU_LIBS to avoid the need to call pkg-config.
7675 See the pkg-config man page for more details.
7676
7677 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7678 See \`config.log' for more details" "$LINENO" 5; }
7679 else
7680         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7681         ICU_LIBS=$pkg_cv_ICU_LIBS
7682         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7683 $as_echo "yes" >&6; }
7684
7685 fi
7686 fi
7687
7688 #
7689 # Optionally build Tcl modules (PL/Tcl)
7690 #
7691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7692 $as_echo_n "checking whether to build with Tcl... " >&6; }
7693
7694
7695
7696 # Check whether --with-tcl was given.
7697 if test "${with_tcl+set}" = set; then :
7698   withval=$with_tcl;
7699   case $withval in
7700     yes)
7701       :
7702       ;;
7703     no)
7704       :
7705       ;;
7706     *)
7707       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7708       ;;
7709   esac
7710
7711 else
7712   with_tcl=no
7713
7714 fi
7715
7716
7717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7718 $as_echo "$with_tcl" >&6; }
7719
7720
7721 # We see if the path to the Tcl/Tk configuration scripts is specified.
7722 # This will override the use of tclsh to find the paths to search.
7723
7724
7725
7726
7727 # Check whether --with-tclconfig was given.
7728 if test "${with_tclconfig+set}" = set; then :
7729   withval=$with_tclconfig;
7730   case $withval in
7731     yes)
7732       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7733       ;;
7734     no)
7735       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7736       ;;
7737     *)
7738
7739       ;;
7740   esac
7741
7742 fi
7743
7744
7745
7746 #
7747 # Optionally build Perl modules (PL/Perl)
7748 #
7749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7750 $as_echo_n "checking whether to build Perl modules... " >&6; }
7751
7752
7753
7754 # Check whether --with-perl was given.
7755 if test "${with_perl+set}" = set; then :
7756   withval=$with_perl;
7757   case $withval in
7758     yes)
7759       :
7760       ;;
7761     no)
7762       :
7763       ;;
7764     *)
7765       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7766       ;;
7767   esac
7768
7769 else
7770   with_perl=no
7771
7772 fi
7773
7774
7775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7776 $as_echo "$with_perl" >&6; }
7777
7778
7779 #
7780 # Optionally build Python modules (PL/Python)
7781 #
7782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7783 $as_echo_n "checking whether to build Python modules... " >&6; }
7784
7785
7786
7787 # Check whether --with-python was given.
7788 if test "${with_python+set}" = set; then :
7789   withval=$with_python;
7790   case $withval in
7791     yes)
7792       :
7793       ;;
7794     no)
7795       :
7796       ;;
7797     *)
7798       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7799       ;;
7800   esac
7801
7802 else
7803   with_python=no
7804
7805 fi
7806
7807
7808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7809 $as_echo "$with_python" >&6; }
7810
7811
7812 #
7813 # GSSAPI
7814 #
7815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7816 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7817
7818
7819
7820 # Check whether --with-gssapi was given.
7821 if test "${with_gssapi+set}" = set; then :
7822   withval=$with_gssapi;
7823   case $withval in
7824     yes)
7825
7826
7827 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7828
7829   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7830
7831       ;;
7832     no)
7833       :
7834       ;;
7835     *)
7836       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7837       ;;
7838   esac
7839
7840 else
7841   with_gssapi=no
7842
7843 fi
7844
7845
7846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7847 $as_echo "$with_gssapi" >&6; }
7848
7849
7850
7851
7852
7853
7854 #
7855 # Kerberos configuration parameters
7856 #
7857
7858
7859
7860 # Check whether --with-krb-srvnam was given.
7861 if test "${with_krb_srvnam+set}" = set; then :
7862   withval=$with_krb_srvnam;
7863   case $withval in
7864     yes)
7865       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7866       ;;
7867     no)
7868       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7869       ;;
7870     *)
7871
7872       ;;
7873   esac
7874
7875 else
7876   with_krb_srvnam="postgres"
7877 fi
7878
7879
7880
7881
7882 cat >>confdefs.h <<_ACEOF
7883 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7884 _ACEOF
7885
7886
7887
7888 #
7889 # PAM
7890 #
7891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7892 $as_echo_n "checking whether to build with PAM support... " >&6; }
7893
7894
7895
7896 # Check whether --with-pam was given.
7897 if test "${with_pam+set}" = set; then :
7898   withval=$with_pam;
7899   case $withval in
7900     yes)
7901
7902 $as_echo "#define USE_PAM 1" >>confdefs.h
7903
7904       ;;
7905     no)
7906       :
7907       ;;
7908     *)
7909       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7910       ;;
7911   esac
7912
7913 else
7914   with_pam=no
7915
7916 fi
7917
7918
7919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7920 $as_echo "$with_pam" >&6; }
7921
7922
7923 #
7924 # BSD AUTH
7925 #
7926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7927 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7928
7929
7930
7931 # Check whether --with-bsd-auth was given.
7932 if test "${with_bsd_auth+set}" = set; then :
7933   withval=$with_bsd_auth;
7934   case $withval in
7935     yes)
7936
7937 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7938
7939       ;;
7940     no)
7941       :
7942       ;;
7943     *)
7944       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7945       ;;
7946   esac
7947
7948 else
7949   with_bsd_auth=no
7950
7951 fi
7952
7953
7954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7955 $as_echo "$with_bsd_auth" >&6; }
7956
7957
7958 #
7959 # LDAP
7960 #
7961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7962 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7963
7964
7965
7966 # Check whether --with-ldap was given.
7967 if test "${with_ldap+set}" = set; then :
7968   withval=$with_ldap;
7969   case $withval in
7970     yes)
7971
7972 $as_echo "#define USE_LDAP 1" >>confdefs.h
7973
7974       ;;
7975     no)
7976       :
7977       ;;
7978     *)
7979       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7980       ;;
7981   esac
7982
7983 else
7984   with_ldap=no
7985
7986 fi
7987
7988
7989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7990 $as_echo "$with_ldap" >&6; }
7991
7992
7993
7994 #
7995 # Bonjour
7996 #
7997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7998 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7999
8000
8001
8002 # Check whether --with-bonjour was given.
8003 if test "${with_bonjour+set}" = set; then :
8004   withval=$with_bonjour;
8005   case $withval in
8006     yes)
8007
8008 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8009
8010       ;;
8011     no)
8012       :
8013       ;;
8014     *)
8015       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8016       ;;
8017   esac
8018
8019 else
8020   with_bonjour=no
8021
8022 fi
8023
8024
8025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8026 $as_echo "$with_bonjour" >&6; }
8027
8028
8029 #
8030 # OpenSSL
8031 #
8032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
8033 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
8034
8035
8036
8037 # Check whether --with-openssl was given.
8038 if test "${with_openssl+set}" = set; then :
8039   withval=$with_openssl;
8040   case $withval in
8041     yes)
8042
8043 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
8044
8045       ;;
8046     no)
8047       :
8048       ;;
8049     *)
8050       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
8051       ;;
8052   esac
8053
8054 else
8055   with_openssl=no
8056
8057 fi
8058
8059
8060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
8061 $as_echo "$with_openssl" >&6; }
8062
8063
8064 #
8065 # SELinux
8066 #
8067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8068 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8069
8070
8071
8072 # Check whether --with-selinux was given.
8073 if test "${with_selinux+set}" = set; then :
8074   withval=$with_selinux;
8075   case $withval in
8076     yes)
8077       :
8078       ;;
8079     no)
8080       :
8081       ;;
8082     *)
8083       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8084       ;;
8085   esac
8086
8087 else
8088   with_selinux=no
8089
8090 fi
8091
8092
8093
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8095 $as_echo "$with_selinux" >&6; }
8096
8097 #
8098 # Systemd
8099 #
8100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8101 $as_echo_n "checking whether to build with systemd support... " >&6; }
8102
8103
8104
8105 # Check whether --with-systemd was given.
8106 if test "${with_systemd+set}" = set; then :
8107   withval=$with_systemd;
8108   case $withval in
8109     yes)
8110
8111 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8112
8113       ;;
8114     no)
8115       :
8116       ;;
8117     *)
8118       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8119       ;;
8120   esac
8121
8122 else
8123   with_systemd=no
8124
8125 fi
8126
8127
8128
8129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8130 $as_echo "$with_systemd" >&6; }
8131
8132 #
8133 # Readline
8134 #
8135
8136
8137
8138 # Check whether --with-readline was given.
8139 if test "${with_readline+set}" = set; then :
8140   withval=$with_readline;
8141   case $withval in
8142     yes)
8143       :
8144       ;;
8145     no)
8146       :
8147       ;;
8148     *)
8149       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8150       ;;
8151   esac
8152
8153 else
8154   with_readline=yes
8155
8156 fi
8157
8158
8159 # readline on MinGW has problems with backslashes in psql and other bugs.
8160 # This is particularly a problem with non-US code pages.
8161 # Therefore disable its use until we understand the cause. 2004-07-20
8162 if test "$PORTNAME" = "win32"; then
8163   if test "$with_readline" = yes; then
8164     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8165 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8166     with_readline=no
8167   fi
8168 fi
8169
8170
8171 #
8172 # Prefer libedit
8173 #
8174
8175
8176
8177 # Check whether --with-libedit-preferred was given.
8178 if test "${with_libedit_preferred+set}" = set; then :
8179   withval=$with_libedit_preferred;
8180   case $withval in
8181     yes)
8182       :
8183       ;;
8184     no)
8185       :
8186       ;;
8187     *)
8188       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8189       ;;
8190   esac
8191
8192 else
8193   with_libedit_preferred=no
8194
8195 fi
8196
8197
8198
8199
8200 #
8201 # UUID library
8202 #
8203 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8204 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8205 # UUID library.  More than one of these might be present on a given platform,
8206 # so we make the user say which one she wants.
8207 #
8208
8209
8210
8211 # Check whether --with-uuid was given.
8212 if test "${with_uuid+set}" = set; then :
8213   withval=$with_uuid;
8214   case $withval in
8215     yes)
8216       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8217       ;;
8218     no)
8219       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8220       ;;
8221     *)
8222
8223       ;;
8224   esac
8225
8226 fi
8227
8228
8229 if test x"$with_uuid" = x"" ; then
8230   with_uuid=no
8231 fi
8232
8233
8234
8235 # Check whether --with-ossp-uuid was given.
8236 if test "${with_ossp_uuid+set}" = set; then :
8237   withval=$with_ossp_uuid;
8238   case $withval in
8239     yes)
8240       :
8241       ;;
8242     no)
8243       :
8244       ;;
8245     *)
8246       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8247       ;;
8248   esac
8249
8250 else
8251   with_ossp_uuid=no
8252
8253 fi
8254
8255
8256 if test "$with_ossp_uuid" = yes ; then
8257   with_uuid=ossp
8258 fi
8259
8260 if test "$with_uuid" = bsd ; then
8261
8262 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8263
8264   UUID_EXTRA_OBJS="md5.o sha1.o"
8265 elif test "$with_uuid" = e2fs ; then
8266
8267 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8268
8269   UUID_EXTRA_OBJS="md5.o sha1.o"
8270 elif test "$with_uuid" = ossp ; then
8271
8272 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8273
8274   UUID_EXTRA_OBJS=""
8275 elif test "$with_uuid" = no ; then
8276   UUID_EXTRA_OBJS=""
8277 else
8278   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8279 fi
8280
8281
8282
8283
8284 #
8285 # XML
8286 #
8287
8288
8289
8290 # Check whether --with-libxml was given.
8291 if test "${with_libxml+set}" = set; then :
8292   withval=$with_libxml;
8293   case $withval in
8294     yes)
8295
8296 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8297
8298       ;;
8299     no)
8300       :
8301       ;;
8302     *)
8303       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8304       ;;
8305   esac
8306
8307 else
8308   with_libxml=no
8309
8310 fi
8311
8312
8313
8314 if test "$with_libxml" = yes ; then
8315   if test -z "$XML2_CONFIG"; then
8316   for ac_prog in xml2-config
8317 do
8318   # Extract the first word of "$ac_prog", so it can be a program name with args.
8319 set dummy $ac_prog; ac_word=$2
8320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8321 $as_echo_n "checking for $ac_word... " >&6; }
8322 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8323   $as_echo_n "(cached) " >&6
8324 else
8325   case $XML2_CONFIG in
8326   [\\/]* | ?:[\\/]*)
8327   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8328   ;;
8329   *)
8330   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8331 for as_dir in $PATH
8332 do
8333   IFS=$as_save_IFS
8334   test -z "$as_dir" && as_dir=.
8335     for ac_exec_ext in '' $ac_executable_extensions; do
8336   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8337     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8339     break 2
8340   fi
8341 done
8342   done
8343 IFS=$as_save_IFS
8344
8345   ;;
8346 esac
8347 fi
8348 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8349 if test -n "$XML2_CONFIG"; then
8350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8351 $as_echo "$XML2_CONFIG" >&6; }
8352 else
8353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8354 $as_echo "no" >&6; }
8355 fi
8356
8357
8358   test -n "$XML2_CONFIG" && break
8359 done
8360
8361 else
8362   # Report the value of XML2_CONFIG in configure's output in all cases.
8363   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8364 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8366 $as_echo "$XML2_CONFIG" >&6; }
8367 fi
8368
8369   if test -n "$XML2_CONFIG"; then
8370     for pgac_option in `$XML2_CONFIG --cflags`; do
8371       case $pgac_option in
8372         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8373       esac
8374     done
8375     for pgac_option in `$XML2_CONFIG --libs`; do
8376       case $pgac_option in
8377         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8378       esac
8379     done
8380   fi
8381 fi
8382
8383
8384
8385 #
8386 # XSLT
8387 #
8388
8389
8390
8391 # Check whether --with-libxslt was given.
8392 if test "${with_libxslt+set}" = set; then :
8393   withval=$with_libxslt;
8394   case $withval in
8395     yes)
8396
8397 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8398
8399       ;;
8400     no)
8401       :
8402       ;;
8403     *)
8404       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8405       ;;
8406   esac
8407
8408 else
8409   with_libxslt=no
8410
8411 fi
8412
8413
8414
8415
8416
8417
8418 #
8419 # tzdata
8420 #
8421
8422
8423
8424 # Check whether --with-system-tzdata was given.
8425 if test "${with_system_tzdata+set}" = set; then :
8426   withval=$with_system_tzdata;
8427   case $withval in
8428     yes)
8429       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8430       ;;
8431     no)
8432       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8433       ;;
8434     *)
8435
8436       ;;
8437   esac
8438
8439 fi
8440
8441
8442
8443
8444 #
8445 # Zlib
8446 #
8447
8448
8449
8450 # Check whether --with-zlib was given.
8451 if test "${with_zlib+set}" = set; then :
8452   withval=$with_zlib;
8453   case $withval in
8454     yes)
8455       :
8456       ;;
8457     no)
8458       :
8459       ;;
8460     *)
8461       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8462       ;;
8463   esac
8464
8465 else
8466   with_zlib=yes
8467
8468 fi
8469
8470
8471
8472
8473 #
8474 # Elf
8475 #
8476
8477 # Assume system is ELF if it predefines __ELF__ as 1,
8478 # otherwise believe host_os based default.
8479 case $host_os in
8480     freebsd1*|freebsd2*) elf=no;;
8481     freebsd3*|freebsd4*) elf=yes;;
8482 esac
8483
8484
8485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8486 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8487 if ${ac_cv_path_GREP+:} false; then :
8488   $as_echo_n "(cached) " >&6
8489 else
8490   if test -z "$GREP"; then
8491   ac_path_GREP_found=false
8492   # Loop through the user's path and test for each of PROGNAME-LIST
8493   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8494 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8495 do
8496   IFS=$as_save_IFS
8497   test -z "$as_dir" && as_dir=.
8498     for ac_prog in grep ggrep; do
8499     for ac_exec_ext in '' $ac_executable_extensions; do
8500       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8501       as_fn_executable_p "$ac_path_GREP" || continue
8502 # Check for GNU ac_path_GREP and select it if it is found.
8503   # Check for GNU $ac_path_GREP
8504 case `"$ac_path_GREP" --version 2>&1` in
8505 *GNU*)
8506   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8507 *)
8508   ac_count=0
8509   $as_echo_n 0123456789 >"conftest.in"
8510   while :
8511   do
8512     cat "conftest.in" "conftest.in" >"conftest.tmp"
8513     mv "conftest.tmp" "conftest.in"
8514     cp "conftest.in" "conftest.nl"
8515     $as_echo 'GREP' >> "conftest.nl"
8516     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8517     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8518     as_fn_arith $ac_count + 1 && ac_count=$as_val
8519     if test $ac_count -gt ${ac_path_GREP_max-0}; then
8520       # Best one so far, save it but keep looking for a better one
8521       ac_cv_path_GREP="$ac_path_GREP"
8522       ac_path_GREP_max=$ac_count
8523     fi
8524     # 10*(2^10) chars as input seems more than enough
8525     test $ac_count -gt 10 && break
8526   done
8527   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8528 esac
8529
8530       $ac_path_GREP_found && break 3
8531     done
8532   done
8533   done
8534 IFS=$as_save_IFS
8535   if test -z "$ac_cv_path_GREP"; then
8536     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8537   fi
8538 else
8539   ac_cv_path_GREP=$GREP
8540 fi
8541
8542 fi
8543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8544 $as_echo "$ac_cv_path_GREP" >&6; }
8545  GREP="$ac_cv_path_GREP"
8546
8547
8548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8549 $as_echo_n "checking for egrep... " >&6; }
8550 if ${ac_cv_path_EGREP+:} false; then :
8551   $as_echo_n "(cached) " >&6
8552 else
8553   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8554    then ac_cv_path_EGREP="$GREP -E"
8555    else
8556      if test -z "$EGREP"; then
8557   ac_path_EGREP_found=false
8558   # Loop through the user's path and test for each of PROGNAME-LIST
8559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8560 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8561 do
8562   IFS=$as_save_IFS
8563   test -z "$as_dir" && as_dir=.
8564     for ac_prog in egrep; do
8565     for ac_exec_ext in '' $ac_executable_extensions; do
8566       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8567       as_fn_executable_p "$ac_path_EGREP" || continue
8568 # Check for GNU ac_path_EGREP and select it if it is found.
8569   # Check for GNU $ac_path_EGREP
8570 case `"$ac_path_EGREP" --version 2>&1` in
8571 *GNU*)
8572   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8573 *)
8574   ac_count=0
8575   $as_echo_n 0123456789 >"conftest.in"
8576   while :
8577   do
8578     cat "conftest.in" "conftest.in" >"conftest.tmp"
8579     mv "conftest.tmp" "conftest.in"
8580     cp "conftest.in" "conftest.nl"
8581     $as_echo 'EGREP' >> "conftest.nl"
8582     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8583     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8584     as_fn_arith $ac_count + 1 && ac_count=$as_val
8585     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8586       # Best one so far, save it but keep looking for a better one
8587       ac_cv_path_EGREP="$ac_path_EGREP"
8588       ac_path_EGREP_max=$ac_count
8589     fi
8590     # 10*(2^10) chars as input seems more than enough
8591     test $ac_count -gt 10 && break
8592   done
8593   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8594 esac
8595
8596       $ac_path_EGREP_found && break 3
8597     done
8598   done
8599   done
8600 IFS=$as_save_IFS
8601   if test -z "$ac_cv_path_EGREP"; then
8602     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8603   fi
8604 else
8605   ac_cv_path_EGREP=$EGREP
8606 fi
8607
8608    fi
8609 fi
8610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8611 $as_echo "$ac_cv_path_EGREP" >&6; }
8612  EGREP="$ac_cv_path_EGREP"
8613
8614
8615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8616 /* end confdefs.h.  */
8617 #if __ELF__
8618   yes
8619 #endif
8620
8621 _ACEOF
8622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8623   $EGREP "yes" >/dev/null 2>&1; then :
8624   ELF_SYS=true
8625 else
8626   if test "X$elf" = "Xyes" ; then
8627   ELF_SYS=true
8628 else
8629   ELF_SYS=
8630 fi
8631 fi
8632 rm -f conftest*
8633
8634
8635
8636 #
8637 # Assignments
8638 #
8639
8640 CPPFLAGS="$CPPFLAGS $INCLUDES"
8641 LDFLAGS="$LDFLAGS $LIBDIRS"
8642
8643
8644
8645
8646
8647 # Check whether --with-gnu-ld was given.
8648 if test "${with_gnu_ld+set}" = set; then :
8649   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8650 else
8651   with_gnu_ld=no
8652 fi
8653
8654 ac_prog=ld
8655 if test "$GCC" = yes; then
8656   # Check if gcc -print-prog-name=ld gives a path.
8657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8658 $as_echo_n "checking for ld used by GCC... " >&6; }
8659   case $host in
8660   *-*-mingw*)
8661     # gcc leaves a trailing carriage return which upsets mingw
8662     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8663   *)
8664     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8665   esac
8666   case "$ac_prog" in
8667     # Accept absolute paths.
8668     [\\/]* | [A-Za-z]:[\\/]*)
8669       re_direlt='/[^/][^/]*/\.\./'
8670       # Canonicalize the path of ld
8671       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8672       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8673         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8674       done
8675       test -z "$LD" && LD="$ac_prog"
8676       ;;
8677   "")
8678     # If it fails, then pretend we aren't using GCC.
8679     ac_prog=ld
8680     ;;
8681   *)
8682     # If it is relative, then search for the first ld in PATH.
8683     with_gnu_ld=unknown
8684     ;;
8685   esac
8686 elif test "$with_gnu_ld" = yes; then
8687   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8688 $as_echo_n "checking for GNU ld... " >&6; }
8689 else
8690   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8691 $as_echo_n "checking for non-GNU ld... " >&6; }
8692 fi
8693 if ${ac_cv_path_LD+:} false; then :
8694   $as_echo_n "(cached) " >&6
8695 else
8696   if test -z "$LD"; then
8697   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8698   for ac_dir in $PATH; do
8699     test -z "$ac_dir" && ac_dir=.
8700     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8701       ac_cv_path_LD="$ac_dir/$ac_prog"
8702       # Check to see if the program is GNU ld.  I'd rather use --version,
8703       # but apparently some GNU ld's only accept -v.
8704       # Break only if it was the GNU/non-GNU ld that we prefer.
8705       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8706         test "$with_gnu_ld" != no && break
8707       else
8708         test "$with_gnu_ld" != yes && break
8709       fi
8710     fi
8711   done
8712   IFS="$ac_save_ifs"
8713 else
8714   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8715 fi
8716 fi
8717
8718 LD="$ac_cv_path_LD"
8719 if test -n "$LD"; then
8720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8721 $as_echo "$LD" >&6; }
8722 else
8723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8724 $as_echo "no" >&6; }
8725 fi
8726 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8728 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8729 if ${ac_cv_prog_gnu_ld+:} false; then :
8730   $as_echo_n "(cached) " >&6
8731 else
8732   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8733 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8734   ac_cv_prog_gnu_ld=yes
8735 else
8736   ac_cv_prog_gnu_ld=no
8737 fi
8738 fi
8739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8740 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8741 with_gnu_ld=$ac_cv_prog_gnu_ld
8742
8743
8744
8745
8746 if test -n "$ac_tool_prefix"; then
8747   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8748 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8750 $as_echo_n "checking for $ac_word... " >&6; }
8751 if ${ac_cv_prog_RANLIB+:} false; then :
8752   $as_echo_n "(cached) " >&6
8753 else
8754   if test -n "$RANLIB"; then
8755   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8756 else
8757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8758 for as_dir in $PATH
8759 do
8760   IFS=$as_save_IFS
8761   test -z "$as_dir" && as_dir=.
8762     for ac_exec_ext in '' $ac_executable_extensions; do
8763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8764     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8766     break 2
8767   fi
8768 done
8769   done
8770 IFS=$as_save_IFS
8771
8772 fi
8773 fi
8774 RANLIB=$ac_cv_prog_RANLIB
8775 if test -n "$RANLIB"; then
8776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8777 $as_echo "$RANLIB" >&6; }
8778 else
8779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8780 $as_echo "no" >&6; }
8781 fi
8782
8783
8784 fi
8785 if test -z "$ac_cv_prog_RANLIB"; then
8786   ac_ct_RANLIB=$RANLIB
8787   # Extract the first word of "ranlib", so it can be a program name with args.
8788 set dummy ranlib; ac_word=$2
8789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8790 $as_echo_n "checking for $ac_word... " >&6; }
8791 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8792   $as_echo_n "(cached) " >&6
8793 else
8794   if test -n "$ac_ct_RANLIB"; then
8795   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8796 else
8797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8798 for as_dir in $PATH
8799 do
8800   IFS=$as_save_IFS
8801   test -z "$as_dir" && as_dir=.
8802     for ac_exec_ext in '' $ac_executable_extensions; do
8803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8804     ac_cv_prog_ac_ct_RANLIB="ranlib"
8805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8806     break 2
8807   fi
8808 done
8809   done
8810 IFS=$as_save_IFS
8811
8812 fi
8813 fi
8814 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8815 if test -n "$ac_ct_RANLIB"; then
8816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8817 $as_echo "$ac_ct_RANLIB" >&6; }
8818 else
8819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8820 $as_echo "no" >&6; }
8821 fi
8822
8823   if test "x$ac_ct_RANLIB" = x; then
8824     RANLIB=":"
8825   else
8826     case $cross_compiling:$ac_tool_warned in
8827 yes:)
8828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8829 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8830 ac_tool_warned=yes ;;
8831 esac
8832     RANLIB=$ac_ct_RANLIB
8833   fi
8834 else
8835   RANLIB="$ac_cv_prog_RANLIB"
8836 fi
8837
8838
8839   if test -n "$ac_tool_prefix"; then
8840   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8841 set dummy ${ac_tool_prefix}strip; ac_word=$2
8842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8843 $as_echo_n "checking for $ac_word... " >&6; }
8844 if ${ac_cv_prog_STRIP+:} false; then :
8845   $as_echo_n "(cached) " >&6
8846 else
8847   if test -n "$STRIP"; then
8848   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8849 else
8850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8851 for as_dir in $PATH
8852 do
8853   IFS=$as_save_IFS
8854   test -z "$as_dir" && as_dir=.
8855     for ac_exec_ext in '' $ac_executable_extensions; do
8856   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8857     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8858     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8859     break 2
8860   fi
8861 done
8862   done
8863 IFS=$as_save_IFS
8864
8865 fi
8866 fi
8867 STRIP=$ac_cv_prog_STRIP
8868 if test -n "$STRIP"; then
8869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8870 $as_echo "$STRIP" >&6; }
8871 else
8872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8873 $as_echo "no" >&6; }
8874 fi
8875
8876
8877 fi
8878 if test -z "$ac_cv_prog_STRIP"; then
8879   ac_ct_STRIP=$STRIP
8880   # Extract the first word of "strip", so it can be a program name with args.
8881 set dummy strip; ac_word=$2
8882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8883 $as_echo_n "checking for $ac_word... " >&6; }
8884 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8885   $as_echo_n "(cached) " >&6
8886 else
8887   if test -n "$ac_ct_STRIP"; then
8888   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8889 else
8890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8891 for as_dir in $PATH
8892 do
8893   IFS=$as_save_IFS
8894   test -z "$as_dir" && as_dir=.
8895     for ac_exec_ext in '' $ac_executable_extensions; do
8896   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8897     ac_cv_prog_ac_ct_STRIP="strip"
8898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8899     break 2
8900   fi
8901 done
8902   done
8903 IFS=$as_save_IFS
8904
8905 fi
8906 fi
8907 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8908 if test -n "$ac_ct_STRIP"; then
8909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8910 $as_echo "$ac_ct_STRIP" >&6; }
8911 else
8912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8913 $as_echo "no" >&6; }
8914 fi
8915
8916   if test "x$ac_ct_STRIP" = x; then
8917     STRIP=":"
8918   else
8919     case $cross_compiling:$ac_tool_warned in
8920 yes:)
8921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8922 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8923 ac_tool_warned=yes ;;
8924 esac
8925     STRIP=$ac_ct_STRIP
8926   fi
8927 else
8928   STRIP="$ac_cv_prog_STRIP"
8929 fi
8930
8931
8932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8933 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8934   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8935     STRIP_STATIC_LIB="$STRIP -x"
8936     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8937     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8938 $as_echo "yes" >&6; }
8939   else
8940     case $host_os in
8941       darwin*)
8942         STRIP="$STRIP -x"
8943         STRIP_STATIC_LIB=$STRIP
8944         STRIP_SHARED_LIB=$STRIP
8945         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8946 $as_echo "yes" >&6; }
8947         ;;
8948       *)
8949         STRIP_STATIC_LIB=:
8950         STRIP_SHARED_LIB=:
8951         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8952 $as_echo "no" >&6; }
8953         ;;
8954     esac
8955   fi
8956
8957
8958
8959 if test -n "$ac_tool_prefix"; then
8960   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8961 set dummy ${ac_tool_prefix}ar; ac_word=$2
8962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8963 $as_echo_n "checking for $ac_word... " >&6; }
8964 if ${ac_cv_prog_AR+:} false; then :
8965   $as_echo_n "(cached) " >&6
8966 else
8967   if test -n "$AR"; then
8968   ac_cv_prog_AR="$AR" # Let the user override the test.
8969 else
8970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8971 for as_dir in $PATH
8972 do
8973   IFS=$as_save_IFS
8974   test -z "$as_dir" && as_dir=.
8975     for ac_exec_ext in '' $ac_executable_extensions; do
8976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8977     ac_cv_prog_AR="${ac_tool_prefix}ar"
8978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8979     break 2
8980   fi
8981 done
8982   done
8983 IFS=$as_save_IFS
8984
8985 fi
8986 fi
8987 AR=$ac_cv_prog_AR
8988 if test -n "$AR"; then
8989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8990 $as_echo "$AR" >&6; }
8991 else
8992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8993 $as_echo "no" >&6; }
8994 fi
8995
8996
8997 fi
8998 if test -z "$ac_cv_prog_AR"; then
8999   ac_ct_AR=$AR
9000   # Extract the first word of "ar", so it can be a program name with args.
9001 set dummy ar; ac_word=$2
9002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9003 $as_echo_n "checking for $ac_word... " >&6; }
9004 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9005   $as_echo_n "(cached) " >&6
9006 else
9007   if test -n "$ac_ct_AR"; then
9008   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9009 else
9010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9011 for as_dir in $PATH
9012 do
9013   IFS=$as_save_IFS
9014   test -z "$as_dir" && as_dir=.
9015     for ac_exec_ext in '' $ac_executable_extensions; do
9016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9017     ac_cv_prog_ac_ct_AR="ar"
9018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9019     break 2
9020   fi
9021 done
9022   done
9023 IFS=$as_save_IFS
9024
9025 fi
9026 fi
9027 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9028 if test -n "$ac_ct_AR"; then
9029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9030 $as_echo "$ac_ct_AR" >&6; }
9031 else
9032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9033 $as_echo "no" >&6; }
9034 fi
9035
9036   if test "x$ac_ct_AR" = x; then
9037     AR="ar"
9038   else
9039     case $cross_compiling:$ac_tool_warned in
9040 yes:)
9041 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9042 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9043 ac_tool_warned=yes ;;
9044 esac
9045     AR=$ac_ct_AR
9046   fi
9047 else
9048   AR="$ac_cv_prog_AR"
9049 fi
9050
9051 if test "$PORTNAME" = "win32"; then
9052   if test -n "$ac_tool_prefix"; then
9053   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9054 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9056 $as_echo_n "checking for $ac_word... " >&6; }
9057 if ${ac_cv_prog_DLLTOOL+:} false; then :
9058   $as_echo_n "(cached) " >&6
9059 else
9060   if test -n "$DLLTOOL"; then
9061   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9062 else
9063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9064 for as_dir in $PATH
9065 do
9066   IFS=$as_save_IFS
9067   test -z "$as_dir" && as_dir=.
9068     for ac_exec_ext in '' $ac_executable_extensions; do
9069   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9070     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9071     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9072     break 2
9073   fi
9074 done
9075   done
9076 IFS=$as_save_IFS
9077
9078 fi
9079 fi
9080 DLLTOOL=$ac_cv_prog_DLLTOOL
9081 if test -n "$DLLTOOL"; then
9082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9083 $as_echo "$DLLTOOL" >&6; }
9084 else
9085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9086 $as_echo "no" >&6; }
9087 fi
9088
9089
9090 fi
9091 if test -z "$ac_cv_prog_DLLTOOL"; then
9092   ac_ct_DLLTOOL=$DLLTOOL
9093   # Extract the first word of "dlltool", so it can be a program name with args.
9094 set dummy dlltool; ac_word=$2
9095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9096 $as_echo_n "checking for $ac_word... " >&6; }
9097 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9098   $as_echo_n "(cached) " >&6
9099 else
9100   if test -n "$ac_ct_DLLTOOL"; then
9101   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9102 else
9103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9104 for as_dir in $PATH
9105 do
9106   IFS=$as_save_IFS
9107   test -z "$as_dir" && as_dir=.
9108     for ac_exec_ext in '' $ac_executable_extensions; do
9109   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9110     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9111     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9112     break 2
9113   fi
9114 done
9115   done
9116 IFS=$as_save_IFS
9117
9118 fi
9119 fi
9120 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9121 if test -n "$ac_ct_DLLTOOL"; then
9122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9123 $as_echo "$ac_ct_DLLTOOL" >&6; }
9124 else
9125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9126 $as_echo "no" >&6; }
9127 fi
9128
9129   if test "x$ac_ct_DLLTOOL" = x; then
9130     DLLTOOL="dlltool"
9131   else
9132     case $cross_compiling:$ac_tool_warned in
9133 yes:)
9134 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9135 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9136 ac_tool_warned=yes ;;
9137 esac
9138     DLLTOOL=$ac_ct_DLLTOOL
9139   fi
9140 else
9141   DLLTOOL="$ac_cv_prog_DLLTOOL"
9142 fi
9143
9144   if test -n "$ac_tool_prefix"; then
9145   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9146 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9148 $as_echo_n "checking for $ac_word... " >&6; }
9149 if ${ac_cv_prog_DLLWRAP+:} false; then :
9150   $as_echo_n "(cached) " >&6
9151 else
9152   if test -n "$DLLWRAP"; then
9153   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9154 else
9155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9156 for as_dir in $PATH
9157 do
9158   IFS=$as_save_IFS
9159   test -z "$as_dir" && as_dir=.
9160     for ac_exec_ext in '' $ac_executable_extensions; do
9161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9162     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9164     break 2
9165   fi
9166 done
9167   done
9168 IFS=$as_save_IFS
9169
9170 fi
9171 fi
9172 DLLWRAP=$ac_cv_prog_DLLWRAP
9173 if test -n "$DLLWRAP"; then
9174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9175 $as_echo "$DLLWRAP" >&6; }
9176 else
9177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9178 $as_echo "no" >&6; }
9179 fi
9180
9181
9182 fi
9183 if test -z "$ac_cv_prog_DLLWRAP"; then
9184   ac_ct_DLLWRAP=$DLLWRAP
9185   # Extract the first word of "dllwrap", so it can be a program name with args.
9186 set dummy dllwrap; ac_word=$2
9187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9188 $as_echo_n "checking for $ac_word... " >&6; }
9189 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9190   $as_echo_n "(cached) " >&6
9191 else
9192   if test -n "$ac_ct_DLLWRAP"; then
9193   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9194 else
9195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9196 for as_dir in $PATH
9197 do
9198   IFS=$as_save_IFS
9199   test -z "$as_dir" && as_dir=.
9200     for ac_exec_ext in '' $ac_executable_extensions; do
9201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9202     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9204     break 2
9205   fi
9206 done
9207   done
9208 IFS=$as_save_IFS
9209
9210 fi
9211 fi
9212 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9213 if test -n "$ac_ct_DLLWRAP"; then
9214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9215 $as_echo "$ac_ct_DLLWRAP" >&6; }
9216 else
9217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9218 $as_echo "no" >&6; }
9219 fi
9220
9221   if test "x$ac_ct_DLLWRAP" = x; then
9222     DLLWRAP="dllwrap"
9223   else
9224     case $cross_compiling:$ac_tool_warned in
9225 yes:)
9226 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9227 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9228 ac_tool_warned=yes ;;
9229 esac
9230     DLLWRAP=$ac_ct_DLLWRAP
9231   fi
9232 else
9233   DLLWRAP="$ac_cv_prog_DLLWRAP"
9234 fi
9235
9236   if test -n "$ac_tool_prefix"; then
9237   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9238 set dummy ${ac_tool_prefix}windres; ac_word=$2
9239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9240 $as_echo_n "checking for $ac_word... " >&6; }
9241 if ${ac_cv_prog_WINDRES+:} false; then :
9242   $as_echo_n "(cached) " >&6
9243 else
9244   if test -n "$WINDRES"; then
9245   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9246 else
9247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9248 for as_dir in $PATH
9249 do
9250   IFS=$as_save_IFS
9251   test -z "$as_dir" && as_dir=.
9252     for ac_exec_ext in '' $ac_executable_extensions; do
9253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9254     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9256     break 2
9257   fi
9258 done
9259   done
9260 IFS=$as_save_IFS
9261
9262 fi
9263 fi
9264 WINDRES=$ac_cv_prog_WINDRES
9265 if test -n "$WINDRES"; then
9266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9267 $as_echo "$WINDRES" >&6; }
9268 else
9269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9270 $as_echo "no" >&6; }
9271 fi
9272
9273
9274 fi
9275 if test -z "$ac_cv_prog_WINDRES"; then
9276   ac_ct_WINDRES=$WINDRES
9277   # Extract the first word of "windres", so it can be a program name with args.
9278 set dummy windres; ac_word=$2
9279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9280 $as_echo_n "checking for $ac_word... " >&6; }
9281 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9282   $as_echo_n "(cached) " >&6
9283 else
9284   if test -n "$ac_ct_WINDRES"; then
9285   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9286 else
9287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9288 for as_dir in $PATH
9289 do
9290   IFS=$as_save_IFS
9291   test -z "$as_dir" && as_dir=.
9292     for ac_exec_ext in '' $ac_executable_extensions; do
9293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9294     ac_cv_prog_ac_ct_WINDRES="windres"
9295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9296     break 2
9297   fi
9298 done
9299   done
9300 IFS=$as_save_IFS
9301
9302 fi
9303 fi
9304 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9305 if test -n "$ac_ct_WINDRES"; then
9306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9307 $as_echo "$ac_ct_WINDRES" >&6; }
9308 else
9309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9310 $as_echo "no" >&6; }
9311 fi
9312
9313   if test "x$ac_ct_WINDRES" = x; then
9314     WINDRES="windres"
9315   else
9316     case $cross_compiling:$ac_tool_warned in
9317 yes:)
9318 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9319 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9320 ac_tool_warned=yes ;;
9321 esac
9322     WINDRES=$ac_ct_WINDRES
9323   fi
9324 else
9325   WINDRES="$ac_cv_prog_WINDRES"
9326 fi
9327
9328 fi
9329
9330 # Find a good install program.  We prefer a C program (faster),
9331 # so one script is as good as another.  But avoid the broken or
9332 # incompatible versions:
9333 # SysV /etc/install, /usr/sbin/install
9334 # SunOS /usr/etc/install
9335 # IRIX /sbin/install
9336 # AIX /bin/install
9337 # AmigaOS /C/install, which installs bootblocks on floppy discs
9338 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9339 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9340 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9341 # OS/2's system install, which has a completely different semantic
9342 # ./install, which can be erroneously created by make from ./install.sh.
9343 # Reject install programs that cannot install multiple files.
9344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9345 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9346 if test -z "$INSTALL"; then
9347 if ${ac_cv_path_install+:} false; then :
9348   $as_echo_n "(cached) " >&6
9349 else
9350   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9351 for as_dir in $PATH
9352 do
9353   IFS=$as_save_IFS
9354   test -z "$as_dir" && as_dir=.
9355     # Account for people who put trailing slashes in PATH elements.
9356 case $as_dir/ in #((
9357   ./ | .// | /[cC]/* | \
9358   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9359   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9360   /usr/ucb/* ) ;;
9361   *)
9362     # OSF1 and SCO ODT 3.0 have their own names for install.
9363     # Don't use installbsd from OSF since it installs stuff as root
9364     # by default.
9365     for ac_prog in ginstall scoinst install; do
9366       for ac_exec_ext in '' $ac_executable_extensions; do
9367         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9368           if test $ac_prog = install &&
9369             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9370             # AIX install.  It has an incompatible calling convention.
9371             :
9372           elif test $ac_prog = install &&
9373             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9374             # program-specific install script used by HP pwplus--don't use.
9375             :
9376           else
9377             rm -rf conftest.one conftest.two conftest.dir
9378             echo one > conftest.one
9379             echo two > conftest.two
9380             mkdir conftest.dir
9381             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9382               test -s conftest.one && test -s conftest.two &&
9383               test -s conftest.dir/conftest.one &&
9384               test -s conftest.dir/conftest.two
9385             then
9386               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9387               break 3
9388             fi
9389           fi
9390         fi
9391       done
9392     done
9393     ;;
9394 esac
9395
9396   done
9397 IFS=$as_save_IFS
9398
9399 rm -rf conftest.one conftest.two conftest.dir
9400
9401 fi
9402   if test "${ac_cv_path_install+set}" = set; then
9403     INSTALL=$ac_cv_path_install
9404   else
9405     # As a last resort, use the slow shell script.  Don't cache a
9406     # value for INSTALL within a source directory, because that will
9407     # break other packages using the cache if that directory is
9408     # removed, or if the value is a relative name.
9409     INSTALL=$ac_install_sh
9410   fi
9411 fi
9412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9413 $as_echo "$INSTALL" >&6; }
9414
9415 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9416 # It thinks the first close brace ends the variable substitution.
9417 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9418
9419 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9420
9421 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9422
9423 # When Autoconf chooses install-sh as install program it tries to generate
9424 # a relative path to it in each makefile where it substitutes it. This clashes
9425 # with our Makefile.global concept. This workaround helps.
9426 case $INSTALL in
9427   *install-sh*) install_bin='';;
9428   *) install_bin=$INSTALL;;
9429 esac
9430
9431
9432 if test -z "$TAR"; then
9433   for ac_prog in tar
9434 do
9435   # Extract the first word of "$ac_prog", so it can be a program name with args.
9436 set dummy $ac_prog; ac_word=$2
9437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9438 $as_echo_n "checking for $ac_word... " >&6; }
9439 if ${ac_cv_path_TAR+:} false; then :
9440   $as_echo_n "(cached) " >&6
9441 else
9442   case $TAR in
9443   [\\/]* | ?:[\\/]*)
9444   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9445   ;;
9446   *)
9447   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9448 for as_dir in $PATH
9449 do
9450   IFS=$as_save_IFS
9451   test -z "$as_dir" && as_dir=.
9452     for ac_exec_ext in '' $ac_executable_extensions; do
9453   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9454     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9455     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9456     break 2
9457   fi
9458 done
9459   done
9460 IFS=$as_save_IFS
9461
9462   ;;
9463 esac
9464 fi
9465 TAR=$ac_cv_path_TAR
9466 if test -n "$TAR"; then
9467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9468 $as_echo "$TAR" >&6; }
9469 else
9470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9471 $as_echo "no" >&6; }
9472 fi
9473
9474
9475   test -n "$TAR" && break
9476 done
9477
9478 else
9479   # Report the value of TAR in configure's output in all cases.
9480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9481 $as_echo_n "checking for TAR... " >&6; }
9482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9483 $as_echo "$TAR" >&6; }
9484 fi
9485
9486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9487 $as_echo_n "checking whether ln -s works... " >&6; }
9488 LN_S=$as_ln_s
9489 if test "$LN_S" = "ln -s"; then
9490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9491 $as_echo "yes" >&6; }
9492 else
9493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9494 $as_echo "no, using $LN_S" >&6; }
9495 fi
9496
9497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9498 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9499 if test -z "$MKDIR_P"; then
9500   if ${ac_cv_path_mkdir+:} false; then :
9501   $as_echo_n "(cached) " >&6
9502 else
9503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9504 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9505 do
9506   IFS=$as_save_IFS
9507   test -z "$as_dir" && as_dir=.
9508     for ac_prog in mkdir gmkdir; do
9509          for ac_exec_ext in '' $ac_executable_extensions; do
9510            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9511            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9512              'mkdir (GNU coreutils) '* | \
9513              'mkdir (coreutils) '* | \
9514              'mkdir (fileutils) '4.1*)
9515                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9516                break 3;;
9517            esac
9518          done
9519        done
9520   done
9521 IFS=$as_save_IFS
9522
9523 fi
9524
9525   test -d ./--version && rmdir ./--version
9526   if test "${ac_cv_path_mkdir+set}" = set; then
9527     MKDIR_P="$ac_cv_path_mkdir -p"
9528   else
9529     # As a last resort, use the slow shell script.  Don't cache a
9530     # value for MKDIR_P within a source directory, because that will
9531     # break other packages using the cache if that directory is
9532     # removed, or if the value is a relative name.
9533     MKDIR_P="$ac_install_sh -d"
9534   fi
9535 fi
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9537 $as_echo "$MKDIR_P" >&6; }
9538
9539 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9540 # a relative path to it in each makefile where it substitutes it. This clashes
9541 # with our Makefile.global concept. This workaround helps.
9542 case $MKDIR_P in
9543   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9544 esac
9545
9546 if test -z "$BISON"; then
9547   for ac_prog in bison
9548 do
9549   # Extract the first word of "$ac_prog", so it can be a program name with args.
9550 set dummy $ac_prog; ac_word=$2
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9552 $as_echo_n "checking for $ac_word... " >&6; }
9553 if ${ac_cv_path_BISON+:} false; then :
9554   $as_echo_n "(cached) " >&6
9555 else
9556   case $BISON in
9557   [\\/]* | ?:[\\/]*)
9558   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9559   ;;
9560   *)
9561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9562 for as_dir in $PATH
9563 do
9564   IFS=$as_save_IFS
9565   test -z "$as_dir" && as_dir=.
9566     for ac_exec_ext in '' $ac_executable_extensions; do
9567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9568     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9570     break 2
9571   fi
9572 done
9573   done
9574 IFS=$as_save_IFS
9575
9576   ;;
9577 esac
9578 fi
9579 BISON=$ac_cv_path_BISON
9580 if test -n "$BISON"; then
9581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9582 $as_echo "$BISON" >&6; }
9583 else
9584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9585 $as_echo "no" >&6; }
9586 fi
9587
9588
9589   test -n "$BISON" && break
9590 done
9591
9592 else
9593   # Report the value of BISON in configure's output in all cases.
9594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9595 $as_echo_n "checking for BISON... " >&6; }
9596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9597 $as_echo "$BISON" >&6; }
9598 fi
9599
9600
9601 if test "$BISON"; then
9602   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9603   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9604 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9605   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9606   then
9607     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9608 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9609 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9610 $as_echo "$as_me: WARNING:
9611 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9612 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9613     BISON=""
9614   fi
9615   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9616   # of the now preferred %name-prefix "base_yy", but the latter
9617   # doesn't work with Bison 2.3 or less.  So for now we silence the
9618   # deprecation warnings.
9619   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9620   then
9621     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9622   fi
9623 fi
9624
9625 if test -z "$BISON"; then
9626   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9627 *** Without Bison you will not be able to build PostgreSQL from Git nor
9628 *** change any of the parser definition files.  You can obtain Bison from
9629 *** a GNU mirror site.  (If you are using the official distribution of
9630 *** PostgreSQL then you do not need to worry about this, because the Bison
9631 *** output is pre-generated.)" >&5
9632 $as_echo "$as_me: WARNING:
9633 *** Without Bison you will not be able to build PostgreSQL from Git nor
9634 *** change any of the parser definition files.  You can obtain Bison from
9635 *** a GNU mirror site.  (If you are using the official distribution of
9636 *** PostgreSQL then you do not need to worry about this, because the Bison
9637 *** output is pre-generated.)" >&2;}
9638 fi
9639 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9640
9641
9642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9643 $as_echo_n "checking for flex... " >&6; }
9644 if ${pgac_cv_path_flex+:} false; then :
9645   $as_echo_n "(cached) " >&6
9646 else
9647   # Let the user override the test
9648 if test -n "$FLEX"; then
9649   pgac_cv_path_flex=$FLEX
9650 else
9651   pgac_save_IFS=$IFS
9652   IFS=$PATH_SEPARATOR
9653   for pgac_dir in $PATH; do
9654     IFS=$pgac_save_IFS
9655     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9656       pgac_dir=`pwd`
9657     fi
9658     for pgac_prog in flex lex; do
9659       pgac_candidate="$pgac_dir/$pgac_prog"
9660       if test -f "$pgac_candidate" \
9661         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9662       then
9663         echo '%%'  > conftest.l
9664         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9665           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9666           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;}'
9667           then
9668             pgac_cv_path_flex=$pgac_candidate
9669             break 2
9670           else
9671             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9672 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9673 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9674 $as_echo "$as_me: WARNING:
9675 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9676 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9677           fi
9678         fi
9679       fi
9680     done
9681   done
9682   rm -f conftest.l lex.yy.c
9683   : ${pgac_cv_path_flex=no}
9684 fi
9685
9686 fi
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9688 $as_echo "$pgac_cv_path_flex" >&6; }
9689 if test x"$pgac_cv_path_flex" = x"no"; then
9690   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9691 *** Without Flex you will not be able to build PostgreSQL from Git nor
9692 *** change any of the scanner definition files.  You can obtain Flex from
9693 *** a GNU mirror site.  (If you are using the official distribution of
9694 *** PostgreSQL then you do not need to worry about this because the Flex
9695 *** output is pre-generated.)" >&5
9696 $as_echo "$as_me: WARNING:
9697 *** Without Flex you will not be able to build PostgreSQL from Git nor
9698 *** change any of the scanner definition files.  You can obtain Flex from
9699 *** a GNU mirror site.  (If you are using the official distribution of
9700 *** PostgreSQL then you do not need to worry about this because the Flex
9701 *** output is pre-generated.)" >&2;}
9702
9703   FLEX=
9704 else
9705   FLEX=$pgac_cv_path_flex
9706   pgac_flex_version=`$FLEX --version 2>/dev/null`
9707   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9708 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9709 fi
9710
9711
9712
9713
9714
9715 if test -z "$PERL"; then
9716   for ac_prog in perl
9717 do
9718   # Extract the first word of "$ac_prog", so it can be a program name with args.
9719 set dummy $ac_prog; ac_word=$2
9720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9721 $as_echo_n "checking for $ac_word... " >&6; }
9722 if ${ac_cv_path_PERL+:} false; then :
9723   $as_echo_n "(cached) " >&6
9724 else
9725   case $PERL in
9726   [\\/]* | ?:[\\/]*)
9727   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9728   ;;
9729   *)
9730   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9731 for as_dir in $PATH
9732 do
9733   IFS=$as_save_IFS
9734   test -z "$as_dir" && as_dir=.
9735     for ac_exec_ext in '' $ac_executable_extensions; do
9736   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9737     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9738     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9739     break 2
9740   fi
9741 done
9742   done
9743 IFS=$as_save_IFS
9744
9745   ;;
9746 esac
9747 fi
9748 PERL=$ac_cv_path_PERL
9749 if test -n "$PERL"; then
9750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9751 $as_echo "$PERL" >&6; }
9752 else
9753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9754 $as_echo "no" >&6; }
9755 fi
9756
9757
9758   test -n "$PERL" && break
9759 done
9760
9761 else
9762   # Report the value of PERL in configure's output in all cases.
9763   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9764 $as_echo_n "checking for PERL... " >&6; }
9765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9766 $as_echo "$PERL" >&6; }
9767 fi
9768
9769
9770 if test "$PERL"; then
9771   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'`
9772   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9773 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9774   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9775     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9776   then
9777     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9778 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9779 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9780 $as_echo "$as_me: WARNING:
9781 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9782 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9783     PERL=""
9784   fi
9785 fi
9786
9787 if test -z "$PERL"; then
9788   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9789 *** Without Perl you will not be able to build PostgreSQL from Git.
9790 *** You can obtain Perl from any CPAN mirror site.
9791 *** (If you are using the official distribution of PostgreSQL then you do not
9792 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9793 $as_echo "$as_me: WARNING:
9794 *** Without Perl you will not be able to build PostgreSQL from Git.
9795 *** You can obtain Perl from any CPAN mirror site.
9796 *** (If you are using the official distribution of PostgreSQL then you do not
9797 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9798 fi
9799
9800 if test "$with_perl" = yes; then
9801   if test -z "$PERL"; then
9802     as_fn_error $? "Perl not found" "$LINENO" 5
9803   fi
9804
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9806 $as_echo_n "checking for Perl archlibexp... " >&6; }
9807 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9808 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9810 $as_echo "$perl_archlibexp" >&6; }
9811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9812 $as_echo_n "checking for Perl privlibexp... " >&6; }
9813 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9814 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9816 $as_echo "$perl_privlibexp" >&6; }
9817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9818 $as_echo_n "checking for Perl useshrplib... " >&6; }
9819 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9820 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9822 $as_echo "$perl_useshrplib" >&6; }
9823   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9824     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9825 You might have to rebuild your Perl installation.  Refer to the
9826 documentation for details.  Use --without-perl to disable building
9827 PL/Perl." "$LINENO" 5
9828   fi
9829   # On most platforms, archlibexp is also where the Perl include files live ...
9830   perl_includespec="-I$perl_archlibexp/CORE"
9831   # ... but on newer macOS versions, we must use -iwithsysroot to look
9832   # under $PG_SYSROOT
9833   if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9834     if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9835       perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9836     fi
9837   fi
9838
9839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9840 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9841 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9843 $as_echo "$perl_ccflags" >&6; }
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9845 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9846 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9848 $as_echo "$perl_embed_ccflags" >&6; }
9849
9850
9851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9852 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9853 if test "$PORTNAME" = "win32" ; then
9854         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9855         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9856                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9857         else
9858                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9859                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9860                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9861                 fi
9862         fi
9863 else
9864         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9865         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9866         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9867 fi
9868 if test -z "$perl_embed_ldflags" ; then
9869         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9870 $as_echo "no" >&6; }
9871         as_fn_error $? "could not determine flags for linking embedded Perl.
9872 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9873 installed." "$LINENO" 5
9874 else
9875         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9876 $as_echo "$perl_embed_ldflags" >&6; }
9877 fi
9878
9879 fi
9880
9881 if test "$with_python" = yes; then
9882   if test -z "$PYTHON"; then
9883   for ac_prog in python
9884 do
9885   # Extract the first word of "$ac_prog", so it can be a program name with args.
9886 set dummy $ac_prog; ac_word=$2
9887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9888 $as_echo_n "checking for $ac_word... " >&6; }
9889 if ${ac_cv_path_PYTHON+:} false; then :
9890   $as_echo_n "(cached) " >&6
9891 else
9892   case $PYTHON in
9893   [\\/]* | ?:[\\/]*)
9894   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9895   ;;
9896   *)
9897   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9898 for as_dir in $PATH
9899 do
9900   IFS=$as_save_IFS
9901   test -z "$as_dir" && as_dir=.
9902     for ac_exec_ext in '' $ac_executable_extensions; do
9903   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9904     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9905     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9906     break 2
9907   fi
9908 done
9909   done
9910 IFS=$as_save_IFS
9911
9912   ;;
9913 esac
9914 fi
9915 PYTHON=$ac_cv_path_PYTHON
9916 if test -n "$PYTHON"; then
9917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9918 $as_echo "$PYTHON" >&6; }
9919 else
9920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9921 $as_echo "no" >&6; }
9922 fi
9923
9924
9925   test -n "$PYTHON" && break
9926 done
9927
9928 else
9929   # Report the value of PYTHON in configure's output in all cases.
9930   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9931 $as_echo_n "checking for PYTHON... " >&6; }
9932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9933 $as_echo "$PYTHON" >&6; }
9934 fi
9935
9936 if test x"$PYTHON" = x""; then
9937   as_fn_error $? "Python not found" "$LINENO" 5
9938 fi
9939
9940
9941 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9943 $as_echo "$as_me: using python $python_fullversion" >&6;}
9944 # python_fullversion is typically n.n.n plus some trailing junk
9945 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9946 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9947 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9948 # Reject unsupported Python versions as soon as practical.
9949 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9950   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9951 fi
9952
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9954 $as_echo_n "checking for Python distutils module... " >&6; }
9955 if "${PYTHON}" -c 'import distutils' 2>&5
9956 then
9957     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9958 $as_echo "yes" >&6; }
9959 else
9960     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9961 $as_echo "no" >&6; }
9962     as_fn_error $? "distutils module not found" "$LINENO" 5
9963 fi
9964
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9966 $as_echo_n "checking Python configuration directory... " >&6; }
9967 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9969 $as_echo "$python_configdir" >&6; }
9970
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9972 $as_echo_n "checking Python include directories... " >&6; }
9973 python_includespec=`${PYTHON} -c "
9974 import distutils.sysconfig
9975 a = '-I' + distutils.sysconfig.get_python_inc(False)
9976 b = '-I' + distutils.sysconfig.get_python_inc(True)
9977 if a == b:
9978     print(a)
9979 else:
9980     print(a + ' ' + b)"`
9981 if test "$PORTNAME" = win32 ; then
9982     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9983 fi
9984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9985 $as_echo "$python_includespec" >&6; }
9986
9987
9988
9989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9990 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9991
9992 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9993 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9994
9995 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9996 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9997 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9998 then
9999         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10000         found_shlib=1
10001 else
10002         # Otherwise, guess the base name of the shlib.
10003         # LDVERSION was added in Python 3.2, before that use VERSION,
10004         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10005         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
10006         if test x"${python_ldversion}" != x""; then
10007                 ldlibrary="python${python_ldversion}"
10008         else
10009                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
10010                 if test x"${python_version_var}" != x""; then
10011                         ldlibrary="python${python_version_var}"
10012                 else
10013                         ldlibrary="python${python_version}"
10014                 fi
10015         fi
10016         # Search for a likely-looking file.
10017         found_shlib=0
10018         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10019         do
10020                 # We don't know the platform DLSUFFIX here, so check 'em all.
10021                 for e in .so .dll .dylib .sl; do
10022                         if test -e "$d/lib${ldlibrary}$e"; then
10023                                 python_libdir="$d"
10024                                 found_shlib=1
10025                                 break 2
10026                         fi
10027                 done
10028         done
10029         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10030         # (".so.n.n") as well. However, check this only after failing to find
10031         # ".so" anywhere, because yet other platforms (Debian) put the .so
10032         # symlink in a different directory from the underlying versioned shlib.
10033         if test "$found_shlib" != 1; then
10034                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10035                 do
10036                         for f in "$d/lib${ldlibrary}.so."* ; do
10037                                 if test -e "$f"; then
10038                                         python_libdir="$d"
10039                                         found_shlib=1
10040                                         break 2
10041                                 fi
10042                         done
10043                 done
10044         fi
10045         # As usual, Windows has its own ideas.  Possible default library
10046         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10047         # and the "lib" prefix might not be there.
10048         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10049                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10050                 do
10051                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10052                                 if test -e "$f"; then
10053                                         python_libdir="$d"
10054                                         found_shlib=1
10055                                         break 2
10056                                 fi
10057                         done
10058                 done
10059         fi
10060 fi
10061 if test "$found_shlib" != 1; then
10062         as_fn_error $? "could not find shared library for Python
10063 You might have to rebuild your Python installation.  Refer to the
10064 documentation for details.  Use --without-python to disable building
10065 PL/Python." "$LINENO" 5
10066 fi
10067 python_libspec="-L${python_libdir} -l${ldlibrary}"
10068
10069 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10070
10071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10072 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10073
10074
10075
10076 fi
10077
10078 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
10079   if test -z "$ZIC"; then
10080   for ac_prog in zic
10081 do
10082   # Extract the first word of "$ac_prog", so it can be a program name with args.
10083 set dummy $ac_prog; ac_word=$2
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10085 $as_echo_n "checking for $ac_word... " >&6; }
10086 if ${ac_cv_path_ZIC+:} false; then :
10087   $as_echo_n "(cached) " >&6
10088 else
10089   case $ZIC in
10090   [\\/]* | ?:[\\/]*)
10091   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10092   ;;
10093   *)
10094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095 for as_dir in $PATH
10096 do
10097   IFS=$as_save_IFS
10098   test -z "$as_dir" && as_dir=.
10099     for ac_exec_ext in '' $ac_executable_extensions; do
10100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10101     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103     break 2
10104   fi
10105 done
10106   done
10107 IFS=$as_save_IFS
10108
10109   ;;
10110 esac
10111 fi
10112 ZIC=$ac_cv_path_ZIC
10113 if test -n "$ZIC"; then
10114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10115 $as_echo "$ZIC" >&6; }
10116 else
10117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118 $as_echo "no" >&6; }
10119 fi
10120
10121
10122   test -n "$ZIC" && break
10123 done
10124
10125 else
10126   # Report the value of ZIC in configure's output in all cases.
10127   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10128 $as_echo_n "checking for ZIC... " >&6; }
10129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10130 $as_echo "$ZIC" >&6; }
10131 fi
10132
10133   if test -z "$ZIC"; then
10134     as_fn_error $? "
10135 When cross-compiling, either use the option --with-system-tzdata to use
10136 existing time-zone data, or set the environment variable ZIC to a zic
10137 program to use during the build." "$LINENO" 5
10138   fi
10139 fi
10140
10141 #
10142 # Pthreads
10143 #
10144 # For each platform, we need to know about any special compile and link
10145 # libraries, and whether the normal C function names are thread-safe.
10146 # See the comment at the top of src/port/thread.c for more information.
10147 # WIN32 doesn't need the pthread tests;  it always uses threads
10148 #
10149 # These tests are run before the library-tests, because linking with the
10150 # other libraries can pull in the pthread functions as a side-effect.  We
10151 # want to use the -pthread or similar flags directly, and not rely on
10152 # the side-effects of linking with some other library.
10153 #
10154 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
10155 # invocation below is the first one in the script, and autoconf generates
10156 # additional code for that, which must not be inside the if-block. AS_IF
10157 # knows how to do that.
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10159 $as_echo_n "checking for ANSI C header files... " >&6; }
10160 if ${ac_cv_header_stdc+:} false; then :
10161   $as_echo_n "(cached) " >&6
10162 else
10163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10164 /* end confdefs.h.  */
10165 #include <stdlib.h>
10166 #include <stdarg.h>
10167 #include <string.h>
10168 #include <float.h>
10169
10170 int
10171 main ()
10172 {
10173
10174   ;
10175   return 0;
10176 }
10177 _ACEOF
10178 if ac_fn_c_try_compile "$LINENO"; then :
10179   ac_cv_header_stdc=yes
10180 else
10181   ac_cv_header_stdc=no
10182 fi
10183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10184
10185 if test $ac_cv_header_stdc = yes; then
10186   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10187   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10188 /* end confdefs.h.  */
10189 #include <string.h>
10190
10191 _ACEOF
10192 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10193   $EGREP "memchr" >/dev/null 2>&1; then :
10194
10195 else
10196   ac_cv_header_stdc=no
10197 fi
10198 rm -f conftest*
10199
10200 fi
10201
10202 if test $ac_cv_header_stdc = yes; then
10203   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10204   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10205 /* end confdefs.h.  */
10206 #include <stdlib.h>
10207
10208 _ACEOF
10209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10210   $EGREP "free" >/dev/null 2>&1; then :
10211
10212 else
10213   ac_cv_header_stdc=no
10214 fi
10215 rm -f conftest*
10216
10217 fi
10218
10219 if test $ac_cv_header_stdc = yes; then
10220   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10221   if test "$cross_compiling" = yes; then :
10222   :
10223 else
10224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10225 /* end confdefs.h.  */
10226 #include <ctype.h>
10227 #include <stdlib.h>
10228 #if ((' ' & 0x0FF) == 0x020)
10229 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10230 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10231 #else
10232 # define ISLOWER(c) \
10233                    (('a' <= (c) && (c) <= 'i') \
10234                      || ('j' <= (c) && (c) <= 'r') \
10235                      || ('s' <= (c) && (c) <= 'z'))
10236 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10237 #endif
10238
10239 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10240 int
10241 main ()
10242 {
10243   int i;
10244   for (i = 0; i < 256; i++)
10245     if (XOR (islower (i), ISLOWER (i))
10246         || toupper (i) != TOUPPER (i))
10247       return 2;
10248   return 0;
10249 }
10250 _ACEOF
10251 if ac_fn_c_try_run "$LINENO"; then :
10252
10253 else
10254   ac_cv_header_stdc=no
10255 fi
10256 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10257   conftest.$ac_objext conftest.beam conftest.$ac_ext
10258 fi
10259
10260 fi
10261 fi
10262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10263 $as_echo "$ac_cv_header_stdc" >&6; }
10264 if test $ac_cv_header_stdc = yes; then
10265
10266 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10267
10268 fi
10269
10270 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10271 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10272                   inttypes.h stdint.h unistd.h
10273 do :
10274   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10275 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10276 "
10277 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10278   cat >>confdefs.h <<_ACEOF
10279 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10280 _ACEOF
10281
10282 fi
10283
10284 done
10285
10286
10287 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10288    # then
10289
10290
10291
10292 ac_ext=c
10293 ac_cpp='$CPP $CPPFLAGS'
10294 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10295 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10296 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10297
10298 ax_pthread_ok=no
10299
10300 # We used to check for pthread.h first, but this fails if pthread.h
10301 # requires special compiler flags (e.g. on Tru64 or Sequent).
10302 # It gets checked for in the link test anyway.
10303
10304 # First of all, check if the user has set any of the PTHREAD_LIBS,
10305 # etcetera environment variables, and if threads linking works using
10306 # them:
10307 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
10308         save_CFLAGS="$CFLAGS"
10309         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10310         save_LIBS="$LIBS"
10311         LIBS="$PTHREAD_LIBS $LIBS"
10312         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10313 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10314         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10315 /* end confdefs.h.  */
10316
10317 /* Override any GCC internal prototype to avoid an error.
10318    Use char because int might match the return type of a GCC
10319    builtin and then its argument prototype would still apply.  */
10320 #ifdef __cplusplus
10321 extern "C"
10322 #endif
10323 char pthread_join ();
10324 int
10325 main ()
10326 {
10327 return pthread_join ();
10328   ;
10329   return 0;
10330 }
10331 _ACEOF
10332 if ac_fn_c_try_link "$LINENO"; then :
10333   ax_pthread_ok=yes
10334 fi
10335 rm -f core conftest.err conftest.$ac_objext \
10336     conftest$ac_exeext conftest.$ac_ext
10337         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10338 $as_echo "$ax_pthread_ok" >&6; }
10339         if test x"$ax_pthread_ok" = xno; then
10340                 PTHREAD_LIBS=""
10341                 PTHREAD_CFLAGS=""
10342         fi
10343         LIBS="$save_LIBS"
10344         CFLAGS="$save_CFLAGS"
10345 fi
10346
10347 # We must check for the threads library under a number of different
10348 # names; the ordering is very important because some systems
10349 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10350 # libraries is broken (non-POSIX).
10351
10352 # Create a list of thread flags to try.  Items starting with a "-" are
10353 # C compiler flags, and other items are library names, except for "none"
10354 # which indicates that we try without any flags at all, and "pthread-config"
10355 # which is a program returning the flags for the Pth emulation library.
10356
10357 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
10358
10359 # The ordering *is* (sometimes) important.  Some notes on the
10360 # individual items follow:
10361
10362 # pthreads: AIX (must check this before -lpthread)
10363 # none: in case threads are in libc; should be tried before -Kthread and
10364 #       other compiler flags to prevent continual compiler warnings
10365 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10366 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10367 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10368 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10369 # -pthreads: Solaris/gcc
10370 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10371 #      doesn't hurt to check since this sometimes defines pthreads and
10372 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10373 #      is present but should not be used directly)
10374 # -mthreads: Mingw32/gcc, Lynx/gcc
10375 # pthread: Linux, etcetera
10376 # --thread-safe: KAI C++
10377 # pthread-config: use pthread-config program (for GNU Pth library)
10378
10379 case $host_os in
10380
10381         hpux*)
10382
10383         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10384         # multi-threading and also sets -lpthread."
10385
10386         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10387         ;;
10388
10389         openedition*)
10390
10391         # IBM z/OS requires a feature-test macro to be defined in order to
10392         # enable POSIX threads at all, so give the user a hint if this is
10393         # not set. (We don't define these ourselves, as they can affect
10394         # other portions of the system API in unpredictable ways.)
10395
10396         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10397 /* end confdefs.h.  */
10398
10399 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10400              AX_PTHREAD_ZOS_MISSING
10401 #            endif
10402
10403 _ACEOF
10404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10405   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10406   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10407 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10408 fi
10409 rm -f conftest*
10410
10411         ;;
10412
10413         solaris*)
10414
10415         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
10416         # check that first.  On some older versions, libc contains stubbed
10417         # (non-functional) versions of the pthreads routines, so link-based
10418         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
10419         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
10420         # a function called by this macro, so we could check for that, but
10421         # who knows whether they'll stub that too in a future libc.)  So
10422         # we'll look for -pthreads and -lpthread shortly thereafter.
10423
10424         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
10425         ;;
10426 esac
10427
10428 # Older versions of Clang only give a warning instead of an error for an
10429 # unrecognized option, unless we specify -Werror. (We throw in some extra
10430 # Clang warning flags for good measure.)
10431
10432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
10433 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
10434 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
10435   $as_echo_n "(cached) " >&6
10436 else
10437   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
10438      save_CFLAGS="$CFLAGS"
10439      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
10440      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
10441      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10442 /* end confdefs.h.  */
10443 int foo(void);
10444 int
10445 main ()
10446 {
10447 foo()
10448   ;
10449   return 0;
10450 }
10451 _ACEOF
10452 if ac_fn_c_try_compile "$LINENO"; then :
10453   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
10454 else
10455   ax_cv_PTHREAD_REJECT_UNKNOWN=no
10456 fi
10457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10458      CFLAGS="$save_CFLAGS"
10459
10460 fi
10461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
10462 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
10463 ax_pthread_extra_flags=
10464 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
10465   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
10466 fi
10467
10468 if test x"$ax_pthread_ok" = xno; then
10469 for flag in $ax_pthread_flags; do
10470
10471         case $flag in
10472                 none)
10473                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10474 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10475                 ;;
10476
10477                 -mt,pthread)
10478                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10479 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10480                 PTHREAD_CFLAGS="-mt"
10481                 PTHREAD_LIBS="-lpthread"
10482                 ;;
10483
10484                 -*)
10485                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
10486 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
10487                 PTHREAD_CFLAGS="$flag"
10488                 ;;
10489
10490                 pthread-config)
10491                 # Extract the first word of "pthread-config", so it can be a program name with args.
10492 set dummy pthread-config; ac_word=$2
10493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10494 $as_echo_n "checking for $ac_word... " >&6; }
10495 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10496   $as_echo_n "(cached) " >&6
10497 else
10498   if test -n "$ax_pthread_config"; then
10499   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10500 else
10501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502 for as_dir in $PATH
10503 do
10504   IFS=$as_save_IFS
10505   test -z "$as_dir" && as_dir=.
10506     for ac_exec_ext in '' $ac_executable_extensions; do
10507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10508     ac_cv_prog_ax_pthread_config="yes"
10509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510     break 2
10511   fi
10512 done
10513   done
10514 IFS=$as_save_IFS
10515
10516   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10517 fi
10518 fi
10519 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10520 if test -n "$ax_pthread_config"; then
10521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10522 $as_echo "$ax_pthread_config" >&6; }
10523 else
10524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525 $as_echo "no" >&6; }
10526 fi
10527
10528
10529                 if test x"$ax_pthread_config" = xno; then continue; fi
10530                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10531                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10532                 ;;
10533
10534                 *)
10535                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
10536 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
10537                 PTHREAD_LIBS="-l$flag"
10538                 ;;
10539         esac
10540
10541         save_LIBS="$LIBS"
10542         save_CFLAGS="$CFLAGS"
10543         LIBS="$PTHREAD_LIBS $LIBS"
10544         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
10545
10546         # Check for various functions.  We must include pthread.h,
10547         # since some functions may be macros.  (On the Sequent, we
10548         # need a special flag -Kthread to make this header compile.)
10549         # We check for pthread_join because it is in -lpthread on IRIX
10550         # while pthread_create is in libc.  We check for pthread_attr_init
10551         # due to DEC craziness with -lpthreads.  We check for
10552         # pthread_cleanup_push because it is one of the few pthread
10553         # functions on Solaris that doesn't have a non-functional libc stub.
10554         # We try pthread_create on general principles.
10555         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10556 /* end confdefs.h.  */
10557 #include <pthread.h>
10558                         static void routine(void *a) { a = 0; }
10559                         static void *start_routine(void *a) { return a; }
10560 int
10561 main ()
10562 {
10563 pthread_t th; pthread_attr_t attr;
10564                         pthread_create(&th, 0, start_routine, 0);
10565                         pthread_join(th, 0);
10566                         pthread_attr_init(&attr);
10567                         pthread_cleanup_push(routine, 0);
10568                         pthread_cleanup_pop(0) /* ; */
10569   ;
10570   return 0;
10571 }
10572 _ACEOF
10573 if ac_fn_c_try_link "$LINENO"; then :
10574   ax_pthread_ok=yes
10575 fi
10576 rm -f core conftest.err conftest.$ac_objext \
10577     conftest$ac_exeext conftest.$ac_ext
10578
10579         LIBS="$save_LIBS"
10580         CFLAGS="$save_CFLAGS"
10581
10582         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10583 $as_echo "$ax_pthread_ok" >&6; }
10584         if test "x$ax_pthread_ok" = xyes; then
10585                 break;
10586         fi
10587
10588         PTHREAD_LIBS=""
10589         PTHREAD_CFLAGS=""
10590 done
10591 fi
10592
10593 # Various other checks:
10594 if test "x$ax_pthread_ok" = xyes; then
10595         save_LIBS="$LIBS"
10596         LIBS="$PTHREAD_LIBS $LIBS"
10597         save_CFLAGS="$CFLAGS"
10598         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10599
10600         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10601         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10602 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10603 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10604   $as_echo_n "(cached) " >&6
10605 else
10606   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10607              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10608                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10609 /* end confdefs.h.  */
10610 #include <pthread.h>
10611 int
10612 main ()
10613 {
10614 int attr = $attr; return attr /* ; */
10615   ;
10616   return 0;
10617 }
10618 _ACEOF
10619 if ac_fn_c_try_link "$LINENO"; then :
10620   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
10621 fi
10622 rm -f core conftest.err conftest.$ac_objext \
10623     conftest$ac_exeext conftest.$ac_ext
10624              done
10625
10626 fi
10627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10628 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10629         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
10630                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
10631
10632 cat >>confdefs.h <<_ACEOF
10633 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10634 _ACEOF
10635
10636 fi
10637
10638         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
10639 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
10640 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10641   $as_echo_n "(cached) " >&6
10642 else
10643   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10644              ax_pthread_special_flags_added=no
10645              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10646 /* end confdefs.h.  */
10647
10648 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
10649                   AX_PTHREAD_NEED_SPECIAL_FLAG
10650 #                 endif
10651
10652 _ACEOF
10653 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10654   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
10655   case $host_os in
10656                   aix* | freebsd*)
10657                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
10658                   ;;
10659                   darwin* | hpux* | osf* | solaris*)
10660                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
10661                   ;;
10662                   esac
10663
10664 fi
10665 rm -f conftest*
10666
10667
10668 fi
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10670 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10671         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10672                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10673   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10674                ax_pthread_special_flags_added=yes
10675 fi
10676
10677         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10678 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10679 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10680   $as_echo_n "(cached) " >&6
10681 else
10682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10683 /* end confdefs.h.  */
10684 #include <pthread.h>
10685 int
10686 main ()
10687 {
10688 int i = PTHREAD_PRIO_INHERIT;
10689   ;
10690   return 0;
10691 }
10692 _ACEOF
10693 if ac_fn_c_try_link "$LINENO"; then :
10694   ax_cv_PTHREAD_PRIO_INHERIT=yes
10695 else
10696   ax_cv_PTHREAD_PRIO_INHERIT=no
10697 fi
10698 rm -f core conftest.err conftest.$ac_objext \
10699     conftest$ac_exeext conftest.$ac_ext
10700
10701 fi
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10703 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10704         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
10705
10706 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10707
10708 fi
10709
10710         LIBS="$save_LIBS"
10711         CFLAGS="$save_CFLAGS"
10712
10713         # More AIX lossage: compile with *_r variant
10714         if test "x$GCC" != xyes; then
10715             case $host_os in
10716                 aix*)
10717                 case "x/$CC" in #(
10718   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10719     #handle absolute path differently from PATH based program lookup
10720                    case "x$CC" in #(
10721   x/*) :
10722     if as_fn_executable_p ${CC}_r; then :
10723   PTHREAD_CC="${CC}_r"
10724 fi ;; #(
10725   *) :
10726     for ac_prog in ${CC}_r
10727 do
10728   # Extract the first word of "$ac_prog", so it can be a program name with args.
10729 set dummy $ac_prog; ac_word=$2
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10731 $as_echo_n "checking for $ac_word... " >&6; }
10732 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10733   $as_echo_n "(cached) " >&6
10734 else
10735   if test -n "$PTHREAD_CC"; then
10736   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10737 else
10738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10739 for as_dir in $PATH
10740 do
10741   IFS=$as_save_IFS
10742   test -z "$as_dir" && as_dir=.
10743     for ac_exec_ext in '' $ac_executable_extensions; do
10744   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10745     ac_cv_prog_PTHREAD_CC="$ac_prog"
10746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10747     break 2
10748   fi
10749 done
10750   done
10751 IFS=$as_save_IFS
10752
10753 fi
10754 fi
10755 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10756 if test -n "$PTHREAD_CC"; then
10757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10758 $as_echo "$PTHREAD_CC" >&6; }
10759 else
10760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10761 $as_echo "no" >&6; }
10762 fi
10763
10764
10765   test -n "$PTHREAD_CC" && break
10766 done
10767 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10768  ;;
10769 esac ;; #(
10770   *) :
10771      ;;
10772 esac
10773                 ;;
10774             esac
10775         fi
10776 fi
10777
10778 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10779
10780
10781
10782
10783
10784 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10785 if test x"$ax_pthread_ok" = xyes; then
10786
10787 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10788
10789         :
10790 else
10791         ax_pthread_ok=no
10792
10793 fi
10794 ac_ext=c
10795 ac_cpp='$CPP $CPPFLAGS'
10796 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10797 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10798 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10799
10800         # set thread flags
10801
10802 # Some platforms use these, so just define them.  They can't hurt if they
10803 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10804 # enables 5-arg getpwuid_r, among other things.
10805 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10806
10807 # Check for *_r functions
10808 _CFLAGS="$CFLAGS"
10809 _LIBS="$LIBS"
10810 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10811 LIBS="$LIBS $PTHREAD_LIBS"
10812
10813 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10814 if test "x$ac_cv_header_pthread_h" = xyes; then :
10815
10816 else
10817   as_fn_error $? "
10818 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10819 fi
10820
10821
10822
10823 for ac_func in strerror_r getpwuid_r gethostbyname_r
10824 do :
10825   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10826 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10827 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10828   cat >>confdefs.h <<_ACEOF
10829 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10830 _ACEOF
10831
10832 fi
10833 done
10834
10835
10836 # Do test here with the proper thread flags
10837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10838 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10839 if ${pgac_cv_func_strerror_r_int+:} false; then :
10840   $as_echo_n "(cached) " >&6
10841 else
10842   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10843 /* end confdefs.h.  */
10844 #include <string.h>
10845 int
10846 main ()
10847 {
10848 char buf[100];
10849   switch (strerror_r(1, buf, sizeof(buf)))
10850   { case 0: break; default: break; }
10851
10852   ;
10853   return 0;
10854 }
10855 _ACEOF
10856 if ac_fn_c_try_compile "$LINENO"; then :
10857   pgac_cv_func_strerror_r_int=yes
10858 else
10859   pgac_cv_func_strerror_r_int=no
10860 fi
10861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10862 fi
10863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10864 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10865 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10866
10867 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10868
10869 fi
10870
10871
10872 CFLAGS="$_CFLAGS"
10873 LIBS="$_LIBS"
10874
10875
10876 else
10877    # else
10878 # do not use values from template file
10879 PTHREAD_CFLAGS=
10880 PTHREAD_LIBS=
10881
10882 fi # fi
10883
10884
10885
10886
10887
10888 ##
10889 ## Libraries
10890 ##
10891 ## Most libraries are included only if they demonstrably provide a function
10892 ## we need, but libm is an exception: always include it, because there are
10893 ## too many compilers that play cute optimization games that will break
10894 ## probes for standard functions such as pow().
10895 ##
10896
10897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10898 $as_echo_n "checking for main in -lm... " >&6; }
10899 if ${ac_cv_lib_m_main+:} false; then :
10900   $as_echo_n "(cached) " >&6
10901 else
10902   ac_check_lib_save_LIBS=$LIBS
10903 LIBS="-lm  $LIBS"
10904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10905 /* end confdefs.h.  */
10906
10907
10908 int
10909 main ()
10910 {
10911 return main ();
10912   ;
10913   return 0;
10914 }
10915 _ACEOF
10916 if ac_fn_c_try_link "$LINENO"; then :
10917   ac_cv_lib_m_main=yes
10918 else
10919   ac_cv_lib_m_main=no
10920 fi
10921 rm -f core conftest.err conftest.$ac_objext \
10922     conftest$ac_exeext conftest.$ac_ext
10923 LIBS=$ac_check_lib_save_LIBS
10924 fi
10925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10926 $as_echo "$ac_cv_lib_m_main" >&6; }
10927 if test "x$ac_cv_lib_m_main" = xyes; then :
10928   cat >>confdefs.h <<_ACEOF
10929 #define HAVE_LIBM 1
10930 _ACEOF
10931
10932   LIBS="-lm $LIBS"
10933
10934 fi
10935
10936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10937 $as_echo_n "checking for library containing setproctitle... " >&6; }
10938 if ${ac_cv_search_setproctitle+:} false; then :
10939   $as_echo_n "(cached) " >&6
10940 else
10941   ac_func_search_save_LIBS=$LIBS
10942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10943 /* end confdefs.h.  */
10944
10945 /* Override any GCC internal prototype to avoid an error.
10946    Use char because int might match the return type of a GCC
10947    builtin and then its argument prototype would still apply.  */
10948 #ifdef __cplusplus
10949 extern "C"
10950 #endif
10951 char setproctitle ();
10952 int
10953 main ()
10954 {
10955 return setproctitle ();
10956   ;
10957   return 0;
10958 }
10959 _ACEOF
10960 for ac_lib in '' util; do
10961   if test -z "$ac_lib"; then
10962     ac_res="none required"
10963   else
10964     ac_res=-l$ac_lib
10965     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10966   fi
10967   if ac_fn_c_try_link "$LINENO"; then :
10968   ac_cv_search_setproctitle=$ac_res
10969 fi
10970 rm -f core conftest.err conftest.$ac_objext \
10971     conftest$ac_exeext
10972   if ${ac_cv_search_setproctitle+:} false; then :
10973   break
10974 fi
10975 done
10976 if ${ac_cv_search_setproctitle+:} false; then :
10977
10978 else
10979   ac_cv_search_setproctitle=no
10980 fi
10981 rm conftest.$ac_ext
10982 LIBS=$ac_func_search_save_LIBS
10983 fi
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
10985 $as_echo "$ac_cv_search_setproctitle" >&6; }
10986 ac_res=$ac_cv_search_setproctitle
10987 if test "$ac_res" != no; then :
10988   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10989
10990 fi
10991
10992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10993 $as_echo_n "checking for library containing dlopen... " >&6; }
10994 if ${ac_cv_search_dlopen+:} false; then :
10995   $as_echo_n "(cached) " >&6
10996 else
10997   ac_func_search_save_LIBS=$LIBS
10998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10999 /* end confdefs.h.  */
11000
11001 /* Override any GCC internal prototype to avoid an error.
11002    Use char because int might match the return type of a GCC
11003    builtin and then its argument prototype would still apply.  */
11004 #ifdef __cplusplus
11005 extern "C"
11006 #endif
11007 char dlopen ();
11008 int
11009 main ()
11010 {
11011 return dlopen ();
11012   ;
11013   return 0;
11014 }
11015 _ACEOF
11016 for ac_lib in '' dl; do
11017   if test -z "$ac_lib"; then
11018     ac_res="none required"
11019   else
11020     ac_res=-l$ac_lib
11021     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11022   fi
11023   if ac_fn_c_try_link "$LINENO"; then :
11024   ac_cv_search_dlopen=$ac_res
11025 fi
11026 rm -f core conftest.err conftest.$ac_objext \
11027     conftest$ac_exeext
11028   if ${ac_cv_search_dlopen+:} false; then :
11029   break
11030 fi
11031 done
11032 if ${ac_cv_search_dlopen+:} false; then :
11033
11034 else
11035   ac_cv_search_dlopen=no
11036 fi
11037 rm conftest.$ac_ext
11038 LIBS=$ac_func_search_save_LIBS
11039 fi
11040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11041 $as_echo "$ac_cv_search_dlopen" >&6; }
11042 ac_res=$ac_cv_search_dlopen
11043 if test "$ac_res" != no; then :
11044   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11045
11046 fi
11047
11048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11049 $as_echo_n "checking for library containing socket... " >&6; }
11050 if ${ac_cv_search_socket+:} false; then :
11051   $as_echo_n "(cached) " >&6
11052 else
11053   ac_func_search_save_LIBS=$LIBS
11054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11055 /* end confdefs.h.  */
11056
11057 /* Override any GCC internal prototype to avoid an error.
11058    Use char because int might match the return type of a GCC
11059    builtin and then its argument prototype would still apply.  */
11060 #ifdef __cplusplus
11061 extern "C"
11062 #endif
11063 char socket ();
11064 int
11065 main ()
11066 {
11067 return socket ();
11068   ;
11069   return 0;
11070 }
11071 _ACEOF
11072 for ac_lib in '' socket ws2_32; do
11073   if test -z "$ac_lib"; then
11074     ac_res="none required"
11075   else
11076     ac_res=-l$ac_lib
11077     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11078   fi
11079   if ac_fn_c_try_link "$LINENO"; then :
11080   ac_cv_search_socket=$ac_res
11081 fi
11082 rm -f core conftest.err conftest.$ac_objext \
11083     conftest$ac_exeext
11084   if ${ac_cv_search_socket+:} false; then :
11085   break
11086 fi
11087 done
11088 if ${ac_cv_search_socket+:} false; then :
11089
11090 else
11091   ac_cv_search_socket=no
11092 fi
11093 rm conftest.$ac_ext
11094 LIBS=$ac_func_search_save_LIBS
11095 fi
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11097 $as_echo "$ac_cv_search_socket" >&6; }
11098 ac_res=$ac_cv_search_socket
11099 if test "$ac_res" != no; then :
11100   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11101
11102 fi
11103
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11105 $as_echo_n "checking for library containing shl_load... " >&6; }
11106 if ${ac_cv_search_shl_load+:} false; then :
11107   $as_echo_n "(cached) " >&6
11108 else
11109   ac_func_search_save_LIBS=$LIBS
11110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11111 /* end confdefs.h.  */
11112
11113 /* Override any GCC internal prototype to avoid an error.
11114    Use char because int might match the return type of a GCC
11115    builtin and then its argument prototype would still apply.  */
11116 #ifdef __cplusplus
11117 extern "C"
11118 #endif
11119 char shl_load ();
11120 int
11121 main ()
11122 {
11123 return shl_load ();
11124   ;
11125   return 0;
11126 }
11127 _ACEOF
11128 for ac_lib in '' dld; do
11129   if test -z "$ac_lib"; then
11130     ac_res="none required"
11131   else
11132     ac_res=-l$ac_lib
11133     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11134   fi
11135   if ac_fn_c_try_link "$LINENO"; then :
11136   ac_cv_search_shl_load=$ac_res
11137 fi
11138 rm -f core conftest.err conftest.$ac_objext \
11139     conftest$ac_exeext
11140   if ${ac_cv_search_shl_load+:} false; then :
11141   break
11142 fi
11143 done
11144 if ${ac_cv_search_shl_load+:} false; then :
11145
11146 else
11147   ac_cv_search_shl_load=no
11148 fi
11149 rm conftest.$ac_ext
11150 LIBS=$ac_func_search_save_LIBS
11151 fi
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11153 $as_echo "$ac_cv_search_shl_load" >&6; }
11154 ac_res=$ac_cv_search_shl_load
11155 if test "$ac_res" != no; then :
11156   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11157
11158 fi
11159
11160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11161 $as_echo_n "checking for library containing getopt_long... " >&6; }
11162 if ${ac_cv_search_getopt_long+:} false; then :
11163   $as_echo_n "(cached) " >&6
11164 else
11165   ac_func_search_save_LIBS=$LIBS
11166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11167 /* end confdefs.h.  */
11168
11169 /* Override any GCC internal prototype to avoid an error.
11170    Use char because int might match the return type of a GCC
11171    builtin and then its argument prototype would still apply.  */
11172 #ifdef __cplusplus
11173 extern "C"
11174 #endif
11175 char getopt_long ();
11176 int
11177 main ()
11178 {
11179 return getopt_long ();
11180   ;
11181   return 0;
11182 }
11183 _ACEOF
11184 for ac_lib in '' getopt gnugetopt; do
11185   if test -z "$ac_lib"; then
11186     ac_res="none required"
11187   else
11188     ac_res=-l$ac_lib
11189     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11190   fi
11191   if ac_fn_c_try_link "$LINENO"; then :
11192   ac_cv_search_getopt_long=$ac_res
11193 fi
11194 rm -f core conftest.err conftest.$ac_objext \
11195     conftest$ac_exeext
11196   if ${ac_cv_search_getopt_long+:} false; then :
11197   break
11198 fi
11199 done
11200 if ${ac_cv_search_getopt_long+:} false; then :
11201
11202 else
11203   ac_cv_search_getopt_long=no
11204 fi
11205 rm conftest.$ac_ext
11206 LIBS=$ac_func_search_save_LIBS
11207 fi
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11209 $as_echo "$ac_cv_search_getopt_long" >&6; }
11210 ac_res=$ac_cv_search_getopt_long
11211 if test "$ac_res" != no; then :
11212   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11213
11214 fi
11215
11216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11217 $as_echo_n "checking for library containing crypt... " >&6; }
11218 if ${ac_cv_search_crypt+:} false; then :
11219   $as_echo_n "(cached) " >&6
11220 else
11221   ac_func_search_save_LIBS=$LIBS
11222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11223 /* end confdefs.h.  */
11224
11225 /* Override any GCC internal prototype to avoid an error.
11226    Use char because int might match the return type of a GCC
11227    builtin and then its argument prototype would still apply.  */
11228 #ifdef __cplusplus
11229 extern "C"
11230 #endif
11231 char crypt ();
11232 int
11233 main ()
11234 {
11235 return crypt ();
11236   ;
11237   return 0;
11238 }
11239 _ACEOF
11240 for ac_lib in '' crypt; do
11241   if test -z "$ac_lib"; then
11242     ac_res="none required"
11243   else
11244     ac_res=-l$ac_lib
11245     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11246   fi
11247   if ac_fn_c_try_link "$LINENO"; then :
11248   ac_cv_search_crypt=$ac_res
11249 fi
11250 rm -f core conftest.err conftest.$ac_objext \
11251     conftest$ac_exeext
11252   if ${ac_cv_search_crypt+:} false; then :
11253   break
11254 fi
11255 done
11256 if ${ac_cv_search_crypt+:} false; then :
11257
11258 else
11259   ac_cv_search_crypt=no
11260 fi
11261 rm conftest.$ac_ext
11262 LIBS=$ac_func_search_save_LIBS
11263 fi
11264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11265 $as_echo "$ac_cv_search_crypt" >&6; }
11266 ac_res=$ac_cv_search_crypt
11267 if test "$ac_res" != no; then :
11268   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11269
11270 fi
11271
11272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11273 $as_echo_n "checking for library containing shm_open... " >&6; }
11274 if ${ac_cv_search_shm_open+:} false; then :
11275   $as_echo_n "(cached) " >&6
11276 else
11277   ac_func_search_save_LIBS=$LIBS
11278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11279 /* end confdefs.h.  */
11280
11281 /* Override any GCC internal prototype to avoid an error.
11282    Use char because int might match the return type of a GCC
11283    builtin and then its argument prototype would still apply.  */
11284 #ifdef __cplusplus
11285 extern "C"
11286 #endif
11287 char shm_open ();
11288 int
11289 main ()
11290 {
11291 return shm_open ();
11292   ;
11293   return 0;
11294 }
11295 _ACEOF
11296 for ac_lib in '' rt; do
11297   if test -z "$ac_lib"; then
11298     ac_res="none required"
11299   else
11300     ac_res=-l$ac_lib
11301     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11302   fi
11303   if ac_fn_c_try_link "$LINENO"; then :
11304   ac_cv_search_shm_open=$ac_res
11305 fi
11306 rm -f core conftest.err conftest.$ac_objext \
11307     conftest$ac_exeext
11308   if ${ac_cv_search_shm_open+:} false; then :
11309   break
11310 fi
11311 done
11312 if ${ac_cv_search_shm_open+:} false; then :
11313
11314 else
11315   ac_cv_search_shm_open=no
11316 fi
11317 rm conftest.$ac_ext
11318 LIBS=$ac_func_search_save_LIBS
11319 fi
11320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11321 $as_echo "$ac_cv_search_shm_open" >&6; }
11322 ac_res=$ac_cv_search_shm_open
11323 if test "$ac_res" != no; then :
11324   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11325
11326 fi
11327
11328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11329 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11330 if ${ac_cv_search_shm_unlink+:} false; then :
11331   $as_echo_n "(cached) " >&6
11332 else
11333   ac_func_search_save_LIBS=$LIBS
11334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11335 /* end confdefs.h.  */
11336
11337 /* Override any GCC internal prototype to avoid an error.
11338    Use char because int might match the return type of a GCC
11339    builtin and then its argument prototype would still apply.  */
11340 #ifdef __cplusplus
11341 extern "C"
11342 #endif
11343 char shm_unlink ();
11344 int
11345 main ()
11346 {
11347 return shm_unlink ();
11348   ;
11349   return 0;
11350 }
11351 _ACEOF
11352 for ac_lib in '' rt; do
11353   if test -z "$ac_lib"; then
11354     ac_res="none required"
11355   else
11356     ac_res=-l$ac_lib
11357     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11358   fi
11359   if ac_fn_c_try_link "$LINENO"; then :
11360   ac_cv_search_shm_unlink=$ac_res
11361 fi
11362 rm -f core conftest.err conftest.$ac_objext \
11363     conftest$ac_exeext
11364   if ${ac_cv_search_shm_unlink+:} false; then :
11365   break
11366 fi
11367 done
11368 if ${ac_cv_search_shm_unlink+:} false; then :
11369
11370 else
11371   ac_cv_search_shm_unlink=no
11372 fi
11373 rm conftest.$ac_ext
11374 LIBS=$ac_func_search_save_LIBS
11375 fi
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11377 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11378 ac_res=$ac_cv_search_shm_unlink
11379 if test "$ac_res" != no; then :
11380   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11381
11382 fi
11383
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11385 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11386 if ${ac_cv_search_clock_gettime+:} false; then :
11387   $as_echo_n "(cached) " >&6
11388 else
11389   ac_func_search_save_LIBS=$LIBS
11390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11391 /* end confdefs.h.  */
11392
11393 /* Override any GCC internal prototype to avoid an error.
11394    Use char because int might match the return type of a GCC
11395    builtin and then its argument prototype would still apply.  */
11396 #ifdef __cplusplus
11397 extern "C"
11398 #endif
11399 char clock_gettime ();
11400 int
11401 main ()
11402 {
11403 return clock_gettime ();
11404   ;
11405   return 0;
11406 }
11407 _ACEOF
11408 for ac_lib in '' rt posix4; do
11409   if test -z "$ac_lib"; then
11410     ac_res="none required"
11411   else
11412     ac_res=-l$ac_lib
11413     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11414   fi
11415   if ac_fn_c_try_link "$LINENO"; then :
11416   ac_cv_search_clock_gettime=$ac_res
11417 fi
11418 rm -f core conftest.err conftest.$ac_objext \
11419     conftest$ac_exeext
11420   if ${ac_cv_search_clock_gettime+:} false; then :
11421   break
11422 fi
11423 done
11424 if ${ac_cv_search_clock_gettime+:} false; then :
11425
11426 else
11427   ac_cv_search_clock_gettime=no
11428 fi
11429 rm conftest.$ac_ext
11430 LIBS=$ac_func_search_save_LIBS
11431 fi
11432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11433 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11434 ac_res=$ac_cv_search_clock_gettime
11435 if test "$ac_res" != no; then :
11436   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11437
11438 fi
11439
11440 # Solaris:
11441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11442 $as_echo_n "checking for library containing fdatasync... " >&6; }
11443 if ${ac_cv_search_fdatasync+:} false; then :
11444   $as_echo_n "(cached) " >&6
11445 else
11446   ac_func_search_save_LIBS=$LIBS
11447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11448 /* end confdefs.h.  */
11449
11450 /* Override any GCC internal prototype to avoid an error.
11451    Use char because int might match the return type of a GCC
11452    builtin and then its argument prototype would still apply.  */
11453 #ifdef __cplusplus
11454 extern "C"
11455 #endif
11456 char fdatasync ();
11457 int
11458 main ()
11459 {
11460 return fdatasync ();
11461   ;
11462   return 0;
11463 }
11464 _ACEOF
11465 for ac_lib in '' rt posix4; do
11466   if test -z "$ac_lib"; then
11467     ac_res="none required"
11468   else
11469     ac_res=-l$ac_lib
11470     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11471   fi
11472   if ac_fn_c_try_link "$LINENO"; then :
11473   ac_cv_search_fdatasync=$ac_res
11474 fi
11475 rm -f core conftest.err conftest.$ac_objext \
11476     conftest$ac_exeext
11477   if ${ac_cv_search_fdatasync+:} false; then :
11478   break
11479 fi
11480 done
11481 if ${ac_cv_search_fdatasync+:} false; then :
11482
11483 else
11484   ac_cv_search_fdatasync=no
11485 fi
11486 rm conftest.$ac_ext
11487 LIBS=$ac_func_search_save_LIBS
11488 fi
11489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11490 $as_echo "$ac_cv_search_fdatasync" >&6; }
11491 ac_res=$ac_cv_search_fdatasync
11492 if test "$ac_res" != no; then :
11493   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11494
11495 fi
11496
11497 # Required for thread_test.c on Solaris
11498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11499 $as_echo_n "checking for library containing sched_yield... " >&6; }
11500 if ${ac_cv_search_sched_yield+:} false; then :
11501   $as_echo_n "(cached) " >&6
11502 else
11503   ac_func_search_save_LIBS=$LIBS
11504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11505 /* end confdefs.h.  */
11506
11507 /* Override any GCC internal prototype to avoid an error.
11508    Use char because int might match the return type of a GCC
11509    builtin and then its argument prototype would still apply.  */
11510 #ifdef __cplusplus
11511 extern "C"
11512 #endif
11513 char sched_yield ();
11514 int
11515 main ()
11516 {
11517 return sched_yield ();
11518   ;
11519   return 0;
11520 }
11521 _ACEOF
11522 for ac_lib in '' rt; do
11523   if test -z "$ac_lib"; then
11524     ac_res="none required"
11525   else
11526     ac_res=-l$ac_lib
11527     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11528   fi
11529   if ac_fn_c_try_link "$LINENO"; then :
11530   ac_cv_search_sched_yield=$ac_res
11531 fi
11532 rm -f core conftest.err conftest.$ac_objext \
11533     conftest$ac_exeext
11534   if ${ac_cv_search_sched_yield+:} false; then :
11535   break
11536 fi
11537 done
11538 if ${ac_cv_search_sched_yield+:} false; then :
11539
11540 else
11541   ac_cv_search_sched_yield=no
11542 fi
11543 rm conftest.$ac_ext
11544 LIBS=$ac_func_search_save_LIBS
11545 fi
11546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11547 $as_echo "$ac_cv_search_sched_yield" >&6; }
11548 ac_res=$ac_cv_search_sched_yield
11549 if test "$ac_res" != no; then :
11550   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11551
11552 fi
11553
11554 # Required for thread_test.c on Solaris 2.5:
11555 # Other ports use it too (HP-UX) so test unconditionally
11556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11557 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11558 if ${ac_cv_search_gethostbyname_r+:} false; then :
11559   $as_echo_n "(cached) " >&6
11560 else
11561   ac_func_search_save_LIBS=$LIBS
11562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11563 /* end confdefs.h.  */
11564
11565 /* Override any GCC internal prototype to avoid an error.
11566    Use char because int might match the return type of a GCC
11567    builtin and then its argument prototype would still apply.  */
11568 #ifdef __cplusplus
11569 extern "C"
11570 #endif
11571 char gethostbyname_r ();
11572 int
11573 main ()
11574 {
11575 return gethostbyname_r ();
11576   ;
11577   return 0;
11578 }
11579 _ACEOF
11580 for ac_lib in '' nsl; do
11581   if test -z "$ac_lib"; then
11582     ac_res="none required"
11583   else
11584     ac_res=-l$ac_lib
11585     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11586   fi
11587   if ac_fn_c_try_link "$LINENO"; then :
11588   ac_cv_search_gethostbyname_r=$ac_res
11589 fi
11590 rm -f core conftest.err conftest.$ac_objext \
11591     conftest$ac_exeext
11592   if ${ac_cv_search_gethostbyname_r+:} false; then :
11593   break
11594 fi
11595 done
11596 if ${ac_cv_search_gethostbyname_r+:} false; then :
11597
11598 else
11599   ac_cv_search_gethostbyname_r=no
11600 fi
11601 rm conftest.$ac_ext
11602 LIBS=$ac_func_search_save_LIBS
11603 fi
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11605 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11606 ac_res=$ac_cv_search_gethostbyname_r
11607 if test "$ac_res" != no; then :
11608   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11609
11610 fi
11611
11612 # Cygwin:
11613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11614 $as_echo_n "checking for library containing shmget... " >&6; }
11615 if ${ac_cv_search_shmget+:} false; then :
11616   $as_echo_n "(cached) " >&6
11617 else
11618   ac_func_search_save_LIBS=$LIBS
11619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11620 /* end confdefs.h.  */
11621
11622 /* Override any GCC internal prototype to avoid an error.
11623    Use char because int might match the return type of a GCC
11624    builtin and then its argument prototype would still apply.  */
11625 #ifdef __cplusplus
11626 extern "C"
11627 #endif
11628 char shmget ();
11629 int
11630 main ()
11631 {
11632 return shmget ();
11633   ;
11634   return 0;
11635 }
11636 _ACEOF
11637 for ac_lib in '' cygipc; do
11638   if test -z "$ac_lib"; then
11639     ac_res="none required"
11640   else
11641     ac_res=-l$ac_lib
11642     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11643   fi
11644   if ac_fn_c_try_link "$LINENO"; then :
11645   ac_cv_search_shmget=$ac_res
11646 fi
11647 rm -f core conftest.err conftest.$ac_objext \
11648     conftest$ac_exeext
11649   if ${ac_cv_search_shmget+:} false; then :
11650   break
11651 fi
11652 done
11653 if ${ac_cv_search_shmget+:} false; then :
11654
11655 else
11656   ac_cv_search_shmget=no
11657 fi
11658 rm conftest.$ac_ext
11659 LIBS=$ac_func_search_save_LIBS
11660 fi
11661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11662 $as_echo "$ac_cv_search_shmget" >&6; }
11663 ac_res=$ac_cv_search_shmget
11664 if test "$ac_res" != no; then :
11665   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11666
11667 fi
11668
11669
11670 if test "$with_readline" = yes; then
11671
11672
11673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11674 $as_echo_n "checking for library containing readline... " >&6; }
11675 if ${pgac_cv_check_readline+:} false; then :
11676   $as_echo_n "(cached) " >&6
11677 else
11678   pgac_cv_check_readline=no
11679 pgac_save_LIBS=$LIBS
11680 if test x"$with_libedit_preferred" != x"yes"
11681 then    READLINE_ORDER="-lreadline -ledit"
11682 else    READLINE_ORDER="-ledit -lreadline"
11683 fi
11684 for pgac_rllib in $READLINE_ORDER ; do
11685   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11686     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11687     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11688 /* end confdefs.h.  */
11689
11690 /* Override any GCC internal prototype to avoid an error.
11691    Use char because int might match the return type of a GCC
11692    builtin and then its argument prototype would still apply.  */
11693 #ifdef __cplusplus
11694 extern "C"
11695 #endif
11696 char readline ();
11697 int
11698 main ()
11699 {
11700 return readline ();
11701   ;
11702   return 0;
11703 }
11704 _ACEOF
11705 if ac_fn_c_try_link "$LINENO"; then :
11706
11707       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11708       # recognize dependent libraries; assume curses is needed if we didn't
11709       # find any dependency.
11710       case $host_os in
11711         netbsd* | openbsd* | irix*)
11712           if test x"$pgac_lib" = x"" ; then
11713             pgac_lib=" -lcurses"
11714           fi ;;
11715       esac
11716
11717       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11718       break
11719
11720 fi
11721 rm -f core conftest.err conftest.$ac_objext \
11722     conftest$ac_exeext conftest.$ac_ext
11723   done
11724   if test "$pgac_cv_check_readline" != no ; then
11725     break
11726   fi
11727 done
11728 LIBS=$pgac_save_LIBS
11729
11730 fi
11731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11732 $as_echo "$pgac_cv_check_readline" >&6; }
11733 if test "$pgac_cv_check_readline" != no ; then
11734   LIBS="$pgac_cv_check_readline $LIBS"
11735
11736 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11737
11738 fi
11739
11740
11741   if test x"$pgac_cv_check_readline" = x"no"; then
11742     as_fn_error $? "readline library not found
11743 If you have readline already installed, see config.log for details on the
11744 failure.  It is possible the compiler isn't looking in the proper directory.
11745 Use --without-readline to disable readline support." "$LINENO" 5
11746   fi
11747 fi
11748
11749 if test "$with_zlib" = yes; then
11750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11751 $as_echo_n "checking for inflate in -lz... " >&6; }
11752 if ${ac_cv_lib_z_inflate+:} false; then :
11753   $as_echo_n "(cached) " >&6
11754 else
11755   ac_check_lib_save_LIBS=$LIBS
11756 LIBS="-lz  $LIBS"
11757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11758 /* end confdefs.h.  */
11759
11760 /* Override any GCC internal prototype to avoid an error.
11761    Use char because int might match the return type of a GCC
11762    builtin and then its argument prototype would still apply.  */
11763 #ifdef __cplusplus
11764 extern "C"
11765 #endif
11766 char inflate ();
11767 int
11768 main ()
11769 {
11770 return inflate ();
11771   ;
11772   return 0;
11773 }
11774 _ACEOF
11775 if ac_fn_c_try_link "$LINENO"; then :
11776   ac_cv_lib_z_inflate=yes
11777 else
11778   ac_cv_lib_z_inflate=no
11779 fi
11780 rm -f core conftest.err conftest.$ac_objext \
11781     conftest$ac_exeext conftest.$ac_ext
11782 LIBS=$ac_check_lib_save_LIBS
11783 fi
11784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11785 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11786 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11787   cat >>confdefs.h <<_ACEOF
11788 #define HAVE_LIBZ 1
11789 _ACEOF
11790
11791   LIBS="-lz $LIBS"
11792
11793 else
11794   as_fn_error $? "zlib library not found
11795 If you have zlib already installed, see config.log for details on the
11796 failure.  It is possible the compiler isn't looking in the proper directory.
11797 Use --without-zlib to disable zlib support." "$LINENO" 5
11798 fi
11799
11800 fi
11801
11802 if test "$enable_spinlocks" = yes; then
11803
11804 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11805
11806 else
11807   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11808 *** Not using spinlocks will cause poor performance." >&5
11809 $as_echo "$as_me: WARNING:
11810 *** Not using spinlocks will cause poor performance." >&2;}
11811 fi
11812
11813 if test "$enable_atomics" = yes; then
11814
11815 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11816
11817 else
11818   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11819 *** Not using atomic operations will cause poor performance." >&5
11820 $as_echo "$as_me: WARNING:
11821 *** Not using atomic operations will cause poor performance." >&2;}
11822 fi
11823
11824 if test "$with_gssapi" = yes ; then
11825   if test "$PORTNAME" != "win32"; then
11826     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11827 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11828 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11829   $as_echo_n "(cached) " >&6
11830 else
11831   ac_func_search_save_LIBS=$LIBS
11832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11833 /* end confdefs.h.  */
11834
11835 /* Override any GCC internal prototype to avoid an error.
11836    Use char because int might match the return type of a GCC
11837    builtin and then its argument prototype would still apply.  */
11838 #ifdef __cplusplus
11839 extern "C"
11840 #endif
11841 char gss_init_sec_context ();
11842 int
11843 main ()
11844 {
11845 return gss_init_sec_context ();
11846   ;
11847   return 0;
11848 }
11849 _ACEOF
11850 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11851   if test -z "$ac_lib"; then
11852     ac_res="none required"
11853   else
11854     ac_res=-l$ac_lib
11855     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11856   fi
11857   if ac_fn_c_try_link "$LINENO"; then :
11858   ac_cv_search_gss_init_sec_context=$ac_res
11859 fi
11860 rm -f core conftest.err conftest.$ac_objext \
11861     conftest$ac_exeext
11862   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11863   break
11864 fi
11865 done
11866 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11867
11868 else
11869   ac_cv_search_gss_init_sec_context=no
11870 fi
11871 rm conftest.$ac_ext
11872 LIBS=$ac_func_search_save_LIBS
11873 fi
11874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11875 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11876 ac_res=$ac_cv_search_gss_init_sec_context
11877 if test "$ac_res" != no; then :
11878   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11879
11880 else
11881   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11882 fi
11883
11884   else
11885     LIBS="$LIBS -lgssapi32"
11886   fi
11887 fi
11888
11889 if test "$with_openssl" = yes ; then
11890     if test "$PORTNAME" != "win32"; then
11891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11892 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11893 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11894   $as_echo_n "(cached) " >&6
11895 else
11896   ac_check_lib_save_LIBS=$LIBS
11897 LIBS="-lcrypto  $LIBS"
11898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11899 /* end confdefs.h.  */
11900
11901 /* Override any GCC internal prototype to avoid an error.
11902    Use char because int might match the return type of a GCC
11903    builtin and then its argument prototype would still apply.  */
11904 #ifdef __cplusplus
11905 extern "C"
11906 #endif
11907 char CRYPTO_new_ex_data ();
11908 int
11909 main ()
11910 {
11911 return CRYPTO_new_ex_data ();
11912   ;
11913   return 0;
11914 }
11915 _ACEOF
11916 if ac_fn_c_try_link "$LINENO"; then :
11917   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11918 else
11919   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11920 fi
11921 rm -f core conftest.err conftest.$ac_objext \
11922     conftest$ac_exeext conftest.$ac_ext
11923 LIBS=$ac_check_lib_save_LIBS
11924 fi
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11926 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11927 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11928   cat >>confdefs.h <<_ACEOF
11929 #define HAVE_LIBCRYPTO 1
11930 _ACEOF
11931
11932   LIBS="-lcrypto $LIBS"
11933
11934 else
11935   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11936 fi
11937
11938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11939 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11940 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11941   $as_echo_n "(cached) " >&6
11942 else
11943   ac_check_lib_save_LIBS=$LIBS
11944 LIBS="-lssl  $LIBS"
11945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11946 /* end confdefs.h.  */
11947
11948 /* Override any GCC internal prototype to avoid an error.
11949    Use char because int might match the return type of a GCC
11950    builtin and then its argument prototype would still apply.  */
11951 #ifdef __cplusplus
11952 extern "C"
11953 #endif
11954 char SSL_new ();
11955 int
11956 main ()
11957 {
11958 return SSL_new ();
11959   ;
11960   return 0;
11961 }
11962 _ACEOF
11963 if ac_fn_c_try_link "$LINENO"; then :
11964   ac_cv_lib_ssl_SSL_new=yes
11965 else
11966   ac_cv_lib_ssl_SSL_new=no
11967 fi
11968 rm -f core conftest.err conftest.$ac_objext \
11969     conftest$ac_exeext conftest.$ac_ext
11970 LIBS=$ac_check_lib_save_LIBS
11971 fi
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
11973 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
11974 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
11975   cat >>confdefs.h <<_ACEOF
11976 #define HAVE_LIBSSL 1
11977 _ACEOF
11978
11979   LIBS="-lssl $LIBS"
11980
11981 else
11982   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
11983 fi
11984
11985   else
11986      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
11987 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
11988 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11989   $as_echo_n "(cached) " >&6
11990 else
11991   ac_func_search_save_LIBS=$LIBS
11992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11993 /* end confdefs.h.  */
11994
11995 /* Override any GCC internal prototype to avoid an error.
11996    Use char because int might match the return type of a GCC
11997    builtin and then its argument prototype would still apply.  */
11998 #ifdef __cplusplus
11999 extern "C"
12000 #endif
12001 char CRYPTO_new_ex_data ();
12002 int
12003 main ()
12004 {
12005 return CRYPTO_new_ex_data ();
12006   ;
12007   return 0;
12008 }
12009 _ACEOF
12010 for ac_lib in '' eay32 crypto; do
12011   if test -z "$ac_lib"; then
12012     ac_res="none required"
12013   else
12014     ac_res=-l$ac_lib
12015     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12016   fi
12017   if ac_fn_c_try_link "$LINENO"; then :
12018   ac_cv_search_CRYPTO_new_ex_data=$ac_res
12019 fi
12020 rm -f core conftest.err conftest.$ac_objext \
12021     conftest$ac_exeext
12022   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12023   break
12024 fi
12025 done
12026 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12027
12028 else
12029   ac_cv_search_CRYPTO_new_ex_data=no
12030 fi
12031 rm conftest.$ac_ext
12032 LIBS=$ac_func_search_save_LIBS
12033 fi
12034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12035 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12036 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12037 if test "$ac_res" != no; then :
12038   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12039
12040 else
12041   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12042 fi
12043
12044      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12045 $as_echo_n "checking for library containing SSL_new... " >&6; }
12046 if ${ac_cv_search_SSL_new+:} false; then :
12047   $as_echo_n "(cached) " >&6
12048 else
12049   ac_func_search_save_LIBS=$LIBS
12050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12051 /* end confdefs.h.  */
12052
12053 /* Override any GCC internal prototype to avoid an error.
12054    Use char because int might match the return type of a GCC
12055    builtin and then its argument prototype would still apply.  */
12056 #ifdef __cplusplus
12057 extern "C"
12058 #endif
12059 char SSL_new ();
12060 int
12061 main ()
12062 {
12063 return SSL_new ();
12064   ;
12065   return 0;
12066 }
12067 _ACEOF
12068 for ac_lib in '' ssleay32 ssl; do
12069   if test -z "$ac_lib"; then
12070     ac_res="none required"
12071   else
12072     ac_res=-l$ac_lib
12073     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12074   fi
12075   if ac_fn_c_try_link "$LINENO"; then :
12076   ac_cv_search_SSL_new=$ac_res
12077 fi
12078 rm -f core conftest.err conftest.$ac_objext \
12079     conftest$ac_exeext
12080   if ${ac_cv_search_SSL_new+:} false; then :
12081   break
12082 fi
12083 done
12084 if ${ac_cv_search_SSL_new+:} false; then :
12085
12086 else
12087   ac_cv_search_SSL_new=no
12088 fi
12089 rm conftest.$ac_ext
12090 LIBS=$ac_func_search_save_LIBS
12091 fi
12092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12093 $as_echo "$ac_cv_search_SSL_new" >&6; }
12094 ac_res=$ac_cv_search_SSL_new
12095 if test "$ac_res" != no; then :
12096   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12097
12098 else
12099   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12100 fi
12101
12102   fi
12103   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
12104 do :
12105   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12106 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12107 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12108   cat >>confdefs.h <<_ACEOF
12109 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12110 _ACEOF
12111
12112 fi
12113 done
12114
12115   # Functions introduced in OpenSSL 1.1.0. We used to check for
12116   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12117   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12118   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12119   # functions.
12120   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
12121 do :
12122   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12123 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12124 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12125   cat >>confdefs.h <<_ACEOF
12126 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12127 _ACEOF
12128
12129 fi
12130 done
12131
12132   # OpenSSL versions before 1.1.0 required setting callback functions, for
12133   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12134   # function was removed.
12135   for ac_func in CRYPTO_lock
12136 do :
12137   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12138 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12139   cat >>confdefs.h <<_ACEOF
12140 #define HAVE_CRYPTO_LOCK 1
12141 _ACEOF
12142
12143 fi
12144 done
12145
12146 fi
12147
12148 if test "$with_pam" = yes ; then
12149   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12150 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12151 if ${ac_cv_lib_pam_pam_start+:} false; then :
12152   $as_echo_n "(cached) " >&6
12153 else
12154   ac_check_lib_save_LIBS=$LIBS
12155 LIBS="-lpam  $LIBS"
12156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12157 /* end confdefs.h.  */
12158
12159 /* Override any GCC internal prototype to avoid an error.
12160    Use char because int might match the return type of a GCC
12161    builtin and then its argument prototype would still apply.  */
12162 #ifdef __cplusplus
12163 extern "C"
12164 #endif
12165 char pam_start ();
12166 int
12167 main ()
12168 {
12169 return pam_start ();
12170   ;
12171   return 0;
12172 }
12173 _ACEOF
12174 if ac_fn_c_try_link "$LINENO"; then :
12175   ac_cv_lib_pam_pam_start=yes
12176 else
12177   ac_cv_lib_pam_pam_start=no
12178 fi
12179 rm -f core conftest.err conftest.$ac_objext \
12180     conftest$ac_exeext conftest.$ac_ext
12181 LIBS=$ac_check_lib_save_LIBS
12182 fi
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12184 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12185 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12186   cat >>confdefs.h <<_ACEOF
12187 #define HAVE_LIBPAM 1
12188 _ACEOF
12189
12190   LIBS="-lpam $LIBS"
12191
12192 else
12193   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12194 fi
12195
12196 fi
12197
12198 if test "$with_libxml" = yes ; then
12199   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12200 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12201 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12202   $as_echo_n "(cached) " >&6
12203 else
12204   ac_check_lib_save_LIBS=$LIBS
12205 LIBS="-lxml2  $LIBS"
12206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12207 /* end confdefs.h.  */
12208
12209 /* Override any GCC internal prototype to avoid an error.
12210    Use char because int might match the return type of a GCC
12211    builtin and then its argument prototype would still apply.  */
12212 #ifdef __cplusplus
12213 extern "C"
12214 #endif
12215 char xmlSaveToBuffer ();
12216 int
12217 main ()
12218 {
12219 return xmlSaveToBuffer ();
12220   ;
12221   return 0;
12222 }
12223 _ACEOF
12224 if ac_fn_c_try_link "$LINENO"; then :
12225   ac_cv_lib_xml2_xmlSaveToBuffer=yes
12226 else
12227   ac_cv_lib_xml2_xmlSaveToBuffer=no
12228 fi
12229 rm -f core conftest.err conftest.$ac_objext \
12230     conftest$ac_exeext conftest.$ac_ext
12231 LIBS=$ac_check_lib_save_LIBS
12232 fi
12233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12234 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12235 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12236   cat >>confdefs.h <<_ACEOF
12237 #define HAVE_LIBXML2 1
12238 _ACEOF
12239
12240   LIBS="-lxml2 $LIBS"
12241
12242 else
12243   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12244 fi
12245
12246 fi
12247
12248 if test "$with_libxslt" = yes ; then
12249   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12250 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12251 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12252   $as_echo_n "(cached) " >&6
12253 else
12254   ac_check_lib_save_LIBS=$LIBS
12255 LIBS="-lxslt  $LIBS"
12256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12257 /* end confdefs.h.  */
12258
12259 /* Override any GCC internal prototype to avoid an error.
12260    Use char because int might match the return type of a GCC
12261    builtin and then its argument prototype would still apply.  */
12262 #ifdef __cplusplus
12263 extern "C"
12264 #endif
12265 char xsltCleanupGlobals ();
12266 int
12267 main ()
12268 {
12269 return xsltCleanupGlobals ();
12270   ;
12271   return 0;
12272 }
12273 _ACEOF
12274 if ac_fn_c_try_link "$LINENO"; then :
12275   ac_cv_lib_xslt_xsltCleanupGlobals=yes
12276 else
12277   ac_cv_lib_xslt_xsltCleanupGlobals=no
12278 fi
12279 rm -f core conftest.err conftest.$ac_objext \
12280     conftest$ac_exeext conftest.$ac_ext
12281 LIBS=$ac_check_lib_save_LIBS
12282 fi
12283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12284 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12285 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12286   cat >>confdefs.h <<_ACEOF
12287 #define HAVE_LIBXSLT 1
12288 _ACEOF
12289
12290   LIBS="-lxslt $LIBS"
12291
12292 else
12293   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12294 fi
12295
12296 fi
12297
12298 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12299 if test "$with_ldap" = yes ; then
12300   _LIBS="$LIBS"
12301   if test "$PORTNAME" != "win32"; then
12302     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12303 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12304 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12305   $as_echo_n "(cached) " >&6
12306 else
12307   ac_check_lib_save_LIBS=$LIBS
12308 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12310 /* end confdefs.h.  */
12311
12312 /* Override any GCC internal prototype to avoid an error.
12313    Use char because int might match the return type of a GCC
12314    builtin and then its argument prototype would still apply.  */
12315 #ifdef __cplusplus
12316 extern "C"
12317 #endif
12318 char ldap_bind ();
12319 int
12320 main ()
12321 {
12322 return ldap_bind ();
12323   ;
12324   return 0;
12325 }
12326 _ACEOF
12327 if ac_fn_c_try_link "$LINENO"; then :
12328   ac_cv_lib_ldap_ldap_bind=yes
12329 else
12330   ac_cv_lib_ldap_ldap_bind=no
12331 fi
12332 rm -f core conftest.err conftest.$ac_objext \
12333     conftest$ac_exeext conftest.$ac_ext
12334 LIBS=$ac_check_lib_save_LIBS
12335 fi
12336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12337 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12338 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12339   cat >>confdefs.h <<_ACEOF
12340 #define HAVE_LIBLDAP 1
12341 _ACEOF
12342
12343   LIBS="-lldap $LIBS"
12344
12345 else
12346   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12347 fi
12348
12349     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12350     if test "$enable_thread_safety" = yes; then
12351       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12352       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12353 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12354 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12355   $as_echo_n "(cached) " >&6
12356 else
12357   ac_check_lib_save_LIBS=$LIBS
12358 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12360 /* end confdefs.h.  */
12361
12362 /* Override any GCC internal prototype to avoid an error.
12363    Use char because int might match the return type of a GCC
12364    builtin and then its argument prototype would still apply.  */
12365 #ifdef __cplusplus
12366 extern "C"
12367 #endif
12368 char ldap_simple_bind ();
12369 int
12370 main ()
12371 {
12372 return ldap_simple_bind ();
12373   ;
12374   return 0;
12375 }
12376 _ACEOF
12377 if ac_fn_c_try_link "$LINENO"; then :
12378   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12379 else
12380   ac_cv_lib_ldap_r_ldap_simple_bind=no
12381 fi
12382 rm -f core conftest.err conftest.$ac_objext \
12383     conftest$ac_exeext conftest.$ac_ext
12384 LIBS=$ac_check_lib_save_LIBS
12385 fi
12386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12387 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12388 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12389   cat >>confdefs.h <<_ACEOF
12390 #define HAVE_LIBLDAP_R 1
12391 _ACEOF
12392
12393   LIBS="-lldap_r $LIBS"
12394
12395 else
12396   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12397 fi
12398
12399       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12400     else
12401       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12402     fi
12403     for ac_func in ldap_initialize
12404 do :
12405   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12406 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12407   cat >>confdefs.h <<_ACEOF
12408 #define HAVE_LDAP_INITIALIZE 1
12409 _ACEOF
12410
12411 fi
12412 done
12413
12414   else
12415     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12416 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12417 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12418   $as_echo_n "(cached) " >&6
12419 else
12420   ac_check_lib_save_LIBS=$LIBS
12421 LIBS="-lwldap32  $LIBS"
12422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12423 /* end confdefs.h.  */
12424
12425 /* Override any GCC internal prototype to avoid an error.
12426    Use char because int might match the return type of a GCC
12427    builtin and then its argument prototype would still apply.  */
12428 #ifdef __cplusplus
12429 extern "C"
12430 #endif
12431 char ldap_bind ();
12432 int
12433 main ()
12434 {
12435 return ldap_bind ();
12436   ;
12437   return 0;
12438 }
12439 _ACEOF
12440 if ac_fn_c_try_link "$LINENO"; then :
12441   ac_cv_lib_wldap32_ldap_bind=yes
12442 else
12443   ac_cv_lib_wldap32_ldap_bind=no
12444 fi
12445 rm -f core conftest.err conftest.$ac_objext \
12446     conftest$ac_exeext conftest.$ac_ext
12447 LIBS=$ac_check_lib_save_LIBS
12448 fi
12449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12450 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12451 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12452   cat >>confdefs.h <<_ACEOF
12453 #define HAVE_LIBWLDAP32 1
12454 _ACEOF
12455
12456   LIBS="-lwldap32 $LIBS"
12457
12458 else
12459   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12460 fi
12461
12462     LDAP_LIBS_FE="-lwldap32"
12463     LDAP_LIBS_BE="-lwldap32"
12464   fi
12465   LIBS="$_LIBS"
12466 fi
12467
12468
12469
12470 # for contrib/sepgsql
12471 if test "$with_selinux" = yes; then
12472   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12473 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12474 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12475   $as_echo_n "(cached) " >&6
12476 else
12477   ac_check_lib_save_LIBS=$LIBS
12478 LIBS="-lselinux  $LIBS"
12479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12480 /* end confdefs.h.  */
12481
12482 /* Override any GCC internal prototype to avoid an error.
12483    Use char because int might match the return type of a GCC
12484    builtin and then its argument prototype would still apply.  */
12485 #ifdef __cplusplus
12486 extern "C"
12487 #endif
12488 char security_compute_create_name ();
12489 int
12490 main ()
12491 {
12492 return security_compute_create_name ();
12493   ;
12494   return 0;
12495 }
12496 _ACEOF
12497 if ac_fn_c_try_link "$LINENO"; then :
12498   ac_cv_lib_selinux_security_compute_create_name=yes
12499 else
12500   ac_cv_lib_selinux_security_compute_create_name=no
12501 fi
12502 rm -f core conftest.err conftest.$ac_objext \
12503     conftest$ac_exeext conftest.$ac_ext
12504 LIBS=$ac_check_lib_save_LIBS
12505 fi
12506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12507 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12508 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12509   cat >>confdefs.h <<_ACEOF
12510 #define HAVE_LIBSELINUX 1
12511 _ACEOF
12512
12513   LIBS="-lselinux $LIBS"
12514
12515 else
12516   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12517 fi
12518
12519 fi
12520
12521 # for contrib/uuid-ossp
12522 if test "$with_uuid" = bsd ; then
12523   # On BSD, the UUID functions are in libc
12524   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12525 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12526   UUID_LIBS=""
12527 else
12528   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12529 fi
12530
12531 elif test "$with_uuid" = e2fs ; then
12532   # On macOS, the UUID functions are in libc
12533   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12534 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12535   UUID_LIBS=""
12536 else
12537   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12538 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12539 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12540   $as_echo_n "(cached) " >&6
12541 else
12542   ac_check_lib_save_LIBS=$LIBS
12543 LIBS="-luuid  $LIBS"
12544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12545 /* end confdefs.h.  */
12546
12547 /* Override any GCC internal prototype to avoid an error.
12548    Use char because int might match the return type of a GCC
12549    builtin and then its argument prototype would still apply.  */
12550 #ifdef __cplusplus
12551 extern "C"
12552 #endif
12553 char uuid_generate ();
12554 int
12555 main ()
12556 {
12557 return uuid_generate ();
12558   ;
12559   return 0;
12560 }
12561 _ACEOF
12562 if ac_fn_c_try_link "$LINENO"; then :
12563   ac_cv_lib_uuid_uuid_generate=yes
12564 else
12565   ac_cv_lib_uuid_uuid_generate=no
12566 fi
12567 rm -f core conftest.err conftest.$ac_objext \
12568     conftest$ac_exeext conftest.$ac_ext
12569 LIBS=$ac_check_lib_save_LIBS
12570 fi
12571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12572 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12573 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12574   UUID_LIBS="-luuid"
12575 else
12576   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12577 fi
12578
12579 fi
12580
12581 elif test "$with_uuid" = ossp ; then
12582   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12583 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12584 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12585   $as_echo_n "(cached) " >&6
12586 else
12587   ac_check_lib_save_LIBS=$LIBS
12588 LIBS="-lossp-uuid  $LIBS"
12589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12590 /* end confdefs.h.  */
12591
12592 /* Override any GCC internal prototype to avoid an error.
12593    Use char because int might match the return type of a GCC
12594    builtin and then its argument prototype would still apply.  */
12595 #ifdef __cplusplus
12596 extern "C"
12597 #endif
12598 char uuid_export ();
12599 int
12600 main ()
12601 {
12602 return uuid_export ();
12603   ;
12604   return 0;
12605 }
12606 _ACEOF
12607 if ac_fn_c_try_link "$LINENO"; then :
12608   ac_cv_lib_ossp_uuid_uuid_export=yes
12609 else
12610   ac_cv_lib_ossp_uuid_uuid_export=no
12611 fi
12612 rm -f core conftest.err conftest.$ac_objext \
12613     conftest$ac_exeext conftest.$ac_ext
12614 LIBS=$ac_check_lib_save_LIBS
12615 fi
12616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12617 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12618 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12619   UUID_LIBS="-lossp-uuid"
12620 else
12621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12622 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12623 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12624   $as_echo_n "(cached) " >&6
12625 else
12626   ac_check_lib_save_LIBS=$LIBS
12627 LIBS="-luuid  $LIBS"
12628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12629 /* end confdefs.h.  */
12630
12631 /* Override any GCC internal prototype to avoid an error.
12632    Use char because int might match the return type of a GCC
12633    builtin and then its argument prototype would still apply.  */
12634 #ifdef __cplusplus
12635 extern "C"
12636 #endif
12637 char uuid_export ();
12638 int
12639 main ()
12640 {
12641 return uuid_export ();
12642   ;
12643   return 0;
12644 }
12645 _ACEOF
12646 if ac_fn_c_try_link "$LINENO"; then :
12647   ac_cv_lib_uuid_uuid_export=yes
12648 else
12649   ac_cv_lib_uuid_uuid_export=no
12650 fi
12651 rm -f core conftest.err conftest.$ac_objext \
12652     conftest$ac_exeext conftest.$ac_ext
12653 LIBS=$ac_check_lib_save_LIBS
12654 fi
12655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12656 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12657 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12658   UUID_LIBS="-luuid"
12659 else
12660   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12661 fi
12662
12663 fi
12664
12665 fi
12666
12667
12668
12669 ##
12670 ## Header files
12671 ##
12672
12673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12674 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12675 if ${ac_cv_header_stdbool_h+:} false; then :
12676   $as_echo_n "(cached) " >&6
12677 else
12678   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12679 /* end confdefs.h.  */
12680
12681              #include <stdbool.h>
12682              #ifndef bool
12683               "error: bool is not defined"
12684              #endif
12685              #ifndef false
12686               "error: false is not defined"
12687              #endif
12688              #if false
12689               "error: false is not 0"
12690              #endif
12691              #ifndef true
12692               "error: true is not defined"
12693              #endif
12694              #if true != 1
12695               "error: true is not 1"
12696              #endif
12697              #ifndef __bool_true_false_are_defined
12698               "error: __bool_true_false_are_defined is not defined"
12699              #endif
12700
12701              struct s { _Bool s: 1; _Bool t; } s;
12702
12703              char a[true == 1 ? 1 : -1];
12704              char b[false == 0 ? 1 : -1];
12705              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12706              char d[(bool) 0.5 == true ? 1 : -1];
12707              /* See body of main program for 'e'.  */
12708              char f[(_Bool) 0.0 == false ? 1 : -1];
12709              char g[true];
12710              char h[sizeof (_Bool)];
12711              char i[sizeof s.t];
12712              enum { j = false, k = true, l = false * true, m = true * 256 };
12713              /* The following fails for
12714                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12715              _Bool n[m];
12716              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12717              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12718              /* Catch a bug in an HP-UX C compiler.  See
12719                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12720                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12721               */
12722              _Bool q = true;
12723              _Bool *pq = &q;
12724
12725 int
12726 main ()
12727 {
12728
12729              bool e = &s;
12730              *pq |= q;
12731              *pq |= ! q;
12732              /* Refer to every declared value, to avoid compiler optimizations.  */
12733              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12734                      + !m + !n + !o + !p + !q + !pq);
12735
12736   ;
12737   return 0;
12738 }
12739 _ACEOF
12740 if ac_fn_c_try_compile "$LINENO"; then :
12741   ac_cv_header_stdbool_h=yes
12742 else
12743   ac_cv_header_stdbool_h=no
12744 fi
12745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12746 fi
12747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12748 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12749    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12750 if test "x$ac_cv_type__Bool" = xyes; then :
12751
12752 cat >>confdefs.h <<_ACEOF
12753 #define HAVE__BOOL 1
12754 _ACEOF
12755
12756
12757 fi
12758
12759
12760 if test $ac_cv_header_stdbool_h = yes; then
12761
12762 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12763
12764 fi
12765
12766
12767 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
12768 do :
12769   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12770 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12771 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12772   cat >>confdefs.h <<_ACEOF
12773 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12774 _ACEOF
12775
12776 fi
12777
12778 done
12779
12780
12781 # On BSD, test for net/if.h will fail unless sys/socket.h
12782 # is included first.
12783 for ac_header in net/if.h
12784 do :
12785   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12786 #include <sys/socket.h>
12787
12788 "
12789 if test "x$ac_cv_header_net_if_h" = xyes; then :
12790   cat >>confdefs.h <<_ACEOF
12791 #define HAVE_NET_IF_H 1
12792 _ACEOF
12793
12794 fi
12795
12796 done
12797
12798
12799 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12800 # is included first.
12801 for ac_header in sys/ucred.h
12802 do :
12803   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12804 #include <sys/param.h>
12805
12806 "
12807 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12808   cat >>confdefs.h <<_ACEOF
12809 #define HAVE_SYS_UCRED_H 1
12810 _ACEOF
12811
12812 fi
12813
12814 done
12815
12816
12817 # At least on IRIX, test for netinet/tcp.h will fail unless
12818 # netinet/in.h is included first.
12819 for ac_header in netinet/tcp.h
12820 do :
12821   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12822 #include <netinet/in.h>
12823
12824 "
12825 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12826   cat >>confdefs.h <<_ACEOF
12827 #define HAVE_NETINET_TCP_H 1
12828 _ACEOF
12829
12830 fi
12831
12832 done
12833
12834
12835 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12836   for ac_header in readline/readline.h
12837 do :
12838   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12839 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12840   cat >>confdefs.h <<_ACEOF
12841 #define HAVE_READLINE_READLINE_H 1
12842 _ACEOF
12843
12844 else
12845   for ac_header in readline.h
12846 do :
12847   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12848 if test "x$ac_cv_header_readline_h" = xyes; then :
12849   cat >>confdefs.h <<_ACEOF
12850 #define HAVE_READLINE_H 1
12851 _ACEOF
12852
12853 else
12854   as_fn_error $? "readline header not found
12855 If you have readline already installed, see config.log for details on the
12856 failure.  It is possible the compiler isn't looking in the proper directory.
12857 Use --without-readline to disable readline support." "$LINENO" 5
12858 fi
12859
12860 done
12861
12862 fi
12863
12864 done
12865
12866   for ac_header in readline/history.h
12867 do :
12868   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12869 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12870   cat >>confdefs.h <<_ACEOF
12871 #define HAVE_READLINE_HISTORY_H 1
12872 _ACEOF
12873
12874 else
12875   for ac_header in history.h
12876 do :
12877   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12878 if test "x$ac_cv_header_history_h" = xyes; then :
12879   cat >>confdefs.h <<_ACEOF
12880 #define HAVE_HISTORY_H 1
12881 _ACEOF
12882
12883 else
12884   as_fn_error $? "history header not found
12885 If you have readline already installed, see config.log for details on the
12886 failure.  It is possible the compiler isn't looking in the proper directory.
12887 Use --without-readline to disable readline support." "$LINENO" 5
12888 fi
12889
12890 done
12891
12892 fi
12893
12894 done
12895
12896 fi
12897
12898 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12899 # Some installations of libedit usurp /usr/include/readline/, which seems
12900 # bad practice, since in combined installations readline will have its headers
12901 # there.  We might have to resort to AC_EGREP checks to make sure we found
12902 # the proper header...
12903   for ac_header in editline/readline.h
12904 do :
12905   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12906 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12907   cat >>confdefs.h <<_ACEOF
12908 #define HAVE_EDITLINE_READLINE_H 1
12909 _ACEOF
12910
12911 else
12912   for ac_header in readline.h
12913 do :
12914   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12915 if test "x$ac_cv_header_readline_h" = xyes; then :
12916   cat >>confdefs.h <<_ACEOF
12917 #define HAVE_READLINE_H 1
12918 _ACEOF
12919
12920 else
12921   for ac_header in readline/readline.h
12922 do :
12923   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12924 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12925   cat >>confdefs.h <<_ACEOF
12926 #define HAVE_READLINE_READLINE_H 1
12927 _ACEOF
12928
12929 else
12930   as_fn_error $? "readline header not found
12931 If you have libedit already installed, see config.log for details on the
12932 failure.  It is possible the compiler isn't looking in the proper directory.
12933 Use --without-readline to disable libedit support." "$LINENO" 5
12934 fi
12935
12936 done
12937
12938 fi
12939
12940 done
12941
12942 fi
12943
12944 done
12945
12946 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12947 # not be there at all.  Hence, don't complain if not found.  We must check
12948 # though, since in yet other versions it is an independent header.
12949   for ac_header in editline/history.h
12950 do :
12951   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12952 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12953   cat >>confdefs.h <<_ACEOF
12954 #define HAVE_EDITLINE_HISTORY_H 1
12955 _ACEOF
12956
12957 else
12958   for ac_header in history.h
12959 do :
12960   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12961 if test "x$ac_cv_header_history_h" = xyes; then :
12962   cat >>confdefs.h <<_ACEOF
12963 #define HAVE_HISTORY_H 1
12964 _ACEOF
12965
12966 else
12967   for ac_header in readline/history.h
12968 do :
12969   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12970 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12971   cat >>confdefs.h <<_ACEOF
12972 #define HAVE_READLINE_HISTORY_H 1
12973 _ACEOF
12974
12975 fi
12976
12977 done
12978
12979 fi
12980
12981 done
12982
12983 fi
12984
12985 done
12986
12987 fi
12988
12989 if test "$with_zlib" = yes; then
12990   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
12991 if test "x$ac_cv_header_zlib_h" = xyes; then :
12992
12993 else
12994   as_fn_error $? "zlib header not found
12995 If you have zlib already installed, see config.log for details on the
12996 failure.  It is possible the compiler isn't looking in the proper directory.
12997 Use --without-zlib to disable zlib support." "$LINENO" 5
12998 fi
12999
13000
13001 fi
13002
13003 if test "$with_gssapi" = yes ; then
13004   for ac_header in gssapi/gssapi.h
13005 do :
13006   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13007 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13008   cat >>confdefs.h <<_ACEOF
13009 #define HAVE_GSSAPI_GSSAPI_H 1
13010 _ACEOF
13011
13012 else
13013   for ac_header in gssapi.h
13014 do :
13015   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13016 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13017   cat >>confdefs.h <<_ACEOF
13018 #define HAVE_GSSAPI_H 1
13019 _ACEOF
13020
13021 else
13022   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13023 fi
13024
13025 done
13026
13027 fi
13028
13029 done
13030
13031 fi
13032
13033 if test "$with_openssl" = yes ; then
13034   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13035 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13036
13037 else
13038   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13039 fi
13040
13041
13042   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13043 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13044
13045 else
13046   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13047 fi
13048
13049
13050 fi
13051
13052 if test "$with_pam" = yes ; then
13053   for ac_header in security/pam_appl.h
13054 do :
13055   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13056 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13057   cat >>confdefs.h <<_ACEOF
13058 #define HAVE_SECURITY_PAM_APPL_H 1
13059 _ACEOF
13060
13061 else
13062   for ac_header in pam/pam_appl.h
13063 do :
13064   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13065 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13066   cat >>confdefs.h <<_ACEOF
13067 #define HAVE_PAM_PAM_APPL_H 1
13068 _ACEOF
13069
13070 else
13071   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13072 fi
13073
13074 done
13075
13076 fi
13077
13078 done
13079
13080 fi
13081
13082 if test "$with_bsd_auth" = yes ; then
13083   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13084 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13085
13086 else
13087   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13088 fi
13089
13090
13091 fi
13092
13093 if test "$with_systemd" = yes ; then
13094   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13095 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13096
13097 else
13098   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13099 fi
13100
13101
13102 fi
13103
13104 if test "$with_libxml" = yes ; then
13105   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13106 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13107
13108 else
13109   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13110 fi
13111
13112
13113 fi
13114
13115 if test "$with_libxslt" = yes ; then
13116   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13117 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13118
13119 else
13120   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13121 fi
13122
13123
13124 fi
13125
13126 if test "$with_ldap" = yes ; then
13127   if test "$PORTNAME" != "win32"; then
13128      for ac_header in ldap.h
13129 do :
13130   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13131 if test "x$ac_cv_header_ldap_h" = xyes; then :
13132   cat >>confdefs.h <<_ACEOF
13133 #define HAVE_LDAP_H 1
13134 _ACEOF
13135
13136 else
13137   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13138 fi
13139
13140 done
13141
13142      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13143 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13144 if ${pgac_cv_ldap_safe+:} false; then :
13145   $as_echo_n "(cached) " >&6
13146 else
13147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13148 /* end confdefs.h.  */
13149 #include <ldap.h>
13150 #if !defined(LDAP_VENDOR_VERSION) || \
13151      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13152       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13153 choke me
13154 #endif
13155 int
13156 main ()
13157 {
13158
13159   ;
13160   return 0;
13161 }
13162 _ACEOF
13163 if ac_fn_c_try_compile "$LINENO"; then :
13164   pgac_cv_ldap_safe=yes
13165 else
13166   pgac_cv_ldap_safe=no
13167 fi
13168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13169 fi
13170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13171 $as_echo "$pgac_cv_ldap_safe" >&6; }
13172
13173 if test "$pgac_cv_ldap_safe" != yes; then
13174   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13175 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13176 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13177 *** also uses LDAP will crash on exit." >&5
13178 $as_echo "$as_me: WARNING:
13179 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13180 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13181 *** also uses LDAP will crash on exit." >&2;}
13182 fi
13183   else
13184      for ac_header in winldap.h
13185 do :
13186   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13187 #include <windows.h>
13188
13189 "
13190 if test "x$ac_cv_header_winldap_h" = xyes; then :
13191   cat >>confdefs.h <<_ACEOF
13192 #define HAVE_WINLDAP_H 1
13193 _ACEOF
13194
13195 else
13196   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13197 fi
13198
13199 done
13200
13201   fi
13202 fi
13203
13204 if test "$with_bonjour" = yes ; then
13205   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13206 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13207
13208 else
13209   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13210 fi
13211
13212
13213 fi
13214
13215 # for contrib/uuid-ossp
13216 if test "$with_uuid" = bsd ; then
13217   for ac_header in uuid.h
13218 do :
13219   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13220 if test "x$ac_cv_header_uuid_h" = xyes; then :
13221   cat >>confdefs.h <<_ACEOF
13222 #define HAVE_UUID_H 1
13223 _ACEOF
13224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13225 /* end confdefs.h.  */
13226 #include <uuid.h>
13227
13228 _ACEOF
13229 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13230   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13231
13232 else
13233   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13234 fi
13235 rm -f conftest*
13236
13237 else
13238   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13239 fi
13240
13241 done
13242
13243 elif test "$with_uuid" = e2fs ; then
13244   for ac_header in uuid/uuid.h
13245 do :
13246   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13247 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13248   cat >>confdefs.h <<_ACEOF
13249 #define HAVE_UUID_UUID_H 1
13250 _ACEOF
13251  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13252 /* end confdefs.h.  */
13253 #include <uuid/uuid.h>
13254
13255 _ACEOF
13256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13257   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13258
13259 else
13260   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13261 fi
13262 rm -f conftest*
13263
13264 else
13265   for ac_header in uuid.h
13266 do :
13267   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13268 if test "x$ac_cv_header_uuid_h" = xyes; then :
13269   cat >>confdefs.h <<_ACEOF
13270 #define HAVE_UUID_H 1
13271 _ACEOF
13272  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13273 /* end confdefs.h.  */
13274 #include <uuid.h>
13275
13276 _ACEOF
13277 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13278   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13279
13280 else
13281   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13282 fi
13283 rm -f conftest*
13284
13285 else
13286   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13287 fi
13288
13289 done
13290
13291 fi
13292
13293 done
13294
13295 elif test "$with_uuid" = ossp ; then
13296   for ac_header in ossp/uuid.h
13297 do :
13298   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13299 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13300   cat >>confdefs.h <<_ACEOF
13301 #define HAVE_OSSP_UUID_H 1
13302 _ACEOF
13303  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13304 /* end confdefs.h.  */
13305 #include <ossp/uuid.h>
13306
13307 _ACEOF
13308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13309   $EGREP "uuid_export" >/dev/null 2>&1; then :
13310
13311 else
13312   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13313 fi
13314 rm -f conftest*
13315
13316 else
13317   for ac_header in uuid.h
13318 do :
13319   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13320 if test "x$ac_cv_header_uuid_h" = xyes; then :
13321   cat >>confdefs.h <<_ACEOF
13322 #define HAVE_UUID_H 1
13323 _ACEOF
13324  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13325 /* end confdefs.h.  */
13326 #include <uuid.h>
13327
13328 _ACEOF
13329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13330   $EGREP "uuid_export" >/dev/null 2>&1; then :
13331
13332 else
13333   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13334 fi
13335 rm -f conftest*
13336
13337 else
13338   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13339 fi
13340
13341 done
13342
13343 fi
13344
13345 done
13346
13347 fi
13348
13349 if test "$PORTNAME" = "win32" ; then
13350    for ac_header in crtdefs.h
13351 do :
13352   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13353 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13354   cat >>confdefs.h <<_ACEOF
13355 #define HAVE_CRTDEFS_H 1
13356 _ACEOF
13357
13358 fi
13359
13360 done
13361
13362 fi
13363
13364 ##
13365 ## Types, structures, compiler characteristics
13366 ##
13367
13368   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13369 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13370 if ${ac_cv_c_bigendian+:} false; then :
13371   $as_echo_n "(cached) " >&6
13372 else
13373   ac_cv_c_bigendian=unknown
13374     # See if we're dealing with a universal compiler.
13375     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13376 /* end confdefs.h.  */
13377 #ifndef __APPLE_CC__
13378                not a universal capable compiler
13379              #endif
13380              typedef int dummy;
13381
13382 _ACEOF
13383 if ac_fn_c_try_compile "$LINENO"; then :
13384
13385         # Check for potential -arch flags.  It is not universal unless
13386         # there are at least two -arch flags with different values.
13387         ac_arch=
13388         ac_prev=
13389         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13390          if test -n "$ac_prev"; then
13391            case $ac_word in
13392              i?86 | x86_64 | ppc | ppc64)
13393                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13394                  ac_arch=$ac_word
13395                else
13396                  ac_cv_c_bigendian=universal
13397                  break
13398                fi
13399                ;;
13400            esac
13401            ac_prev=
13402          elif test "x$ac_word" = "x-arch"; then
13403            ac_prev=arch
13404          fi
13405        done
13406 fi
13407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13408     if test $ac_cv_c_bigendian = unknown; then
13409       # See if sys/param.h defines the BYTE_ORDER macro.
13410       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13411 /* end confdefs.h.  */
13412 #include <sys/types.h>
13413              #include <sys/param.h>
13414
13415 int
13416 main ()
13417 {
13418 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13419                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13420                      && LITTLE_ENDIAN)
13421               bogus endian macros
13422              #endif
13423
13424   ;
13425   return 0;
13426 }
13427 _ACEOF
13428 if ac_fn_c_try_compile "$LINENO"; then :
13429   # It does; now see whether it defined to BIG_ENDIAN or not.
13430          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13431 /* end confdefs.h.  */
13432 #include <sys/types.h>
13433                 #include <sys/param.h>
13434
13435 int
13436 main ()
13437 {
13438 #if BYTE_ORDER != BIG_ENDIAN
13439                  not big endian
13440                 #endif
13441
13442   ;
13443   return 0;
13444 }
13445 _ACEOF
13446 if ac_fn_c_try_compile "$LINENO"; then :
13447   ac_cv_c_bigendian=yes
13448 else
13449   ac_cv_c_bigendian=no
13450 fi
13451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13452 fi
13453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13454     fi
13455     if test $ac_cv_c_bigendian = unknown; then
13456       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13457       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13458 /* end confdefs.h.  */
13459 #include <limits.h>
13460
13461 int
13462 main ()
13463 {
13464 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13465               bogus endian macros
13466              #endif
13467
13468   ;
13469   return 0;
13470 }
13471 _ACEOF
13472 if ac_fn_c_try_compile "$LINENO"; then :
13473   # It does; now see whether it defined to _BIG_ENDIAN or not.
13474          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13475 /* end confdefs.h.  */
13476 #include <limits.h>
13477
13478 int
13479 main ()
13480 {
13481 #ifndef _BIG_ENDIAN
13482                  not big endian
13483                 #endif
13484
13485   ;
13486   return 0;
13487 }
13488 _ACEOF
13489 if ac_fn_c_try_compile "$LINENO"; then :
13490   ac_cv_c_bigendian=yes
13491 else
13492   ac_cv_c_bigendian=no
13493 fi
13494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13495 fi
13496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13497     fi
13498     if test $ac_cv_c_bigendian = unknown; then
13499       # Compile a test program.
13500       if test "$cross_compiling" = yes; then :
13501   # Try to guess by grepping values from an object file.
13502          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13503 /* end confdefs.h.  */
13504 short int ascii_mm[] =
13505                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13506                 short int ascii_ii[] =
13507                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13508                 int use_ascii (int i) {
13509                   return ascii_mm[i] + ascii_ii[i];
13510                 }
13511                 short int ebcdic_ii[] =
13512                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13513                 short int ebcdic_mm[] =
13514                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13515                 int use_ebcdic (int i) {
13516                   return ebcdic_mm[i] + ebcdic_ii[i];
13517                 }
13518                 extern int foo;
13519
13520 int
13521 main ()
13522 {
13523 return use_ascii (foo) == use_ebcdic (foo);
13524   ;
13525   return 0;
13526 }
13527 _ACEOF
13528 if ac_fn_c_try_compile "$LINENO"; then :
13529   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13530               ac_cv_c_bigendian=yes
13531             fi
13532             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13533               if test "$ac_cv_c_bigendian" = unknown; then
13534                 ac_cv_c_bigendian=no
13535               else
13536                 # finding both strings is unlikely to happen, but who knows?
13537                 ac_cv_c_bigendian=unknown
13538               fi
13539             fi
13540 fi
13541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13542 else
13543   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13544 /* end confdefs.h.  */
13545 $ac_includes_default
13546 int
13547 main ()
13548 {
13549
13550              /* Are we little or big endian?  From Harbison&Steele.  */
13551              union
13552              {
13553                long int l;
13554                char c[sizeof (long int)];
13555              } u;
13556              u.l = 1;
13557              return u.c[sizeof (long int) - 1] == 1;
13558
13559   ;
13560   return 0;
13561 }
13562 _ACEOF
13563 if ac_fn_c_try_run "$LINENO"; then :
13564   ac_cv_c_bigendian=no
13565 else
13566   ac_cv_c_bigendian=yes
13567 fi
13568 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13569   conftest.$ac_objext conftest.beam conftest.$ac_ext
13570 fi
13571
13572     fi
13573 fi
13574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13575 $as_echo "$ac_cv_c_bigendian" >&6; }
13576  case $ac_cv_c_bigendian in #(
13577    yes)
13578      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13579 ;; #(
13580    no)
13581       ;; #(
13582    universal)
13583
13584 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13585
13586      ;; #(
13587    *)
13588      as_fn_error $? "unknown endianness
13589  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13590  esac
13591
13592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13593 $as_echo_n "checking for inline... " >&6; }
13594 if ${ac_cv_c_inline+:} false; then :
13595   $as_echo_n "(cached) " >&6
13596 else
13597   ac_cv_c_inline=no
13598 for ac_kw in inline __inline__ __inline; do
13599   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13600 /* end confdefs.h.  */
13601 #ifndef __cplusplus
13602 typedef int foo_t;
13603 static $ac_kw foo_t static_foo () {return 0; }
13604 $ac_kw foo_t foo () {return 0; }
13605 #endif
13606
13607 _ACEOF
13608 if ac_fn_c_try_compile "$LINENO"; then :
13609   ac_cv_c_inline=$ac_kw
13610 fi
13611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13612   test "$ac_cv_c_inline" != no && break
13613 done
13614
13615 fi
13616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13617 $as_echo "$ac_cv_c_inline" >&6; }
13618
13619 case $ac_cv_c_inline in
13620   inline | yes) ;;
13621   *)
13622     case $ac_cv_c_inline in
13623       no) ac_val=;;
13624       *) ac_val=$ac_cv_c_inline;;
13625     esac
13626     cat >>confdefs.h <<_ACEOF
13627 #ifndef __cplusplus
13628 #define inline $ac_val
13629 #endif
13630 _ACEOF
13631     ;;
13632 esac
13633
13634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13635 $as_echo_n "checking for printf format archetype... " >&6; }
13636 if ${pgac_cv_printf_archetype+:} false; then :
13637   $as_echo_n "(cached) " >&6
13638 else
13639   pgac_cv_printf_archetype=gnu_printf
13640 ac_save_c_werror_flag=$ac_c_werror_flag
13641 ac_c_werror_flag=yes
13642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13643 /* end confdefs.h.  */
13644 extern void pgac_write(int ignore, const char *fmt,...)
13645 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13646 int
13647 main ()
13648 {
13649 pgac_write(0, "error %s: %m", "foo");
13650   ;
13651   return 0;
13652 }
13653 _ACEOF
13654 if ac_fn_c_try_compile "$LINENO"; then :
13655   ac_archetype_ok=yes
13656 else
13657   ac_archetype_ok=no
13658 fi
13659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13660 ac_c_werror_flag=$ac_save_c_werror_flag
13661
13662 if [ "$ac_archetype_ok" = no ]; then
13663   pgac_cv_printf_archetype=__syslog__
13664   ac_save_c_werror_flag=$ac_c_werror_flag
13665 ac_c_werror_flag=yes
13666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13667 /* end confdefs.h.  */
13668 extern void pgac_write(int ignore, const char *fmt,...)
13669 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13670 int
13671 main ()
13672 {
13673 pgac_write(0, "error %s: %m", "foo");
13674   ;
13675   return 0;
13676 }
13677 _ACEOF
13678 if ac_fn_c_try_compile "$LINENO"; then :
13679   ac_archetype_ok=yes
13680 else
13681   ac_archetype_ok=no
13682 fi
13683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13684 ac_c_werror_flag=$ac_save_c_werror_flag
13685
13686   if [ "$ac_archetype_ok" = no ]; then
13687     pgac_cv_printf_archetype=printf
13688   fi
13689 fi
13690 fi
13691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13692 $as_echo "$pgac_cv_printf_archetype" >&6; }
13693
13694 cat >>confdefs.h <<_ACEOF
13695 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13696 _ACEOF
13697
13698
13699
13700   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13701 $as_echo_n "checking for flexible array members... " >&6; }
13702 if ${ac_cv_c_flexmember+:} false; then :
13703   $as_echo_n "(cached) " >&6
13704 else
13705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13706 /* end confdefs.h.  */
13707 #include <stdlib.h>
13708             #include <stdio.h>
13709             #include <stddef.h>
13710             struct s { int n; double d[]; };
13711 int
13712 main ()
13713 {
13714 int m = getchar ();
13715             struct s *p = malloc (offsetof (struct s, d)
13716                                   + m * sizeof (double));
13717             p->d[0] = 0.0;
13718             return p->d != (double *) NULL;
13719   ;
13720   return 0;
13721 }
13722 _ACEOF
13723 if ac_fn_c_try_compile "$LINENO"; then :
13724   ac_cv_c_flexmember=yes
13725 else
13726   ac_cv_c_flexmember=no
13727 fi
13728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13729 fi
13730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13731 $as_echo "$ac_cv_c_flexmember" >&6; }
13732   if test $ac_cv_c_flexmember = yes; then
13733
13734 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13735
13736   else
13737     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13738
13739   fi
13740
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13742 $as_echo_n "checking for signed types... " >&6; }
13743 if ${pgac_cv_c_signed+:} false; then :
13744   $as_echo_n "(cached) " >&6
13745 else
13746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13747 /* end confdefs.h.  */
13748
13749 int
13750 main ()
13751 {
13752 signed char c; signed short s; signed int i;
13753   ;
13754   return 0;
13755 }
13756 _ACEOF
13757 if ac_fn_c_try_compile "$LINENO"; then :
13758   pgac_cv_c_signed=yes
13759 else
13760   pgac_cv_c_signed=no
13761 fi
13762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13763 fi
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13765 $as_echo "$pgac_cv_c_signed" >&6; }
13766 if test x"$pgac_cv_c_signed" = xno ; then
13767
13768 $as_echo "#define signed /**/" >>confdefs.h
13769
13770 fi
13771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13772 $as_echo_n "checking for __func__... " >&6; }
13773 if ${pgac_cv_funcname_func_support+:} false; then :
13774   $as_echo_n "(cached) " >&6
13775 else
13776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13777 /* end confdefs.h.  */
13778 #include <stdio.h>
13779 int
13780 main ()
13781 {
13782 printf("%s\n", __func__);
13783   ;
13784   return 0;
13785 }
13786 _ACEOF
13787 if ac_fn_c_try_compile "$LINENO"; then :
13788   pgac_cv_funcname_func_support=yes
13789 else
13790   pgac_cv_funcname_func_support=no
13791 fi
13792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13793 fi
13794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13795 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13796 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13797
13798 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13799
13800 else
13801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13802 $as_echo_n "checking for __FUNCTION__... " >&6; }
13803 if ${pgac_cv_funcname_function_support+:} false; then :
13804   $as_echo_n "(cached) " >&6
13805 else
13806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13807 /* end confdefs.h.  */
13808 #include <stdio.h>
13809 int
13810 main ()
13811 {
13812 printf("%s\n", __FUNCTION__);
13813   ;
13814   return 0;
13815 }
13816 _ACEOF
13817 if ac_fn_c_try_compile "$LINENO"; then :
13818   pgac_cv_funcname_function_support=yes
13819 else
13820   pgac_cv_funcname_function_support=no
13821 fi
13822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13823 fi
13824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13825 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13826 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13827
13828 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13829
13830 fi
13831 fi
13832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13833 $as_echo_n "checking for _Static_assert... " >&6; }
13834 if ${pgac_cv__static_assert+:} false; then :
13835   $as_echo_n "(cached) " >&6
13836 else
13837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13838 /* end confdefs.h.  */
13839
13840 int
13841 main ()
13842 {
13843 ({ _Static_assert(1, "foo"); })
13844   ;
13845   return 0;
13846 }
13847 _ACEOF
13848 if ac_fn_c_try_link "$LINENO"; then :
13849   pgac_cv__static_assert=yes
13850 else
13851   pgac_cv__static_assert=no
13852 fi
13853 rm -f core conftest.err conftest.$ac_objext \
13854     conftest$ac_exeext conftest.$ac_ext
13855 fi
13856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13857 $as_echo "$pgac_cv__static_assert" >&6; }
13858 if test x"$pgac_cv__static_assert" = xyes ; then
13859
13860 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13861
13862 fi
13863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13864 $as_echo_n "checking for typeof... " >&6; }
13865 if ${pgac_cv_c_typeof+:} false; then :
13866   $as_echo_n "(cached) " >&6
13867 else
13868   pgac_cv_c_typeof=no
13869 for pgac_kw in typeof __typeof__ decltype; do
13870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13871 /* end confdefs.h.  */
13872
13873 int
13874 main ()
13875 {
13876 int x = 0;
13877 $pgac_kw(x) y;
13878 y = x;
13879 return y;
13880   ;
13881   return 0;
13882 }
13883 _ACEOF
13884 if ac_fn_c_try_compile "$LINENO"; then :
13885   pgac_cv_c_typeof=$pgac_kw
13886 fi
13887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13888   test "$pgac_cv_c_typeof" != no && break
13889 done
13890 fi
13891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13892 $as_echo "$pgac_cv_c_typeof" >&6; }
13893 if test "$pgac_cv_c_typeof" != no; then
13894
13895 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13896
13897   if test "$pgac_cv_c_typeof" != typeof; then
13898
13899 cat >>confdefs.h <<_ACEOF
13900 #define typeof $pgac_cv_c_typeof
13901 _ACEOF
13902
13903   fi
13904 fi
13905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13906 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13907 if ${pgac_cv__types_compatible+:} false; then :
13908   $as_echo_n "(cached) " >&6
13909 else
13910   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13911 /* end confdefs.h.  */
13912
13913 int
13914 main ()
13915 {
13916  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13917   ;
13918   return 0;
13919 }
13920 _ACEOF
13921 if ac_fn_c_try_compile "$LINENO"; then :
13922   pgac_cv__types_compatible=yes
13923 else
13924   pgac_cv__types_compatible=no
13925 fi
13926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13927 fi
13928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13929 $as_echo "$pgac_cv__types_compatible" >&6; }
13930 if test x"$pgac_cv__types_compatible" = xyes ; then
13931
13932 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13933
13934 fi
13935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13936 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13937 if ${pgac_cv__builtin_bswap16+:} false; then :
13938   $as_echo_n "(cached) " >&6
13939 else
13940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13941 /* end confdefs.h.  */
13942 static unsigned long int x = __builtin_bswap16(0xaabb);
13943
13944 _ACEOF
13945 if ac_fn_c_try_compile "$LINENO"; then :
13946   pgac_cv__builtin_bswap16=yes
13947 else
13948   pgac_cv__builtin_bswap16=no
13949 fi
13950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13951 fi
13952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13953 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13954 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13955
13956 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13957
13958 fi
13959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13960 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13961 if ${pgac_cv__builtin_bswap32+:} false; then :
13962   $as_echo_n "(cached) " >&6
13963 else
13964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13965 /* end confdefs.h.  */
13966 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13967
13968 _ACEOF
13969 if ac_fn_c_try_compile "$LINENO"; then :
13970   pgac_cv__builtin_bswap32=yes
13971 else
13972   pgac_cv__builtin_bswap32=no
13973 fi
13974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13975 fi
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
13977 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
13978 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
13979
13980 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
13981
13982 fi
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
13984 $as_echo_n "checking for __builtin_bswap64... " >&6; }
13985 if ${pgac_cv__builtin_bswap64+:} false; then :
13986   $as_echo_n "(cached) " >&6
13987 else
13988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13989 /* end confdefs.h.  */
13990 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
13991
13992 _ACEOF
13993 if ac_fn_c_try_compile "$LINENO"; then :
13994   pgac_cv__builtin_bswap64=yes
13995 else
13996   pgac_cv__builtin_bswap64=no
13997 fi
13998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13999 fi
14000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
14001 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
14002 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
14003
14004 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
14005
14006 fi
14007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14008 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14009 if ${pgac_cv__builtin_constant_p+:} false; then :
14010   $as_echo_n "(cached) " >&6
14011 else
14012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14013 /* end confdefs.h.  */
14014 static int x;
14015   static int y[__builtin_constant_p(x) ? x : 1];
14016   static int z[__builtin_constant_p("string literal") ? 1 : x];
14017
14018
14019 _ACEOF
14020 if ac_fn_c_try_compile "$LINENO"; then :
14021   pgac_cv__builtin_constant_p=yes
14022 else
14023   pgac_cv__builtin_constant_p=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_constant_p" >&5
14028 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14029 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14030
14031 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14032
14033 fi
14034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14035 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14036 if ${pgac_cv__builtin_unreachable+:} false; then :
14037   $as_echo_n "(cached) " >&6
14038 else
14039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14040 /* end confdefs.h.  */
14041
14042 int
14043 main ()
14044 {
14045 __builtin_unreachable();
14046   ;
14047   return 0;
14048 }
14049 _ACEOF
14050 if ac_fn_c_try_link "$LINENO"; then :
14051   pgac_cv__builtin_unreachable=yes
14052 else
14053   pgac_cv__builtin_unreachable=no
14054 fi
14055 rm -f core conftest.err conftest.$ac_objext \
14056     conftest$ac_exeext conftest.$ac_ext
14057 fi
14058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14059 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14060 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14061
14062 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14063
14064 fi
14065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14066 $as_echo_n "checking for computed goto support... " >&6; }
14067 if ${pgac_cv_computed_goto+:} false; then :
14068   $as_echo_n "(cached) " >&6
14069 else
14070   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14071 /* end confdefs.h.  */
14072
14073 int
14074 main ()
14075 {
14076 void *labeladdrs[] = {&&my_label};
14077   goto *labeladdrs[0];
14078   my_label:
14079   return 1;
14080
14081   ;
14082   return 0;
14083 }
14084 _ACEOF
14085 if ac_fn_c_try_compile "$LINENO"; then :
14086   pgac_cv_computed_goto=yes
14087 else
14088   pgac_cv_computed_goto=no
14089 fi
14090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14091 fi
14092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14093 $as_echo "$pgac_cv_computed_goto" >&6; }
14094 if test x"$pgac_cv_computed_goto" = xyes ; then
14095
14096 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14097
14098 fi
14099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14100 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14101 if ${ac_cv_struct_tm+:} false; then :
14102   $as_echo_n "(cached) " >&6
14103 else
14104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14105 /* end confdefs.h.  */
14106 #include <sys/types.h>
14107 #include <time.h>
14108
14109 int
14110 main ()
14111 {
14112 struct tm tm;
14113                                      int *p = &tm.tm_sec;
14114                                      return !p;
14115   ;
14116   return 0;
14117 }
14118 _ACEOF
14119 if ac_fn_c_try_compile "$LINENO"; then :
14120   ac_cv_struct_tm=time.h
14121 else
14122   ac_cv_struct_tm=sys/time.h
14123 fi
14124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14125 fi
14126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14127 $as_echo "$ac_cv_struct_tm" >&6; }
14128 if test $ac_cv_struct_tm = sys/time.h; then
14129
14130 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14131
14132 fi
14133
14134 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14135 #include <$ac_cv_struct_tm>
14136
14137 "
14138 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14139
14140 cat >>confdefs.h <<_ACEOF
14141 #define HAVE_STRUCT_TM_TM_ZONE 1
14142 _ACEOF
14143
14144
14145 fi
14146
14147 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14148
14149 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14150
14151 fi
14152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14153 $as_echo_n "checking for tzname... " >&6; }
14154 if ${ac_cv_var_tzname+:} false; then :
14155   $as_echo_n "(cached) " >&6
14156 else
14157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14158 /* end confdefs.h.  */
14159 #include <stdlib.h>
14160 #include <time.h>
14161 #ifndef tzname /* For SGI.  */
14162 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
14163 #endif
14164
14165 int
14166 main ()
14167 {
14168 atoi(*tzname);
14169   ;
14170   return 0;
14171 }
14172 _ACEOF
14173 if ac_fn_c_try_link "$LINENO"; then :
14174   ac_cv_var_tzname=yes
14175 else
14176   ac_cv_var_tzname=no
14177 fi
14178 rm -f core conftest.err conftest.$ac_objext \
14179     conftest$ac_exeext conftest.$ac_ext
14180 fi
14181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14182 $as_echo "$ac_cv_var_tzname" >&6; }
14183 if test $ac_cv_var_tzname = yes; then
14184
14185 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14186
14187 fi
14188
14189 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14190 #ifdef HAVE_SYS_IPC_H
14191 #include <sys/ipc.h>
14192 #endif
14193 #ifdef HAVE_SYS_SEM_H
14194 #include <sys/sem.h>
14195 #endif
14196 "
14197 if test "x$ac_cv_type_union_semun" = xyes; then :
14198
14199 cat >>confdefs.h <<_ACEOF
14200 #define HAVE_UNION_SEMUN 1
14201 _ACEOF
14202
14203
14204 fi
14205
14206 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14207 #ifdef HAVE_SYS_UN_H
14208 #include <sys/un.h>
14209 #endif
14210
14211 "
14212 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14213
14214 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14215
14216 fi
14217
14218 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14219 #include <sys/socket.h>
14220
14221 "
14222 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14223
14224 cat >>confdefs.h <<_ACEOF
14225 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14226 _ACEOF
14227
14228
14229 fi
14230
14231 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14232 #include <sys/socket.h>
14233
14234 "
14235 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14236
14237 cat >>confdefs.h <<_ACEOF
14238 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14239 _ACEOF
14240
14241
14242 fi
14243 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14244 #include <sys/socket.h>
14245
14246 "
14247 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14248
14249 cat >>confdefs.h <<_ACEOF
14250 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14251 _ACEOF
14252
14253
14254 fi
14255 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14256 #include <sys/socket.h>
14257
14258 "
14259 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14260
14261 cat >>confdefs.h <<_ACEOF
14262 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14263 _ACEOF
14264
14265
14266 fi
14267 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14268 #include <sys/socket.h>
14269
14270 "
14271 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14272
14273 cat >>confdefs.h <<_ACEOF
14274 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14275 _ACEOF
14276
14277
14278 fi
14279 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14280 #include <sys/socket.h>
14281
14282 "
14283 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14284
14285 cat >>confdefs.h <<_ACEOF
14286 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14287 _ACEOF
14288
14289
14290 fi
14291
14292 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14293 #include <sys/socket.h>
14294 #include <netdb.h>
14295
14296 "
14297 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14298
14299 cat >>confdefs.h <<_ACEOF
14300 #define HAVE_STRUCT_ADDRINFO 1
14301 _ACEOF
14302
14303
14304 fi
14305
14306
14307   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14308 if test "x$ac_cv_type_intptr_t" = xyes; then :
14309
14310 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14311
14312 else
14313   for ac_type in 'int' 'long int' 'long long int'; do
14314        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14315 /* end confdefs.h.  */
14316 $ac_includes_default
14317 int
14318 main ()
14319 {
14320 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14321 test_array [0] = 0;
14322 return test_array [0];
14323
14324   ;
14325   return 0;
14326 }
14327 _ACEOF
14328 if ac_fn_c_try_compile "$LINENO"; then :
14329
14330 cat >>confdefs.h <<_ACEOF
14331 #define intptr_t $ac_type
14332 _ACEOF
14333
14334           ac_type=
14335 fi
14336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14337        test -z "$ac_type" && break
14338      done
14339 fi
14340
14341
14342
14343   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14344 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14345
14346 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14347
14348 else
14349   for ac_type in 'unsigned int' 'unsigned long int' \
14350         'unsigned long long int'; do
14351        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14352 /* end confdefs.h.  */
14353 $ac_includes_default
14354 int
14355 main ()
14356 {
14357 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14358 test_array [0] = 0;
14359 return test_array [0];
14360
14361   ;
14362   return 0;
14363 }
14364 _ACEOF
14365 if ac_fn_c_try_compile "$LINENO"; then :
14366
14367 cat >>confdefs.h <<_ACEOF
14368 #define uintptr_t $ac_type
14369 _ACEOF
14370
14371           ac_type=
14372 fi
14373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14374        test -z "$ac_type" && break
14375      done
14376 fi
14377
14378
14379
14380   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14381 $as_echo_n "checking for unsigned long long int... " >&6; }
14382 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14383   $as_echo_n "(cached) " >&6
14384 else
14385   ac_cv_type_unsigned_long_long_int=yes
14386      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14387        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14388 /* end confdefs.h.  */
14389
14390   /* For now, do not test the preprocessor; as of 2007 there are too many
14391          implementations with broken preprocessors.  Perhaps this can
14392          be revisited in 2012.  In the meantime, code should not expect
14393          #if to work with literals wider than 32 bits.  */
14394       /* Test literals.  */
14395       long long int ll = 9223372036854775807ll;
14396       long long int nll = -9223372036854775807LL;
14397       unsigned long long int ull = 18446744073709551615ULL;
14398       /* Test constant expressions.   */
14399       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14400                      ? 1 : -1)];
14401       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14402                      ? 1 : -1)];
14403       int i = 63;
14404 int
14405 main ()
14406 {
14407 /* Test availability of runtime routines for shift and division.  */
14408       long long int llmax = 9223372036854775807ll;
14409       unsigned long long int ullmax = 18446744073709551615ull;
14410       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14411               | (llmax / ll) | (llmax % ll)
14412               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14413               | (ullmax / ull) | (ullmax % ull));
14414   ;
14415   return 0;
14416 }
14417
14418 _ACEOF
14419 if ac_fn_c_try_link "$LINENO"; then :
14420
14421 else
14422   ac_cv_type_unsigned_long_long_int=no
14423 fi
14424 rm -f core conftest.err conftest.$ac_objext \
14425     conftest$ac_exeext conftest.$ac_ext
14426      fi
14427 fi
14428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14429 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14430   if test $ac_cv_type_unsigned_long_long_int = yes; then
14431
14432 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14433
14434   fi
14435
14436
14437
14438   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14439 $as_echo_n "checking for long long int... " >&6; }
14440 if ${ac_cv_type_long_long_int+:} false; then :
14441   $as_echo_n "(cached) " >&6
14442 else
14443   ac_cv_type_long_long_int=yes
14444       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14445         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14446         if test $ac_cv_type_long_long_int = yes; then
14447                                   if test "$cross_compiling" = yes; then :
14448   :
14449 else
14450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14451 /* end confdefs.h.  */
14452 #include <limits.h>
14453                  #ifndef LLONG_MAX
14454                  # define HALF \
14455                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14456                  # define LLONG_MAX (HALF - 1 + HALF)
14457                  #endif
14458 int
14459 main ()
14460 {
14461 long long int n = 1;
14462                  int i;
14463                  for (i = 0; ; i++)
14464                    {
14465                      long long int m = n << i;
14466                      if (m >> i != n)
14467                        return 1;
14468                      if (LLONG_MAX / 2 < m)
14469                        break;
14470                    }
14471                  return 0;
14472   ;
14473   return 0;
14474 }
14475 _ACEOF
14476 if ac_fn_c_try_run "$LINENO"; then :
14477
14478 else
14479   ac_cv_type_long_long_int=no
14480 fi
14481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14482   conftest.$ac_objext conftest.beam conftest.$ac_ext
14483 fi
14484
14485         fi
14486       fi
14487 fi
14488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14489 $as_echo "$ac_cv_type_long_long_int" >&6; }
14490   if test $ac_cv_type_long_long_int = yes; then
14491
14492 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14493
14494   fi
14495
14496
14497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14498 $as_echo_n "checking for locale_t... " >&6; }
14499 if ${pgac_cv_type_locale_t+:} false; then :
14500   $as_echo_n "(cached) " >&6
14501 else
14502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14503 /* end confdefs.h.  */
14504 #include <locale.h>
14505 locale_t x;
14506 int
14507 main ()
14508 {
14509
14510   ;
14511   return 0;
14512 }
14513 _ACEOF
14514 if ac_fn_c_try_compile "$LINENO"; then :
14515   pgac_cv_type_locale_t=yes
14516 else
14517   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14518 /* end confdefs.h.  */
14519 #include <xlocale.h>
14520 locale_t x;
14521 int
14522 main ()
14523 {
14524
14525   ;
14526   return 0;
14527 }
14528 _ACEOF
14529 if ac_fn_c_try_compile "$LINENO"; then :
14530   pgac_cv_type_locale_t='yes (in xlocale.h)'
14531 else
14532   pgac_cv_type_locale_t=no
14533 fi
14534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14535 fi
14536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14537 fi
14538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14539 $as_echo "$pgac_cv_type_locale_t" >&6; }
14540 if test "$pgac_cv_type_locale_t" != no; then
14541
14542 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14543
14544 fi
14545 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14546
14547 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14548
14549 fi
14550
14551 # MSVC doesn't cope well with defining restrict to __restrict, the
14552 # spelling it understands, because it conflicts with
14553 # __declspec(restrict). Therefore we define pg_restrict to the
14554 # appropriate definition, which presumably won't conflict.
14555 #
14556 # Allow platforms with buggy compilers to force restrict to not be
14557 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14558 # template.
14559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14560 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14561 if ${ac_cv_c_restrict+:} false; then :
14562   $as_echo_n "(cached) " >&6
14563 else
14564   ac_cv_c_restrict=no
14565    # The order here caters to the fact that C++ does not require restrict.
14566    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14567      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14568 /* end confdefs.h.  */
14569 typedef int * int_ptr;
14570         int foo (int_ptr $ac_kw ip) {
14571         return ip[0];
14572        }
14573 int
14574 main ()
14575 {
14576 int s[1];
14577         int * $ac_kw t = s;
14578         t[0] = 0;
14579         return foo(t)
14580   ;
14581   return 0;
14582 }
14583 _ACEOF
14584 if ac_fn_c_try_compile "$LINENO"; then :
14585   ac_cv_c_restrict=$ac_kw
14586 fi
14587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14588      test "$ac_cv_c_restrict" != no && break
14589    done
14590
14591 fi
14592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14593 $as_echo "$ac_cv_c_restrict" >&6; }
14594
14595  case $ac_cv_c_restrict in
14596    restrict) ;;
14597    no) $as_echo "#define restrict /**/" >>confdefs.h
14598  ;;
14599    *)  cat >>confdefs.h <<_ACEOF
14600 #define restrict $ac_cv_c_restrict
14601 _ACEOF
14602  ;;
14603  esac
14604
14605 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14606   pg_restrict=""
14607 else
14608   pg_restrict="$ac_cv_c_restrict"
14609 fi
14610
14611 cat >>confdefs.h <<_ACEOF
14612 #define pg_restrict $pg_restrict
14613 _ACEOF
14614
14615
14616 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14617 #include <sys/param.h>
14618 #ifdef HAVE_SYS_UCRED_H
14619 #include <sys/ucred.h>
14620 #endif
14621 "
14622 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14623
14624 cat >>confdefs.h <<_ACEOF
14625 #define HAVE_STRUCT_CMSGCRED 1
14626 _ACEOF
14627
14628
14629 fi
14630
14631
14632 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14633 #include <getopt.h>
14634 #endif
14635 "
14636 if test "x$ac_cv_type_struct_option" = xyes; then :
14637
14638 cat >>confdefs.h <<_ACEOF
14639 #define HAVE_STRUCT_OPTION 1
14640 _ACEOF
14641
14642
14643 fi
14644
14645
14646 if test "$with_zlib" = yes; then
14647   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14648   # did not).  While we could work around the lack of z_streamp, it
14649   # seems unwise to encourage people to use such old zlib versions...
14650   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14651 "
14652 if test "x$ac_cv_type_z_streamp" = xyes; then :
14653
14654 else
14655   as_fn_error $? "zlib version is too old
14656 Use --without-zlib to disable zlib support." "$LINENO" 5
14657 fi
14658
14659 fi
14660
14661 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14662 case $host_cpu in
14663   ppc*|powerpc*)
14664     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14665 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14666     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14667 /* end confdefs.h.  */
14668
14669 int
14670 main ()
14671 {
14672 int a = 0; int *p = &a; int r;
14673          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14674   ;
14675   return 0;
14676 }
14677 _ACEOF
14678 if ac_fn_c_try_compile "$LINENO"; then :
14679   pgac_cv_have_ppc_mutex_hint=yes
14680 else
14681   pgac_cv_have_ppc_mutex_hint=no
14682 fi
14683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14684     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14685 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14686     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14687
14688 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14689
14690     fi
14691   ;;
14692 esac
14693
14694 # Check largefile support.  You might think this is a system service not a
14695 # compiler characteristic, but you'd be wrong.  We must check this before
14696 # probing existence of related functions such as fseeko, since the largefile
14697 # defines can affect what is generated for that.
14698 if test "$PORTNAME" != "win32"; then
14699    # Check whether --enable-largefile was given.
14700 if test "${enable_largefile+set}" = set; then :
14701   enableval=$enable_largefile;
14702 fi
14703
14704 if test "$enable_largefile" != no; then
14705
14706   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14707 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14708 if ${ac_cv_sys_largefile_CC+:} false; then :
14709   $as_echo_n "(cached) " >&6
14710 else
14711   ac_cv_sys_largefile_CC=no
14712      if test "$GCC" != yes; then
14713        ac_save_CC=$CC
14714        while :; do
14715          # IRIX 6.2 and later do not support large files by default,
14716          # so use the C compiler's -n32 option if that helps.
14717          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14718 /* end confdefs.h.  */
14719 #include <sys/types.h>
14720  /* Check that off_t can represent 2**63 - 1 correctly.
14721     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14722     since some C++ compilers masquerading as C compilers
14723     incorrectly reject 9223372036854775807.  */
14724 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14725   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14726                        && LARGE_OFF_T % 2147483647 == 1)
14727                       ? 1 : -1];
14728 int
14729 main ()
14730 {
14731
14732   ;
14733   return 0;
14734 }
14735 _ACEOF
14736          if ac_fn_c_try_compile "$LINENO"; then :
14737   break
14738 fi
14739 rm -f core conftest.err conftest.$ac_objext
14740          CC="$CC -n32"
14741          if ac_fn_c_try_compile "$LINENO"; then :
14742   ac_cv_sys_largefile_CC=' -n32'; break
14743 fi
14744 rm -f core conftest.err conftest.$ac_objext
14745          break
14746        done
14747        CC=$ac_save_CC
14748        rm -f conftest.$ac_ext
14749     fi
14750 fi
14751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14752 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14753   if test "$ac_cv_sys_largefile_CC" != no; then
14754     CC=$CC$ac_cv_sys_largefile_CC
14755   fi
14756
14757   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14758 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14759 if ${ac_cv_sys_file_offset_bits+:} false; then :
14760   $as_echo_n "(cached) " >&6
14761 else
14762   while :; do
14763   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14764 /* end confdefs.h.  */
14765 #include <sys/types.h>
14766  /* Check that off_t can represent 2**63 - 1 correctly.
14767     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14768     since some C++ compilers masquerading as C compilers
14769     incorrectly reject 9223372036854775807.  */
14770 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14771   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14772                        && LARGE_OFF_T % 2147483647 == 1)
14773                       ? 1 : -1];
14774 int
14775 main ()
14776 {
14777
14778   ;
14779   return 0;
14780 }
14781 _ACEOF
14782 if ac_fn_c_try_compile "$LINENO"; then :
14783   ac_cv_sys_file_offset_bits=no; break
14784 fi
14785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14786   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14787 /* end confdefs.h.  */
14788 #define _FILE_OFFSET_BITS 64
14789 #include <sys/types.h>
14790  /* Check that off_t can represent 2**63 - 1 correctly.
14791     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14792     since some C++ compilers masquerading as C compilers
14793     incorrectly reject 9223372036854775807.  */
14794 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14795   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14796                        && LARGE_OFF_T % 2147483647 == 1)
14797                       ? 1 : -1];
14798 int
14799 main ()
14800 {
14801
14802   ;
14803   return 0;
14804 }
14805 _ACEOF
14806 if ac_fn_c_try_compile "$LINENO"; then :
14807   ac_cv_sys_file_offset_bits=64; break
14808 fi
14809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14810   ac_cv_sys_file_offset_bits=unknown
14811   break
14812 done
14813 fi
14814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14815 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14816 case $ac_cv_sys_file_offset_bits in #(
14817   no | unknown) ;;
14818   *)
14819 cat >>confdefs.h <<_ACEOF
14820 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14821 _ACEOF
14822 ;;
14823 esac
14824 rm -rf conftest*
14825   if test $ac_cv_sys_file_offset_bits = unknown; then
14826     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14827 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14828 if ${ac_cv_sys_large_files+:} false; then :
14829   $as_echo_n "(cached) " >&6
14830 else
14831   while :; do
14832   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14833 /* end confdefs.h.  */
14834 #include <sys/types.h>
14835  /* Check that off_t can represent 2**63 - 1 correctly.
14836     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14837     since some C++ compilers masquerading as C compilers
14838     incorrectly reject 9223372036854775807.  */
14839 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14840   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14841                        && LARGE_OFF_T % 2147483647 == 1)
14842                       ? 1 : -1];
14843 int
14844 main ()
14845 {
14846
14847   ;
14848   return 0;
14849 }
14850 _ACEOF
14851 if ac_fn_c_try_compile "$LINENO"; then :
14852   ac_cv_sys_large_files=no; break
14853 fi
14854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14856 /* end confdefs.h.  */
14857 #define _LARGE_FILES 1
14858 #include <sys/types.h>
14859  /* Check that off_t can represent 2**63 - 1 correctly.
14860     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14861     since some C++ compilers masquerading as C compilers
14862     incorrectly reject 9223372036854775807.  */
14863 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14864   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14865                        && LARGE_OFF_T % 2147483647 == 1)
14866                       ? 1 : -1];
14867 int
14868 main ()
14869 {
14870
14871   ;
14872   return 0;
14873 }
14874 _ACEOF
14875 if ac_fn_c_try_compile "$LINENO"; then :
14876   ac_cv_sys_large_files=1; break
14877 fi
14878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14879   ac_cv_sys_large_files=unknown
14880   break
14881 done
14882 fi
14883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14884 $as_echo "$ac_cv_sys_large_files" >&6; }
14885 case $ac_cv_sys_large_files in #(
14886   no | unknown) ;;
14887   *)
14888 cat >>confdefs.h <<_ACEOF
14889 #define _LARGE_FILES $ac_cv_sys_large_files
14890 _ACEOF
14891 ;;
14892 esac
14893 rm -rf conftest*
14894   fi
14895
14896
14897 fi
14898
14899
14900 fi
14901
14902 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14903 # The cast to long int works around a bug in the HP C Compiler
14904 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14905 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14906 # This bug is HP SR number 8606223364.
14907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14908 $as_echo_n "checking size of off_t... " >&6; }
14909 if ${ac_cv_sizeof_off_t+:} false; then :
14910   $as_echo_n "(cached) " >&6
14911 else
14912   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14913
14914 else
14915   if test "$ac_cv_type_off_t" = yes; then
14916      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14917 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14918 as_fn_error 77 "cannot compute sizeof (off_t)
14919 See \`config.log' for more details" "$LINENO" 5; }
14920    else
14921      ac_cv_sizeof_off_t=0
14922    fi
14923 fi
14924
14925 fi
14926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14927 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14928
14929
14930
14931 cat >>confdefs.h <<_ACEOF
14932 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14933 _ACEOF
14934
14935
14936
14937 # If we don't have largefile support, can't handle segsize >= 2GB.
14938 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14939    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14940 fi
14941
14942 # The cast to long int works around a bug in the HP C Compiler
14943 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14944 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14945 # This bug is HP SR number 8606223364.
14946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14947 $as_echo_n "checking size of bool... " >&6; }
14948 if ${ac_cv_sizeof_bool+:} false; then :
14949   $as_echo_n "(cached) " >&6
14950 else
14951   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
14952 #include <stdbool.h>
14953 #endif
14954 "; then :
14955
14956 else
14957   if test "$ac_cv_type_bool" = yes; then
14958      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14959 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14960 as_fn_error 77 "cannot compute sizeof (bool)
14961 See \`config.log' for more details" "$LINENO" 5; }
14962    else
14963      ac_cv_sizeof_bool=0
14964    fi
14965 fi
14966
14967 fi
14968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14969 $as_echo "$ac_cv_sizeof_bool" >&6; }
14970
14971
14972
14973 cat >>confdefs.h <<_ACEOF
14974 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14975 _ACEOF
14976
14977
14978
14979
14980 ##
14981 ## Functions, global variables
14982 ##
14983
14984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14985 $as_echo_n "checking for int timezone... " >&6; }
14986 if ${pgac_cv_var_int_timezone+:} false; then :
14987   $as_echo_n "(cached) " >&6
14988 else
14989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14990 /* end confdefs.h.  */
14991 #include <time.h>
14992 int res;
14993 int
14994 main ()
14995 {
14996 #ifndef __CYGWIN__
14997 res = timezone / 60;
14998 #else
14999 res = _timezone / 60;
15000 #endif
15001   ;
15002   return 0;
15003 }
15004 _ACEOF
15005 if ac_fn_c_try_link "$LINENO"; then :
15006   pgac_cv_var_int_timezone=yes
15007 else
15008   pgac_cv_var_int_timezone=no
15009 fi
15010 rm -f core conftest.err conftest.$ac_objext \
15011     conftest$ac_exeext conftest.$ac_ext
15012 fi
15013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15014 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15015 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15016
15017 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15018
15019 fi
15020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15021 $as_echo_n "checking types of arguments for accept()... " >&6; }
15022  if ${ac_cv_func_accept_return+:} false; then :
15023   $as_echo_n "(cached) " >&6
15024 else
15025    if ${ac_cv_func_accept_arg1+:} false; then :
15026   $as_echo_n "(cached) " >&6
15027 else
15028     if ${ac_cv_func_accept_arg2+:} false; then :
15029   $as_echo_n "(cached) " >&6
15030 else
15031      if ${ac_cv_func_accept_arg3+:} false; then :
15032   $as_echo_n "(cached) " >&6
15033 else
15034       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
15035       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
15036        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15037         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15038          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15039 /* end confdefs.h.  */
15040 #include <sys/types.h>
15041 #include <sys/socket.h>
15042 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15043 _ACEOF
15044 if ac_fn_c_try_compile "$LINENO"; then :
15045   ac_not_found=no; break 4
15046 else
15047   ac_not_found=yes
15048 fi
15049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15050        done
15051       done
15052      done
15053     done
15054     if test "$ac_not_found" = yes; then
15055       as_fn_error $? "could not determine argument types" "$LINENO" 5
15056     fi
15057     if test "$ac_cv_func_accept_arg3" = "void"; then
15058       ac_cv_func_accept_arg3=int
15059     fi
15060
15061 fi
15062
15063 fi
15064
15065 fi
15066
15067 fi
15068  { $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
15069 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15070
15071 cat >>confdefs.h <<_ACEOF
15072 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15073 _ACEOF
15074
15075
15076 cat >>confdefs.h <<_ACEOF
15077 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15078 _ACEOF
15079
15080
15081 cat >>confdefs.h <<_ACEOF
15082 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15083 _ACEOF
15084
15085
15086 cat >>confdefs.h <<_ACEOF
15087 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15088 _ACEOF
15089
15090
15091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15092 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15093 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15094   $as_echo_n "(cached) " >&6
15095 else
15096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15097 /* end confdefs.h.  */
15098 #include <sys/time.h>
15099 int
15100 main ()
15101 {
15102 struct timeval *tp;
15103 struct timezone *tzp;
15104 gettimeofday(tp,tzp);
15105   ;
15106   return 0;
15107 }
15108 _ACEOF
15109 if ac_fn_c_try_compile "$LINENO"; then :
15110   pgac_cv_func_gettimeofday_1arg=no
15111 else
15112   pgac_cv_func_gettimeofday_1arg=yes
15113 fi
15114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15115 fi
15116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15117 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15118 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15119
15120 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15121
15122 fi
15123
15124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15125 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15126 if ${pgac_cv_func_wcstombs_l+:} false; then :
15127   $as_echo_n "(cached) " >&6
15128 else
15129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15130 /* end confdefs.h.  */
15131 #include <stdlib.h>
15132 #include <locale.h>
15133 int
15134 main ()
15135 {
15136 #ifndef wcstombs_l
15137 (void) wcstombs_l;
15138 #endif
15139   ;
15140   return 0;
15141 }
15142 _ACEOF
15143 if ac_fn_c_try_compile "$LINENO"; then :
15144   pgac_cv_func_wcstombs_l='yes'
15145 else
15146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15147 /* end confdefs.h.  */
15148 #include <stdlib.h>
15149 #include <locale.h>
15150 #include <xlocale.h>
15151 int
15152 main ()
15153 {
15154 #ifndef wcstombs_l
15155 (void) wcstombs_l;
15156 #endif
15157   ;
15158   return 0;
15159 }
15160 _ACEOF
15161 if ac_fn_c_try_compile "$LINENO"; then :
15162   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15163 else
15164   pgac_cv_func_wcstombs_l='no'
15165 fi
15166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15167 fi
15168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15169 fi
15170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15171 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15172 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15173
15174 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15175
15176 fi
15177
15178 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15179 # symbols that that library has no business exposing to the world.  Pending
15180 # acquisition of a clue by those developers, ignore libedit (including its
15181 # possible alias of libreadline) while checking for everything else.
15182 LIBS_including_readline="$LIBS"
15183 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15184
15185 for ac_func in cbrt clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul symlink sync_file_range utime utimes wcstombs_l
15186 do :
15187   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15188 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15189 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15190   cat >>confdefs.h <<_ACEOF
15191 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15192 _ACEOF
15193
15194 fi
15195 done
15196
15197
15198 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15199 if test "x$ac_cv_func_fseeko" = xyes; then :
15200   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15201
15202 else
15203   case " $LIBOBJS " in
15204   *" fseeko.$ac_objext "* ) ;;
15205   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15206  ;;
15207 esac
15208
15209 fi
15210
15211
15212 case $host_os in
15213         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15214         # Mingw uses macros to access Win32 API calls
15215         netbsd*|mingw*)
15216
15217 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15218
15219                 ac_cv_func_fseeko=yes;;
15220         *)
15221                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15222 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15223 if ${ac_cv_sys_largefile_source+:} false; then :
15224   $as_echo_n "(cached) " >&6
15225 else
15226   while :; do
15227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15228 /* end confdefs.h.  */
15229 #include <sys/types.h> /* for off_t */
15230      #include <stdio.h>
15231 int
15232 main ()
15233 {
15234 int (*fp) (FILE *, off_t, int) = fseeko;
15235      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15236   ;
15237   return 0;
15238 }
15239 _ACEOF
15240 if ac_fn_c_try_link "$LINENO"; then :
15241   ac_cv_sys_largefile_source=no; break
15242 fi
15243 rm -f core conftest.err conftest.$ac_objext \
15244     conftest$ac_exeext conftest.$ac_ext
15245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15246 /* end confdefs.h.  */
15247 #define _LARGEFILE_SOURCE 1
15248 #include <sys/types.h> /* for off_t */
15249      #include <stdio.h>
15250 int
15251 main ()
15252 {
15253 int (*fp) (FILE *, off_t, int) = fseeko;
15254      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15255   ;
15256   return 0;
15257 }
15258 _ACEOF
15259 if ac_fn_c_try_link "$LINENO"; then :
15260   ac_cv_sys_largefile_source=1; break
15261 fi
15262 rm -f core conftest.err conftest.$ac_objext \
15263     conftest$ac_exeext conftest.$ac_ext
15264   ac_cv_sys_largefile_source=unknown
15265   break
15266 done
15267 fi
15268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15269 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15270 case $ac_cv_sys_largefile_source in #(
15271   no | unknown) ;;
15272   *)
15273 cat >>confdefs.h <<_ACEOF
15274 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15275 _ACEOF
15276 ;;
15277 esac
15278 rm -rf conftest*
15279
15280 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15281 # in glibc 2.1.3, but that breaks too many other things.
15282 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15283 if test $ac_cv_sys_largefile_source != unknown; then
15284
15285 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15286
15287 fi
15288 ;;
15289 esac
15290
15291 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15292 # by calling it, 2009-04-02
15293 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15294 if test "$PORTNAME" != "solaris"; then :
15295
15296 for ac_func in posix_fadvise
15297 do :
15298   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15299 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15300   cat >>confdefs.h <<_ACEOF
15301 #define HAVE_POSIX_FADVISE 1
15302 _ACEOF
15303
15304 fi
15305 done
15306
15307 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15308 "
15309 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15310   ac_have_decl=1
15311 else
15312   ac_have_decl=0
15313 fi
15314
15315 cat >>confdefs.h <<_ACEOF
15316 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15317 _ACEOF
15318
15319
15320 fi # fi
15321
15322 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15323 "
15324 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15325   ac_have_decl=1
15326 else
15327   ac_have_decl=0
15328 fi
15329
15330 cat >>confdefs.h <<_ACEOF
15331 #define HAVE_DECL_FDATASYNC $ac_have_decl
15332 _ACEOF
15333
15334 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15335 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15336   ac_have_decl=1
15337 else
15338   ac_have_decl=0
15339 fi
15340
15341 cat >>confdefs.h <<_ACEOF
15342 #define HAVE_DECL_STRLCAT $ac_have_decl
15343 _ACEOF
15344 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15345 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15346   ac_have_decl=1
15347 else
15348   ac_have_decl=0
15349 fi
15350
15351 cat >>confdefs.h <<_ACEOF
15352 #define HAVE_DECL_STRLCPY $ac_have_decl
15353 _ACEOF
15354 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15355 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15356   ac_have_decl=1
15357 else
15358   ac_have_decl=0
15359 fi
15360
15361 cat >>confdefs.h <<_ACEOF
15362 #define HAVE_DECL_STRNLEN $ac_have_decl
15363 _ACEOF
15364
15365 # This is probably only present on macOS, but may as well check always
15366 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15367 "
15368 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15369   ac_have_decl=1
15370 else
15371   ac_have_decl=0
15372 fi
15373
15374 cat >>confdefs.h <<_ACEOF
15375 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15376 _ACEOF
15377
15378
15379 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15380 "
15381 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15382   ac_have_decl=1
15383 else
15384   ac_have_decl=0
15385 fi
15386
15387 cat >>confdefs.h <<_ACEOF
15388 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15389 _ACEOF
15390 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15391 "
15392 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15393   ac_have_decl=1
15394 else
15395   ac_have_decl=0
15396 fi
15397
15398 cat >>confdefs.h <<_ACEOF
15399 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15400 _ACEOF
15401
15402
15403 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15404 #include <netinet/in.h>
15405 "
15406 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15407
15408 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15409
15410 fi
15411
15412
15413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15414 $as_echo_n "checking for PS_STRINGS... " >&6; }
15415 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15416   $as_echo_n "(cached) " >&6
15417 else
15418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15419 /* end confdefs.h.  */
15420 #include <machine/vmparam.h>
15421 #include <sys/exec.h>
15422
15423 int
15424 main ()
15425 {
15426 PS_STRINGS->ps_nargvstr = 1;
15427 PS_STRINGS->ps_argvstr = "foo";
15428   ;
15429   return 0;
15430 }
15431 _ACEOF
15432 if ac_fn_c_try_link "$LINENO"; then :
15433   pgac_cv_var_PS_STRINGS=yes
15434 else
15435   pgac_cv_var_PS_STRINGS=no
15436 fi
15437 rm -f core conftest.err conftest.$ac_objext \
15438     conftest$ac_exeext conftest.$ac_ext
15439 fi
15440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15441 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15442 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15443
15444 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15445
15446 fi
15447
15448
15449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15450 $as_echo_n "checking for isinf... " >&6; }
15451 if ${ac_cv_func_isinf+:} false; then :
15452   $as_echo_n "(cached) " >&6
15453 else
15454   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15455 /* end confdefs.h.  */
15456
15457 #include <math.h>
15458 double glob_double;
15459
15460 int
15461 main ()
15462 {
15463 return isinf(glob_double) ? 0 : 1;
15464   ;
15465   return 0;
15466 }
15467 _ACEOF
15468 if ac_fn_c_try_link "$LINENO"; then :
15469   ac_cv_func_isinf=yes
15470 else
15471   ac_cv_func_isinf=no
15472 fi
15473 rm -f core conftest.err conftest.$ac_objext \
15474     conftest$ac_exeext conftest.$ac_ext
15475 fi
15476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15477 $as_echo "$ac_cv_func_isinf" >&6; }
15478
15479 if test $ac_cv_func_isinf = yes ; then
15480
15481 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15482
15483 else
15484   case " $LIBOBJS " in
15485   *" isinf.$ac_objext "* ) ;;
15486   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15487  ;;
15488 esac
15489
15490   # Look for a way to implement a substitute for isinf()
15491   for ac_func in fpclass fp_class fp_class_d class
15492 do :
15493   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15494 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15495 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15496   cat >>confdefs.h <<_ACEOF
15497 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15498 _ACEOF
15499  break
15500 fi
15501 done
15502
15503 fi
15504
15505 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15506 if test "x$ac_cv_func_crypt" = xyes; then :
15507   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15508
15509 else
15510   case " $LIBOBJS " in
15511   *" crypt.$ac_objext "* ) ;;
15512   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15513  ;;
15514 esac
15515
15516 fi
15517
15518 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15519 if test "x$ac_cv_func_dlopen" = xyes; then :
15520   $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15521
15522 else
15523   case " $LIBOBJS " in
15524   *" dlopen.$ac_objext "* ) ;;
15525   *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15526  ;;
15527 esac
15528
15529 fi
15530
15531 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15532 if test "x$ac_cv_func_fls" = xyes; then :
15533   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15534
15535 else
15536   case " $LIBOBJS " in
15537   *" fls.$ac_objext "* ) ;;
15538   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15539  ;;
15540 esac
15541
15542 fi
15543
15544 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15545 if test "x$ac_cv_func_getopt" = xyes; then :
15546   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15547
15548 else
15549   case " $LIBOBJS " in
15550   *" getopt.$ac_objext "* ) ;;
15551   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15552  ;;
15553 esac
15554
15555 fi
15556
15557 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15558 if test "x$ac_cv_func_getrusage" = xyes; then :
15559   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15560
15561 else
15562   case " $LIBOBJS " in
15563   *" getrusage.$ac_objext "* ) ;;
15564   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15565  ;;
15566 esac
15567
15568 fi
15569
15570 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15571 if test "x$ac_cv_func_inet_aton" = xyes; then :
15572   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15573
15574 else
15575   case " $LIBOBJS " in
15576   *" inet_aton.$ac_objext "* ) ;;
15577   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15578  ;;
15579 esac
15580
15581 fi
15582
15583 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15584 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15585   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15586
15587 else
15588   case " $LIBOBJS " in
15589   *" mkdtemp.$ac_objext "* ) ;;
15590   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15591  ;;
15592 esac
15593
15594 fi
15595
15596 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
15597 if test "x$ac_cv_func_pread" = xyes; then :
15598   $as_echo "#define HAVE_PREAD 1" >>confdefs.h
15599
15600 else
15601   case " $LIBOBJS " in
15602   *" pread.$ac_objext "* ) ;;
15603   *) LIBOBJS="$LIBOBJS pread.$ac_objext"
15604  ;;
15605 esac
15606
15607 fi
15608
15609 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
15610 if test "x$ac_cv_func_pwrite" = xyes; then :
15611   $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
15612
15613 else
15614   case " $LIBOBJS " in
15615   *" pwrite.$ac_objext "* ) ;;
15616   *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
15617  ;;
15618 esac
15619
15620 fi
15621
15622 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15623 if test "x$ac_cv_func_random" = xyes; then :
15624   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15625
15626 else
15627   case " $LIBOBJS " in
15628   *" random.$ac_objext "* ) ;;
15629   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15630  ;;
15631 esac
15632
15633 fi
15634
15635 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15636 if test "x$ac_cv_func_rint" = xyes; then :
15637   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15638
15639 else
15640   case " $LIBOBJS " in
15641   *" rint.$ac_objext "* ) ;;
15642   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15643  ;;
15644 esac
15645
15646 fi
15647
15648 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15649 if test "x$ac_cv_func_srandom" = xyes; then :
15650   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15651
15652 else
15653   case " $LIBOBJS " in
15654   *" srandom.$ac_objext "* ) ;;
15655   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15656  ;;
15657 esac
15658
15659 fi
15660
15661 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15662 if test "x$ac_cv_func_strlcat" = xyes; then :
15663   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15664
15665 else
15666   case " $LIBOBJS " in
15667   *" strlcat.$ac_objext "* ) ;;
15668   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15669  ;;
15670 esac
15671
15672 fi
15673
15674 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15675 if test "x$ac_cv_func_strlcpy" = xyes; then :
15676   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15677
15678 else
15679   case " $LIBOBJS " in
15680   *" strlcpy.$ac_objext "* ) ;;
15681   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15682  ;;
15683 esac
15684
15685 fi
15686
15687 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15688 if test "x$ac_cv_func_strnlen" = xyes; then :
15689   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15690
15691 else
15692   case " $LIBOBJS " in
15693   *" strnlen.$ac_objext "* ) ;;
15694   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15695  ;;
15696 esac
15697
15698 fi
15699
15700
15701
15702 case $host_os in
15703
15704         # Windows uses a specialised env handler
15705         # and doesn't need a replacement getpeereid because it doesn't use
15706         # Unix sockets.
15707         mingw*)
15708
15709 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15710
15711
15712 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15713
15714                 ac_cv_func_unsetenv=yes
15715                 ac_cv_func_getpeereid=yes;;
15716         *)
15717                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15718 if test "x$ac_cv_func_unsetenv" = xyes; then :
15719   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15720
15721 else
15722   case " $LIBOBJS " in
15723   *" unsetenv.$ac_objext "* ) ;;
15724   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15725  ;;
15726 esac
15727
15728 fi
15729
15730 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15731 if test "x$ac_cv_func_getpeereid" = xyes; then :
15732   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15733
15734 else
15735   case " $LIBOBJS " in
15736   *" getpeereid.$ac_objext "* ) ;;
15737   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15738  ;;
15739 esac
15740
15741 fi
15742
15743
15744                 ;;
15745 esac
15746
15747 # System's version of getaddrinfo(), if any, may be used only if we found
15748 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15749 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15750 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15751    test "$PORTNAME" != "win32"; then
15752   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15753 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15754   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15755
15756 else
15757   case " $LIBOBJS " in
15758   *" getaddrinfo.$ac_objext "* ) ;;
15759   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15760  ;;
15761 esac
15762
15763 fi
15764
15765
15766 else
15767   case " $LIBOBJS " in
15768   *" getaddrinfo.$ac_objext "* ) ;;
15769   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15770  ;;
15771 esac
15772
15773 fi
15774
15775 # Similarly, use system's getopt_long() only if system provides struct option.
15776 if test x"$ac_cv_type_struct_option" = xyes ; then
15777   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15778 if test "x$ac_cv_func_getopt_long" = xyes; then :
15779   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15780
15781 else
15782   case " $LIBOBJS " in
15783   *" getopt_long.$ac_objext "* ) ;;
15784   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15785  ;;
15786 esac
15787
15788 fi
15789
15790
15791 else
15792   case " $LIBOBJS " in
15793   *" getopt_long.$ac_objext "* ) ;;
15794   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15795  ;;
15796 esac
15797
15798 fi
15799
15800 # Solaris' getopt() doesn't do what we want for long options, so always use
15801 # our version on that platform.
15802 if test "$PORTNAME" = "solaris"; then
15803   case " $LIBOBJS " in
15804   *" getopt.$ac_objext "* ) ;;
15805   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15806  ;;
15807 esac
15808
15809 fi
15810
15811 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15812 # so always use our version on Windows.
15813 if test "$PORTNAME" = "win32"; then
15814   case " $LIBOBJS " in
15815   *" getopt.$ac_objext "* ) ;;
15816   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15817  ;;
15818 esac
15819
15820   case " $LIBOBJS " in
15821   *" getopt_long.$ac_objext "* ) ;;
15822   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15823  ;;
15824 esac
15825
15826 fi
15827
15828 # Win32 (really MinGW) support
15829 if test "$PORTNAME" = "win32"; then
15830   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15831 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15832   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15833
15834 else
15835   case " $LIBOBJS " in
15836   *" gettimeofday.$ac_objext "* ) ;;
15837   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15838  ;;
15839 esac
15840
15841 fi
15842
15843
15844   case " $LIBOBJS " in
15845   *" dirmod.$ac_objext "* ) ;;
15846   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15847  ;;
15848 esac
15849
15850   case " $LIBOBJS " in
15851   *" kill.$ac_objext "* ) ;;
15852   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15853  ;;
15854 esac
15855
15856   case " $LIBOBJS " in
15857   *" open.$ac_objext "* ) ;;
15858   *) LIBOBJS="$LIBOBJS open.$ac_objext"
15859  ;;
15860 esac
15861
15862   case " $LIBOBJS " in
15863   *" system.$ac_objext "* ) ;;
15864   *) LIBOBJS="$LIBOBJS system.$ac_objext"
15865  ;;
15866 esac
15867
15868   case " $LIBOBJS " in
15869   *" win32env.$ac_objext "* ) ;;
15870   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15871  ;;
15872 esac
15873
15874   case " $LIBOBJS " in
15875   *" win32error.$ac_objext "* ) ;;
15876   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15877  ;;
15878 esac
15879
15880   case " $LIBOBJS " in
15881   *" win32security.$ac_objext "* ) ;;
15882   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15883  ;;
15884 esac
15885
15886   case " $LIBOBJS " in
15887   *" win32setlocale.$ac_objext "* ) ;;
15888   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15889  ;;
15890 esac
15891
15892
15893 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
15894
15895   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
15896 #define WIN32_LEAN_AND_MEAN
15897 #include <windows.h>
15898 #include <string.h>
15899 #include <dbghelp.h>
15900 "
15901 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
15902
15903 cat >>confdefs.h <<_ACEOF
15904 #define HAVE_MINIDUMP_TYPE 1
15905 _ACEOF
15906
15907 pgac_minidump_type=yes
15908 else
15909   pgac_minidump_type=no
15910 fi
15911
15912 fi
15913 if test x"$pgac_minidump_type" = x"yes" ; then
15914   have_win32_dbghelp=yes
15915
15916 else
15917   have_win32_dbghelp=no
15918
15919 fi
15920
15921 # Cygwin needs only a bit of that
15922 if test "$PORTNAME" = "cygwin"; then
15923   case " $LIBOBJS " in
15924   *" dirmod.$ac_objext "* ) ;;
15925   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15926  ;;
15927 esac
15928
15929 fi
15930
15931 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
15932 /* NetBSD declares sys_siglist in unistd.h.  */
15933 #ifdef HAVE_UNISTD_H
15934 # include <unistd.h>
15935 #endif
15936
15937 "
15938 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
15939   ac_have_decl=1
15940 else
15941   ac_have_decl=0
15942 fi
15943
15944 cat >>confdefs.h <<_ACEOF
15945 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
15946 _ACEOF
15947
15948
15949 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15950 if test "x$ac_cv_func_syslog" = xyes; then :
15951   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15952 if test "x$ac_cv_header_syslog_h" = xyes; then :
15953
15954 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15955
15956 fi
15957
15958
15959 fi
15960
15961
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15963 $as_echo_n "checking for opterr... " >&6; }
15964 if ${pgac_cv_var_int_opterr+:} false; then :
15965   $as_echo_n "(cached) " >&6
15966 else
15967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15968 /* end confdefs.h.  */
15969 #include <unistd.h>
15970 int
15971 main ()
15972 {
15973 extern int opterr; opterr = 1;
15974   ;
15975   return 0;
15976 }
15977 _ACEOF
15978 if ac_fn_c_try_link "$LINENO"; then :
15979   pgac_cv_var_int_opterr=yes
15980 else
15981   pgac_cv_var_int_opterr=no
15982 fi
15983 rm -f core conftest.err conftest.$ac_objext \
15984     conftest$ac_exeext conftest.$ac_ext
15985 fi
15986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15987 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15988 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15989
15990 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15991
15992 fi
15993
15994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15995 $as_echo_n "checking for optreset... " >&6; }
15996 if ${pgac_cv_var_int_optreset+:} false; then :
15997   $as_echo_n "(cached) " >&6
15998 else
15999   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16000 /* end confdefs.h.  */
16001 #include <unistd.h>
16002 int
16003 main ()
16004 {
16005 extern int optreset; optreset = 1;
16006   ;
16007   return 0;
16008 }
16009 _ACEOF
16010 if ac_fn_c_try_link "$LINENO"; then :
16011   pgac_cv_var_int_optreset=yes
16012 else
16013   pgac_cv_var_int_optreset=no
16014 fi
16015 rm -f core conftest.err conftest.$ac_objext \
16016     conftest$ac_exeext conftest.$ac_ext
16017 fi
16018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16019 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16020 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16021
16022 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16023
16024 fi
16025
16026 for ac_func in strtoll __strtoll strtoq
16027 do :
16028   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16029 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16030 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16031   cat >>confdefs.h <<_ACEOF
16032 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16033 _ACEOF
16034  break
16035 fi
16036 done
16037
16038 for ac_func in strtoull __strtoull strtouq
16039 do :
16040   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16041 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16042 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16043   cat >>confdefs.h <<_ACEOF
16044 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16045 _ACEOF
16046  break
16047 fi
16048 done
16049
16050 # strto[u]ll may exist but not be declared
16051 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16052 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16053   ac_have_decl=1
16054 else
16055   ac_have_decl=0
16056 fi
16057
16058 cat >>confdefs.h <<_ACEOF
16059 #define HAVE_DECL_STRTOLL $ac_have_decl
16060 _ACEOF
16061 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16062 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16063   ac_have_decl=1
16064 else
16065   ac_have_decl=0
16066 fi
16067
16068 cat >>confdefs.h <<_ACEOF
16069 #define HAVE_DECL_STRTOULL $ac_have_decl
16070 _ACEOF
16071
16072
16073 if test "$with_icu" = yes; then
16074   ac_save_CPPFLAGS=$CPPFLAGS
16075   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16076
16077   # Verify we have ICU's header files
16078   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16079 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16080
16081 else
16082   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16083 fi
16084
16085
16086
16087   CPPFLAGS=$ac_save_CPPFLAGS
16088 fi
16089
16090 # Lastly, restore full LIBS list and check for readline/libedit symbols
16091 LIBS="$LIBS_including_readline"
16092
16093 if test "$with_readline" = yes; then
16094   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16095 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16096 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16097   $as_echo_n "(cached) " >&6
16098 else
16099   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16100 /* end confdefs.h.  */
16101 #include <stdio.h>
16102 #ifdef HAVE_READLINE_READLINE_H
16103 # include <readline/readline.h>
16104 #elif defined(HAVE_READLINE_H)
16105 # include <readline.h>
16106 #endif
16107
16108 int
16109 main ()
16110 {
16111 rl_completion_append_character = 'x';
16112   ;
16113   return 0;
16114 }
16115 _ACEOF
16116 if ac_fn_c_try_link "$LINENO"; then :
16117   pgac_cv_var_rl_completion_append_character=yes
16118 else
16119   pgac_cv_var_rl_completion_append_character=no
16120 fi
16121 rm -f core conftest.err conftest.$ac_objext \
16122     conftest$ac_exeext conftest.$ac_ext
16123 fi
16124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16125 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16126 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16127
16128 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16129
16130 fi
16131   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16132 do :
16133   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16134 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16135 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16136   cat >>confdefs.h <<_ACEOF
16137 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16138 _ACEOF
16139
16140 fi
16141 done
16142
16143   for ac_func in append_history history_truncate_file
16144 do :
16145   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16146 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16147 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16148   cat >>confdefs.h <<_ACEOF
16149 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16150 _ACEOF
16151
16152 fi
16153 done
16154
16155 fi
16156
16157
16158 # This test makes sure that run tests work at all.  Sometimes a shared
16159 # library is found by the linker, but the runtime linker can't find it.
16160 # This check should come after all modifications of compiler or linker
16161 # variables, and before any other run tests.
16162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16163 $as_echo_n "checking test program... " >&6; }
16164 if test "$cross_compiling" = yes; then :
16165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16166 $as_echo "cross-compiling" >&6; }
16167 else
16168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16169 /* end confdefs.h.  */
16170 int main() { return 0; }
16171 _ACEOF
16172 if ac_fn_c_try_run "$LINENO"; then :
16173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16174 $as_echo "ok" >&6; }
16175 else
16176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16177 $as_echo "failed" >&6; }
16178 as_fn_error $? "
16179 Could not execute a simple test program.  This may be a problem
16180 related to locating shared libraries.  Check the file 'config.log'
16181 for the exact reason." "$LINENO" 5
16182 fi
16183 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16184   conftest.$ac_objext conftest.beam conftest.$ac_ext
16185 fi
16186
16187
16188 # --------------------
16189 # Run tests below here
16190 # --------------------
16191
16192
16193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16194 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16195 if ${pgac_cv_type_long_int_64+:} false; then :
16196   $as_echo_n "(cached) " >&6
16197 else
16198   if test "$cross_compiling" = yes; then :
16199   # If cross-compiling, check the size reported by the compiler and
16200 # trust that the arithmetic works.
16201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16202 /* end confdefs.h.  */
16203
16204 int
16205 main ()
16206 {
16207 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16208 test_array [0] = 0;
16209 return test_array [0];
16210
16211   ;
16212   return 0;
16213 }
16214 _ACEOF
16215 if ac_fn_c_try_compile "$LINENO"; then :
16216   pgac_cv_type_long_int_64=yes
16217 else
16218   pgac_cv_type_long_int_64=no
16219 fi
16220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16221 else
16222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16223 /* end confdefs.h.  */
16224 typedef long int ac_int64;
16225
16226 /*
16227  * These are globals to discourage the compiler from folding all the
16228  * arithmetic tests down to compile-time constants.
16229  */
16230 ac_int64 a = 20000001;
16231 ac_int64 b = 40000005;
16232
16233 int does_int64_work()
16234 {
16235   ac_int64 c,d;
16236
16237   if (sizeof(ac_int64) != 8)
16238     return 0;                   /* definitely not the right size */
16239
16240   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16241   c = a * b;
16242   d = (c + b) / b;
16243   if (d != a+1)
16244     return 0;
16245   return 1;
16246 }
16247
16248 int
16249 main() {
16250   return (! does_int64_work());
16251 }
16252 _ACEOF
16253 if ac_fn_c_try_run "$LINENO"; then :
16254   pgac_cv_type_long_int_64=yes
16255 else
16256   pgac_cv_type_long_int_64=no
16257 fi
16258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16259   conftest.$ac_objext conftest.beam conftest.$ac_ext
16260 fi
16261
16262 fi
16263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16264 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16265
16266 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16267 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16268
16269 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16270
16271 fi
16272
16273
16274 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16275   pg_int64_type="long int"
16276 else
16277   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16278 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16279 if ${pgac_cv_type_long_long_int_64+:} false; then :
16280   $as_echo_n "(cached) " >&6
16281 else
16282   if test "$cross_compiling" = yes; then :
16283   # If cross-compiling, check the size reported by the compiler and
16284 # trust that the arithmetic works.
16285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16286 /* end confdefs.h.  */
16287
16288 int
16289 main ()
16290 {
16291 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16292 test_array [0] = 0;
16293 return test_array [0];
16294
16295   ;
16296   return 0;
16297 }
16298 _ACEOF
16299 if ac_fn_c_try_compile "$LINENO"; then :
16300   pgac_cv_type_long_long_int_64=yes
16301 else
16302   pgac_cv_type_long_long_int_64=no
16303 fi
16304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16305 else
16306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16307 /* end confdefs.h.  */
16308 typedef long long int ac_int64;
16309
16310 /*
16311  * These are globals to discourage the compiler from folding all the
16312  * arithmetic tests down to compile-time constants.
16313  */
16314 ac_int64 a = 20000001;
16315 ac_int64 b = 40000005;
16316
16317 int does_int64_work()
16318 {
16319   ac_int64 c,d;
16320
16321   if (sizeof(ac_int64) != 8)
16322     return 0;                   /* definitely not the right size */
16323
16324   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16325   c = a * b;
16326   d = (c + b) / b;
16327   if (d != a+1)
16328     return 0;
16329   return 1;
16330 }
16331
16332 int
16333 main() {
16334   return (! does_int64_work());
16335 }
16336 _ACEOF
16337 if ac_fn_c_try_run "$LINENO"; then :
16338   pgac_cv_type_long_long_int_64=yes
16339 else
16340   pgac_cv_type_long_long_int_64=no
16341 fi
16342 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16343   conftest.$ac_objext conftest.beam conftest.$ac_ext
16344 fi
16345
16346 fi
16347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16348 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16349
16350 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16351 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16352
16353 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16354
16355 fi
16356
16357   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16358     pg_int64_type="long long int"
16359   else
16360     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16361   fi
16362 fi
16363
16364
16365 cat >>confdefs.h <<_ACEOF
16366 #define PG_INT64_TYPE $pg_int64_type
16367 _ACEOF
16368
16369
16370 # Select the printf length modifier that goes with that, too.
16371 if test x"$pg_int64_type" = x"long long int" ; then
16372   INT64_MODIFIER='"ll"'
16373 else
16374   INT64_MODIFIER='"l"'
16375 fi
16376
16377
16378 cat >>confdefs.h <<_ACEOF
16379 #define INT64_MODIFIER $INT64_MODIFIER
16380 _ACEOF
16381
16382
16383 # has to be down here, rather than with the other builtins, because
16384 # the test uses PG_INT64_TYPE.
16385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16386 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16387 if ${pgac_cv__builtin_op_overflow+:} false; then :
16388   $as_echo_n "(cached) " >&6
16389 else
16390   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16391 /* end confdefs.h.  */
16392
16393 PG_INT64_TYPE a = 1;
16394 PG_INT64_TYPE b = 1;
16395 PG_INT64_TYPE result;
16396 int oflo;
16397
16398 int
16399 main ()
16400 {
16401 oflo = __builtin_mul_overflow(a, b, &result);
16402   ;
16403   return 0;
16404 }
16405 _ACEOF
16406 if ac_fn_c_try_link "$LINENO"; then :
16407   pgac_cv__builtin_op_overflow=yes
16408 else
16409   pgac_cv__builtin_op_overflow=no
16410 fi
16411 rm -f core conftest.err conftest.$ac_objext \
16412     conftest$ac_exeext conftest.$ac_ext
16413 fi
16414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16415 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16416 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16417
16418 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16419
16420 fi
16421
16422 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16423 # The cast to long int works around a bug in the HP C Compiler
16424 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16425 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16426 # This bug is HP SR number 8606223364.
16427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16428 $as_echo_n "checking size of void *... " >&6; }
16429 if ${ac_cv_sizeof_void_p+:} false; then :
16430   $as_echo_n "(cached) " >&6
16431 else
16432   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16433
16434 else
16435   if test "$ac_cv_type_void_p" = yes; then
16436      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16437 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16438 as_fn_error 77 "cannot compute sizeof (void *)
16439 See \`config.log' for more details" "$LINENO" 5; }
16440    else
16441      ac_cv_sizeof_void_p=0
16442    fi
16443 fi
16444
16445 fi
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16447 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16448
16449
16450
16451 cat >>confdefs.h <<_ACEOF
16452 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16453 _ACEOF
16454
16455
16456 # The cast to long int works around a bug in the HP C Compiler
16457 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16458 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16459 # This bug is HP SR number 8606223364.
16460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16461 $as_echo_n "checking size of size_t... " >&6; }
16462 if ${ac_cv_sizeof_size_t+:} false; then :
16463   $as_echo_n "(cached) " >&6
16464 else
16465   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16466
16467 else
16468   if test "$ac_cv_type_size_t" = yes; then
16469      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16470 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16471 as_fn_error 77 "cannot compute sizeof (size_t)
16472 See \`config.log' for more details" "$LINENO" 5; }
16473    else
16474      ac_cv_sizeof_size_t=0
16475    fi
16476 fi
16477
16478 fi
16479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16480 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16481
16482
16483
16484 cat >>confdefs.h <<_ACEOF
16485 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16486 _ACEOF
16487
16488
16489 # The cast to long int works around a bug in the HP C Compiler
16490 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16491 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16492 # This bug is HP SR number 8606223364.
16493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16494 $as_echo_n "checking size of long... " >&6; }
16495 if ${ac_cv_sizeof_long+:} false; then :
16496   $as_echo_n "(cached) " >&6
16497 else
16498   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16499
16500 else
16501   if test "$ac_cv_type_long" = yes; then
16502      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16503 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16504 as_fn_error 77 "cannot compute sizeof (long)
16505 See \`config.log' for more details" "$LINENO" 5; }
16506    else
16507      ac_cv_sizeof_long=0
16508    fi
16509 fi
16510
16511 fi
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16513 $as_echo "$ac_cv_sizeof_long" >&6; }
16514
16515
16516
16517 cat >>confdefs.h <<_ACEOF
16518 #define SIZEOF_LONG $ac_cv_sizeof_long
16519 _ACEOF
16520
16521
16522
16523 # Decide whether float4 is passed by value: user-selectable, enabled by default
16524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16525 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16526
16527
16528 # Check whether --enable-float4-byval was given.
16529 if test "${enable_float4_byval+set}" = set; then :
16530   enableval=$enable_float4_byval;
16531   case $enableval in
16532     yes)
16533
16534 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16535
16536                float4passbyval=true
16537       ;;
16538     no)
16539       float4passbyval=false
16540       ;;
16541     *)
16542       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16543       ;;
16544   esac
16545
16546 else
16547   enable_float4_byval=yes
16548
16549 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16550
16551                float4passbyval=true
16552 fi
16553
16554
16555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16556 $as_echo "$enable_float4_byval" >&6; }
16557
16558 cat >>confdefs.h <<_ACEOF
16559 #define FLOAT4PASSBYVAL $float4passbyval
16560 _ACEOF
16561
16562
16563 # Decide whether float8 is passed by value.
16564 # Note: this setting also controls int8 and related types such as timestamp.
16565 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16566 # If not, trying to select it is an error.
16567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16568 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16569 if test $ac_cv_sizeof_void_p -ge 8 ; then
16570
16571
16572 # Check whether --enable-float8-byval was given.
16573 if test "${enable_float8_byval+set}" = set; then :
16574   enableval=$enable_float8_byval;
16575   case $enableval in
16576     yes)
16577       :
16578       ;;
16579     no)
16580       :
16581       ;;
16582     *)
16583       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16584       ;;
16585   esac
16586
16587 else
16588   enable_float8_byval=yes
16589
16590 fi
16591
16592
16593 else
16594
16595
16596 # Check whether --enable-float8-byval was given.
16597 if test "${enable_float8_byval+set}" = set; then :
16598   enableval=$enable_float8_byval;
16599   case $enableval in
16600     yes)
16601       :
16602       ;;
16603     no)
16604       :
16605       ;;
16606     *)
16607       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16608       ;;
16609   esac
16610
16611 else
16612   enable_float8_byval=no
16613
16614 fi
16615
16616
16617   if test "$enable_float8_byval" = yes ; then
16618     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16619   fi
16620 fi
16621 if test "$enable_float8_byval" = yes ; then
16622
16623 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16624
16625   float8passbyval=true
16626 else
16627   float8passbyval=false
16628 fi
16629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16630 $as_echo "$enable_float8_byval" >&6; }
16631
16632 cat >>confdefs.h <<_ACEOF
16633 #define FLOAT8PASSBYVAL $float8passbyval
16634 _ACEOF
16635
16636
16637 # Determine memory alignment requirements for the basic C data types.
16638
16639 # The cast to long int works around a bug in the HP C Compiler,
16640 # see AC_CHECK_SIZEOF for more information.
16641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16642 $as_echo_n "checking alignment of short... " >&6; }
16643 if ${ac_cv_alignof_short+:} false; then :
16644   $as_echo_n "(cached) " >&6
16645 else
16646   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16647 #ifndef offsetof
16648 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16649 #endif
16650 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16651
16652 else
16653   if test "$ac_cv_type_short" = yes; then
16654      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16655 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16656 as_fn_error 77 "cannot compute alignment of short
16657 See \`config.log' for more details" "$LINENO" 5; }
16658    else
16659      ac_cv_alignof_short=0
16660    fi
16661 fi
16662
16663 fi
16664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16665 $as_echo "$ac_cv_alignof_short" >&6; }
16666
16667
16668
16669 cat >>confdefs.h <<_ACEOF
16670 #define ALIGNOF_SHORT $ac_cv_alignof_short
16671 _ACEOF
16672
16673
16674 # The cast to long int works around a bug in the HP C Compiler,
16675 # see AC_CHECK_SIZEOF for more information.
16676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16677 $as_echo_n "checking alignment of int... " >&6; }
16678 if ${ac_cv_alignof_int+:} false; then :
16679   $as_echo_n "(cached) " >&6
16680 else
16681   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16682 #ifndef offsetof
16683 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16684 #endif
16685 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16686
16687 else
16688   if test "$ac_cv_type_int" = yes; then
16689      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16690 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16691 as_fn_error 77 "cannot compute alignment of int
16692 See \`config.log' for more details" "$LINENO" 5; }
16693    else
16694      ac_cv_alignof_int=0
16695    fi
16696 fi
16697
16698 fi
16699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16700 $as_echo "$ac_cv_alignof_int" >&6; }
16701
16702
16703
16704 cat >>confdefs.h <<_ACEOF
16705 #define ALIGNOF_INT $ac_cv_alignof_int
16706 _ACEOF
16707
16708
16709 # The cast to long int works around a bug in the HP C Compiler,
16710 # see AC_CHECK_SIZEOF for more information.
16711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16712 $as_echo_n "checking alignment of long... " >&6; }
16713 if ${ac_cv_alignof_long+:} false; then :
16714   $as_echo_n "(cached) " >&6
16715 else
16716   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16717 #ifndef offsetof
16718 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16719 #endif
16720 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16721
16722 else
16723   if test "$ac_cv_type_long" = yes; then
16724      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16725 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16726 as_fn_error 77 "cannot compute alignment of long
16727 See \`config.log' for more details" "$LINENO" 5; }
16728    else
16729      ac_cv_alignof_long=0
16730    fi
16731 fi
16732
16733 fi
16734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16735 $as_echo "$ac_cv_alignof_long" >&6; }
16736
16737
16738
16739 cat >>confdefs.h <<_ACEOF
16740 #define ALIGNOF_LONG $ac_cv_alignof_long
16741 _ACEOF
16742
16743
16744 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16745   # The cast to long int works around a bug in the HP C Compiler,
16746 # see AC_CHECK_SIZEOF for more information.
16747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16748 $as_echo_n "checking alignment of long long int... " >&6; }
16749 if ${ac_cv_alignof_long_long_int+:} false; then :
16750   $as_echo_n "(cached) " >&6
16751 else
16752   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
16753 #ifndef offsetof
16754 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16755 #endif
16756 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16757
16758 else
16759   if test "$ac_cv_type_long_long_int" = yes; then
16760      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16761 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16762 as_fn_error 77 "cannot compute alignment of long long int
16763 See \`config.log' for more details" "$LINENO" 5; }
16764    else
16765      ac_cv_alignof_long_long_int=0
16766    fi
16767 fi
16768
16769 fi
16770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16771 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16772
16773
16774
16775 cat >>confdefs.h <<_ACEOF
16776 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16777 _ACEOF
16778
16779
16780 fi
16781 # The cast to long int works around a bug in the HP C Compiler,
16782 # see AC_CHECK_SIZEOF for more information.
16783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16784 $as_echo_n "checking alignment of double... " >&6; }
16785 if ${ac_cv_alignof_double+:} false; then :
16786   $as_echo_n "(cached) " >&6
16787 else
16788   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
16789 #ifndef offsetof
16790 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16791 #endif
16792 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16793
16794 else
16795   if test "$ac_cv_type_double" = yes; then
16796      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16797 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16798 as_fn_error 77 "cannot compute alignment of double
16799 See \`config.log' for more details" "$LINENO" 5; }
16800    else
16801      ac_cv_alignof_double=0
16802    fi
16803 fi
16804
16805 fi
16806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16807 $as_echo "$ac_cv_alignof_double" >&6; }
16808
16809
16810
16811 cat >>confdefs.h <<_ACEOF
16812 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16813 _ACEOF
16814
16815
16816
16817 # Compute maximum alignment of any basic type.
16818 # We assume long's alignment is at least as strong as char, short, or int;
16819 # but we must check long long (if it is being used for int64) and double.
16820 # Note that we intentionally do not consider any types wider than 64 bits,
16821 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
16822 # for disk and memory space.
16823
16824 MAX_ALIGNOF=$ac_cv_alignof_long
16825 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
16826   MAX_ALIGNOF=$ac_cv_alignof_double
16827 fi
16828 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
16829   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
16830 fi
16831
16832 cat >>confdefs.h <<_ACEOF
16833 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16834 _ACEOF
16835
16836
16837
16838 # Some platforms predefine the types int8, int16, etc.  Only check
16839 # a (hopefully) representative subset.
16840 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16841 "
16842 if test "x$ac_cv_type_int8" = xyes; then :
16843
16844 cat >>confdefs.h <<_ACEOF
16845 #define HAVE_INT8 1
16846 _ACEOF
16847
16848
16849 fi
16850 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16851 "
16852 if test "x$ac_cv_type_uint8" = xyes; then :
16853
16854 cat >>confdefs.h <<_ACEOF
16855 #define HAVE_UINT8 1
16856 _ACEOF
16857
16858
16859 fi
16860 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
16861 "
16862 if test "x$ac_cv_type_int64" = xyes; then :
16863
16864 cat >>confdefs.h <<_ACEOF
16865 #define HAVE_INT64 1
16866 _ACEOF
16867
16868
16869 fi
16870 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
16871 "
16872 if test "x$ac_cv_type_uint64" = xyes; then :
16873
16874 cat >>confdefs.h <<_ACEOF
16875 #define HAVE_UINT64 1
16876 _ACEOF
16877
16878
16879 fi
16880
16881
16882 # Some compilers offer a 128-bit integer scalar type.
16883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16884 $as_echo_n "checking for __int128... " >&6; }
16885 if ${pgac_cv__128bit_int+:} false; then :
16886   $as_echo_n "(cached) " >&6
16887 else
16888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16889 /* end confdefs.h.  */
16890
16891 /*
16892  * We don't actually run this test, just link it to verify that any support
16893  * functions needed for __int128 are present.
16894  *
16895  * These are globals to discourage the compiler from folding all the
16896  * arithmetic tests down to compile-time constants.  We do not have
16897  * convenient support for 128bit literals at this point...
16898  */
16899 __int128 a = 48828125;
16900 __int128 b = 97656250;
16901
16902 int
16903 main ()
16904 {
16905
16906 __int128 c,d;
16907 a = (a << 12) + 1; /* 200000000001 */
16908 b = (b << 12) + 5; /* 400000000005 */
16909 /* try the most relevant arithmetic ops */
16910 c = a * b;
16911 d = (c + b) / b;
16912 /* must use the results, else compiler may optimize arithmetic away */
16913 if (d != a+1)
16914   return 1;
16915
16916   ;
16917   return 0;
16918 }
16919 _ACEOF
16920 if ac_fn_c_try_link "$LINENO"; then :
16921   pgac_cv__128bit_int=yes
16922 else
16923   pgac_cv__128bit_int=no
16924 fi
16925 rm -f core conftest.err conftest.$ac_objext \
16926     conftest$ac_exeext conftest.$ac_ext
16927 fi
16928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
16929 $as_echo "$pgac_cv__128bit_int" >&6; }
16930 if test x"$pgac_cv__128bit_int" = xyes ; then
16931   # Use of non-default alignment with __int128 tickles bugs in some compilers.
16932   # If not cross-compiling, we can test for bugs and disable use of __int128
16933   # with buggy compilers.  If cross-compiling, hope for the best.
16934   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
16935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
16936 $as_echo_n "checking for __int128 alignment bug... " >&6; }
16937 if ${pgac_cv__128bit_int_bug+:} false; then :
16938   $as_echo_n "(cached) " >&6
16939 else
16940   if test "$cross_compiling" = yes; then :
16941   pgac_cv__128bit_int_bug="assuming ok"
16942 else
16943   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16944 /* end confdefs.h.  */
16945
16946 /* This must match the corresponding code in c.h: */
16947 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
16948 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
16949 #endif
16950 typedef __int128 int128a
16951 #if defined(pg_attribute_aligned)
16952 pg_attribute_aligned(8)
16953 #endif
16954 ;
16955 int128a holder;
16956 void pass_by_val(void *buffer, int128a par) { holder = par; }
16957
16958 int
16959 main ()
16960 {
16961
16962 long int i64 = 97656225L << 12;
16963 int128a q;
16964 pass_by_val(main, (int128a) i64);
16965 q = (int128a) i64;
16966 if (q != holder)
16967   return 1;
16968
16969   ;
16970   return 0;
16971 }
16972 _ACEOF
16973 if ac_fn_c_try_run "$LINENO"; then :
16974   pgac_cv__128bit_int_bug=ok
16975 else
16976   pgac_cv__128bit_int_bug=broken
16977 fi
16978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16979   conftest.$ac_objext conftest.beam conftest.$ac_ext
16980 fi
16981
16982 fi
16983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
16984 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
16985   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
16986
16987 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
16988
16989     # The cast to long int works around a bug in the HP C Compiler,
16990 # see AC_CHECK_SIZEOF for more information.
16991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
16992 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
16993 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
16994   $as_echo_n "(cached) " >&6
16995 else
16996   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
16997 #ifndef offsetof
16998 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16999 #endif
17000 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17001
17002 else
17003   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17004      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17005 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17006 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17007 See \`config.log' for more details" "$LINENO" 5; }
17008    else
17009      ac_cv_alignof_PG_INT128_TYPE=0
17010    fi
17011 fi
17012
17013 fi
17014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17015 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17016
17017
17018
17019 cat >>confdefs.h <<_ACEOF
17020 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17021 _ACEOF
17022
17023
17024   fi
17025 fi
17026
17027 # Check for various atomic operations now that we have checked how to declare
17028 # 64bit integers.
17029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17030 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17031 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17032   $as_echo_n "(cached) " >&6
17033 else
17034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17035 /* end confdefs.h.  */
17036
17037 int
17038 main ()
17039 {
17040 char lock = 0;
17041    __sync_lock_test_and_set(&lock, 1);
17042    __sync_lock_release(&lock);
17043   ;
17044   return 0;
17045 }
17046 _ACEOF
17047 if ac_fn_c_try_link "$LINENO"; then :
17048   pgac_cv_gcc_sync_char_tas="yes"
17049 else
17050   pgac_cv_gcc_sync_char_tas="no"
17051 fi
17052 rm -f core conftest.err conftest.$ac_objext \
17053     conftest$ac_exeext conftest.$ac_ext
17054 fi
17055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17056 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17057 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17058
17059 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17060
17061 fi
17062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17063 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17064 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17065   $as_echo_n "(cached) " >&6
17066 else
17067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17068 /* end confdefs.h.  */
17069
17070 int
17071 main ()
17072 {
17073 int lock = 0;
17074    __sync_lock_test_and_set(&lock, 1);
17075    __sync_lock_release(&lock);
17076   ;
17077   return 0;
17078 }
17079 _ACEOF
17080 if ac_fn_c_try_link "$LINENO"; then :
17081   pgac_cv_gcc_sync_int32_tas="yes"
17082 else
17083   pgac_cv_gcc_sync_int32_tas="no"
17084 fi
17085 rm -f core conftest.err conftest.$ac_objext \
17086     conftest$ac_exeext conftest.$ac_ext
17087 fi
17088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17089 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17090 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17091
17092 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17093
17094 fi
17095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17096 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17097 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17098   $as_echo_n "(cached) " >&6
17099 else
17100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17101 /* end confdefs.h.  */
17102
17103 int
17104 main ()
17105 {
17106 int val = 0;
17107    __sync_val_compare_and_swap(&val, 0, 37);
17108   ;
17109   return 0;
17110 }
17111 _ACEOF
17112 if ac_fn_c_try_link "$LINENO"; then :
17113   pgac_cv_gcc_sync_int32_cas="yes"
17114 else
17115   pgac_cv_gcc_sync_int32_cas="no"
17116 fi
17117 rm -f core conftest.err conftest.$ac_objext \
17118     conftest$ac_exeext conftest.$ac_ext
17119 fi
17120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17121 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17122 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17123
17124 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17125
17126 fi
17127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17128 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17129 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17130   $as_echo_n "(cached) " >&6
17131 else
17132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17133 /* end confdefs.h.  */
17134
17135 int
17136 main ()
17137 {
17138 PG_INT64_TYPE lock = 0;
17139    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17140   ;
17141   return 0;
17142 }
17143 _ACEOF
17144 if ac_fn_c_try_link "$LINENO"; then :
17145   pgac_cv_gcc_sync_int64_cas="yes"
17146 else
17147   pgac_cv_gcc_sync_int64_cas="no"
17148 fi
17149 rm -f core conftest.err conftest.$ac_objext \
17150     conftest$ac_exeext conftest.$ac_ext
17151 fi
17152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17153 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17154 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17155
17156 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17157
17158 fi
17159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17160 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17161 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17162   $as_echo_n "(cached) " >&6
17163 else
17164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17165 /* end confdefs.h.  */
17166
17167 int
17168 main ()
17169 {
17170 int val = 0;
17171    int expect = 0;
17172    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17173   ;
17174   return 0;
17175 }
17176 _ACEOF
17177 if ac_fn_c_try_link "$LINENO"; then :
17178   pgac_cv_gcc_atomic_int32_cas="yes"
17179 else
17180   pgac_cv_gcc_atomic_int32_cas="no"
17181 fi
17182 rm -f core conftest.err conftest.$ac_objext \
17183     conftest$ac_exeext conftest.$ac_ext
17184 fi
17185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17186 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17187 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17188
17189 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17190
17191 fi
17192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17193 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17194 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17195   $as_echo_n "(cached) " >&6
17196 else
17197   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17198 /* end confdefs.h.  */
17199
17200 int
17201 main ()
17202 {
17203 PG_INT64_TYPE val = 0;
17204    PG_INT64_TYPE expect = 0;
17205    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17206   ;
17207   return 0;
17208 }
17209 _ACEOF
17210 if ac_fn_c_try_link "$LINENO"; then :
17211   pgac_cv_gcc_atomic_int64_cas="yes"
17212 else
17213   pgac_cv_gcc_atomic_int64_cas="no"
17214 fi
17215 rm -f core conftest.err conftest.$ac_objext \
17216     conftest$ac_exeext conftest.$ac_ext
17217 fi
17218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17219 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17220 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17221
17222 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17223
17224 fi
17225
17226
17227 # Check for x86 cpuid instruction
17228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17229 $as_echo_n "checking for __get_cpuid... " >&6; }
17230 if ${pgac_cv__get_cpuid+:} false; then :
17231   $as_echo_n "(cached) " >&6
17232 else
17233   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17234 /* end confdefs.h.  */
17235 #include <cpuid.h>
17236 int
17237 main ()
17238 {
17239 unsigned int exx[4] = {0, 0, 0, 0};
17240   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17241
17242   ;
17243   return 0;
17244 }
17245 _ACEOF
17246 if ac_fn_c_try_link "$LINENO"; then :
17247   pgac_cv__get_cpuid="yes"
17248 else
17249   pgac_cv__get_cpuid="no"
17250 fi
17251 rm -f core conftest.err conftest.$ac_objext \
17252     conftest$ac_exeext conftest.$ac_ext
17253 fi
17254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17255 $as_echo "$pgac_cv__get_cpuid" >&6; }
17256 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17257
17258 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17259
17260 fi
17261
17262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17263 $as_echo_n "checking for __cpuid... " >&6; }
17264 if ${pgac_cv__cpuid+:} false; then :
17265   $as_echo_n "(cached) " >&6
17266 else
17267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17268 /* end confdefs.h.  */
17269 #include <intrin.h>
17270 int
17271 main ()
17272 {
17273 unsigned int exx[4] = {0, 0, 0, 0};
17274   __get_cpuid(exx[0], 1);
17275
17276   ;
17277   return 0;
17278 }
17279 _ACEOF
17280 if ac_fn_c_try_link "$LINENO"; then :
17281   pgac_cv__cpuid="yes"
17282 else
17283   pgac_cv__cpuid="no"
17284 fi
17285 rm -f core conftest.err conftest.$ac_objext \
17286     conftest$ac_exeext conftest.$ac_ext
17287 fi
17288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17289 $as_echo "$pgac_cv__cpuid" >&6; }
17290 if test x"$pgac_cv__cpuid" = x"yes"; then
17291
17292 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17293
17294 fi
17295
17296 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17297 #
17298 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17299 # with the default compiler flags. If not, check if adding the -msse4.2
17300 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17302 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17303 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17304   $as_echo_n "(cached) " >&6
17305 else
17306   pgac_save_CFLAGS=$CFLAGS
17307 CFLAGS="$pgac_save_CFLAGS "
17308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17309 /* end confdefs.h.  */
17310 #include <nmmintrin.h>
17311 int
17312 main ()
17313 {
17314 unsigned int crc = 0;
17315    crc = _mm_crc32_u8(crc, 0);
17316    crc = _mm_crc32_u32(crc, 0);
17317    /* return computed value, to prevent the above being optimized away */
17318    return crc == 0;
17319   ;
17320   return 0;
17321 }
17322 _ACEOF
17323 if ac_fn_c_try_link "$LINENO"; then :
17324   pgac_cv_sse42_crc32_intrinsics_=yes
17325 else
17326   pgac_cv_sse42_crc32_intrinsics_=no
17327 fi
17328 rm -f core conftest.err conftest.$ac_objext \
17329     conftest$ac_exeext conftest.$ac_ext
17330 CFLAGS="$pgac_save_CFLAGS"
17331 fi
17332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17333 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17334 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17335   CFLAGS_SSE42=""
17336   pgac_sse42_crc32_intrinsics=yes
17337 fi
17338
17339 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17340   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17341 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17342 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17343   $as_echo_n "(cached) " >&6
17344 else
17345   pgac_save_CFLAGS=$CFLAGS
17346 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17348 /* end confdefs.h.  */
17349 #include <nmmintrin.h>
17350 int
17351 main ()
17352 {
17353 unsigned int crc = 0;
17354    crc = _mm_crc32_u8(crc, 0);
17355    crc = _mm_crc32_u32(crc, 0);
17356    /* return computed value, to prevent the above being optimized away */
17357    return crc == 0;
17358   ;
17359   return 0;
17360 }
17361 _ACEOF
17362 if ac_fn_c_try_link "$LINENO"; then :
17363   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17364 else
17365   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17366 fi
17367 rm -f core conftest.err conftest.$ac_objext \
17368     conftest$ac_exeext conftest.$ac_ext
17369 CFLAGS="$pgac_save_CFLAGS"
17370 fi
17371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17372 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17373 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17374   CFLAGS_SSE42="-msse4.2"
17375   pgac_sse42_crc32_intrinsics=yes
17376 fi
17377
17378 fi
17379
17380
17381 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17382 # define __SSE4_2__ in that case.
17383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17384 /* end confdefs.h.  */
17385
17386 int
17387 main ()
17388 {
17389
17390 #ifndef __SSE4_2__
17391 #error __SSE4_2__ not defined
17392 #endif
17393
17394   ;
17395   return 0;
17396 }
17397 _ACEOF
17398 if ac_fn_c_try_compile "$LINENO"; then :
17399   SSE4_2_TARGETED=1
17400 fi
17401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17402
17403 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17404 #
17405 # First check if __crc32c* intrinsics can be used with the default compiler
17406 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17407 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17409 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17410 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17411   $as_echo_n "(cached) " >&6
17412 else
17413   pgac_save_CFLAGS=$CFLAGS
17414 CFLAGS="$pgac_save_CFLAGS "
17415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17416 /* end confdefs.h.  */
17417 #include <arm_acle.h>
17418 int
17419 main ()
17420 {
17421 unsigned int crc = 0;
17422    crc = __crc32cb(crc, 0);
17423    crc = __crc32ch(crc, 0);
17424    crc = __crc32cw(crc, 0);
17425    crc = __crc32cd(crc, 0);
17426    /* return computed value, to prevent the above being optimized away */
17427    return crc == 0;
17428   ;
17429   return 0;
17430 }
17431 _ACEOF
17432 if ac_fn_c_try_link "$LINENO"; then :
17433   pgac_cv_armv8_crc32c_intrinsics_=yes
17434 else
17435   pgac_cv_armv8_crc32c_intrinsics_=no
17436 fi
17437 rm -f core conftest.err conftest.$ac_objext \
17438     conftest$ac_exeext conftest.$ac_ext
17439 CFLAGS="$pgac_save_CFLAGS"
17440 fi
17441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17442 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17443 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17444   CFLAGS_ARMV8_CRC32C=""
17445   pgac_armv8_crc32c_intrinsics=yes
17446 fi
17447
17448 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17449   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17450 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17451 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17452   $as_echo_n "(cached) " >&6
17453 else
17454   pgac_save_CFLAGS=$CFLAGS
17455 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17457 /* end confdefs.h.  */
17458 #include <arm_acle.h>
17459 int
17460 main ()
17461 {
17462 unsigned int crc = 0;
17463    crc = __crc32cb(crc, 0);
17464    crc = __crc32ch(crc, 0);
17465    crc = __crc32cw(crc, 0);
17466    crc = __crc32cd(crc, 0);
17467    /* return computed value, to prevent the above being optimized away */
17468    return crc == 0;
17469   ;
17470   return 0;
17471 }
17472 _ACEOF
17473 if ac_fn_c_try_link "$LINENO"; then :
17474   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17475 else
17476   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17477 fi
17478 rm -f core conftest.err conftest.$ac_objext \
17479     conftest$ac_exeext conftest.$ac_ext
17480 CFLAGS="$pgac_save_CFLAGS"
17481 fi
17482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17483 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17484 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17485   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17486   pgac_armv8_crc32c_intrinsics=yes
17487 fi
17488
17489 fi
17490
17491
17492 # Select CRC-32C implementation.
17493 #
17494 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17495 # use the special CRC instructions for calculating CRC-32C. If we're not
17496 # targeting such a processor, but we can nevertheless produce code that uses
17497 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17498 # implementations and select which one to use at runtime, depending on whether
17499 # SSE 4.2 is supported by the processor we're running on.
17500 #
17501 # Similarly, if we are targeting an ARM processor that has the CRC
17502 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17503 # we're not targeting such a processor, but can nevertheless produce code that
17504 # uses the CRC instructions, compile both, and select at runtime.
17505 #
17506 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17507 # in the template or configure command line.
17508 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
17509   # Use Intel SSE 4.2 if available.
17510   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17511     USE_SSE42_CRC32C=1
17512   else
17513     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17514     # the runtime check.
17515     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
17516       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17517     else
17518       # Use ARM CRC Extension if available.
17519       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17520         USE_ARMV8_CRC32C=1
17521       else
17522         # ARM CRC Extension, with runtime check?
17523         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17524           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17525         else
17526           # fall back to slicing-by-8 algorithm, which doesn't require any
17527           # special CPU support.
17528           USE_SLICING_BY_8_CRC32C=1
17529         fi
17530       fi
17531     fi
17532   fi
17533 fi
17534
17535 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17537 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17538 if test x"$USE_SSE42_CRC32C" = x"1"; then
17539
17540 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17541
17542   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17544 $as_echo "SSE 4.2" >&6; }
17545 else
17546   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17547
17548 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17549
17550     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17551     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17552 $as_echo "SSE 4.2 with runtime check" >&6; }
17553   else
17554     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17555
17556 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17557
17558       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17559       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17560 $as_echo "ARMv8 CRC instructions" >&6; }
17561     else
17562       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17563
17564 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17565
17566         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17567         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17568 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17569       else
17570
17571 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17572
17573         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17574         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17575 $as_echo "slicing-by-8" >&6; }
17576       fi
17577     fi
17578   fi
17579 fi
17580
17581
17582
17583 # Select semaphore implementation type.
17584 if test "$PORTNAME" != "win32"; then
17585   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17586     # Need sem_open for this
17587     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17588 $as_echo_n "checking for library containing sem_open... " >&6; }
17589 if ${ac_cv_search_sem_open+:} false; then :
17590   $as_echo_n "(cached) " >&6
17591 else
17592   ac_func_search_save_LIBS=$LIBS
17593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17594 /* end confdefs.h.  */
17595
17596 /* Override any GCC internal prototype to avoid an error.
17597    Use char because int might match the return type of a GCC
17598    builtin and then its argument prototype would still apply.  */
17599 #ifdef __cplusplus
17600 extern "C"
17601 #endif
17602 char sem_open ();
17603 int
17604 main ()
17605 {
17606 return sem_open ();
17607   ;
17608   return 0;
17609 }
17610 _ACEOF
17611 for ac_lib in '' rt pthread; do
17612   if test -z "$ac_lib"; then
17613     ac_res="none required"
17614   else
17615     ac_res=-l$ac_lib
17616     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17617   fi
17618   if ac_fn_c_try_link "$LINENO"; then :
17619   ac_cv_search_sem_open=$ac_res
17620 fi
17621 rm -f core conftest.err conftest.$ac_objext \
17622     conftest$ac_exeext
17623   if ${ac_cv_search_sem_open+:} false; then :
17624   break
17625 fi
17626 done
17627 if ${ac_cv_search_sem_open+:} false; then :
17628
17629 else
17630   ac_cv_search_sem_open=no
17631 fi
17632 rm conftest.$ac_ext
17633 LIBS=$ac_func_search_save_LIBS
17634 fi
17635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17636 $as_echo "$ac_cv_search_sem_open" >&6; }
17637 ac_res=$ac_cv_search_sem_open
17638 if test "$ac_res" != no; then :
17639   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17640   USE_NAMED_POSIX_SEMAPHORES=1
17641 fi
17642
17643   fi
17644   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17645     # Need sem_init for this
17646     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17647 $as_echo_n "checking for library containing sem_init... " >&6; }
17648 if ${ac_cv_search_sem_init+:} false; then :
17649   $as_echo_n "(cached) " >&6
17650 else
17651   ac_func_search_save_LIBS=$LIBS
17652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17653 /* end confdefs.h.  */
17654
17655 /* Override any GCC internal prototype to avoid an error.
17656    Use char because int might match the return type of a GCC
17657    builtin and then its argument prototype would still apply.  */
17658 #ifdef __cplusplus
17659 extern "C"
17660 #endif
17661 char sem_init ();
17662 int
17663 main ()
17664 {
17665 return sem_init ();
17666   ;
17667   return 0;
17668 }
17669 _ACEOF
17670 for ac_lib in '' rt pthread; do
17671   if test -z "$ac_lib"; then
17672     ac_res="none required"
17673   else
17674     ac_res=-l$ac_lib
17675     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17676   fi
17677   if ac_fn_c_try_link "$LINENO"; then :
17678   ac_cv_search_sem_init=$ac_res
17679 fi
17680 rm -f core conftest.err conftest.$ac_objext \
17681     conftest$ac_exeext
17682   if ${ac_cv_search_sem_init+:} false; then :
17683   break
17684 fi
17685 done
17686 if ${ac_cv_search_sem_init+:} false; then :
17687
17688 else
17689   ac_cv_search_sem_init=no
17690 fi
17691 rm conftest.$ac_ext
17692 LIBS=$ac_func_search_save_LIBS
17693 fi
17694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17695 $as_echo "$ac_cv_search_sem_init" >&6; }
17696 ac_res=$ac_cv_search_sem_init
17697 if test "$ac_res" != no; then :
17698   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17699   USE_UNNAMED_POSIX_SEMAPHORES=1
17700 fi
17701
17702   fi
17703   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17704 $as_echo_n "checking which semaphore API to use... " >&6; }
17705   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17706
17707 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17708
17709     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17710     sematype="named POSIX"
17711   else
17712     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17713
17714 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17715
17716       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17717       sematype="unnamed POSIX"
17718     else
17719
17720 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17721
17722       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17723       sematype="System V"
17724     fi
17725   fi
17726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17727 $as_echo "$sematype" >&6; }
17728 else
17729
17730 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17731
17732   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17733 fi
17734
17735
17736 # Select shared-memory implementation type.
17737 if test "$PORTNAME" != "win32"; then
17738
17739 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17740
17741   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17742 else
17743
17744 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17745
17746   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17747 fi
17748
17749 # Select random number source
17750 #
17751 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17752 # in the template or configure command line.
17753
17754 # If not selected manually, try to select a source automatically.
17755 if test "$enable_strong_random" = "yes" && test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
17756   if test x"$with_openssl" = x"yes" ; then
17757     USE_OPENSSL_RANDOM=1
17758   elif test "$PORTNAME" = "win32" ; then
17759     USE_WIN32_RANDOM=1
17760   else
17761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17762 $as_echo_n "checking for /dev/urandom... " >&6; }
17763 if ${ac_cv_file__dev_urandom+:} false; then :
17764   $as_echo_n "(cached) " >&6
17765 else
17766   test "$cross_compiling" = yes &&
17767   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17768 if test -r "/dev/urandom"; then
17769   ac_cv_file__dev_urandom=yes
17770 else
17771   ac_cv_file__dev_urandom=no
17772 fi
17773 fi
17774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17775 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17776 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17777
17778 fi
17779
17780
17781     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17782       USE_DEV_URANDOM=1
17783     fi
17784   fi
17785 fi
17786
17787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17788 $as_echo_n "checking which random number source to use... " >&6; }
17789 if test "$enable_strong_random" = yes ; then
17790   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17791
17792 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17793
17794     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17795 $as_echo "OpenSSL" >&6; }
17796   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
17797
17798 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
17799
17800     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17801 $as_echo "Windows native" >&6; }
17802   elif test x"$USE_DEV_URANDOM" = x"1" ; then
17803
17804 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
17805
17806     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17807 $as_echo "/dev/urandom" >&6; }
17808   else
17809     as_fn_error $? "
17810 no source of strong random numbers was found
17811 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
17812 for authentication protocols. You can use --disable-strong-random to use a
17813 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
17814   fi
17815
17816 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
17817
17818 else
17819     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
17820 $as_echo "weak builtin PRNG" >&6; }
17821     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17822 *** Not using a strong random number source may be insecure." >&5
17823 $as_echo "$as_me: WARNING:
17824 *** Not using a strong random number source may be insecure." >&2;}
17825 fi
17826
17827 # If not set in template file, set bytes to use libc memset()
17828 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17829   MEMSET_LOOP_LIMIT=1024
17830 fi
17831
17832 cat >>confdefs.h <<_ACEOF
17833 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17834 _ACEOF
17835
17836
17837
17838 if test "$enable_nls" = yes ; then
17839
17840   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17841 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17842 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17843   $as_echo_n "(cached) " >&6
17844 else
17845   ac_func_search_save_LIBS=$LIBS
17846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17847 /* end confdefs.h.  */
17848
17849 /* Override any GCC internal prototype to avoid an error.
17850    Use char because int might match the return type of a GCC
17851    builtin and then its argument prototype would still apply.  */
17852 #ifdef __cplusplus
17853 extern "C"
17854 #endif
17855 char bind_textdomain_codeset ();
17856 int
17857 main ()
17858 {
17859 return bind_textdomain_codeset ();
17860   ;
17861   return 0;
17862 }
17863 _ACEOF
17864 for ac_lib in '' intl; do
17865   if test -z "$ac_lib"; then
17866     ac_res="none required"
17867   else
17868     ac_res=-l$ac_lib
17869     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17870   fi
17871   if ac_fn_c_try_link "$LINENO"; then :
17872   ac_cv_search_bind_textdomain_codeset=$ac_res
17873 fi
17874 rm -f core conftest.err conftest.$ac_objext \
17875     conftest$ac_exeext
17876   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17877   break
17878 fi
17879 done
17880 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17881
17882 else
17883   ac_cv_search_bind_textdomain_codeset=no
17884 fi
17885 rm conftest.$ac_ext
17886 LIBS=$ac_func_search_save_LIBS
17887 fi
17888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
17889 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
17890 ac_res=$ac_cv_search_bind_textdomain_codeset
17891 if test "$ac_res" != no; then :
17892   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17893
17894 else
17895   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
17896 fi
17897
17898   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
17899 if test "x$ac_cv_header_libintl_h" = xyes; then :
17900
17901 else
17902   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
17903 fi
17904
17905
17906   if test -z "$MSGFMT"; then
17907   for ac_prog in msgfmt
17908 do
17909   # Extract the first word of "$ac_prog", so it can be a program name with args.
17910 set dummy $ac_prog; ac_word=$2
17911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17912 $as_echo_n "checking for $ac_word... " >&6; }
17913 if ${ac_cv_path_MSGFMT+:} false; then :
17914   $as_echo_n "(cached) " >&6
17915 else
17916   case $MSGFMT in
17917   [\\/]* | ?:[\\/]*)
17918   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
17919   ;;
17920   *)
17921   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17922 for as_dir in $PATH
17923 do
17924   IFS=$as_save_IFS
17925   test -z "$as_dir" && as_dir=.
17926     for ac_exec_ext in '' $ac_executable_extensions; do
17927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17928     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
17929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17930     break 2
17931   fi
17932 done
17933   done
17934 IFS=$as_save_IFS
17935
17936   ;;
17937 esac
17938 fi
17939 MSGFMT=$ac_cv_path_MSGFMT
17940 if test -n "$MSGFMT"; then
17941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17942 $as_echo "$MSGFMT" >&6; }
17943 else
17944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17945 $as_echo "no" >&6; }
17946 fi
17947
17948
17949   test -n "$MSGFMT" && break
17950 done
17951
17952 else
17953   # Report the value of MSGFMT in configure's output in all cases.
17954   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
17955 $as_echo_n "checking for MSGFMT... " >&6; }
17956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17957 $as_echo "$MSGFMT" >&6; }
17958 fi
17959
17960   if test -z "$MSGFMT"; then
17961     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
17962   fi
17963   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
17964 $as_echo_n "checking for msgfmt flags... " >&6; }
17965 if ${pgac_cv_msgfmt_flags+:} false; then :
17966   $as_echo_n "(cached) " >&6
17967 else
17968   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
17969     pgac_cv_msgfmt_flags=-c
17970 fi
17971 fi
17972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
17973 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
17974   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
17975
17976   if test -z "$MSGMERGE"; then
17977   for ac_prog in msgmerge
17978 do
17979   # Extract the first word of "$ac_prog", so it can be a program name with args.
17980 set dummy $ac_prog; ac_word=$2
17981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17982 $as_echo_n "checking for $ac_word... " >&6; }
17983 if ${ac_cv_path_MSGMERGE+:} false; then :
17984   $as_echo_n "(cached) " >&6
17985 else
17986   case $MSGMERGE in
17987   [\\/]* | ?:[\\/]*)
17988   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
17989   ;;
17990   *)
17991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17992 for as_dir in $PATH
17993 do
17994   IFS=$as_save_IFS
17995   test -z "$as_dir" && as_dir=.
17996     for ac_exec_ext in '' $ac_executable_extensions; do
17997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17998     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
17999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18000     break 2
18001   fi
18002 done
18003   done
18004 IFS=$as_save_IFS
18005
18006   ;;
18007 esac
18008 fi
18009 MSGMERGE=$ac_cv_path_MSGMERGE
18010 if test -n "$MSGMERGE"; then
18011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18012 $as_echo "$MSGMERGE" >&6; }
18013 else
18014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18015 $as_echo "no" >&6; }
18016 fi
18017
18018
18019   test -n "$MSGMERGE" && break
18020 done
18021
18022 else
18023   # Report the value of MSGMERGE in configure's output in all cases.
18024   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18025 $as_echo_n "checking for MSGMERGE... " >&6; }
18026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18027 $as_echo "$MSGMERGE" >&6; }
18028 fi
18029
18030   if test -z "$XGETTEXT"; then
18031   for ac_prog in xgettext
18032 do
18033   # Extract the first word of "$ac_prog", so it can be a program name with args.
18034 set dummy $ac_prog; ac_word=$2
18035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18036 $as_echo_n "checking for $ac_word... " >&6; }
18037 if ${ac_cv_path_XGETTEXT+:} false; then :
18038   $as_echo_n "(cached) " >&6
18039 else
18040   case $XGETTEXT in
18041   [\\/]* | ?:[\\/]*)
18042   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18043   ;;
18044   *)
18045   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18046 for as_dir in $PATH
18047 do
18048   IFS=$as_save_IFS
18049   test -z "$as_dir" && as_dir=.
18050     for ac_exec_ext in '' $ac_executable_extensions; do
18051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18052     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18054     break 2
18055   fi
18056 done
18057   done
18058 IFS=$as_save_IFS
18059
18060   ;;
18061 esac
18062 fi
18063 XGETTEXT=$ac_cv_path_XGETTEXT
18064 if test -n "$XGETTEXT"; then
18065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18066 $as_echo "$XGETTEXT" >&6; }
18067 else
18068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18069 $as_echo "no" >&6; }
18070 fi
18071
18072
18073   test -n "$XGETTEXT" && break
18074 done
18075
18076 else
18077   # Report the value of XGETTEXT in configure's output in all cases.
18078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18079 $as_echo_n "checking for XGETTEXT... " >&6; }
18080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18081 $as_echo "$XGETTEXT" >&6; }
18082 fi
18083
18084
18085 fi
18086
18087 # Check for Tcl configuration script tclConfig.sh
18088 if test "$with_tcl" = yes; then
18089     if test -z "$TCLSH"; then
18090   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18091 do
18092   # Extract the first word of "$ac_prog", so it can be a program name with args.
18093 set dummy $ac_prog; ac_word=$2
18094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18095 $as_echo_n "checking for $ac_word... " >&6; }
18096 if ${ac_cv_path_TCLSH+:} false; then :
18097   $as_echo_n "(cached) " >&6
18098 else
18099   case $TCLSH in
18100   [\\/]* | ?:[\\/]*)
18101   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18102   ;;
18103   *)
18104   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18105 for as_dir in $PATH
18106 do
18107   IFS=$as_save_IFS
18108   test -z "$as_dir" && as_dir=.
18109     for ac_exec_ext in '' $ac_executable_extensions; do
18110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18111     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18113     break 2
18114   fi
18115 done
18116   done
18117 IFS=$as_save_IFS
18118
18119   ;;
18120 esac
18121 fi
18122 TCLSH=$ac_cv_path_TCLSH
18123 if test -n "$TCLSH"; then
18124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18125 $as_echo "$TCLSH" >&6; }
18126 else
18127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18128 $as_echo "no" >&6; }
18129 fi
18130
18131
18132   test -n "$TCLSH" && break
18133 done
18134
18135 else
18136   # Report the value of TCLSH in configure's output in all cases.
18137   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18138 $as_echo_n "checking for TCLSH... " >&6; }
18139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18140 $as_echo "$TCLSH" >&6; }
18141 fi
18142
18143 if test x"$TCLSH" = x""; then
18144   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18145 fi
18146
18147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18148 $as_echo_n "checking for tclConfig.sh... " >&6; }
18149 # Let user override test
18150 if test -z "$TCL_CONFIG_SH"; then
18151     pgac_test_dirs="$with_tclconfig"
18152
18153     set X $pgac_test_dirs; shift
18154     if test $# -eq 0; then
18155         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18156         pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18157         # On newer macOS, $auto_path frequently doesn't include the place
18158         # where tclConfig.sh actually lives.  Append that to the end, so as not
18159         # to break cases where a non-default Tcl installation is being used.
18160         if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18161             pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18162         fi
18163         set X $pgac_test_dirs; shift
18164     fi
18165
18166     for pgac_dir do
18167         if test -r "$pgac_dir/tclConfig.sh"; then
18168             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18169             break
18170         fi
18171     done
18172 fi
18173
18174 if test -z "$TCL_CONFIG_SH"; then
18175     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18176 $as_echo "no" >&6; }
18177     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18178 else
18179     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18180 $as_echo "$TCL_CONFIG_SH" >&6; }
18181 fi
18182
18183
18184
18185     . "$TCL_CONFIG_SH"
18186 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18187 eval TCL_LIBS=\"$TCL_LIBS\"
18188 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18189 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18190
18191         if test "$TCL_SHARED_BUILD" != 1; then
18192       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18193 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18194     fi
18195     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18196     ac_save_CPPFLAGS=$CPPFLAGS
18197     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18198     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18199 if test "x$ac_cv_header_tcl_h" = xyes; then :
18200
18201 else
18202   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18203 fi
18204
18205
18206     CPPFLAGS=$ac_save_CPPFLAGS
18207 fi
18208
18209 # check for <perl.h>
18210 if test "$with_perl" = yes; then
18211   ac_save_CPPFLAGS=$CPPFLAGS
18212   CPPFLAGS="$CPPFLAGS $perl_includespec"
18213   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18214 "
18215 if test "x$ac_cv_header_perl_h" = xyes; then :
18216
18217 else
18218   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18219 fi
18220
18221
18222   # While we're at it, check that we can link to libperl.
18223   # On most platforms, if perl.h is there then libperl.so will be too, but at
18224   # this writing Debian packages them separately.  There is no known reason to
18225   # waste cycles on separate probes for the Tcl or Python libraries, though.
18226   pgac_save_LIBS=$LIBS
18227   LIBS="$perl_embed_ldflags"
18228   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18229 $as_echo_n "checking for libperl... " >&6; }
18230   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18231 /* end confdefs.h.  */
18232
18233 #include <EXTERN.h>
18234 #include <perl.h>
18235
18236 int
18237 main ()
18238 {
18239 perl_alloc();
18240   ;
18241   return 0;
18242 }
18243 _ACEOF
18244 if ac_fn_c_try_link "$LINENO"; then :
18245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18246 $as_echo "yes" >&6; }
18247 else
18248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18249 $as_echo "no" >&6; }
18250      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18251 fi
18252 rm -f core conftest.err conftest.$ac_objext \
18253     conftest$ac_exeext conftest.$ac_ext
18254   LIBS=$pgac_save_LIBS
18255   CPPFLAGS=$ac_save_CPPFLAGS
18256 fi
18257
18258 # check for <Python.h>
18259 if test "$with_python" = yes; then
18260   ac_save_CPPFLAGS=$CPPFLAGS
18261   CPPFLAGS="$python_includespec $CPPFLAGS"
18262   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18263 if test "x$ac_cv_header_Python_h" = xyes; then :
18264
18265 else
18266   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18267 fi
18268
18269
18270   CPPFLAGS=$ac_save_CPPFLAGS
18271 fi
18272
18273 #
18274 # Check for DocBook and tools
18275 #
18276 if test -z "$XMLLINT"; then
18277   for ac_prog in xmllint
18278 do
18279   # Extract the first word of "$ac_prog", so it can be a program name with args.
18280 set dummy $ac_prog; ac_word=$2
18281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18282 $as_echo_n "checking for $ac_word... " >&6; }
18283 if ${ac_cv_path_XMLLINT+:} false; then :
18284   $as_echo_n "(cached) " >&6
18285 else
18286   case $XMLLINT in
18287   [\\/]* | ?:[\\/]*)
18288   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18289   ;;
18290   *)
18291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18292 for as_dir in $PATH
18293 do
18294   IFS=$as_save_IFS
18295   test -z "$as_dir" && as_dir=.
18296     for ac_exec_ext in '' $ac_executable_extensions; do
18297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18298     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18300     break 2
18301   fi
18302 done
18303   done
18304 IFS=$as_save_IFS
18305
18306   ;;
18307 esac
18308 fi
18309 XMLLINT=$ac_cv_path_XMLLINT
18310 if test -n "$XMLLINT"; then
18311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18312 $as_echo "$XMLLINT" >&6; }
18313 else
18314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18315 $as_echo "no" >&6; }
18316 fi
18317
18318
18319   test -n "$XMLLINT" && break
18320 done
18321
18322 else
18323   # Report the value of XMLLINT in configure's output in all cases.
18324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18325 $as_echo_n "checking for XMLLINT... " >&6; }
18326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18327 $as_echo "$XMLLINT" >&6; }
18328 fi
18329
18330
18331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18332 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18333 if ${pgac_cv_check_docbook+:} false; then :
18334   $as_echo_n "(cached) " >&6
18335 else
18336   cat >conftest.xml <<EOF
18337 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18338 <book>
18339  <title>test</title>
18340  <chapter>
18341   <title>random</title>
18342    <sect1>
18343     <title>testsect</title>
18344     <para>text</para>
18345   </sect1>
18346  </chapter>
18347 </book>
18348 EOF
18349
18350 pgac_cv_check_docbook=no
18351
18352 if test -n "$XMLLINT"; then
18353   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18354   if test $? -eq 0; then
18355     pgac_cv_check_docbook=yes
18356   fi
18357 fi
18358 rm -f conftest.xml
18359 fi
18360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18361 $as_echo "$pgac_cv_check_docbook" >&6; }
18362
18363 have_docbook=$pgac_cv_check_docbook
18364
18365
18366 if test -z "$DBTOEPUB"; then
18367   for ac_prog in dbtoepub
18368 do
18369   # Extract the first word of "$ac_prog", so it can be a program name with args.
18370 set dummy $ac_prog; ac_word=$2
18371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18372 $as_echo_n "checking for $ac_word... " >&6; }
18373 if ${ac_cv_path_DBTOEPUB+:} false; then :
18374   $as_echo_n "(cached) " >&6
18375 else
18376   case $DBTOEPUB in
18377   [\\/]* | ?:[\\/]*)
18378   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18379   ;;
18380   *)
18381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18382 for as_dir in $PATH
18383 do
18384   IFS=$as_save_IFS
18385   test -z "$as_dir" && as_dir=.
18386     for ac_exec_ext in '' $ac_executable_extensions; do
18387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18388     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18390     break 2
18391   fi
18392 done
18393   done
18394 IFS=$as_save_IFS
18395
18396   ;;
18397 esac
18398 fi
18399 DBTOEPUB=$ac_cv_path_DBTOEPUB
18400 if test -n "$DBTOEPUB"; then
18401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18402 $as_echo "$DBTOEPUB" >&6; }
18403 else
18404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18405 $as_echo "no" >&6; }
18406 fi
18407
18408
18409   test -n "$DBTOEPUB" && break
18410 done
18411
18412 else
18413   # Report the value of DBTOEPUB in configure's output in all cases.
18414   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18415 $as_echo_n "checking for DBTOEPUB... " >&6; }
18416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18417 $as_echo "$DBTOEPUB" >&6; }
18418 fi
18419
18420 if test -z "$XSLTPROC"; then
18421   for ac_prog in xsltproc
18422 do
18423   # Extract the first word of "$ac_prog", so it can be a program name with args.
18424 set dummy $ac_prog; ac_word=$2
18425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18426 $as_echo_n "checking for $ac_word... " >&6; }
18427 if ${ac_cv_path_XSLTPROC+:} false; then :
18428   $as_echo_n "(cached) " >&6
18429 else
18430   case $XSLTPROC in
18431   [\\/]* | ?:[\\/]*)
18432   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18433   ;;
18434   *)
18435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18436 for as_dir in $PATH
18437 do
18438   IFS=$as_save_IFS
18439   test -z "$as_dir" && as_dir=.
18440     for ac_exec_ext in '' $ac_executable_extensions; do
18441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18442     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18444     break 2
18445   fi
18446 done
18447   done
18448 IFS=$as_save_IFS
18449
18450   ;;
18451 esac
18452 fi
18453 XSLTPROC=$ac_cv_path_XSLTPROC
18454 if test -n "$XSLTPROC"; then
18455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18456 $as_echo "$XSLTPROC" >&6; }
18457 else
18458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18459 $as_echo "no" >&6; }
18460 fi
18461
18462
18463   test -n "$XSLTPROC" && break
18464 done
18465
18466 else
18467   # Report the value of XSLTPROC in configure's output in all cases.
18468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18469 $as_echo_n "checking for XSLTPROC... " >&6; }
18470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18471 $as_echo "$XSLTPROC" >&6; }
18472 fi
18473
18474 if test -z "$FOP"; then
18475   for ac_prog in fop
18476 do
18477   # Extract the first word of "$ac_prog", so it can be a program name with args.
18478 set dummy $ac_prog; ac_word=$2
18479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18480 $as_echo_n "checking for $ac_word... " >&6; }
18481 if ${ac_cv_path_FOP+:} false; then :
18482   $as_echo_n "(cached) " >&6
18483 else
18484   case $FOP in
18485   [\\/]* | ?:[\\/]*)
18486   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18487   ;;
18488   *)
18489   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18490 for as_dir in $PATH
18491 do
18492   IFS=$as_save_IFS
18493   test -z "$as_dir" && as_dir=.
18494     for ac_exec_ext in '' $ac_executable_extensions; do
18495   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18496     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18498     break 2
18499   fi
18500 done
18501   done
18502 IFS=$as_save_IFS
18503
18504   ;;
18505 esac
18506 fi
18507 FOP=$ac_cv_path_FOP
18508 if test -n "$FOP"; then
18509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18510 $as_echo "$FOP" >&6; }
18511 else
18512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18513 $as_echo "no" >&6; }
18514 fi
18515
18516
18517   test -n "$FOP" && break
18518 done
18519
18520 else
18521   # Report the value of FOP in configure's output in all cases.
18522   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18523 $as_echo_n "checking for FOP... " >&6; }
18524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18525 $as_echo "$FOP" >&6; }
18526 fi
18527
18528
18529 #
18530 # Check for test tools
18531 #
18532 if test "$enable_tap_tests" = yes; then
18533   # Check for necessary modules, unless user has specified the "prove" to use;
18534   # in that case it's her responsibility to have a working configuration.
18535   # (prove might be part of a different Perl installation than perl, eg on
18536   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18537   if test -z "$PROVE"; then
18538     # Test::More and Time::HiRes are supposed to be part of core Perl,
18539     # but some distros omit them in a minimal installation.
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550 # Make sure we have perl
18551 if test -z "$PERL"; then
18552 # Extract the first word of "perl", so it can be a program name with args.
18553 set dummy perl; ac_word=$2
18554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18555 $as_echo_n "checking for $ac_word... " >&6; }
18556 if ${ac_cv_prog_PERL+:} false; then :
18557   $as_echo_n "(cached) " >&6
18558 else
18559   if test -n "$PERL"; then
18560   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18561 else
18562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18563 for as_dir in $PATH
18564 do
18565   IFS=$as_save_IFS
18566   test -z "$as_dir" && as_dir=.
18567     for ac_exec_ext in '' $ac_executable_extensions; do
18568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18569     ac_cv_prog_PERL="perl"
18570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18571     break 2
18572   fi
18573 done
18574   done
18575 IFS=$as_save_IFS
18576
18577 fi
18578 fi
18579 PERL=$ac_cv_prog_PERL
18580 if test -n "$PERL"; then
18581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18582 $as_echo "$PERL" >&6; }
18583 else
18584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18585 $as_echo "no" >&6; }
18586 fi
18587
18588
18589 fi
18590
18591 if test "x$PERL" != x; then
18592   ax_perl_modules_failed=0
18593   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18594     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18595 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18596
18597     # Would be nice to log result here, but can't rely on autoconf internals
18598     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18599     if test $? -ne 0; then
18600       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18601 $as_echo "no" >&6; };
18602       ax_perl_modules_failed=1
18603    else
18604       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18605 $as_echo "ok" >&6; };
18606     fi
18607   done
18608
18609   # Run optional shell commands
18610   if test "$ax_perl_modules_failed" = 0; then
18611     :
18612
18613   else
18614     :
18615     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18616   fi
18617 else
18618   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18619 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18620 fi
18621   fi
18622   # Now make sure we know where prove is
18623   if test -z "$PROVE"; then
18624   for ac_prog in prove
18625 do
18626   # Extract the first word of "$ac_prog", so it can be a program name with args.
18627 set dummy $ac_prog; ac_word=$2
18628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18629 $as_echo_n "checking for $ac_word... " >&6; }
18630 if ${ac_cv_path_PROVE+:} false; then :
18631   $as_echo_n "(cached) " >&6
18632 else
18633   case $PROVE in
18634   [\\/]* | ?:[\\/]*)
18635   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18636   ;;
18637   *)
18638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18639 for as_dir in $PATH
18640 do
18641   IFS=$as_save_IFS
18642   test -z "$as_dir" && as_dir=.
18643     for ac_exec_ext in '' $ac_executable_extensions; do
18644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18645     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18647     break 2
18648   fi
18649 done
18650   done
18651 IFS=$as_save_IFS
18652
18653   ;;
18654 esac
18655 fi
18656 PROVE=$ac_cv_path_PROVE
18657 if test -n "$PROVE"; then
18658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18659 $as_echo "$PROVE" >&6; }
18660 else
18661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18662 $as_echo "no" >&6; }
18663 fi
18664
18665
18666   test -n "$PROVE" && break
18667 done
18668
18669 else
18670   # Report the value of PROVE in configure's output in all cases.
18671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18672 $as_echo_n "checking for PROVE... " >&6; }
18673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18674 $as_echo "$PROVE" >&6; }
18675 fi
18676
18677   if test -z "$PROVE"; then
18678     as_fn_error $? "prove not found" "$LINENO" 5
18679   fi
18680 fi
18681
18682 # Thread testing
18683
18684 # We have to run the thread test near the end so we have all our symbols
18685 # defined.  Cross compiling throws a warning.
18686 #
18687 if test "$enable_thread_safety" = yes; then
18688 if test "$PORTNAME" != "win32"
18689 then
18690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18691 $as_echo_n "checking thread safety of required library functions... " >&6; }
18692
18693 _CFLAGS="$CFLAGS"
18694 _LIBS="$LIBS"
18695 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18696 LIBS="$LIBS $PTHREAD_LIBS"
18697 if test "$cross_compiling" = yes; then :
18698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18699 $as_echo "maybe" >&6; }
18700   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18701 *** Skipping thread test program because of cross-compile build.
18702 *** Run the program in src/test/thread on the target machine.
18703 " >&5
18704 $as_echo "$as_me: WARNING:
18705 *** Skipping thread test program because of cross-compile build.
18706 *** Run the program in src/test/thread on the target machine.
18707 " >&2;}
18708 else
18709   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18710 /* end confdefs.h.  */
18711 #include "$srcdir/src/test/thread/thread_test.c"
18712 _ACEOF
18713 if ac_fn_c_try_run "$LINENO"; then :
18714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18715 $as_echo "yes" >&6; }
18716 else
18717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18718 $as_echo "no" >&6; }
18719   as_fn_error $? "thread test program failed
18720 This platform is not thread-safe.  Check the file 'config.log' or compile
18721 and run src/test/thread/thread_test for the exact reason.
18722 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18723 fi
18724 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18725   conftest.$ac_objext conftest.beam conftest.$ac_ext
18726 fi
18727
18728 CFLAGS="$_CFLAGS"
18729 LIBS="$_LIBS"
18730 else
18731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18732 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18733 fi
18734 fi
18735
18736 # If compiler will take -Wl,--as-needed (or various platform-specific
18737 # spellings thereof) then add that to LDFLAGS.  This is much easier than
18738 # trying to filter LIBS to the minimum for each executable.
18739 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18740 # libreadline; therefore we postpone testing it until we know what library
18741 # dependencies readline has.  The test code will try to link with $LIBS.
18742 if test "$with_readline" = yes; then
18743   link_test_func=readline
18744 else
18745   link_test_func=exit
18746 fi
18747
18748 if test "$PORTNAME" = "darwin"; then
18749   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18750 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18751 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18752   $as_echo_n "(cached) " >&6
18753 else
18754   pgac_save_LDFLAGS=$LDFLAGS
18755 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18756 if test "$cross_compiling" = yes; then :
18757   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18758 else
18759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18760 /* end confdefs.h.  */
18761 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18762 int
18763 main ()
18764 {
18765
18766   ;
18767   return 0;
18768 }
18769 _ACEOF
18770 if ac_fn_c_try_run "$LINENO"; then :
18771   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18772 else
18773   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18774 fi
18775 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18776   conftest.$ac_objext conftest.beam conftest.$ac_ext
18777 fi
18778
18779 LDFLAGS="$pgac_save_LDFLAGS"
18780 fi
18781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18782 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18783 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18784   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18785 fi
18786
18787 elif test "$PORTNAME" = "openbsd"; then
18788   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18789 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18790 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18791   $as_echo_n "(cached) " >&6
18792 else
18793   pgac_save_LDFLAGS=$LDFLAGS
18794 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18795 if test "$cross_compiling" = yes; then :
18796   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18797 else
18798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18799 /* end confdefs.h.  */
18800 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18801 int
18802 main ()
18803 {
18804
18805   ;
18806   return 0;
18807 }
18808 _ACEOF
18809 if ac_fn_c_try_run "$LINENO"; then :
18810   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
18811 else
18812   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
18813 fi
18814 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18815   conftest.$ac_objext conftest.beam conftest.$ac_ext
18816 fi
18817
18818 LDFLAGS="$pgac_save_LDFLAGS"
18819 fi
18820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
18821 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
18822 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
18823   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
18824 fi
18825
18826 else
18827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
18828 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
18829 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
18830   $as_echo_n "(cached) " >&6
18831 else
18832   pgac_save_LDFLAGS=$LDFLAGS
18833 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18834 if test "$cross_compiling" = yes; then :
18835   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
18836 else
18837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18838 /* end confdefs.h.  */
18839 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18840 int
18841 main ()
18842 {
18843
18844   ;
18845   return 0;
18846 }
18847 _ACEOF
18848 if ac_fn_c_try_run "$LINENO"; then :
18849   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
18850 else
18851   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
18852 fi
18853 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18854   conftest.$ac_objext conftest.beam conftest.$ac_ext
18855 fi
18856
18857 LDFLAGS="$pgac_save_LDFLAGS"
18858 fi
18859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
18860 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
18861 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
18862   LDFLAGS="$LDFLAGS -Wl,--as-needed"
18863 fi
18864
18865 fi
18866
18867 # Create compiler version string
18868 if test x"$GCC" = x"yes" ; then
18869   cc_string=`${CC} --version | sed q`
18870   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18871 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18872   cc_string=`${CC} -V 2>&1 | sed q`
18873 else
18874   cc_string=$CC
18875 fi
18876
18877
18878 cat >>confdefs.h <<_ACEOF
18879 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18880 _ACEOF
18881
18882
18883 # Supply a numeric version string for use by 3rd party add-ons
18884 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18885 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
18886 tr '.' '        ' |
18887 $AWK '{printf "%d%04d", $1, $2}'`"
18888
18889 cat >>confdefs.h <<_ACEOF
18890 #define PG_VERSION_NUM $PG_VERSION_NUM
18891 _ACEOF
18892
18893
18894
18895 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
18896 # literally, so that it's possible to override it at build time using
18897 # a command like "make ... PG_SYSROOT=path".  This has to be done after
18898 # we've finished all configure checks that depend on CPPFLAGS.
18899 if test x"$PG_SYSROOT" != x; then
18900   CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18901 fi
18902
18903
18904
18905 # Begin output steps
18906
18907 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
18908 $as_echo "$as_me: using compiler=$cc_string" >&6;}
18909 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
18910 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
18911 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
18912 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
18913 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
18914 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
18915 # Currently only used when LLVM is used
18916 if test "$with_llvm" = yes ; then
18917    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
18918 $as_echo "$as_me: using CXX=$CXX" >&6;}
18919    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
18920 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
18921    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
18922 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
18923    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
18924 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
18925    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
18926 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
18927 fi
18928
18929 # prepare build tree if outside source tree
18930 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18931 # Note 2: /bin/pwd might be better than shell's built-in at getting
18932 #         a symlink-free name.
18933 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18934   vpath_build=no
18935 else
18936   vpath_build=yes
18937   if test "$no_create" != yes; then
18938     $as_echo_n "preparing build tree... " >&6
18939     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
18940     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
18941       || as_fn_error $? "failed" "$LINENO" 5
18942     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
18943 $as_echo "done" >&6; }
18944   fi
18945 fi
18946
18947
18948
18949 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
18950
18951
18952 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}"
18953
18954
18955 if test "$PORTNAME" = "win32"; then
18956 ac_config_commands="$ac_config_commands check_win32_symlinks"
18957
18958 fi
18959
18960 ac_config_headers="$ac_config_headers src/include/pg_config.h"
18961
18962
18963 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
18964
18965
18966 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
18967
18968
18969 cat >confcache <<\_ACEOF
18970 # This file is a shell script that caches the results of configure
18971 # tests run on this system so they can be shared between configure
18972 # scripts and configure runs, see configure's option --config-cache.
18973 # It is not useful on other systems.  If it contains results you don't
18974 # want to keep, you may remove or edit it.
18975 #
18976 # config.status only pays attention to the cache file if you give it
18977 # the --recheck option to rerun configure.
18978 #
18979 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18980 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18981 # following values.
18982
18983 _ACEOF
18984
18985 # The following way of writing the cache mishandles newlines in values,
18986 # but we know of no workaround that is simple, portable, and efficient.
18987 # So, we kill variables containing newlines.
18988 # Ultrix sh set writes to stderr and can't be redirected directly,
18989 # and sets the high bit in the cache file unless we assign to the vars.
18990 (
18991   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18992     eval ac_val=\$$ac_var
18993     case $ac_val in #(
18994     *${as_nl}*)
18995       case $ac_var in #(
18996       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18997 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18998       esac
18999       case $ac_var in #(
19000       _ | IFS | as_nl) ;; #(
19001       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19002       *) { eval $ac_var=; unset $ac_var;} ;;
19003       esac ;;
19004     esac
19005   done
19006
19007   (set) 2>&1 |
19008     case $as_nl`(ac_space=' '; set) 2>&1` in #(
19009     *${as_nl}ac_space=\ *)
19010       # `set' does not quote correctly, so add quotes: double-quote
19011       # substitution turns \\\\ into \\, and sed turns \\ into \.
19012       sed -n \
19013         "s/'/'\\\\''/g;
19014           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19015       ;; #(
19016     *)
19017       # `set' quotes correctly as required by POSIX, so do not add quotes.
19018       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19019       ;;
19020     esac |
19021     sort
19022 ) |
19023   sed '
19024      /^ac_cv_env_/b end
19025      t clear
19026      :clear
19027      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19028      t end
19029      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19030      :end' >>confcache
19031 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19032   if test -w "$cache_file"; then
19033     if test "x$cache_file" != "x/dev/null"; then
19034       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19035 $as_echo "$as_me: updating cache $cache_file" >&6;}
19036       if test ! -f "$cache_file" || test -h "$cache_file"; then
19037         cat confcache >"$cache_file"
19038       else
19039         case $cache_file in #(
19040         */* | ?:*)
19041           mv -f confcache "$cache_file"$$ &&
19042           mv -f "$cache_file"$$ "$cache_file" ;; #(
19043         *)
19044           mv -f confcache "$cache_file" ;;
19045         esac
19046       fi
19047     fi
19048   else
19049     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19050 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19051   fi
19052 fi
19053 rm -f confcache
19054
19055 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19056 # Let make expand exec_prefix.
19057 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19058
19059 DEFS=-DHAVE_CONFIG_H
19060
19061 ac_libobjs=
19062 ac_ltlibobjs=
19063 U=
19064 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19065   # 1. Remove the extension, and $U if already installed.
19066   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19067   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19068   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19069   #    will be set to the directory where LIBOBJS objects are built.
19070   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19071   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19072 done
19073 LIBOBJS=$ac_libobjs
19074
19075 LTLIBOBJS=$ac_ltlibobjs
19076
19077
19078
19079
19080 : "${CONFIG_STATUS=./config.status}"
19081 ac_write_fail=0
19082 ac_clean_files_save=$ac_clean_files
19083 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19084 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19085 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19086 as_write_fail=0
19087 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19088 #! $SHELL
19089 # Generated by $as_me.
19090 # Run this file to recreate the current configuration.
19091 # Compiler output produced by configure, useful for debugging
19092 # configure, is in config.log if it exists.
19093
19094 debug=false
19095 ac_cs_recheck=false
19096 ac_cs_silent=false
19097
19098 SHELL=\${CONFIG_SHELL-$SHELL}
19099 export SHELL
19100 _ASEOF
19101 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19102 ## -------------------- ##
19103 ## M4sh Initialization. ##
19104 ## -------------------- ##
19105
19106 # Be more Bourne compatible
19107 DUALCASE=1; export DUALCASE # for MKS sh
19108 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19109   emulate sh
19110   NULLCMD=:
19111   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19112   # is contrary to our usage.  Disable this feature.
19113   alias -g '${1+"$@"}'='"$@"'
19114   setopt NO_GLOB_SUBST
19115 else
19116   case `(set -o) 2>/dev/null` in #(
19117   *posix*) :
19118     set -o posix ;; #(
19119   *) :
19120      ;;
19121 esac
19122 fi
19123
19124
19125 as_nl='
19126 '
19127 export as_nl
19128 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19129 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19130 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19131 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19132 # Prefer a ksh shell builtin over an external printf program on Solaris,
19133 # but without wasting forks for bash or zsh.
19134 if test -z "$BASH_VERSION$ZSH_VERSION" \
19135     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19136   as_echo='print -r --'
19137   as_echo_n='print -rn --'
19138 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19139   as_echo='printf %s\n'
19140   as_echo_n='printf %s'
19141 else
19142   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19143     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19144     as_echo_n='/usr/ucb/echo -n'
19145   else
19146     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19147     as_echo_n_body='eval
19148       arg=$1;
19149       case $arg in #(
19150       *"$as_nl"*)
19151         expr "X$arg" : "X\\(.*\\)$as_nl";
19152         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19153       esac;
19154       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19155     '
19156     export as_echo_n_body
19157     as_echo_n='sh -c $as_echo_n_body as_echo'
19158   fi
19159   export as_echo_body
19160   as_echo='sh -c $as_echo_body as_echo'
19161 fi
19162
19163 # The user is always right.
19164 if test "${PATH_SEPARATOR+set}" != set; then
19165   PATH_SEPARATOR=:
19166   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19167     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19168       PATH_SEPARATOR=';'
19169   }
19170 fi
19171
19172
19173 # IFS
19174 # We need space, tab and new line, in precisely that order.  Quoting is
19175 # there to prevent editors from complaining about space-tab.
19176 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19177 # splitting by setting IFS to empty value.)
19178 IFS=" ""        $as_nl"
19179
19180 # Find who we are.  Look in the path if we contain no directory separator.
19181 as_myself=
19182 case $0 in #((
19183   *[\\/]* ) as_myself=$0 ;;
19184   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19185 for as_dir in $PATH
19186 do
19187   IFS=$as_save_IFS
19188   test -z "$as_dir" && as_dir=.
19189     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19190   done
19191 IFS=$as_save_IFS
19192
19193      ;;
19194 esac
19195 # We did not find ourselves, most probably we were run as `sh COMMAND'
19196 # in which case we are not to be found in the path.
19197 if test "x$as_myself" = x; then
19198   as_myself=$0
19199 fi
19200 if test ! -f "$as_myself"; then
19201   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19202   exit 1
19203 fi
19204
19205 # Unset variables that we do not need and which cause bugs (e.g. in
19206 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19207 # suppresses any "Segmentation fault" message there.  '((' could
19208 # trigger a bug in pdksh 5.2.14.
19209 for as_var in BASH_ENV ENV MAIL MAILPATH
19210 do eval test x\${$as_var+set} = xset \
19211   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19212 done
19213 PS1='$ '
19214 PS2='> '
19215 PS4='+ '
19216
19217 # NLS nuisances.
19218 LC_ALL=C
19219 export LC_ALL
19220 LANGUAGE=C
19221 export LANGUAGE
19222
19223 # CDPATH.
19224 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19225
19226
19227 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19228 # ----------------------------------------
19229 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19230 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19231 # script with STATUS, using 1 if that was 0.
19232 as_fn_error ()
19233 {
19234   as_status=$1; test $as_status -eq 0 && as_status=1
19235   if test "$4"; then
19236     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19237     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19238   fi
19239   $as_echo "$as_me: error: $2" >&2
19240   as_fn_exit $as_status
19241 } # as_fn_error
19242
19243
19244 # as_fn_set_status STATUS
19245 # -----------------------
19246 # Set $? to STATUS, without forking.
19247 as_fn_set_status ()
19248 {
19249   return $1
19250 } # as_fn_set_status
19251
19252 # as_fn_exit STATUS
19253 # -----------------
19254 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19255 as_fn_exit ()
19256 {
19257   set +e
19258   as_fn_set_status $1
19259   exit $1
19260 } # as_fn_exit
19261
19262 # as_fn_unset VAR
19263 # ---------------
19264 # Portably unset VAR.
19265 as_fn_unset ()
19266 {
19267   { eval $1=; unset $1;}
19268 }
19269 as_unset=as_fn_unset
19270 # as_fn_append VAR VALUE
19271 # ----------------------
19272 # Append the text in VALUE to the end of the definition contained in VAR. Take
19273 # advantage of any shell optimizations that allow amortized linear growth over
19274 # repeated appends, instead of the typical quadratic growth present in naive
19275 # implementations.
19276 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19277   eval 'as_fn_append ()
19278   {
19279     eval $1+=\$2
19280   }'
19281 else
19282   as_fn_append ()
19283   {
19284     eval $1=\$$1\$2
19285   }
19286 fi # as_fn_append
19287
19288 # as_fn_arith ARG...
19289 # ------------------
19290 # Perform arithmetic evaluation on the ARGs, and store the result in the
19291 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19292 # must be portable across $(()) and expr.
19293 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19294   eval 'as_fn_arith ()
19295   {
19296     as_val=$(( $* ))
19297   }'
19298 else
19299   as_fn_arith ()
19300   {
19301     as_val=`expr "$@" || test $? -eq 1`
19302   }
19303 fi # as_fn_arith
19304
19305
19306 if expr a : '\(a\)' >/dev/null 2>&1 &&
19307    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19308   as_expr=expr
19309 else
19310   as_expr=false
19311 fi
19312
19313 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19314   as_basename=basename
19315 else
19316   as_basename=false
19317 fi
19318
19319 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19320   as_dirname=dirname
19321 else
19322   as_dirname=false
19323 fi
19324
19325 as_me=`$as_basename -- "$0" ||
19326 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19327          X"$0" : 'X\(//\)$' \| \
19328          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19329 $as_echo X/"$0" |
19330     sed '/^.*\/\([^/][^/]*\)\/*$/{
19331             s//\1/
19332             q
19333           }
19334           /^X\/\(\/\/\)$/{
19335             s//\1/
19336             q
19337           }
19338           /^X\/\(\/\).*/{
19339             s//\1/
19340             q
19341           }
19342           s/.*/./; q'`
19343
19344 # Avoid depending upon Character Ranges.
19345 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19346 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19347 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19348 as_cr_digits='0123456789'
19349 as_cr_alnum=$as_cr_Letters$as_cr_digits
19350
19351 ECHO_C= ECHO_N= ECHO_T=
19352 case `echo -n x` in #(((((
19353 -n*)
19354   case `echo 'xy\c'` in
19355   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19356   xy)  ECHO_C='\c';;
19357   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19358        ECHO_T=' ';;
19359   esac;;
19360 *)
19361   ECHO_N='-n';;
19362 esac
19363
19364 rm -f conf$$ conf$$.exe conf$$.file
19365 if test -d conf$$.dir; then
19366   rm -f conf$$.dir/conf$$.file
19367 else
19368   rm -f conf$$.dir
19369   mkdir conf$$.dir 2>/dev/null
19370 fi
19371 if (echo >conf$$.file) 2>/dev/null; then
19372   if ln -s conf$$.file conf$$ 2>/dev/null; then
19373     as_ln_s='ln -s'
19374     # ... but there are two gotchas:
19375     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19376     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19377     # In both cases, we have to default to `cp -pR'.
19378     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19379       as_ln_s='cp -pR'
19380   elif ln conf$$.file conf$$ 2>/dev/null; then
19381     as_ln_s=ln
19382   else
19383     as_ln_s='cp -pR'
19384   fi
19385 else
19386   as_ln_s='cp -pR'
19387 fi
19388 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19389 rmdir conf$$.dir 2>/dev/null
19390
19391
19392 # as_fn_mkdir_p
19393 # -------------
19394 # Create "$as_dir" as a directory, including parents if necessary.
19395 as_fn_mkdir_p ()
19396 {
19397
19398   case $as_dir in #(
19399   -*) as_dir=./$as_dir;;
19400   esac
19401   test -d "$as_dir" || eval $as_mkdir_p || {
19402     as_dirs=
19403     while :; do
19404       case $as_dir in #(
19405       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19406       *) as_qdir=$as_dir;;
19407       esac
19408       as_dirs="'$as_qdir' $as_dirs"
19409       as_dir=`$as_dirname -- "$as_dir" ||
19410 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19411          X"$as_dir" : 'X\(//\)[^/]' \| \
19412          X"$as_dir" : 'X\(//\)$' \| \
19413          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19414 $as_echo X"$as_dir" |
19415     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19416             s//\1/
19417             q
19418           }
19419           /^X\(\/\/\)[^/].*/{
19420             s//\1/
19421             q
19422           }
19423           /^X\(\/\/\)$/{
19424             s//\1/
19425             q
19426           }
19427           /^X\(\/\).*/{
19428             s//\1/
19429             q
19430           }
19431           s/.*/./; q'`
19432       test -d "$as_dir" && break
19433     done
19434     test -z "$as_dirs" || eval "mkdir $as_dirs"
19435   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19436
19437
19438 } # as_fn_mkdir_p
19439 if mkdir -p . 2>/dev/null; then
19440   as_mkdir_p='mkdir -p "$as_dir"'
19441 else
19442   test -d ./-p && rmdir ./-p
19443   as_mkdir_p=false
19444 fi
19445
19446
19447 # as_fn_executable_p FILE
19448 # -----------------------
19449 # Test if FILE is an executable regular file.
19450 as_fn_executable_p ()
19451 {
19452   test -f "$1" && test -x "$1"
19453 } # as_fn_executable_p
19454 as_test_x='test -x'
19455 as_executable_p=as_fn_executable_p
19456
19457 # Sed expression to map a string onto a valid CPP name.
19458 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19459
19460 # Sed expression to map a string onto a valid variable name.
19461 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19462
19463
19464 exec 6>&1
19465 ## ----------------------------------- ##
19466 ## Main body of $CONFIG_STATUS script. ##
19467 ## ----------------------------------- ##
19468 _ASEOF
19469 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19470
19471 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19472 # Save the log message, to keep $0 and so on meaningful, and to
19473 # report actual input values of CONFIG_FILES etc. instead of their
19474 # values after options handling.
19475 ac_log="
19476 This file was extended by PostgreSQL $as_me 12devel, which was
19477 generated by GNU Autoconf 2.69.  Invocation command line was
19478
19479   CONFIG_FILES    = $CONFIG_FILES
19480   CONFIG_HEADERS  = $CONFIG_HEADERS
19481   CONFIG_LINKS    = $CONFIG_LINKS
19482   CONFIG_COMMANDS = $CONFIG_COMMANDS
19483   $ $0 $@
19484
19485 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19486 "
19487
19488 _ACEOF
19489
19490 case $ac_config_files in *"
19491 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19492 esac
19493
19494 case $ac_config_headers in *"
19495 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19496 esac
19497
19498
19499 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19500 # Files that config.status was made for.
19501 config_files="$ac_config_files"
19502 config_headers="$ac_config_headers"
19503 config_links="$ac_config_links"
19504 config_commands="$ac_config_commands"
19505
19506 _ACEOF
19507
19508 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19509 ac_cs_usage="\
19510 \`$as_me' instantiates files and other configuration actions
19511 from templates according to the current configuration.  Unless the files
19512 and actions are specified as TAGs, all are instantiated by default.
19513
19514 Usage: $0 [OPTION]... [TAG]...
19515
19516   -h, --help       print this help, then exit
19517   -V, --version    print version number and configuration settings, then exit
19518       --config     print configuration, then exit
19519   -q, --quiet, --silent
19520                    do not print progress messages
19521   -d, --debug      don't remove temporary files
19522       --recheck    update $as_me by reconfiguring in the same conditions
19523       --file=FILE[:TEMPLATE]
19524                    instantiate the configuration file FILE
19525       --header=FILE[:TEMPLATE]
19526                    instantiate the configuration header FILE
19527
19528 Configuration files:
19529 $config_files
19530
19531 Configuration headers:
19532 $config_headers
19533
19534 Configuration links:
19535 $config_links
19536
19537 Configuration commands:
19538 $config_commands
19539
19540 Report bugs to <pgsql-bugs@postgresql.org>."
19541
19542 _ACEOF
19543 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19544 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19545 ac_cs_version="\\
19546 PostgreSQL config.status 12devel
19547 configured by $0, generated by GNU Autoconf 2.69,
19548   with options \\"\$ac_cs_config\\"
19549
19550 Copyright (C) 2012 Free Software Foundation, Inc.
19551 This config.status script is free software; the Free Software Foundation
19552 gives unlimited permission to copy, distribute and modify it."
19553
19554 ac_pwd='$ac_pwd'
19555 srcdir='$srcdir'
19556 INSTALL='$INSTALL'
19557 MKDIR_P='$MKDIR_P'
19558 AWK='$AWK'
19559 test -n "\$AWK" || AWK=awk
19560 _ACEOF
19561
19562 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19563 # The default lists apply if the user does not specify any file.
19564 ac_need_defaults=:
19565 while test $# != 0
19566 do
19567   case $1 in
19568   --*=?*)
19569     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19570     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19571     ac_shift=:
19572     ;;
19573   --*=)
19574     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19575     ac_optarg=
19576     ac_shift=:
19577     ;;
19578   *)
19579     ac_option=$1
19580     ac_optarg=$2
19581     ac_shift=shift
19582     ;;
19583   esac
19584
19585   case $ac_option in
19586   # Handling of the options.
19587   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19588     ac_cs_recheck=: ;;
19589   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19590     $as_echo "$ac_cs_version"; exit ;;
19591   --config | --confi | --conf | --con | --co | --c )
19592     $as_echo "$ac_cs_config"; exit ;;
19593   --debug | --debu | --deb | --de | --d | -d )
19594     debug=: ;;
19595   --file | --fil | --fi | --f )
19596     $ac_shift
19597     case $ac_optarg in
19598     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19599     '') as_fn_error $? "missing file argument" ;;
19600     esac
19601     as_fn_append CONFIG_FILES " '$ac_optarg'"
19602     ac_need_defaults=false;;
19603   --header | --heade | --head | --hea )
19604     $ac_shift
19605     case $ac_optarg in
19606     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19607     esac
19608     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19609     ac_need_defaults=false;;
19610   --he | --h)
19611     # Conflict between --help and --header
19612     as_fn_error $? "ambiguous option: \`$1'
19613 Try \`$0 --help' for more information.";;
19614   --help | --hel | -h )
19615     $as_echo "$ac_cs_usage"; exit ;;
19616   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19617   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19618     ac_cs_silent=: ;;
19619
19620   # This is an error.
19621   -*) as_fn_error $? "unrecognized option: \`$1'
19622 Try \`$0 --help' for more information." ;;
19623
19624   *) as_fn_append ac_config_targets " $1"
19625      ac_need_defaults=false ;;
19626
19627   esac
19628   shift
19629 done
19630
19631 ac_configure_extra_args=
19632
19633 if $ac_cs_silent; then
19634   exec 6>/dev/null
19635   ac_configure_extra_args="$ac_configure_extra_args --silent"
19636 fi
19637
19638 _ACEOF
19639 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19640 if \$ac_cs_recheck; then
19641   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19642   shift
19643   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19644   CONFIG_SHELL='$SHELL'
19645   export CONFIG_SHELL
19646   exec "\$@"
19647 fi
19648
19649 _ACEOF
19650 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19651 exec 5>>config.log
19652 {
19653   echo
19654   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19655 ## Running $as_me. ##
19656 _ASBOX
19657   $as_echo "$ac_log"
19658 } >&5
19659
19660 _ACEOF
19661 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19662 _ACEOF
19663
19664 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19665
19666 # Handling of arguments.
19667 for ac_config_target in $ac_config_targets
19668 do
19669   case $ac_config_target in
19670     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19671     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19672     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19673     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19674     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19675     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19676     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19677     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19678     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19679     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19680     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19681
19682   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19683   esac
19684 done
19685
19686
19687 # If the user did not use the arguments to specify the items to instantiate,
19688 # then the envvar interface is used.  Set only those that are not.
19689 # We use the long form for the default assignment because of an extremely
19690 # bizarre bug on SunOS 4.1.3.
19691 if $ac_need_defaults; then
19692   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19693   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19694   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19695   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19696 fi
19697
19698 # Have a temporary directory for convenience.  Make it in the build tree
19699 # simply because there is no reason against having it here, and in addition,
19700 # creating and moving files from /tmp can sometimes cause problems.
19701 # Hook for its removal unless debugging.
19702 # Note that there is a small window in which the directory will not be cleaned:
19703 # after its creation but before its name has been assigned to `$tmp'.
19704 $debug ||
19705 {
19706   tmp= ac_tmp=
19707   trap 'exit_status=$?
19708   : "${ac_tmp:=$tmp}"
19709   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19710 ' 0
19711   trap 'as_fn_exit 1' 1 2 13 15
19712 }
19713 # Create a (secure) tmp directory for tmp files.
19714
19715 {
19716   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19717   test -d "$tmp"
19718 }  ||
19719 {
19720   tmp=./conf$$-$RANDOM
19721   (umask 077 && mkdir "$tmp")
19722 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19723 ac_tmp=$tmp
19724
19725 # Set up the scripts for CONFIG_FILES section.
19726 # No need to generate them if there are no CONFIG_FILES.
19727 # This happens for instance with `./config.status config.h'.
19728 if test -n "$CONFIG_FILES"; then
19729
19730
19731 ac_cr=`echo X | tr X '\015'`
19732 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19733 # But we know of no other shell where ac_cr would be empty at this
19734 # point, so we can use a bashism as a fallback.
19735 if test "x$ac_cr" = x; then
19736   eval ac_cr=\$\'\\r\'
19737 fi
19738 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19739 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19740   ac_cs_awk_cr='\\r'
19741 else
19742   ac_cs_awk_cr=$ac_cr
19743 fi
19744
19745 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19746 _ACEOF
19747
19748
19749 {
19750   echo "cat >conf$$subs.awk <<_ACEOF" &&
19751   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19752   echo "_ACEOF"
19753 } >conf$$subs.sh ||
19754   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19755 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19756 ac_delim='%!_!# '
19757 for ac_last_try in false false false false false :; do
19758   . ./conf$$subs.sh ||
19759     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19760
19761   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19762   if test $ac_delim_n = $ac_delim_num; then
19763     break
19764   elif $ac_last_try; then
19765     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19766   else
19767     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19768   fi
19769 done
19770 rm -f conf$$subs.sh
19771
19772 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19773 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19774 _ACEOF
19775 sed -n '
19776 h
19777 s/^/S["/; s/!.*/"]=/
19778 p
19779 g
19780 s/^[^!]*!//
19781 :repl
19782 t repl
19783 s/'"$ac_delim"'$//
19784 t delim
19785 :nl
19786 h
19787 s/\(.\{148\}\)..*/\1/
19788 t more1
19789 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19790 p
19791 n
19792 b repl
19793 :more1
19794 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19795 p
19796 g
19797 s/.\{148\}//
19798 t nl
19799 :delim
19800 h
19801 s/\(.\{148\}\)..*/\1/
19802 t more2
19803 s/["\\]/\\&/g; s/^/"/; s/$/"/
19804 p
19805 b
19806 :more2
19807 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19808 p
19809 g
19810 s/.\{148\}//
19811 t delim
19812 ' <conf$$subs.awk | sed '
19813 /^[^""]/{
19814   N
19815   s/\n//
19816 }
19817 ' >>$CONFIG_STATUS || ac_write_fail=1
19818 rm -f conf$$subs.awk
19819 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19820 _ACAWK
19821 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19822   for (key in S) S_is_set[key] = 1
19823   FS = "\a"
19824
19825 }
19826 {
19827   line = $ 0
19828   nfields = split(line, field, "@")
19829   substed = 0
19830   len = length(field[1])
19831   for (i = 2; i < nfields; i++) {
19832     key = field[i]
19833     keylen = length(key)
19834     if (S_is_set[key]) {
19835       value = S[key]
19836       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19837       len += length(value) + length(field[++i])
19838       substed = 1
19839     } else
19840       len += 1 + keylen
19841   }
19842
19843   print line
19844 }
19845
19846 _ACAWK
19847 _ACEOF
19848 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19849 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19850   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19851 else
19852   cat
19853 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19854   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19855 _ACEOF
19856
19857 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19858 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19859 # trailing colons and then remove the whole line if VPATH becomes empty
19860 # (actually we leave an empty line to preserve line numbers).
19861 if test "x$srcdir" = x.; then
19862   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
19863 h
19864 s///
19865 s/^/:/
19866 s/[      ]*$/:/
19867 s/:\$(srcdir):/:/g
19868 s/:\${srcdir}:/:/g
19869 s/:@srcdir@:/:/g
19870 s/^:*//
19871 s/:*$//
19872 x
19873 s/\(=[   ]*\).*/\1/
19874 G
19875 s/\n//
19876 s/^[^=]*=[       ]*$//
19877 }'
19878 fi
19879
19880 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19881 fi # test -n "$CONFIG_FILES"
19882
19883 # Set up the scripts for CONFIG_HEADERS section.
19884 # No need to generate them if there are no CONFIG_HEADERS.
19885 # This happens for instance with `./config.status Makefile'.
19886 if test -n "$CONFIG_HEADERS"; then
19887 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19888 BEGIN {
19889 _ACEOF
19890
19891 # Transform confdefs.h into an awk script `defines.awk', embedded as
19892 # here-document in config.status, that substitutes the proper values into
19893 # config.h.in to produce config.h.
19894
19895 # Create a delimiter string that does not exist in confdefs.h, to ease
19896 # handling of long lines.
19897 ac_delim='%!_!# '
19898 for ac_last_try in false false :; do
19899   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19900   if test -z "$ac_tt"; then
19901     break
19902   elif $ac_last_try; then
19903     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19904   else
19905     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19906   fi
19907 done
19908
19909 # For the awk script, D is an array of macro values keyed by name,
19910 # likewise P contains macro parameters if any.  Preserve backslash
19911 # newline sequences.
19912
19913 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19914 sed -n '
19915 s/.\{148\}/&'"$ac_delim"'/g
19916 t rset
19917 :rset
19918 s/^[     ]*#[    ]*define[       ][      ]*/ /
19919 t def
19920 d
19921 :def
19922 s/\\$//
19923 t bsnl
19924 s/["\\]/\\&/g
19925 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19926 D["\1"]=" \3"/p
19927 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
19928 d
19929 :bsnl
19930 s/["\\]/\\&/g
19931 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19932 D["\1"]=" \3\\\\\\n"\\/p
19933 t cont
19934 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19935 t cont
19936 d
19937 :cont
19938 n
19939 s/.\{148\}/&'"$ac_delim"'/g
19940 t clear
19941 :clear
19942 s/\\$//
19943 t bsnlc
19944 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19945 d
19946 :bsnlc
19947 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19948 b cont
19949 ' <confdefs.h | sed '
19950 s/'"$ac_delim"'/"\\\
19951 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19952
19953 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19954   for (key in D) D_is_set[key] = 1
19955   FS = "\a"
19956 }
19957 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19958   line = \$ 0
19959   split(line, arg, " ")
19960   if (arg[1] == "#") {
19961     defundef = arg[2]
19962     mac1 = arg[3]
19963   } else {
19964     defundef = substr(arg[1], 2)
19965     mac1 = arg[2]
19966   }
19967   split(mac1, mac2, "(") #)
19968   macro = mac2[1]
19969   prefix = substr(line, 1, index(line, defundef) - 1)
19970   if (D_is_set[macro]) {
19971     # Preserve the white space surrounding the "#".
19972     print prefix "define", macro P[macro] D[macro]
19973     next
19974   } else {
19975     # Replace #undef with comments.  This is necessary, for example,
19976     # in the case of _POSIX_SOURCE, which is predefined and required
19977     # on some systems where configure will not decide to define it.
19978     if (defundef == "undef") {
19979       print "/*", prefix defundef, macro, "*/"
19980       next
19981     }
19982   }
19983 }
19984 { print }
19985 _ACAWK
19986 _ACEOF
19987 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19988   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
19989 fi # test -n "$CONFIG_HEADERS"
19990
19991
19992 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
19993 shift
19994 for ac_tag
19995 do
19996   case $ac_tag in
19997   :[FHLC]) ac_mode=$ac_tag; continue;;
19998   esac
19999   case $ac_mode$ac_tag in
20000   :[FHL]*:*);;
20001   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20002   :[FH]-) ac_tag=-:-;;
20003   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20004   esac
20005   ac_save_IFS=$IFS
20006   IFS=:
20007   set x $ac_tag
20008   IFS=$ac_save_IFS
20009   shift
20010   ac_file=$1
20011   shift
20012
20013   case $ac_mode in
20014   :L) ac_source=$1;;
20015   :[FH])
20016     ac_file_inputs=
20017     for ac_f
20018     do
20019       case $ac_f in
20020       -) ac_f="$ac_tmp/stdin";;
20021       *) # Look for the file first in the build tree, then in the source tree
20022          # (if the path is not absolute).  The absolute path cannot be DOS-style,
20023          # because $ac_f cannot contain `:'.
20024          test -f "$ac_f" ||
20025            case $ac_f in
20026            [\\/$]*) false;;
20027            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20028            esac ||
20029            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20030       esac
20031       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20032       as_fn_append ac_file_inputs " '$ac_f'"
20033     done
20034
20035     # Let's still pretend it is `configure' which instantiates (i.e., don't
20036     # use $as_me), people would be surprised to read:
20037     #    /* config.h.  Generated by config.status.  */
20038     configure_input='Generated from '`
20039           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20040         `' by configure.'
20041     if test x"$ac_file" != x-; then
20042       configure_input="$ac_file.  $configure_input"
20043       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20044 $as_echo "$as_me: creating $ac_file" >&6;}
20045     fi
20046     # Neutralize special characters interpreted by sed in replacement strings.
20047     case $configure_input in #(
20048     *\&* | *\|* | *\\* )
20049        ac_sed_conf_input=`$as_echo "$configure_input" |
20050        sed 's/[\\\\&|]/\\\\&/g'`;; #(
20051     *) ac_sed_conf_input=$configure_input;;
20052     esac
20053
20054     case $ac_tag in
20055     *:-:* | *:-) cat >"$ac_tmp/stdin" \
20056       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20057     esac
20058     ;;
20059   esac
20060
20061   ac_dir=`$as_dirname -- "$ac_file" ||
20062 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20063          X"$ac_file" : 'X\(//\)[^/]' \| \
20064          X"$ac_file" : 'X\(//\)$' \| \
20065          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20066 $as_echo X"$ac_file" |
20067     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20068             s//\1/
20069             q
20070           }
20071           /^X\(\/\/\)[^/].*/{
20072             s//\1/
20073             q
20074           }
20075           /^X\(\/\/\)$/{
20076             s//\1/
20077             q
20078           }
20079           /^X\(\/\).*/{
20080             s//\1/
20081             q
20082           }
20083           s/.*/./; q'`
20084   as_dir="$ac_dir"; as_fn_mkdir_p
20085   ac_builddir=.
20086
20087 case "$ac_dir" in
20088 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20089 *)
20090   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20091   # A ".." for each directory in $ac_dir_suffix.
20092   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20093   case $ac_top_builddir_sub in
20094   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20095   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20096   esac ;;
20097 esac
20098 ac_abs_top_builddir=$ac_pwd
20099 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20100 # for backward compatibility:
20101 ac_top_builddir=$ac_top_build_prefix
20102
20103 case $srcdir in
20104   .)  # We are building in place.
20105     ac_srcdir=.
20106     ac_top_srcdir=$ac_top_builddir_sub
20107     ac_abs_top_srcdir=$ac_pwd ;;
20108   [\\/]* | ?:[\\/]* )  # Absolute name.
20109     ac_srcdir=$srcdir$ac_dir_suffix;
20110     ac_top_srcdir=$srcdir
20111     ac_abs_top_srcdir=$srcdir ;;
20112   *) # Relative name.
20113     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20114     ac_top_srcdir=$ac_top_build_prefix$srcdir
20115     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20116 esac
20117 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20118
20119
20120   case $ac_mode in
20121   :F)
20122   #
20123   # CONFIG_FILE
20124   #
20125
20126   case $INSTALL in
20127   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20128   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20129   esac
20130   ac_MKDIR_P=$MKDIR_P
20131   case $MKDIR_P in
20132   [\\/$]* | ?:[\\/]* ) ;;
20133   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20134   esac
20135 _ACEOF
20136
20137 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20138 # If the template does not know about datarootdir, expand it.
20139 # FIXME: This hack should be removed a few years after 2.60.
20140 ac_datarootdir_hack=; ac_datarootdir_seen=
20141 ac_sed_dataroot='
20142 /datarootdir/ {
20143   p
20144   q
20145 }
20146 /@datadir@/p
20147 /@docdir@/p
20148 /@infodir@/p
20149 /@localedir@/p
20150 /@mandir@/p'
20151 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20152 *datarootdir*) ac_datarootdir_seen=yes;;
20153 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20154   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20155 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20156 _ACEOF
20157 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20158   ac_datarootdir_hack='
20159   s&@datadir@&$datadir&g
20160   s&@docdir@&$docdir&g
20161   s&@infodir@&$infodir&g
20162   s&@localedir@&$localedir&g
20163   s&@mandir@&$mandir&g
20164   s&\\\${datarootdir}&$datarootdir&g' ;;
20165 esac
20166 _ACEOF
20167
20168 # Neutralize VPATH when `$srcdir' = `.'.
20169 # Shell code in configure.ac might set extrasub.
20170 # FIXME: do we really want to maintain this feature?
20171 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20172 ac_sed_extra="$ac_vpsub
20173 $extrasub
20174 _ACEOF
20175 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20176 :t
20177 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20178 s|@configure_input@|$ac_sed_conf_input|;t t
20179 s&@top_builddir@&$ac_top_builddir_sub&;t t
20180 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20181 s&@srcdir@&$ac_srcdir&;t t
20182 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20183 s&@top_srcdir@&$ac_top_srcdir&;t t
20184 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20185 s&@builddir@&$ac_builddir&;t t
20186 s&@abs_builddir@&$ac_abs_builddir&;t t
20187 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20188 s&@INSTALL@&$ac_INSTALL&;t t
20189 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20190 $ac_datarootdir_hack
20191 "
20192 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20193   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20194
20195 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20196   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20197   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20198       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20199   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20200 which seems to be undefined.  Please make sure it is defined" >&5
20201 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20202 which seems to be undefined.  Please make sure it is defined" >&2;}
20203
20204   rm -f "$ac_tmp/stdin"
20205   case $ac_file in
20206   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20207   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20208   esac \
20209   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20210  ;;
20211   :H)
20212   #
20213   # CONFIG_HEADER
20214   #
20215   if test x"$ac_file" != x-; then
20216     {
20217       $as_echo "/* $configure_input  */" \
20218       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20219     } >"$ac_tmp/config.h" \
20220       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20221     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20222       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20223 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20224     else
20225       rm -f "$ac_file"
20226       mv "$ac_tmp/config.h" "$ac_file" \
20227         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20228     fi
20229   else
20230     $as_echo "/* $configure_input  */" \
20231       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20232       || as_fn_error $? "could not create -" "$LINENO" 5
20233   fi
20234  ;;
20235   :L)
20236   #
20237   # CONFIG_LINK
20238   #
20239
20240   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20241     :
20242   else
20243     # Prefer the file from the source tree if names are identical.
20244     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20245       ac_source=$srcdir/$ac_source
20246     fi
20247
20248     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20249 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20250
20251     if test ! -r "$ac_source"; then
20252       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20253     fi
20254     rm -f "$ac_file"
20255
20256     # Try a relative symlink, then a hard link, then a copy.
20257     case $ac_source in
20258     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20259         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20260     esac
20261     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20262       ln "$ac_source" "$ac_file" 2>/dev/null ||
20263       cp -p "$ac_source" "$ac_file" ||
20264       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20265   fi
20266  ;;
20267   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20268 $as_echo "$as_me: executing $ac_file commands" >&6;}
20269  ;;
20270   esac
20271
20272
20273   case $ac_file$ac_mode in
20274     "check_win32_symlinks":C)
20275 # Links sometimes fail undetected on Mingw -
20276 # so here we detect it and warn the user
20277 for FILE in $CONFIG_LINKS
20278  do
20279         # test -e works for symlinks in the MinGW console
20280         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20281 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20282  done
20283  ;;
20284     "src/include/pg_config.h":H)
20285 # Update timestamp for pg_config.h (see Makefile.global)
20286 echo >src/include/stamp-h
20287  ;;
20288     "src/include/pg_config_ext.h":H)
20289 # Update timestamp for pg_config_ext.h (see Makefile.global)
20290 echo >src/include/stamp-ext-h
20291  ;;
20292     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20293
20294   esac
20295 done # for ac_tag
20296
20297
20298 as_fn_exit 0
20299 _ACEOF
20300 ac_clean_files=$ac_clean_files_save
20301
20302 test $ac_write_fail = 0 ||
20303   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20304
20305
20306 # configure is writing to config.log, and then calls config.status.
20307 # config.status does its own redirection, appending to config.log.
20308 # Unfortunately, on DOS this fails, as config.log is still kept open
20309 # by configure, so config.status won't be able to write to it; its
20310 # output is simply discarded.  So we exec the FD to /dev/null,
20311 # effectively closing config.log, so it can be properly (re)opened and
20312 # appended to by config.status.  When coming back to configure, we
20313 # need to make the FD available again.
20314 if test "$no_create" != yes; then
20315   ac_cs_success=:
20316   ac_config_status_args=
20317   test "$silent" = yes &&
20318     ac_config_status_args="$ac_config_status_args --quiet"
20319   exec 5>/dev/null
20320   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20321   exec 5>>config.log
20322   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20323   # would make configure fail if this is the last instruction.
20324   $ac_cs_success || as_fn_exit 1
20325 fi
20326 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20327   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20328 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20329 fi
20330