]> granicus.if.org Git - postgresql/blob - configure
Cygwin and Mingw floating-point fixes.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 12devel.
4 #
5 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 #
14 # Copyright (c) 1996-2019, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else
29   case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='print -r --'
50   as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in #(
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order.  Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" ""        $as_nl"
92
93 # Find who we are.  Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96   *[\\/]* ) as_myself=$0 ;;
97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100   IFS=$as_save_IFS
101   test -z "$as_dir" && as_dir=.
102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103   done
104 IFS=$as_save_IFS
105
106      ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111   as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115   exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there.  '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 # Use a proper internal environment variable to ensure we don't fall
140   # into an infinite loop, continuously re-executing ourselves.
141   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142     _as_can_reexec=no; export _as_can_reexec;
143     # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151   *v*x* | *x*v* ) as_opts=-vx ;;
152   *v* ) as_opts=-v ;;
153   *x* ) as_opts=-x ;;
154   * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
161   fi
162   # We don't want this to propagate to other subprocesses.
163           { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166   emulate sh
167   NULLCMD=:
168   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169   # is contrary to our usage.  Disable this feature.
170   alias -g '\${1+\"\$@\"}'='\"\$@\"'
171   setopt NO_GLOB_SUBST
172 else
173   case \`(set -o) 2>/dev/null\` in #(
174   *posix*) :
175     set -o posix ;; #(
176   *) :
177      ;;
178 esac
179 fi
180 "
181   as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
186
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194 else
195   exitcode=1; echo positional parameters were not saved.
196 fi
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204   if (eval "$as_required") 2>/dev/null; then :
205   as_have_required=yes
206 else
207   as_have_required=no
208 fi
209   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211 else
212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 do
216   IFS=$as_save_IFS
217   test -z "$as_dir" && as_dir=.
218   as_found=:
219   case $as_dir in #(
220          /*)
221            for as_base in sh bash ksh sh5; do
222              # Try only shells that exist, to save several forks.
223              as_shell=$as_dir/$as_base
224              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   CONFIG_SHELL=$as_shell as_have_required=yes
227                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228   break 2
229 fi
230 fi
231            done;;
232        esac
233   as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237   CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
240
241
242       if test "x$CONFIG_SHELL" != x; then :
243   export CONFIG_SHELL
244              # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252   *v*x* | *x*v* ) as_opts=-vx ;;
253   *v* ) as_opts=-v ;;
254   *x* ) as_opts=-x ;;
255   * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
262 fi
263
264     if test x$as_have_required = xno; then :
265   $as_echo "$0: This script requires a shell more modern than all"
266   $as_echo "$0: the shells that I found on your system."
267   if test x${ZSH_VERSION+set} = xset ; then
268     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270   else
271     $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@lists.postgresql.org about your system,
273 $0: including any error possibly output before this
274 $0: message. Then install a modern shell, or manually run
275 $0: the script under such a shell if you do have one."
276   fi
277   exit 1
278 fi
279 fi
280 fi
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
286
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
294 {
295   { eval $1=; unset $1;}
296 }
297 as_unset=as_fn_unset
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304   return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312   set +e
313   as_fn_set_status $1
314   exit $1
315 } # as_fn_exit
316
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
321 {
322
323   case $as_dir in #(
324   -*) as_dir=./$as_dir;;
325   esac
326   test -d "$as_dir" || eval $as_mkdir_p || {
327     as_dirs=
328     while :; do
329       case $as_dir in #(
330       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331       *) as_qdir=$as_dir;;
332       esac
333       as_dirs="'$as_qdir' $as_dirs"
334       as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336          X"$as_dir" : 'X\(//\)[^/]' \| \
337          X"$as_dir" : 'X\(//\)$' \| \
338          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341             s//\1/
342             q
343           }
344           /^X\(\/\/\)[^/].*/{
345             s//\1/
346             q
347           }
348           /^X\(\/\/\)$/{
349             s//\1/
350             q
351           }
352           /^X\(\/\).*/{
353             s//\1/
354             q
355           }
356           s/.*/./; q'`
357       test -d "$as_dir" && break
358     done
359     test -z "$as_dirs" || eval "mkdir $as_dirs"
360   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363 } # as_fn_mkdir_p
364
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
369 {
370   test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379   eval 'as_fn_append ()
380   {
381     eval $1+=\$2
382   }'
383 else
384   as_fn_append ()
385   {
386     eval $1=\$$1\$2
387   }
388 fi # as_fn_append
389
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396   eval 'as_fn_arith ()
397   {
398     as_val=$(( $* ))
399   }'
400 else
401   as_fn_arith ()
402   {
403     as_val=`expr "$@" || test $? -eq 1`
404   }
405 fi # as_fn_arith
406
407
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
414 {
415   as_status=$1; test $as_status -eq 0 && as_status=1
416   if test "$4"; then
417     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419   fi
420   $as_echo "$as_me: error: $2" >&2
421   as_fn_exit $as_status
422 } # as_fn_error
423
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425    test "X`expr 00001 : '.*\(...\)'`" = X001; then
426   as_expr=expr
427 else
428   as_expr=false
429 fi
430
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432   as_basename=basename
433 else
434   as_basename=false
435 fi
436
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438   as_dirname=dirname
439 else
440   as_dirname=false
441 fi
442
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445          X"$0" : 'X\(//\)$' \| \
446          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448     sed '/^.*\/\([^/][^/]*\)\/*$/{
449             s//\1/
450             q
451           }
452           /^X\/\(\/\/\)$/{
453             s//\1/
454             q
455           }
456           /^X\/\(\/\).*/{
457             s//\1/
458             q
459           }
460           s/.*/./; q'`
461
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
468
469
470   as_lineno_1=$LINENO as_lineno_1a=$LINENO
471   as_lineno_2=$LINENO as_lineno_2a=$LINENO
472   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
475   sed -n '
476     p
477     /[$]LINENO/=
478   ' <$as_myself |
479     sed '
480       s/[$]LINENO.*/&-/
481       t lineno
482       b
483       :lineno
484       N
485       :loop
486       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487       t loop
488       s/-\n.*//
489     ' >$as_me.lineno &&
490   chmod +x "$as_me.lineno" ||
491     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
492
493   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494   # already done that, so ensure we don't try to do so again and fall
495   # in an infinite loop.  This has already happened in practice.
496   _as_can_reexec=no; export _as_can_reexec
497   # Don't try to exec as it changes $[0], causing all sort of problems
498   # (the dirname of $[0] is not the place where we might find the
499   # original and so on.  Autoconf is especially sensitive to this).
500   . "./$as_me.lineno"
501   # Exit status is that of the last command.
502   exit
503 }
504
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508   case `echo 'xy\c'` in
509   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
510   xy)  ECHO_C='\c';;
511   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
512        ECHO_T=' ';;
513   esac;;
514 *)
515   ECHO_N='-n';;
516 esac
517
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520   rm -f conf$$.dir/conf$$.file
521 else
522   rm -f conf$$.dir
523   mkdir conf$$.dir 2>/dev/null
524 fi
525 if (echo >conf$$.file) 2>/dev/null; then
526   if ln -s conf$$.file conf$$ 2>/dev/null; then
527     as_ln_s='ln -s'
528     # ... but there are two gotchas:
529     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531     # In both cases, we have to default to `cp -pR'.
532     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533       as_ln_s='cp -pR'
534   elif ln conf$$.file conf$$ 2>/dev/null; then
535     as_ln_s=ln
536   else
537     as_ln_s='cp -pR'
538   fi
539 else
540   as_ln_s='cp -pR'
541 fi
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
544
545 if mkdir -p . 2>/dev/null; then
546   as_mkdir_p='mkdir -p "$as_dir"'
547 else
548   test -d ./-p && rmdir ./-p
549   as_mkdir_p=false
550 fi
551
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
554
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
564
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
569
570 #
571 # Initializations.
572 #
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
581
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='12devel'
586 PACKAGE_STRING='PostgreSQL 12devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL=''
589
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 #  include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 #  include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
627
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 PROVE
633 FOP
634 XSLTPROC
635 DBTOEPUB
636 have_docbook
637 XMLLINT
638 TCL_SHLIB_LD_LIBS
639 TCL_SHARED_BUILD
640 TCL_LIB_SPEC
641 TCL_LIBS
642 TCL_INCLUDE_SPEC
643 TCL_CONFIG_SH
644 TCLSH
645 XGETTEXT
646 MSGMERGE
647 MSGFMT_FLAGS
648 MSGFMT
649 PG_CRC32C_OBJS
650 CFLAGS_ARMV8_CRC32C
651 CFLAGS_SSE42
652 have_win32_dbghelp
653 LIBOBJS
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 PTHREAD_CFLAGS
658 PTHREAD_LIBS
659 PTHREAD_CC
660 ax_pthread_config
661 SED
662 ZIC
663 python_additional_libs
664 python_libspec
665 python_libdir
666 python_includespec
667 python_version
668 python_majorversion
669 PYTHON
670 perl_embed_ldflags
671 perl_embed_ccflags
672 perl_includespec
673 perl_useshrplib
674 perl_privlibexp
675 perl_archlibexp
676 PERL
677 FLEXFLAGS
678 FLEX
679 BISONFLAGS
680 BISON
681 MKDIR_P
682 LN_S
683 TAR
684 install_bin
685 INSTALL_DATA
686 INSTALL_SCRIPT
687 INSTALL_PROGRAM
688 WINDRES
689 DLLWRAP
690 DLLTOOL
691 AR
692 STRIP_SHARED_LIB
693 STRIP_STATIC_LIB
694 STRIP
695 RANLIB
696 with_gnu_ld
697 LD
698 LDFLAGS_SL
699 LDFLAGS_EX
700 ELF_SYS
701 EGREP
702 GREP
703 with_zlib
704 with_system_tzdata
705 with_libxslt
706 with_libxml
707 XML2_CONFIG
708 UUID_EXTRA_OBJS
709 with_uuid
710 with_systemd
711 with_selinux
712 with_openssl
713 with_ldap
714 with_krb_srvnam
715 krb_srvtab
716 with_gssapi
717 with_python
718 with_perl
719 with_tcl
720 ICU_LIBS
721 ICU_CFLAGS
722 PKG_CONFIG_LIBDIR
723 PKG_CONFIG_PATH
724 PKG_CONFIG
725 with_icu
726 enable_thread_safety
727 INCLUDES
728 autodepend
729 TAS
730 GCC
731 CPP
732 BITCODE_CXXFLAGS
733 BITCODE_CFLAGS
734 CFLAGS_VECTOR
735 PERMIT_DECLARATION_AFTER_STATEMENT
736 LLVM_BINPATH
737 LLVM_CXXFLAGS
738 LLVM_CFLAGS
739 LLVM_CPPFLAGS
740 LLVM_LIBS
741 CLANG
742 LLVM_CONFIG
743 AWK
744 with_llvm
745 SUN_STUDIO_CC
746 ac_ct_CXX
747 CXXFLAGS
748 CXX
749 OBJEXT
750 EXEEXT
751 ac_ct_CC
752 CPPFLAGS
753 LDFLAGS
754 CFLAGS
755 CC
756 enable_tap_tests
757 enable_dtrace
758 DTRACEFLAGS
759 DTRACE
760 enable_coverage
761 GENHTML
762 LCOV
763 GCOV
764 enable_debug
765 enable_rpath
766 default_port
767 WANTED_LANGUAGES
768 enable_nls
769 PORTNAME
770 host_os
771 host_vendor
772 host_cpu
773 host
774 build_os
775 build_vendor
776 build_cpu
777 build
778 PG_MAJORVERSION
779 configure_args
780 target_alias
781 host_alias
782 build_alias
783 LIBS
784 ECHO_T
785 ECHO_N
786 ECHO_C
787 DEFS
788 mandir
789 localedir
790 libdir
791 psdir
792 pdfdir
793 dvidir
794 htmldir
795 infodir
796 docdir
797 oldincludedir
798 includedir
799 localstatedir
800 sharedstatedir
801 sysconfdir
802 datadir
803 datarootdir
804 libexecdir
805 sbindir
806 bindir
807 program_transform_name
808 prefix
809 exec_prefix
810 PACKAGE_URL
811 PACKAGE_BUGREPORT
812 PACKAGE_STRING
813 PACKAGE_VERSION
814 PACKAGE_TARNAME
815 PACKAGE_NAME
816 PATH_SEPARATOR
817 SHELL'
818 ac_subst_files=''
819 ac_user_opts='
820 enable_option_checking
821 with_extra_version
822 with_template
823 with_includes
824 with_libraries
825 with_libs
826 enable_integer_datetimes
827 enable_nls
828 with_pgport
829 enable_rpath
830 enable_spinlocks
831 enable_atomics
832 enable_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 XML2_CONFIG
892 LDFLAGS_EX
893 LDFLAGS_SL
894 PERL
895 PYTHON
896 MSGFMT
897 TCLSH'
898
899
900 # Initialize some variables set by options.
901 ac_init_help=
902 ac_init_version=false
903 ac_unrecognized_opts=
904 ac_unrecognized_sep=
905 # The variables have the same names as the options, with
906 # dashes changed to underlines.
907 cache_file=/dev/null
908 exec_prefix=NONE
909 no_create=
910 no_recursion=
911 prefix=NONE
912 program_prefix=NONE
913 program_suffix=NONE
914 program_transform_name=s,x,x,
915 silent=
916 site=
917 srcdir=
918 verbose=
919 x_includes=NONE
920 x_libraries=NONE
921
922 # Installation directory options.
923 # These are left unexpanded so users can "make install exec_prefix=/foo"
924 # and all the variables that are supposed to be based on exec_prefix
925 # by default will actually change.
926 # Use braces instead of parens because sh, perl, etc. also accept them.
927 # (The list follows the same order as the GNU Coding Standards.)
928 bindir='${exec_prefix}/bin'
929 sbindir='${exec_prefix}/sbin'
930 libexecdir='${exec_prefix}/libexec'
931 datarootdir='${prefix}/share'
932 datadir='${datarootdir}'
933 sysconfdir='${prefix}/etc'
934 sharedstatedir='${prefix}/com'
935 localstatedir='${prefix}/var'
936 includedir='${prefix}/include'
937 oldincludedir='/usr/include'
938 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
939 infodir='${datarootdir}/info'
940 htmldir='${docdir}'
941 dvidir='${docdir}'
942 pdfdir='${docdir}'
943 psdir='${docdir}'
944 libdir='${exec_prefix}/lib'
945 localedir='${datarootdir}/locale'
946 mandir='${datarootdir}/man'
947
948 ac_prev=
949 ac_dashdash=
950 for ac_option
951 do
952   # If the previous option needs an argument, assign it.
953   if test -n "$ac_prev"; then
954     eval $ac_prev=\$ac_option
955     ac_prev=
956     continue
957   fi
958
959   case $ac_option in
960   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
961   *=)   ac_optarg= ;;
962   *)    ac_optarg=yes ;;
963   esac
964
965   # Accept the important Cygnus configure options, so we can diagnose typos.
966
967   case $ac_dashdash$ac_option in
968   --)
969     ac_dashdash=yes ;;
970
971   -bindir | --bindir | --bindi | --bind | --bin | --bi)
972     ac_prev=bindir ;;
973   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
974     bindir=$ac_optarg ;;
975
976   -build | --build | --buil | --bui | --bu)
977     ac_prev=build_alias ;;
978   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
979     build_alias=$ac_optarg ;;
980
981   -cache-file | --cache-file | --cache-fil | --cache-fi \
982   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
983     ac_prev=cache_file ;;
984   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
985   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
986     cache_file=$ac_optarg ;;
987
988   --config-cache | -C)
989     cache_file=config.cache ;;
990
991   -datadir | --datadir | --datadi | --datad)
992     ac_prev=datadir ;;
993   -datadir=* | --datadir=* | --datadi=* | --datad=*)
994     datadir=$ac_optarg ;;
995
996   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
997   | --dataroo | --dataro | --datar)
998     ac_prev=datarootdir ;;
999   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1000   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1001     datarootdir=$ac_optarg ;;
1002
1003   -disable-* | --disable-*)
1004     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1005     # Reject names that are not valid shell variable names.
1006     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1007       as_fn_error $? "invalid feature name: $ac_useropt"
1008     ac_useropt_orig=$ac_useropt
1009     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1010     case $ac_user_opts in
1011       *"
1012 "enable_$ac_useropt"
1013 "*) ;;
1014       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1015          ac_unrecognized_sep=', ';;
1016     esac
1017     eval enable_$ac_useropt=no ;;
1018
1019   -docdir | --docdir | --docdi | --doc | --do)
1020     ac_prev=docdir ;;
1021   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1022     docdir=$ac_optarg ;;
1023
1024   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1025     ac_prev=dvidir ;;
1026   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1027     dvidir=$ac_optarg ;;
1028
1029   -enable-* | --enable-*)
1030     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1031     # Reject names that are not valid shell variable names.
1032     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1033       as_fn_error $? "invalid feature name: $ac_useropt"
1034     ac_useropt_orig=$ac_useropt
1035     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1036     case $ac_user_opts in
1037       *"
1038 "enable_$ac_useropt"
1039 "*) ;;
1040       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1041          ac_unrecognized_sep=', ';;
1042     esac
1043     eval enable_$ac_useropt=\$ac_optarg ;;
1044
1045   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1046   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1047   | --exec | --exe | --ex)
1048     ac_prev=exec_prefix ;;
1049   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1050   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1051   | --exec=* | --exe=* | --ex=*)
1052     exec_prefix=$ac_optarg ;;
1053
1054   -gas | --gas | --ga | --g)
1055     # Obsolete; use --with-gas.
1056     with_gas=yes ;;
1057
1058   -help | --help | --hel | --he | -h)
1059     ac_init_help=long ;;
1060   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1061     ac_init_help=recursive ;;
1062   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1063     ac_init_help=short ;;
1064
1065   -host | --host | --hos | --ho)
1066     ac_prev=host_alias ;;
1067   -host=* | --host=* | --hos=* | --ho=*)
1068     host_alias=$ac_optarg ;;
1069
1070   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1071     ac_prev=htmldir ;;
1072   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1073   | --ht=*)
1074     htmldir=$ac_optarg ;;
1075
1076   -includedir | --includedir | --includedi | --included | --include \
1077   | --includ | --inclu | --incl | --inc)
1078     ac_prev=includedir ;;
1079   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1080   | --includ=* | --inclu=* | --incl=* | --inc=*)
1081     includedir=$ac_optarg ;;
1082
1083   -infodir | --infodir | --infodi | --infod | --info | --inf)
1084     ac_prev=infodir ;;
1085   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1086     infodir=$ac_optarg ;;
1087
1088   -libdir | --libdir | --libdi | --libd)
1089     ac_prev=libdir ;;
1090   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1091     libdir=$ac_optarg ;;
1092
1093   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1094   | --libexe | --libex | --libe)
1095     ac_prev=libexecdir ;;
1096   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1097   | --libexe=* | --libex=* | --libe=*)
1098     libexecdir=$ac_optarg ;;
1099
1100   -localedir | --localedir | --localedi | --localed | --locale)
1101     ac_prev=localedir ;;
1102   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1103     localedir=$ac_optarg ;;
1104
1105   -localstatedir | --localstatedir | --localstatedi | --localstated \
1106   | --localstate | --localstat | --localsta | --localst | --locals)
1107     ac_prev=localstatedir ;;
1108   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1109   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1110     localstatedir=$ac_optarg ;;
1111
1112   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1113     ac_prev=mandir ;;
1114   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1115     mandir=$ac_optarg ;;
1116
1117   -nfp | --nfp | --nf)
1118     # Obsolete; use --without-fp.
1119     with_fp=no ;;
1120
1121   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1122   | --no-cr | --no-c | -n)
1123     no_create=yes ;;
1124
1125   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1126   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1127     no_recursion=yes ;;
1128
1129   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1130   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1131   | --oldin | --oldi | --old | --ol | --o)
1132     ac_prev=oldincludedir ;;
1133   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1134   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1135   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1136     oldincludedir=$ac_optarg ;;
1137
1138   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1139     ac_prev=prefix ;;
1140   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1141     prefix=$ac_optarg ;;
1142
1143   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1144   | --program-pre | --program-pr | --program-p)
1145     ac_prev=program_prefix ;;
1146   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1147   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1148     program_prefix=$ac_optarg ;;
1149
1150   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1151   | --program-suf | --program-su | --program-s)
1152     ac_prev=program_suffix ;;
1153   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1154   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1155     program_suffix=$ac_optarg ;;
1156
1157   -program-transform-name | --program-transform-name \
1158   | --program-transform-nam | --program-transform-na \
1159   | --program-transform-n | --program-transform- \
1160   | --program-transform | --program-transfor \
1161   | --program-transfo | --program-transf \
1162   | --program-trans | --program-tran \
1163   | --progr-tra | --program-tr | --program-t)
1164     ac_prev=program_transform_name ;;
1165   -program-transform-name=* | --program-transform-name=* \
1166   | --program-transform-nam=* | --program-transform-na=* \
1167   | --program-transform-n=* | --program-transform-=* \
1168   | --program-transform=* | --program-transfor=* \
1169   | --program-transfo=* | --program-transf=* \
1170   | --program-trans=* | --program-tran=* \
1171   | --progr-tra=* | --program-tr=* | --program-t=*)
1172     program_transform_name=$ac_optarg ;;
1173
1174   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1175     ac_prev=pdfdir ;;
1176   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1177     pdfdir=$ac_optarg ;;
1178
1179   -psdir | --psdir | --psdi | --psd | --ps)
1180     ac_prev=psdir ;;
1181   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1182     psdir=$ac_optarg ;;
1183
1184   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1185   | -silent | --silent | --silen | --sile | --sil)
1186     silent=yes ;;
1187
1188   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1189     ac_prev=sbindir ;;
1190   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1191   | --sbi=* | --sb=*)
1192     sbindir=$ac_optarg ;;
1193
1194   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1195   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1196   | --sharedst | --shareds | --shared | --share | --shar \
1197   | --sha | --sh)
1198     ac_prev=sharedstatedir ;;
1199   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1200   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1201   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1202   | --sha=* | --sh=*)
1203     sharedstatedir=$ac_optarg ;;
1204
1205   -site | --site | --sit)
1206     ac_prev=site ;;
1207   -site=* | --site=* | --sit=*)
1208     site=$ac_optarg ;;
1209
1210   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1211     ac_prev=srcdir ;;
1212   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1213     srcdir=$ac_optarg ;;
1214
1215   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1216   | --syscon | --sysco | --sysc | --sys | --sy)
1217     ac_prev=sysconfdir ;;
1218   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1219   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1220     sysconfdir=$ac_optarg ;;
1221
1222   -target | --target | --targe | --targ | --tar | --ta | --t)
1223     ac_prev=target_alias ;;
1224   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1225     target_alias=$ac_optarg ;;
1226
1227   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1228     verbose=yes ;;
1229
1230   -version | --version | --versio | --versi | --vers | -V)
1231     ac_init_version=: ;;
1232
1233   -with-* | --with-*)
1234     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1235     # Reject names that are not valid shell variable names.
1236     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1237       as_fn_error $? "invalid package name: $ac_useropt"
1238     ac_useropt_orig=$ac_useropt
1239     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1240     case $ac_user_opts in
1241       *"
1242 "with_$ac_useropt"
1243 "*) ;;
1244       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1245          ac_unrecognized_sep=', ';;
1246     esac
1247     eval with_$ac_useropt=\$ac_optarg ;;
1248
1249   -without-* | --without-*)
1250     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1251     # Reject names that are not valid shell variable names.
1252     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1253       as_fn_error $? "invalid package name: $ac_useropt"
1254     ac_useropt_orig=$ac_useropt
1255     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1256     case $ac_user_opts in
1257       *"
1258 "with_$ac_useropt"
1259 "*) ;;
1260       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1261          ac_unrecognized_sep=', ';;
1262     esac
1263     eval with_$ac_useropt=no ;;
1264
1265   --x)
1266     # Obsolete; use --with-x.
1267     with_x=yes ;;
1268
1269   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1270   | --x-incl | --x-inc | --x-in | --x-i)
1271     ac_prev=x_includes ;;
1272   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1273   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1274     x_includes=$ac_optarg ;;
1275
1276   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1277   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1278     ac_prev=x_libraries ;;
1279   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1280   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1281     x_libraries=$ac_optarg ;;
1282
1283   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1284 Try \`$0 --help' for more information"
1285     ;;
1286
1287   *=*)
1288     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1289     # Reject names that are not valid shell variable names.
1290     case $ac_envvar in #(
1291       '' | [0-9]* | *[!_$as_cr_alnum]* )
1292       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1293     esac
1294     eval $ac_envvar=\$ac_optarg
1295     export $ac_envvar ;;
1296
1297   *)
1298     # FIXME: should be removed in autoconf 3.0.
1299     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1300     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1301       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1302     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1303     ;;
1304
1305   esac
1306 done
1307
1308 if test -n "$ac_prev"; then
1309   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1310   as_fn_error $? "missing argument to $ac_option"
1311 fi
1312
1313 if test -n "$ac_unrecognized_opts"; then
1314   case $enable_option_checking in
1315     no) ;;
1316     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1317     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1318   esac
1319 fi
1320
1321 # Check all directory arguments for consistency.
1322 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1323                 datadir sysconfdir sharedstatedir localstatedir includedir \
1324                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1325                 libdir localedir mandir
1326 do
1327   eval ac_val=\$$ac_var
1328   # Remove trailing slashes.
1329   case $ac_val in
1330     */ )
1331       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1332       eval $ac_var=\$ac_val;;
1333   esac
1334   # Be sure to have absolute directory names.
1335   case $ac_val in
1336     [\\/$]* | ?:[\\/]* )  continue;;
1337     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1338   esac
1339   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1340 done
1341
1342 # There might be people who depend on the old broken behavior: `$host'
1343 # used to hold the argument of --host etc.
1344 # FIXME: To remove some day.
1345 build=$build_alias
1346 host=$host_alias
1347 target=$target_alias
1348
1349 # FIXME: To remove some day.
1350 if test "x$host_alias" != x; then
1351   if test "x$build_alias" = x; then
1352     cross_compiling=maybe
1353   elif test "x$build_alias" != "x$host_alias"; then
1354     cross_compiling=yes
1355   fi
1356 fi
1357
1358 ac_tool_prefix=
1359 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1360
1361 test "$silent" = yes && exec 6>/dev/null
1362
1363
1364 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1365 ac_ls_di=`ls -di .` &&
1366 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1367   as_fn_error $? "working directory cannot be determined"
1368 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1369   as_fn_error $? "pwd does not report name of working directory"
1370
1371
1372 # Find the source files, if location was not specified.
1373 if test -z "$srcdir"; then
1374   ac_srcdir_defaulted=yes
1375   # Try the directory containing this script, then the parent directory.
1376   ac_confdir=`$as_dirname -- "$as_myself" ||
1377 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1378          X"$as_myself" : 'X\(//\)[^/]' \| \
1379          X"$as_myself" : 'X\(//\)$' \| \
1380          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1381 $as_echo X"$as_myself" |
1382     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1383             s//\1/
1384             q
1385           }
1386           /^X\(\/\/\)[^/].*/{
1387             s//\1/
1388             q
1389           }
1390           /^X\(\/\/\)$/{
1391             s//\1/
1392             q
1393           }
1394           /^X\(\/\).*/{
1395             s//\1/
1396             q
1397           }
1398           s/.*/./; q'`
1399   srcdir=$ac_confdir
1400   if test ! -r "$srcdir/$ac_unique_file"; then
1401     srcdir=..
1402   fi
1403 else
1404   ac_srcdir_defaulted=no
1405 fi
1406 if test ! -r "$srcdir/$ac_unique_file"; then
1407   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1408   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1409 fi
1410 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1411 ac_abs_confdir=`(
1412         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1413         pwd)`
1414 # When building in place, set srcdir=.
1415 if test "$ac_abs_confdir" = "$ac_pwd"; then
1416   srcdir=.
1417 fi
1418 # Remove unnecessary trailing slashes from srcdir.
1419 # Double slashes in file names in object file debugging info
1420 # mess up M-x gdb in Emacs.
1421 case $srcdir in
1422 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1423 esac
1424 for ac_var in $ac_precious_vars; do
1425   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1426   eval ac_env_${ac_var}_value=\$${ac_var}
1427   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1428   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1429 done
1430
1431 #
1432 # Report the --help message.
1433 #
1434 if test "$ac_init_help" = "long"; then
1435   # Omit some internal or obsolete options to make the list less imposing.
1436   # This message is too long to be a string in the A/UX 3.1 sh.
1437   cat <<_ACEOF
1438 \`configure' configures PostgreSQL 12devel to adapt to many kinds of systems.
1439
1440 Usage: $0 [OPTION]... [VAR=VALUE]...
1441
1442 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1443 VAR=VALUE.  See below for descriptions of some of the useful variables.
1444
1445 Defaults for the options are specified in brackets.
1446
1447 Configuration:
1448   -h, --help              display this help and exit
1449       --help=short        display options specific to this package
1450       --help=recursive    display the short help of all the included packages
1451   -V, --version           display version information and exit
1452   -q, --quiet, --silent   do not print \`checking ...' messages
1453       --cache-file=FILE   cache test results in FILE [disabled]
1454   -C, --config-cache      alias for \`--cache-file=config.cache'
1455   -n, --no-create         do not create output files
1456       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1457
1458 Installation directories:
1459   --prefix=PREFIX         install architecture-independent files in PREFIX
1460                           [$ac_default_prefix]
1461   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1462                           [PREFIX]
1463
1464 By default, \`make install' will install all the files in
1465 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1466 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1467 for instance \`--prefix=\$HOME'.
1468
1469 For better control, use the options below.
1470
1471 Fine tuning of the installation directories:
1472   --bindir=DIR            user executables [EPREFIX/bin]
1473   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1474   --libexecdir=DIR        program executables [EPREFIX/libexec]
1475   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1476   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1477   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1478   --libdir=DIR            object code libraries [EPREFIX/lib]
1479   --includedir=DIR        C header files [PREFIX/include]
1480   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1481   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1482   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1483   --infodir=DIR           info documentation [DATAROOTDIR/info]
1484   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1485   --mandir=DIR            man documentation [DATAROOTDIR/man]
1486   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1487   --htmldir=DIR           html documentation [DOCDIR]
1488   --dvidir=DIR            dvi documentation [DOCDIR]
1489   --pdfdir=DIR            pdf documentation [DOCDIR]
1490   --psdir=DIR             ps documentation [DOCDIR]
1491 _ACEOF
1492
1493   cat <<\_ACEOF
1494
1495 System types:
1496   --build=BUILD     configure for building on BUILD [guessed]
1497   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1498 _ACEOF
1499 fi
1500
1501 if test -n "$ac_init_help"; then
1502   case $ac_init_help in
1503      short | recursive ) echo "Configuration of PostgreSQL 12devel:";;
1504    esac
1505   cat <<\_ACEOF
1506
1507 Optional Features:
1508   --disable-option-checking  ignore unrecognized --enable/--with options
1509   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1510   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1511   --disable-integer-datetimes
1512                           obsolete option, no longer supported
1513   --enable-nls[=LANGUAGES]
1514                           enable Native Language Support
1515   --disable-rpath         do not embed shared library search path in
1516                           executables
1517   --disable-spinlocks     do not use spinlocks
1518   --disable-atomics       do not use atomic operations
1519   --enable-debug          build with debugging symbols (-g)
1520   --enable-profiling      build with profiling enabled
1521   --enable-coverage       build with coverage testing instrumentation
1522   --enable-dtrace         build with DTrace support
1523   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1524   --enable-depend         turn on automatic dependency tracking
1525   --enable-cassert        enable assertion checks (for debugging)
1526   --disable-thread-safety disable thread-safety in client libraries
1527   --disable-largefile     omit support for large files
1528   --disable-float4-byval  disable float4 passed by value
1529   --disable-float8-byval  disable float8 passed by value
1530
1531 Optional Packages:
1532   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1533   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1534   --with-extra-version=STRING
1535                           append STRING to version
1536   --with-template=NAME    override operating system template
1537   --with-includes=DIRS    look for additional header files in DIRS
1538   --with-libraries=DIRS   look for additional libraries in DIRS
1539   --with-libs=DIRS        alternative spelling of --with-libraries
1540   --with-pgport=PORTNUM   set default port number [5432]
1541   --with-blocksize=BLOCKSIZE
1542                           set table block size in kB [8]
1543   --with-segsize=SEGSIZE  set table segment size in GB [1]
1544   --with-wal-blocksize=BLOCKSIZE
1545                           set WAL block size in kB [8]
1546   --with-CC=CMD           set compiler (deprecated)
1547   --with-llvm             build with LLVM based JIT support
1548   --with-icu              build with ICU support
1549   --with-tcl              build Tcl modules (PL/Tcl)
1550   --with-tclconfig=DIR    tclConfig.sh is in DIR
1551   --with-perl             build Perl modules (PL/Perl)
1552   --with-python           build Python modules (PL/Python)
1553   --with-gssapi           build with GSSAPI support
1554   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1555                           [postgres]
1556   --with-pam              build with PAM support
1557   --with-bsd-auth         build with BSD Authentication support
1558   --with-ldap             build with LDAP support
1559   --with-bonjour          build with Bonjour support
1560   --with-openssl          build with OpenSSL support
1561   --with-selinux          build with SELinux support
1562   --with-systemd          build with systemd support
1563   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1564   --with-libedit-preferred
1565                           prefer BSD Libedit over GNU Readline
1566   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1567   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1568   --with-libxml           build with XML support
1569   --with-libxslt          use XSLT support when building contrib/xml2
1570   --with-system-tzdata=DIR
1571                           use system time zone data in DIR
1572   --without-zlib          do not use Zlib
1573   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1574
1575 Some influential environment variables:
1576   CC          C compiler command
1577   CFLAGS      C compiler flags
1578   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1579               nonstandard directory <lib dir>
1580   LIBS        libraries to pass to the linker, e.g. -l<library>
1581   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1582               you have headers in a nonstandard directory <include dir>
1583   CXX         C++ compiler command
1584   CXXFLAGS    C++ compiler flags
1585   LLVM_CONFIG path to llvm-config command
1586   CLANG       path to clang compiler to generate bitcode
1587   CPP         C preprocessor
1588   PKG_CONFIG  path to pkg-config utility
1589   PKG_CONFIG_PATH
1590               directories to add to pkg-config's search path
1591   PKG_CONFIG_LIBDIR
1592               path overriding pkg-config's built-in search path
1593   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1594   ICU_LIBS    linker flags for ICU, overriding pkg-config
1595   XML2_CONFIG path to xml2-config utility
1596   LDFLAGS_EX  extra linker flags for linking executables only
1597   LDFLAGS_SL  extra linker flags for linking shared libraries only
1598   PERL        Perl program
1599   PYTHON      Python program
1600   MSGFMT      msgfmt program for NLS
1601   TCLSH       Tcl interpreter program (tclsh)
1602
1603 Use these variables to override the choices made by `configure' or to help
1604 it to find libraries and programs with nonstandard names/locations.
1605
1606 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1607 _ACEOF
1608 ac_status=$?
1609 fi
1610
1611 if test "$ac_init_help" = "recursive"; then
1612   # If there are subdirs, report their specific --help.
1613   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1614     test -d "$ac_dir" ||
1615       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1616       continue
1617     ac_builddir=.
1618
1619 case "$ac_dir" in
1620 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1621 *)
1622   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1623   # A ".." for each directory in $ac_dir_suffix.
1624   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1625   case $ac_top_builddir_sub in
1626   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1627   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1628   esac ;;
1629 esac
1630 ac_abs_top_builddir=$ac_pwd
1631 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1632 # for backward compatibility:
1633 ac_top_builddir=$ac_top_build_prefix
1634
1635 case $srcdir in
1636   .)  # We are building in place.
1637     ac_srcdir=.
1638     ac_top_srcdir=$ac_top_builddir_sub
1639     ac_abs_top_srcdir=$ac_pwd ;;
1640   [\\/]* | ?:[\\/]* )  # Absolute name.
1641     ac_srcdir=$srcdir$ac_dir_suffix;
1642     ac_top_srcdir=$srcdir
1643     ac_abs_top_srcdir=$srcdir ;;
1644   *) # Relative name.
1645     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1646     ac_top_srcdir=$ac_top_build_prefix$srcdir
1647     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1648 esac
1649 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1650
1651     cd "$ac_dir" || { ac_status=$?; continue; }
1652     # Check for guested configure.
1653     if test -f "$ac_srcdir/configure.gnu"; then
1654       echo &&
1655       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1656     elif test -f "$ac_srcdir/configure"; then
1657       echo &&
1658       $SHELL "$ac_srcdir/configure" --help=recursive
1659     else
1660       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1661     fi || ac_status=$?
1662     cd "$ac_pwd" || { ac_status=$?; break; }
1663   done
1664 fi
1665
1666 test -n "$ac_init_help" && exit $ac_status
1667 if $ac_init_version; then
1668   cat <<\_ACEOF
1669 PostgreSQL configure 12devel
1670 generated by GNU Autoconf 2.69
1671
1672 Copyright (C) 2012 Free Software Foundation, Inc.
1673 This configure script is free software; the Free Software Foundation
1674 gives unlimited permission to copy, distribute and modify it.
1675
1676 Copyright (c) 1996-2019, PostgreSQL Global Development Group
1677 _ACEOF
1678   exit
1679 fi
1680
1681 ## ------------------------ ##
1682 ## Autoconf initialization. ##
1683 ## ------------------------ ##
1684
1685 # ac_fn_c_try_compile LINENO
1686 # --------------------------
1687 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1688 ac_fn_c_try_compile ()
1689 {
1690   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691   rm -f conftest.$ac_objext
1692   if { { ac_try="$ac_compile"
1693 case "(($ac_try" in
1694   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695   *) ac_try_echo=$ac_try;;
1696 esac
1697 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698 $as_echo "$ac_try_echo"; } >&5
1699   (eval "$ac_compile") 2>conftest.err
1700   ac_status=$?
1701   if test -s conftest.err; then
1702     grep -v '^ *+' conftest.err >conftest.er1
1703     cat conftest.er1 >&5
1704     mv -f conftest.er1 conftest.err
1705   fi
1706   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707   test $ac_status = 0; } && {
1708          test -z "$ac_c_werror_flag" ||
1709          test ! -s conftest.err
1710        } && test -s conftest.$ac_objext; then :
1711   ac_retval=0
1712 else
1713   $as_echo "$as_me: failed program was:" >&5
1714 sed 's/^/| /' conftest.$ac_ext >&5
1715
1716         ac_retval=1
1717 fi
1718   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1719   as_fn_set_status $ac_retval
1720
1721 } # ac_fn_c_try_compile
1722
1723 # ac_fn_cxx_try_compile LINENO
1724 # ----------------------------
1725 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1726 ac_fn_cxx_try_compile ()
1727 {
1728   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729   rm -f conftest.$ac_objext
1730   if { { ac_try="$ac_compile"
1731 case "(($ac_try" in
1732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733   *) ac_try_echo=$ac_try;;
1734 esac
1735 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736 $as_echo "$ac_try_echo"; } >&5
1737   (eval "$ac_compile") 2>conftest.err
1738   ac_status=$?
1739   if test -s conftest.err; then
1740     grep -v '^ *+' conftest.err >conftest.er1
1741     cat conftest.er1 >&5
1742     mv -f conftest.er1 conftest.err
1743   fi
1744   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745   test $ac_status = 0; } && {
1746          test -z "$ac_cxx_werror_flag" ||
1747          test ! -s conftest.err
1748        } && test -s conftest.$ac_objext; then :
1749   ac_retval=0
1750 else
1751   $as_echo "$as_me: failed program was:" >&5
1752 sed 's/^/| /' conftest.$ac_ext >&5
1753
1754         ac_retval=1
1755 fi
1756   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1757   as_fn_set_status $ac_retval
1758
1759 } # ac_fn_cxx_try_compile
1760
1761 # ac_fn_c_try_link LINENO
1762 # -----------------------
1763 # Try to link conftest.$ac_ext, and return whether this succeeded.
1764 ac_fn_c_try_link ()
1765 {
1766   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1767   rm -f conftest.$ac_objext conftest$ac_exeext
1768   if { { ac_try="$ac_link"
1769 case "(($ac_try" in
1770   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1771   *) ac_try_echo=$ac_try;;
1772 esac
1773 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1774 $as_echo "$ac_try_echo"; } >&5
1775   (eval "$ac_link") 2>conftest.err
1776   ac_status=$?
1777   if test -s conftest.err; then
1778     grep -v '^ *+' conftest.err >conftest.er1
1779     cat conftest.er1 >&5
1780     mv -f conftest.er1 conftest.err
1781   fi
1782   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783   test $ac_status = 0; } && {
1784          test -z "$ac_c_werror_flag" ||
1785          test ! -s conftest.err
1786        } && test -s conftest$ac_exeext && {
1787          test "$cross_compiling" = yes ||
1788          test -x conftest$ac_exeext
1789        }; then :
1790   ac_retval=0
1791 else
1792   $as_echo "$as_me: failed program was:" >&5
1793 sed 's/^/| /' conftest.$ac_ext >&5
1794
1795         ac_retval=1
1796 fi
1797   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1798   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1799   # interfere with the next link command; also delete a directory that is
1800   # left behind by Apple's compiler.  We do this before executing the actions.
1801   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1802   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1803   as_fn_set_status $ac_retval
1804
1805 } # ac_fn_c_try_link
1806
1807 # ac_fn_c_try_cpp LINENO
1808 # ----------------------
1809 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1810 ac_fn_c_try_cpp ()
1811 {
1812   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813   if { { ac_try="$ac_cpp conftest.$ac_ext"
1814 case "(($ac_try" in
1815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816   *) ac_try_echo=$ac_try;;
1817 esac
1818 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819 $as_echo "$ac_try_echo"; } >&5
1820   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1821   ac_status=$?
1822   if test -s conftest.err; then
1823     grep -v '^ *+' conftest.err >conftest.er1
1824     cat conftest.er1 >&5
1825     mv -f conftest.er1 conftest.err
1826   fi
1827   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828   test $ac_status = 0; } > conftest.i && {
1829          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1830          test ! -s conftest.err
1831        }; then :
1832   ac_retval=0
1833 else
1834   $as_echo "$as_me: failed program was:" >&5
1835 sed 's/^/| /' conftest.$ac_ext >&5
1836
1837     ac_retval=1
1838 fi
1839   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840   as_fn_set_status $ac_retval
1841
1842 } # ac_fn_c_try_cpp
1843
1844 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1845 # -------------------------------------------------------
1846 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1847 # the include files in INCLUDES and setting the cache variable VAR
1848 # accordingly.
1849 ac_fn_c_check_header_mongrel ()
1850 {
1851   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1852   if eval \${$3+:} false; then :
1853   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854 $as_echo_n "checking for $2... " >&6; }
1855 if eval \${$3+:} false; then :
1856   $as_echo_n "(cached) " >&6
1857 fi
1858 eval ac_res=\$$3
1859                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860 $as_echo "$ac_res" >&6; }
1861 else
1862   # Is the header compilable?
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1864 $as_echo_n "checking $2 usability... " >&6; }
1865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1866 /* end confdefs.h.  */
1867 $4
1868 #include <$2>
1869 _ACEOF
1870 if ac_fn_c_try_compile "$LINENO"; then :
1871   ac_header_compiler=yes
1872 else
1873   ac_header_compiler=no
1874 fi
1875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1877 $as_echo "$ac_header_compiler" >&6; }
1878
1879 # Is the header present?
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1881 $as_echo_n "checking $2 presence... " >&6; }
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883 /* end confdefs.h.  */
1884 #include <$2>
1885 _ACEOF
1886 if ac_fn_c_try_cpp "$LINENO"; then :
1887   ac_header_preproc=yes
1888 else
1889   ac_header_preproc=no
1890 fi
1891 rm -f conftest.err conftest.i conftest.$ac_ext
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1893 $as_echo "$ac_header_preproc" >&6; }
1894
1895 # So?  What about this header?
1896 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1897   yes:no: )
1898     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1899 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1900     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1901 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1902     ;;
1903   no:yes:* )
1904     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1905 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1906     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1907 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1908     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1909 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1910     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1911 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1912     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1913 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1914 ( $as_echo "## ---------------------------------------------- ##
1915 ## Report this to pgsql-bugs@lists.postgresql.org ##
1916 ## ---------------------------------------------- ##"
1917      ) | sed "s/^/$as_me: WARNING:     /" >&2
1918     ;;
1919 esac
1920   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1921 $as_echo_n "checking for $2... " >&6; }
1922 if eval \${$3+:} false; then :
1923   $as_echo_n "(cached) " >&6
1924 else
1925   eval "$3=\$ac_header_compiler"
1926 fi
1927 eval ac_res=\$$3
1928                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929 $as_echo "$ac_res" >&6; }
1930 fi
1931   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1932
1933 } # ac_fn_c_check_header_mongrel
1934
1935 # ac_fn_c_try_run LINENO
1936 # ----------------------
1937 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1938 # that executables *can* be run.
1939 ac_fn_c_try_run ()
1940 {
1941   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942   if { { ac_try="$ac_link"
1943 case "(($ac_try" in
1944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1945   *) ac_try_echo=$ac_try;;
1946 esac
1947 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1948 $as_echo "$ac_try_echo"; } >&5
1949   (eval "$ac_link") 2>&5
1950   ac_status=$?
1951   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1952   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1953   { { case "(($ac_try" in
1954   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1955   *) ac_try_echo=$ac_try;;
1956 esac
1957 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1958 $as_echo "$ac_try_echo"; } >&5
1959   (eval "$ac_try") 2>&5
1960   ac_status=$?
1961   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962   test $ac_status = 0; }; }; then :
1963   ac_retval=0
1964 else
1965   $as_echo "$as_me: program exited with status $ac_status" >&5
1966        $as_echo "$as_me: failed program was:" >&5
1967 sed 's/^/| /' conftest.$ac_ext >&5
1968
1969        ac_retval=$ac_status
1970 fi
1971   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1972   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1973   as_fn_set_status $ac_retval
1974
1975 } # ac_fn_c_try_run
1976
1977 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1978 # -------------------------------------------------------
1979 # Tests whether HEADER exists and can be compiled using the include files in
1980 # INCLUDES, setting the cache variable VAR accordingly.
1981 ac_fn_c_check_header_compile ()
1982 {
1983   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1985 $as_echo_n "checking for $2... " >&6; }
1986 if eval \${$3+:} false; then :
1987   $as_echo_n "(cached) " >&6
1988 else
1989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1990 /* end confdefs.h.  */
1991 $4
1992 #include <$2>
1993 _ACEOF
1994 if ac_fn_c_try_compile "$LINENO"; then :
1995   eval "$3=yes"
1996 else
1997   eval "$3=no"
1998 fi
1999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2000 fi
2001 eval ac_res=\$$3
2002                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2003 $as_echo "$ac_res" >&6; }
2004   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2005
2006 } # ac_fn_c_check_header_compile
2007
2008 # ac_fn_c_check_func LINENO FUNC VAR
2009 # ----------------------------------
2010 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2011 ac_fn_c_check_func ()
2012 {
2013   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2015 $as_echo_n "checking for $2... " >&6; }
2016 if eval \${$3+:} false; then :
2017   $as_echo_n "(cached) " >&6
2018 else
2019   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020 /* end confdefs.h.  */
2021 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2022    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2023 #define $2 innocuous_$2
2024
2025 /* System header to define __stub macros and hopefully few prototypes,
2026     which can conflict with char $2 (); below.
2027     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2028     <limits.h> exists even on freestanding compilers.  */
2029
2030 #ifdef __STDC__
2031 # include <limits.h>
2032 #else
2033 # include <assert.h>
2034 #endif
2035
2036 #undef $2
2037
2038 /* Override any GCC internal prototype to avoid an error.
2039    Use char because int might match the return type of a GCC
2040    builtin and then its argument prototype would still apply.  */
2041 #ifdef __cplusplus
2042 extern "C"
2043 #endif
2044 char $2 ();
2045 /* The GNU C library defines this for functions which it implements
2046     to always fail with ENOSYS.  Some functions are actually named
2047     something starting with __ and the normal name is an alias.  */
2048 #if defined __stub_$2 || defined __stub___$2
2049 choke me
2050 #endif
2051
2052 int
2053 main ()
2054 {
2055 return $2 ();
2056   ;
2057   return 0;
2058 }
2059 _ACEOF
2060 if ac_fn_c_try_link "$LINENO"; then :
2061   eval "$3=yes"
2062 else
2063   eval "$3=no"
2064 fi
2065 rm -f core conftest.err conftest.$ac_objext \
2066     conftest$ac_exeext conftest.$ac_ext
2067 fi
2068 eval ac_res=\$$3
2069                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2070 $as_echo "$ac_res" >&6; }
2071   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2072
2073 } # ac_fn_c_check_func
2074
2075 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2076 # -------------------------------------------
2077 # Tests whether TYPE exists after having included INCLUDES, setting cache
2078 # variable VAR accordingly.
2079 ac_fn_c_check_type ()
2080 {
2081   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2082   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2083 $as_echo_n "checking for $2... " >&6; }
2084 if eval \${$3+:} false; then :
2085   $as_echo_n "(cached) " >&6
2086 else
2087   eval "$3=no"
2088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089 /* end confdefs.h.  */
2090 $4
2091 int
2092 main ()
2093 {
2094 if (sizeof ($2))
2095          return 0;
2096   ;
2097   return 0;
2098 }
2099 _ACEOF
2100 if ac_fn_c_try_compile "$LINENO"; then :
2101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102 /* end confdefs.h.  */
2103 $4
2104 int
2105 main ()
2106 {
2107 if (sizeof (($2)))
2108             return 0;
2109   ;
2110   return 0;
2111 }
2112 _ACEOF
2113 if ac_fn_c_try_compile "$LINENO"; then :
2114
2115 else
2116   eval "$3=yes"
2117 fi
2118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119 fi
2120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121 fi
2122 eval ac_res=\$$3
2123                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2124 $as_echo "$ac_res" >&6; }
2125   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2126
2127 } # ac_fn_c_check_type
2128
2129 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2130 # ----------------------------------------------------
2131 # Tries to find if the field MEMBER exists in type AGGR, after including
2132 # INCLUDES, setting cache variable VAR accordingly.
2133 ac_fn_c_check_member ()
2134 {
2135   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2136   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2137 $as_echo_n "checking for $2.$3... " >&6; }
2138 if eval \${$4+:} false; then :
2139   $as_echo_n "(cached) " >&6
2140 else
2141   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142 /* end confdefs.h.  */
2143 $5
2144 int
2145 main ()
2146 {
2147 static $2 ac_aggr;
2148 if (ac_aggr.$3)
2149 return 0;
2150   ;
2151   return 0;
2152 }
2153 _ACEOF
2154 if ac_fn_c_try_compile "$LINENO"; then :
2155   eval "$4=yes"
2156 else
2157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2158 /* end confdefs.h.  */
2159 $5
2160 int
2161 main ()
2162 {
2163 static $2 ac_aggr;
2164 if (sizeof ac_aggr.$3)
2165 return 0;
2166   ;
2167   return 0;
2168 }
2169 _ACEOF
2170 if ac_fn_c_try_compile "$LINENO"; then :
2171   eval "$4=yes"
2172 else
2173   eval "$4=no"
2174 fi
2175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2176 fi
2177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178 fi
2179 eval ac_res=\$$4
2180                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2181 $as_echo "$ac_res" >&6; }
2182   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2183
2184 } # ac_fn_c_check_member
2185
2186 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2187 # --------------------------------------------
2188 # Tries to find the compile-time value of EXPR in a program that includes
2189 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2190 # computed
2191 ac_fn_c_compute_int ()
2192 {
2193   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2194   if test "$cross_compiling" = yes; then
2195     # Depending upon the size, compute the lo and hi bounds.
2196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197 /* end confdefs.h.  */
2198 $4
2199 int
2200 main ()
2201 {
2202 static int test_array [1 - 2 * !(($2) >= 0)];
2203 test_array [0] = 0;
2204 return test_array [0];
2205
2206   ;
2207   return 0;
2208 }
2209 _ACEOF
2210 if ac_fn_c_try_compile "$LINENO"; then :
2211   ac_lo=0 ac_mid=0
2212   while :; do
2213     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214 /* end confdefs.h.  */
2215 $4
2216 int
2217 main ()
2218 {
2219 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2220 test_array [0] = 0;
2221 return test_array [0];
2222
2223   ;
2224   return 0;
2225 }
2226 _ACEOF
2227 if ac_fn_c_try_compile "$LINENO"; then :
2228   ac_hi=$ac_mid; break
2229 else
2230   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2231                         if test $ac_lo -le $ac_mid; then
2232                           ac_lo= ac_hi=
2233                           break
2234                         fi
2235                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2236 fi
2237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2238   done
2239 else
2240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241 /* end confdefs.h.  */
2242 $4
2243 int
2244 main ()
2245 {
2246 static int test_array [1 - 2 * !(($2) < 0)];
2247 test_array [0] = 0;
2248 return test_array [0];
2249
2250   ;
2251   return 0;
2252 }
2253 _ACEOF
2254 if ac_fn_c_try_compile "$LINENO"; then :
2255   ac_hi=-1 ac_mid=-1
2256   while :; do
2257     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2258 /* end confdefs.h.  */
2259 $4
2260 int
2261 main ()
2262 {
2263 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2264 test_array [0] = 0;
2265 return test_array [0];
2266
2267   ;
2268   return 0;
2269 }
2270 _ACEOF
2271 if ac_fn_c_try_compile "$LINENO"; then :
2272   ac_lo=$ac_mid; break
2273 else
2274   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2275                         if test $ac_mid -le $ac_hi; then
2276                           ac_lo= ac_hi=
2277                           break
2278                         fi
2279                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2280 fi
2281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282   done
2283 else
2284   ac_lo= ac_hi=
2285 fi
2286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287 fi
2288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2289 # Binary search between lo and hi bounds.
2290 while test "x$ac_lo" != "x$ac_hi"; do
2291   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2292   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293 /* end confdefs.h.  */
2294 $4
2295 int
2296 main ()
2297 {
2298 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2299 test_array [0] = 0;
2300 return test_array [0];
2301
2302   ;
2303   return 0;
2304 }
2305 _ACEOF
2306 if ac_fn_c_try_compile "$LINENO"; then :
2307   ac_hi=$ac_mid
2308 else
2309   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2310 fi
2311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312 done
2313 case $ac_lo in #((
2314 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2315 '') ac_retval=1 ;;
2316 esac
2317   else
2318     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319 /* end confdefs.h.  */
2320 $4
2321 static long int longval () { return $2; }
2322 static unsigned long int ulongval () { return $2; }
2323 #include <stdio.h>
2324 #include <stdlib.h>
2325 int
2326 main ()
2327 {
2328
2329   FILE *f = fopen ("conftest.val", "w");
2330   if (! f)
2331     return 1;
2332   if (($2) < 0)
2333     {
2334       long int i = longval ();
2335       if (i != ($2))
2336         return 1;
2337       fprintf (f, "%ld", i);
2338     }
2339   else
2340     {
2341       unsigned long int i = ulongval ();
2342       if (i != ($2))
2343         return 1;
2344       fprintf (f, "%lu", i);
2345     }
2346   /* Do not output a trailing newline, as this causes \r\n confusion
2347      on some platforms.  */
2348   return ferror (f) || fclose (f) != 0;
2349
2350   ;
2351   return 0;
2352 }
2353 _ACEOF
2354 if ac_fn_c_try_run "$LINENO"; then :
2355   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2356 else
2357   ac_retval=1
2358 fi
2359 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2360   conftest.$ac_objext conftest.beam conftest.$ac_ext
2361 rm -f conftest.val
2362
2363   fi
2364   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2365   as_fn_set_status $ac_retval
2366
2367 } # ac_fn_c_compute_int
2368
2369 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2370 # ---------------------------------------------
2371 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2372 # accordingly.
2373 ac_fn_c_check_decl ()
2374 {
2375   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2376   # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2377       as_decl_name=`echo $2|sed 's/ *(.*//'`
2378   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2379   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2380 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2381 if eval \${$3+:} false; then :
2382   $as_echo_n "(cached) " >&6
2383 else
2384   ac_save_werror_flag=$ac_c_werror_flag
2385   ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387 /* end confdefs.h.  */
2388 $4
2389 int
2390 main ()
2391 {
2392 #ifndef $as_decl_name
2393 #ifdef __cplusplus
2394   (void) $as_decl_use;
2395 #else
2396   (void) $as_decl_name;
2397 #endif
2398 #endif
2399
2400   ;
2401   return 0;
2402 }
2403 _ACEOF
2404 if ac_fn_c_try_compile "$LINENO"; then :
2405   eval "$3=yes"
2406 else
2407   eval "$3=no"
2408 fi
2409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410   ac_c_werror_flag=$ac_save_werror_flag
2411 fi
2412 eval ac_res=\$$3
2413                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2414 $as_echo "$ac_res" >&6; }
2415   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2416
2417 } # ac_fn_c_check_decl
2418 cat >config.log <<_ACEOF
2419 This file contains any messages produced by compilers while
2420 running configure, to aid debugging if configure makes a mistake.
2421
2422 It was created by PostgreSQL $as_me 12devel, which was
2423 generated by GNU Autoconf 2.69.  Invocation command line was
2424
2425   $ $0 $@
2426
2427 _ACEOF
2428 exec 5>>config.log
2429 {
2430 cat <<_ASUNAME
2431 ## --------- ##
2432 ## Platform. ##
2433 ## --------- ##
2434
2435 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2436 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2437 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2438 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2439 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2440
2441 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2442 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2443
2444 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2445 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2446 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2447 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2448 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2449 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2450 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2451
2452 _ASUNAME
2453
2454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2455 for as_dir in $PATH
2456 do
2457   IFS=$as_save_IFS
2458   test -z "$as_dir" && as_dir=.
2459     $as_echo "PATH: $as_dir"
2460   done
2461 IFS=$as_save_IFS
2462
2463 } >&5
2464
2465 cat >&5 <<_ACEOF
2466
2467
2468 ## ----------- ##
2469 ## Core tests. ##
2470 ## ----------- ##
2471
2472 _ACEOF
2473
2474
2475 # Keep a trace of the command line.
2476 # Strip out --no-create and --no-recursion so they do not pile up.
2477 # Strip out --silent because we don't want to record it for future runs.
2478 # Also quote any args containing shell meta-characters.
2479 # Make two passes to allow for proper duplicate-argument suppression.
2480 ac_configure_args=
2481 ac_configure_args0=
2482 ac_configure_args1=
2483 ac_must_keep_next=false
2484 for ac_pass in 1 2
2485 do
2486   for ac_arg
2487   do
2488     case $ac_arg in
2489     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2490     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2491     | -silent | --silent | --silen | --sile | --sil)
2492       continue ;;
2493     *\'*)
2494       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2495     esac
2496     case $ac_pass in
2497     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2498     2)
2499       as_fn_append ac_configure_args1 " '$ac_arg'"
2500       if test $ac_must_keep_next = true; then
2501         ac_must_keep_next=false # Got value, back to normal.
2502       else
2503         case $ac_arg in
2504           *=* | --config-cache | -C | -disable-* | --disable-* \
2505           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2506           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2507           | -with-* | --with-* | -without-* | --without-* | --x)
2508             case "$ac_configure_args0 " in
2509               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2510             esac
2511             ;;
2512           -* ) ac_must_keep_next=true ;;
2513         esac
2514       fi
2515       as_fn_append ac_configure_args " '$ac_arg'"
2516       ;;
2517     esac
2518   done
2519 done
2520 { ac_configure_args0=; unset ac_configure_args0;}
2521 { ac_configure_args1=; unset ac_configure_args1;}
2522
2523 # When interrupted or exit'd, cleanup temporary files, and complete
2524 # config.log.  We remove comments because anyway the quotes in there
2525 # would cause problems or look ugly.
2526 # WARNING: Use '\'' to represent an apostrophe within the trap.
2527 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2528 trap 'exit_status=$?
2529   # Save into config.log some information that might help in debugging.
2530   {
2531     echo
2532
2533     $as_echo "## ---------------- ##
2534 ## Cache variables. ##
2535 ## ---------------- ##"
2536     echo
2537     # The following way of writing the cache mishandles newlines in values,
2538 (
2539   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2540     eval ac_val=\$$ac_var
2541     case $ac_val in #(
2542     *${as_nl}*)
2543       case $ac_var in #(
2544       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2545 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2546       esac
2547       case $ac_var in #(
2548       _ | IFS | as_nl) ;; #(
2549       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2550       *) { eval $ac_var=; unset $ac_var;} ;;
2551       esac ;;
2552     esac
2553   done
2554   (set) 2>&1 |
2555     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2556     *${as_nl}ac_space=\ *)
2557       sed -n \
2558         "s/'\''/'\''\\\\'\'''\''/g;
2559           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2560       ;; #(
2561     *)
2562       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2563       ;;
2564     esac |
2565     sort
2566 )
2567     echo
2568
2569     $as_echo "## ----------------- ##
2570 ## Output variables. ##
2571 ## ----------------- ##"
2572     echo
2573     for ac_var in $ac_subst_vars
2574     do
2575       eval ac_val=\$$ac_var
2576       case $ac_val in
2577       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2578       esac
2579       $as_echo "$ac_var='\''$ac_val'\''"
2580     done | sort
2581     echo
2582
2583     if test -n "$ac_subst_files"; then
2584       $as_echo "## ------------------- ##
2585 ## File substitutions. ##
2586 ## ------------------- ##"
2587       echo
2588       for ac_var in $ac_subst_files
2589       do
2590         eval ac_val=\$$ac_var
2591         case $ac_val in
2592         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2593         esac
2594         $as_echo "$ac_var='\''$ac_val'\''"
2595       done | sort
2596       echo
2597     fi
2598
2599     if test -s confdefs.h; then
2600       $as_echo "## ----------- ##
2601 ## confdefs.h. ##
2602 ## ----------- ##"
2603       echo
2604       cat confdefs.h
2605       echo
2606     fi
2607     test "$ac_signal" != 0 &&
2608       $as_echo "$as_me: caught signal $ac_signal"
2609     $as_echo "$as_me: exit $exit_status"
2610   } >&5
2611   rm -f core *.core core.conftest.* &&
2612     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2613     exit $exit_status
2614 ' 0
2615 for ac_signal in 1 2 13 15; do
2616   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2617 done
2618 ac_signal=0
2619
2620 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2621 rm -f -r conftest* confdefs.h
2622
2623 $as_echo "/* confdefs.h */" > confdefs.h
2624
2625 # Predefined preprocessor variables.
2626
2627 cat >>confdefs.h <<_ACEOF
2628 #define PACKAGE_NAME "$PACKAGE_NAME"
2629 _ACEOF
2630
2631 cat >>confdefs.h <<_ACEOF
2632 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2633 _ACEOF
2634
2635 cat >>confdefs.h <<_ACEOF
2636 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2637 _ACEOF
2638
2639 cat >>confdefs.h <<_ACEOF
2640 #define PACKAGE_STRING "$PACKAGE_STRING"
2641 _ACEOF
2642
2643 cat >>confdefs.h <<_ACEOF
2644 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2645 _ACEOF
2646
2647 cat >>confdefs.h <<_ACEOF
2648 #define PACKAGE_URL "$PACKAGE_URL"
2649 _ACEOF
2650
2651
2652 # Let the site file select an alternate cache file if it wants to.
2653 # Prefer an explicitly selected file to automatically selected ones.
2654 ac_site_file1=NONE
2655 ac_site_file2=NONE
2656 if test -n "$CONFIG_SITE"; then
2657   # We do not want a PATH search for config.site.
2658   case $CONFIG_SITE in #((
2659     -*)  ac_site_file1=./$CONFIG_SITE;;
2660     */*) ac_site_file1=$CONFIG_SITE;;
2661     *)   ac_site_file1=./$CONFIG_SITE;;
2662   esac
2663 elif test "x$prefix" != xNONE; then
2664   ac_site_file1=$prefix/share/config.site
2665   ac_site_file2=$prefix/etc/config.site
2666 else
2667   ac_site_file1=$ac_default_prefix/share/config.site
2668   ac_site_file2=$ac_default_prefix/etc/config.site
2669 fi
2670 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2671 do
2672   test "x$ac_site_file" = xNONE && continue
2673   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2674     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2675 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2676     sed 's/^/| /' "$ac_site_file" >&5
2677     . "$ac_site_file" \
2678       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2679 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2680 as_fn_error $? "failed to load site script $ac_site_file
2681 See \`config.log' for more details" "$LINENO" 5; }
2682   fi
2683 done
2684
2685 if test -r "$cache_file"; then
2686   # Some versions of bash will fail to source /dev/null (special files
2687   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2688   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2689     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2690 $as_echo "$as_me: loading cache $cache_file" >&6;}
2691     case $cache_file in
2692       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2693       *)                      . "./$cache_file";;
2694     esac
2695   fi
2696 else
2697   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2698 $as_echo "$as_me: creating cache $cache_file" >&6;}
2699   >$cache_file
2700 fi
2701
2702 # Check that the precious variables saved in the cache have kept the same
2703 # value.
2704 ac_cache_corrupted=false
2705 for ac_var in $ac_precious_vars; do
2706   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2707   eval ac_new_set=\$ac_env_${ac_var}_set
2708   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2709   eval ac_new_val=\$ac_env_${ac_var}_value
2710   case $ac_old_set,$ac_new_set in
2711     set,)
2712       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2713 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2714       ac_cache_corrupted=: ;;
2715     ,set)
2716       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2717 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2718       ac_cache_corrupted=: ;;
2719     ,);;
2720     *)
2721       if test "x$ac_old_val" != "x$ac_new_val"; then
2722         # differences in whitespace do not lead to failure.
2723         ac_old_val_w=`echo x $ac_old_val`
2724         ac_new_val_w=`echo x $ac_new_val`
2725         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2726           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2727 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2728           ac_cache_corrupted=:
2729         else
2730           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2731 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2732           eval $ac_var=\$ac_old_val
2733         fi
2734         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2735 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2736         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2737 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2738       fi;;
2739   esac
2740   # Pass precious variables to config.status.
2741   if test "$ac_new_set" = set; then
2742     case $ac_new_val in
2743     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2744     *) ac_arg=$ac_var=$ac_new_val ;;
2745     esac
2746     case " $ac_configure_args " in
2747       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2748       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2749     esac
2750   fi
2751 done
2752 if $ac_cache_corrupted; then
2753   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2754 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2755   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2756 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2757   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2758 fi
2759 ## -------------------- ##
2760 ## Main body of script. ##
2761 ## -------------------- ##
2762
2763 ac_ext=c
2764 ac_cpp='$CPP $CPPFLAGS'
2765 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2766 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2767 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2768
2769
2770
2771
2772
2773
2774 ac_aux_dir=
2775 for ac_dir in config "$srcdir"/config; do
2776   if test -f "$ac_dir/install-sh"; then
2777     ac_aux_dir=$ac_dir
2778     ac_install_sh="$ac_aux_dir/install-sh -c"
2779     break
2780   elif test -f "$ac_dir/install.sh"; then
2781     ac_aux_dir=$ac_dir
2782     ac_install_sh="$ac_aux_dir/install.sh -c"
2783     break
2784   elif test -f "$ac_dir/shtool"; then
2785     ac_aux_dir=$ac_dir
2786     ac_install_sh="$ac_aux_dir/shtool install -c"
2787     break
2788   fi
2789 done
2790 if test -z "$ac_aux_dir"; then
2791   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2792 fi
2793
2794 # These three variables are undocumented and unsupported,
2795 # and are intended to be withdrawn in a future Autoconf release.
2796 # They can cause serious problems if a builder's source tree is in a directory
2797 # whose full name contains unusual characters.
2798 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2799 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2800 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2801
2802
2803
2804 configure_args=$ac_configure_args
2805
2806
2807 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2808
2809
2810 cat >>confdefs.h <<_ACEOF
2811 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2812 _ACEOF
2813
2814
2815
2816
2817
2818 # Check whether --with-extra-version was given.
2819 if test "${with_extra_version+set}" = set; then :
2820   withval=$with_extra_version;
2821   case $withval in
2822     yes)
2823       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2824       ;;
2825     no)
2826       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2827       ;;
2828     *)
2829       PG_VERSION="$PACKAGE_VERSION$withval"
2830       ;;
2831   esac
2832
2833 else
2834   PG_VERSION="$PACKAGE_VERSION"
2835 fi
2836
2837
2838
2839 cat >>confdefs.h <<_ACEOF
2840 #define PG_VERSION "$PG_VERSION"
2841 _ACEOF
2842
2843
2844 # Make sure we can run config.sub.
2845 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2846   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2847
2848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2849 $as_echo_n "checking build system type... " >&6; }
2850 if ${ac_cv_build+:} false; then :
2851   $as_echo_n "(cached) " >&6
2852 else
2853   ac_build_alias=$build_alias
2854 test "x$ac_build_alias" = x &&
2855   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2856 test "x$ac_build_alias" = x &&
2857   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2858 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2859   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2860
2861 fi
2862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2863 $as_echo "$ac_cv_build" >&6; }
2864 case $ac_cv_build in
2865 *-*-*) ;;
2866 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2867 esac
2868 build=$ac_cv_build
2869 ac_save_IFS=$IFS; IFS='-'
2870 set x $ac_cv_build
2871 shift
2872 build_cpu=$1
2873 build_vendor=$2
2874 shift; shift
2875 # Remember, the first character of IFS is used to create $*,
2876 # except with old shells:
2877 build_os=$*
2878 IFS=$ac_save_IFS
2879 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2880
2881
2882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2883 $as_echo_n "checking host system type... " >&6; }
2884 if ${ac_cv_host+:} false; then :
2885   $as_echo_n "(cached) " >&6
2886 else
2887   if test "x$host_alias" = x; then
2888   ac_cv_host=$ac_cv_build
2889 else
2890   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2891     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2892 fi
2893
2894 fi
2895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2896 $as_echo "$ac_cv_host" >&6; }
2897 case $ac_cv_host in
2898 *-*-*) ;;
2899 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2900 esac
2901 host=$ac_cv_host
2902 ac_save_IFS=$IFS; IFS='-'
2903 set x $ac_cv_host
2904 shift
2905 host_cpu=$1
2906 host_vendor=$2
2907 shift; shift
2908 # Remember, the first character of IFS is used to create $*,
2909 # except with old shells:
2910 host_os=$*
2911 IFS=$ac_save_IFS
2912 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2913
2914
2915
2916 template=
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2918 $as_echo_n "checking which template to use... " >&6; }
2919
2920
2921
2922
2923 # Check whether --with-template was given.
2924 if test "${with_template+set}" = set; then :
2925   withval=$with_template;
2926   case $withval in
2927     yes)
2928       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2929       ;;
2930     no)
2931       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2932       ;;
2933     *)
2934
2935   case $withval in
2936     list)   echo; ls "$srcdir/src/template"; exit;;
2937     *)      if test -f "$srcdir/src/template/$with_template" ; then
2938               template=$withval
2939             else
2940               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2941             fi;;
2942   esac
2943
2944       ;;
2945   esac
2946
2947 else
2948
2949 # --with-template not given
2950
2951 case $host_os in
2952      aix*) template=aix ;;
2953   cygwin*) template=cygwin ;;
2954   darwin*) template=darwin ;;
2955 dragonfly*) template=netbsd ;;
2956  freebsd*) template=freebsd ;;
2957     hpux*) template=hpux ;;
2958  linux*|gnu*|k*bsd*-gnu)
2959            template=linux ;;
2960    mingw*) template=win32 ;;
2961   netbsd*) template=netbsd ;;
2962  openbsd*) template=openbsd ;;
2963  solaris*) template=solaris ;;
2964 esac
2965
2966   if test x"$template" = x"" ; then
2967     as_fn_error $? "
2968 *******************************************************************
2969 PostgreSQL has apparently not been ported to your platform yet.
2970 To try a manual configuration, look into the src/template directory
2971 for a similar platform and use the '--with-template=' option.
2972
2973 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
2974 rectifying this.  Include the above 'checking host system type...'
2975 line.
2976 *******************************************************************
2977 " "$LINENO" 5
2978   fi
2979
2980
2981 fi
2982
2983
2984
2985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2986 $as_echo "$template" >&6; }
2987
2988 PORTNAME=$template
2989
2990
2991 # Initialize default assumption that we do not need separate assembly code
2992 # for TAS (test-and-set).  This can be overridden by the template file
2993 # when it's executed.
2994 need_tas=no
2995 tas_file=dummy.s
2996
2997
2998
2999 ##
3000 ## Command line options
3001 ##
3002
3003 #
3004 # Add non-standard directories to the include path
3005 #
3006
3007
3008
3009 # Check whether --with-includes was given.
3010 if test "${with_includes+set}" = set; then :
3011   withval=$with_includes;
3012   case $withval in
3013     yes)
3014       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3015       ;;
3016     no)
3017       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3018       ;;
3019     *)
3020
3021       ;;
3022   esac
3023
3024 fi
3025
3026
3027
3028
3029 #
3030 # Add non-standard directories to the library search path
3031 #
3032
3033
3034
3035 # Check whether --with-libraries was given.
3036 if test "${with_libraries+set}" = set; then :
3037   withval=$with_libraries;
3038   case $withval in
3039     yes)
3040       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3041       ;;
3042     no)
3043       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3044       ;;
3045     *)
3046       LIBRARY_DIRS=$withval
3047       ;;
3048   esac
3049
3050 fi
3051
3052
3053
3054
3055
3056
3057 # Check whether --with-libs was given.
3058 if test "${with_libs+set}" = set; then :
3059   withval=$with_libs;
3060   case $withval in
3061     yes)
3062       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3063       ;;
3064     no)
3065       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3066       ;;
3067     *)
3068       LIBRARY_DIRS=$withval
3069       ;;
3070   esac
3071
3072 fi
3073
3074
3075
3076
3077 #
3078 # 64-bit integer date/time storage is now the only option, but to avoid
3079 # unnecessary breakage of build scripts, continue to accept an explicit
3080 # "--enable-integer-datetimes" switch.
3081 #
3082
3083
3084 # Check whether --enable-integer-datetimes was given.
3085 if test "${enable_integer_datetimes+set}" = set; then :
3086   enableval=$enable_integer_datetimes;
3087   case $enableval in
3088     yes)
3089       :
3090       ;;
3091     no)
3092       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3093       ;;
3094     *)
3095       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3096       ;;
3097   esac
3098
3099 else
3100   enable_integer_datetimes=yes
3101
3102 fi
3103
3104
3105
3106
3107 #
3108 # NLS
3109 #
3110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3111 $as_echo_n "checking whether NLS is wanted... " >&6; }
3112
3113
3114 # Check whether --enable-nls was given.
3115 if test "${enable_nls+set}" = set; then :
3116   enableval=$enable_nls;
3117   case $enableval in
3118     yes)
3119       :
3120       ;;
3121     no)
3122       :
3123       ;;
3124     *)
3125       enable_nls=yes
3126 WANTED_LANGUAGES=$enableval
3127       ;;
3128   esac
3129
3130 else
3131   enable_nls=no
3132 fi
3133
3134
3135
3136 if test "$enable_nls" = yes; then
3137
3138 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3139
3140 fi
3141
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3143 $as_echo "$enable_nls" >&6; }
3144
3145
3146
3147 #
3148 # Default port number (--with-pgport), default 5432
3149 #
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3151 $as_echo_n "checking for default port number... " >&6; }
3152
3153
3154
3155 # Check whether --with-pgport was given.
3156 if test "${with_pgport+set}" = set; then :
3157   withval=$with_pgport;
3158   case $withval in
3159     yes)
3160       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3161       ;;
3162     no)
3163       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3164       ;;
3165     *)
3166       default_port=$withval
3167       ;;
3168   esac
3169
3170 else
3171   default_port=5432
3172 fi
3173
3174
3175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3176 $as_echo "$default_port" >&6; }
3177 # Need both of these because some places want an integer and some a string
3178
3179 cat >>confdefs.h <<_ACEOF
3180 #define DEF_PGPORT ${default_port}
3181 _ACEOF
3182
3183
3184 cat >>confdefs.h <<_ACEOF
3185 #define DEF_PGPORT_STR "${default_port}"
3186 _ACEOF
3187
3188
3189
3190 # It's worth validating port; you can get very confusing errors otherwise
3191 if test x"$default_port" = x""; then
3192   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3193 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3194   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3195 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3196   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3197 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3198   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3199 fi
3200
3201 #
3202 # '-rpath'-like feature can be disabled
3203 #
3204
3205
3206 # Check whether --enable-rpath was given.
3207 if test "${enable_rpath+set}" = set; then :
3208   enableval=$enable_rpath;
3209   case $enableval in
3210     yes)
3211       :
3212       ;;
3213     no)
3214       :
3215       ;;
3216     *)
3217       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3218       ;;
3219   esac
3220
3221 else
3222   enable_rpath=yes
3223
3224 fi
3225
3226
3227
3228
3229 #
3230 # Spinlocks
3231 #
3232
3233
3234 # Check whether --enable-spinlocks was given.
3235 if test "${enable_spinlocks+set}" = set; then :
3236   enableval=$enable_spinlocks;
3237   case $enableval in
3238     yes)
3239       :
3240       ;;
3241     no)
3242       :
3243       ;;
3244     *)
3245       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3246       ;;
3247   esac
3248
3249 else
3250   enable_spinlocks=yes
3251
3252 fi
3253
3254
3255
3256 #
3257 # Atomic operations
3258 #
3259
3260
3261 # Check whether --enable-atomics was given.
3262 if test "${enable_atomics+set}" = set; then :
3263   enableval=$enable_atomics;
3264   case $enableval in
3265     yes)
3266       :
3267       ;;
3268     no)
3269       :
3270       ;;
3271     *)
3272       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3273       ;;
3274   esac
3275
3276 else
3277   enable_atomics=yes
3278
3279 fi
3280
3281
3282
3283 #
3284 # --enable-debug adds -g to compiler flags
3285 #
3286
3287
3288 # Check whether --enable-debug was given.
3289 if test "${enable_debug+set}" = set; then :
3290   enableval=$enable_debug;
3291   case $enableval in
3292     yes)
3293       :
3294       ;;
3295     no)
3296       :
3297       ;;
3298     *)
3299       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3300       ;;
3301   esac
3302
3303 else
3304   enable_debug=no
3305
3306 fi
3307
3308
3309
3310
3311 #
3312 # --enable-profiling enables gcc profiling
3313 #
3314
3315
3316 # Check whether --enable-profiling was given.
3317 if test "${enable_profiling+set}" = set; then :
3318   enableval=$enable_profiling;
3319   case $enableval in
3320     yes)
3321       :
3322       ;;
3323     no)
3324       :
3325       ;;
3326     *)
3327       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3328       ;;
3329   esac
3330
3331 else
3332   enable_profiling=no
3333
3334 fi
3335
3336
3337
3338 #
3339 # --enable-coverage enables generation of code coverage metrics with gcov
3340 #
3341
3342
3343 # Check whether --enable-coverage was given.
3344 if test "${enable_coverage+set}" = set; then :
3345   enableval=$enable_coverage;
3346   case $enableval in
3347     yes)
3348       if test -z "$GCOV"; then
3349   for ac_prog in gcov
3350 do
3351   # Extract the first word of "$ac_prog", so it can be a program name with args.
3352 set dummy $ac_prog; ac_word=$2
3353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3354 $as_echo_n "checking for $ac_word... " >&6; }
3355 if ${ac_cv_path_GCOV+:} false; then :
3356   $as_echo_n "(cached) " >&6
3357 else
3358   case $GCOV in
3359   [\\/]* | ?:[\\/]*)
3360   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3361   ;;
3362   *)
3363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3364 for as_dir in $PATH
3365 do
3366   IFS=$as_save_IFS
3367   test -z "$as_dir" && as_dir=.
3368     for ac_exec_ext in '' $ac_executable_extensions; do
3369   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3370     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3371     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3372     break 2
3373   fi
3374 done
3375   done
3376 IFS=$as_save_IFS
3377
3378   ;;
3379 esac
3380 fi
3381 GCOV=$ac_cv_path_GCOV
3382 if test -n "$GCOV"; then
3383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3384 $as_echo "$GCOV" >&6; }
3385 else
3386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3387 $as_echo "no" >&6; }
3388 fi
3389
3390
3391   test -n "$GCOV" && break
3392 done
3393
3394 else
3395   # Report the value of GCOV in configure's output in all cases.
3396   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3397 $as_echo_n "checking for GCOV... " >&6; }
3398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3399 $as_echo "$GCOV" >&6; }
3400 fi
3401
3402 if test -z "$GCOV"; then
3403   as_fn_error $? "gcov not found" "$LINENO" 5
3404 fi
3405 if test -z "$LCOV"; then
3406   for ac_prog in lcov
3407 do
3408   # Extract the first word of "$ac_prog", so it can be a program name with args.
3409 set dummy $ac_prog; ac_word=$2
3410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3411 $as_echo_n "checking for $ac_word... " >&6; }
3412 if ${ac_cv_path_LCOV+:} false; then :
3413   $as_echo_n "(cached) " >&6
3414 else
3415   case $LCOV in
3416   [\\/]* | ?:[\\/]*)
3417   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3418   ;;
3419   *)
3420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3421 for as_dir in $PATH
3422 do
3423   IFS=$as_save_IFS
3424   test -z "$as_dir" && as_dir=.
3425     for ac_exec_ext in '' $ac_executable_extensions; do
3426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3427     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3429     break 2
3430   fi
3431 done
3432   done
3433 IFS=$as_save_IFS
3434
3435   ;;
3436 esac
3437 fi
3438 LCOV=$ac_cv_path_LCOV
3439 if test -n "$LCOV"; then
3440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3441 $as_echo "$LCOV" >&6; }
3442 else
3443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3444 $as_echo "no" >&6; }
3445 fi
3446
3447
3448   test -n "$LCOV" && break
3449 done
3450
3451 else
3452   # Report the value of LCOV in configure's output in all cases.
3453   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3454 $as_echo_n "checking for LCOV... " >&6; }
3455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3456 $as_echo "$LCOV" >&6; }
3457 fi
3458
3459 if test -z "$LCOV"; then
3460   as_fn_error $? "lcov not found" "$LINENO" 5
3461 fi
3462 if test -z "$GENHTML"; then
3463   for ac_prog in genhtml
3464 do
3465   # Extract the first word of "$ac_prog", so it can be a program name with args.
3466 set dummy $ac_prog; ac_word=$2
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3468 $as_echo_n "checking for $ac_word... " >&6; }
3469 if ${ac_cv_path_GENHTML+:} false; then :
3470   $as_echo_n "(cached) " >&6
3471 else
3472   case $GENHTML in
3473   [\\/]* | ?:[\\/]*)
3474   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3475   ;;
3476   *)
3477   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3478 for as_dir in $PATH
3479 do
3480   IFS=$as_save_IFS
3481   test -z "$as_dir" && as_dir=.
3482     for ac_exec_ext in '' $ac_executable_extensions; do
3483   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3484     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3485     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3486     break 2
3487   fi
3488 done
3489   done
3490 IFS=$as_save_IFS
3491
3492   ;;
3493 esac
3494 fi
3495 GENHTML=$ac_cv_path_GENHTML
3496 if test -n "$GENHTML"; then
3497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3498 $as_echo "$GENHTML" >&6; }
3499 else
3500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3501 $as_echo "no" >&6; }
3502 fi
3503
3504
3505   test -n "$GENHTML" && break
3506 done
3507
3508 else
3509   # Report the value of GENHTML in configure's output in all cases.
3510   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3511 $as_echo_n "checking for GENHTML... " >&6; }
3512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3513 $as_echo "$GENHTML" >&6; }
3514 fi
3515
3516 if test -z "$GENHTML"; then
3517   as_fn_error $? "genhtml not found" "$LINENO" 5
3518 fi
3519       ;;
3520     no)
3521       :
3522       ;;
3523     *)
3524       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3525       ;;
3526   esac
3527
3528 else
3529   enable_coverage=no
3530
3531 fi
3532
3533
3534
3535
3536 #
3537 # DTrace
3538 #
3539
3540
3541 # Check whether --enable-dtrace was given.
3542 if test "${enable_dtrace+set}" = set; then :
3543   enableval=$enable_dtrace;
3544   case $enableval in
3545     yes)
3546       if test -z "$DTRACE"; then
3547   for ac_prog in dtrace
3548 do
3549   # Extract the first word of "$ac_prog", so it can be a program name with args.
3550 set dummy $ac_prog; ac_word=$2
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3552 $as_echo_n "checking for $ac_word... " >&6; }
3553 if ${ac_cv_path_DTRACE+:} false; then :
3554   $as_echo_n "(cached) " >&6
3555 else
3556   case $DTRACE in
3557   [\\/]* | ?:[\\/]*)
3558   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3559   ;;
3560   *)
3561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3562 for as_dir in $PATH
3563 do
3564   IFS=$as_save_IFS
3565   test -z "$as_dir" && as_dir=.
3566     for ac_exec_ext in '' $ac_executable_extensions; do
3567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3568     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3570     break 2
3571   fi
3572 done
3573   done
3574 IFS=$as_save_IFS
3575
3576   ;;
3577 esac
3578 fi
3579 DTRACE=$ac_cv_path_DTRACE
3580 if test -n "$DTRACE"; then
3581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3582 $as_echo "$DTRACE" >&6; }
3583 else
3584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3585 $as_echo "no" >&6; }
3586 fi
3587
3588
3589   test -n "$DTRACE" && break
3590 done
3591
3592 else
3593   # Report the value of DTRACE in configure's output in all cases.
3594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3595 $as_echo_n "checking for DTRACE... " >&6; }
3596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3597 $as_echo "$DTRACE" >&6; }
3598 fi
3599
3600 if test -z "$DTRACE"; then
3601   as_fn_error $? "dtrace not found" "$LINENO" 5
3602 fi
3603
3604       ;;
3605     no)
3606       :
3607       ;;
3608     *)
3609       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3610       ;;
3611   esac
3612
3613 else
3614   enable_dtrace=no
3615
3616 fi
3617
3618
3619
3620
3621 #
3622 # TAP tests
3623 #
3624
3625
3626 # Check whether --enable-tap-tests was given.
3627 if test "${enable_tap_tests+set}" = set; then :
3628   enableval=$enable_tap_tests;
3629   case $enableval in
3630     yes)
3631       :
3632       ;;
3633     no)
3634       :
3635       ;;
3636     *)
3637       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3638       ;;
3639   esac
3640
3641 else
3642   enable_tap_tests=no
3643
3644 fi
3645
3646
3647
3648
3649 #
3650 # Block size
3651 #
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3653 $as_echo_n "checking for block size... " >&6; }
3654
3655
3656
3657 # Check whether --with-blocksize was given.
3658 if test "${with_blocksize+set}" = set; then :
3659   withval=$with_blocksize;
3660   case $withval in
3661     yes)
3662       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3663       ;;
3664     no)
3665       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3666       ;;
3667     *)
3668       blocksize=$withval
3669       ;;
3670   esac
3671
3672 else
3673   blocksize=8
3674 fi
3675
3676
3677 case ${blocksize} in
3678   1) BLCKSZ=1024;;
3679   2) BLCKSZ=2048;;
3680   4) BLCKSZ=4096;;
3681   8) BLCKSZ=8192;;
3682  16) BLCKSZ=16384;;
3683  32) BLCKSZ=32768;;
3684   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3685 esac
3686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3687 $as_echo "${blocksize}kB" >&6; }
3688
3689
3690 cat >>confdefs.h <<_ACEOF
3691 #define BLCKSZ ${BLCKSZ}
3692 _ACEOF
3693
3694
3695 #
3696 # Relation segment size
3697 #
3698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3699 $as_echo_n "checking for segment size... " >&6; }
3700
3701
3702
3703 # Check whether --with-segsize was given.
3704 if test "${with_segsize+set}" = set; then :
3705   withval=$with_segsize;
3706   case $withval in
3707     yes)
3708       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3709       ;;
3710     no)
3711       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3712       ;;
3713     *)
3714       segsize=$withval
3715       ;;
3716   esac
3717
3718 else
3719   segsize=1
3720 fi
3721
3722
3723 # this expression is set up to avoid unnecessary integer overflow
3724 # blocksize is already guaranteed to be a factor of 1024
3725 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3726 test $? -eq 0 || exit 1
3727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3728 $as_echo "${segsize}GB" >&6; }
3729
3730
3731 cat >>confdefs.h <<_ACEOF
3732 #define RELSEG_SIZE ${RELSEG_SIZE}
3733 _ACEOF
3734
3735
3736 #
3737 # WAL block size
3738 #
3739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3740 $as_echo_n "checking for WAL block size... " >&6; }
3741
3742
3743
3744 # Check whether --with-wal-blocksize was given.
3745 if test "${with_wal_blocksize+set}" = set; then :
3746   withval=$with_wal_blocksize;
3747   case $withval in
3748     yes)
3749       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3750       ;;
3751     no)
3752       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3753       ;;
3754     *)
3755       wal_blocksize=$withval
3756       ;;
3757   esac
3758
3759 else
3760   wal_blocksize=8
3761 fi
3762
3763
3764 case ${wal_blocksize} in
3765   1) XLOG_BLCKSZ=1024;;
3766   2) XLOG_BLCKSZ=2048;;
3767   4) XLOG_BLCKSZ=4096;;
3768   8) XLOG_BLCKSZ=8192;;
3769  16) XLOG_BLCKSZ=16384;;
3770  32) XLOG_BLCKSZ=32768;;
3771  64) XLOG_BLCKSZ=65536;;
3772   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3773 esac
3774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3775 $as_echo "${wal_blocksize}kB" >&6; }
3776
3777
3778 cat >>confdefs.h <<_ACEOF
3779 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3780 _ACEOF
3781
3782
3783 #
3784 # C compiler
3785 #
3786
3787 # For historical reasons you can also use --with-CC to specify the C compiler
3788 # to use, although the standard way to do this is to set the CC environment
3789 # variable.
3790
3791
3792
3793 # Check whether --with-CC was given.
3794 if test "${with_CC+set}" = set; then :
3795   withval=$with_CC;
3796   case $withval in
3797     yes)
3798       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3799       ;;
3800     no)
3801       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3802       ;;
3803     *)
3804       CC=$with_CC
3805       ;;
3806   esac
3807
3808 fi
3809
3810
3811
3812 case $template in
3813   aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3814     *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3815 esac
3816
3817 ac_ext=c
3818 ac_cpp='$CPP $CPPFLAGS'
3819 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3820 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3821 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3822 if test -n "$ac_tool_prefix"; then
3823   for ac_prog in $pgac_cc_list
3824   do
3825     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3826 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3828 $as_echo_n "checking for $ac_word... " >&6; }
3829 if ${ac_cv_prog_CC+:} false; then :
3830   $as_echo_n "(cached) " >&6
3831 else
3832   if test -n "$CC"; then
3833   ac_cv_prog_CC="$CC" # Let the user override the test.
3834 else
3835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3836 for as_dir in $PATH
3837 do
3838   IFS=$as_save_IFS
3839   test -z "$as_dir" && as_dir=.
3840     for ac_exec_ext in '' $ac_executable_extensions; do
3841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3842     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3844     break 2
3845   fi
3846 done
3847   done
3848 IFS=$as_save_IFS
3849
3850 fi
3851 fi
3852 CC=$ac_cv_prog_CC
3853 if test -n "$CC"; then
3854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3855 $as_echo "$CC" >&6; }
3856 else
3857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858 $as_echo "no" >&6; }
3859 fi
3860
3861
3862     test -n "$CC" && break
3863   done
3864 fi
3865 if test -z "$CC"; then
3866   ac_ct_CC=$CC
3867   for ac_prog in $pgac_cc_list
3868 do
3869   # Extract the first word of "$ac_prog", so it can be a program name with args.
3870 set dummy $ac_prog; ac_word=$2
3871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3872 $as_echo_n "checking for $ac_word... " >&6; }
3873 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3874   $as_echo_n "(cached) " >&6
3875 else
3876   if test -n "$ac_ct_CC"; then
3877   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3878 else
3879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3880 for as_dir in $PATH
3881 do
3882   IFS=$as_save_IFS
3883   test -z "$as_dir" && as_dir=.
3884     for ac_exec_ext in '' $ac_executable_extensions; do
3885   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3886     ac_cv_prog_ac_ct_CC="$ac_prog"
3887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3888     break 2
3889   fi
3890 done
3891   done
3892 IFS=$as_save_IFS
3893
3894 fi
3895 fi
3896 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3897 if test -n "$ac_ct_CC"; then
3898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3899 $as_echo "$ac_ct_CC" >&6; }
3900 else
3901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3902 $as_echo "no" >&6; }
3903 fi
3904
3905
3906   test -n "$ac_ct_CC" && break
3907 done
3908
3909   if test "x$ac_ct_CC" = x; then
3910     CC=""
3911   else
3912     case $cross_compiling:$ac_tool_warned in
3913 yes:)
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3915 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3916 ac_tool_warned=yes ;;
3917 esac
3918     CC=$ac_ct_CC
3919   fi
3920 fi
3921
3922
3923 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3924 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3925 as_fn_error $? "no acceptable C compiler found in \$PATH
3926 See \`config.log' for more details" "$LINENO" 5; }
3927
3928 # Provide some information about the compiler.
3929 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3930 set X $ac_compile
3931 ac_compiler=$2
3932 for ac_option in --version -v -V -qversion; do
3933   { { ac_try="$ac_compiler $ac_option >&5"
3934 case "(($ac_try" in
3935   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936   *) ac_try_echo=$ac_try;;
3937 esac
3938 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3939 $as_echo "$ac_try_echo"; } >&5
3940   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3941   ac_status=$?
3942   if test -s conftest.err; then
3943     sed '10a\
3944 ... rest of stderr output deleted ...
3945          10q' conftest.err >conftest.er1
3946     cat conftest.er1 >&5
3947   fi
3948   rm -f conftest.er1 conftest.err
3949   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3950   test $ac_status = 0; }
3951 done
3952
3953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3954 /* end confdefs.h.  */
3955
3956 int
3957 main ()
3958 {
3959
3960   ;
3961   return 0;
3962 }
3963 _ACEOF
3964 ac_clean_files_save=$ac_clean_files
3965 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3966 # Try to create an executable without -o first, disregard a.out.
3967 # It will help us diagnose broken compilers, and finding out an intuition
3968 # of exeext.
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3970 $as_echo_n "checking whether the C compiler works... " >&6; }
3971 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3972
3973 # The possible output files:
3974 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3975
3976 ac_rmfiles=
3977 for ac_file in $ac_files
3978 do
3979   case $ac_file in
3980     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3981     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3982   esac
3983 done
3984 rm -f $ac_rmfiles
3985
3986 if { { ac_try="$ac_link_default"
3987 case "(($ac_try" in
3988   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3989   *) ac_try_echo=$ac_try;;
3990 esac
3991 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3992 $as_echo "$ac_try_echo"; } >&5
3993   (eval "$ac_link_default") 2>&5
3994   ac_status=$?
3995   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3996   test $ac_status = 0; }; then :
3997   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3998 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3999 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4000 # so that the user can short-circuit this test for compilers unknown to
4001 # Autoconf.
4002 for ac_file in $ac_files ''
4003 do
4004   test -f "$ac_file" || continue
4005   case $ac_file in
4006     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4007         ;;
4008     [ab].out )
4009         # We found the default executable, but exeext='' is most
4010         # certainly right.
4011         break;;
4012     *.* )
4013         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4014         then :; else
4015            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4016         fi
4017         # We set ac_cv_exeext here because the later test for it is not
4018         # safe: cross compilers may not add the suffix if given an `-o'
4019         # argument, so we may need to know it at that point already.
4020         # Even if this section looks crufty: it has the advantage of
4021         # actually working.
4022         break;;
4023     * )
4024         break;;
4025   esac
4026 done
4027 test "$ac_cv_exeext" = no && ac_cv_exeext=
4028
4029 else
4030   ac_file=''
4031 fi
4032 if test -z "$ac_file"; then :
4033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4034 $as_echo "no" >&6; }
4035 $as_echo "$as_me: failed program was:" >&5
4036 sed 's/^/| /' conftest.$ac_ext >&5
4037
4038 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4039 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4040 as_fn_error 77 "C compiler cannot create executables
4041 See \`config.log' for more details" "$LINENO" 5; }
4042 else
4043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4044 $as_echo "yes" >&6; }
4045 fi
4046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4047 $as_echo_n "checking for C compiler default output file name... " >&6; }
4048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4049 $as_echo "$ac_file" >&6; }
4050 ac_exeext=$ac_cv_exeext
4051
4052 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4053 ac_clean_files=$ac_clean_files_save
4054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4055 $as_echo_n "checking for suffix of executables... " >&6; }
4056 if { { ac_try="$ac_link"
4057 case "(($ac_try" in
4058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4059   *) ac_try_echo=$ac_try;;
4060 esac
4061 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4062 $as_echo "$ac_try_echo"; } >&5
4063   (eval "$ac_link") 2>&5
4064   ac_status=$?
4065   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4066   test $ac_status = 0; }; then :
4067   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4068 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4069 # work properly (i.e., refer to `conftest.exe'), while it won't with
4070 # `rm'.
4071 for ac_file in conftest.exe conftest conftest.*; do
4072   test -f "$ac_file" || continue
4073   case $ac_file in
4074     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4075     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4076           break;;
4077     * ) break;;
4078   esac
4079 done
4080 else
4081   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4082 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4083 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4084 See \`config.log' for more details" "$LINENO" 5; }
4085 fi
4086 rm -f conftest conftest$ac_cv_exeext
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4088 $as_echo "$ac_cv_exeext" >&6; }
4089
4090 rm -f conftest.$ac_ext
4091 EXEEXT=$ac_cv_exeext
4092 ac_exeext=$EXEEXT
4093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4094 /* end confdefs.h.  */
4095 #include <stdio.h>
4096 int
4097 main ()
4098 {
4099 FILE *f = fopen ("conftest.out", "w");
4100  return ferror (f) || fclose (f) != 0;
4101
4102   ;
4103   return 0;
4104 }
4105 _ACEOF
4106 ac_clean_files="$ac_clean_files conftest.out"
4107 # Check that the compiler produces executables we can run.  If not, either
4108 # the compiler is broken, or we cross compile.
4109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4110 $as_echo_n "checking whether we are cross compiling... " >&6; }
4111 if test "$cross_compiling" != yes; then
4112   { { ac_try="$ac_link"
4113 case "(($ac_try" in
4114   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4115   *) ac_try_echo=$ac_try;;
4116 esac
4117 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4118 $as_echo "$ac_try_echo"; } >&5
4119   (eval "$ac_link") 2>&5
4120   ac_status=$?
4121   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4122   test $ac_status = 0; }
4123   if { ac_try='./conftest$ac_cv_exeext'
4124   { { case "(($ac_try" in
4125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4126   *) ac_try_echo=$ac_try;;
4127 esac
4128 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4129 $as_echo "$ac_try_echo"; } >&5
4130   (eval "$ac_try") 2>&5
4131   ac_status=$?
4132   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4133   test $ac_status = 0; }; }; then
4134     cross_compiling=no
4135   else
4136     if test "$cross_compiling" = maybe; then
4137         cross_compiling=yes
4138     else
4139         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4140 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4141 as_fn_error $? "cannot run C compiled programs.
4142 If you meant to cross compile, use \`--host'.
4143 See \`config.log' for more details" "$LINENO" 5; }
4144     fi
4145   fi
4146 fi
4147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4148 $as_echo "$cross_compiling" >&6; }
4149
4150 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4151 ac_clean_files=$ac_clean_files_save
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4153 $as_echo_n "checking for suffix of object files... " >&6; }
4154 if ${ac_cv_objext+:} false; then :
4155   $as_echo_n "(cached) " >&6
4156 else
4157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4158 /* end confdefs.h.  */
4159
4160 int
4161 main ()
4162 {
4163
4164   ;
4165   return 0;
4166 }
4167 _ACEOF
4168 rm -f conftest.o conftest.obj
4169 if { { ac_try="$ac_compile"
4170 case "(($ac_try" in
4171   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4172   *) ac_try_echo=$ac_try;;
4173 esac
4174 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4175 $as_echo "$ac_try_echo"; } >&5
4176   (eval "$ac_compile") 2>&5
4177   ac_status=$?
4178   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4179   test $ac_status = 0; }; then :
4180   for ac_file in conftest.o conftest.obj conftest.*; do
4181   test -f "$ac_file" || continue;
4182   case $ac_file in
4183     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4184     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4185        break;;
4186   esac
4187 done
4188 else
4189   $as_echo "$as_me: failed program was:" >&5
4190 sed 's/^/| /' conftest.$ac_ext >&5
4191
4192 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4193 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4194 as_fn_error $? "cannot compute suffix of object files: cannot compile
4195 See \`config.log' for more details" "$LINENO" 5; }
4196 fi
4197 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4198 fi
4199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4200 $as_echo "$ac_cv_objext" >&6; }
4201 OBJEXT=$ac_cv_objext
4202 ac_objext=$OBJEXT
4203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4204 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4205 if ${ac_cv_c_compiler_gnu+:} false; then :
4206   $as_echo_n "(cached) " >&6
4207 else
4208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4209 /* end confdefs.h.  */
4210
4211 int
4212 main ()
4213 {
4214 #ifndef __GNUC__
4215        choke me
4216 #endif
4217
4218   ;
4219   return 0;
4220 }
4221 _ACEOF
4222 if ac_fn_c_try_compile "$LINENO"; then :
4223   ac_compiler_gnu=yes
4224 else
4225   ac_compiler_gnu=no
4226 fi
4227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4228 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4229
4230 fi
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4232 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4233 if test $ac_compiler_gnu = yes; then
4234   GCC=yes
4235 else
4236   GCC=
4237 fi
4238 ac_test_CFLAGS=${CFLAGS+set}
4239 ac_save_CFLAGS=$CFLAGS
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4241 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4242 if ${ac_cv_prog_cc_g+:} false; then :
4243   $as_echo_n "(cached) " >&6
4244 else
4245   ac_save_c_werror_flag=$ac_c_werror_flag
4246    ac_c_werror_flag=yes
4247    ac_cv_prog_cc_g=no
4248    CFLAGS="-g"
4249    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4250 /* end confdefs.h.  */
4251
4252 int
4253 main ()
4254 {
4255
4256   ;
4257   return 0;
4258 }
4259 _ACEOF
4260 if ac_fn_c_try_compile "$LINENO"; then :
4261   ac_cv_prog_cc_g=yes
4262 else
4263   CFLAGS=""
4264       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4265 /* end confdefs.h.  */
4266
4267 int
4268 main ()
4269 {
4270
4271   ;
4272   return 0;
4273 }
4274 _ACEOF
4275 if ac_fn_c_try_compile "$LINENO"; then :
4276
4277 else
4278   ac_c_werror_flag=$ac_save_c_werror_flag
4279          CFLAGS="-g"
4280          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4281 /* end confdefs.h.  */
4282
4283 int
4284 main ()
4285 {
4286
4287   ;
4288   return 0;
4289 }
4290 _ACEOF
4291 if ac_fn_c_try_compile "$LINENO"; then :
4292   ac_cv_prog_cc_g=yes
4293 fi
4294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4295 fi
4296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4297 fi
4298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4299    ac_c_werror_flag=$ac_save_c_werror_flag
4300 fi
4301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4302 $as_echo "$ac_cv_prog_cc_g" >&6; }
4303 if test "$ac_test_CFLAGS" = set; then
4304   CFLAGS=$ac_save_CFLAGS
4305 elif test $ac_cv_prog_cc_g = yes; then
4306   if test "$GCC" = yes; then
4307     CFLAGS="-g -O2"
4308   else
4309     CFLAGS="-g"
4310   fi
4311 else
4312   if test "$GCC" = yes; then
4313     CFLAGS="-O2"
4314   else
4315     CFLAGS=
4316   fi
4317 fi
4318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4319 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4320 if ${ac_cv_prog_cc_c89+:} false; then :
4321   $as_echo_n "(cached) " >&6
4322 else
4323   ac_cv_prog_cc_c89=no
4324 ac_save_CC=$CC
4325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4326 /* end confdefs.h.  */
4327 #include <stdarg.h>
4328 #include <stdio.h>
4329 struct stat;
4330 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4331 struct buf { int x; };
4332 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4333 static char *e (p, i)
4334      char **p;
4335      int i;
4336 {
4337   return p[i];
4338 }
4339 static char *f (char * (*g) (char **, int), char **p, ...)
4340 {
4341   char *s;
4342   va_list v;
4343   va_start (v,p);
4344   s = g (p, va_arg (v,int));
4345   va_end (v);
4346   return s;
4347 }
4348
4349 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4350    function prototypes and stuff, but not '\xHH' hex character constants.
4351    These don't provoke an error unfortunately, instead are silently treated
4352    as 'x'.  The following induces an error, until -std is added to get
4353    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4354    array size at least.  It's necessary to write '\x00'==0 to get something
4355    that's true only with -std.  */
4356 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4357
4358 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4359    inside strings and character constants.  */
4360 #define FOO(x) 'x'
4361 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4362
4363 int test (int i, double x);
4364 struct s1 {int (*f) (int a);};
4365 struct s2 {int (*f) (double a);};
4366 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4367 int argc;
4368 char **argv;
4369 int
4370 main ()
4371 {
4372 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4373   ;
4374   return 0;
4375 }
4376 _ACEOF
4377 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4378         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4379 do
4380   CC="$ac_save_CC $ac_arg"
4381   if ac_fn_c_try_compile "$LINENO"; then :
4382   ac_cv_prog_cc_c89=$ac_arg
4383 fi
4384 rm -f core conftest.err conftest.$ac_objext
4385   test "x$ac_cv_prog_cc_c89" != "xno" && break
4386 done
4387 rm -f conftest.$ac_ext
4388 CC=$ac_save_CC
4389
4390 fi
4391 # AC_CACHE_VAL
4392 case "x$ac_cv_prog_cc_c89" in
4393   x)
4394     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4395 $as_echo "none needed" >&6; } ;;
4396   xno)
4397     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4398 $as_echo "unsupported" >&6; } ;;
4399   *)
4400     CC="$CC $ac_cv_prog_cc_c89"
4401     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4402 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4403 esac
4404 if test "x$ac_cv_prog_cc_c89" != xno; then :
4405
4406 fi
4407
4408 ac_ext=c
4409 ac_cpp='$CPP $CPPFLAGS'
4410 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4411 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4412 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4413
4414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4415 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4416 if ${ac_cv_prog_cc_c99+:} false; then :
4417   $as_echo_n "(cached) " >&6
4418 else
4419   ac_cv_prog_cc_c99=no
4420 ac_save_CC=$CC
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422 /* end confdefs.h.  */
4423 #include <stdarg.h>
4424 #include <stdbool.h>
4425 #include <stdlib.h>
4426 #include <wchar.h>
4427 #include <stdio.h>
4428
4429 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4430 #define debug(...) fprintf (stderr, __VA_ARGS__)
4431 #define showlist(...) puts (#__VA_ARGS__)
4432 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4433 static void
4434 test_varargs_macros (void)
4435 {
4436   int x = 1234;
4437   int y = 5678;
4438   debug ("Flag");
4439   debug ("X = %d\n", x);
4440   showlist (The first, second, and third items.);
4441   report (x>y, "x is %d but y is %d", x, y);
4442 }
4443
4444 // Check long long types.
4445 #define BIG64 18446744073709551615ull
4446 #define BIG32 4294967295ul
4447 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4448 #if !BIG_OK
4449   your preprocessor is broken;
4450 #endif
4451 #if BIG_OK
4452 #else
4453   your preprocessor is broken;
4454 #endif
4455 static long long int bignum = -9223372036854775807LL;
4456 static unsigned long long int ubignum = BIG64;
4457
4458 struct incomplete_array
4459 {
4460   int datasize;
4461   double data[];
4462 };
4463
4464 struct named_init {
4465   int number;
4466   const wchar_t *name;
4467   double average;
4468 };
4469
4470 typedef const char *ccp;
4471
4472 static inline int
4473 test_restrict (ccp restrict text)
4474 {
4475   // See if C++-style comments work.
4476   // Iterate through items via the restricted pointer.
4477   // Also check for declarations in for loops.
4478   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4479     continue;
4480   return 0;
4481 }
4482
4483 // Check varargs and va_copy.
4484 static void
4485 test_varargs (const char *format, ...)
4486 {
4487   va_list args;
4488   va_start (args, format);
4489   va_list args_copy;
4490   va_copy (args_copy, args);
4491
4492   const char *str;
4493   int number;
4494   float fnumber;
4495
4496   while (*format)
4497     {
4498       switch (*format++)
4499         {
4500         case 's': // string
4501           str = va_arg (args_copy, const char *);
4502           break;
4503         case 'd': // int
4504           number = va_arg (args_copy, int);
4505           break;
4506         case 'f': // float
4507           fnumber = va_arg (args_copy, double);
4508           break;
4509         default:
4510           break;
4511         }
4512     }
4513   va_end (args_copy);
4514   va_end (args);
4515 }
4516
4517 int
4518 main ()
4519 {
4520
4521   // Check bool.
4522   _Bool success = false;
4523
4524   // Check restrict.
4525   if (test_restrict ("String literal") == 0)
4526     success = true;
4527   char *restrict newvar = "Another string";
4528
4529   // Check varargs.
4530   test_varargs ("s, d' f .", "string", 65, 34.234);
4531   test_varargs_macros ();
4532
4533   // Check flexible array members.
4534   struct incomplete_array *ia =
4535     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4536   ia->datasize = 10;
4537   for (int i = 0; i < ia->datasize; ++i)
4538     ia->data[i] = i * 1.234;
4539
4540   // Check named initializers.
4541   struct named_init ni = {
4542     .number = 34,
4543     .name = L"Test wide string",
4544     .average = 543.34343,
4545   };
4546
4547   ni.number = 58;
4548
4549   int dynamic_array[ni.number];
4550   dynamic_array[ni.number - 1] = 543;
4551
4552   // work around unused variable warnings
4553   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4554           || dynamic_array[ni.number - 1] != 543);
4555
4556   ;
4557   return 0;
4558 }
4559 _ACEOF
4560 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4561 do
4562   CC="$ac_save_CC $ac_arg"
4563   if ac_fn_c_try_compile "$LINENO"; then :
4564   ac_cv_prog_cc_c99=$ac_arg
4565 fi
4566 rm -f core conftest.err conftest.$ac_objext
4567   test "x$ac_cv_prog_cc_c99" != "xno" && break
4568 done
4569 rm -f conftest.$ac_ext
4570 CC=$ac_save_CC
4571
4572 fi
4573 # AC_CACHE_VAL
4574 case "x$ac_cv_prog_cc_c99" in
4575   x)
4576     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4577 $as_echo "none needed" >&6; } ;;
4578   xno)
4579     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4580 $as_echo "unsupported" >&6; } ;;
4581   *)
4582     CC="$CC $ac_cv_prog_cc_c99"
4583     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4584 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4585 esac
4586 if test "x$ac_cv_prog_cc_c99" != xno; then :
4587
4588 fi
4589
4590
4591
4592 # Error out if the compiler does not support C99, as the codebase
4593 # relies on that.
4594 if test "$ac_cv_prog_cc_c99" = no; then
4595     as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4596 fi
4597
4598 ac_ext=cpp
4599 ac_cpp='$CXXCPP $CPPFLAGS'
4600 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4601 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4602 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4603 if test -z "$CXX"; then
4604   if test -n "$CCC"; then
4605     CXX=$CCC
4606   else
4607     if test -n "$ac_tool_prefix"; then
4608   for ac_prog in $pgac_cxx_list
4609   do
4610     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4611 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4613 $as_echo_n "checking for $ac_word... " >&6; }
4614 if ${ac_cv_prog_CXX+:} false; then :
4615   $as_echo_n "(cached) " >&6
4616 else
4617   if test -n "$CXX"; then
4618   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4619 else
4620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4621 for as_dir in $PATH
4622 do
4623   IFS=$as_save_IFS
4624   test -z "$as_dir" && as_dir=.
4625     for ac_exec_ext in '' $ac_executable_extensions; do
4626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4627     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4629     break 2
4630   fi
4631 done
4632   done
4633 IFS=$as_save_IFS
4634
4635 fi
4636 fi
4637 CXX=$ac_cv_prog_CXX
4638 if test -n "$CXX"; then
4639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4640 $as_echo "$CXX" >&6; }
4641 else
4642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4643 $as_echo "no" >&6; }
4644 fi
4645
4646
4647     test -n "$CXX" && break
4648   done
4649 fi
4650 if test -z "$CXX"; then
4651   ac_ct_CXX=$CXX
4652   for ac_prog in $pgac_cxx_list
4653 do
4654   # Extract the first word of "$ac_prog", so it can be a program name with args.
4655 set dummy $ac_prog; ac_word=$2
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4657 $as_echo_n "checking for $ac_word... " >&6; }
4658 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4659   $as_echo_n "(cached) " >&6
4660 else
4661   if test -n "$ac_ct_CXX"; then
4662   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4663 else
4664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4665 for as_dir in $PATH
4666 do
4667   IFS=$as_save_IFS
4668   test -z "$as_dir" && as_dir=.
4669     for ac_exec_ext in '' $ac_executable_extensions; do
4670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4671     ac_cv_prog_ac_ct_CXX="$ac_prog"
4672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4673     break 2
4674   fi
4675 done
4676   done
4677 IFS=$as_save_IFS
4678
4679 fi
4680 fi
4681 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4682 if test -n "$ac_ct_CXX"; then
4683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4684 $as_echo "$ac_ct_CXX" >&6; }
4685 else
4686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4687 $as_echo "no" >&6; }
4688 fi
4689
4690
4691   test -n "$ac_ct_CXX" && break
4692 done
4693
4694   if test "x$ac_ct_CXX" = x; then
4695     CXX="g++"
4696   else
4697     case $cross_compiling:$ac_tool_warned in
4698 yes:)
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4700 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4701 ac_tool_warned=yes ;;
4702 esac
4703     CXX=$ac_ct_CXX
4704   fi
4705 fi
4706
4707   fi
4708 fi
4709 # Provide some information about the compiler.
4710 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4711 set X $ac_compile
4712 ac_compiler=$2
4713 for ac_option in --version -v -V -qversion; do
4714   { { ac_try="$ac_compiler $ac_option >&5"
4715 case "(($ac_try" in
4716   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4717   *) ac_try_echo=$ac_try;;
4718 esac
4719 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4720 $as_echo "$ac_try_echo"; } >&5
4721   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4722   ac_status=$?
4723   if test -s conftest.err; then
4724     sed '10a\
4725 ... rest of stderr output deleted ...
4726          10q' conftest.err >conftest.er1
4727     cat conftest.er1 >&5
4728   fi
4729   rm -f conftest.er1 conftest.err
4730   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4731   test $ac_status = 0; }
4732 done
4733
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4735 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4736 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4737   $as_echo_n "(cached) " >&6
4738 else
4739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4740 /* end confdefs.h.  */
4741
4742 int
4743 main ()
4744 {
4745 #ifndef __GNUC__
4746        choke me
4747 #endif
4748
4749   ;
4750   return 0;
4751 }
4752 _ACEOF
4753 if ac_fn_cxx_try_compile "$LINENO"; then :
4754   ac_compiler_gnu=yes
4755 else
4756   ac_compiler_gnu=no
4757 fi
4758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4759 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4760
4761 fi
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4763 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4764 if test $ac_compiler_gnu = yes; then
4765   GXX=yes
4766 else
4767   GXX=
4768 fi
4769 ac_test_CXXFLAGS=${CXXFLAGS+set}
4770 ac_save_CXXFLAGS=$CXXFLAGS
4771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4772 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4773 if ${ac_cv_prog_cxx_g+:} false; then :
4774   $as_echo_n "(cached) " >&6
4775 else
4776   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4777    ac_cxx_werror_flag=yes
4778    ac_cv_prog_cxx_g=no
4779    CXXFLAGS="-g"
4780    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4781 /* end confdefs.h.  */
4782
4783 int
4784 main ()
4785 {
4786
4787   ;
4788   return 0;
4789 }
4790 _ACEOF
4791 if ac_fn_cxx_try_compile "$LINENO"; then :
4792   ac_cv_prog_cxx_g=yes
4793 else
4794   CXXFLAGS=""
4795       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4796 /* end confdefs.h.  */
4797
4798 int
4799 main ()
4800 {
4801
4802   ;
4803   return 0;
4804 }
4805 _ACEOF
4806 if ac_fn_cxx_try_compile "$LINENO"; then :
4807
4808 else
4809   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4810          CXXFLAGS="-g"
4811          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4812 /* end confdefs.h.  */
4813
4814 int
4815 main ()
4816 {
4817
4818   ;
4819   return 0;
4820 }
4821 _ACEOF
4822 if ac_fn_cxx_try_compile "$LINENO"; then :
4823   ac_cv_prog_cxx_g=yes
4824 fi
4825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4826 fi
4827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4828 fi
4829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4830    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4831 fi
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4833 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4834 if test "$ac_test_CXXFLAGS" = set; then
4835   CXXFLAGS=$ac_save_CXXFLAGS
4836 elif test $ac_cv_prog_cxx_g = yes; then
4837   if test "$GXX" = yes; then
4838     CXXFLAGS="-g -O2"
4839   else
4840     CXXFLAGS="-g"
4841   fi
4842 else
4843   if test "$GXX" = yes; then
4844     CXXFLAGS="-O2"
4845   else
4846     CXXFLAGS=
4847   fi
4848 fi
4849 ac_ext=c
4850 ac_cpp='$CPP $CPPFLAGS'
4851 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4852 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4853 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4854
4855
4856 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4857 # but has idiosyncrasies of its own.  We assume icc will define
4858 # __INTEL_COMPILER regardless of CFLAGS.
4859
4860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4861 /* end confdefs.h.  */
4862
4863 int
4864 main ()
4865 {
4866 #ifndef __INTEL_COMPILER
4867 choke me
4868 #endif
4869   ;
4870   return 0;
4871 }
4872 _ACEOF
4873 if ac_fn_c_try_compile "$LINENO"; then :
4874   ICC=yes
4875 else
4876   ICC=no
4877 fi
4878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4879
4880 # Check if it's Sun Studio compiler. We assume that
4881 # __SUNPRO_C will be defined for Sun Studio compilers
4882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4883 /* end confdefs.h.  */
4884
4885 int
4886 main ()
4887 {
4888 #ifndef __SUNPRO_C
4889 choke me
4890 #endif
4891   ;
4892   return 0;
4893 }
4894 _ACEOF
4895 if ac_fn_c_try_compile "$LINENO"; then :
4896   SUN_STUDIO_CC=yes
4897 else
4898   SUN_STUDIO_CC=no
4899 fi
4900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4901
4902
4903
4904
4905 #
4906 # LLVM
4907 #
4908 # Checked early because subsequent tests depend on it.
4909
4910
4911
4912 # Check whether --with-llvm was given.
4913 if test "${with_llvm+set}" = set; then :
4914   withval=$with_llvm;
4915   case $withval in
4916     yes)
4917
4918 $as_echo "#define USE_LLVM 1" >>confdefs.h
4919
4920       ;;
4921     no)
4922       :
4923       ;;
4924     *)
4925       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4926       ;;
4927   esac
4928
4929 else
4930   with_llvm=no
4931
4932 fi
4933
4934
4935
4936 for ac_prog in gawk mawk nawk awk
4937 do
4938   # Extract the first word of "$ac_prog", so it can be a program name with args.
4939 set dummy $ac_prog; ac_word=$2
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4941 $as_echo_n "checking for $ac_word... " >&6; }
4942 if ${ac_cv_prog_AWK+:} false; then :
4943   $as_echo_n "(cached) " >&6
4944 else
4945   if test -n "$AWK"; then
4946   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4947 else
4948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4949 for as_dir in $PATH
4950 do
4951   IFS=$as_save_IFS
4952   test -z "$as_dir" && as_dir=.
4953     for ac_exec_ext in '' $ac_executable_extensions; do
4954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4955     ac_cv_prog_AWK="$ac_prog"
4956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4957     break 2
4958   fi
4959 done
4960   done
4961 IFS=$as_save_IFS
4962
4963 fi
4964 fi
4965 AWK=$ac_cv_prog_AWK
4966 if test -n "$AWK"; then
4967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4968 $as_echo "$AWK" >&6; }
4969 else
4970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971 $as_echo "no" >&6; }
4972 fi
4973
4974
4975   test -n "$AWK" && break
4976 done
4977
4978 if test "$with_llvm" = yes; then :
4979
4980
4981
4982
4983
4984   if test -z "$LLVM_CONFIG"; then
4985   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
4986 do
4987   # Extract the first word of "$ac_prog", so it can be a program name with args.
4988 set dummy $ac_prog; ac_word=$2
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4990 $as_echo_n "checking for $ac_word... " >&6; }
4991 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4992   $as_echo_n "(cached) " >&6
4993 else
4994   case $LLVM_CONFIG in
4995   [\\/]* | ?:[\\/]*)
4996   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
4997   ;;
4998   *)
4999   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5000 for as_dir in $PATH
5001 do
5002   IFS=$as_save_IFS
5003   test -z "$as_dir" && as_dir=.
5004     for ac_exec_ext in '' $ac_executable_extensions; do
5005   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5006     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5008     break 2
5009   fi
5010 done
5011   done
5012 IFS=$as_save_IFS
5013
5014   ;;
5015 esac
5016 fi
5017 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5018 if test -n "$LLVM_CONFIG"; then
5019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5020 $as_echo "$LLVM_CONFIG" >&6; }
5021 else
5022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5023 $as_echo "no" >&6; }
5024 fi
5025
5026
5027   test -n "$LLVM_CONFIG" && break
5028 done
5029
5030 else
5031   # Report the value of LLVM_CONFIG in configure's output in all cases.
5032   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5033 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5035 $as_echo "$LLVM_CONFIG" >&6; }
5036 fi
5037
5038
5039   # no point continuing if llvm wasn't found
5040   if test -z "$LLVM_CONFIG"; then
5041     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5042   fi
5043   # check if detected $LLVM_CONFIG is executable
5044   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5045   if test "x$pgac_llvm_version" = "xno"; then
5046     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5047   fi
5048   # and whether the version is supported
5049   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5050     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5051   fi
5052
5053   # need clang to create some bitcode files
5054
5055   if test -z "$CLANG"; then
5056   for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5057 do
5058   # Extract the first word of "$ac_prog", so it can be a program name with args.
5059 set dummy $ac_prog; ac_word=$2
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061 $as_echo_n "checking for $ac_word... " >&6; }
5062 if ${ac_cv_path_CLANG+:} false; then :
5063   $as_echo_n "(cached) " >&6
5064 else
5065   case $CLANG in
5066   [\\/]* | ?:[\\/]*)
5067   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5068   ;;
5069   *)
5070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071 for as_dir in $PATH
5072 do
5073   IFS=$as_save_IFS
5074   test -z "$as_dir" && as_dir=.
5075     for ac_exec_ext in '' $ac_executable_extensions; do
5076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5077     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079     break 2
5080   fi
5081 done
5082   done
5083 IFS=$as_save_IFS
5084
5085   ;;
5086 esac
5087 fi
5088 CLANG=$ac_cv_path_CLANG
5089 if test -n "$CLANG"; then
5090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5091 $as_echo "$CLANG" >&6; }
5092 else
5093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094 $as_echo "no" >&6; }
5095 fi
5096
5097
5098   test -n "$CLANG" && break
5099 done
5100
5101 else
5102   # Report the value of CLANG in configure's output in all cases.
5103   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5104 $as_echo_n "checking for CLANG... " >&6; }
5105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5106 $as_echo "$CLANG" >&6; }
5107 fi
5108
5109   if test -z "$CLANG"; then
5110     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5111   fi
5112   # make sure clang is executable
5113   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5114     as_fn_error $? "$CLANG does not work" "$LINENO" 5
5115   fi
5116   # Could check clang version, but it doesn't seem that
5117   # important. Systems with a new enough LLVM version are usually
5118   # going to have a decent clang version too. It's also not entirely
5119   # clear what the minimum version is.
5120
5121   # Collect compiler flags necessary to build the LLVM dependent
5122   # shared library.
5123   for pgac_option in `$LLVM_CONFIG --cppflags`; do
5124     case $pgac_option in
5125       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5126     esac
5127   done
5128
5129   for pgac_option in `$LLVM_CONFIG --ldflags`; do
5130     case $pgac_option in
5131       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5132     esac
5133   done
5134
5135   # ABI influencing options, standard influencing options
5136   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5137     case $pgac_option in
5138       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5139       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5140     esac
5141   done
5142
5143   # Look for components we're interested in, collect necessary
5144   # libs. As some components are optional, we can't just list all of
5145   # them as it'd raise an error.
5146   pgac_components='';
5147   for pgac_component in `$LLVM_CONFIG --components`; do
5148     case $pgac_component in
5149       engine) pgac_components="$pgac_components $pgac_component";;
5150       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5151       orcjit) pgac_components="$pgac_components $pgac_component";;
5152       passes) pgac_components="$pgac_components $pgac_component";;
5153       perfjitevents) pgac_components="$pgac_components $pgac_component";;
5154     esac
5155   done;
5156
5157   # And then get the libraries that need to be linked in for the
5158   # selected components.  They're large libraries, we only want to
5159   # link them into the LLVM using shared library.
5160   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5161     case $pgac_option in
5162       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5163     esac
5164   done
5165
5166   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176 fi # fi
5177
5178
5179 unset CFLAGS
5180 unset CXXFLAGS
5181
5182 #
5183 # Read the template
5184 #
5185 . "$srcdir/src/template/$template" || exit
5186
5187 # C[XX]FLAGS are selected so:
5188 # If the user specifies something in the environment, that is used.
5189 # else:  If the template file set something, that is used.
5190 # else:  If coverage was enabled, don't set anything.
5191 # else:  If the compiler is GCC, then we use -O2.
5192 # else:  If the compiler is something else, then we use -O, unless debugging.
5193
5194 if test "$ac_env_CFLAGS_set" = set; then
5195   CFLAGS=$ac_env_CFLAGS_value
5196 elif test "${CFLAGS+set}" = set; then
5197   : # (keep what template set)
5198 elif test "$enable_coverage" = yes; then
5199   : # no optimization by default
5200 elif test "$GCC" = yes; then
5201   CFLAGS="-O2"
5202 else
5203   # if the user selected debug mode, don't use -O
5204   if test "$enable_debug" != yes; then
5205     CFLAGS="-O"
5206   fi
5207 fi
5208
5209 if test "$ac_env_CXXFLAGS_set" = set; then
5210   CXXFLAGS=$ac_env_CXXFLAGS_value
5211 elif test "${CXXFLAGS+set}" = set; then
5212   : # (keep what template set)
5213 elif test "$enable_coverage" = yes; then
5214   : # no optimization by default
5215 elif test "$GCC" = yes; then
5216   CXXFLAGS="-O2"
5217 else
5218   # if the user selected debug mode, don't use -O
5219   if test "$enable_debug" != yes; then
5220     CXXFLAGS="-O"
5221   fi
5222 fi
5223
5224 # When generating bitcode (for inlining) we always want to use -O2
5225 # even when --enable-debug is specified. The bitcode it's not going to
5226 # be used for line-by-line debugging, and JIT inlining doesn't work
5227 # without at least -O1 (otherwise clang will emit 'noinline'
5228 # attributes everywhere), which is bad for testing.  Still allow the
5229 # environment to override if done explicitly.
5230 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5231   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5232 else
5233   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5234 fi
5235 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5236   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5237 else
5238   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5239 fi
5240
5241 # C[XX]FLAGS we determined above will be added back at the end
5242 user_CFLAGS=$CFLAGS
5243 CFLAGS=""
5244 user_CXXFLAGS=$CXXFLAGS
5245 CXXFLAGS=""
5246 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5247 BITCODE_CFLAGS=""
5248 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5249 BITCODE_CXXFLAGS=""
5250
5251 # set CFLAGS_VECTOR from the environment, if available
5252 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5253   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5254 fi
5255
5256 # Some versions of GCC support some additional useful warning flags.
5257 # Check whether they are supported, and add them to CFLAGS if so.
5258 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5259 # but has its own.  Also check other compiler-specific flags here.
5260
5261 if test "$GCC" = yes -a "$ICC" = no; then
5262   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5263   CXXFLAGS="-Wall -Wpointer-arith"
5264   # These work in some but not all gcc versions
5265   save_CFLAGS=$CFLAGS
5266
5267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5268 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5269 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5270   $as_echo_n "(cached) " >&6
5271 else
5272   pgac_save_CFLAGS=$CFLAGS
5273 pgac_save_CC=$CC
5274 CC=${CC}
5275 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5276 ac_save_c_werror_flag=$ac_c_werror_flag
5277 ac_c_werror_flag=yes
5278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5279 /* end confdefs.h.  */
5280
5281 int
5282 main ()
5283 {
5284
5285   ;
5286   return 0;
5287 }
5288 _ACEOF
5289 if ac_fn_c_try_compile "$LINENO"; then :
5290   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5291 else
5292   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5293 fi
5294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5295 ac_c_werror_flag=$ac_save_c_werror_flag
5296 CFLAGS="$pgac_save_CFLAGS"
5297 CC="$pgac_save_CC"
5298 fi
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5300 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5301 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5302   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5303 fi
5304
5305
5306   # -Wdeclaration-after-statement isn't applicable for C++.  Specific C files
5307   # disable it, so AC_SUBST the negative form.
5308   PERMIT_DECLARATION_AFTER_STATEMENT=
5309   if test x"save_$CFLAGS" != x"$CFLAGS"; then
5310     PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5311   fi
5312
5313   # Really don't want VLAs to be used in our dialect of C
5314
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5316 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5317 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5318   $as_echo_n "(cached) " >&6
5319 else
5320   pgac_save_CFLAGS=$CFLAGS
5321 pgac_save_CC=$CC
5322 CC=${CC}
5323 CFLAGS="${CFLAGS} -Werror=vla"
5324 ac_save_c_werror_flag=$ac_c_werror_flag
5325 ac_c_werror_flag=yes
5326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5327 /* end confdefs.h.  */
5328
5329 int
5330 main ()
5331 {
5332
5333   ;
5334   return 0;
5335 }
5336 _ACEOF
5337 if ac_fn_c_try_compile "$LINENO"; then :
5338   pgac_cv_prog_CC_cflags__Werror_vla=yes
5339 else
5340   pgac_cv_prog_CC_cflags__Werror_vla=no
5341 fi
5342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5343 ac_c_werror_flag=$ac_save_c_werror_flag
5344 CFLAGS="$pgac_save_CFLAGS"
5345 CC="$pgac_save_CC"
5346 fi
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5348 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5349 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5350   CFLAGS="${CFLAGS} -Werror=vla"
5351 fi
5352
5353
5354   # -Wvla is not applicable for C++
5355
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5357 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5358 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5359   $as_echo_n "(cached) " >&6
5360 else
5361   pgac_save_CFLAGS=$CFLAGS
5362 pgac_save_CC=$CC
5363 CC=${CC}
5364 CFLAGS="${CFLAGS} -Wendif-labels"
5365 ac_save_c_werror_flag=$ac_c_werror_flag
5366 ac_c_werror_flag=yes
5367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5368 /* end confdefs.h.  */
5369
5370 int
5371 main ()
5372 {
5373
5374   ;
5375   return 0;
5376 }
5377 _ACEOF
5378 if ac_fn_c_try_compile "$LINENO"; then :
5379   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5380 else
5381   pgac_cv_prog_CC_cflags__Wendif_labels=no
5382 fi
5383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5384 ac_c_werror_flag=$ac_save_c_werror_flag
5385 CFLAGS="$pgac_save_CFLAGS"
5386 CC="$pgac_save_CC"
5387 fi
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5389 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5390 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5391   CFLAGS="${CFLAGS} -Wendif-labels"
5392 fi
5393
5394
5395   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5396 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5397 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5398   $as_echo_n "(cached) " >&6
5399 else
5400   pgac_save_CXXFLAGS=$CXXFLAGS
5401 pgac_save_CXX=$CXX
5402 CXX=${CXX}
5403 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5404 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5405 ac_cxx_werror_flag=yes
5406 ac_ext=cpp
5407 ac_cpp='$CXXCPP $CPPFLAGS'
5408 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5409 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5410 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5411
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5413 /* end confdefs.h.  */
5414
5415 int
5416 main ()
5417 {
5418
5419   ;
5420   return 0;
5421 }
5422 _ACEOF
5423 if ac_fn_cxx_try_compile "$LINENO"; then :
5424   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5425 else
5426   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5427 fi
5428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5429 ac_ext=c
5430 ac_cpp='$CPP $CPPFLAGS'
5431 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5432 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5433 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5434
5435 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5436 CXXFLAGS="$pgac_save_CXXFLAGS"
5437 CXX="$pgac_save_CXX"
5438 fi
5439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5440 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5441 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5442   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5443 fi
5444
5445
5446
5447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5448 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5449 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5450   $as_echo_n "(cached) " >&6
5451 else
5452   pgac_save_CFLAGS=$CFLAGS
5453 pgac_save_CC=$CC
5454 CC=${CC}
5455 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5456 ac_save_c_werror_flag=$ac_c_werror_flag
5457 ac_c_werror_flag=yes
5458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5459 /* end confdefs.h.  */
5460
5461 int
5462 main ()
5463 {
5464
5465   ;
5466   return 0;
5467 }
5468 _ACEOF
5469 if ac_fn_c_try_compile "$LINENO"; then :
5470   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5471 else
5472   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5473 fi
5474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5475 ac_c_werror_flag=$ac_save_c_werror_flag
5476 CFLAGS="$pgac_save_CFLAGS"
5477 CC="$pgac_save_CC"
5478 fi
5479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5480 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5481 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5482   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5483 fi
5484
5485
5486   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5487 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5488 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5489   $as_echo_n "(cached) " >&6
5490 else
5491   pgac_save_CXXFLAGS=$CXXFLAGS
5492 pgac_save_CXX=$CXX
5493 CXX=${CXX}
5494 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5495 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5496 ac_cxx_werror_flag=yes
5497 ac_ext=cpp
5498 ac_cpp='$CXXCPP $CPPFLAGS'
5499 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5500 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5501 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5502
5503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5504 /* end confdefs.h.  */
5505
5506 int
5507 main ()
5508 {
5509
5510   ;
5511   return 0;
5512 }
5513 _ACEOF
5514 if ac_fn_cxx_try_compile "$LINENO"; then :
5515   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5516 else
5517   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5518 fi
5519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5520 ac_ext=c
5521 ac_cpp='$CPP $CPPFLAGS'
5522 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5523 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5524 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5525
5526 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5527 CXXFLAGS="$pgac_save_CXXFLAGS"
5528 CXX="$pgac_save_CXX"
5529 fi
5530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5531 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5532 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5533   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5534 fi
5535
5536
5537   # This was included in -Wall/-Wformat in older GCC versions
5538
5539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5540 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5541 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5542   $as_echo_n "(cached) " >&6
5543 else
5544   pgac_save_CFLAGS=$CFLAGS
5545 pgac_save_CC=$CC
5546 CC=${CC}
5547 CFLAGS="${CFLAGS} -Wformat-security"
5548 ac_save_c_werror_flag=$ac_c_werror_flag
5549 ac_c_werror_flag=yes
5550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5551 /* end confdefs.h.  */
5552
5553 int
5554 main ()
5555 {
5556
5557   ;
5558   return 0;
5559 }
5560 _ACEOF
5561 if ac_fn_c_try_compile "$LINENO"; then :
5562   pgac_cv_prog_CC_cflags__Wformat_security=yes
5563 else
5564   pgac_cv_prog_CC_cflags__Wformat_security=no
5565 fi
5566 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5567 ac_c_werror_flag=$ac_save_c_werror_flag
5568 CFLAGS="$pgac_save_CFLAGS"
5569 CC="$pgac_save_CC"
5570 fi
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5572 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5573 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5574   CFLAGS="${CFLAGS} -Wformat-security"
5575 fi
5576
5577
5578   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5579 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5580 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5581   $as_echo_n "(cached) " >&6
5582 else
5583   pgac_save_CXXFLAGS=$CXXFLAGS
5584 pgac_save_CXX=$CXX
5585 CXX=${CXX}
5586 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5587 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5588 ac_cxx_werror_flag=yes
5589 ac_ext=cpp
5590 ac_cpp='$CXXCPP $CPPFLAGS'
5591 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5592 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5593 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5594
5595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5596 /* end confdefs.h.  */
5597
5598 int
5599 main ()
5600 {
5601
5602   ;
5603   return 0;
5604 }
5605 _ACEOF
5606 if ac_fn_cxx_try_compile "$LINENO"; then :
5607   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5608 else
5609   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5610 fi
5611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5612 ac_ext=c
5613 ac_cpp='$CPP $CPPFLAGS'
5614 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5615 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5616 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5617
5618 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5619 CXXFLAGS="$pgac_save_CXXFLAGS"
5620 CXX="$pgac_save_CXX"
5621 fi
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5623 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5624 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5625   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5626 fi
5627
5628
5629   # Disable strict-aliasing rules; needed for gcc 3.3+
5630
5631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5632 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5633 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5634   $as_echo_n "(cached) " >&6
5635 else
5636   pgac_save_CFLAGS=$CFLAGS
5637 pgac_save_CC=$CC
5638 CC=${CC}
5639 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5640 ac_save_c_werror_flag=$ac_c_werror_flag
5641 ac_c_werror_flag=yes
5642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5643 /* end confdefs.h.  */
5644
5645 int
5646 main ()
5647 {
5648
5649   ;
5650   return 0;
5651 }
5652 _ACEOF
5653 if ac_fn_c_try_compile "$LINENO"; then :
5654   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5655 else
5656   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5657 fi
5658 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5659 ac_c_werror_flag=$ac_save_c_werror_flag
5660 CFLAGS="$pgac_save_CFLAGS"
5661 CC="$pgac_save_CC"
5662 fi
5663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5664 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5665 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5666   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5667 fi
5668
5669
5670   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5671 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5672 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5673   $as_echo_n "(cached) " >&6
5674 else
5675   pgac_save_CXXFLAGS=$CXXFLAGS
5676 pgac_save_CXX=$CXX
5677 CXX=${CXX}
5678 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5679 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5680 ac_cxx_werror_flag=yes
5681 ac_ext=cpp
5682 ac_cpp='$CXXCPP $CPPFLAGS'
5683 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5684 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5685 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5686
5687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5688 /* end confdefs.h.  */
5689
5690 int
5691 main ()
5692 {
5693
5694   ;
5695   return 0;
5696 }
5697 _ACEOF
5698 if ac_fn_cxx_try_compile "$LINENO"; then :
5699   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5700 else
5701   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5702 fi
5703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5704 ac_ext=c
5705 ac_cpp='$CPP $CPPFLAGS'
5706 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5707 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5708 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5709
5710 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5711 CXXFLAGS="$pgac_save_CXXFLAGS"
5712 CXX="$pgac_save_CXX"
5713 fi
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5715 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5716 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5717   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5718 fi
5719
5720
5721   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5722
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5724 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5725 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5726   $as_echo_n "(cached) " >&6
5727 else
5728   pgac_save_CFLAGS=$CFLAGS
5729 pgac_save_CC=$CC
5730 CC=${CC}
5731 CFLAGS="${CFLAGS} -fwrapv"
5732 ac_save_c_werror_flag=$ac_c_werror_flag
5733 ac_c_werror_flag=yes
5734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5735 /* end confdefs.h.  */
5736
5737 int
5738 main ()
5739 {
5740
5741   ;
5742   return 0;
5743 }
5744 _ACEOF
5745 if ac_fn_c_try_compile "$LINENO"; then :
5746   pgac_cv_prog_CC_cflags__fwrapv=yes
5747 else
5748   pgac_cv_prog_CC_cflags__fwrapv=no
5749 fi
5750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5751 ac_c_werror_flag=$ac_save_c_werror_flag
5752 CFLAGS="$pgac_save_CFLAGS"
5753 CC="$pgac_save_CC"
5754 fi
5755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5756 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5757 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5758   CFLAGS="${CFLAGS} -fwrapv"
5759 fi
5760
5761
5762   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5763 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5764 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5765   $as_echo_n "(cached) " >&6
5766 else
5767   pgac_save_CXXFLAGS=$CXXFLAGS
5768 pgac_save_CXX=$CXX
5769 CXX=${CXX}
5770 CXXFLAGS="${CXXFLAGS} -fwrapv"
5771 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5772 ac_cxx_werror_flag=yes
5773 ac_ext=cpp
5774 ac_cpp='$CXXCPP $CPPFLAGS'
5775 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5776 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5777 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5778
5779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5780 /* end confdefs.h.  */
5781
5782 int
5783 main ()
5784 {
5785
5786   ;
5787   return 0;
5788 }
5789 _ACEOF
5790 if ac_fn_cxx_try_compile "$LINENO"; then :
5791   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5792 else
5793   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5794 fi
5795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5796 ac_ext=c
5797 ac_cpp='$CPP $CPPFLAGS'
5798 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5799 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5800 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5801
5802 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5803 CXXFLAGS="$pgac_save_CXXFLAGS"
5804 CXX="$pgac_save_CXX"
5805 fi
5806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5807 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5808 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5809   CXXFLAGS="${CXXFLAGS} -fwrapv"
5810 fi
5811
5812
5813   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5814
5815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5816 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5817 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5818   $as_echo_n "(cached) " >&6
5819 else
5820   pgac_save_CFLAGS=$CFLAGS
5821 pgac_save_CC=$CC
5822 CC=${CC}
5823 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5824 ac_save_c_werror_flag=$ac_c_werror_flag
5825 ac_c_werror_flag=yes
5826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5827 /* end confdefs.h.  */
5828
5829 int
5830 main ()
5831 {
5832
5833   ;
5834   return 0;
5835 }
5836 _ACEOF
5837 if ac_fn_c_try_compile "$LINENO"; then :
5838   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5839 else
5840   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5841 fi
5842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5843 ac_c_werror_flag=$ac_save_c_werror_flag
5844 CFLAGS="$pgac_save_CFLAGS"
5845 CC="$pgac_save_CC"
5846 fi
5847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5848 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5849 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5850   CFLAGS="${CFLAGS} -fexcess-precision=standard"
5851 fi
5852
5853
5854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5855 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5856 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5857   $as_echo_n "(cached) " >&6
5858 else
5859   pgac_save_CXXFLAGS=$CXXFLAGS
5860 pgac_save_CXX=$CXX
5861 CXX=${CXX}
5862 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5863 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5864 ac_cxx_werror_flag=yes
5865 ac_ext=cpp
5866 ac_cpp='$CXXCPP $CPPFLAGS'
5867 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5868 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5869 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5870
5871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5872 /* end confdefs.h.  */
5873
5874 int
5875 main ()
5876 {
5877
5878   ;
5879   return 0;
5880 }
5881 _ACEOF
5882 if ac_fn_cxx_try_compile "$LINENO"; then :
5883   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5884 else
5885   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5886 fi
5887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5888 ac_ext=c
5889 ac_cpp='$CPP $CPPFLAGS'
5890 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5891 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5892 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5893
5894 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5895 CXXFLAGS="$pgac_save_CXXFLAGS"
5896 CXX="$pgac_save_CXX"
5897 fi
5898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5899 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5900 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5901   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5902 fi
5903
5904
5905   # Optimization flags for specific files that benefit from vectorization
5906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5907 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5908 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5909   $as_echo_n "(cached) " >&6
5910 else
5911   pgac_save_CFLAGS=$CFLAGS
5912 pgac_save_CC=$CC
5913 CC=${CC}
5914 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5915 ac_save_c_werror_flag=$ac_c_werror_flag
5916 ac_c_werror_flag=yes
5917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5918 /* end confdefs.h.  */
5919
5920 int
5921 main ()
5922 {
5923
5924   ;
5925   return 0;
5926 }
5927 _ACEOF
5928 if ac_fn_c_try_compile "$LINENO"; then :
5929   pgac_cv_prog_CC_cflags__funroll_loops=yes
5930 else
5931   pgac_cv_prog_CC_cflags__funroll_loops=no
5932 fi
5933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5934 ac_c_werror_flag=$ac_save_c_werror_flag
5935 CFLAGS="$pgac_save_CFLAGS"
5936 CC="$pgac_save_CC"
5937 fi
5938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5939 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5940 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5941   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5942 fi
5943
5944
5945   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5946 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5947 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5948   $as_echo_n "(cached) " >&6
5949 else
5950   pgac_save_CFLAGS=$CFLAGS
5951 pgac_save_CC=$CC
5952 CC=${CC}
5953 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5954 ac_save_c_werror_flag=$ac_c_werror_flag
5955 ac_c_werror_flag=yes
5956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5957 /* end confdefs.h.  */
5958
5959 int
5960 main ()
5961 {
5962
5963   ;
5964   return 0;
5965 }
5966 _ACEOF
5967 if ac_fn_c_try_compile "$LINENO"; then :
5968   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5969 else
5970   pgac_cv_prog_CC_cflags__ftree_vectorize=no
5971 fi
5972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5973 ac_c_werror_flag=$ac_save_c_werror_flag
5974 CFLAGS="$pgac_save_CFLAGS"
5975 CC="$pgac_save_CC"
5976 fi
5977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5978 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5979 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5980   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5981 fi
5982
5983
5984   # We want to suppress clang's unhelpful unused-command-line-argument warnings
5985   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5986   # test for the positive form and if that works, add the negative form
5987   NOT_THE_CFLAGS=""
5988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5989 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5990 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
5991   $as_echo_n "(cached) " >&6
5992 else
5993   pgac_save_CFLAGS=$CFLAGS
5994 pgac_save_CC=$CC
5995 CC=${CC}
5996 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5997 ac_save_c_werror_flag=$ac_c_werror_flag
5998 ac_c_werror_flag=yes
5999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6000 /* end confdefs.h.  */
6001
6002 int
6003 main ()
6004 {
6005
6006   ;
6007   return 0;
6008 }
6009 _ACEOF
6010 if ac_fn_c_try_compile "$LINENO"; then :
6011   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6012 else
6013   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6014 fi
6015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6016 ac_c_werror_flag=$ac_save_c_werror_flag
6017 CFLAGS="$pgac_save_CFLAGS"
6018 CC="$pgac_save_CC"
6019 fi
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6021 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6022 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6023   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6024 fi
6025
6026
6027   if test -n "$NOT_THE_CFLAGS"; then
6028     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6029   fi
6030   # Similarly disable useless truncation warnings from gcc 8+
6031   NOT_THE_CFLAGS=""
6032   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6033 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6034 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6035   $as_echo_n "(cached) " >&6
6036 else
6037   pgac_save_CFLAGS=$CFLAGS
6038 pgac_save_CC=$CC
6039 CC=${CC}
6040 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6041 ac_save_c_werror_flag=$ac_c_werror_flag
6042 ac_c_werror_flag=yes
6043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6044 /* end confdefs.h.  */
6045
6046 int
6047 main ()
6048 {
6049
6050   ;
6051   return 0;
6052 }
6053 _ACEOF
6054 if ac_fn_c_try_compile "$LINENO"; then :
6055   pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6056 else
6057   pgac_cv_prog_CC_cflags__Wformat_truncation=no
6058 fi
6059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6060 ac_c_werror_flag=$ac_save_c_werror_flag
6061 CFLAGS="$pgac_save_CFLAGS"
6062 CC="$pgac_save_CC"
6063 fi
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6065 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6066 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6067   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6068 fi
6069
6070
6071   if test -n "$NOT_THE_CFLAGS"; then
6072     CFLAGS="$CFLAGS -Wno-format-truncation"
6073   fi
6074   NOT_THE_CFLAGS=""
6075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6076 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6077 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6078   $as_echo_n "(cached) " >&6
6079 else
6080   pgac_save_CFLAGS=$CFLAGS
6081 pgac_save_CC=$CC
6082 CC=${CC}
6083 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6084 ac_save_c_werror_flag=$ac_c_werror_flag
6085 ac_c_werror_flag=yes
6086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6087 /* end confdefs.h.  */
6088
6089 int
6090 main ()
6091 {
6092
6093   ;
6094   return 0;
6095 }
6096 _ACEOF
6097 if ac_fn_c_try_compile "$LINENO"; then :
6098   pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6099 else
6100   pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6101 fi
6102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6103 ac_c_werror_flag=$ac_save_c_werror_flag
6104 CFLAGS="$pgac_save_CFLAGS"
6105 CC="$pgac_save_CC"
6106 fi
6107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6108 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6109 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6110   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6111 fi
6112
6113
6114   if test -n "$NOT_THE_CFLAGS"; then
6115     CFLAGS="$CFLAGS -Wno-stringop-truncation"
6116   fi
6117 elif test "$ICC" = yes; then
6118   # Intel's compiler has a bug/misoptimization in checking for
6119   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6120
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6122 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6123 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6124   $as_echo_n "(cached) " >&6
6125 else
6126   pgac_save_CFLAGS=$CFLAGS
6127 pgac_save_CC=$CC
6128 CC=${CC}
6129 CFLAGS="${CFLAGS} -mp1"
6130 ac_save_c_werror_flag=$ac_c_werror_flag
6131 ac_c_werror_flag=yes
6132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6133 /* end confdefs.h.  */
6134
6135 int
6136 main ()
6137 {
6138
6139   ;
6140   return 0;
6141 }
6142 _ACEOF
6143 if ac_fn_c_try_compile "$LINENO"; then :
6144   pgac_cv_prog_CC_cflags__mp1=yes
6145 else
6146   pgac_cv_prog_CC_cflags__mp1=no
6147 fi
6148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6149 ac_c_werror_flag=$ac_save_c_werror_flag
6150 CFLAGS="$pgac_save_CFLAGS"
6151 CC="$pgac_save_CC"
6152 fi
6153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6154 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6155 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6156   CFLAGS="${CFLAGS} -mp1"
6157 fi
6158
6159
6160   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6161 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6162 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6163   $as_echo_n "(cached) " >&6
6164 else
6165   pgac_save_CXXFLAGS=$CXXFLAGS
6166 pgac_save_CXX=$CXX
6167 CXX=${CXX}
6168 CXXFLAGS="${CXXFLAGS} -mp1"
6169 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6170 ac_cxx_werror_flag=yes
6171 ac_ext=cpp
6172 ac_cpp='$CXXCPP $CPPFLAGS'
6173 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6174 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6175 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6176
6177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6178 /* end confdefs.h.  */
6179
6180 int
6181 main ()
6182 {
6183
6184   ;
6185   return 0;
6186 }
6187 _ACEOF
6188 if ac_fn_cxx_try_compile "$LINENO"; then :
6189   pgac_cv_prog_CXX_cxxflags__mp1=yes
6190 else
6191   pgac_cv_prog_CXX_cxxflags__mp1=no
6192 fi
6193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6194 ac_ext=c
6195 ac_cpp='$CPP $CPPFLAGS'
6196 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6197 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6198 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6199
6200 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6201 CXXFLAGS="$pgac_save_CXXFLAGS"
6202 CXX="$pgac_save_CXX"
6203 fi
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6205 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6206 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6207   CXXFLAGS="${CXXFLAGS} -mp1"
6208 fi
6209
6210
6211   # Make sure strict aliasing is off (though this is said to be the default)
6212
6213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6214 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6215 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6216   $as_echo_n "(cached) " >&6
6217 else
6218   pgac_save_CFLAGS=$CFLAGS
6219 pgac_save_CC=$CC
6220 CC=${CC}
6221 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6222 ac_save_c_werror_flag=$ac_c_werror_flag
6223 ac_c_werror_flag=yes
6224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6225 /* end confdefs.h.  */
6226
6227 int
6228 main ()
6229 {
6230
6231   ;
6232   return 0;
6233 }
6234 _ACEOF
6235 if ac_fn_c_try_compile "$LINENO"; then :
6236   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6237 else
6238   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6239 fi
6240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6241 ac_c_werror_flag=$ac_save_c_werror_flag
6242 CFLAGS="$pgac_save_CFLAGS"
6243 CC="$pgac_save_CC"
6244 fi
6245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6246 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6247 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6248   CFLAGS="${CFLAGS} -fno-strict-aliasing"
6249 fi
6250
6251
6252   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6253 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6254 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6255   $as_echo_n "(cached) " >&6
6256 else
6257   pgac_save_CXXFLAGS=$CXXFLAGS
6258 pgac_save_CXX=$CXX
6259 CXX=${CXX}
6260 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6261 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6262 ac_cxx_werror_flag=yes
6263 ac_ext=cpp
6264 ac_cpp='$CXXCPP $CPPFLAGS'
6265 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6266 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6267 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6268
6269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6270 /* end confdefs.h.  */
6271
6272 int
6273 main ()
6274 {
6275
6276   ;
6277   return 0;
6278 }
6279 _ACEOF
6280 if ac_fn_cxx_try_compile "$LINENO"; then :
6281   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6282 else
6283   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6284 fi
6285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6286 ac_ext=c
6287 ac_cpp='$CPP $CPPFLAGS'
6288 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6289 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6290 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6291
6292 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6293 CXXFLAGS="$pgac_save_CXXFLAGS"
6294 CXX="$pgac_save_CXX"
6295 fi
6296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6297 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6298 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6299   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6300 fi
6301
6302
6303 elif test "$PORTNAME" = "aix"; then
6304   # AIX's xlc has to have strict aliasing turned off too
6305
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6307 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6308 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6309   $as_echo_n "(cached) " >&6
6310 else
6311   pgac_save_CFLAGS=$CFLAGS
6312 pgac_save_CC=$CC
6313 CC=${CC}
6314 CFLAGS="${CFLAGS} -qnoansialias"
6315 ac_save_c_werror_flag=$ac_c_werror_flag
6316 ac_c_werror_flag=yes
6317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6318 /* end confdefs.h.  */
6319
6320 int
6321 main ()
6322 {
6323
6324   ;
6325   return 0;
6326 }
6327 _ACEOF
6328 if ac_fn_c_try_compile "$LINENO"; then :
6329   pgac_cv_prog_CC_cflags__qnoansialias=yes
6330 else
6331   pgac_cv_prog_CC_cflags__qnoansialias=no
6332 fi
6333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6334 ac_c_werror_flag=$ac_save_c_werror_flag
6335 CFLAGS="$pgac_save_CFLAGS"
6336 CC="$pgac_save_CC"
6337 fi
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6339 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6340 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6341   CFLAGS="${CFLAGS} -qnoansialias"
6342 fi
6343
6344
6345   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6346 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6347 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6348   $as_echo_n "(cached) " >&6
6349 else
6350   pgac_save_CXXFLAGS=$CXXFLAGS
6351 pgac_save_CXX=$CXX
6352 CXX=${CXX}
6353 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6354 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6355 ac_cxx_werror_flag=yes
6356 ac_ext=cpp
6357 ac_cpp='$CXXCPP $CPPFLAGS'
6358 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6359 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6360 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6361
6362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6363 /* end confdefs.h.  */
6364
6365 int
6366 main ()
6367 {
6368
6369   ;
6370   return 0;
6371 }
6372 _ACEOF
6373 if ac_fn_cxx_try_compile "$LINENO"; then :
6374   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6375 else
6376   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6377 fi
6378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6379 ac_ext=c
6380 ac_cpp='$CPP $CPPFLAGS'
6381 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6382 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6383 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6384
6385 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6386 CXXFLAGS="$pgac_save_CXXFLAGS"
6387 CXX="$pgac_save_CXX"
6388 fi
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6390 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6391 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6392   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6393 fi
6394
6395
6396
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6398 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6399 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6400   $as_echo_n "(cached) " >&6
6401 else
6402   pgac_save_CFLAGS=$CFLAGS
6403 pgac_save_CC=$CC
6404 CC=${CC}
6405 CFLAGS="${CFLAGS} -qlonglong"
6406 ac_save_c_werror_flag=$ac_c_werror_flag
6407 ac_c_werror_flag=yes
6408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6409 /* end confdefs.h.  */
6410
6411 int
6412 main ()
6413 {
6414
6415   ;
6416   return 0;
6417 }
6418 _ACEOF
6419 if ac_fn_c_try_compile "$LINENO"; then :
6420   pgac_cv_prog_CC_cflags__qlonglong=yes
6421 else
6422   pgac_cv_prog_CC_cflags__qlonglong=no
6423 fi
6424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6425 ac_c_werror_flag=$ac_save_c_werror_flag
6426 CFLAGS="$pgac_save_CFLAGS"
6427 CC="$pgac_save_CC"
6428 fi
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6430 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6431 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6432   CFLAGS="${CFLAGS} -qlonglong"
6433 fi
6434
6435
6436   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6437 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6438 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6439   $as_echo_n "(cached) " >&6
6440 else
6441   pgac_save_CXXFLAGS=$CXXFLAGS
6442 pgac_save_CXX=$CXX
6443 CXX=${CXX}
6444 CXXFLAGS="${CXXFLAGS} -qlonglong"
6445 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6446 ac_cxx_werror_flag=yes
6447 ac_ext=cpp
6448 ac_cpp='$CXXCPP $CPPFLAGS'
6449 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6450 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6451 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6452
6453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6454 /* end confdefs.h.  */
6455
6456 int
6457 main ()
6458 {
6459
6460   ;
6461   return 0;
6462 }
6463 _ACEOF
6464 if ac_fn_cxx_try_compile "$LINENO"; then :
6465   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6466 else
6467   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6468 fi
6469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6470 ac_ext=c
6471 ac_cpp='$CPP $CPPFLAGS'
6472 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6473 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6474 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6475
6476 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6477 CXXFLAGS="$pgac_save_CXXFLAGS"
6478 CXX="$pgac_save_CXX"
6479 fi
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6481 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6482 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6483   CXXFLAGS="${CXXFLAGS} -qlonglong"
6484 fi
6485
6486
6487 elif test "$PORTNAME" = "hpux"; then
6488   # On some versions of HP-UX, libm functions do not set errno by default.
6489   # Fix that by using +Olibmerrno if the compiler recognizes it.
6490
6491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6492 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6493 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6494   $as_echo_n "(cached) " >&6
6495 else
6496   pgac_save_CFLAGS=$CFLAGS
6497 pgac_save_CC=$CC
6498 CC=${CC}
6499 CFLAGS="${CFLAGS} +Olibmerrno"
6500 ac_save_c_werror_flag=$ac_c_werror_flag
6501 ac_c_werror_flag=yes
6502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6503 /* end confdefs.h.  */
6504
6505 int
6506 main ()
6507 {
6508
6509   ;
6510   return 0;
6511 }
6512 _ACEOF
6513 if ac_fn_c_try_compile "$LINENO"; then :
6514   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6515 else
6516   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6517 fi
6518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6519 ac_c_werror_flag=$ac_save_c_werror_flag
6520 CFLAGS="$pgac_save_CFLAGS"
6521 CC="$pgac_save_CC"
6522 fi
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6524 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6525 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6526   CFLAGS="${CFLAGS} +Olibmerrno"
6527 fi
6528
6529
6530   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6531 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6532 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6533   $as_echo_n "(cached) " >&6
6534 else
6535   pgac_save_CXXFLAGS=$CXXFLAGS
6536 pgac_save_CXX=$CXX
6537 CXX=${CXX}
6538 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6539 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6540 ac_cxx_werror_flag=yes
6541 ac_ext=cpp
6542 ac_cpp='$CXXCPP $CPPFLAGS'
6543 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6544 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6545 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6546
6547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6548 /* end confdefs.h.  */
6549
6550 int
6551 main ()
6552 {
6553
6554   ;
6555   return 0;
6556 }
6557 _ACEOF
6558 if ac_fn_cxx_try_compile "$LINENO"; then :
6559   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6560 else
6561   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6562 fi
6563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6564 ac_ext=c
6565 ac_cpp='$CPP $CPPFLAGS'
6566 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6567 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6568 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6569
6570 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6571 CXXFLAGS="$pgac_save_CXXFLAGS"
6572 CXX="$pgac_save_CXX"
6573 fi
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6575 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6576 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6577   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6578 fi
6579
6580
6581 fi
6582
6583 CFLAGS_VECTOR=$CFLAGS_VECTOR
6584
6585
6586 # Determine flags used to emit bitcode for JIT inlining. Need to test
6587 # for behaviour changing compiler flags, to keep compatibility with
6588 # compiler used for normal postgres code.
6589 if test "$with_llvm" = yes ; then
6590   CLANGXX="$CLANG -xc++"
6591
6592   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6593 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6594 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6595   $as_echo_n "(cached) " >&6
6596 else
6597   pgac_save_CFLAGS=$CFLAGS
6598 pgac_save_CC=$CC
6599 CC=${CLANG}
6600 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6601 ac_save_c_werror_flag=$ac_c_werror_flag
6602 ac_c_werror_flag=yes
6603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6604 /* end confdefs.h.  */
6605
6606 int
6607 main ()
6608 {
6609
6610   ;
6611   return 0;
6612 }
6613 _ACEOF
6614 if ac_fn_c_try_compile "$LINENO"; then :
6615   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6616 else
6617   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6618 fi
6619 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6620 ac_c_werror_flag=$ac_save_c_werror_flag
6621 CFLAGS="$pgac_save_CFLAGS"
6622 CC="$pgac_save_CC"
6623 fi
6624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6625 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6626 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6627   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6628 fi
6629
6630   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6631 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6632 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6633   $as_echo_n "(cached) " >&6
6634 else
6635   pgac_save_CXXFLAGS=$CXXFLAGS
6636 pgac_save_CXX=$CXX
6637 CXX=${CLANGXX}
6638 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6639 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6640 ac_cxx_werror_flag=yes
6641 ac_ext=cpp
6642 ac_cpp='$CXXCPP $CPPFLAGS'
6643 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6644 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6645 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6646
6647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6648 /* end confdefs.h.  */
6649
6650 int
6651 main ()
6652 {
6653
6654   ;
6655   return 0;
6656 }
6657 _ACEOF
6658 if ac_fn_cxx_try_compile "$LINENO"; then :
6659   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6660 else
6661   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6662 fi
6663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6664 ac_ext=c
6665 ac_cpp='$CPP $CPPFLAGS'
6666 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6667 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6668 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6669
6670 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6671 CXXFLAGS="$pgac_save_CXXFLAGS"
6672 CXX="$pgac_save_CXX"
6673 fi
6674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6675 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6676 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6677   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6678 fi
6679
6680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6681 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6682 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6683   $as_echo_n "(cached) " >&6
6684 else
6685   pgac_save_CFLAGS=$CFLAGS
6686 pgac_save_CC=$CC
6687 CC=${CLANG}
6688 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6689 ac_save_c_werror_flag=$ac_c_werror_flag
6690 ac_c_werror_flag=yes
6691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6692 /* end confdefs.h.  */
6693
6694 int
6695 main ()
6696 {
6697
6698   ;
6699   return 0;
6700 }
6701 _ACEOF
6702 if ac_fn_c_try_compile "$LINENO"; then :
6703   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6704 else
6705   pgac_cv_prog_CLANG_cflags__fwrapv=no
6706 fi
6707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6708 ac_c_werror_flag=$ac_save_c_werror_flag
6709 CFLAGS="$pgac_save_CFLAGS"
6710 CC="$pgac_save_CC"
6711 fi
6712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6713 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6714 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6715   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6716 fi
6717
6718   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6719 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6720 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6721   $as_echo_n "(cached) " >&6
6722 else
6723   pgac_save_CXXFLAGS=$CXXFLAGS
6724 pgac_save_CXX=$CXX
6725 CXX=${CLANGXX}
6726 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6727 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6728 ac_cxx_werror_flag=yes
6729 ac_ext=cpp
6730 ac_cpp='$CXXCPP $CPPFLAGS'
6731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6734
6735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6736 /* end confdefs.h.  */
6737
6738 int
6739 main ()
6740 {
6741
6742   ;
6743   return 0;
6744 }
6745 _ACEOF
6746 if ac_fn_cxx_try_compile "$LINENO"; then :
6747   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6748 else
6749   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6750 fi
6751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6752 ac_ext=c
6753 ac_cpp='$CPP $CPPFLAGS'
6754 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6755 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6756 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6757
6758 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6759 CXXFLAGS="$pgac_save_CXXFLAGS"
6760 CXX="$pgac_save_CXX"
6761 fi
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6763 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6764 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6765   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6766 fi
6767
6768   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6769 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6770 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6771   $as_echo_n "(cached) " >&6
6772 else
6773   pgac_save_CFLAGS=$CFLAGS
6774 pgac_save_CC=$CC
6775 CC=${CLANG}
6776 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6777 ac_save_c_werror_flag=$ac_c_werror_flag
6778 ac_c_werror_flag=yes
6779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6780 /* end confdefs.h.  */
6781
6782 int
6783 main ()
6784 {
6785
6786   ;
6787   return 0;
6788 }
6789 _ACEOF
6790 if ac_fn_c_try_compile "$LINENO"; then :
6791   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6792 else
6793   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6794 fi
6795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6796 ac_c_werror_flag=$ac_save_c_werror_flag
6797 CFLAGS="$pgac_save_CFLAGS"
6798 CC="$pgac_save_CC"
6799 fi
6800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6801 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6802 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6803   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6804 fi
6805
6806   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6807 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6808 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6809   $as_echo_n "(cached) " >&6
6810 else
6811   pgac_save_CXXFLAGS=$CXXFLAGS
6812 pgac_save_CXX=$CXX
6813 CXX=${CLANGXX}
6814 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6815 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6816 ac_cxx_werror_flag=yes
6817 ac_ext=cpp
6818 ac_cpp='$CXXCPP $CPPFLAGS'
6819 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6820 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6821 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6822
6823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6824 /* end confdefs.h.  */
6825
6826 int
6827 main ()
6828 {
6829
6830   ;
6831   return 0;
6832 }
6833 _ACEOF
6834 if ac_fn_cxx_try_compile "$LINENO"; then :
6835   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6836 else
6837   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6838 fi
6839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6840 ac_ext=c
6841 ac_cpp='$CPP $CPPFLAGS'
6842 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6843 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6844 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6845
6846 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6847 CXXFLAGS="$pgac_save_CXXFLAGS"
6848 CXX="$pgac_save_CXX"
6849 fi
6850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6851 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6852 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6853   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6854 fi
6855
6856 fi
6857
6858 # supply -g if --enable-debug
6859 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6860   CFLAGS="$CFLAGS -g"
6861 fi
6862
6863 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6864   CXXFLAGS="$CXXFLAGS -g"
6865 fi
6866
6867 # enable code coverage if --enable-coverage
6868 if test "$enable_coverage" = yes; then
6869   if test "$GCC" = yes; then
6870     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6871     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6872   else
6873     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6874   fi
6875 fi
6876
6877 # enable profiling if --enable-profiling
6878 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6879   if test "$GCC" = yes; then
6880
6881 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6882
6883     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6884     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6885   else
6886     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6887   fi
6888 fi
6889
6890 # We already have this in Makefile.win32, but configure needs it too
6891 if test "$PORTNAME" = "win32"; then
6892   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6893 fi
6894
6895 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6896 # user-specified flags (if any) at the end.  This lets users override
6897 # the automatic additions.
6898 CFLAGS="$CFLAGS $user_CFLAGS"
6899 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6900 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6901 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6902
6903 BITCODE_CFLAGS=$BITCODE_CFLAGS
6904
6905 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6906
6907
6908 # Check if the compiler still works with the final flag settings
6909 # (note, we're not checking that for CXX, which is optional)
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6911 $as_echo_n "checking whether the C compiler still works... " >&6; }
6912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6913 /* end confdefs.h.  */
6914
6915 int
6916 main ()
6917 {
6918 return 0;
6919   ;
6920   return 0;
6921 }
6922 _ACEOF
6923 if ac_fn_c_try_link "$LINENO"; then :
6924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6925 $as_echo "yes" >&6; }
6926 else
6927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6928 $as_echo "no" >&6; }
6929    as_fn_error $? "cannot proceed" "$LINENO" 5
6930 fi
6931 rm -f core conftest.err conftest.$ac_objext \
6932     conftest$ac_exeext conftest.$ac_ext
6933
6934 # Defend against gcc -ffast-math
6935 if test "$GCC" = yes; then
6936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6937 /* end confdefs.h.  */
6938
6939 int
6940 main ()
6941 {
6942 #ifdef __FAST_MATH__
6943 choke me
6944 #endif
6945   ;
6946   return 0;
6947 }
6948 _ACEOF
6949 if ac_fn_c_try_compile "$LINENO"; then :
6950
6951 else
6952   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6953 fi
6954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6955 fi
6956
6957 # Defend against clang being used on x86-32 without SSE2 enabled.  As current
6958 # versions of clang do not understand -fexcess-precision=standard, the use of
6959 # x87 floating point operations leads to problems like isinf possibly returning
6960 # false for a value that is infinite when converted from the 80bit register to
6961 # the 8byte memory representation.
6962 #
6963 # Only perform the test if the compiler doesn't understand
6964 # -fexcess-precision=standard, that way a potentially fixed compiler will work
6965 # automatically.
6966 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
6967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6968 /* end confdefs.h.  */
6969
6970 int
6971 main ()
6972 {
6973
6974 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
6975 choke me
6976 #endif
6977
6978   ;
6979   return 0;
6980 }
6981 _ACEOF
6982 if ac_fn_c_try_compile "$LINENO"; then :
6983
6984 else
6985   as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
6986 fi
6987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6988 fi
6989
6990 ac_ext=c
6991 ac_cpp='$CPP $CPPFLAGS'
6992 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6993 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6994 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6996 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6997 # On Suns, sometimes $CPP names a directory.
6998 if test -n "$CPP" && test -d "$CPP"; then
6999   CPP=
7000 fi
7001 if test -z "$CPP"; then
7002   if ${ac_cv_prog_CPP+:} false; then :
7003   $as_echo_n "(cached) " >&6
7004 else
7005       # Double quotes because CPP needs to be expanded
7006     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7007     do
7008       ac_preproc_ok=false
7009 for ac_c_preproc_warn_flag in '' yes
7010 do
7011   # Use a header file that comes with gcc, so configuring glibc
7012   # with a fresh cross-compiler works.
7013   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7014   # <limits.h> exists even on freestanding compilers.
7015   # On the NeXT, cc -E runs the code through the compiler's parser,
7016   # not just through cpp. "Syntax error" is here to catch this case.
7017   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7018 /* end confdefs.h.  */
7019 #ifdef __STDC__
7020 # include <limits.h>
7021 #else
7022 # include <assert.h>
7023 #endif
7024                      Syntax error
7025 _ACEOF
7026 if ac_fn_c_try_cpp "$LINENO"; then :
7027
7028 else
7029   # Broken: fails on valid input.
7030 continue
7031 fi
7032 rm -f conftest.err conftest.i conftest.$ac_ext
7033
7034   # OK, works on sane cases.  Now check whether nonexistent headers
7035   # can be detected and how.
7036   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7037 /* end confdefs.h.  */
7038 #include <ac_nonexistent.h>
7039 _ACEOF
7040 if ac_fn_c_try_cpp "$LINENO"; then :
7041   # Broken: success on invalid input.
7042 continue
7043 else
7044   # Passes both tests.
7045 ac_preproc_ok=:
7046 break
7047 fi
7048 rm -f conftest.err conftest.i conftest.$ac_ext
7049
7050 done
7051 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7052 rm -f conftest.i conftest.err conftest.$ac_ext
7053 if $ac_preproc_ok; then :
7054   break
7055 fi
7056
7057     done
7058     ac_cv_prog_CPP=$CPP
7059
7060 fi
7061   CPP=$ac_cv_prog_CPP
7062 else
7063   ac_cv_prog_CPP=$CPP
7064 fi
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7066 $as_echo "$CPP" >&6; }
7067 ac_preproc_ok=false
7068 for ac_c_preproc_warn_flag in '' yes
7069 do
7070   # Use a header file that comes with gcc, so configuring glibc
7071   # with a fresh cross-compiler works.
7072   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7073   # <limits.h> exists even on freestanding compilers.
7074   # On the NeXT, cc -E runs the code through the compiler's parser,
7075   # not just through cpp. "Syntax error" is here to catch this case.
7076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7077 /* end confdefs.h.  */
7078 #ifdef __STDC__
7079 # include <limits.h>
7080 #else
7081 # include <assert.h>
7082 #endif
7083                      Syntax error
7084 _ACEOF
7085 if ac_fn_c_try_cpp "$LINENO"; then :
7086
7087 else
7088   # Broken: fails on valid input.
7089 continue
7090 fi
7091 rm -f conftest.err conftest.i conftest.$ac_ext
7092
7093   # OK, works on sane cases.  Now check whether nonexistent headers
7094   # can be detected and how.
7095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7096 /* end confdefs.h.  */
7097 #include <ac_nonexistent.h>
7098 _ACEOF
7099 if ac_fn_c_try_cpp "$LINENO"; then :
7100   # Broken: success on invalid input.
7101 continue
7102 else
7103   # Passes both tests.
7104 ac_preproc_ok=:
7105 break
7106 fi
7107 rm -f conftest.err conftest.i conftest.$ac_ext
7108
7109 done
7110 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7111 rm -f conftest.i conftest.err conftest.$ac_ext
7112 if $ac_preproc_ok; then :
7113
7114 else
7115   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7116 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7117 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7118 See \`config.log' for more details" "$LINENO" 5; }
7119 fi
7120
7121 ac_ext=c
7122 ac_cpp='$CPP $CPPFLAGS'
7123 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7124 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7125 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7126
7127
7128
7129
7130 #
7131 # Set up TAS assembly code if needed; the template file has now had its
7132 # chance to request this.
7133 #
7134 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7135
7136
7137 if test "$need_tas" = yes ; then
7138   TAS=tas.o
7139 else
7140   TAS=""
7141 fi
7142
7143
7144
7145 #
7146 # Automatic dependency tracking
7147 #
7148
7149
7150 # Check whether --enable-depend was given.
7151 if test "${enable_depend+set}" = set; then :
7152   enableval=$enable_depend;
7153   case $enableval in
7154     yes)
7155       autodepend=yes
7156       ;;
7157     no)
7158       :
7159       ;;
7160     *)
7161       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7162       ;;
7163   esac
7164
7165 else
7166   enable_depend=no
7167
7168 fi
7169
7170
7171
7172
7173
7174 #
7175 # Enable assert checks
7176 #
7177
7178
7179 # Check whether --enable-cassert was given.
7180 if test "${enable_cassert+set}" = set; then :
7181   enableval=$enable_cassert;
7182   case $enableval in
7183     yes)
7184
7185 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7186
7187       ;;
7188     no)
7189       :
7190       ;;
7191     *)
7192       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7193       ;;
7194   esac
7195
7196 else
7197   enable_cassert=no
7198
7199 fi
7200
7201
7202
7203
7204 #
7205 # Include directories
7206 #
7207 ac_save_IFS=$IFS
7208 IFS="${IFS}${PATH_SEPARATOR}"
7209 # SRCH_INC comes from the template file
7210 for dir in $with_includes $SRCH_INC; do
7211   if test -d "$dir"; then
7212     INCLUDES="$INCLUDES -I$dir"
7213   else
7214     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7215 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7216   fi
7217 done
7218 IFS=$ac_save_IFS
7219
7220
7221
7222 #
7223 # Library directories
7224 #
7225 ac_save_IFS=$IFS
7226 IFS="${IFS}${PATH_SEPARATOR}"
7227 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7228 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7229   if test -d "$dir"; then
7230     LIBDIRS="$LIBDIRS -L$dir"
7231   else
7232     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7233 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7234   fi
7235 done
7236 IFS=$ac_save_IFS
7237
7238 #
7239 # Enable thread-safe client libraries
7240 #
7241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7242 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7243
7244
7245 # Check whether --enable-thread-safety was given.
7246 if test "${enable_thread_safety+set}" = set; then :
7247   enableval=$enable_thread_safety;
7248   case $enableval in
7249     yes)
7250       :
7251       ;;
7252     no)
7253       :
7254       ;;
7255     *)
7256       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7257       ;;
7258   esac
7259
7260 else
7261   enable_thread_safety=yes
7262
7263 fi
7264
7265
7266 if test "$enable_thread_safety" = yes; then
7267
7268 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7269
7270 fi
7271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7272 $as_echo "$enable_thread_safety" >&6; }
7273
7274
7275 #
7276 # ICU
7277 #
7278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7279 $as_echo_n "checking whether to build with ICU support... " >&6; }
7280
7281
7282
7283 # Check whether --with-icu was given.
7284 if test "${with_icu+set}" = set; then :
7285   withval=$with_icu;
7286   case $withval in
7287     yes)
7288
7289 $as_echo "#define USE_ICU 1" >>confdefs.h
7290
7291       ;;
7292     no)
7293       :
7294       ;;
7295     *)
7296       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7297       ;;
7298   esac
7299
7300 else
7301   with_icu=no
7302
7303 fi
7304
7305
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7307 $as_echo "$with_icu" >&6; }
7308
7309
7310 if test "$with_icu" = yes; then
7311
7312
7313
7314
7315
7316
7317
7318 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7319         if test -n "$ac_tool_prefix"; then
7320   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7321 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7323 $as_echo_n "checking for $ac_word... " >&6; }
7324 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7325   $as_echo_n "(cached) " >&6
7326 else
7327   case $PKG_CONFIG in
7328   [\\/]* | ?:[\\/]*)
7329   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7330   ;;
7331   *)
7332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7333 for as_dir in $PATH
7334 do
7335   IFS=$as_save_IFS
7336   test -z "$as_dir" && as_dir=.
7337     for ac_exec_ext in '' $ac_executable_extensions; do
7338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7339     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7341     break 2
7342   fi
7343 done
7344   done
7345 IFS=$as_save_IFS
7346
7347   ;;
7348 esac
7349 fi
7350 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7351 if test -n "$PKG_CONFIG"; then
7352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7353 $as_echo "$PKG_CONFIG" >&6; }
7354 else
7355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356 $as_echo "no" >&6; }
7357 fi
7358
7359
7360 fi
7361 if test -z "$ac_cv_path_PKG_CONFIG"; then
7362   ac_pt_PKG_CONFIG=$PKG_CONFIG
7363   # Extract the first word of "pkg-config", so it can be a program name with args.
7364 set dummy pkg-config; ac_word=$2
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7366 $as_echo_n "checking for $ac_word... " >&6; }
7367 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7368   $as_echo_n "(cached) " >&6
7369 else
7370   case $ac_pt_PKG_CONFIG in
7371   [\\/]* | ?:[\\/]*)
7372   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7373   ;;
7374   *)
7375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7376 for as_dir in $PATH
7377 do
7378   IFS=$as_save_IFS
7379   test -z "$as_dir" && as_dir=.
7380     for ac_exec_ext in '' $ac_executable_extensions; do
7381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7382     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7384     break 2
7385   fi
7386 done
7387   done
7388 IFS=$as_save_IFS
7389
7390   ;;
7391 esac
7392 fi
7393 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7394 if test -n "$ac_pt_PKG_CONFIG"; then
7395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7396 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7397 else
7398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7399 $as_echo "no" >&6; }
7400 fi
7401
7402   if test "x$ac_pt_PKG_CONFIG" = x; then
7403     PKG_CONFIG=""
7404   else
7405     case $cross_compiling:$ac_tool_warned in
7406 yes:)
7407 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7408 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7409 ac_tool_warned=yes ;;
7410 esac
7411     PKG_CONFIG=$ac_pt_PKG_CONFIG
7412   fi
7413 else
7414   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7415 fi
7416
7417 fi
7418 if test -n "$PKG_CONFIG"; then
7419         _pkg_min_version=0.9.0
7420         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7421 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7422         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7423                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7424 $as_echo "yes" >&6; }
7425         else
7426                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7427 $as_echo "no" >&6; }
7428                 PKG_CONFIG=""
7429         fi
7430 fi
7431
7432 pkg_failed=no
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7434 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7435
7436 if test -n "$ICU_CFLAGS"; then
7437     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7438  elif test -n "$PKG_CONFIG"; then
7439     if test -n "$PKG_CONFIG" && \
7440     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7441   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7442   ac_status=$?
7443   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7444   test $ac_status = 0; }; then
7445   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7446                       test "x$?" != "x0" && pkg_failed=yes
7447 else
7448   pkg_failed=yes
7449 fi
7450  else
7451     pkg_failed=untried
7452 fi
7453 if test -n "$ICU_LIBS"; then
7454     pkg_cv_ICU_LIBS="$ICU_LIBS"
7455  elif test -n "$PKG_CONFIG"; then
7456     if test -n "$PKG_CONFIG" && \
7457     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7458   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7459   ac_status=$?
7460   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7461   test $ac_status = 0; }; then
7462   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7463                       test "x$?" != "x0" && pkg_failed=yes
7464 else
7465   pkg_failed=yes
7466 fi
7467  else
7468     pkg_failed=untried
7469 fi
7470
7471
7472
7473 if test $pkg_failed = yes; then
7474         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7475 $as_echo "no" >&6; }
7476
7477 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7478         _pkg_short_errors_supported=yes
7479 else
7480         _pkg_short_errors_supported=no
7481 fi
7482         if test $_pkg_short_errors_supported = yes; then
7483                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7484         else
7485                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7486         fi
7487         # Put the nasty error message in config.log where it belongs
7488         echo "$ICU_PKG_ERRORS" >&5
7489
7490         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7491
7492 $ICU_PKG_ERRORS
7493
7494 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7495 installed software in a non-standard prefix.
7496
7497 Alternatively, you may set the environment variables ICU_CFLAGS
7498 and ICU_LIBS to avoid the need to call pkg-config.
7499 See the pkg-config man page for more details." "$LINENO" 5
7500 elif test $pkg_failed = untried; then
7501         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502 $as_echo "no" >&6; }
7503         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7504 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7505 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7506 is in your PATH or set the PKG_CONFIG environment variable to the full
7507 path to pkg-config.
7508
7509 Alternatively, you may set the environment variables ICU_CFLAGS
7510 and ICU_LIBS to avoid the need to call pkg-config.
7511 See the pkg-config man page for more details.
7512
7513 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7514 See \`config.log' for more details" "$LINENO" 5; }
7515 else
7516         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7517         ICU_LIBS=$pkg_cv_ICU_LIBS
7518         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7519 $as_echo "yes" >&6; }
7520
7521 fi
7522 fi
7523
7524 #
7525 # Optionally build Tcl modules (PL/Tcl)
7526 #
7527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7528 $as_echo_n "checking whether to build with Tcl... " >&6; }
7529
7530
7531
7532 # Check whether --with-tcl was given.
7533 if test "${with_tcl+set}" = set; then :
7534   withval=$with_tcl;
7535   case $withval in
7536     yes)
7537       :
7538       ;;
7539     no)
7540       :
7541       ;;
7542     *)
7543       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7544       ;;
7545   esac
7546
7547 else
7548   with_tcl=no
7549
7550 fi
7551
7552
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7554 $as_echo "$with_tcl" >&6; }
7555
7556
7557 # We see if the path to the Tcl/Tk configuration scripts is specified.
7558 # This will override the use of tclsh to find the paths to search.
7559
7560
7561
7562
7563 # Check whether --with-tclconfig was given.
7564 if test "${with_tclconfig+set}" = set; then :
7565   withval=$with_tclconfig;
7566   case $withval in
7567     yes)
7568       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7569       ;;
7570     no)
7571       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7572       ;;
7573     *)
7574
7575       ;;
7576   esac
7577
7578 fi
7579
7580
7581
7582 #
7583 # Optionally build Perl modules (PL/Perl)
7584 #
7585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7586 $as_echo_n "checking whether to build Perl modules... " >&6; }
7587
7588
7589
7590 # Check whether --with-perl was given.
7591 if test "${with_perl+set}" = set; then :
7592   withval=$with_perl;
7593   case $withval in
7594     yes)
7595       :
7596       ;;
7597     no)
7598       :
7599       ;;
7600     *)
7601       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7602       ;;
7603   esac
7604
7605 else
7606   with_perl=no
7607
7608 fi
7609
7610
7611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7612 $as_echo "$with_perl" >&6; }
7613
7614
7615 #
7616 # Optionally build Python modules (PL/Python)
7617 #
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7619 $as_echo_n "checking whether to build Python modules... " >&6; }
7620
7621
7622
7623 # Check whether --with-python was given.
7624 if test "${with_python+set}" = set; then :
7625   withval=$with_python;
7626   case $withval in
7627     yes)
7628       :
7629       ;;
7630     no)
7631       :
7632       ;;
7633     *)
7634       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7635       ;;
7636   esac
7637
7638 else
7639   with_python=no
7640
7641 fi
7642
7643
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7645 $as_echo "$with_python" >&6; }
7646
7647
7648 #
7649 # GSSAPI
7650 #
7651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7652 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7653
7654
7655
7656 # Check whether --with-gssapi was given.
7657 if test "${with_gssapi+set}" = set; then :
7658   withval=$with_gssapi;
7659   case $withval in
7660     yes)
7661
7662
7663 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7664
7665   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7666
7667       ;;
7668     no)
7669       :
7670       ;;
7671     *)
7672       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7673       ;;
7674   esac
7675
7676 else
7677   with_gssapi=no
7678
7679 fi
7680
7681
7682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7683 $as_echo "$with_gssapi" >&6; }
7684
7685
7686
7687
7688
7689
7690 #
7691 # Kerberos configuration parameters
7692 #
7693
7694
7695
7696 # Check whether --with-krb-srvnam was given.
7697 if test "${with_krb_srvnam+set}" = set; then :
7698   withval=$with_krb_srvnam;
7699   case $withval in
7700     yes)
7701       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7702       ;;
7703     no)
7704       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7705       ;;
7706     *)
7707
7708       ;;
7709   esac
7710
7711 else
7712   with_krb_srvnam="postgres"
7713 fi
7714
7715
7716
7717
7718 cat >>confdefs.h <<_ACEOF
7719 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7720 _ACEOF
7721
7722
7723
7724 #
7725 # PAM
7726 #
7727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7728 $as_echo_n "checking whether to build with PAM support... " >&6; }
7729
7730
7731
7732 # Check whether --with-pam was given.
7733 if test "${with_pam+set}" = set; then :
7734   withval=$with_pam;
7735   case $withval in
7736     yes)
7737
7738 $as_echo "#define USE_PAM 1" >>confdefs.h
7739
7740       ;;
7741     no)
7742       :
7743       ;;
7744     *)
7745       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7746       ;;
7747   esac
7748
7749 else
7750   with_pam=no
7751
7752 fi
7753
7754
7755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7756 $as_echo "$with_pam" >&6; }
7757
7758
7759 #
7760 # BSD AUTH
7761 #
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7763 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7764
7765
7766
7767 # Check whether --with-bsd-auth was given.
7768 if test "${with_bsd_auth+set}" = set; then :
7769   withval=$with_bsd_auth;
7770   case $withval in
7771     yes)
7772
7773 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7774
7775       ;;
7776     no)
7777       :
7778       ;;
7779     *)
7780       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7781       ;;
7782   esac
7783
7784 else
7785   with_bsd_auth=no
7786
7787 fi
7788
7789
7790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7791 $as_echo "$with_bsd_auth" >&6; }
7792
7793
7794 #
7795 # LDAP
7796 #
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7798 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7799
7800
7801
7802 # Check whether --with-ldap was given.
7803 if test "${with_ldap+set}" = set; then :
7804   withval=$with_ldap;
7805   case $withval in
7806     yes)
7807
7808 $as_echo "#define USE_LDAP 1" >>confdefs.h
7809
7810       ;;
7811     no)
7812       :
7813       ;;
7814     *)
7815       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7816       ;;
7817   esac
7818
7819 else
7820   with_ldap=no
7821
7822 fi
7823
7824
7825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7826 $as_echo "$with_ldap" >&6; }
7827
7828
7829
7830 #
7831 # Bonjour
7832 #
7833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7834 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7835
7836
7837
7838 # Check whether --with-bonjour was given.
7839 if test "${with_bonjour+set}" = set; then :
7840   withval=$with_bonjour;
7841   case $withval in
7842     yes)
7843
7844 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7845
7846       ;;
7847     no)
7848       :
7849       ;;
7850     *)
7851       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7852       ;;
7853   esac
7854
7855 else
7856   with_bonjour=no
7857
7858 fi
7859
7860
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7862 $as_echo "$with_bonjour" >&6; }
7863
7864
7865 #
7866 # OpenSSL
7867 #
7868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7869 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7870
7871
7872
7873 # Check whether --with-openssl was given.
7874 if test "${with_openssl+set}" = set; then :
7875   withval=$with_openssl;
7876   case $withval in
7877     yes)
7878
7879 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7880
7881       ;;
7882     no)
7883       :
7884       ;;
7885     *)
7886       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7887       ;;
7888   esac
7889
7890 else
7891   with_openssl=no
7892
7893 fi
7894
7895
7896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7897 $as_echo "$with_openssl" >&6; }
7898
7899
7900 #
7901 # SELinux
7902 #
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7904 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7905
7906
7907
7908 # Check whether --with-selinux was given.
7909 if test "${with_selinux+set}" = set; then :
7910   withval=$with_selinux;
7911   case $withval in
7912     yes)
7913       :
7914       ;;
7915     no)
7916       :
7917       ;;
7918     *)
7919       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7920       ;;
7921   esac
7922
7923 else
7924   with_selinux=no
7925
7926 fi
7927
7928
7929
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7931 $as_echo "$with_selinux" >&6; }
7932
7933 #
7934 # Systemd
7935 #
7936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7937 $as_echo_n "checking whether to build with systemd support... " >&6; }
7938
7939
7940
7941 # Check whether --with-systemd was given.
7942 if test "${with_systemd+set}" = set; then :
7943   withval=$with_systemd;
7944   case $withval in
7945     yes)
7946
7947 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7948
7949       ;;
7950     no)
7951       :
7952       ;;
7953     *)
7954       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7955       ;;
7956   esac
7957
7958 else
7959   with_systemd=no
7960
7961 fi
7962
7963
7964
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7966 $as_echo "$with_systemd" >&6; }
7967
7968 #
7969 # Readline
7970 #
7971
7972
7973
7974 # Check whether --with-readline was given.
7975 if test "${with_readline+set}" = set; then :
7976   withval=$with_readline;
7977   case $withval in
7978     yes)
7979       :
7980       ;;
7981     no)
7982       :
7983       ;;
7984     *)
7985       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7986       ;;
7987   esac
7988
7989 else
7990   with_readline=yes
7991
7992 fi
7993
7994
7995 # readline on MinGW has problems with backslashes in psql and other bugs.
7996 # This is particularly a problem with non-US code pages.
7997 # Therefore disable its use until we understand the cause. 2004-07-20
7998 if test "$PORTNAME" = "win32"; then
7999   if test "$with_readline" = yes; then
8000     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8001 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8002     with_readline=no
8003   fi
8004 fi
8005
8006
8007 #
8008 # Prefer libedit
8009 #
8010
8011
8012
8013 # Check whether --with-libedit-preferred was given.
8014 if test "${with_libedit_preferred+set}" = set; then :
8015   withval=$with_libedit_preferred;
8016   case $withval in
8017     yes)
8018       :
8019       ;;
8020     no)
8021       :
8022       ;;
8023     *)
8024       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8025       ;;
8026   esac
8027
8028 else
8029   with_libedit_preferred=no
8030
8031 fi
8032
8033
8034
8035
8036 #
8037 # UUID library
8038 #
8039 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8040 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8041 # UUID library.  More than one of these might be present on a given platform,
8042 # so we make the user say which one she wants.
8043 #
8044
8045
8046
8047 # Check whether --with-uuid was given.
8048 if test "${with_uuid+set}" = set; then :
8049   withval=$with_uuid;
8050   case $withval in
8051     yes)
8052       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8053       ;;
8054     no)
8055       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8056       ;;
8057     *)
8058
8059       ;;
8060   esac
8061
8062 fi
8063
8064
8065 if test x"$with_uuid" = x"" ; then
8066   with_uuid=no
8067 fi
8068
8069
8070
8071 # Check whether --with-ossp-uuid was given.
8072 if test "${with_ossp_uuid+set}" = set; then :
8073   withval=$with_ossp_uuid;
8074   case $withval in
8075     yes)
8076       :
8077       ;;
8078     no)
8079       :
8080       ;;
8081     *)
8082       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8083       ;;
8084   esac
8085
8086 else
8087   with_ossp_uuid=no
8088
8089 fi
8090
8091
8092 if test "$with_ossp_uuid" = yes ; then
8093   with_uuid=ossp
8094 fi
8095
8096 if test "$with_uuid" = bsd ; then
8097
8098 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8099
8100   UUID_EXTRA_OBJS="md5.o sha1.o"
8101 elif test "$with_uuid" = e2fs ; then
8102
8103 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8104
8105   UUID_EXTRA_OBJS="md5.o sha1.o"
8106 elif test "$with_uuid" = ossp ; then
8107
8108 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8109
8110   UUID_EXTRA_OBJS=""
8111 elif test "$with_uuid" = no ; then
8112   UUID_EXTRA_OBJS=""
8113 else
8114   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8115 fi
8116
8117
8118
8119
8120 #
8121 # XML
8122 #
8123
8124
8125
8126 # Check whether --with-libxml was given.
8127 if test "${with_libxml+set}" = set; then :
8128   withval=$with_libxml;
8129   case $withval in
8130     yes)
8131
8132 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8133
8134       ;;
8135     no)
8136       :
8137       ;;
8138     *)
8139       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8140       ;;
8141   esac
8142
8143 else
8144   with_libxml=no
8145
8146 fi
8147
8148
8149
8150 if test "$with_libxml" = yes ; then
8151   if test -z "$XML2_CONFIG"; then
8152   for ac_prog in xml2-config
8153 do
8154   # Extract the first word of "$ac_prog", so it can be a program name with args.
8155 set dummy $ac_prog; ac_word=$2
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8157 $as_echo_n "checking for $ac_word... " >&6; }
8158 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8159   $as_echo_n "(cached) " >&6
8160 else
8161   case $XML2_CONFIG in
8162   [\\/]* | ?:[\\/]*)
8163   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8164   ;;
8165   *)
8166   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8167 for as_dir in $PATH
8168 do
8169   IFS=$as_save_IFS
8170   test -z "$as_dir" && as_dir=.
8171     for ac_exec_ext in '' $ac_executable_extensions; do
8172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8173     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8175     break 2
8176   fi
8177 done
8178   done
8179 IFS=$as_save_IFS
8180
8181   ;;
8182 esac
8183 fi
8184 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8185 if test -n "$XML2_CONFIG"; then
8186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8187 $as_echo "$XML2_CONFIG" >&6; }
8188 else
8189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8190 $as_echo "no" >&6; }
8191 fi
8192
8193
8194   test -n "$XML2_CONFIG" && break
8195 done
8196
8197 else
8198   # Report the value of XML2_CONFIG in configure's output in all cases.
8199   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8200 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8202 $as_echo "$XML2_CONFIG" >&6; }
8203 fi
8204
8205     if test -n "$XML2_CONFIG"; then
8206     for pgac_option in `$XML2_CONFIG --cflags`; do
8207       case $pgac_option in
8208         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8209       esac
8210     done
8211     for pgac_option in `$XML2_CONFIG --libs`; do
8212       case $pgac_option in
8213         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8214       esac
8215     done
8216   fi
8217 fi
8218
8219
8220
8221 #
8222 # XSLT
8223 #
8224
8225
8226
8227 # Check whether --with-libxslt was given.
8228 if test "${with_libxslt+set}" = set; then :
8229   withval=$with_libxslt;
8230   case $withval in
8231     yes)
8232
8233 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8234
8235       ;;
8236     no)
8237       :
8238       ;;
8239     *)
8240       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8241       ;;
8242   esac
8243
8244 else
8245   with_libxslt=no
8246
8247 fi
8248
8249
8250
8251
8252
8253
8254 #
8255 # tzdata
8256 #
8257
8258
8259
8260 # Check whether --with-system-tzdata was given.
8261 if test "${with_system_tzdata+set}" = set; then :
8262   withval=$with_system_tzdata;
8263   case $withval in
8264     yes)
8265       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8266       ;;
8267     no)
8268       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8269       ;;
8270     *)
8271
8272       ;;
8273   esac
8274
8275 fi
8276
8277
8278
8279
8280 #
8281 # Zlib
8282 #
8283
8284
8285
8286 # Check whether --with-zlib was given.
8287 if test "${with_zlib+set}" = set; then :
8288   withval=$with_zlib;
8289   case $withval in
8290     yes)
8291       :
8292       ;;
8293     no)
8294       :
8295       ;;
8296     *)
8297       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8298       ;;
8299   esac
8300
8301 else
8302   with_zlib=yes
8303
8304 fi
8305
8306
8307
8308
8309 #
8310 # Elf
8311 #
8312
8313 # Assume system is ELF if it predefines __ELF__ as 1,
8314 # otherwise believe host_os based default.
8315 case $host_os in
8316     freebsd1*|freebsd2*) elf=no;;
8317     freebsd3*|freebsd4*) elf=yes;;
8318 esac
8319
8320
8321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8322 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8323 if ${ac_cv_path_GREP+:} false; then :
8324   $as_echo_n "(cached) " >&6
8325 else
8326   if test -z "$GREP"; then
8327   ac_path_GREP_found=false
8328   # Loop through the user's path and test for each of PROGNAME-LIST
8329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8330 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8331 do
8332   IFS=$as_save_IFS
8333   test -z "$as_dir" && as_dir=.
8334     for ac_prog in grep ggrep; do
8335     for ac_exec_ext in '' $ac_executable_extensions; do
8336       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8337       as_fn_executable_p "$ac_path_GREP" || continue
8338 # Check for GNU ac_path_GREP and select it if it is found.
8339   # Check for GNU $ac_path_GREP
8340 case `"$ac_path_GREP" --version 2>&1` in
8341 *GNU*)
8342   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8343 *)
8344   ac_count=0
8345   $as_echo_n 0123456789 >"conftest.in"
8346   while :
8347   do
8348     cat "conftest.in" "conftest.in" >"conftest.tmp"
8349     mv "conftest.tmp" "conftest.in"
8350     cp "conftest.in" "conftest.nl"
8351     $as_echo 'GREP' >> "conftest.nl"
8352     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8353     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8354     as_fn_arith $ac_count + 1 && ac_count=$as_val
8355     if test $ac_count -gt ${ac_path_GREP_max-0}; then
8356       # Best one so far, save it but keep looking for a better one
8357       ac_cv_path_GREP="$ac_path_GREP"
8358       ac_path_GREP_max=$ac_count
8359     fi
8360     # 10*(2^10) chars as input seems more than enough
8361     test $ac_count -gt 10 && break
8362   done
8363   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8364 esac
8365
8366       $ac_path_GREP_found && break 3
8367     done
8368   done
8369   done
8370 IFS=$as_save_IFS
8371   if test -z "$ac_cv_path_GREP"; then
8372     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8373   fi
8374 else
8375   ac_cv_path_GREP=$GREP
8376 fi
8377
8378 fi
8379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8380 $as_echo "$ac_cv_path_GREP" >&6; }
8381  GREP="$ac_cv_path_GREP"
8382
8383
8384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8385 $as_echo_n "checking for egrep... " >&6; }
8386 if ${ac_cv_path_EGREP+:} false; then :
8387   $as_echo_n "(cached) " >&6
8388 else
8389   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8390    then ac_cv_path_EGREP="$GREP -E"
8391    else
8392      if test -z "$EGREP"; then
8393   ac_path_EGREP_found=false
8394   # Loop through the user's path and test for each of PROGNAME-LIST
8395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8396 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8397 do
8398   IFS=$as_save_IFS
8399   test -z "$as_dir" && as_dir=.
8400     for ac_prog in egrep; do
8401     for ac_exec_ext in '' $ac_executable_extensions; do
8402       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8403       as_fn_executable_p "$ac_path_EGREP" || continue
8404 # Check for GNU ac_path_EGREP and select it if it is found.
8405   # Check for GNU $ac_path_EGREP
8406 case `"$ac_path_EGREP" --version 2>&1` in
8407 *GNU*)
8408   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8409 *)
8410   ac_count=0
8411   $as_echo_n 0123456789 >"conftest.in"
8412   while :
8413   do
8414     cat "conftest.in" "conftest.in" >"conftest.tmp"
8415     mv "conftest.tmp" "conftest.in"
8416     cp "conftest.in" "conftest.nl"
8417     $as_echo 'EGREP' >> "conftest.nl"
8418     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8419     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8420     as_fn_arith $ac_count + 1 && ac_count=$as_val
8421     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8422       # Best one so far, save it but keep looking for a better one
8423       ac_cv_path_EGREP="$ac_path_EGREP"
8424       ac_path_EGREP_max=$ac_count
8425     fi
8426     # 10*(2^10) chars as input seems more than enough
8427     test $ac_count -gt 10 && break
8428   done
8429   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8430 esac
8431
8432       $ac_path_EGREP_found && break 3
8433     done
8434   done
8435   done
8436 IFS=$as_save_IFS
8437   if test -z "$ac_cv_path_EGREP"; then
8438     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8439   fi
8440 else
8441   ac_cv_path_EGREP=$EGREP
8442 fi
8443
8444    fi
8445 fi
8446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8447 $as_echo "$ac_cv_path_EGREP" >&6; }
8448  EGREP="$ac_cv_path_EGREP"
8449
8450
8451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8452 /* end confdefs.h.  */
8453 #if __ELF__
8454   yes
8455 #endif
8456
8457 _ACEOF
8458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8459   $EGREP "yes" >/dev/null 2>&1; then :
8460   ELF_SYS=true
8461 else
8462   if test "X$elf" = "Xyes" ; then
8463   ELF_SYS=true
8464 else
8465   ELF_SYS=
8466 fi
8467 fi
8468 rm -f conftest*
8469
8470
8471
8472 #
8473 # Assignments
8474 #
8475
8476 CPPFLAGS="$CPPFLAGS $INCLUDES"
8477 LDFLAGS="$LDFLAGS $LIBDIRS"
8478
8479
8480
8481
8482
8483 # Check whether --with-gnu-ld was given.
8484 if test "${with_gnu_ld+set}" = set; then :
8485   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8486 else
8487   with_gnu_ld=no
8488 fi
8489
8490 ac_prog=ld
8491 if test "$GCC" = yes; then
8492   # Check if gcc -print-prog-name=ld gives a path.
8493   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8494 $as_echo_n "checking for ld used by GCC... " >&6; }
8495   case $host in
8496   *-*-mingw*)
8497     # gcc leaves a trailing carriage return which upsets mingw
8498     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8499   *)
8500     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8501   esac
8502   case "$ac_prog" in
8503     # Accept absolute paths.
8504     [\\/]* | [A-Za-z]:[\\/]*)
8505       re_direlt='/[^/][^/]*/\.\./'
8506       # Canonicalize the path of ld
8507       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8508       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8509         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8510       done
8511       test -z "$LD" && LD="$ac_prog"
8512       ;;
8513   "")
8514     # If it fails, then pretend we aren't using GCC.
8515     ac_prog=ld
8516     ;;
8517   *)
8518     # If it is relative, then search for the first ld in PATH.
8519     with_gnu_ld=unknown
8520     ;;
8521   esac
8522 elif test "$with_gnu_ld" = yes; then
8523   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8524 $as_echo_n "checking for GNU ld... " >&6; }
8525 else
8526   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8527 $as_echo_n "checking for non-GNU ld... " >&6; }
8528 fi
8529 if ${ac_cv_path_LD+:} false; then :
8530   $as_echo_n "(cached) " >&6
8531 else
8532   if test -z "$LD"; then
8533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8534   for ac_dir in $PATH; do
8535     test -z "$ac_dir" && ac_dir=.
8536     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8537       ac_cv_path_LD="$ac_dir/$ac_prog"
8538       # Check to see if the program is GNU ld.  I'd rather use --version,
8539       # but apparently some GNU ld's only accept -v.
8540       # Break only if it was the GNU/non-GNU ld that we prefer.
8541       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8542         test "$with_gnu_ld" != no && break
8543       else
8544         test "$with_gnu_ld" != yes && break
8545       fi
8546     fi
8547   done
8548   IFS="$ac_save_ifs"
8549 else
8550   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8551 fi
8552 fi
8553
8554 LD="$ac_cv_path_LD"
8555 if test -n "$LD"; then
8556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8557 $as_echo "$LD" >&6; }
8558 else
8559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8560 $as_echo "no" >&6; }
8561 fi
8562 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8564 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8565 if ${ac_cv_prog_gnu_ld+:} false; then :
8566   $as_echo_n "(cached) " >&6
8567 else
8568   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8569 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8570   ac_cv_prog_gnu_ld=yes
8571 else
8572   ac_cv_prog_gnu_ld=no
8573 fi
8574 fi
8575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8576 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8577 with_gnu_ld=$ac_cv_prog_gnu_ld
8578
8579
8580
8581
8582 if test -n "$ac_tool_prefix"; then
8583   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8584 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8586 $as_echo_n "checking for $ac_word... " >&6; }
8587 if ${ac_cv_prog_RANLIB+:} false; then :
8588   $as_echo_n "(cached) " >&6
8589 else
8590   if test -n "$RANLIB"; then
8591   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8592 else
8593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8594 for as_dir in $PATH
8595 do
8596   IFS=$as_save_IFS
8597   test -z "$as_dir" && as_dir=.
8598     for ac_exec_ext in '' $ac_executable_extensions; do
8599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8600     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8602     break 2
8603   fi
8604 done
8605   done
8606 IFS=$as_save_IFS
8607
8608 fi
8609 fi
8610 RANLIB=$ac_cv_prog_RANLIB
8611 if test -n "$RANLIB"; then
8612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8613 $as_echo "$RANLIB" >&6; }
8614 else
8615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8616 $as_echo "no" >&6; }
8617 fi
8618
8619
8620 fi
8621 if test -z "$ac_cv_prog_RANLIB"; then
8622   ac_ct_RANLIB=$RANLIB
8623   # Extract the first word of "ranlib", so it can be a program name with args.
8624 set dummy ranlib; ac_word=$2
8625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8626 $as_echo_n "checking for $ac_word... " >&6; }
8627 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8628   $as_echo_n "(cached) " >&6
8629 else
8630   if test -n "$ac_ct_RANLIB"; then
8631   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8632 else
8633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8634 for as_dir in $PATH
8635 do
8636   IFS=$as_save_IFS
8637   test -z "$as_dir" && as_dir=.
8638     for ac_exec_ext in '' $ac_executable_extensions; do
8639   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8640     ac_cv_prog_ac_ct_RANLIB="ranlib"
8641     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8642     break 2
8643   fi
8644 done
8645   done
8646 IFS=$as_save_IFS
8647
8648 fi
8649 fi
8650 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8651 if test -n "$ac_ct_RANLIB"; then
8652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8653 $as_echo "$ac_ct_RANLIB" >&6; }
8654 else
8655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8656 $as_echo "no" >&6; }
8657 fi
8658
8659   if test "x$ac_ct_RANLIB" = x; then
8660     RANLIB=":"
8661   else
8662     case $cross_compiling:$ac_tool_warned in
8663 yes:)
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8665 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8666 ac_tool_warned=yes ;;
8667 esac
8668     RANLIB=$ac_ct_RANLIB
8669   fi
8670 else
8671   RANLIB="$ac_cv_prog_RANLIB"
8672 fi
8673
8674
8675   if test -n "$ac_tool_prefix"; then
8676   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8677 set dummy ${ac_tool_prefix}strip; ac_word=$2
8678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8679 $as_echo_n "checking for $ac_word... " >&6; }
8680 if ${ac_cv_prog_STRIP+:} false; then :
8681   $as_echo_n "(cached) " >&6
8682 else
8683   if test -n "$STRIP"; then
8684   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8685 else
8686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8687 for as_dir in $PATH
8688 do
8689   IFS=$as_save_IFS
8690   test -z "$as_dir" && as_dir=.
8691     for ac_exec_ext in '' $ac_executable_extensions; do
8692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8693     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8695     break 2
8696   fi
8697 done
8698   done
8699 IFS=$as_save_IFS
8700
8701 fi
8702 fi
8703 STRIP=$ac_cv_prog_STRIP
8704 if test -n "$STRIP"; then
8705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8706 $as_echo "$STRIP" >&6; }
8707 else
8708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8709 $as_echo "no" >&6; }
8710 fi
8711
8712
8713 fi
8714 if test -z "$ac_cv_prog_STRIP"; then
8715   ac_ct_STRIP=$STRIP
8716   # Extract the first word of "strip", so it can be a program name with args.
8717 set dummy strip; ac_word=$2
8718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8719 $as_echo_n "checking for $ac_word... " >&6; }
8720 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8721   $as_echo_n "(cached) " >&6
8722 else
8723   if test -n "$ac_ct_STRIP"; then
8724   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8725 else
8726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8727 for as_dir in $PATH
8728 do
8729   IFS=$as_save_IFS
8730   test -z "$as_dir" && as_dir=.
8731     for ac_exec_ext in '' $ac_executable_extensions; do
8732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8733     ac_cv_prog_ac_ct_STRIP="strip"
8734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8735     break 2
8736   fi
8737 done
8738   done
8739 IFS=$as_save_IFS
8740
8741 fi
8742 fi
8743 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8744 if test -n "$ac_ct_STRIP"; then
8745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8746 $as_echo "$ac_ct_STRIP" >&6; }
8747 else
8748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8749 $as_echo "no" >&6; }
8750 fi
8751
8752   if test "x$ac_ct_STRIP" = x; then
8753     STRIP=":"
8754   else
8755     case $cross_compiling:$ac_tool_warned in
8756 yes:)
8757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8758 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8759 ac_tool_warned=yes ;;
8760 esac
8761     STRIP=$ac_ct_STRIP
8762   fi
8763 else
8764   STRIP="$ac_cv_prog_STRIP"
8765 fi
8766
8767
8768   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8769 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8770   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8771     STRIP_STATIC_LIB="$STRIP -x"
8772     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8773     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8774 $as_echo "yes" >&6; }
8775   else
8776     case $host_os in
8777       darwin*)
8778         STRIP="$STRIP -x"
8779         STRIP_STATIC_LIB=$STRIP
8780         STRIP_SHARED_LIB=$STRIP
8781         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8782 $as_echo "yes" >&6; }
8783         ;;
8784       *)
8785         STRIP_STATIC_LIB=:
8786         STRIP_SHARED_LIB=:
8787         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788 $as_echo "no" >&6; }
8789         ;;
8790     esac
8791   fi
8792
8793
8794
8795 if test -n "$ac_tool_prefix"; then
8796   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8797 set dummy ${ac_tool_prefix}ar; ac_word=$2
8798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8799 $as_echo_n "checking for $ac_word... " >&6; }
8800 if ${ac_cv_prog_AR+:} false; then :
8801   $as_echo_n "(cached) " >&6
8802 else
8803   if test -n "$AR"; then
8804   ac_cv_prog_AR="$AR" # Let the user override the test.
8805 else
8806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8807 for as_dir in $PATH
8808 do
8809   IFS=$as_save_IFS
8810   test -z "$as_dir" && as_dir=.
8811     for ac_exec_ext in '' $ac_executable_extensions; do
8812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8813     ac_cv_prog_AR="${ac_tool_prefix}ar"
8814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8815     break 2
8816   fi
8817 done
8818   done
8819 IFS=$as_save_IFS
8820
8821 fi
8822 fi
8823 AR=$ac_cv_prog_AR
8824 if test -n "$AR"; then
8825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8826 $as_echo "$AR" >&6; }
8827 else
8828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8829 $as_echo "no" >&6; }
8830 fi
8831
8832
8833 fi
8834 if test -z "$ac_cv_prog_AR"; then
8835   ac_ct_AR=$AR
8836   # Extract the first word of "ar", so it can be a program name with args.
8837 set dummy ar; ac_word=$2
8838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8839 $as_echo_n "checking for $ac_word... " >&6; }
8840 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8841   $as_echo_n "(cached) " >&6
8842 else
8843   if test -n "$ac_ct_AR"; then
8844   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8845 else
8846 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8847 for as_dir in $PATH
8848 do
8849   IFS=$as_save_IFS
8850   test -z "$as_dir" && as_dir=.
8851     for ac_exec_ext in '' $ac_executable_extensions; do
8852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8853     ac_cv_prog_ac_ct_AR="ar"
8854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8855     break 2
8856   fi
8857 done
8858   done
8859 IFS=$as_save_IFS
8860
8861 fi
8862 fi
8863 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8864 if test -n "$ac_ct_AR"; then
8865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8866 $as_echo "$ac_ct_AR" >&6; }
8867 else
8868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8869 $as_echo "no" >&6; }
8870 fi
8871
8872   if test "x$ac_ct_AR" = x; then
8873     AR="ar"
8874   else
8875     case $cross_compiling:$ac_tool_warned in
8876 yes:)
8877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8878 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8879 ac_tool_warned=yes ;;
8880 esac
8881     AR=$ac_ct_AR
8882   fi
8883 else
8884   AR="$ac_cv_prog_AR"
8885 fi
8886
8887 if test "$PORTNAME" = "win32"; then
8888   if test -n "$ac_tool_prefix"; then
8889   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8890 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8892 $as_echo_n "checking for $ac_word... " >&6; }
8893 if ${ac_cv_prog_DLLTOOL+:} false; then :
8894   $as_echo_n "(cached) " >&6
8895 else
8896   if test -n "$DLLTOOL"; then
8897   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8898 else
8899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8900 for as_dir in $PATH
8901 do
8902   IFS=$as_save_IFS
8903   test -z "$as_dir" && as_dir=.
8904     for ac_exec_ext in '' $ac_executable_extensions; do
8905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8906     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8908     break 2
8909   fi
8910 done
8911   done
8912 IFS=$as_save_IFS
8913
8914 fi
8915 fi
8916 DLLTOOL=$ac_cv_prog_DLLTOOL
8917 if test -n "$DLLTOOL"; then
8918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8919 $as_echo "$DLLTOOL" >&6; }
8920 else
8921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8922 $as_echo "no" >&6; }
8923 fi
8924
8925
8926 fi
8927 if test -z "$ac_cv_prog_DLLTOOL"; then
8928   ac_ct_DLLTOOL=$DLLTOOL
8929   # Extract the first word of "dlltool", so it can be a program name with args.
8930 set dummy dlltool; ac_word=$2
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8932 $as_echo_n "checking for $ac_word... " >&6; }
8933 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8934   $as_echo_n "(cached) " >&6
8935 else
8936   if test -n "$ac_ct_DLLTOOL"; then
8937   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8938 else
8939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8940 for as_dir in $PATH
8941 do
8942   IFS=$as_save_IFS
8943   test -z "$as_dir" && as_dir=.
8944     for ac_exec_ext in '' $ac_executable_extensions; do
8945   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8946     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8947     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8948     break 2
8949   fi
8950 done
8951   done
8952 IFS=$as_save_IFS
8953
8954 fi
8955 fi
8956 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8957 if test -n "$ac_ct_DLLTOOL"; then
8958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8959 $as_echo "$ac_ct_DLLTOOL" >&6; }
8960 else
8961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8962 $as_echo "no" >&6; }
8963 fi
8964
8965   if test "x$ac_ct_DLLTOOL" = x; then
8966     DLLTOOL="dlltool"
8967   else
8968     case $cross_compiling:$ac_tool_warned in
8969 yes:)
8970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8971 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8972 ac_tool_warned=yes ;;
8973 esac
8974     DLLTOOL=$ac_ct_DLLTOOL
8975   fi
8976 else
8977   DLLTOOL="$ac_cv_prog_DLLTOOL"
8978 fi
8979
8980   if test -n "$ac_tool_prefix"; then
8981   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8982 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8984 $as_echo_n "checking for $ac_word... " >&6; }
8985 if ${ac_cv_prog_DLLWRAP+:} false; then :
8986   $as_echo_n "(cached) " >&6
8987 else
8988   if test -n "$DLLWRAP"; then
8989   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
8990 else
8991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8992 for as_dir in $PATH
8993 do
8994   IFS=$as_save_IFS
8995   test -z "$as_dir" && as_dir=.
8996     for ac_exec_ext in '' $ac_executable_extensions; do
8997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8998     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
8999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9000     break 2
9001   fi
9002 done
9003   done
9004 IFS=$as_save_IFS
9005
9006 fi
9007 fi
9008 DLLWRAP=$ac_cv_prog_DLLWRAP
9009 if test -n "$DLLWRAP"; then
9010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9011 $as_echo "$DLLWRAP" >&6; }
9012 else
9013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014 $as_echo "no" >&6; }
9015 fi
9016
9017
9018 fi
9019 if test -z "$ac_cv_prog_DLLWRAP"; then
9020   ac_ct_DLLWRAP=$DLLWRAP
9021   # Extract the first word of "dllwrap", so it can be a program name with args.
9022 set dummy dllwrap; ac_word=$2
9023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9024 $as_echo_n "checking for $ac_word... " >&6; }
9025 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9026   $as_echo_n "(cached) " >&6
9027 else
9028   if test -n "$ac_ct_DLLWRAP"; then
9029   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9030 else
9031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9032 for as_dir in $PATH
9033 do
9034   IFS=$as_save_IFS
9035   test -z "$as_dir" && as_dir=.
9036     for ac_exec_ext in '' $ac_executable_extensions; do
9037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9038     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9040     break 2
9041   fi
9042 done
9043   done
9044 IFS=$as_save_IFS
9045
9046 fi
9047 fi
9048 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9049 if test -n "$ac_ct_DLLWRAP"; then
9050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9051 $as_echo "$ac_ct_DLLWRAP" >&6; }
9052 else
9053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9054 $as_echo "no" >&6; }
9055 fi
9056
9057   if test "x$ac_ct_DLLWRAP" = x; then
9058     DLLWRAP="dllwrap"
9059   else
9060     case $cross_compiling:$ac_tool_warned in
9061 yes:)
9062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9063 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9064 ac_tool_warned=yes ;;
9065 esac
9066     DLLWRAP=$ac_ct_DLLWRAP
9067   fi
9068 else
9069   DLLWRAP="$ac_cv_prog_DLLWRAP"
9070 fi
9071
9072   if test -n "$ac_tool_prefix"; then
9073   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9074 set dummy ${ac_tool_prefix}windres; ac_word=$2
9075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9076 $as_echo_n "checking for $ac_word... " >&6; }
9077 if ${ac_cv_prog_WINDRES+:} false; then :
9078   $as_echo_n "(cached) " >&6
9079 else
9080   if test -n "$WINDRES"; then
9081   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9082 else
9083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9084 for as_dir in $PATH
9085 do
9086   IFS=$as_save_IFS
9087   test -z "$as_dir" && as_dir=.
9088     for ac_exec_ext in '' $ac_executable_extensions; do
9089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9090     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9091     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9092     break 2
9093   fi
9094 done
9095   done
9096 IFS=$as_save_IFS
9097
9098 fi
9099 fi
9100 WINDRES=$ac_cv_prog_WINDRES
9101 if test -n "$WINDRES"; then
9102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9103 $as_echo "$WINDRES" >&6; }
9104 else
9105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9106 $as_echo "no" >&6; }
9107 fi
9108
9109
9110 fi
9111 if test -z "$ac_cv_prog_WINDRES"; then
9112   ac_ct_WINDRES=$WINDRES
9113   # Extract the first word of "windres", so it can be a program name with args.
9114 set dummy windres; ac_word=$2
9115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9116 $as_echo_n "checking for $ac_word... " >&6; }
9117 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9118   $as_echo_n "(cached) " >&6
9119 else
9120   if test -n "$ac_ct_WINDRES"; then
9121   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9122 else
9123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9124 for as_dir in $PATH
9125 do
9126   IFS=$as_save_IFS
9127   test -z "$as_dir" && as_dir=.
9128     for ac_exec_ext in '' $ac_executable_extensions; do
9129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9130     ac_cv_prog_ac_ct_WINDRES="windres"
9131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9132     break 2
9133   fi
9134 done
9135   done
9136 IFS=$as_save_IFS
9137
9138 fi
9139 fi
9140 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9141 if test -n "$ac_ct_WINDRES"; then
9142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9143 $as_echo "$ac_ct_WINDRES" >&6; }
9144 else
9145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9146 $as_echo "no" >&6; }
9147 fi
9148
9149   if test "x$ac_ct_WINDRES" = x; then
9150     WINDRES="windres"
9151   else
9152     case $cross_compiling:$ac_tool_warned in
9153 yes:)
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9155 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9156 ac_tool_warned=yes ;;
9157 esac
9158     WINDRES=$ac_ct_WINDRES
9159   fi
9160 else
9161   WINDRES="$ac_cv_prog_WINDRES"
9162 fi
9163
9164 fi
9165
9166 # Find a good install program.  We prefer a C program (faster),
9167 # so one script is as good as another.  But avoid the broken or
9168 # incompatible versions:
9169 # SysV /etc/install, /usr/sbin/install
9170 # SunOS /usr/etc/install
9171 # IRIX /sbin/install
9172 # AIX /bin/install
9173 # AmigaOS /C/install, which installs bootblocks on floppy discs
9174 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9175 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9176 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9177 # OS/2's system install, which has a completely different semantic
9178 # ./install, which can be erroneously created by make from ./install.sh.
9179 # Reject install programs that cannot install multiple files.
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9181 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9182 if test -z "$INSTALL"; then
9183 if ${ac_cv_path_install+:} false; then :
9184   $as_echo_n "(cached) " >&6
9185 else
9186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9187 for as_dir in $PATH
9188 do
9189   IFS=$as_save_IFS
9190   test -z "$as_dir" && as_dir=.
9191     # Account for people who put trailing slashes in PATH elements.
9192 case $as_dir/ in #((
9193   ./ | .// | /[cC]/* | \
9194   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9195   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9196   /usr/ucb/* ) ;;
9197   *)
9198     # OSF1 and SCO ODT 3.0 have their own names for install.
9199     # Don't use installbsd from OSF since it installs stuff as root
9200     # by default.
9201     for ac_prog in ginstall scoinst install; do
9202       for ac_exec_ext in '' $ac_executable_extensions; do
9203         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9204           if test $ac_prog = install &&
9205             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9206             # AIX install.  It has an incompatible calling convention.
9207             :
9208           elif test $ac_prog = install &&
9209             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9210             # program-specific install script used by HP pwplus--don't use.
9211             :
9212           else
9213             rm -rf conftest.one conftest.two conftest.dir
9214             echo one > conftest.one
9215             echo two > conftest.two
9216             mkdir conftest.dir
9217             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9218               test -s conftest.one && test -s conftest.two &&
9219               test -s conftest.dir/conftest.one &&
9220               test -s conftest.dir/conftest.two
9221             then
9222               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9223               break 3
9224             fi
9225           fi
9226         fi
9227       done
9228     done
9229     ;;
9230 esac
9231
9232   done
9233 IFS=$as_save_IFS
9234
9235 rm -rf conftest.one conftest.two conftest.dir
9236
9237 fi
9238   if test "${ac_cv_path_install+set}" = set; then
9239     INSTALL=$ac_cv_path_install
9240   else
9241     # As a last resort, use the slow shell script.  Don't cache a
9242     # value for INSTALL within a source directory, because that will
9243     # break other packages using the cache if that directory is
9244     # removed, or if the value is a relative name.
9245     INSTALL=$ac_install_sh
9246   fi
9247 fi
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9249 $as_echo "$INSTALL" >&6; }
9250
9251 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9252 # It thinks the first close brace ends the variable substitution.
9253 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9254
9255 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9256
9257 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9258
9259 # When Autoconf chooses install-sh as install program it tries to generate
9260 # a relative path to it in each makefile where it substitutes it. This clashes
9261 # with our Makefile.global concept. This workaround helps.
9262 case $INSTALL in
9263   *install-sh*) install_bin='';;
9264   *) install_bin=$INSTALL;;
9265 esac
9266
9267
9268 if test -z "$TAR"; then
9269   for ac_prog in tar
9270 do
9271   # Extract the first word of "$ac_prog", so it can be a program name with args.
9272 set dummy $ac_prog; ac_word=$2
9273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9274 $as_echo_n "checking for $ac_word... " >&6; }
9275 if ${ac_cv_path_TAR+:} false; then :
9276   $as_echo_n "(cached) " >&6
9277 else
9278   case $TAR in
9279   [\\/]* | ?:[\\/]*)
9280   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9281   ;;
9282   *)
9283   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9284 for as_dir in $PATH
9285 do
9286   IFS=$as_save_IFS
9287   test -z "$as_dir" && as_dir=.
9288     for ac_exec_ext in '' $ac_executable_extensions; do
9289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9290     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9292     break 2
9293   fi
9294 done
9295   done
9296 IFS=$as_save_IFS
9297
9298   ;;
9299 esac
9300 fi
9301 TAR=$ac_cv_path_TAR
9302 if test -n "$TAR"; then
9303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9304 $as_echo "$TAR" >&6; }
9305 else
9306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9307 $as_echo "no" >&6; }
9308 fi
9309
9310
9311   test -n "$TAR" && break
9312 done
9313
9314 else
9315   # Report the value of TAR in configure's output in all cases.
9316   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9317 $as_echo_n "checking for TAR... " >&6; }
9318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9319 $as_echo "$TAR" >&6; }
9320 fi
9321
9322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9323 $as_echo_n "checking whether ln -s works... " >&6; }
9324 LN_S=$as_ln_s
9325 if test "$LN_S" = "ln -s"; then
9326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9327 $as_echo "yes" >&6; }
9328 else
9329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9330 $as_echo "no, using $LN_S" >&6; }
9331 fi
9332
9333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9334 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9335 if test -z "$MKDIR_P"; then
9336   if ${ac_cv_path_mkdir+:} false; then :
9337   $as_echo_n "(cached) " >&6
9338 else
9339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9340 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9341 do
9342   IFS=$as_save_IFS
9343   test -z "$as_dir" && as_dir=.
9344     for ac_prog in mkdir gmkdir; do
9345          for ac_exec_ext in '' $ac_executable_extensions; do
9346            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9347            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9348              'mkdir (GNU coreutils) '* | \
9349              'mkdir (coreutils) '* | \
9350              'mkdir (fileutils) '4.1*)
9351                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9352                break 3;;
9353            esac
9354          done
9355        done
9356   done
9357 IFS=$as_save_IFS
9358
9359 fi
9360
9361   test -d ./--version && rmdir ./--version
9362   if test "${ac_cv_path_mkdir+set}" = set; then
9363     MKDIR_P="$ac_cv_path_mkdir -p"
9364   else
9365     # As a last resort, use the slow shell script.  Don't cache a
9366     # value for MKDIR_P within a source directory, because that will
9367     # break other packages using the cache if that directory is
9368     # removed, or if the value is a relative name.
9369     MKDIR_P="$ac_install_sh -d"
9370   fi
9371 fi
9372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9373 $as_echo "$MKDIR_P" >&6; }
9374
9375 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9376 # a relative path to it in each makefile where it substitutes it. This clashes
9377 # with our Makefile.global concept. This workaround helps.
9378 case $MKDIR_P in
9379   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9380 esac
9381
9382 if test -z "$BISON"; then
9383   for ac_prog in bison
9384 do
9385   # Extract the first word of "$ac_prog", so it can be a program name with args.
9386 set dummy $ac_prog; ac_word=$2
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9388 $as_echo_n "checking for $ac_word... " >&6; }
9389 if ${ac_cv_path_BISON+:} false; then :
9390   $as_echo_n "(cached) " >&6
9391 else
9392   case $BISON in
9393   [\\/]* | ?:[\\/]*)
9394   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9395   ;;
9396   *)
9397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9398 for as_dir in $PATH
9399 do
9400   IFS=$as_save_IFS
9401   test -z "$as_dir" && as_dir=.
9402     for ac_exec_ext in '' $ac_executable_extensions; do
9403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9404     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9406     break 2
9407   fi
9408 done
9409   done
9410 IFS=$as_save_IFS
9411
9412   ;;
9413 esac
9414 fi
9415 BISON=$ac_cv_path_BISON
9416 if test -n "$BISON"; then
9417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9418 $as_echo "$BISON" >&6; }
9419 else
9420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421 $as_echo "no" >&6; }
9422 fi
9423
9424
9425   test -n "$BISON" && break
9426 done
9427
9428 else
9429   # Report the value of BISON in configure's output in all cases.
9430   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9431 $as_echo_n "checking for BISON... " >&6; }
9432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9433 $as_echo "$BISON" >&6; }
9434 fi
9435
9436
9437 if test "$BISON"; then
9438   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9439   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9440 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9441   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9442   then
9443     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9444 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9445 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9446 $as_echo "$as_me: WARNING:
9447 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9448 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9449     BISON=""
9450   fi
9451   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9452   # of the now preferred %name-prefix "base_yy", but the latter
9453   # doesn't work with Bison 2.3 or less.  So for now we silence the
9454   # deprecation warnings.
9455   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9456   then
9457     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9458   fi
9459 fi
9460
9461 if test -z "$BISON"; then
9462   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9463 *** Without Bison you will not be able to build PostgreSQL from Git nor
9464 *** change any of the parser definition files.  You can obtain Bison from
9465 *** a GNU mirror site.  (If you are using the official distribution of
9466 *** PostgreSQL then you do not need to worry about this, because the Bison
9467 *** output is pre-generated.)" >&5
9468 $as_echo "$as_me: WARNING:
9469 *** Without Bison you will not be able to build PostgreSQL from Git nor
9470 *** change any of the parser definition files.  You can obtain Bison from
9471 *** a GNU mirror site.  (If you are using the official distribution of
9472 *** PostgreSQL then you do not need to worry about this, because the Bison
9473 *** output is pre-generated.)" >&2;}
9474 fi
9475
9476
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9478 $as_echo_n "checking for flex... " >&6; }
9479 if ${pgac_cv_path_flex+:} false; then :
9480   $as_echo_n "(cached) " >&6
9481 else
9482   # Let the user override the test
9483 if test -n "$FLEX"; then
9484   pgac_cv_path_flex=$FLEX
9485 else
9486   pgac_save_IFS=$IFS
9487   IFS=$PATH_SEPARATOR
9488   for pgac_dir in $PATH; do
9489     IFS=$pgac_save_IFS
9490     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9491       pgac_dir=`pwd`
9492     fi
9493     for pgac_prog in flex lex; do
9494       pgac_candidate="$pgac_dir/$pgac_prog"
9495       if test -f "$pgac_candidate" \
9496         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9497       then
9498         echo '%%'  > conftest.l
9499         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9500           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9501           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;}'
9502           then
9503             pgac_cv_path_flex=$pgac_candidate
9504             break 2
9505           else
9506             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9507 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9508 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9509 $as_echo "$as_me: WARNING:
9510 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9511 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9512           fi
9513         fi
9514       fi
9515     done
9516   done
9517   rm -f conftest.l lex.yy.c
9518   : ${pgac_cv_path_flex=no}
9519 fi
9520
9521 fi
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9523 $as_echo "$pgac_cv_path_flex" >&6; }
9524 if test x"$pgac_cv_path_flex" = x"no"; then
9525   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9526 *** Without Flex you will not be able to build PostgreSQL from Git nor
9527 *** change any of the scanner definition files.  You can obtain Flex from
9528 *** a GNU mirror site.  (If you are using the official distribution of
9529 *** PostgreSQL then you do not need to worry about this because the Flex
9530 *** output is pre-generated.)" >&5
9531 $as_echo "$as_me: WARNING:
9532 *** Without Flex you will not be able to build PostgreSQL from Git nor
9533 *** change any of the scanner definition files.  You can obtain Flex from
9534 *** a GNU mirror site.  (If you are using the official distribution of
9535 *** PostgreSQL then you do not need to worry about this because the Flex
9536 *** output is pre-generated.)" >&2;}
9537
9538   FLEX=
9539 else
9540   FLEX=$pgac_cv_path_flex
9541   pgac_flex_version=`$FLEX --version 2>/dev/null`
9542   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9543 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9544 fi
9545
9546
9547
9548
9549
9550 if test -z "$PERL"; then
9551   for ac_prog in perl
9552 do
9553   # Extract the first word of "$ac_prog", so it can be a program name with args.
9554 set dummy $ac_prog; ac_word=$2
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9556 $as_echo_n "checking for $ac_word... " >&6; }
9557 if ${ac_cv_path_PERL+:} false; then :
9558   $as_echo_n "(cached) " >&6
9559 else
9560   case $PERL in
9561   [\\/]* | ?:[\\/]*)
9562   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9563   ;;
9564   *)
9565   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9566 for as_dir in $PATH
9567 do
9568   IFS=$as_save_IFS
9569   test -z "$as_dir" && as_dir=.
9570     for ac_exec_ext in '' $ac_executable_extensions; do
9571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9572     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9574     break 2
9575   fi
9576 done
9577   done
9578 IFS=$as_save_IFS
9579
9580   ;;
9581 esac
9582 fi
9583 PERL=$ac_cv_path_PERL
9584 if test -n "$PERL"; then
9585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9586 $as_echo "$PERL" >&6; }
9587 else
9588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9589 $as_echo "no" >&6; }
9590 fi
9591
9592
9593   test -n "$PERL" && break
9594 done
9595
9596 else
9597   # Report the value of PERL in configure's output in all cases.
9598   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9599 $as_echo_n "checking for PERL... " >&6; }
9600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9601 $as_echo "$PERL" >&6; }
9602 fi
9603
9604
9605 if test "$PERL"; then
9606   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'`
9607   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9608 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9609   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9610     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9611   then
9612     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9613 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9614 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9615 $as_echo "$as_me: WARNING:
9616 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9617 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9618     PERL=""
9619   fi
9620 fi
9621
9622 if test -z "$PERL"; then
9623   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9624 *** Without Perl you will not be able to build PostgreSQL from Git.
9625 *** You can obtain Perl from any CPAN mirror site.
9626 *** (If you are using the official distribution of PostgreSQL then you do not
9627 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9628 $as_echo "$as_me: WARNING:
9629 *** Without Perl you will not be able to build PostgreSQL from Git.
9630 *** You can obtain Perl from any CPAN mirror site.
9631 *** (If you are using the official distribution of PostgreSQL then you do not
9632 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9633 fi
9634
9635 if test "$with_perl" = yes; then
9636   if test -z "$PERL"; then
9637     as_fn_error $? "Perl not found" "$LINENO" 5
9638   fi
9639
9640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9641 $as_echo_n "checking for Perl archlibexp... " >&6; }
9642 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9643 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9645 $as_echo "$perl_archlibexp" >&6; }
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9647 $as_echo_n "checking for Perl privlibexp... " >&6; }
9648 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9649 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9651 $as_echo "$perl_privlibexp" >&6; }
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9653 $as_echo_n "checking for Perl useshrplib... " >&6; }
9654 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9655 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9657 $as_echo "$perl_useshrplib" >&6; }
9658   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9659     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9660 You might have to rebuild your Perl installation.  Refer to the
9661 documentation for details.  Use --without-perl to disable building
9662 PL/Perl." "$LINENO" 5
9663   fi
9664   # On most platforms, archlibexp is also where the Perl include files live ...
9665   perl_includespec="-I$perl_archlibexp/CORE"
9666   # ... but on newer macOS versions, we must use -iwithsysroot to look
9667   # under $PG_SYSROOT
9668   if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9669     if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9670       perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9671     fi
9672   fi
9673
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9675 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9676 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9678 $as_echo "$perl_ccflags" >&6; }
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9680 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9681 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9683 $as_echo "$perl_embed_ccflags" >&6; }
9684
9685
9686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9687 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9688 if test "$PORTNAME" = "win32" ; then
9689         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9690         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9691                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9692         else
9693                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9694                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9695                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9696                 fi
9697         fi
9698 else
9699         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9700         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9701         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9702 fi
9703 if test -z "$perl_embed_ldflags" ; then
9704         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9705 $as_echo "no" >&6; }
9706         as_fn_error $? "could not determine flags for linking embedded Perl.
9707 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9708 installed." "$LINENO" 5
9709 else
9710         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9711 $as_echo "$perl_embed_ldflags" >&6; }
9712 fi
9713
9714 fi
9715
9716 if test "$with_python" = yes; then
9717   if test -z "$PYTHON"; then
9718   for ac_prog in python python3 python2
9719 do
9720   # Extract the first word of "$ac_prog", so it can be a program name with args.
9721 set dummy $ac_prog; ac_word=$2
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9723 $as_echo_n "checking for $ac_word... " >&6; }
9724 if ${ac_cv_path_PYTHON+:} false; then :
9725   $as_echo_n "(cached) " >&6
9726 else
9727   case $PYTHON in
9728   [\\/]* | ?:[\\/]*)
9729   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9730   ;;
9731   *)
9732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9733 for as_dir in $PATH
9734 do
9735   IFS=$as_save_IFS
9736   test -z "$as_dir" && as_dir=.
9737     for ac_exec_ext in '' $ac_executable_extensions; do
9738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9739     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9741     break 2
9742   fi
9743 done
9744   done
9745 IFS=$as_save_IFS
9746
9747   ;;
9748 esac
9749 fi
9750 PYTHON=$ac_cv_path_PYTHON
9751 if test -n "$PYTHON"; then
9752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9753 $as_echo "$PYTHON" >&6; }
9754 else
9755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756 $as_echo "no" >&6; }
9757 fi
9758
9759
9760   test -n "$PYTHON" && break
9761 done
9762
9763 else
9764   # Report the value of PYTHON in configure's output in all cases.
9765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9766 $as_echo_n "checking for PYTHON... " >&6; }
9767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9768 $as_echo "$PYTHON" >&6; }
9769 fi
9770
9771 if test x"$PYTHON" = x""; then
9772   as_fn_error $? "Python not found" "$LINENO" 5
9773 fi
9774
9775
9776 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9778 $as_echo "$as_me: using python $python_fullversion" >&6;}
9779 # python_fullversion is typically n.n.n plus some trailing junk
9780 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9781 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9782 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9783 # Reject unsupported Python versions as soon as practical.
9784 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9785   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9786 fi
9787
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9789 $as_echo_n "checking for Python distutils module... " >&6; }
9790 if "${PYTHON}" -c 'import distutils' 2>&5
9791 then
9792     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9793 $as_echo "yes" >&6; }
9794 else
9795     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9796 $as_echo "no" >&6; }
9797     as_fn_error $? "distutils module not found" "$LINENO" 5
9798 fi
9799
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9801 $as_echo_n "checking Python configuration directory... " >&6; }
9802 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9804 $as_echo "$python_configdir" >&6; }
9805
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9807 $as_echo_n "checking Python include directories... " >&6; }
9808 python_includespec=`${PYTHON} -c "
9809 import distutils.sysconfig
9810 a = '-I' + distutils.sysconfig.get_python_inc(False)
9811 b = '-I' + distutils.sysconfig.get_python_inc(True)
9812 if a == b:
9813     print(a)
9814 else:
9815     print(a + ' ' + b)"`
9816 if test "$PORTNAME" = win32 ; then
9817     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9818 fi
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9820 $as_echo "$python_includespec" >&6; }
9821
9822
9823
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9825 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9826
9827 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9828 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9829
9830 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9831 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9832 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9833 then
9834         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9835         found_shlib=1
9836 else
9837         # Otherwise, guess the base name of the shlib.
9838         # LDVERSION was added in Python 3.2, before that use VERSION,
9839         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9840         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9841         if test x"${python_ldversion}" != x""; then
9842                 ldlibrary="python${python_ldversion}"
9843         else
9844                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9845                 if test x"${python_version_var}" != x""; then
9846                         ldlibrary="python${python_version_var}"
9847                 else
9848                         ldlibrary="python${python_version}"
9849                 fi
9850         fi
9851         # Search for a likely-looking file.
9852         found_shlib=0
9853         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9854         do
9855                 # We don't know the platform DLSUFFIX here, so check 'em all.
9856                 for e in .so .dll .dylib .sl; do
9857                         if test -e "$d/lib${ldlibrary}$e"; then
9858                                 python_libdir="$d"
9859                                 found_shlib=1
9860                                 break 2
9861                         fi
9862                 done
9863         done
9864         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9865         # (".so.n.n") as well. However, check this only after failing to find
9866         # ".so" anywhere, because yet other platforms (Debian) put the .so
9867         # symlink in a different directory from the underlying versioned shlib.
9868         if test "$found_shlib" != 1; then
9869                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9870                 do
9871                         for f in "$d/lib${ldlibrary}.so."* ; do
9872                                 if test -e "$f"; then
9873                                         python_libdir="$d"
9874                                         found_shlib=1
9875                                         break 2
9876                                 fi
9877                         done
9878                 done
9879         fi
9880         # As usual, Windows has its own ideas.  Possible default library
9881         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9882         # and the "lib" prefix might not be there.
9883         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9884                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9885                 do
9886                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9887                                 if test -e "$f"; then
9888                                         python_libdir="$d"
9889                                         found_shlib=1
9890                                         break 2
9891                                 fi
9892                         done
9893                 done
9894         fi
9895 fi
9896 if test "$found_shlib" != 1; then
9897         as_fn_error $? "could not find shared library for Python
9898 You might have to rebuild your Python installation.  Refer to the
9899 documentation for details.  Use --without-python to disable building
9900 PL/Python." "$LINENO" 5
9901 fi
9902 python_libspec="-L${python_libdir} -l${ldlibrary}"
9903
9904 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9905
9906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9907 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9908
9909
9910
9911 fi
9912
9913 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9914   if test -z "$ZIC"; then
9915   for ac_prog in zic
9916 do
9917   # Extract the first word of "$ac_prog", so it can be a program name with args.
9918 set dummy $ac_prog; ac_word=$2
9919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9920 $as_echo_n "checking for $ac_word... " >&6; }
9921 if ${ac_cv_path_ZIC+:} false; then :
9922   $as_echo_n "(cached) " >&6
9923 else
9924   case $ZIC in
9925   [\\/]* | ?:[\\/]*)
9926   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9927   ;;
9928   *)
9929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9930 for as_dir in $PATH
9931 do
9932   IFS=$as_save_IFS
9933   test -z "$as_dir" && as_dir=.
9934     for ac_exec_ext in '' $ac_executable_extensions; do
9935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9936     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9938     break 2
9939   fi
9940 done
9941   done
9942 IFS=$as_save_IFS
9943
9944   ;;
9945 esac
9946 fi
9947 ZIC=$ac_cv_path_ZIC
9948 if test -n "$ZIC"; then
9949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9950 $as_echo "$ZIC" >&6; }
9951 else
9952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9953 $as_echo "no" >&6; }
9954 fi
9955
9956
9957   test -n "$ZIC" && break
9958 done
9959
9960 else
9961   # Report the value of ZIC in configure's output in all cases.
9962   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9963 $as_echo_n "checking for ZIC... " >&6; }
9964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9965 $as_echo "$ZIC" >&6; }
9966 fi
9967
9968   if test -z "$ZIC"; then
9969     as_fn_error $? "
9970 When cross-compiling, either use the option --with-system-tzdata to use
9971 existing time-zone data, or set the environment variable ZIC to a zic
9972 program to use during the build." "$LINENO" 5
9973   fi
9974 fi
9975
9976 #
9977 # Pthreads
9978 #
9979 # For each platform, we need to know about any special compile and link
9980 # libraries, and whether the normal C function names are thread-safe.
9981 # See the comment at the top of src/port/thread.c for more information.
9982 # WIN32 doesn't need the pthread tests;  it always uses threads
9983 #
9984 # These tests are run before the library-tests, because linking with the
9985 # other libraries can pull in the pthread functions as a side-effect.  We
9986 # want to use the -pthread or similar flags directly, and not rely on
9987 # the side-effects of linking with some other library.
9988
9989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
9990 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
9991 if ${ac_cv_path_SED+:} false; then :
9992   $as_echo_n "(cached) " >&6
9993 else
9994             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
9995      for ac_i in 1 2 3 4 5 6 7; do
9996        ac_script="$ac_script$as_nl$ac_script"
9997      done
9998      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
9999      { ac_script=; unset ac_script;}
10000      if test -z "$SED"; then
10001   ac_path_SED_found=false
10002   # Loop through the user's path and test for each of PROGNAME-LIST
10003   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10004 for as_dir in $PATH
10005 do
10006   IFS=$as_save_IFS
10007   test -z "$as_dir" && as_dir=.
10008     for ac_prog in sed gsed; do
10009     for ac_exec_ext in '' $ac_executable_extensions; do
10010       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10011       as_fn_executable_p "$ac_path_SED" || continue
10012 # Check for GNU ac_path_SED and select it if it is found.
10013   # Check for GNU $ac_path_SED
10014 case `"$ac_path_SED" --version 2>&1` in
10015 *GNU*)
10016   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10017 *)
10018   ac_count=0
10019   $as_echo_n 0123456789 >"conftest.in"
10020   while :
10021   do
10022     cat "conftest.in" "conftest.in" >"conftest.tmp"
10023     mv "conftest.tmp" "conftest.in"
10024     cp "conftest.in" "conftest.nl"
10025     $as_echo '' >> "conftest.nl"
10026     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10027     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10028     as_fn_arith $ac_count + 1 && ac_count=$as_val
10029     if test $ac_count -gt ${ac_path_SED_max-0}; then
10030       # Best one so far, save it but keep looking for a better one
10031       ac_cv_path_SED="$ac_path_SED"
10032       ac_path_SED_max=$ac_count
10033     fi
10034     # 10*(2^10) chars as input seems more than enough
10035     test $ac_count -gt 10 && break
10036   done
10037   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10038 esac
10039
10040       $ac_path_SED_found && break 3
10041     done
10042   done
10043   done
10044 IFS=$as_save_IFS
10045   if test -z "$ac_cv_path_SED"; then
10046     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10047   fi
10048 else
10049   ac_cv_path_SED=$SED
10050 fi
10051
10052 fi
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10054 $as_echo "$ac_cv_path_SED" >&6; }
10055  SED="$ac_cv_path_SED"
10056   rm -f conftest.sed
10057
10058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10059 $as_echo_n "checking for ANSI C header files... " >&6; }
10060 if ${ac_cv_header_stdc+:} false; then :
10061   $as_echo_n "(cached) " >&6
10062 else
10063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10064 /* end confdefs.h.  */
10065 #include <stdlib.h>
10066 #include <stdarg.h>
10067 #include <string.h>
10068 #include <float.h>
10069
10070 int
10071 main ()
10072 {
10073
10074   ;
10075   return 0;
10076 }
10077 _ACEOF
10078 if ac_fn_c_try_compile "$LINENO"; then :
10079   ac_cv_header_stdc=yes
10080 else
10081   ac_cv_header_stdc=no
10082 fi
10083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10084
10085 if test $ac_cv_header_stdc = yes; then
10086   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10088 /* end confdefs.h.  */
10089 #include <string.h>
10090
10091 _ACEOF
10092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10093   $EGREP "memchr" >/dev/null 2>&1; then :
10094
10095 else
10096   ac_cv_header_stdc=no
10097 fi
10098 rm -f conftest*
10099
10100 fi
10101
10102 if test $ac_cv_header_stdc = yes; then
10103   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10105 /* end confdefs.h.  */
10106 #include <stdlib.h>
10107
10108 _ACEOF
10109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10110   $EGREP "free" >/dev/null 2>&1; then :
10111
10112 else
10113   ac_cv_header_stdc=no
10114 fi
10115 rm -f conftest*
10116
10117 fi
10118
10119 if test $ac_cv_header_stdc = yes; then
10120   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10121   if test "$cross_compiling" = yes; then :
10122   :
10123 else
10124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10125 /* end confdefs.h.  */
10126 #include <ctype.h>
10127 #include <stdlib.h>
10128 #if ((' ' & 0x0FF) == 0x020)
10129 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10130 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10131 #else
10132 # define ISLOWER(c) \
10133                    (('a' <= (c) && (c) <= 'i') \
10134                      || ('j' <= (c) && (c) <= 'r') \
10135                      || ('s' <= (c) && (c) <= 'z'))
10136 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10137 #endif
10138
10139 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10140 int
10141 main ()
10142 {
10143   int i;
10144   for (i = 0; i < 256; i++)
10145     if (XOR (islower (i), ISLOWER (i))
10146         || toupper (i) != TOUPPER (i))
10147       return 2;
10148   return 0;
10149 }
10150 _ACEOF
10151 if ac_fn_c_try_run "$LINENO"; then :
10152
10153 else
10154   ac_cv_header_stdc=no
10155 fi
10156 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10157   conftest.$ac_objext conftest.beam conftest.$ac_ext
10158 fi
10159
10160 fi
10161 fi
10162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10163 $as_echo "$ac_cv_header_stdc" >&6; }
10164 if test $ac_cv_header_stdc = yes; then
10165
10166 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10167
10168 fi
10169
10170 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10171 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10172                   inttypes.h stdint.h unistd.h
10173 do :
10174   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10175 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10176 "
10177 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10178   cat >>confdefs.h <<_ACEOF
10179 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10180 _ACEOF
10181
10182 fi
10183
10184 done
10185
10186
10187 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10188    # then
10189
10190
10191
10192
10193 ac_ext=c
10194 ac_cpp='$CPP $CPPFLAGS'
10195 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10196 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10197 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10198
10199 ax_pthread_ok=no
10200
10201 # We used to check for pthread.h first, but this fails if pthread.h
10202 # requires special compiler flags (e.g. on Tru64 or Sequent).
10203 # It gets checked for in the link test anyway.
10204
10205 # First of all, check if the user has set any of the PTHREAD_LIBS,
10206 # etcetera environment variables, and if threads linking works using
10207 # them:
10208 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10209         ax_pthread_save_CC="$CC"
10210         ax_pthread_save_CFLAGS="$CFLAGS"
10211         ax_pthread_save_LIBS="$LIBS"
10212         if test "x$PTHREAD_CC" != "x"; then :
10213   CC="$PTHREAD_CC"
10214 fi
10215         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10216         LIBS="$PTHREAD_LIBS $LIBS"
10217         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10218 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10219         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10220 /* end confdefs.h.  */
10221
10222 /* Override any GCC internal prototype to avoid an error.
10223    Use char because int might match the return type of a GCC
10224    builtin and then its argument prototype would still apply.  */
10225 #ifdef __cplusplus
10226 extern "C"
10227 #endif
10228 char pthread_join ();
10229 int
10230 main ()
10231 {
10232 return pthread_join ();
10233   ;
10234   return 0;
10235 }
10236 _ACEOF
10237 if ac_fn_c_try_link "$LINENO"; then :
10238   ax_pthread_ok=yes
10239 fi
10240 rm -f core conftest.err conftest.$ac_objext \
10241     conftest$ac_exeext conftest.$ac_ext
10242         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10243 $as_echo "$ax_pthread_ok" >&6; }
10244         if test "x$ax_pthread_ok" = "xno"; then
10245                 PTHREAD_LIBS=""
10246                 PTHREAD_CFLAGS=""
10247         fi
10248         CC="$ax_pthread_save_CC"
10249         CFLAGS="$ax_pthread_save_CFLAGS"
10250         LIBS="$ax_pthread_save_LIBS"
10251 fi
10252
10253 # We must check for the threads library under a number of different
10254 # names; the ordering is very important because some systems
10255 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10256 # libraries is broken (non-POSIX).
10257
10258 # Create a list of thread flags to try.  Items starting with a "-" are
10259 # C compiler flags, and other items are library names, except for "none"
10260 # which indicates that we try without any flags at all, and "pthread-config"
10261 # which is a program returning the flags for the Pth emulation library.
10262
10263 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10264
10265 # The ordering *is* (sometimes) important.  Some notes on the
10266 # individual items follow:
10267
10268 # pthreads: AIX (must check this before -lpthread)
10269 # none: in case threads are in libc; should be tried before -Kthread and
10270 #       other compiler flags to prevent continual compiler warnings
10271 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10272 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10273 #           (Note: HP C rejects this with "bad form for `-t' option")
10274 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10275 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10276 #      doesn't hurt to check since this sometimes defines pthreads and
10277 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10278 #      is present but should not be used directly; and before -mthreads,
10279 #      because the compiler interprets this as "-mt" + "-hreads")
10280 # -mthreads: Mingw32/gcc, Lynx/gcc
10281 # pthread: Linux, etcetera
10282 # --thread-safe: KAI C++
10283 # pthread-config: use pthread-config program (for GNU Pth library)
10284
10285 case $host_os in
10286
10287         freebsd*)
10288
10289         # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10290         # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10291
10292         ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10293         ;;
10294
10295         hpux*)
10296
10297         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10298         # multi-threading and also sets -lpthread."
10299
10300         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10301         ;;
10302
10303         openedition*)
10304
10305         # IBM z/OS requires a feature-test macro to be defined in order to
10306         # enable POSIX threads at all, so give the user a hint if this is
10307         # not set. (We don't define these ourselves, as they can affect
10308         # other portions of the system API in unpredictable ways.)
10309
10310         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10311 /* end confdefs.h.  */
10312
10313 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10314              AX_PTHREAD_ZOS_MISSING
10315 #            endif
10316
10317 _ACEOF
10318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10319   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10320   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10321 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10322 fi
10323 rm -f conftest*
10324
10325         ;;
10326
10327         solaris*)
10328
10329         # On Solaris (at least, for some versions), libc contains stubbed
10330         # (non-functional) versions of the pthreads routines, so link-based
10331         # tests will erroneously succeed. (N.B.: The stubs are missing
10332         # pthread_cleanup_push, or rather a function called by this macro,
10333         # so we could check for that, but who knows whether they'll stub
10334         # that too in a future libc.)  So we'll check first for the
10335         # standard Solaris way of linking pthreads (-mt -lpthread).
10336
10337         ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10338         ;;
10339 esac
10340
10341 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10342
10343 if test "x$GCC" = "xyes"; then :
10344   ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10345 fi
10346
10347 # The presence of a feature test macro requesting re-entrant function
10348 # definitions is, on some systems, a strong hint that pthreads support is
10349 # correctly enabled
10350
10351 case $host_os in
10352         darwin* | hpux* | linux* | osf* | solaris*)
10353         ax_pthread_check_macro="_REENTRANT"
10354         ;;
10355
10356         aix*)
10357         ax_pthread_check_macro="_THREAD_SAFE"
10358         ;;
10359
10360         *)
10361         ax_pthread_check_macro="--"
10362         ;;
10363 esac
10364 if test "x$ax_pthread_check_macro" = "x--"; then :
10365   ax_pthread_check_cond=0
10366 else
10367   ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10368 fi
10369
10370 # Are we compiling with Clang?
10371
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10373 $as_echo_n "checking whether $CC is Clang... " >&6; }
10374 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10375   $as_echo_n "(cached) " >&6
10376 else
10377   ax_cv_PTHREAD_CLANG=no
10378      # Note that Autoconf sets GCC=yes for Clang as well as GCC
10379      if test "x$GCC" = "xyes"; then
10380         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10381 /* end confdefs.h.  */
10382 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10383 #            if defined(__clang__) && defined(__llvm__)
10384              AX_PTHREAD_CC_IS_CLANG
10385 #            endif
10386
10387 _ACEOF
10388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10389   $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10390   ax_cv_PTHREAD_CLANG=yes
10391 fi
10392 rm -f conftest*
10393
10394      fi
10395
10396 fi
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10398 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10399 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10400
10401 ax_pthread_clang_warning=no
10402
10403 # Clang needs special handling, because older versions handle the -pthread
10404 # option in a rather... idiosyncratic way
10405
10406 if test "x$ax_pthread_clang" = "xyes"; then
10407
10408         # Clang takes -pthread; it has never supported any other flag
10409
10410         # (Note 1: This will need to be revisited if a system that Clang
10411         # supports has POSIX threads in a separate library.  This tends not
10412         # to be the way of modern systems, but it's conceivable.)
10413
10414         # (Note 2: On some systems, notably Darwin, -pthread is not needed
10415         # to get POSIX threads support; the API is always present and
10416         # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
10417         # -pthread does define _REENTRANT, and while the Darwin headers
10418         # ignore this macro, third-party headers might not.)
10419
10420         PTHREAD_CFLAGS="-pthread"
10421         PTHREAD_LIBS=
10422
10423         ax_pthread_ok=yes
10424
10425         # However, older versions of Clang make a point of warning the user
10426         # that, in an invocation where only linking and no compilation is
10427         # taking place, the -pthread option has no effect ("argument unused
10428         # during compilation").  They expect -pthread to be passed in only
10429         # when source code is being compiled.
10430         #
10431         # Problem is, this is at odds with the way Automake and most other
10432         # C build frameworks function, which is that the same flags used in
10433         # compilation (CFLAGS) are also used in linking.  Many systems
10434         # supported by AX_PTHREAD require exactly this for POSIX threads
10435         # support, and in fact it is often not straightforward to specify a
10436         # flag that is used only in the compilation phase and not in
10437         # linking.  Such a scenario is extremely rare in practice.
10438         #
10439         # Even though use of the -pthread flag in linking would only print
10440         # a warning, this can be a nuisance for well-run software projects
10441         # that build with -Werror.  So if the active version of Clang has
10442         # this misfeature, we search for an option to squash it.
10443
10444         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10445 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10446 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10447   $as_echo_n "(cached) " >&6
10448 else
10449   ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10450              # Create an alternate version of $ac_link that compiles and
10451              # links in two steps (.c -> .o, .o -> exe) instead of one
10452              # (.c -> exe), because the warning occurs only in the second
10453              # step
10454              ax_pthread_save_ac_link="$ac_link"
10455              ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10456              ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10457              ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10458              ax_pthread_save_CFLAGS="$CFLAGS"
10459              for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10460                 if test "x$ax_pthread_try" = "xunknown"; then :
10461   break
10462 fi
10463                 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10464                 ac_link="$ax_pthread_save_ac_link"
10465                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10466 /* end confdefs.h.  */
10467 int main(void){return 0;}
10468 _ACEOF
10469 if ac_fn_c_try_link "$LINENO"; then :
10470   ac_link="$ax_pthread_2step_ac_link"
10471                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10472 /* end confdefs.h.  */
10473 int main(void){return 0;}
10474 _ACEOF
10475 if ac_fn_c_try_link "$LINENO"; then :
10476   break
10477 fi
10478 rm -f core conftest.err conftest.$ac_objext \
10479     conftest$ac_exeext conftest.$ac_ext
10480
10481 fi
10482 rm -f core conftest.err conftest.$ac_objext \
10483     conftest$ac_exeext conftest.$ac_ext
10484              done
10485              ac_link="$ax_pthread_save_ac_link"
10486              CFLAGS="$ax_pthread_save_CFLAGS"
10487              if test "x$ax_pthread_try" = "x"; then :
10488   ax_pthread_try=no
10489 fi
10490              ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10491
10492 fi
10493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10494 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10495
10496         case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10497                 no | unknown) ;;
10498                 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10499         esac
10500
10501 fi # $ax_pthread_clang = yes
10502
10503 if test "x$ax_pthread_ok" = "xno"; then
10504 for ax_pthread_try_flag in $ax_pthread_flags; do
10505
10506         case $ax_pthread_try_flag in
10507                 none)
10508                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10509 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10510                 ;;
10511
10512                 -mt,pthread)
10513                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10514 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10515                 PTHREAD_CFLAGS="-mt"
10516                 PTHREAD_LIBS="-lpthread"
10517                 ;;
10518
10519                 -*)
10520                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10521 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10522                 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10523                 ;;
10524
10525                 pthread-config)
10526                 # Extract the first word of "pthread-config", so it can be a program name with args.
10527 set dummy pthread-config; ac_word=$2
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529 $as_echo_n "checking for $ac_word... " >&6; }
10530 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10531   $as_echo_n "(cached) " >&6
10532 else
10533   if test -n "$ax_pthread_config"; then
10534   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10535 else
10536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10537 for as_dir in $PATH
10538 do
10539   IFS=$as_save_IFS
10540   test -z "$as_dir" && as_dir=.
10541     for ac_exec_ext in '' $ac_executable_extensions; do
10542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10543     ac_cv_prog_ax_pthread_config="yes"
10544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10545     break 2
10546   fi
10547 done
10548   done
10549 IFS=$as_save_IFS
10550
10551   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10552 fi
10553 fi
10554 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10555 if test -n "$ax_pthread_config"; then
10556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10557 $as_echo "$ax_pthread_config" >&6; }
10558 else
10559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10560 $as_echo "no" >&6; }
10561 fi
10562
10563
10564                 if test "x$ax_pthread_config" = "xno"; then :
10565   continue
10566 fi
10567                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10568                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10569                 ;;
10570
10571                 *)
10572                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
10573 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
10574                 PTHREAD_LIBS="-l$ax_pthread_try_flag"
10575                 ;;
10576         esac
10577
10578         ax_pthread_save_CFLAGS="$CFLAGS"
10579         ax_pthread_save_LIBS="$LIBS"
10580         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10581         LIBS="$PTHREAD_LIBS $LIBS"
10582
10583         # Check for various functions.  We must include pthread.h,
10584         # since some functions may be macros.  (On the Sequent, we
10585         # need a special flag -Kthread to make this header compile.)
10586         # We check for pthread_join because it is in -lpthread on IRIX
10587         # while pthread_create is in libc.  We check for pthread_attr_init
10588         # due to DEC craziness with -lpthreads.  We check for
10589         # pthread_cleanup_push because it is one of the few pthread
10590         # functions on Solaris that doesn't have a non-functional libc stub.
10591         # We try pthread_create on general principles.
10592
10593         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10594 /* end confdefs.h.  */
10595 #include <pthread.h>
10596 #                       if $ax_pthread_check_cond
10597 #                        error "$ax_pthread_check_macro must be defined"
10598 #                       endif
10599                         static void routine(void *a) { a = 0; }
10600                         static void *start_routine(void *a) { return a; }
10601 int
10602 main ()
10603 {
10604 pthread_t th; pthread_attr_t attr;
10605                         pthread_create(&th, 0, start_routine, 0);
10606                         pthread_join(th, 0);
10607                         pthread_attr_init(&attr);
10608                         pthread_cleanup_push(routine, 0);
10609                         pthread_cleanup_pop(0) /* ; */
10610   ;
10611   return 0;
10612 }
10613 _ACEOF
10614 if ac_fn_c_try_link "$LINENO"; then :
10615   ax_pthread_ok=yes
10616 fi
10617 rm -f core conftest.err conftest.$ac_objext \
10618     conftest$ac_exeext conftest.$ac_ext
10619
10620         CFLAGS="$ax_pthread_save_CFLAGS"
10621         LIBS="$ax_pthread_save_LIBS"
10622
10623         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10624 $as_echo "$ax_pthread_ok" >&6; }
10625         if test "x$ax_pthread_ok" = "xyes"; then :
10626   break
10627 fi
10628
10629         PTHREAD_LIBS=""
10630         PTHREAD_CFLAGS=""
10631 done
10632 fi
10633
10634 # Various other checks:
10635 if test "x$ax_pthread_ok" = "xyes"; then
10636         ax_pthread_save_CFLAGS="$CFLAGS"
10637         ax_pthread_save_LIBS="$LIBS"
10638         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10639         LIBS="$PTHREAD_LIBS $LIBS"
10640
10641         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10642         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10643 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10644 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10645   $as_echo_n "(cached) " >&6
10646 else
10647   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10648              for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10649                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10650 /* end confdefs.h.  */
10651 #include <pthread.h>
10652 int
10653 main ()
10654 {
10655 int attr = $ax_pthread_attr; return attr /* ; */
10656   ;
10657   return 0;
10658 }
10659 _ACEOF
10660 if ac_fn_c_try_link "$LINENO"; then :
10661   ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
10662 fi
10663 rm -f core conftest.err conftest.$ac_objext \
10664     conftest$ac_exeext conftest.$ac_ext
10665              done
10666
10667 fi
10668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10669 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10670         if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
10671                test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
10672                test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
10673
10674 cat >>confdefs.h <<_ACEOF
10675 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10676 _ACEOF
10677
10678                ax_pthread_joinable_attr_defined=yes
10679
10680 fi
10681
10682         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
10683 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
10684 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10685   $as_echo_n "(cached) " >&6
10686 else
10687   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10688              case $host_os in
10689              solaris*)
10690              ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
10691              ;;
10692              esac
10693
10694 fi
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10696 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10697         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10698                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10699   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10700                ax_pthread_special_flags_added=yes
10701 fi
10702
10703         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10704 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10705 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10706   $as_echo_n "(cached) " >&6
10707 else
10708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10709 /* end confdefs.h.  */
10710 #include <pthread.h>
10711 int
10712 main ()
10713 {
10714 int i = PTHREAD_PRIO_INHERIT;
10715   ;
10716   return 0;
10717 }
10718 _ACEOF
10719 if ac_fn_c_try_link "$LINENO"; then :
10720   ax_cv_PTHREAD_PRIO_INHERIT=yes
10721 else
10722   ax_cv_PTHREAD_PRIO_INHERIT=no
10723 fi
10724 rm -f core conftest.err conftest.$ac_objext \
10725     conftest$ac_exeext conftest.$ac_ext
10726
10727 fi
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10729 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10730         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
10731                test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
10732
10733 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10734
10735                ax_pthread_prio_inherit_defined=yes
10736
10737 fi
10738
10739         CFLAGS="$ax_pthread_save_CFLAGS"
10740         LIBS="$ax_pthread_save_LIBS"
10741
10742         # More AIX lossage: compile with *_r variant
10743         if test "x$GCC" != "xyes"; then
10744             case $host_os in
10745                 aix*)
10746                 case "x/$CC" in #(
10747   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10748     #handle absolute path differently from PATH based program lookup
10749                      case "x$CC" in #(
10750   x/*) :
10751     if as_fn_executable_p ${CC}_r; then :
10752   PTHREAD_CC="${CC}_r"
10753 fi ;; #(
10754   *) :
10755     for ac_prog in ${CC}_r
10756 do
10757   # Extract the first word of "$ac_prog", so it can be a program name with args.
10758 set dummy $ac_prog; ac_word=$2
10759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10760 $as_echo_n "checking for $ac_word... " >&6; }
10761 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10762   $as_echo_n "(cached) " >&6
10763 else
10764   if test -n "$PTHREAD_CC"; then
10765   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10766 else
10767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10768 for as_dir in $PATH
10769 do
10770   IFS=$as_save_IFS
10771   test -z "$as_dir" && as_dir=.
10772     for ac_exec_ext in '' $ac_executable_extensions; do
10773   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10774     ac_cv_prog_PTHREAD_CC="$ac_prog"
10775     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10776     break 2
10777   fi
10778 done
10779   done
10780 IFS=$as_save_IFS
10781
10782 fi
10783 fi
10784 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10785 if test -n "$PTHREAD_CC"; then
10786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10787 $as_echo "$PTHREAD_CC" >&6; }
10788 else
10789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790 $as_echo "no" >&6; }
10791 fi
10792
10793
10794   test -n "$PTHREAD_CC" && break
10795 done
10796 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10797  ;;
10798 esac ;; #(
10799   *) :
10800      ;;
10801 esac
10802                 ;;
10803             esac
10804         fi
10805 fi
10806
10807 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10808
10809
10810
10811
10812
10813 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10814 if test "x$ax_pthread_ok" = "xyes"; then
10815
10816 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10817
10818         :
10819 else
10820         ax_pthread_ok=no
10821
10822 fi
10823 ac_ext=c
10824 ac_cpp='$CPP $CPPFLAGS'
10825 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10826 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10827 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10828
10829         # set thread flags
10830
10831 # Some platforms use these, so just define them.  They can't hurt if they
10832 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10833 # enables 5-arg getpwuid_r, among other things.
10834 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10835
10836 # Check for *_r functions
10837 _CFLAGS="$CFLAGS"
10838 _LIBS="$LIBS"
10839 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10840 LIBS="$LIBS $PTHREAD_LIBS"
10841
10842 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10843 if test "x$ac_cv_header_pthread_h" = xyes; then :
10844
10845 else
10846   as_fn_error $? "
10847 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10848 fi
10849
10850
10851
10852 for ac_func in strerror_r getpwuid_r gethostbyname_r
10853 do :
10854   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10855 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10856 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10857   cat >>confdefs.h <<_ACEOF
10858 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10859 _ACEOF
10860
10861 fi
10862 done
10863
10864
10865 # Do test here with the proper thread flags
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10867 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10868 if ${pgac_cv_func_strerror_r_int+:} false; then :
10869   $as_echo_n "(cached) " >&6
10870 else
10871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10872 /* end confdefs.h.  */
10873 #include <string.h>
10874 int
10875 main ()
10876 {
10877 char buf[100];
10878   switch (strerror_r(1, buf, sizeof(buf)))
10879   { case 0: break; default: break; }
10880
10881   ;
10882   return 0;
10883 }
10884 _ACEOF
10885 if ac_fn_c_try_compile "$LINENO"; then :
10886   pgac_cv_func_strerror_r_int=yes
10887 else
10888   pgac_cv_func_strerror_r_int=no
10889 fi
10890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10891 fi
10892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10893 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10894 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10895
10896 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10897
10898 fi
10899
10900
10901 CFLAGS="$_CFLAGS"
10902 LIBS="$_LIBS"
10903
10904
10905 else
10906    # else
10907 # do not use values from template file
10908 PTHREAD_CFLAGS=
10909 PTHREAD_LIBS=
10910
10911 fi # fi
10912
10913
10914
10915
10916
10917 ##
10918 ## Libraries
10919 ##
10920 ## Most libraries are included only if they demonstrably provide a function
10921 ## we need, but libm is an exception: always include it, because there are
10922 ## too many compilers that play cute optimization games that will break
10923 ## probes for standard functions such as pow().
10924 ##
10925
10926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10927 $as_echo_n "checking for main in -lm... " >&6; }
10928 if ${ac_cv_lib_m_main+:} false; then :
10929   $as_echo_n "(cached) " >&6
10930 else
10931   ac_check_lib_save_LIBS=$LIBS
10932 LIBS="-lm  $LIBS"
10933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10934 /* end confdefs.h.  */
10935
10936
10937 int
10938 main ()
10939 {
10940 return main ();
10941   ;
10942   return 0;
10943 }
10944 _ACEOF
10945 if ac_fn_c_try_link "$LINENO"; then :
10946   ac_cv_lib_m_main=yes
10947 else
10948   ac_cv_lib_m_main=no
10949 fi
10950 rm -f core conftest.err conftest.$ac_objext \
10951     conftest$ac_exeext conftest.$ac_ext
10952 LIBS=$ac_check_lib_save_LIBS
10953 fi
10954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10955 $as_echo "$ac_cv_lib_m_main" >&6; }
10956 if test "x$ac_cv_lib_m_main" = xyes; then :
10957   cat >>confdefs.h <<_ACEOF
10958 #define HAVE_LIBM 1
10959 _ACEOF
10960
10961   LIBS="-lm $LIBS"
10962
10963 fi
10964
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10966 $as_echo_n "checking for library containing setproctitle... " >&6; }
10967 if ${ac_cv_search_setproctitle+:} false; then :
10968   $as_echo_n "(cached) " >&6
10969 else
10970   ac_func_search_save_LIBS=$LIBS
10971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10972 /* end confdefs.h.  */
10973
10974 /* Override any GCC internal prototype to avoid an error.
10975    Use char because int might match the return type of a GCC
10976    builtin and then its argument prototype would still apply.  */
10977 #ifdef __cplusplus
10978 extern "C"
10979 #endif
10980 char setproctitle ();
10981 int
10982 main ()
10983 {
10984 return setproctitle ();
10985   ;
10986   return 0;
10987 }
10988 _ACEOF
10989 for ac_lib in '' util; do
10990   if test -z "$ac_lib"; then
10991     ac_res="none required"
10992   else
10993     ac_res=-l$ac_lib
10994     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10995   fi
10996   if ac_fn_c_try_link "$LINENO"; then :
10997   ac_cv_search_setproctitle=$ac_res
10998 fi
10999 rm -f core conftest.err conftest.$ac_objext \
11000     conftest$ac_exeext
11001   if ${ac_cv_search_setproctitle+:} false; then :
11002   break
11003 fi
11004 done
11005 if ${ac_cv_search_setproctitle+:} false; then :
11006
11007 else
11008   ac_cv_search_setproctitle=no
11009 fi
11010 rm conftest.$ac_ext
11011 LIBS=$ac_func_search_save_LIBS
11012 fi
11013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11014 $as_echo "$ac_cv_search_setproctitle" >&6; }
11015 ac_res=$ac_cv_search_setproctitle
11016 if test "$ac_res" != no; then :
11017   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11018
11019 fi
11020
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11022 $as_echo_n "checking for library containing dlopen... " >&6; }
11023 if ${ac_cv_search_dlopen+:} false; then :
11024   $as_echo_n "(cached) " >&6
11025 else
11026   ac_func_search_save_LIBS=$LIBS
11027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11028 /* end confdefs.h.  */
11029
11030 /* Override any GCC internal prototype to avoid an error.
11031    Use char because int might match the return type of a GCC
11032    builtin and then its argument prototype would still apply.  */
11033 #ifdef __cplusplus
11034 extern "C"
11035 #endif
11036 char dlopen ();
11037 int
11038 main ()
11039 {
11040 return dlopen ();
11041   ;
11042   return 0;
11043 }
11044 _ACEOF
11045 for ac_lib in '' dl; do
11046   if test -z "$ac_lib"; then
11047     ac_res="none required"
11048   else
11049     ac_res=-l$ac_lib
11050     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11051   fi
11052   if ac_fn_c_try_link "$LINENO"; then :
11053   ac_cv_search_dlopen=$ac_res
11054 fi
11055 rm -f core conftest.err conftest.$ac_objext \
11056     conftest$ac_exeext
11057   if ${ac_cv_search_dlopen+:} false; then :
11058   break
11059 fi
11060 done
11061 if ${ac_cv_search_dlopen+:} false; then :
11062
11063 else
11064   ac_cv_search_dlopen=no
11065 fi
11066 rm conftest.$ac_ext
11067 LIBS=$ac_func_search_save_LIBS
11068 fi
11069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11070 $as_echo "$ac_cv_search_dlopen" >&6; }
11071 ac_res=$ac_cv_search_dlopen
11072 if test "$ac_res" != no; then :
11073   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11074
11075 fi
11076
11077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11078 $as_echo_n "checking for library containing socket... " >&6; }
11079 if ${ac_cv_search_socket+:} false; then :
11080   $as_echo_n "(cached) " >&6
11081 else
11082   ac_func_search_save_LIBS=$LIBS
11083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11084 /* end confdefs.h.  */
11085
11086 /* Override any GCC internal prototype to avoid an error.
11087    Use char because int might match the return type of a GCC
11088    builtin and then its argument prototype would still apply.  */
11089 #ifdef __cplusplus
11090 extern "C"
11091 #endif
11092 char socket ();
11093 int
11094 main ()
11095 {
11096 return socket ();
11097   ;
11098   return 0;
11099 }
11100 _ACEOF
11101 for ac_lib in '' socket ws2_32; do
11102   if test -z "$ac_lib"; then
11103     ac_res="none required"
11104   else
11105     ac_res=-l$ac_lib
11106     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11107   fi
11108   if ac_fn_c_try_link "$LINENO"; then :
11109   ac_cv_search_socket=$ac_res
11110 fi
11111 rm -f core conftest.err conftest.$ac_objext \
11112     conftest$ac_exeext
11113   if ${ac_cv_search_socket+:} false; then :
11114   break
11115 fi
11116 done
11117 if ${ac_cv_search_socket+:} false; then :
11118
11119 else
11120   ac_cv_search_socket=no
11121 fi
11122 rm conftest.$ac_ext
11123 LIBS=$ac_func_search_save_LIBS
11124 fi
11125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11126 $as_echo "$ac_cv_search_socket" >&6; }
11127 ac_res=$ac_cv_search_socket
11128 if test "$ac_res" != no; then :
11129   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11130
11131 fi
11132
11133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11134 $as_echo_n "checking for library containing shl_load... " >&6; }
11135 if ${ac_cv_search_shl_load+:} false; then :
11136   $as_echo_n "(cached) " >&6
11137 else
11138   ac_func_search_save_LIBS=$LIBS
11139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11140 /* end confdefs.h.  */
11141
11142 /* Override any GCC internal prototype to avoid an error.
11143    Use char because int might match the return type of a GCC
11144    builtin and then its argument prototype would still apply.  */
11145 #ifdef __cplusplus
11146 extern "C"
11147 #endif
11148 char shl_load ();
11149 int
11150 main ()
11151 {
11152 return shl_load ();
11153   ;
11154   return 0;
11155 }
11156 _ACEOF
11157 for ac_lib in '' dld; do
11158   if test -z "$ac_lib"; then
11159     ac_res="none required"
11160   else
11161     ac_res=-l$ac_lib
11162     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11163   fi
11164   if ac_fn_c_try_link "$LINENO"; then :
11165   ac_cv_search_shl_load=$ac_res
11166 fi
11167 rm -f core conftest.err conftest.$ac_objext \
11168     conftest$ac_exeext
11169   if ${ac_cv_search_shl_load+:} false; then :
11170   break
11171 fi
11172 done
11173 if ${ac_cv_search_shl_load+:} false; then :
11174
11175 else
11176   ac_cv_search_shl_load=no
11177 fi
11178 rm conftest.$ac_ext
11179 LIBS=$ac_func_search_save_LIBS
11180 fi
11181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11182 $as_echo "$ac_cv_search_shl_load" >&6; }
11183 ac_res=$ac_cv_search_shl_load
11184 if test "$ac_res" != no; then :
11185   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11186
11187 fi
11188
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11190 $as_echo_n "checking for library containing getopt_long... " >&6; }
11191 if ${ac_cv_search_getopt_long+:} false; then :
11192   $as_echo_n "(cached) " >&6
11193 else
11194   ac_func_search_save_LIBS=$LIBS
11195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11196 /* end confdefs.h.  */
11197
11198 /* Override any GCC internal prototype to avoid an error.
11199    Use char because int might match the return type of a GCC
11200    builtin and then its argument prototype would still apply.  */
11201 #ifdef __cplusplus
11202 extern "C"
11203 #endif
11204 char getopt_long ();
11205 int
11206 main ()
11207 {
11208 return getopt_long ();
11209   ;
11210   return 0;
11211 }
11212 _ACEOF
11213 for ac_lib in '' getopt gnugetopt; do
11214   if test -z "$ac_lib"; then
11215     ac_res="none required"
11216   else
11217     ac_res=-l$ac_lib
11218     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11219   fi
11220   if ac_fn_c_try_link "$LINENO"; then :
11221   ac_cv_search_getopt_long=$ac_res
11222 fi
11223 rm -f core conftest.err conftest.$ac_objext \
11224     conftest$ac_exeext
11225   if ${ac_cv_search_getopt_long+:} false; then :
11226   break
11227 fi
11228 done
11229 if ${ac_cv_search_getopt_long+:} false; then :
11230
11231 else
11232   ac_cv_search_getopt_long=no
11233 fi
11234 rm conftest.$ac_ext
11235 LIBS=$ac_func_search_save_LIBS
11236 fi
11237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11238 $as_echo "$ac_cv_search_getopt_long" >&6; }
11239 ac_res=$ac_cv_search_getopt_long
11240 if test "$ac_res" != no; then :
11241   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11242
11243 fi
11244
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11246 $as_echo_n "checking for library containing crypt... " >&6; }
11247 if ${ac_cv_search_crypt+:} false; then :
11248   $as_echo_n "(cached) " >&6
11249 else
11250   ac_func_search_save_LIBS=$LIBS
11251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11252 /* end confdefs.h.  */
11253
11254 /* Override any GCC internal prototype to avoid an error.
11255    Use char because int might match the return type of a GCC
11256    builtin and then its argument prototype would still apply.  */
11257 #ifdef __cplusplus
11258 extern "C"
11259 #endif
11260 char crypt ();
11261 int
11262 main ()
11263 {
11264 return crypt ();
11265   ;
11266   return 0;
11267 }
11268 _ACEOF
11269 for ac_lib in '' crypt; do
11270   if test -z "$ac_lib"; then
11271     ac_res="none required"
11272   else
11273     ac_res=-l$ac_lib
11274     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11275   fi
11276   if ac_fn_c_try_link "$LINENO"; then :
11277   ac_cv_search_crypt=$ac_res
11278 fi
11279 rm -f core conftest.err conftest.$ac_objext \
11280     conftest$ac_exeext
11281   if ${ac_cv_search_crypt+:} false; then :
11282   break
11283 fi
11284 done
11285 if ${ac_cv_search_crypt+:} false; then :
11286
11287 else
11288   ac_cv_search_crypt=no
11289 fi
11290 rm conftest.$ac_ext
11291 LIBS=$ac_func_search_save_LIBS
11292 fi
11293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11294 $as_echo "$ac_cv_search_crypt" >&6; }
11295 ac_res=$ac_cv_search_crypt
11296 if test "$ac_res" != no; then :
11297   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11298
11299 fi
11300
11301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11302 $as_echo_n "checking for library containing shm_open... " >&6; }
11303 if ${ac_cv_search_shm_open+:} false; then :
11304   $as_echo_n "(cached) " >&6
11305 else
11306   ac_func_search_save_LIBS=$LIBS
11307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11308 /* end confdefs.h.  */
11309
11310 /* Override any GCC internal prototype to avoid an error.
11311    Use char because int might match the return type of a GCC
11312    builtin and then its argument prototype would still apply.  */
11313 #ifdef __cplusplus
11314 extern "C"
11315 #endif
11316 char shm_open ();
11317 int
11318 main ()
11319 {
11320 return shm_open ();
11321   ;
11322   return 0;
11323 }
11324 _ACEOF
11325 for ac_lib in '' rt; do
11326   if test -z "$ac_lib"; then
11327     ac_res="none required"
11328   else
11329     ac_res=-l$ac_lib
11330     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11331   fi
11332   if ac_fn_c_try_link "$LINENO"; then :
11333   ac_cv_search_shm_open=$ac_res
11334 fi
11335 rm -f core conftest.err conftest.$ac_objext \
11336     conftest$ac_exeext
11337   if ${ac_cv_search_shm_open+:} false; then :
11338   break
11339 fi
11340 done
11341 if ${ac_cv_search_shm_open+:} false; then :
11342
11343 else
11344   ac_cv_search_shm_open=no
11345 fi
11346 rm conftest.$ac_ext
11347 LIBS=$ac_func_search_save_LIBS
11348 fi
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11350 $as_echo "$ac_cv_search_shm_open" >&6; }
11351 ac_res=$ac_cv_search_shm_open
11352 if test "$ac_res" != no; then :
11353   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11354
11355 fi
11356
11357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11358 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11359 if ${ac_cv_search_shm_unlink+:} false; then :
11360   $as_echo_n "(cached) " >&6
11361 else
11362   ac_func_search_save_LIBS=$LIBS
11363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11364 /* end confdefs.h.  */
11365
11366 /* Override any GCC internal prototype to avoid an error.
11367    Use char because int might match the return type of a GCC
11368    builtin and then its argument prototype would still apply.  */
11369 #ifdef __cplusplus
11370 extern "C"
11371 #endif
11372 char shm_unlink ();
11373 int
11374 main ()
11375 {
11376 return shm_unlink ();
11377   ;
11378   return 0;
11379 }
11380 _ACEOF
11381 for ac_lib in '' rt; do
11382   if test -z "$ac_lib"; then
11383     ac_res="none required"
11384   else
11385     ac_res=-l$ac_lib
11386     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11387   fi
11388   if ac_fn_c_try_link "$LINENO"; then :
11389   ac_cv_search_shm_unlink=$ac_res
11390 fi
11391 rm -f core conftest.err conftest.$ac_objext \
11392     conftest$ac_exeext
11393   if ${ac_cv_search_shm_unlink+:} false; then :
11394   break
11395 fi
11396 done
11397 if ${ac_cv_search_shm_unlink+:} false; then :
11398
11399 else
11400   ac_cv_search_shm_unlink=no
11401 fi
11402 rm conftest.$ac_ext
11403 LIBS=$ac_func_search_save_LIBS
11404 fi
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11406 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11407 ac_res=$ac_cv_search_shm_unlink
11408 if test "$ac_res" != no; then :
11409   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11410
11411 fi
11412
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11414 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11415 if ${ac_cv_search_clock_gettime+:} false; then :
11416   $as_echo_n "(cached) " >&6
11417 else
11418   ac_func_search_save_LIBS=$LIBS
11419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11420 /* end confdefs.h.  */
11421
11422 /* Override any GCC internal prototype to avoid an error.
11423    Use char because int might match the return type of a GCC
11424    builtin and then its argument prototype would still apply.  */
11425 #ifdef __cplusplus
11426 extern "C"
11427 #endif
11428 char clock_gettime ();
11429 int
11430 main ()
11431 {
11432 return clock_gettime ();
11433   ;
11434   return 0;
11435 }
11436 _ACEOF
11437 for ac_lib in '' rt posix4; do
11438   if test -z "$ac_lib"; then
11439     ac_res="none required"
11440   else
11441     ac_res=-l$ac_lib
11442     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11443   fi
11444   if ac_fn_c_try_link "$LINENO"; then :
11445   ac_cv_search_clock_gettime=$ac_res
11446 fi
11447 rm -f core conftest.err conftest.$ac_objext \
11448     conftest$ac_exeext
11449   if ${ac_cv_search_clock_gettime+:} false; then :
11450   break
11451 fi
11452 done
11453 if ${ac_cv_search_clock_gettime+:} false; then :
11454
11455 else
11456   ac_cv_search_clock_gettime=no
11457 fi
11458 rm conftest.$ac_ext
11459 LIBS=$ac_func_search_save_LIBS
11460 fi
11461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11462 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11463 ac_res=$ac_cv_search_clock_gettime
11464 if test "$ac_res" != no; then :
11465   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11466
11467 fi
11468
11469 # Solaris:
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11471 $as_echo_n "checking for library containing fdatasync... " >&6; }
11472 if ${ac_cv_search_fdatasync+:} false; then :
11473   $as_echo_n "(cached) " >&6
11474 else
11475   ac_func_search_save_LIBS=$LIBS
11476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477 /* end confdefs.h.  */
11478
11479 /* Override any GCC internal prototype to avoid an error.
11480    Use char because int might match the return type of a GCC
11481    builtin and then its argument prototype would still apply.  */
11482 #ifdef __cplusplus
11483 extern "C"
11484 #endif
11485 char fdatasync ();
11486 int
11487 main ()
11488 {
11489 return fdatasync ();
11490   ;
11491   return 0;
11492 }
11493 _ACEOF
11494 for ac_lib in '' rt posix4; do
11495   if test -z "$ac_lib"; then
11496     ac_res="none required"
11497   else
11498     ac_res=-l$ac_lib
11499     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11500   fi
11501   if ac_fn_c_try_link "$LINENO"; then :
11502   ac_cv_search_fdatasync=$ac_res
11503 fi
11504 rm -f core conftest.err conftest.$ac_objext \
11505     conftest$ac_exeext
11506   if ${ac_cv_search_fdatasync+:} false; then :
11507   break
11508 fi
11509 done
11510 if ${ac_cv_search_fdatasync+:} false; then :
11511
11512 else
11513   ac_cv_search_fdatasync=no
11514 fi
11515 rm conftest.$ac_ext
11516 LIBS=$ac_func_search_save_LIBS
11517 fi
11518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11519 $as_echo "$ac_cv_search_fdatasync" >&6; }
11520 ac_res=$ac_cv_search_fdatasync
11521 if test "$ac_res" != no; then :
11522   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11523
11524 fi
11525
11526 # Required for thread_test.c on Solaris
11527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11528 $as_echo_n "checking for library containing sched_yield... " >&6; }
11529 if ${ac_cv_search_sched_yield+:} false; then :
11530   $as_echo_n "(cached) " >&6
11531 else
11532   ac_func_search_save_LIBS=$LIBS
11533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11534 /* end confdefs.h.  */
11535
11536 /* Override any GCC internal prototype to avoid an error.
11537    Use char because int might match the return type of a GCC
11538    builtin and then its argument prototype would still apply.  */
11539 #ifdef __cplusplus
11540 extern "C"
11541 #endif
11542 char sched_yield ();
11543 int
11544 main ()
11545 {
11546 return sched_yield ();
11547   ;
11548   return 0;
11549 }
11550 _ACEOF
11551 for ac_lib in '' rt; do
11552   if test -z "$ac_lib"; then
11553     ac_res="none required"
11554   else
11555     ac_res=-l$ac_lib
11556     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11557   fi
11558   if ac_fn_c_try_link "$LINENO"; then :
11559   ac_cv_search_sched_yield=$ac_res
11560 fi
11561 rm -f core conftest.err conftest.$ac_objext \
11562     conftest$ac_exeext
11563   if ${ac_cv_search_sched_yield+:} false; then :
11564   break
11565 fi
11566 done
11567 if ${ac_cv_search_sched_yield+:} false; then :
11568
11569 else
11570   ac_cv_search_sched_yield=no
11571 fi
11572 rm conftest.$ac_ext
11573 LIBS=$ac_func_search_save_LIBS
11574 fi
11575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11576 $as_echo "$ac_cv_search_sched_yield" >&6; }
11577 ac_res=$ac_cv_search_sched_yield
11578 if test "$ac_res" != no; then :
11579   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11580
11581 fi
11582
11583 # Required for thread_test.c on Solaris 2.5:
11584 # Other ports use it too (HP-UX) so test unconditionally
11585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11586 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11587 if ${ac_cv_search_gethostbyname_r+:} false; then :
11588   $as_echo_n "(cached) " >&6
11589 else
11590   ac_func_search_save_LIBS=$LIBS
11591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11592 /* end confdefs.h.  */
11593
11594 /* Override any GCC internal prototype to avoid an error.
11595    Use char because int might match the return type of a GCC
11596    builtin and then its argument prototype would still apply.  */
11597 #ifdef __cplusplus
11598 extern "C"
11599 #endif
11600 char gethostbyname_r ();
11601 int
11602 main ()
11603 {
11604 return gethostbyname_r ();
11605   ;
11606   return 0;
11607 }
11608 _ACEOF
11609 for ac_lib in '' nsl; do
11610   if test -z "$ac_lib"; then
11611     ac_res="none required"
11612   else
11613     ac_res=-l$ac_lib
11614     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11615   fi
11616   if ac_fn_c_try_link "$LINENO"; then :
11617   ac_cv_search_gethostbyname_r=$ac_res
11618 fi
11619 rm -f core conftest.err conftest.$ac_objext \
11620     conftest$ac_exeext
11621   if ${ac_cv_search_gethostbyname_r+:} false; then :
11622   break
11623 fi
11624 done
11625 if ${ac_cv_search_gethostbyname_r+:} false; then :
11626
11627 else
11628   ac_cv_search_gethostbyname_r=no
11629 fi
11630 rm conftest.$ac_ext
11631 LIBS=$ac_func_search_save_LIBS
11632 fi
11633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11634 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11635 ac_res=$ac_cv_search_gethostbyname_r
11636 if test "$ac_res" != no; then :
11637   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11638
11639 fi
11640
11641 # Cygwin:
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11643 $as_echo_n "checking for library containing shmget... " >&6; }
11644 if ${ac_cv_search_shmget+:} false; then :
11645   $as_echo_n "(cached) " >&6
11646 else
11647   ac_func_search_save_LIBS=$LIBS
11648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11649 /* end confdefs.h.  */
11650
11651 /* Override any GCC internal prototype to avoid an error.
11652    Use char because int might match the return type of a GCC
11653    builtin and then its argument prototype would still apply.  */
11654 #ifdef __cplusplus
11655 extern "C"
11656 #endif
11657 char shmget ();
11658 int
11659 main ()
11660 {
11661 return shmget ();
11662   ;
11663   return 0;
11664 }
11665 _ACEOF
11666 for ac_lib in '' cygipc; do
11667   if test -z "$ac_lib"; then
11668     ac_res="none required"
11669   else
11670     ac_res=-l$ac_lib
11671     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11672   fi
11673   if ac_fn_c_try_link "$LINENO"; then :
11674   ac_cv_search_shmget=$ac_res
11675 fi
11676 rm -f core conftest.err conftest.$ac_objext \
11677     conftest$ac_exeext
11678   if ${ac_cv_search_shmget+:} false; then :
11679   break
11680 fi
11681 done
11682 if ${ac_cv_search_shmget+:} false; then :
11683
11684 else
11685   ac_cv_search_shmget=no
11686 fi
11687 rm conftest.$ac_ext
11688 LIBS=$ac_func_search_save_LIBS
11689 fi
11690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11691 $as_echo "$ac_cv_search_shmget" >&6; }
11692 ac_res=$ac_cv_search_shmget
11693 if test "$ac_res" != no; then :
11694   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11695
11696 fi
11697
11698
11699 if test "$with_readline" = yes; then
11700
11701
11702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11703 $as_echo_n "checking for library containing readline... " >&6; }
11704 if ${pgac_cv_check_readline+:} false; then :
11705   $as_echo_n "(cached) " >&6
11706 else
11707   pgac_cv_check_readline=no
11708 pgac_save_LIBS=$LIBS
11709 if test x"$with_libedit_preferred" != x"yes"
11710 then    READLINE_ORDER="-lreadline -ledit"
11711 else    READLINE_ORDER="-ledit -lreadline"
11712 fi
11713 for pgac_rllib in $READLINE_ORDER ; do
11714   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11715     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11716     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11717 /* end confdefs.h.  */
11718
11719 /* Override any GCC internal prototype to avoid an error.
11720    Use char because int might match the return type of a GCC
11721    builtin and then its argument prototype would still apply.  */
11722 #ifdef __cplusplus
11723 extern "C"
11724 #endif
11725 char readline ();
11726 int
11727 main ()
11728 {
11729 return readline ();
11730   ;
11731   return 0;
11732 }
11733 _ACEOF
11734 if ac_fn_c_try_link "$LINENO"; then :
11735
11736       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11737       # recognize dependent libraries; assume curses is needed if we didn't
11738       # find any dependency.
11739       case $host_os in
11740         netbsd* | openbsd* | irix*)
11741           if test x"$pgac_lib" = x"" ; then
11742             pgac_lib=" -lcurses"
11743           fi ;;
11744       esac
11745
11746       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11747       break
11748
11749 fi
11750 rm -f core conftest.err conftest.$ac_objext \
11751     conftest$ac_exeext conftest.$ac_ext
11752   done
11753   if test "$pgac_cv_check_readline" != no ; then
11754     break
11755   fi
11756 done
11757 LIBS=$pgac_save_LIBS
11758
11759 fi
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11761 $as_echo "$pgac_cv_check_readline" >&6; }
11762 if test "$pgac_cv_check_readline" != no ; then
11763   LIBS="$pgac_cv_check_readline $LIBS"
11764
11765 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11766
11767 fi
11768
11769
11770   if test x"$pgac_cv_check_readline" = x"no"; then
11771     as_fn_error $? "readline library not found
11772 If you have readline already installed, see config.log for details on the
11773 failure.  It is possible the compiler isn't looking in the proper directory.
11774 Use --without-readline to disable readline support." "$LINENO" 5
11775   fi
11776 fi
11777
11778 if test "$with_zlib" = yes; then
11779   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11780 $as_echo_n "checking for inflate in -lz... " >&6; }
11781 if ${ac_cv_lib_z_inflate+:} false; then :
11782   $as_echo_n "(cached) " >&6
11783 else
11784   ac_check_lib_save_LIBS=$LIBS
11785 LIBS="-lz  $LIBS"
11786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11787 /* end confdefs.h.  */
11788
11789 /* Override any GCC internal prototype to avoid an error.
11790    Use char because int might match the return type of a GCC
11791    builtin and then its argument prototype would still apply.  */
11792 #ifdef __cplusplus
11793 extern "C"
11794 #endif
11795 char inflate ();
11796 int
11797 main ()
11798 {
11799 return inflate ();
11800   ;
11801   return 0;
11802 }
11803 _ACEOF
11804 if ac_fn_c_try_link "$LINENO"; then :
11805   ac_cv_lib_z_inflate=yes
11806 else
11807   ac_cv_lib_z_inflate=no
11808 fi
11809 rm -f core conftest.err conftest.$ac_objext \
11810     conftest$ac_exeext conftest.$ac_ext
11811 LIBS=$ac_check_lib_save_LIBS
11812 fi
11813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11814 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11815 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11816   cat >>confdefs.h <<_ACEOF
11817 #define HAVE_LIBZ 1
11818 _ACEOF
11819
11820   LIBS="-lz $LIBS"
11821
11822 else
11823   as_fn_error $? "zlib library not found
11824 If you have zlib already installed, see config.log for details on the
11825 failure.  It is possible the compiler isn't looking in the proper directory.
11826 Use --without-zlib to disable zlib support." "$LINENO" 5
11827 fi
11828
11829 fi
11830
11831 if test "$enable_spinlocks" = yes; then
11832
11833 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11834
11835 else
11836   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11837 *** Not using spinlocks will cause poor performance." >&5
11838 $as_echo "$as_me: WARNING:
11839 *** Not using spinlocks will cause poor performance." >&2;}
11840 fi
11841
11842 if test "$enable_atomics" = yes; then
11843
11844 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11845
11846 else
11847   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11848 *** Not using atomic operations will cause poor performance." >&5
11849 $as_echo "$as_me: WARNING:
11850 *** Not using atomic operations will cause poor performance." >&2;}
11851 fi
11852
11853 if test "$with_gssapi" = yes ; then
11854   if test "$PORTNAME" != "win32"; then
11855     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11856 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11857 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11858   $as_echo_n "(cached) " >&6
11859 else
11860   ac_func_search_save_LIBS=$LIBS
11861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11862 /* end confdefs.h.  */
11863
11864 /* Override any GCC internal prototype to avoid an error.
11865    Use char because int might match the return type of a GCC
11866    builtin and then its argument prototype would still apply.  */
11867 #ifdef __cplusplus
11868 extern "C"
11869 #endif
11870 char gss_init_sec_context ();
11871 int
11872 main ()
11873 {
11874 return gss_init_sec_context ();
11875   ;
11876   return 0;
11877 }
11878 _ACEOF
11879 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11880   if test -z "$ac_lib"; then
11881     ac_res="none required"
11882   else
11883     ac_res=-l$ac_lib
11884     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11885   fi
11886   if ac_fn_c_try_link "$LINENO"; then :
11887   ac_cv_search_gss_init_sec_context=$ac_res
11888 fi
11889 rm -f core conftest.err conftest.$ac_objext \
11890     conftest$ac_exeext
11891   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11892   break
11893 fi
11894 done
11895 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11896
11897 else
11898   ac_cv_search_gss_init_sec_context=no
11899 fi
11900 rm conftest.$ac_ext
11901 LIBS=$ac_func_search_save_LIBS
11902 fi
11903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11904 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11905 ac_res=$ac_cv_search_gss_init_sec_context
11906 if test "$ac_res" != no; then :
11907   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11908
11909 else
11910   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11911 fi
11912
11913   else
11914     LIBS="$LIBS -lgssapi32"
11915   fi
11916 fi
11917
11918 if test "$with_openssl" = yes ; then
11919     if test "$PORTNAME" != "win32"; then
11920      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11921 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11922 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11923   $as_echo_n "(cached) " >&6
11924 else
11925   ac_check_lib_save_LIBS=$LIBS
11926 LIBS="-lcrypto  $LIBS"
11927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11928 /* end confdefs.h.  */
11929
11930 /* Override any GCC internal prototype to avoid an error.
11931    Use char because int might match the return type of a GCC
11932    builtin and then its argument prototype would still apply.  */
11933 #ifdef __cplusplus
11934 extern "C"
11935 #endif
11936 char CRYPTO_new_ex_data ();
11937 int
11938 main ()
11939 {
11940 return CRYPTO_new_ex_data ();
11941   ;
11942   return 0;
11943 }
11944 _ACEOF
11945 if ac_fn_c_try_link "$LINENO"; then :
11946   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11947 else
11948   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11949 fi
11950 rm -f core conftest.err conftest.$ac_objext \
11951     conftest$ac_exeext conftest.$ac_ext
11952 LIBS=$ac_check_lib_save_LIBS
11953 fi
11954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11955 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11956 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11957   cat >>confdefs.h <<_ACEOF
11958 #define HAVE_LIBCRYPTO 1
11959 _ACEOF
11960
11961   LIBS="-lcrypto $LIBS"
11962
11963 else
11964   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11965 fi
11966
11967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11968 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11969 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11970   $as_echo_n "(cached) " >&6
11971 else
11972   ac_check_lib_save_LIBS=$LIBS
11973 LIBS="-lssl  $LIBS"
11974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11975 /* end confdefs.h.  */
11976
11977 /* Override any GCC internal prototype to avoid an error.
11978    Use char because int might match the return type of a GCC
11979    builtin and then its argument prototype would still apply.  */
11980 #ifdef __cplusplus
11981 extern "C"
11982 #endif
11983 char SSL_new ();
11984 int
11985 main ()
11986 {
11987 return SSL_new ();
11988   ;
11989   return 0;
11990 }
11991 _ACEOF
11992 if ac_fn_c_try_link "$LINENO"; then :
11993   ac_cv_lib_ssl_SSL_new=yes
11994 else
11995   ac_cv_lib_ssl_SSL_new=no
11996 fi
11997 rm -f core conftest.err conftest.$ac_objext \
11998     conftest$ac_exeext conftest.$ac_ext
11999 LIBS=$ac_check_lib_save_LIBS
12000 fi
12001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12002 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12003 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12004   cat >>confdefs.h <<_ACEOF
12005 #define HAVE_LIBSSL 1
12006 _ACEOF
12007
12008   LIBS="-lssl $LIBS"
12009
12010 else
12011   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12012 fi
12013
12014   else
12015      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12016 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12017 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12018   $as_echo_n "(cached) " >&6
12019 else
12020   ac_func_search_save_LIBS=$LIBS
12021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12022 /* end confdefs.h.  */
12023
12024 /* Override any GCC internal prototype to avoid an error.
12025    Use char because int might match the return type of a GCC
12026    builtin and then its argument prototype would still apply.  */
12027 #ifdef __cplusplus
12028 extern "C"
12029 #endif
12030 char CRYPTO_new_ex_data ();
12031 int
12032 main ()
12033 {
12034 return CRYPTO_new_ex_data ();
12035   ;
12036   return 0;
12037 }
12038 _ACEOF
12039 for ac_lib in '' eay32 crypto; do
12040   if test -z "$ac_lib"; then
12041     ac_res="none required"
12042   else
12043     ac_res=-l$ac_lib
12044     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12045   fi
12046   if ac_fn_c_try_link "$LINENO"; then :
12047   ac_cv_search_CRYPTO_new_ex_data=$ac_res
12048 fi
12049 rm -f core conftest.err conftest.$ac_objext \
12050     conftest$ac_exeext
12051   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12052   break
12053 fi
12054 done
12055 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12056
12057 else
12058   ac_cv_search_CRYPTO_new_ex_data=no
12059 fi
12060 rm conftest.$ac_ext
12061 LIBS=$ac_func_search_save_LIBS
12062 fi
12063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12064 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12065 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12066 if test "$ac_res" != no; then :
12067   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12068
12069 else
12070   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12071 fi
12072
12073      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12074 $as_echo_n "checking for library containing SSL_new... " >&6; }
12075 if ${ac_cv_search_SSL_new+:} false; then :
12076   $as_echo_n "(cached) " >&6
12077 else
12078   ac_func_search_save_LIBS=$LIBS
12079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12080 /* end confdefs.h.  */
12081
12082 /* Override any GCC internal prototype to avoid an error.
12083    Use char because int might match the return type of a GCC
12084    builtin and then its argument prototype would still apply.  */
12085 #ifdef __cplusplus
12086 extern "C"
12087 #endif
12088 char SSL_new ();
12089 int
12090 main ()
12091 {
12092 return SSL_new ();
12093   ;
12094   return 0;
12095 }
12096 _ACEOF
12097 for ac_lib in '' ssleay32 ssl; do
12098   if test -z "$ac_lib"; then
12099     ac_res="none required"
12100   else
12101     ac_res=-l$ac_lib
12102     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12103   fi
12104   if ac_fn_c_try_link "$LINENO"; then :
12105   ac_cv_search_SSL_new=$ac_res
12106 fi
12107 rm -f core conftest.err conftest.$ac_objext \
12108     conftest$ac_exeext
12109   if ${ac_cv_search_SSL_new+:} false; then :
12110   break
12111 fi
12112 done
12113 if ${ac_cv_search_SSL_new+:} false; then :
12114
12115 else
12116   ac_cv_search_SSL_new=no
12117 fi
12118 rm conftest.$ac_ext
12119 LIBS=$ac_func_search_save_LIBS
12120 fi
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12122 $as_echo "$ac_cv_search_SSL_new" >&6; }
12123 ac_res=$ac_cv_search_SSL_new
12124 if test "$ac_res" != no; then :
12125   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12126
12127 else
12128   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12129 fi
12130
12131   fi
12132   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
12133 do :
12134   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12135 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12136 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12137   cat >>confdefs.h <<_ACEOF
12138 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12139 _ACEOF
12140
12141 fi
12142 done
12143
12144   # Functions introduced in OpenSSL 1.1.0. We used to check for
12145   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12146   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12147   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12148   # functions.
12149   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
12150 do :
12151   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12152 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12153 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12154   cat >>confdefs.h <<_ACEOF
12155 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12156 _ACEOF
12157
12158 fi
12159 done
12160
12161   # OpenSSL versions before 1.1.0 required setting callback functions, for
12162   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12163   # function was removed.
12164   for ac_func in CRYPTO_lock
12165 do :
12166   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12167 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12168   cat >>confdefs.h <<_ACEOF
12169 #define HAVE_CRYPTO_LOCK 1
12170 _ACEOF
12171
12172 fi
12173 done
12174
12175 fi
12176
12177 if test "$with_pam" = yes ; then
12178   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12179 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12180 if ${ac_cv_lib_pam_pam_start+:} false; then :
12181   $as_echo_n "(cached) " >&6
12182 else
12183   ac_check_lib_save_LIBS=$LIBS
12184 LIBS="-lpam  $LIBS"
12185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12186 /* end confdefs.h.  */
12187
12188 /* Override any GCC internal prototype to avoid an error.
12189    Use char because int might match the return type of a GCC
12190    builtin and then its argument prototype would still apply.  */
12191 #ifdef __cplusplus
12192 extern "C"
12193 #endif
12194 char pam_start ();
12195 int
12196 main ()
12197 {
12198 return pam_start ();
12199   ;
12200   return 0;
12201 }
12202 _ACEOF
12203 if ac_fn_c_try_link "$LINENO"; then :
12204   ac_cv_lib_pam_pam_start=yes
12205 else
12206   ac_cv_lib_pam_pam_start=no
12207 fi
12208 rm -f core conftest.err conftest.$ac_objext \
12209     conftest$ac_exeext conftest.$ac_ext
12210 LIBS=$ac_check_lib_save_LIBS
12211 fi
12212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12213 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12214 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12215   cat >>confdefs.h <<_ACEOF
12216 #define HAVE_LIBPAM 1
12217 _ACEOF
12218
12219   LIBS="-lpam $LIBS"
12220
12221 else
12222   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12223 fi
12224
12225 fi
12226
12227 if test "$with_libxml" = yes ; then
12228   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12229 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12230 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12231   $as_echo_n "(cached) " >&6
12232 else
12233   ac_check_lib_save_LIBS=$LIBS
12234 LIBS="-lxml2  $LIBS"
12235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12236 /* end confdefs.h.  */
12237
12238 /* Override any GCC internal prototype to avoid an error.
12239    Use char because int might match the return type of a GCC
12240    builtin and then its argument prototype would still apply.  */
12241 #ifdef __cplusplus
12242 extern "C"
12243 #endif
12244 char xmlSaveToBuffer ();
12245 int
12246 main ()
12247 {
12248 return xmlSaveToBuffer ();
12249   ;
12250   return 0;
12251 }
12252 _ACEOF
12253 if ac_fn_c_try_link "$LINENO"; then :
12254   ac_cv_lib_xml2_xmlSaveToBuffer=yes
12255 else
12256   ac_cv_lib_xml2_xmlSaveToBuffer=no
12257 fi
12258 rm -f core conftest.err conftest.$ac_objext \
12259     conftest$ac_exeext conftest.$ac_ext
12260 LIBS=$ac_check_lib_save_LIBS
12261 fi
12262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12263 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12264 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12265   cat >>confdefs.h <<_ACEOF
12266 #define HAVE_LIBXML2 1
12267 _ACEOF
12268
12269   LIBS="-lxml2 $LIBS"
12270
12271 else
12272   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12273 fi
12274
12275 fi
12276
12277 if test "$with_libxslt" = yes ; then
12278   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12279 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12280 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12281   $as_echo_n "(cached) " >&6
12282 else
12283   ac_check_lib_save_LIBS=$LIBS
12284 LIBS="-lxslt  $LIBS"
12285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12286 /* end confdefs.h.  */
12287
12288 /* Override any GCC internal prototype to avoid an error.
12289    Use char because int might match the return type of a GCC
12290    builtin and then its argument prototype would still apply.  */
12291 #ifdef __cplusplus
12292 extern "C"
12293 #endif
12294 char xsltCleanupGlobals ();
12295 int
12296 main ()
12297 {
12298 return xsltCleanupGlobals ();
12299   ;
12300   return 0;
12301 }
12302 _ACEOF
12303 if ac_fn_c_try_link "$LINENO"; then :
12304   ac_cv_lib_xslt_xsltCleanupGlobals=yes
12305 else
12306   ac_cv_lib_xslt_xsltCleanupGlobals=no
12307 fi
12308 rm -f core conftest.err conftest.$ac_objext \
12309     conftest$ac_exeext conftest.$ac_ext
12310 LIBS=$ac_check_lib_save_LIBS
12311 fi
12312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12313 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12314 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12315   cat >>confdefs.h <<_ACEOF
12316 #define HAVE_LIBXSLT 1
12317 _ACEOF
12318
12319   LIBS="-lxslt $LIBS"
12320
12321 else
12322   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12323 fi
12324
12325 fi
12326
12327 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12328 if test "$with_ldap" = yes ; then
12329   _LIBS="$LIBS"
12330   if test "$PORTNAME" != "win32"; then
12331     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12332 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12333 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12334   $as_echo_n "(cached) " >&6
12335 else
12336   ac_check_lib_save_LIBS=$LIBS
12337 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12339 /* end confdefs.h.  */
12340
12341 /* Override any GCC internal prototype to avoid an error.
12342    Use char because int might match the return type of a GCC
12343    builtin and then its argument prototype would still apply.  */
12344 #ifdef __cplusplus
12345 extern "C"
12346 #endif
12347 char ldap_bind ();
12348 int
12349 main ()
12350 {
12351 return ldap_bind ();
12352   ;
12353   return 0;
12354 }
12355 _ACEOF
12356 if ac_fn_c_try_link "$LINENO"; then :
12357   ac_cv_lib_ldap_ldap_bind=yes
12358 else
12359   ac_cv_lib_ldap_ldap_bind=no
12360 fi
12361 rm -f core conftest.err conftest.$ac_objext \
12362     conftest$ac_exeext conftest.$ac_ext
12363 LIBS=$ac_check_lib_save_LIBS
12364 fi
12365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12366 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12367 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12368   cat >>confdefs.h <<_ACEOF
12369 #define HAVE_LIBLDAP 1
12370 _ACEOF
12371
12372   LIBS="-lldap $LIBS"
12373
12374 else
12375   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12376 fi
12377
12378     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12379     if test "$enable_thread_safety" = yes; then
12380       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12381       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12382 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12383 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12384   $as_echo_n "(cached) " >&6
12385 else
12386   ac_check_lib_save_LIBS=$LIBS
12387 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12389 /* end confdefs.h.  */
12390
12391 /* Override any GCC internal prototype to avoid an error.
12392    Use char because int might match the return type of a GCC
12393    builtin and then its argument prototype would still apply.  */
12394 #ifdef __cplusplus
12395 extern "C"
12396 #endif
12397 char ldap_simple_bind ();
12398 int
12399 main ()
12400 {
12401 return ldap_simple_bind ();
12402   ;
12403   return 0;
12404 }
12405 _ACEOF
12406 if ac_fn_c_try_link "$LINENO"; then :
12407   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12408 else
12409   ac_cv_lib_ldap_r_ldap_simple_bind=no
12410 fi
12411 rm -f core conftest.err conftest.$ac_objext \
12412     conftest$ac_exeext conftest.$ac_ext
12413 LIBS=$ac_check_lib_save_LIBS
12414 fi
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12416 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12417 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12418   cat >>confdefs.h <<_ACEOF
12419 #define HAVE_LIBLDAP_R 1
12420 _ACEOF
12421
12422   LIBS="-lldap_r $LIBS"
12423
12424 else
12425   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12426 fi
12427
12428       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12429     else
12430       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12431     fi
12432     for ac_func in ldap_initialize
12433 do :
12434   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12435 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12436   cat >>confdefs.h <<_ACEOF
12437 #define HAVE_LDAP_INITIALIZE 1
12438 _ACEOF
12439
12440 fi
12441 done
12442
12443   else
12444     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12445 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12446 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12447   $as_echo_n "(cached) " >&6
12448 else
12449   ac_check_lib_save_LIBS=$LIBS
12450 LIBS="-lwldap32  $LIBS"
12451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12452 /* end confdefs.h.  */
12453
12454 /* Override any GCC internal prototype to avoid an error.
12455    Use char because int might match the return type of a GCC
12456    builtin and then its argument prototype would still apply.  */
12457 #ifdef __cplusplus
12458 extern "C"
12459 #endif
12460 char ldap_bind ();
12461 int
12462 main ()
12463 {
12464 return ldap_bind ();
12465   ;
12466   return 0;
12467 }
12468 _ACEOF
12469 if ac_fn_c_try_link "$LINENO"; then :
12470   ac_cv_lib_wldap32_ldap_bind=yes
12471 else
12472   ac_cv_lib_wldap32_ldap_bind=no
12473 fi
12474 rm -f core conftest.err conftest.$ac_objext \
12475     conftest$ac_exeext conftest.$ac_ext
12476 LIBS=$ac_check_lib_save_LIBS
12477 fi
12478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12479 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12480 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12481   cat >>confdefs.h <<_ACEOF
12482 #define HAVE_LIBWLDAP32 1
12483 _ACEOF
12484
12485   LIBS="-lwldap32 $LIBS"
12486
12487 else
12488   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12489 fi
12490
12491     LDAP_LIBS_FE="-lwldap32"
12492     LDAP_LIBS_BE="-lwldap32"
12493   fi
12494   LIBS="$_LIBS"
12495 fi
12496
12497
12498
12499 # for contrib/sepgsql
12500 if test "$with_selinux" = yes; then
12501   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12502 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12503 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12504   $as_echo_n "(cached) " >&6
12505 else
12506   ac_check_lib_save_LIBS=$LIBS
12507 LIBS="-lselinux  $LIBS"
12508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12509 /* end confdefs.h.  */
12510
12511 /* Override any GCC internal prototype to avoid an error.
12512    Use char because int might match the return type of a GCC
12513    builtin and then its argument prototype would still apply.  */
12514 #ifdef __cplusplus
12515 extern "C"
12516 #endif
12517 char security_compute_create_name ();
12518 int
12519 main ()
12520 {
12521 return security_compute_create_name ();
12522   ;
12523   return 0;
12524 }
12525 _ACEOF
12526 if ac_fn_c_try_link "$LINENO"; then :
12527   ac_cv_lib_selinux_security_compute_create_name=yes
12528 else
12529   ac_cv_lib_selinux_security_compute_create_name=no
12530 fi
12531 rm -f core conftest.err conftest.$ac_objext \
12532     conftest$ac_exeext conftest.$ac_ext
12533 LIBS=$ac_check_lib_save_LIBS
12534 fi
12535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12536 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12537 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12538   cat >>confdefs.h <<_ACEOF
12539 #define HAVE_LIBSELINUX 1
12540 _ACEOF
12541
12542   LIBS="-lselinux $LIBS"
12543
12544 else
12545   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12546 fi
12547
12548 fi
12549
12550 # for contrib/uuid-ossp
12551 if test "$with_uuid" = bsd ; then
12552   # On BSD, the UUID functions are in libc
12553   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12554 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12555   UUID_LIBS=""
12556 else
12557   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12558 fi
12559
12560 elif test "$with_uuid" = e2fs ; then
12561   # On macOS, the UUID functions are in libc
12562   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12563 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12564   UUID_LIBS=""
12565 else
12566   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12567 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12568 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12569   $as_echo_n "(cached) " >&6
12570 else
12571   ac_check_lib_save_LIBS=$LIBS
12572 LIBS="-luuid  $LIBS"
12573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12574 /* end confdefs.h.  */
12575
12576 /* Override any GCC internal prototype to avoid an error.
12577    Use char because int might match the return type of a GCC
12578    builtin and then its argument prototype would still apply.  */
12579 #ifdef __cplusplus
12580 extern "C"
12581 #endif
12582 char uuid_generate ();
12583 int
12584 main ()
12585 {
12586 return uuid_generate ();
12587   ;
12588   return 0;
12589 }
12590 _ACEOF
12591 if ac_fn_c_try_link "$LINENO"; then :
12592   ac_cv_lib_uuid_uuid_generate=yes
12593 else
12594   ac_cv_lib_uuid_uuid_generate=no
12595 fi
12596 rm -f core conftest.err conftest.$ac_objext \
12597     conftest$ac_exeext conftest.$ac_ext
12598 LIBS=$ac_check_lib_save_LIBS
12599 fi
12600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12601 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12602 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12603   UUID_LIBS="-luuid"
12604 else
12605   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12606 fi
12607
12608 fi
12609
12610 elif test "$with_uuid" = ossp ; then
12611   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12612 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12613 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12614   $as_echo_n "(cached) " >&6
12615 else
12616   ac_check_lib_save_LIBS=$LIBS
12617 LIBS="-lossp-uuid  $LIBS"
12618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12619 /* end confdefs.h.  */
12620
12621 /* Override any GCC internal prototype to avoid an error.
12622    Use char because int might match the return type of a GCC
12623    builtin and then its argument prototype would still apply.  */
12624 #ifdef __cplusplus
12625 extern "C"
12626 #endif
12627 char uuid_export ();
12628 int
12629 main ()
12630 {
12631 return uuid_export ();
12632   ;
12633   return 0;
12634 }
12635 _ACEOF
12636 if ac_fn_c_try_link "$LINENO"; then :
12637   ac_cv_lib_ossp_uuid_uuid_export=yes
12638 else
12639   ac_cv_lib_ossp_uuid_uuid_export=no
12640 fi
12641 rm -f core conftest.err conftest.$ac_objext \
12642     conftest$ac_exeext conftest.$ac_ext
12643 LIBS=$ac_check_lib_save_LIBS
12644 fi
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12646 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12647 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12648   UUID_LIBS="-lossp-uuid"
12649 else
12650   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12651 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12652 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12653   $as_echo_n "(cached) " >&6
12654 else
12655   ac_check_lib_save_LIBS=$LIBS
12656 LIBS="-luuid  $LIBS"
12657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12658 /* end confdefs.h.  */
12659
12660 /* Override any GCC internal prototype to avoid an error.
12661    Use char because int might match the return type of a GCC
12662    builtin and then its argument prototype would still apply.  */
12663 #ifdef __cplusplus
12664 extern "C"
12665 #endif
12666 char uuid_export ();
12667 int
12668 main ()
12669 {
12670 return uuid_export ();
12671   ;
12672   return 0;
12673 }
12674 _ACEOF
12675 if ac_fn_c_try_link "$LINENO"; then :
12676   ac_cv_lib_uuid_uuid_export=yes
12677 else
12678   ac_cv_lib_uuid_uuid_export=no
12679 fi
12680 rm -f core conftest.err conftest.$ac_objext \
12681     conftest$ac_exeext conftest.$ac_ext
12682 LIBS=$ac_check_lib_save_LIBS
12683 fi
12684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12685 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12686 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12687   UUID_LIBS="-luuid"
12688 else
12689   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12690 fi
12691
12692 fi
12693
12694 fi
12695
12696
12697
12698 ##
12699 ## Header files
12700 ##
12701
12702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12703 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12704 if ${ac_cv_header_stdbool_h+:} false; then :
12705   $as_echo_n "(cached) " >&6
12706 else
12707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12708 /* end confdefs.h.  */
12709
12710              #include <stdbool.h>
12711              #ifndef bool
12712               "error: bool is not defined"
12713              #endif
12714              #ifndef false
12715               "error: false is not defined"
12716              #endif
12717              #if false
12718               "error: false is not 0"
12719              #endif
12720              #ifndef true
12721               "error: true is not defined"
12722              #endif
12723              #if true != 1
12724               "error: true is not 1"
12725              #endif
12726              #ifndef __bool_true_false_are_defined
12727               "error: __bool_true_false_are_defined is not defined"
12728              #endif
12729
12730              struct s { _Bool s: 1; _Bool t; } s;
12731
12732              char a[true == 1 ? 1 : -1];
12733              char b[false == 0 ? 1 : -1];
12734              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12735              char d[(bool) 0.5 == true ? 1 : -1];
12736              /* See body of main program for 'e'.  */
12737              char f[(_Bool) 0.0 == false ? 1 : -1];
12738              char g[true];
12739              char h[sizeof (_Bool)];
12740              char i[sizeof s.t];
12741              enum { j = false, k = true, l = false * true, m = true * 256 };
12742              /* The following fails for
12743                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12744              _Bool n[m];
12745              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12746              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12747              /* Catch a bug in an HP-UX C compiler.  See
12748                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12749                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12750               */
12751              _Bool q = true;
12752              _Bool *pq = &q;
12753
12754 int
12755 main ()
12756 {
12757
12758              bool e = &s;
12759              *pq |= q;
12760              *pq |= ! q;
12761              /* Refer to every declared value, to avoid compiler optimizations.  */
12762              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12763                      + !m + !n + !o + !p + !q + !pq);
12764
12765   ;
12766   return 0;
12767 }
12768 _ACEOF
12769 if ac_fn_c_try_compile "$LINENO"; then :
12770   ac_cv_header_stdbool_h=yes
12771 else
12772   ac_cv_header_stdbool_h=no
12773 fi
12774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12775 fi
12776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12777 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12778    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12779 if test "x$ac_cv_type__Bool" = xyes; then :
12780
12781 cat >>confdefs.h <<_ACEOF
12782 #define HAVE__BOOL 1
12783 _ACEOF
12784
12785
12786 fi
12787
12788
12789 if test $ac_cv_header_stdbool_h = yes; then
12790
12791 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12792
12793 fi
12794
12795
12796 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
12797 do :
12798   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12799 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12800 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12801   cat >>confdefs.h <<_ACEOF
12802 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12803 _ACEOF
12804
12805 fi
12806
12807 done
12808
12809
12810 # On BSD, test for net/if.h will fail unless sys/socket.h
12811 # is included first.
12812 for ac_header in net/if.h
12813 do :
12814   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12815 #include <sys/socket.h>
12816
12817 "
12818 if test "x$ac_cv_header_net_if_h" = xyes; then :
12819   cat >>confdefs.h <<_ACEOF
12820 #define HAVE_NET_IF_H 1
12821 _ACEOF
12822
12823 fi
12824
12825 done
12826
12827
12828 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12829 # is included first.
12830 for ac_header in sys/ucred.h
12831 do :
12832   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12833 #include <sys/param.h>
12834
12835 "
12836 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12837   cat >>confdefs.h <<_ACEOF
12838 #define HAVE_SYS_UCRED_H 1
12839 _ACEOF
12840
12841 fi
12842
12843 done
12844
12845
12846 # At least on IRIX, test for netinet/tcp.h will fail unless
12847 # netinet/in.h is included first.
12848 for ac_header in netinet/tcp.h
12849 do :
12850   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12851 #include <netinet/in.h>
12852
12853 "
12854 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12855   cat >>confdefs.h <<_ACEOF
12856 #define HAVE_NETINET_TCP_H 1
12857 _ACEOF
12858
12859 fi
12860
12861 done
12862
12863
12864 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12865   for ac_header in readline/readline.h
12866 do :
12867   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12868 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12869   cat >>confdefs.h <<_ACEOF
12870 #define HAVE_READLINE_READLINE_H 1
12871 _ACEOF
12872
12873 else
12874   for ac_header in readline.h
12875 do :
12876   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12877 if test "x$ac_cv_header_readline_h" = xyes; then :
12878   cat >>confdefs.h <<_ACEOF
12879 #define HAVE_READLINE_H 1
12880 _ACEOF
12881
12882 else
12883   as_fn_error $? "readline header not found
12884 If you have readline already installed, see config.log for details on the
12885 failure.  It is possible the compiler isn't looking in the proper directory.
12886 Use --without-readline to disable readline support." "$LINENO" 5
12887 fi
12888
12889 done
12890
12891 fi
12892
12893 done
12894
12895   for ac_header in readline/history.h
12896 do :
12897   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12898 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12899   cat >>confdefs.h <<_ACEOF
12900 #define HAVE_READLINE_HISTORY_H 1
12901 _ACEOF
12902
12903 else
12904   for ac_header in history.h
12905 do :
12906   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12907 if test "x$ac_cv_header_history_h" = xyes; then :
12908   cat >>confdefs.h <<_ACEOF
12909 #define HAVE_HISTORY_H 1
12910 _ACEOF
12911
12912 else
12913   as_fn_error $? "history header not found
12914 If you have readline already installed, see config.log for details on the
12915 failure.  It is possible the compiler isn't looking in the proper directory.
12916 Use --without-readline to disable readline support." "$LINENO" 5
12917 fi
12918
12919 done
12920
12921 fi
12922
12923 done
12924
12925 fi
12926
12927 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12928 # Some installations of libedit usurp /usr/include/readline/, which seems
12929 # bad practice, since in combined installations readline will have its headers
12930 # there.  We might have to resort to AC_EGREP checks to make sure we found
12931 # the proper header...
12932   for ac_header in editline/readline.h
12933 do :
12934   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12935 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12936   cat >>confdefs.h <<_ACEOF
12937 #define HAVE_EDITLINE_READLINE_H 1
12938 _ACEOF
12939
12940 else
12941   for ac_header in readline.h
12942 do :
12943   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12944 if test "x$ac_cv_header_readline_h" = xyes; then :
12945   cat >>confdefs.h <<_ACEOF
12946 #define HAVE_READLINE_H 1
12947 _ACEOF
12948
12949 else
12950   for ac_header in readline/readline.h
12951 do :
12952   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12953 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12954   cat >>confdefs.h <<_ACEOF
12955 #define HAVE_READLINE_READLINE_H 1
12956 _ACEOF
12957
12958 else
12959   as_fn_error $? "readline header not found
12960 If you have libedit already installed, see config.log for details on the
12961 failure.  It is possible the compiler isn't looking in the proper directory.
12962 Use --without-readline to disable libedit support." "$LINENO" 5
12963 fi
12964
12965 done
12966
12967 fi
12968
12969 done
12970
12971 fi
12972
12973 done
12974
12975 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12976 # not be there at all.  Hence, don't complain if not found.  We must check
12977 # though, since in yet other versions it is an independent header.
12978   for ac_header in editline/history.h
12979 do :
12980   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12981 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12982   cat >>confdefs.h <<_ACEOF
12983 #define HAVE_EDITLINE_HISTORY_H 1
12984 _ACEOF
12985
12986 else
12987   for ac_header in history.h
12988 do :
12989   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12990 if test "x$ac_cv_header_history_h" = xyes; then :
12991   cat >>confdefs.h <<_ACEOF
12992 #define HAVE_HISTORY_H 1
12993 _ACEOF
12994
12995 else
12996   for ac_header in readline/history.h
12997 do :
12998   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12999 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13000   cat >>confdefs.h <<_ACEOF
13001 #define HAVE_READLINE_HISTORY_H 1
13002 _ACEOF
13003
13004 fi
13005
13006 done
13007
13008 fi
13009
13010 done
13011
13012 fi
13013
13014 done
13015
13016 fi
13017
13018 if test "$with_zlib" = yes; then
13019   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13020 if test "x$ac_cv_header_zlib_h" = xyes; then :
13021
13022 else
13023   as_fn_error $? "zlib header not found
13024 If you have zlib already installed, see config.log for details on the
13025 failure.  It is possible the compiler isn't looking in the proper directory.
13026 Use --without-zlib to disable zlib support." "$LINENO" 5
13027 fi
13028
13029
13030 fi
13031
13032 if test "$with_gssapi" = yes ; then
13033   for ac_header in gssapi/gssapi.h
13034 do :
13035   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13036 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13037   cat >>confdefs.h <<_ACEOF
13038 #define HAVE_GSSAPI_GSSAPI_H 1
13039 _ACEOF
13040
13041 else
13042   for ac_header in gssapi.h
13043 do :
13044   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13045 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13046   cat >>confdefs.h <<_ACEOF
13047 #define HAVE_GSSAPI_H 1
13048 _ACEOF
13049
13050 else
13051   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13052 fi
13053
13054 done
13055
13056 fi
13057
13058 done
13059
13060 fi
13061
13062 if test "$with_openssl" = yes ; then
13063   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13064 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13065
13066 else
13067   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13068 fi
13069
13070
13071   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13072 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13073
13074 else
13075   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13076 fi
13077
13078
13079 fi
13080
13081 if test "$with_pam" = yes ; then
13082   for ac_header in security/pam_appl.h
13083 do :
13084   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13085 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13086   cat >>confdefs.h <<_ACEOF
13087 #define HAVE_SECURITY_PAM_APPL_H 1
13088 _ACEOF
13089
13090 else
13091   for ac_header in pam/pam_appl.h
13092 do :
13093   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13094 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13095   cat >>confdefs.h <<_ACEOF
13096 #define HAVE_PAM_PAM_APPL_H 1
13097 _ACEOF
13098
13099 else
13100   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13101 fi
13102
13103 done
13104
13105 fi
13106
13107 done
13108
13109 fi
13110
13111 if test "$with_bsd_auth" = yes ; then
13112   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13113 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13114
13115 else
13116   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13117 fi
13118
13119
13120 fi
13121
13122 if test "$with_systemd" = yes ; then
13123   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13124 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13125
13126 else
13127   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13128 fi
13129
13130
13131 fi
13132
13133 if test "$with_libxml" = yes ; then
13134   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13135 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13136
13137 else
13138   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13139 fi
13140
13141
13142 fi
13143
13144 if test "$with_libxslt" = yes ; then
13145   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13146 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13147
13148 else
13149   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13150 fi
13151
13152
13153 fi
13154
13155 if test "$with_ldap" = yes ; then
13156   if test "$PORTNAME" != "win32"; then
13157      for ac_header in ldap.h
13158 do :
13159   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13160 if test "x$ac_cv_header_ldap_h" = xyes; then :
13161   cat >>confdefs.h <<_ACEOF
13162 #define HAVE_LDAP_H 1
13163 _ACEOF
13164
13165 else
13166   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13167 fi
13168
13169 done
13170
13171      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13172 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13173 if ${pgac_cv_ldap_safe+:} false; then :
13174   $as_echo_n "(cached) " >&6
13175 else
13176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13177 /* end confdefs.h.  */
13178 #include <ldap.h>
13179 #if !defined(LDAP_VENDOR_VERSION) || \
13180      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13181       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13182 choke me
13183 #endif
13184 int
13185 main ()
13186 {
13187
13188   ;
13189   return 0;
13190 }
13191 _ACEOF
13192 if ac_fn_c_try_compile "$LINENO"; then :
13193   pgac_cv_ldap_safe=yes
13194 else
13195   pgac_cv_ldap_safe=no
13196 fi
13197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13198 fi
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13200 $as_echo "$pgac_cv_ldap_safe" >&6; }
13201
13202 if test "$pgac_cv_ldap_safe" != yes; then
13203   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13204 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13205 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13206 *** also uses LDAP will crash on exit." >&5
13207 $as_echo "$as_me: WARNING:
13208 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13209 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13210 *** also uses LDAP will crash on exit." >&2;}
13211 fi
13212   else
13213      for ac_header in winldap.h
13214 do :
13215   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13216 #include <windows.h>
13217
13218 "
13219 if test "x$ac_cv_header_winldap_h" = xyes; then :
13220   cat >>confdefs.h <<_ACEOF
13221 #define HAVE_WINLDAP_H 1
13222 _ACEOF
13223
13224 else
13225   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13226 fi
13227
13228 done
13229
13230   fi
13231 fi
13232
13233 if test "$with_bonjour" = yes ; then
13234   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13235 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13236
13237 else
13238   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13239 fi
13240
13241
13242 fi
13243
13244 # for contrib/uuid-ossp
13245 if test "$with_uuid" = bsd ; then
13246   for ac_header in uuid.h
13247 do :
13248   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13249 if test "x$ac_cv_header_uuid_h" = xyes; then :
13250   cat >>confdefs.h <<_ACEOF
13251 #define HAVE_UUID_H 1
13252 _ACEOF
13253  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13254 /* end confdefs.h.  */
13255 #include <uuid.h>
13256
13257 _ACEOF
13258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13259   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13260
13261 else
13262   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13263 fi
13264 rm -f conftest*
13265
13266 else
13267   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13268 fi
13269
13270 done
13271
13272 elif test "$with_uuid" = e2fs ; then
13273   for ac_header in uuid/uuid.h
13274 do :
13275   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13276 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13277   cat >>confdefs.h <<_ACEOF
13278 #define HAVE_UUID_UUID_H 1
13279 _ACEOF
13280  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13281 /* end confdefs.h.  */
13282 #include <uuid/uuid.h>
13283
13284 _ACEOF
13285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13286   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13287
13288 else
13289   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13290 fi
13291 rm -f conftest*
13292
13293 else
13294   for ac_header in uuid.h
13295 do :
13296   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13297 if test "x$ac_cv_header_uuid_h" = xyes; then :
13298   cat >>confdefs.h <<_ACEOF
13299 #define HAVE_UUID_H 1
13300 _ACEOF
13301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13302 /* end confdefs.h.  */
13303 #include <uuid.h>
13304
13305 _ACEOF
13306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13307   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13308
13309 else
13310   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13311 fi
13312 rm -f conftest*
13313
13314 else
13315   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13316 fi
13317
13318 done
13319
13320 fi
13321
13322 done
13323
13324 elif test "$with_uuid" = ossp ; then
13325   for ac_header in ossp/uuid.h
13326 do :
13327   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13328 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13329   cat >>confdefs.h <<_ACEOF
13330 #define HAVE_OSSP_UUID_H 1
13331 _ACEOF
13332  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13333 /* end confdefs.h.  */
13334 #include <ossp/uuid.h>
13335
13336 _ACEOF
13337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13338   $EGREP "uuid_export" >/dev/null 2>&1; then :
13339
13340 else
13341   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13342 fi
13343 rm -f conftest*
13344
13345 else
13346   for ac_header in uuid.h
13347 do :
13348   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13349 if test "x$ac_cv_header_uuid_h" = xyes; then :
13350   cat >>confdefs.h <<_ACEOF
13351 #define HAVE_UUID_H 1
13352 _ACEOF
13353  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13354 /* end confdefs.h.  */
13355 #include <uuid.h>
13356
13357 _ACEOF
13358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13359   $EGREP "uuid_export" >/dev/null 2>&1; then :
13360
13361 else
13362   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13363 fi
13364 rm -f conftest*
13365
13366 else
13367   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13368 fi
13369
13370 done
13371
13372 fi
13373
13374 done
13375
13376 fi
13377
13378 if test "$PORTNAME" = "win32" ; then
13379    for ac_header in crtdefs.h
13380 do :
13381   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13382 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13383   cat >>confdefs.h <<_ACEOF
13384 #define HAVE_CRTDEFS_H 1
13385 _ACEOF
13386
13387 fi
13388
13389 done
13390
13391 fi
13392
13393 ##
13394 ## Types, structures, compiler characteristics
13395 ##
13396
13397   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13398 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13399 if ${ac_cv_c_bigendian+:} false; then :
13400   $as_echo_n "(cached) " >&6
13401 else
13402   ac_cv_c_bigendian=unknown
13403     # See if we're dealing with a universal compiler.
13404     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13405 /* end confdefs.h.  */
13406 #ifndef __APPLE_CC__
13407                not a universal capable compiler
13408              #endif
13409              typedef int dummy;
13410
13411 _ACEOF
13412 if ac_fn_c_try_compile "$LINENO"; then :
13413
13414         # Check for potential -arch flags.  It is not universal unless
13415         # there are at least two -arch flags with different values.
13416         ac_arch=
13417         ac_prev=
13418         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13419          if test -n "$ac_prev"; then
13420            case $ac_word in
13421              i?86 | x86_64 | ppc | ppc64)
13422                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13423                  ac_arch=$ac_word
13424                else
13425                  ac_cv_c_bigendian=universal
13426                  break
13427                fi
13428                ;;
13429            esac
13430            ac_prev=
13431          elif test "x$ac_word" = "x-arch"; then
13432            ac_prev=arch
13433          fi
13434        done
13435 fi
13436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13437     if test $ac_cv_c_bigendian = unknown; then
13438       # See if sys/param.h defines the BYTE_ORDER macro.
13439       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13440 /* end confdefs.h.  */
13441 #include <sys/types.h>
13442              #include <sys/param.h>
13443
13444 int
13445 main ()
13446 {
13447 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13448                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13449                      && LITTLE_ENDIAN)
13450               bogus endian macros
13451              #endif
13452
13453   ;
13454   return 0;
13455 }
13456 _ACEOF
13457 if ac_fn_c_try_compile "$LINENO"; then :
13458   # It does; now see whether it defined to BIG_ENDIAN or not.
13459          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13460 /* end confdefs.h.  */
13461 #include <sys/types.h>
13462                 #include <sys/param.h>
13463
13464 int
13465 main ()
13466 {
13467 #if BYTE_ORDER != BIG_ENDIAN
13468                  not big endian
13469                 #endif
13470
13471   ;
13472   return 0;
13473 }
13474 _ACEOF
13475 if ac_fn_c_try_compile "$LINENO"; then :
13476   ac_cv_c_bigendian=yes
13477 else
13478   ac_cv_c_bigendian=no
13479 fi
13480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13481 fi
13482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13483     fi
13484     if test $ac_cv_c_bigendian = unknown; then
13485       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13486       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13487 /* end confdefs.h.  */
13488 #include <limits.h>
13489
13490 int
13491 main ()
13492 {
13493 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13494               bogus endian macros
13495              #endif
13496
13497   ;
13498   return 0;
13499 }
13500 _ACEOF
13501 if ac_fn_c_try_compile "$LINENO"; then :
13502   # It does; now see whether it defined to _BIG_ENDIAN or not.
13503          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13504 /* end confdefs.h.  */
13505 #include <limits.h>
13506
13507 int
13508 main ()
13509 {
13510 #ifndef _BIG_ENDIAN
13511                  not big endian
13512                 #endif
13513
13514   ;
13515   return 0;
13516 }
13517 _ACEOF
13518 if ac_fn_c_try_compile "$LINENO"; then :
13519   ac_cv_c_bigendian=yes
13520 else
13521   ac_cv_c_bigendian=no
13522 fi
13523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13524 fi
13525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13526     fi
13527     if test $ac_cv_c_bigendian = unknown; then
13528       # Compile a test program.
13529       if test "$cross_compiling" = yes; then :
13530   # Try to guess by grepping values from an object file.
13531          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13532 /* end confdefs.h.  */
13533 short int ascii_mm[] =
13534                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13535                 short int ascii_ii[] =
13536                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13537                 int use_ascii (int i) {
13538                   return ascii_mm[i] + ascii_ii[i];
13539                 }
13540                 short int ebcdic_ii[] =
13541                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13542                 short int ebcdic_mm[] =
13543                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13544                 int use_ebcdic (int i) {
13545                   return ebcdic_mm[i] + ebcdic_ii[i];
13546                 }
13547                 extern int foo;
13548
13549 int
13550 main ()
13551 {
13552 return use_ascii (foo) == use_ebcdic (foo);
13553   ;
13554   return 0;
13555 }
13556 _ACEOF
13557 if ac_fn_c_try_compile "$LINENO"; then :
13558   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13559               ac_cv_c_bigendian=yes
13560             fi
13561             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13562               if test "$ac_cv_c_bigendian" = unknown; then
13563                 ac_cv_c_bigendian=no
13564               else
13565                 # finding both strings is unlikely to happen, but who knows?
13566                 ac_cv_c_bigendian=unknown
13567               fi
13568             fi
13569 fi
13570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13571 else
13572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13573 /* end confdefs.h.  */
13574 $ac_includes_default
13575 int
13576 main ()
13577 {
13578
13579              /* Are we little or big endian?  From Harbison&Steele.  */
13580              union
13581              {
13582                long int l;
13583                char c[sizeof (long int)];
13584              } u;
13585              u.l = 1;
13586              return u.c[sizeof (long int) - 1] == 1;
13587
13588   ;
13589   return 0;
13590 }
13591 _ACEOF
13592 if ac_fn_c_try_run "$LINENO"; then :
13593   ac_cv_c_bigendian=no
13594 else
13595   ac_cv_c_bigendian=yes
13596 fi
13597 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13598   conftest.$ac_objext conftest.beam conftest.$ac_ext
13599 fi
13600
13601     fi
13602 fi
13603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13604 $as_echo "$ac_cv_c_bigendian" >&6; }
13605  case $ac_cv_c_bigendian in #(
13606    yes)
13607      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13608 ;; #(
13609    no)
13610       ;; #(
13611    universal)
13612
13613 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13614
13615      ;; #(
13616    *)
13617      as_fn_error $? "unknown endianness
13618  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13619  esac
13620
13621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13622 $as_echo_n "checking for inline... " >&6; }
13623 if ${ac_cv_c_inline+:} false; then :
13624   $as_echo_n "(cached) " >&6
13625 else
13626   ac_cv_c_inline=no
13627 for ac_kw in inline __inline__ __inline; do
13628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13629 /* end confdefs.h.  */
13630 #ifndef __cplusplus
13631 typedef int foo_t;
13632 static $ac_kw foo_t static_foo () {return 0; }
13633 $ac_kw foo_t foo () {return 0; }
13634 #endif
13635
13636 _ACEOF
13637 if ac_fn_c_try_compile "$LINENO"; then :
13638   ac_cv_c_inline=$ac_kw
13639 fi
13640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13641   test "$ac_cv_c_inline" != no && break
13642 done
13643
13644 fi
13645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13646 $as_echo "$ac_cv_c_inline" >&6; }
13647
13648 case $ac_cv_c_inline in
13649   inline | yes) ;;
13650   *)
13651     case $ac_cv_c_inline in
13652       no) ac_val=;;
13653       *) ac_val=$ac_cv_c_inline;;
13654     esac
13655     cat >>confdefs.h <<_ACEOF
13656 #ifndef __cplusplus
13657 #define inline $ac_val
13658 #endif
13659 _ACEOF
13660     ;;
13661 esac
13662
13663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13664 $as_echo_n "checking for printf format archetype... " >&6; }
13665 if ${pgac_cv_printf_archetype+:} false; then :
13666   $as_echo_n "(cached) " >&6
13667 else
13668   pgac_cv_printf_archetype=gnu_printf
13669 ac_save_c_werror_flag=$ac_c_werror_flag
13670 ac_c_werror_flag=yes
13671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13672 /* end confdefs.h.  */
13673 extern void pgac_write(int ignore, const char *fmt,...)
13674 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13675 int
13676 main ()
13677 {
13678 pgac_write(0, "error %s: %m", "foo");
13679   ;
13680   return 0;
13681 }
13682 _ACEOF
13683 if ac_fn_c_try_compile "$LINENO"; then :
13684   ac_archetype_ok=yes
13685 else
13686   ac_archetype_ok=no
13687 fi
13688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13689 ac_c_werror_flag=$ac_save_c_werror_flag
13690
13691 if [ "$ac_archetype_ok" = no ]; then
13692   pgac_cv_printf_archetype=__syslog__
13693   ac_save_c_werror_flag=$ac_c_werror_flag
13694 ac_c_werror_flag=yes
13695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13696 /* end confdefs.h.  */
13697 extern void pgac_write(int ignore, const char *fmt,...)
13698 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13699 int
13700 main ()
13701 {
13702 pgac_write(0, "error %s: %m", "foo");
13703   ;
13704   return 0;
13705 }
13706 _ACEOF
13707 if ac_fn_c_try_compile "$LINENO"; then :
13708   ac_archetype_ok=yes
13709 else
13710   ac_archetype_ok=no
13711 fi
13712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13713 ac_c_werror_flag=$ac_save_c_werror_flag
13714
13715   if [ "$ac_archetype_ok" = no ]; then
13716     pgac_cv_printf_archetype=printf
13717   fi
13718 fi
13719 fi
13720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13721 $as_echo "$pgac_cv_printf_archetype" >&6; }
13722
13723 cat >>confdefs.h <<_ACEOF
13724 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13725 _ACEOF
13726
13727
13728
13729   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13730 $as_echo_n "checking for flexible array members... " >&6; }
13731 if ${ac_cv_c_flexmember+:} false; then :
13732   $as_echo_n "(cached) " >&6
13733 else
13734   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13735 /* end confdefs.h.  */
13736 #include <stdlib.h>
13737             #include <stdio.h>
13738             #include <stddef.h>
13739             struct s { int n; double d[]; };
13740 int
13741 main ()
13742 {
13743 int m = getchar ();
13744             struct s *p = malloc (offsetof (struct s, d)
13745                                   + m * sizeof (double));
13746             p->d[0] = 0.0;
13747             return p->d != (double *) NULL;
13748   ;
13749   return 0;
13750 }
13751 _ACEOF
13752 if ac_fn_c_try_compile "$LINENO"; then :
13753   ac_cv_c_flexmember=yes
13754 else
13755   ac_cv_c_flexmember=no
13756 fi
13757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13758 fi
13759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13760 $as_echo "$ac_cv_c_flexmember" >&6; }
13761   if test $ac_cv_c_flexmember = yes; then
13762
13763 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13764
13765   else
13766     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13767
13768   fi
13769
13770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13771 $as_echo_n "checking for signed types... " >&6; }
13772 if ${pgac_cv_c_signed+:} false; then :
13773   $as_echo_n "(cached) " >&6
13774 else
13775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13776 /* end confdefs.h.  */
13777
13778 int
13779 main ()
13780 {
13781 signed char c; signed short s; signed int i;
13782   ;
13783   return 0;
13784 }
13785 _ACEOF
13786 if ac_fn_c_try_compile "$LINENO"; then :
13787   pgac_cv_c_signed=yes
13788 else
13789   pgac_cv_c_signed=no
13790 fi
13791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13792 fi
13793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13794 $as_echo "$pgac_cv_c_signed" >&6; }
13795 if test x"$pgac_cv_c_signed" = xno ; then
13796
13797 $as_echo "#define signed /**/" >>confdefs.h
13798
13799 fi
13800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13801 $as_echo_n "checking for __func__... " >&6; }
13802 if ${pgac_cv_funcname_func_support+:} false; then :
13803   $as_echo_n "(cached) " >&6
13804 else
13805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13806 /* end confdefs.h.  */
13807 #include <stdio.h>
13808 int
13809 main ()
13810 {
13811 printf("%s\n", __func__);
13812   ;
13813   return 0;
13814 }
13815 _ACEOF
13816 if ac_fn_c_try_compile "$LINENO"; then :
13817   pgac_cv_funcname_func_support=yes
13818 else
13819   pgac_cv_funcname_func_support=no
13820 fi
13821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13822 fi
13823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13824 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13825 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13826
13827 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13828
13829 else
13830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13831 $as_echo_n "checking for __FUNCTION__... " >&6; }
13832 if ${pgac_cv_funcname_function_support+:} false; then :
13833   $as_echo_n "(cached) " >&6
13834 else
13835   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13836 /* end confdefs.h.  */
13837 #include <stdio.h>
13838 int
13839 main ()
13840 {
13841 printf("%s\n", __FUNCTION__);
13842   ;
13843   return 0;
13844 }
13845 _ACEOF
13846 if ac_fn_c_try_compile "$LINENO"; then :
13847   pgac_cv_funcname_function_support=yes
13848 else
13849   pgac_cv_funcname_function_support=no
13850 fi
13851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13852 fi
13853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13854 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13855 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13856
13857 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13858
13859 fi
13860 fi
13861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13862 $as_echo_n "checking for _Static_assert... " >&6; }
13863 if ${pgac_cv__static_assert+:} false; then :
13864   $as_echo_n "(cached) " >&6
13865 else
13866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13867 /* end confdefs.h.  */
13868
13869 int
13870 main ()
13871 {
13872 ({ _Static_assert(1, "foo"); })
13873   ;
13874   return 0;
13875 }
13876 _ACEOF
13877 if ac_fn_c_try_link "$LINENO"; then :
13878   pgac_cv__static_assert=yes
13879 else
13880   pgac_cv__static_assert=no
13881 fi
13882 rm -f core conftest.err conftest.$ac_objext \
13883     conftest$ac_exeext conftest.$ac_ext
13884 fi
13885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13886 $as_echo "$pgac_cv__static_assert" >&6; }
13887 if test x"$pgac_cv__static_assert" = xyes ; then
13888
13889 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13890
13891 fi
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13893 $as_echo_n "checking for typeof... " >&6; }
13894 if ${pgac_cv_c_typeof+:} false; then :
13895   $as_echo_n "(cached) " >&6
13896 else
13897   pgac_cv_c_typeof=no
13898 for pgac_kw in typeof __typeof__ decltype; do
13899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13900 /* end confdefs.h.  */
13901
13902 int
13903 main ()
13904 {
13905 int x = 0;
13906 $pgac_kw(x) y;
13907 y = x;
13908 return y;
13909   ;
13910   return 0;
13911 }
13912 _ACEOF
13913 if ac_fn_c_try_compile "$LINENO"; then :
13914   pgac_cv_c_typeof=$pgac_kw
13915 fi
13916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13917   test "$pgac_cv_c_typeof" != no && break
13918 done
13919 fi
13920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13921 $as_echo "$pgac_cv_c_typeof" >&6; }
13922 if test "$pgac_cv_c_typeof" != no; then
13923
13924 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13925
13926   if test "$pgac_cv_c_typeof" != typeof; then
13927
13928 cat >>confdefs.h <<_ACEOF
13929 #define typeof $pgac_cv_c_typeof
13930 _ACEOF
13931
13932   fi
13933 fi
13934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13935 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13936 if ${pgac_cv__types_compatible+:} false; then :
13937   $as_echo_n "(cached) " >&6
13938 else
13939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13940 /* end confdefs.h.  */
13941
13942 int
13943 main ()
13944 {
13945  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13946   ;
13947   return 0;
13948 }
13949 _ACEOF
13950 if ac_fn_c_try_compile "$LINENO"; then :
13951   pgac_cv__types_compatible=yes
13952 else
13953   pgac_cv__types_compatible=no
13954 fi
13955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13956 fi
13957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13958 $as_echo "$pgac_cv__types_compatible" >&6; }
13959 if test x"$pgac_cv__types_compatible" = xyes ; then
13960
13961 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13962
13963 fi
13964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13965 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13966 if ${pgac_cv__builtin_bswap16+:} false; then :
13967   $as_echo_n "(cached) " >&6
13968 else
13969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13970 /* end confdefs.h.  */
13971 static unsigned long int x = __builtin_bswap16(0xaabb);
13972
13973 _ACEOF
13974 if ac_fn_c_try_compile "$LINENO"; then :
13975   pgac_cv__builtin_bswap16=yes
13976 else
13977   pgac_cv__builtin_bswap16=no
13978 fi
13979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13980 fi
13981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13982 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13983 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13984
13985 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13986
13987 fi
13988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13989 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13990 if ${pgac_cv__builtin_bswap32+:} false; then :
13991   $as_echo_n "(cached) " >&6
13992 else
13993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13994 /* end confdefs.h.  */
13995 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13996
13997 _ACEOF
13998 if ac_fn_c_try_compile "$LINENO"; then :
13999   pgac_cv__builtin_bswap32=yes
14000 else
14001   pgac_cv__builtin_bswap32=no
14002 fi
14003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14004 fi
14005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
14006 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
14007 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
14008
14009 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
14010
14011 fi
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
14013 $as_echo_n "checking for __builtin_bswap64... " >&6; }
14014 if ${pgac_cv__builtin_bswap64+:} false; then :
14015   $as_echo_n "(cached) " >&6
14016 else
14017   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14018 /* end confdefs.h.  */
14019 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
14020
14021 _ACEOF
14022 if ac_fn_c_try_compile "$LINENO"; then :
14023   pgac_cv__builtin_bswap64=yes
14024 else
14025   pgac_cv__builtin_bswap64=no
14026 fi
14027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14028 fi
14029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
14030 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
14031 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
14032
14033 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
14034
14035 fi
14036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14037 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14038 if ${pgac_cv__builtin_constant_p+:} false; then :
14039   $as_echo_n "(cached) " >&6
14040 else
14041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14042 /* end confdefs.h.  */
14043 static int x;
14044   static int y[__builtin_constant_p(x) ? x : 1];
14045   static int z[__builtin_constant_p("string literal") ? 1 : x];
14046
14047
14048 _ACEOF
14049 if ac_fn_c_try_compile "$LINENO"; then :
14050   pgac_cv__builtin_constant_p=yes
14051 else
14052   pgac_cv__builtin_constant_p=no
14053 fi
14054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14055 fi
14056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14057 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14058 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14059
14060 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14061
14062 fi
14063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14064 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14065 if ${pgac_cv__builtin_unreachable+:} false; then :
14066   $as_echo_n "(cached) " >&6
14067 else
14068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14069 /* end confdefs.h.  */
14070
14071 int
14072 main ()
14073 {
14074 __builtin_unreachable();
14075   ;
14076   return 0;
14077 }
14078 _ACEOF
14079 if ac_fn_c_try_link "$LINENO"; then :
14080   pgac_cv__builtin_unreachable=yes
14081 else
14082   pgac_cv__builtin_unreachable=no
14083 fi
14084 rm -f core conftest.err conftest.$ac_objext \
14085     conftest$ac_exeext conftest.$ac_ext
14086 fi
14087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14088 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14089 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14090
14091 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14092
14093 fi
14094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14095 $as_echo_n "checking for computed goto support... " >&6; }
14096 if ${pgac_cv_computed_goto+:} false; then :
14097   $as_echo_n "(cached) " >&6
14098 else
14099   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14100 /* end confdefs.h.  */
14101
14102 int
14103 main ()
14104 {
14105 void *labeladdrs[] = {&&my_label};
14106   goto *labeladdrs[0];
14107   my_label:
14108   return 1;
14109
14110   ;
14111   return 0;
14112 }
14113 _ACEOF
14114 if ac_fn_c_try_compile "$LINENO"; then :
14115   pgac_cv_computed_goto=yes
14116 else
14117   pgac_cv_computed_goto=no
14118 fi
14119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14120 fi
14121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14122 $as_echo "$pgac_cv_computed_goto" >&6; }
14123 if test x"$pgac_cv_computed_goto" = xyes ; then
14124
14125 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14126
14127 fi
14128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14129 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14130 if ${ac_cv_struct_tm+:} false; then :
14131   $as_echo_n "(cached) " >&6
14132 else
14133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14134 /* end confdefs.h.  */
14135 #include <sys/types.h>
14136 #include <time.h>
14137
14138 int
14139 main ()
14140 {
14141 struct tm tm;
14142                                      int *p = &tm.tm_sec;
14143                                      return !p;
14144   ;
14145   return 0;
14146 }
14147 _ACEOF
14148 if ac_fn_c_try_compile "$LINENO"; then :
14149   ac_cv_struct_tm=time.h
14150 else
14151   ac_cv_struct_tm=sys/time.h
14152 fi
14153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14154 fi
14155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14156 $as_echo "$ac_cv_struct_tm" >&6; }
14157 if test $ac_cv_struct_tm = sys/time.h; then
14158
14159 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14160
14161 fi
14162
14163 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14164 #include <$ac_cv_struct_tm>
14165
14166 "
14167 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14168
14169 cat >>confdefs.h <<_ACEOF
14170 #define HAVE_STRUCT_TM_TM_ZONE 1
14171 _ACEOF
14172
14173
14174 fi
14175
14176 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14177
14178 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14179
14180 fi
14181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14182 $as_echo_n "checking for tzname... " >&6; }
14183 if ${ac_cv_var_tzname+:} false; then :
14184   $as_echo_n "(cached) " >&6
14185 else
14186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14187 /* end confdefs.h.  */
14188 #include <stdlib.h>
14189 #include <time.h>
14190 #ifndef tzname /* For SGI.  */
14191 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
14192 #endif
14193
14194 int
14195 main ()
14196 {
14197 atoi(*tzname);
14198   ;
14199   return 0;
14200 }
14201 _ACEOF
14202 if ac_fn_c_try_link "$LINENO"; then :
14203   ac_cv_var_tzname=yes
14204 else
14205   ac_cv_var_tzname=no
14206 fi
14207 rm -f core conftest.err conftest.$ac_objext \
14208     conftest$ac_exeext conftest.$ac_ext
14209 fi
14210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14211 $as_echo "$ac_cv_var_tzname" >&6; }
14212 if test $ac_cv_var_tzname = yes; then
14213
14214 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14215
14216 fi
14217
14218 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14219 #ifdef HAVE_SYS_IPC_H
14220 #include <sys/ipc.h>
14221 #endif
14222 #ifdef HAVE_SYS_SEM_H
14223 #include <sys/sem.h>
14224 #endif
14225 "
14226 if test "x$ac_cv_type_union_semun" = xyes; then :
14227
14228 cat >>confdefs.h <<_ACEOF
14229 #define HAVE_UNION_SEMUN 1
14230 _ACEOF
14231
14232
14233 fi
14234
14235 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14236 #ifdef HAVE_SYS_UN_H
14237 #include <sys/un.h>
14238 #endif
14239
14240 "
14241 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14242
14243 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14244
14245 fi
14246
14247 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14248 #include <sys/socket.h>
14249
14250 "
14251 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14252
14253 cat >>confdefs.h <<_ACEOF
14254 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14255 _ACEOF
14256
14257
14258 fi
14259
14260 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14261 #include <sys/socket.h>
14262
14263 "
14264 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14265
14266 cat >>confdefs.h <<_ACEOF
14267 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14268 _ACEOF
14269
14270
14271 fi
14272 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14273 #include <sys/socket.h>
14274
14275 "
14276 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14277
14278 cat >>confdefs.h <<_ACEOF
14279 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14280 _ACEOF
14281
14282
14283 fi
14284 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14285 #include <sys/socket.h>
14286
14287 "
14288 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14289
14290 cat >>confdefs.h <<_ACEOF
14291 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14292 _ACEOF
14293
14294
14295 fi
14296 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14297 #include <sys/socket.h>
14298
14299 "
14300 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14301
14302 cat >>confdefs.h <<_ACEOF
14303 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14304 _ACEOF
14305
14306
14307 fi
14308 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14309 #include <sys/socket.h>
14310
14311 "
14312 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14313
14314 cat >>confdefs.h <<_ACEOF
14315 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14316 _ACEOF
14317
14318
14319 fi
14320
14321 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14322 #include <sys/socket.h>
14323 #include <netdb.h>
14324
14325 "
14326 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14327
14328 cat >>confdefs.h <<_ACEOF
14329 #define HAVE_STRUCT_ADDRINFO 1
14330 _ACEOF
14331
14332
14333 fi
14334
14335
14336   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14337 if test "x$ac_cv_type_intptr_t" = xyes; then :
14338
14339 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14340
14341 else
14342   for ac_type in 'int' 'long int' 'long long int'; do
14343        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14344 /* end confdefs.h.  */
14345 $ac_includes_default
14346 int
14347 main ()
14348 {
14349 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14350 test_array [0] = 0;
14351 return test_array [0];
14352
14353   ;
14354   return 0;
14355 }
14356 _ACEOF
14357 if ac_fn_c_try_compile "$LINENO"; then :
14358
14359 cat >>confdefs.h <<_ACEOF
14360 #define intptr_t $ac_type
14361 _ACEOF
14362
14363           ac_type=
14364 fi
14365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14366        test -z "$ac_type" && break
14367      done
14368 fi
14369
14370
14371
14372   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14373 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14374
14375 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14376
14377 else
14378   for ac_type in 'unsigned int' 'unsigned long int' \
14379         'unsigned long long int'; do
14380        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14381 /* end confdefs.h.  */
14382 $ac_includes_default
14383 int
14384 main ()
14385 {
14386 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14387 test_array [0] = 0;
14388 return test_array [0];
14389
14390   ;
14391   return 0;
14392 }
14393 _ACEOF
14394 if ac_fn_c_try_compile "$LINENO"; then :
14395
14396 cat >>confdefs.h <<_ACEOF
14397 #define uintptr_t $ac_type
14398 _ACEOF
14399
14400           ac_type=
14401 fi
14402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14403        test -z "$ac_type" && break
14404      done
14405 fi
14406
14407
14408
14409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14410 $as_echo_n "checking for unsigned long long int... " >&6; }
14411 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14412   $as_echo_n "(cached) " >&6
14413 else
14414   ac_cv_type_unsigned_long_long_int=yes
14415      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14416        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14417 /* end confdefs.h.  */
14418
14419   /* For now, do not test the preprocessor; as of 2007 there are too many
14420          implementations with broken preprocessors.  Perhaps this can
14421          be revisited in 2012.  In the meantime, code should not expect
14422          #if to work with literals wider than 32 bits.  */
14423       /* Test literals.  */
14424       long long int ll = 9223372036854775807ll;
14425       long long int nll = -9223372036854775807LL;
14426       unsigned long long int ull = 18446744073709551615ULL;
14427       /* Test constant expressions.   */
14428       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14429                      ? 1 : -1)];
14430       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14431                      ? 1 : -1)];
14432       int i = 63;
14433 int
14434 main ()
14435 {
14436 /* Test availability of runtime routines for shift and division.  */
14437       long long int llmax = 9223372036854775807ll;
14438       unsigned long long int ullmax = 18446744073709551615ull;
14439       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14440               | (llmax / ll) | (llmax % ll)
14441               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14442               | (ullmax / ull) | (ullmax % ull));
14443   ;
14444   return 0;
14445 }
14446
14447 _ACEOF
14448 if ac_fn_c_try_link "$LINENO"; then :
14449
14450 else
14451   ac_cv_type_unsigned_long_long_int=no
14452 fi
14453 rm -f core conftest.err conftest.$ac_objext \
14454     conftest$ac_exeext conftest.$ac_ext
14455      fi
14456 fi
14457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14458 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14459   if test $ac_cv_type_unsigned_long_long_int = yes; then
14460
14461 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14462
14463   fi
14464
14465
14466
14467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14468 $as_echo_n "checking for long long int... " >&6; }
14469 if ${ac_cv_type_long_long_int+:} false; then :
14470   $as_echo_n "(cached) " >&6
14471 else
14472   ac_cv_type_long_long_int=yes
14473       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14474         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14475         if test $ac_cv_type_long_long_int = yes; then
14476                                   if test "$cross_compiling" = yes; then :
14477   :
14478 else
14479   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14480 /* end confdefs.h.  */
14481 #include <limits.h>
14482                  #ifndef LLONG_MAX
14483                  # define HALF \
14484                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14485                  # define LLONG_MAX (HALF - 1 + HALF)
14486                  #endif
14487 int
14488 main ()
14489 {
14490 long long int n = 1;
14491                  int i;
14492                  for (i = 0; ; i++)
14493                    {
14494                      long long int m = n << i;
14495                      if (m >> i != n)
14496                        return 1;
14497                      if (LLONG_MAX / 2 < m)
14498                        break;
14499                    }
14500                  return 0;
14501   ;
14502   return 0;
14503 }
14504 _ACEOF
14505 if ac_fn_c_try_run "$LINENO"; then :
14506
14507 else
14508   ac_cv_type_long_long_int=no
14509 fi
14510 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14511   conftest.$ac_objext conftest.beam conftest.$ac_ext
14512 fi
14513
14514         fi
14515       fi
14516 fi
14517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14518 $as_echo "$ac_cv_type_long_long_int" >&6; }
14519   if test $ac_cv_type_long_long_int = yes; then
14520
14521 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14522
14523   fi
14524
14525
14526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14527 $as_echo_n "checking for locale_t... " >&6; }
14528 if ${pgac_cv_type_locale_t+:} false; then :
14529   $as_echo_n "(cached) " >&6
14530 else
14531   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14532 /* end confdefs.h.  */
14533 #include <locale.h>
14534 locale_t x;
14535 int
14536 main ()
14537 {
14538
14539   ;
14540   return 0;
14541 }
14542 _ACEOF
14543 if ac_fn_c_try_compile "$LINENO"; then :
14544   pgac_cv_type_locale_t=yes
14545 else
14546   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14547 /* end confdefs.h.  */
14548 #include <xlocale.h>
14549 locale_t x;
14550 int
14551 main ()
14552 {
14553
14554   ;
14555   return 0;
14556 }
14557 _ACEOF
14558 if ac_fn_c_try_compile "$LINENO"; then :
14559   pgac_cv_type_locale_t='yes (in xlocale.h)'
14560 else
14561   pgac_cv_type_locale_t=no
14562 fi
14563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14564 fi
14565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14566 fi
14567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14568 $as_echo "$pgac_cv_type_locale_t" >&6; }
14569 if test "$pgac_cv_type_locale_t" != no; then
14570
14571 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14572
14573 fi
14574 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14575
14576 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14577
14578 fi
14579
14580 # MSVC doesn't cope well with defining restrict to __restrict, the
14581 # spelling it understands, because it conflicts with
14582 # __declspec(restrict). Therefore we define pg_restrict to the
14583 # appropriate definition, which presumably won't conflict.
14584 #
14585 # Allow platforms with buggy compilers to force restrict to not be
14586 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14587 # template.
14588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14589 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14590 if ${ac_cv_c_restrict+:} false; then :
14591   $as_echo_n "(cached) " >&6
14592 else
14593   ac_cv_c_restrict=no
14594    # The order here caters to the fact that C++ does not require restrict.
14595    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14596      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14597 /* end confdefs.h.  */
14598 typedef int * int_ptr;
14599         int foo (int_ptr $ac_kw ip) {
14600         return ip[0];
14601        }
14602 int
14603 main ()
14604 {
14605 int s[1];
14606         int * $ac_kw t = s;
14607         t[0] = 0;
14608         return foo(t)
14609   ;
14610   return 0;
14611 }
14612 _ACEOF
14613 if ac_fn_c_try_compile "$LINENO"; then :
14614   ac_cv_c_restrict=$ac_kw
14615 fi
14616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14617      test "$ac_cv_c_restrict" != no && break
14618    done
14619
14620 fi
14621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14622 $as_echo "$ac_cv_c_restrict" >&6; }
14623
14624  case $ac_cv_c_restrict in
14625    restrict) ;;
14626    no) $as_echo "#define restrict /**/" >>confdefs.h
14627  ;;
14628    *)  cat >>confdefs.h <<_ACEOF
14629 #define restrict $ac_cv_c_restrict
14630 _ACEOF
14631  ;;
14632  esac
14633
14634 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14635   pg_restrict=""
14636 else
14637   pg_restrict="$ac_cv_c_restrict"
14638 fi
14639
14640 cat >>confdefs.h <<_ACEOF
14641 #define pg_restrict $pg_restrict
14642 _ACEOF
14643
14644
14645 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14646 #include <sys/param.h>
14647 #ifdef HAVE_SYS_UCRED_H
14648 #include <sys/ucred.h>
14649 #endif
14650 "
14651 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14652
14653 cat >>confdefs.h <<_ACEOF
14654 #define HAVE_STRUCT_CMSGCRED 1
14655 _ACEOF
14656
14657
14658 fi
14659
14660
14661 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14662 #include <getopt.h>
14663 #endif
14664 "
14665 if test "x$ac_cv_type_struct_option" = xyes; then :
14666
14667 cat >>confdefs.h <<_ACEOF
14668 #define HAVE_STRUCT_OPTION 1
14669 _ACEOF
14670
14671
14672 fi
14673
14674
14675 if test "$with_zlib" = yes; then
14676   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14677   # did not).  While we could work around the lack of z_streamp, it
14678   # seems unwise to encourage people to use such old zlib versions...
14679   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14680 "
14681 if test "x$ac_cv_type_z_streamp" = xyes; then :
14682
14683 else
14684   as_fn_error $? "zlib version is too old
14685 Use --without-zlib to disable zlib support." "$LINENO" 5
14686 fi
14687
14688 fi
14689
14690 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14691 case $host_cpu in
14692   ppc*|powerpc*)
14693     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14694 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14695     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14696 /* end confdefs.h.  */
14697
14698 int
14699 main ()
14700 {
14701 int a = 0; int *p = &a; int r;
14702          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14703   ;
14704   return 0;
14705 }
14706 _ACEOF
14707 if ac_fn_c_try_compile "$LINENO"; then :
14708   pgac_cv_have_ppc_mutex_hint=yes
14709 else
14710   pgac_cv_have_ppc_mutex_hint=no
14711 fi
14712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14713     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14714 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14715     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14716
14717 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14718
14719     fi
14720   ;;
14721 esac
14722
14723 # Check largefile support.  You might think this is a system service not a
14724 # compiler characteristic, but you'd be wrong.  We must check this before
14725 # probing existence of related functions such as fseeko, since the largefile
14726 # defines can affect what is generated for that.
14727 if test "$PORTNAME" != "win32"; then
14728    # Check whether --enable-largefile was given.
14729 if test "${enable_largefile+set}" = set; then :
14730   enableval=$enable_largefile;
14731 fi
14732
14733 if test "$enable_largefile" != no; then
14734
14735   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14736 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14737 if ${ac_cv_sys_largefile_CC+:} false; then :
14738   $as_echo_n "(cached) " >&6
14739 else
14740   ac_cv_sys_largefile_CC=no
14741      if test "$GCC" != yes; then
14742        ac_save_CC=$CC
14743        while :; do
14744          # IRIX 6.2 and later do not support large files by default,
14745          # so use the C compiler's -n32 option if that helps.
14746          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14747 /* end confdefs.h.  */
14748 #include <sys/types.h>
14749  /* Check that off_t can represent 2**63 - 1 correctly.
14750     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14751     since some C++ compilers masquerading as C compilers
14752     incorrectly reject 9223372036854775807.  */
14753 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14754   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14755                        && LARGE_OFF_T % 2147483647 == 1)
14756                       ? 1 : -1];
14757 int
14758 main ()
14759 {
14760
14761   ;
14762   return 0;
14763 }
14764 _ACEOF
14765          if ac_fn_c_try_compile "$LINENO"; then :
14766   break
14767 fi
14768 rm -f core conftest.err conftest.$ac_objext
14769          CC="$CC -n32"
14770          if ac_fn_c_try_compile "$LINENO"; then :
14771   ac_cv_sys_largefile_CC=' -n32'; break
14772 fi
14773 rm -f core conftest.err conftest.$ac_objext
14774          break
14775        done
14776        CC=$ac_save_CC
14777        rm -f conftest.$ac_ext
14778     fi
14779 fi
14780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14781 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14782   if test "$ac_cv_sys_largefile_CC" != no; then
14783     CC=$CC$ac_cv_sys_largefile_CC
14784   fi
14785
14786   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14787 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14788 if ${ac_cv_sys_file_offset_bits+:} false; then :
14789   $as_echo_n "(cached) " >&6
14790 else
14791   while :; do
14792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14793 /* end confdefs.h.  */
14794 #include <sys/types.h>
14795  /* Check that off_t can represent 2**63 - 1 correctly.
14796     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14797     since some C++ compilers masquerading as C compilers
14798     incorrectly reject 9223372036854775807.  */
14799 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14800   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14801                        && LARGE_OFF_T % 2147483647 == 1)
14802                       ? 1 : -1];
14803 int
14804 main ()
14805 {
14806
14807   ;
14808   return 0;
14809 }
14810 _ACEOF
14811 if ac_fn_c_try_compile "$LINENO"; then :
14812   ac_cv_sys_file_offset_bits=no; break
14813 fi
14814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14816 /* end confdefs.h.  */
14817 #define _FILE_OFFSET_BITS 64
14818 #include <sys/types.h>
14819  /* Check that off_t can represent 2**63 - 1 correctly.
14820     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14821     since some C++ compilers masquerading as C compilers
14822     incorrectly reject 9223372036854775807.  */
14823 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14824   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14825                        && LARGE_OFF_T % 2147483647 == 1)
14826                       ? 1 : -1];
14827 int
14828 main ()
14829 {
14830
14831   ;
14832   return 0;
14833 }
14834 _ACEOF
14835 if ac_fn_c_try_compile "$LINENO"; then :
14836   ac_cv_sys_file_offset_bits=64; break
14837 fi
14838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14839   ac_cv_sys_file_offset_bits=unknown
14840   break
14841 done
14842 fi
14843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14844 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14845 case $ac_cv_sys_file_offset_bits in #(
14846   no | unknown) ;;
14847   *)
14848 cat >>confdefs.h <<_ACEOF
14849 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14850 _ACEOF
14851 ;;
14852 esac
14853 rm -rf conftest*
14854   if test $ac_cv_sys_file_offset_bits = unknown; then
14855     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14856 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14857 if ${ac_cv_sys_large_files+:} false; then :
14858   $as_echo_n "(cached) " >&6
14859 else
14860   while :; do
14861   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14862 /* end confdefs.h.  */
14863 #include <sys/types.h>
14864  /* Check that off_t can represent 2**63 - 1 correctly.
14865     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14866     since some C++ compilers masquerading as C compilers
14867     incorrectly reject 9223372036854775807.  */
14868 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14869   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14870                        && LARGE_OFF_T % 2147483647 == 1)
14871                       ? 1 : -1];
14872 int
14873 main ()
14874 {
14875
14876   ;
14877   return 0;
14878 }
14879 _ACEOF
14880 if ac_fn_c_try_compile "$LINENO"; then :
14881   ac_cv_sys_large_files=no; break
14882 fi
14883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14885 /* end confdefs.h.  */
14886 #define _LARGE_FILES 1
14887 #include <sys/types.h>
14888  /* Check that off_t can represent 2**63 - 1 correctly.
14889     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14890     since some C++ compilers masquerading as C compilers
14891     incorrectly reject 9223372036854775807.  */
14892 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14893   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14894                        && LARGE_OFF_T % 2147483647 == 1)
14895                       ? 1 : -1];
14896 int
14897 main ()
14898 {
14899
14900   ;
14901   return 0;
14902 }
14903 _ACEOF
14904 if ac_fn_c_try_compile "$LINENO"; then :
14905   ac_cv_sys_large_files=1; break
14906 fi
14907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14908   ac_cv_sys_large_files=unknown
14909   break
14910 done
14911 fi
14912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14913 $as_echo "$ac_cv_sys_large_files" >&6; }
14914 case $ac_cv_sys_large_files in #(
14915   no | unknown) ;;
14916   *)
14917 cat >>confdefs.h <<_ACEOF
14918 #define _LARGE_FILES $ac_cv_sys_large_files
14919 _ACEOF
14920 ;;
14921 esac
14922 rm -rf conftest*
14923   fi
14924
14925
14926 fi
14927
14928
14929 fi
14930
14931 # The cast to long int works around a bug in the HP C Compiler
14932 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14933 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14934 # This bug is HP SR number 8606223364.
14935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14936 $as_echo_n "checking size of off_t... " >&6; }
14937 if ${ac_cv_sizeof_off_t+:} false; then :
14938   $as_echo_n "(cached) " >&6
14939 else
14940   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14941
14942 else
14943   if test "$ac_cv_type_off_t" = yes; then
14944      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14945 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14946 as_fn_error 77 "cannot compute sizeof (off_t)
14947 See \`config.log' for more details" "$LINENO" 5; }
14948    else
14949      ac_cv_sizeof_off_t=0
14950    fi
14951 fi
14952
14953 fi
14954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14955 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14956
14957
14958
14959 cat >>confdefs.h <<_ACEOF
14960 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14961 _ACEOF
14962
14963
14964
14965 # If we don't have largefile support, can't handle segsize >= 2GB.
14966 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14967    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14968 fi
14969
14970 # The cast to long int works around a bug in the HP C Compiler
14971 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14972 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14973 # This bug is HP SR number 8606223364.
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14975 $as_echo_n "checking size of bool... " >&6; }
14976 if ${ac_cv_sizeof_bool+:} false; then :
14977   $as_echo_n "(cached) " >&6
14978 else
14979   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
14980 #include <stdbool.h>
14981 #endif
14982 "; then :
14983
14984 else
14985   if test "$ac_cv_type_bool" = yes; then
14986      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14987 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14988 as_fn_error 77 "cannot compute sizeof (bool)
14989 See \`config.log' for more details" "$LINENO" 5; }
14990    else
14991      ac_cv_sizeof_bool=0
14992    fi
14993 fi
14994
14995 fi
14996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14997 $as_echo "$ac_cv_sizeof_bool" >&6; }
14998
14999
15000
15001 cat >>confdefs.h <<_ACEOF
15002 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15003 _ACEOF
15004
15005
15006
15007
15008 ##
15009 ## Functions, global variables
15010 ##
15011
15012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15013 $as_echo_n "checking for int timezone... " >&6; }
15014 if ${pgac_cv_var_int_timezone+:} false; then :
15015   $as_echo_n "(cached) " >&6
15016 else
15017   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15018 /* end confdefs.h.  */
15019 #include <time.h>
15020 int res;
15021 int
15022 main ()
15023 {
15024 #ifndef __CYGWIN__
15025 res = timezone / 60;
15026 #else
15027 res = _timezone / 60;
15028 #endif
15029   ;
15030   return 0;
15031 }
15032 _ACEOF
15033 if ac_fn_c_try_link "$LINENO"; then :
15034   pgac_cv_var_int_timezone=yes
15035 else
15036   pgac_cv_var_int_timezone=no
15037 fi
15038 rm -f core conftest.err conftest.$ac_objext \
15039     conftest$ac_exeext conftest.$ac_ext
15040 fi
15041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15042 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15043 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15044
15045 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15046
15047 fi
15048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15049 $as_echo_n "checking types of arguments for accept()... " >&6; }
15050  if ${ac_cv_func_accept_return+:} false; then :
15051   $as_echo_n "(cached) " >&6
15052 else
15053    if ${ac_cv_func_accept_arg1+:} false; then :
15054   $as_echo_n "(cached) " >&6
15055 else
15056     if ${ac_cv_func_accept_arg2+:} false; then :
15057   $as_echo_n "(cached) " >&6
15058 else
15059      if ${ac_cv_func_accept_arg3+:} false; then :
15060   $as_echo_n "(cached) " >&6
15061 else
15062       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
15063       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
15064        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15065         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15066          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15067 /* end confdefs.h.  */
15068 #include <sys/types.h>
15069 #include <sys/socket.h>
15070 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15071 _ACEOF
15072 if ac_fn_c_try_compile "$LINENO"; then :
15073   ac_not_found=no; break 4
15074 else
15075   ac_not_found=yes
15076 fi
15077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15078        done
15079       done
15080      done
15081     done
15082     if test "$ac_not_found" = yes; then
15083       as_fn_error $? "could not determine argument types" "$LINENO" 5
15084     fi
15085     if test "$ac_cv_func_accept_arg3" = "void"; then
15086       ac_cv_func_accept_arg3=int
15087     fi
15088
15089 fi
15090
15091 fi
15092
15093 fi
15094
15095 fi
15096  { $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
15097 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15098
15099 cat >>confdefs.h <<_ACEOF
15100 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15101 _ACEOF
15102
15103
15104 cat >>confdefs.h <<_ACEOF
15105 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15106 _ACEOF
15107
15108
15109 cat >>confdefs.h <<_ACEOF
15110 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15111 _ACEOF
15112
15113
15114 cat >>confdefs.h <<_ACEOF
15115 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15116 _ACEOF
15117
15118
15119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15120 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15121 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15122   $as_echo_n "(cached) " >&6
15123 else
15124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15125 /* end confdefs.h.  */
15126 #include <sys/time.h>
15127 int
15128 main ()
15129 {
15130 struct timeval *tp;
15131 struct timezone *tzp;
15132 gettimeofday(tp,tzp);
15133   ;
15134   return 0;
15135 }
15136 _ACEOF
15137 if ac_fn_c_try_compile "$LINENO"; then :
15138   pgac_cv_func_gettimeofday_1arg=no
15139 else
15140   pgac_cv_func_gettimeofday_1arg=yes
15141 fi
15142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15143 fi
15144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15145 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15146 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15147
15148 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15149
15150 fi
15151
15152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15153 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15154 if ${pgac_cv_func_wcstombs_l+:} false; then :
15155   $as_echo_n "(cached) " >&6
15156 else
15157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15158 /* end confdefs.h.  */
15159 #include <stdlib.h>
15160 #include <locale.h>
15161 int
15162 main ()
15163 {
15164 #ifndef wcstombs_l
15165 (void) wcstombs_l;
15166 #endif
15167   ;
15168   return 0;
15169 }
15170 _ACEOF
15171 if ac_fn_c_try_compile "$LINENO"; then :
15172   pgac_cv_func_wcstombs_l='yes'
15173 else
15174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15175 /* end confdefs.h.  */
15176 #include <stdlib.h>
15177 #include <locale.h>
15178 #include <xlocale.h>
15179 int
15180 main ()
15181 {
15182 #ifndef wcstombs_l
15183 (void) wcstombs_l;
15184 #endif
15185   ;
15186   return 0;
15187 }
15188 _ACEOF
15189 if ac_fn_c_try_compile "$LINENO"; then :
15190   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15191 else
15192   pgac_cv_func_wcstombs_l='no'
15193 fi
15194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15195 fi
15196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15197 fi
15198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15199 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15200 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15201
15202 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15203
15204 fi
15205
15206 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15207 # symbols that that library has no business exposing to the world.  Pending
15208 # acquisition of a clue by those developers, ignore libedit (including its
15209 # possible alias of libreadline) while checking for everything else.
15210 LIBS_including_readline="$LIBS"
15211 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15212
15213 for ac_func in cbrt clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range uselocale utime utimes wcstombs_l
15214 do :
15215   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15216 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15217 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15218   cat >>confdefs.h <<_ACEOF
15219 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15220 _ACEOF
15221
15222 fi
15223 done
15224
15225
15226 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15227 if test "x$ac_cv_func_fseeko" = xyes; then :
15228   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15229
15230 else
15231   case " $LIBOBJS " in
15232   *" fseeko.$ac_objext "* ) ;;
15233   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15234  ;;
15235 esac
15236
15237 fi
15238
15239
15240 case $host_os in
15241         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15242         # Mingw uses macros to access Win32 API calls
15243         netbsd*|mingw*)
15244
15245 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15246
15247                 ac_cv_func_fseeko=yes;;
15248         *)
15249                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15250 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15251 if ${ac_cv_sys_largefile_source+:} false; then :
15252   $as_echo_n "(cached) " >&6
15253 else
15254   while :; do
15255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15256 /* end confdefs.h.  */
15257 #include <sys/types.h> /* for off_t */
15258      #include <stdio.h>
15259 int
15260 main ()
15261 {
15262 int (*fp) (FILE *, off_t, int) = fseeko;
15263      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15264   ;
15265   return 0;
15266 }
15267 _ACEOF
15268 if ac_fn_c_try_link "$LINENO"; then :
15269   ac_cv_sys_largefile_source=no; break
15270 fi
15271 rm -f core conftest.err conftest.$ac_objext \
15272     conftest$ac_exeext conftest.$ac_ext
15273   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15274 /* end confdefs.h.  */
15275 #define _LARGEFILE_SOURCE 1
15276 #include <sys/types.h> /* for off_t */
15277      #include <stdio.h>
15278 int
15279 main ()
15280 {
15281 int (*fp) (FILE *, off_t, int) = fseeko;
15282      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15283   ;
15284   return 0;
15285 }
15286 _ACEOF
15287 if ac_fn_c_try_link "$LINENO"; then :
15288   ac_cv_sys_largefile_source=1; break
15289 fi
15290 rm -f core conftest.err conftest.$ac_objext \
15291     conftest$ac_exeext conftest.$ac_ext
15292   ac_cv_sys_largefile_source=unknown
15293   break
15294 done
15295 fi
15296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15297 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15298 case $ac_cv_sys_largefile_source in #(
15299   no | unknown) ;;
15300   *)
15301 cat >>confdefs.h <<_ACEOF
15302 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15303 _ACEOF
15304 ;;
15305 esac
15306 rm -rf conftest*
15307
15308 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15309 # in glibc 2.1.3, but that breaks too many other things.
15310 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15311 if test $ac_cv_sys_largefile_source != unknown; then
15312
15313 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15314
15315 fi
15316 ;;
15317 esac
15318
15319 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15320 # by calling it, 2009-04-02
15321 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15322 # The Clang compiler raises a warning for an undeclared identifier that matches
15323 # a compiler builtin function.  All extant Clang versions are affected, as of
15324 # Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
15325 # C and Objective C languages, but Clang does report an error under C++ and
15326 # Objective C++.
15327 #
15328 # Passing -fno-builtin to the compiler would suppress this problem.  That
15329 # strategy would have the advantage of being insensitive to stray warnings, but
15330 # it would make tests less realistic.
15331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15332 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15333 if ${ac_cv_c_decl_report+:} false; then :
15334   $as_echo_n "(cached) " >&6
15335 else
15336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15337 /* end confdefs.h.  */
15338
15339 int
15340 main ()
15341 {
15342 (void) strchr;
15343   ;
15344   return 0;
15345 }
15346 _ACEOF
15347 if ac_fn_c_try_compile "$LINENO"; then :
15348   if test -s conftest.err; then :
15349       # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15350     # valid AC_CHECK_DECL input.  No library function is consistently available
15351     # on freestanding implementations, so test against a dummy declaration.
15352     # Include always-available headers on the off chance that they somehow
15353     # elicit warnings.
15354     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15355 /* end confdefs.h.  */
15356 #include <float.h>
15357 #include <limits.h>
15358 #include <stdarg.h>
15359 #include <stddef.h>
15360 extern void ac_decl (int, char *);
15361 int
15362 main ()
15363 {
15364 #ifdef __cplusplus
15365   (void) ac_decl ((int) 0, (char *) 0);
15366   (void) ac_decl;
15367 #else
15368   (void) ac_decl;
15369 #endif
15370
15371   ;
15372   return 0;
15373 }
15374 _ACEOF
15375 if ac_fn_c_try_compile "$LINENO"; then :
15376   if test -s conftest.err; then :
15377   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15378 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15379 as_fn_error $? "cannot detect from compiler exit status or warnings
15380 See \`config.log' for more details" "$LINENO" 5; }
15381 else
15382   ac_cv_c_decl_report=warning
15383 fi
15384 else
15385   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15386 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15387 as_fn_error $? "cannot compile a simple declaration test
15388 See \`config.log' for more details" "$LINENO" 5; }
15389 fi
15390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15391 else
15392   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15393 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15394 as_fn_error $? "compiler does not report undeclared identifiers
15395 See \`config.log' for more details" "$LINENO" 5; }
15396 fi
15397 else
15398   ac_cv_c_decl_report=error
15399 fi
15400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15401 fi
15402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15403 $as_echo "$ac_cv_c_decl_report" >&6; }
15404
15405 case $ac_cv_c_decl_report in
15406   warning) ac_c_decl_warn_flag=yes ;;
15407   *) ac_c_decl_warn_flag= ;;
15408 esac
15409
15410 if test "$PORTNAME" != "solaris"; then :
15411
15412 for ac_func in posix_fadvise
15413 do :
15414   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15415 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15416   cat >>confdefs.h <<_ACEOF
15417 #define HAVE_POSIX_FADVISE 1
15418 _ACEOF
15419
15420 fi
15421 done
15422
15423 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15424 "
15425 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15426   ac_have_decl=1
15427 else
15428   ac_have_decl=0
15429 fi
15430
15431 cat >>confdefs.h <<_ACEOF
15432 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15433 _ACEOF
15434
15435
15436 fi # fi
15437
15438 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15439 "
15440 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15441   ac_have_decl=1
15442 else
15443   ac_have_decl=0
15444 fi
15445
15446 cat >>confdefs.h <<_ACEOF
15447 #define HAVE_DECL_FDATASYNC $ac_have_decl
15448 _ACEOF
15449
15450 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15451 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15452   ac_have_decl=1
15453 else
15454   ac_have_decl=0
15455 fi
15456
15457 cat >>confdefs.h <<_ACEOF
15458 #define HAVE_DECL_STRLCAT $ac_have_decl
15459 _ACEOF
15460 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15461 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15462   ac_have_decl=1
15463 else
15464   ac_have_decl=0
15465 fi
15466
15467 cat >>confdefs.h <<_ACEOF
15468 #define HAVE_DECL_STRLCPY $ac_have_decl
15469 _ACEOF
15470 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15471 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15472   ac_have_decl=1
15473 else
15474   ac_have_decl=0
15475 fi
15476
15477 cat >>confdefs.h <<_ACEOF
15478 #define HAVE_DECL_STRNLEN $ac_have_decl
15479 _ACEOF
15480
15481 # This is probably only present on macOS, but may as well check always
15482 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15483 "
15484 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15485   ac_have_decl=1
15486 else
15487   ac_have_decl=0
15488 fi
15489
15490 cat >>confdefs.h <<_ACEOF
15491 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15492 _ACEOF
15493
15494
15495 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15496 "
15497 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15498   ac_have_decl=1
15499 else
15500   ac_have_decl=0
15501 fi
15502
15503 cat >>confdefs.h <<_ACEOF
15504 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15505 _ACEOF
15506 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15507 "
15508 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15509   ac_have_decl=1
15510 else
15511   ac_have_decl=0
15512 fi
15513
15514 cat >>confdefs.h <<_ACEOF
15515 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15516 _ACEOF
15517
15518
15519 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15520 #include <netinet/in.h>
15521 "
15522 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15523
15524 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15525
15526 fi
15527
15528
15529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15530 $as_echo_n "checking for PS_STRINGS... " >&6; }
15531 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15532   $as_echo_n "(cached) " >&6
15533 else
15534   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15535 /* end confdefs.h.  */
15536 #include <machine/vmparam.h>
15537 #include <sys/exec.h>
15538
15539 int
15540 main ()
15541 {
15542 PS_STRINGS->ps_nargvstr = 1;
15543 PS_STRINGS->ps_argvstr = "foo";
15544   ;
15545   return 0;
15546 }
15547 _ACEOF
15548 if ac_fn_c_try_link "$LINENO"; then :
15549   pgac_cv_var_PS_STRINGS=yes
15550 else
15551   pgac_cv_var_PS_STRINGS=no
15552 fi
15553 rm -f core conftest.err conftest.$ac_objext \
15554     conftest$ac_exeext conftest.$ac_ext
15555 fi
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15557 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15558 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15559
15560 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15561
15562 fi
15563
15564
15565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15566 $as_echo_n "checking for isinf... " >&6; }
15567 if ${ac_cv_func_isinf+:} false; then :
15568   $as_echo_n "(cached) " >&6
15569 else
15570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15571 /* end confdefs.h.  */
15572
15573 #include <math.h>
15574 double glob_double;
15575
15576 int
15577 main ()
15578 {
15579 return isinf(glob_double) ? 0 : 1;
15580   ;
15581   return 0;
15582 }
15583 _ACEOF
15584 if ac_fn_c_try_link "$LINENO"; then :
15585   ac_cv_func_isinf=yes
15586 else
15587   ac_cv_func_isinf=no
15588 fi
15589 rm -f core conftest.err conftest.$ac_objext \
15590     conftest$ac_exeext conftest.$ac_ext
15591 fi
15592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15593 $as_echo "$ac_cv_func_isinf" >&6; }
15594
15595 if test $ac_cv_func_isinf = yes ; then
15596
15597 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15598
15599 else
15600   case " $LIBOBJS " in
15601   *" isinf.$ac_objext "* ) ;;
15602   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15603  ;;
15604 esac
15605
15606   # Look for a way to implement a substitute for isinf()
15607   for ac_func in fpclass fp_class fp_class_d class
15608 do :
15609   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15610 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15611 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15612   cat >>confdefs.h <<_ACEOF
15613 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15614 _ACEOF
15615  break
15616 fi
15617 done
15618
15619 fi
15620
15621 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15622 if test "x$ac_cv_func_crypt" = xyes; then :
15623   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15624
15625 else
15626   case " $LIBOBJS " in
15627   *" crypt.$ac_objext "* ) ;;
15628   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15629  ;;
15630 esac
15631
15632 fi
15633
15634 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15635 if test "x$ac_cv_func_dlopen" = xyes; then :
15636   $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15637
15638 else
15639   case " $LIBOBJS " in
15640   *" dlopen.$ac_objext "* ) ;;
15641   *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15642  ;;
15643 esac
15644
15645 fi
15646
15647 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15648 if test "x$ac_cv_func_fls" = xyes; then :
15649   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15650
15651 else
15652   case " $LIBOBJS " in
15653   *" fls.$ac_objext "* ) ;;
15654   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15655  ;;
15656 esac
15657
15658 fi
15659
15660 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15661 if test "x$ac_cv_func_getopt" = xyes; then :
15662   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15663
15664 else
15665   case " $LIBOBJS " in
15666   *" getopt.$ac_objext "* ) ;;
15667   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15668  ;;
15669 esac
15670
15671 fi
15672
15673 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15674 if test "x$ac_cv_func_getrusage" = xyes; then :
15675   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15676
15677 else
15678   case " $LIBOBJS " in
15679   *" getrusage.$ac_objext "* ) ;;
15680   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15681  ;;
15682 esac
15683
15684 fi
15685
15686 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15687 if test "x$ac_cv_func_inet_aton" = xyes; then :
15688   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15689
15690 else
15691   case " $LIBOBJS " in
15692   *" inet_aton.$ac_objext "* ) ;;
15693   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15694  ;;
15695 esac
15696
15697 fi
15698
15699 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15700 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15701   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15702
15703 else
15704   case " $LIBOBJS " in
15705   *" mkdtemp.$ac_objext "* ) ;;
15706   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15707  ;;
15708 esac
15709
15710 fi
15711
15712 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
15713 if test "x$ac_cv_func_pread" = xyes; then :
15714   $as_echo "#define HAVE_PREAD 1" >>confdefs.h
15715
15716 else
15717   case " $LIBOBJS " in
15718   *" pread.$ac_objext "* ) ;;
15719   *) LIBOBJS="$LIBOBJS pread.$ac_objext"
15720  ;;
15721 esac
15722
15723 fi
15724
15725 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
15726 if test "x$ac_cv_func_pwrite" = xyes; then :
15727   $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
15728
15729 else
15730   case " $LIBOBJS " in
15731   *" pwrite.$ac_objext "* ) ;;
15732   *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
15733  ;;
15734 esac
15735
15736 fi
15737
15738 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15739 if test "x$ac_cv_func_random" = xyes; then :
15740   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15741
15742 else
15743   case " $LIBOBJS " in
15744   *" random.$ac_objext "* ) ;;
15745   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15746  ;;
15747 esac
15748
15749 fi
15750
15751 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15752 if test "x$ac_cv_func_rint" = xyes; then :
15753   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15754
15755 else
15756   case " $LIBOBJS " in
15757   *" rint.$ac_objext "* ) ;;
15758   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15759  ;;
15760 esac
15761
15762 fi
15763
15764 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15765 if test "x$ac_cv_func_srandom" = xyes; then :
15766   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15767
15768 else
15769   case " $LIBOBJS " in
15770   *" srandom.$ac_objext "* ) ;;
15771   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15772  ;;
15773 esac
15774
15775 fi
15776
15777 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15778 if test "x$ac_cv_func_strlcat" = xyes; then :
15779   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15780
15781 else
15782   case " $LIBOBJS " in
15783   *" strlcat.$ac_objext "* ) ;;
15784   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15785  ;;
15786 esac
15787
15788 fi
15789
15790 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15791 if test "x$ac_cv_func_strlcpy" = xyes; then :
15792   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15793
15794 else
15795   case " $LIBOBJS " in
15796   *" strlcpy.$ac_objext "* ) ;;
15797   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15798  ;;
15799 esac
15800
15801 fi
15802
15803 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15804 if test "x$ac_cv_func_strnlen" = xyes; then :
15805   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15806
15807 else
15808   case " $LIBOBJS " in
15809   *" strnlen.$ac_objext "* ) ;;
15810   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15811  ;;
15812 esac
15813
15814 fi
15815
15816 ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
15817 if test "x$ac_cv_func_strtof" = xyes; then :
15818   $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
15819
15820 else
15821   case " $LIBOBJS " in
15822   *" strtof.$ac_objext "* ) ;;
15823   *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15824  ;;
15825 esac
15826
15827 fi
15828
15829
15830
15831 case $host_os in
15832         # Cygwin and (apparently, based on test results) Mingw both
15833         # have a broken strtof(), so substitute the same replacement
15834         # code we use with VS2013. That's not a perfect fix, since
15835         # (unlike with VS2013) it doesn't avoid double-rounding, but
15836         # we have no better options. To get that, though, we have to
15837         # force the file to be compiled despite HAVE_STRTOF.
15838         mingw*|cygwin*)
15839                 case " $LIBOBJS " in
15840   *" strtof.$ac_objext "* ) ;;
15841   *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15842  ;;
15843 esac
15844
15845                 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
15846 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
15847         ;;
15848 esac
15849
15850 case $host_os in
15851
15852         # Windows uses a specialised env handler
15853         # and doesn't need a replacement getpeereid because it doesn't use
15854         # Unix sockets.
15855         mingw*)
15856
15857 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15858
15859
15860 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15861
15862                 ac_cv_func_unsetenv=yes
15863                 ac_cv_func_getpeereid=yes;;
15864         *)
15865                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15866 if test "x$ac_cv_func_unsetenv" = xyes; then :
15867   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15868
15869 else
15870   case " $LIBOBJS " in
15871   *" unsetenv.$ac_objext "* ) ;;
15872   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15873  ;;
15874 esac
15875
15876 fi
15877
15878 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15879 if test "x$ac_cv_func_getpeereid" = xyes; then :
15880   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15881
15882 else
15883   case " $LIBOBJS " in
15884   *" getpeereid.$ac_objext "* ) ;;
15885   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15886  ;;
15887 esac
15888
15889 fi
15890
15891
15892                 ;;
15893 esac
15894
15895 # System's version of getaddrinfo(), if any, may be used only if we found
15896 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15897 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15898 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15899    test "$PORTNAME" != "win32"; then
15900   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15901 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15902   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15903
15904 else
15905   case " $LIBOBJS " in
15906   *" getaddrinfo.$ac_objext "* ) ;;
15907   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15908  ;;
15909 esac
15910
15911 fi
15912
15913
15914 else
15915   case " $LIBOBJS " in
15916   *" getaddrinfo.$ac_objext "* ) ;;
15917   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15918  ;;
15919 esac
15920
15921 fi
15922
15923 # Similarly, use system's getopt_long() only if system provides struct option.
15924 if test x"$ac_cv_type_struct_option" = xyes ; then
15925   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15926 if test "x$ac_cv_func_getopt_long" = xyes; then :
15927   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15928
15929 else
15930   case " $LIBOBJS " in
15931   *" getopt_long.$ac_objext "* ) ;;
15932   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15933  ;;
15934 esac
15935
15936 fi
15937
15938
15939 else
15940   case " $LIBOBJS " in
15941   *" getopt_long.$ac_objext "* ) ;;
15942   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15943  ;;
15944 esac
15945
15946 fi
15947
15948 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15949 # (i.e., allow '-' as a flag character), so use our version on those platforms.
15950 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
15951   case " $LIBOBJS " in
15952   *" getopt.$ac_objext "* ) ;;
15953   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15954  ;;
15955 esac
15956
15957 fi
15958
15959 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15960 # so always use our version on Windows.
15961 if test "$PORTNAME" = "win32"; then
15962   case " $LIBOBJS " in
15963   *" getopt.$ac_objext "* ) ;;
15964   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15965  ;;
15966 esac
15967
15968   case " $LIBOBJS " in
15969   *" getopt_long.$ac_objext "* ) ;;
15970   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15971  ;;
15972 esac
15973
15974 fi
15975
15976 # Win32 (really MinGW) support
15977 if test "$PORTNAME" = "win32"; then
15978   for ac_func in _configthreadlocale
15979 do :
15980   ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
15981 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
15982   cat >>confdefs.h <<_ACEOF
15983 #define HAVE__CONFIGTHREADLOCALE 1
15984 _ACEOF
15985
15986 fi
15987 done
15988
15989   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15990 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15991   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15992
15993 else
15994   case " $LIBOBJS " in
15995   *" gettimeofday.$ac_objext "* ) ;;
15996   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15997  ;;
15998 esac
15999
16000 fi
16001
16002
16003   case " $LIBOBJS " in
16004   *" dirmod.$ac_objext "* ) ;;
16005   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16006  ;;
16007 esac
16008
16009   case " $LIBOBJS " in
16010   *" kill.$ac_objext "* ) ;;
16011   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16012  ;;
16013 esac
16014
16015   case " $LIBOBJS " in
16016   *" open.$ac_objext "* ) ;;
16017   *) LIBOBJS="$LIBOBJS open.$ac_objext"
16018  ;;
16019 esac
16020
16021   case " $LIBOBJS " in
16022   *" system.$ac_objext "* ) ;;
16023   *) LIBOBJS="$LIBOBJS system.$ac_objext"
16024  ;;
16025 esac
16026
16027   case " $LIBOBJS " in
16028   *" win32env.$ac_objext "* ) ;;
16029   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16030  ;;
16031 esac
16032
16033   case " $LIBOBJS " in
16034   *" win32error.$ac_objext "* ) ;;
16035   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16036  ;;
16037 esac
16038
16039   case " $LIBOBJS " in
16040   *" win32security.$ac_objext "* ) ;;
16041   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16042  ;;
16043 esac
16044
16045   case " $LIBOBJS " in
16046   *" win32setlocale.$ac_objext "* ) ;;
16047   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16048  ;;
16049 esac
16050
16051
16052 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16053
16054   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16055 #define WIN32_LEAN_AND_MEAN
16056 #include <windows.h>
16057 #include <string.h>
16058 #include <dbghelp.h>
16059 "
16060 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16061
16062 cat >>confdefs.h <<_ACEOF
16063 #define HAVE_MINIDUMP_TYPE 1
16064 _ACEOF
16065
16066 pgac_minidump_type=yes
16067 else
16068   pgac_minidump_type=no
16069 fi
16070
16071 fi
16072 if test x"$pgac_minidump_type" = x"yes" ; then
16073   have_win32_dbghelp=yes
16074
16075 else
16076   have_win32_dbghelp=no
16077
16078 fi
16079
16080 # Cygwin needs only a bit of that
16081 if test "$PORTNAME" = "cygwin"; then
16082   case " $LIBOBJS " in
16083   *" dirmod.$ac_objext "* ) ;;
16084   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16085  ;;
16086 esac
16087
16088 fi
16089
16090 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16091 if test "x$ac_cv_func_syslog" = xyes; then :
16092   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16093 if test "x$ac_cv_header_syslog_h" = xyes; then :
16094
16095 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16096
16097 fi
16098
16099
16100 fi
16101
16102
16103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16104 $as_echo_n "checking for opterr... " >&6; }
16105 if ${pgac_cv_var_int_opterr+:} false; then :
16106   $as_echo_n "(cached) " >&6
16107 else
16108   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16109 /* end confdefs.h.  */
16110 #include <unistd.h>
16111 int
16112 main ()
16113 {
16114 extern int opterr; opterr = 1;
16115   ;
16116   return 0;
16117 }
16118 _ACEOF
16119 if ac_fn_c_try_link "$LINENO"; then :
16120   pgac_cv_var_int_opterr=yes
16121 else
16122   pgac_cv_var_int_opterr=no
16123 fi
16124 rm -f core conftest.err conftest.$ac_objext \
16125     conftest$ac_exeext conftest.$ac_ext
16126 fi
16127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16128 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16129 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16130
16131 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16132
16133 fi
16134
16135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16136 $as_echo_n "checking for optreset... " >&6; }
16137 if ${pgac_cv_var_int_optreset+:} false; then :
16138   $as_echo_n "(cached) " >&6
16139 else
16140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16141 /* end confdefs.h.  */
16142 #include <unistd.h>
16143 int
16144 main ()
16145 {
16146 extern int optreset; optreset = 1;
16147   ;
16148   return 0;
16149 }
16150 _ACEOF
16151 if ac_fn_c_try_link "$LINENO"; then :
16152   pgac_cv_var_int_optreset=yes
16153 else
16154   pgac_cv_var_int_optreset=no
16155 fi
16156 rm -f core conftest.err conftest.$ac_objext \
16157     conftest$ac_exeext conftest.$ac_ext
16158 fi
16159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16160 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16161 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16162
16163 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16164
16165 fi
16166
16167 for ac_func in strtoll __strtoll strtoq
16168 do :
16169   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16170 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16171 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16172   cat >>confdefs.h <<_ACEOF
16173 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16174 _ACEOF
16175  break
16176 fi
16177 done
16178
16179 for ac_func in strtoull __strtoull strtouq
16180 do :
16181   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16182 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16183 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16184   cat >>confdefs.h <<_ACEOF
16185 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16186 _ACEOF
16187  break
16188 fi
16189 done
16190
16191 # strto[u]ll may exist but not be declared
16192 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16193 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16194   ac_have_decl=1
16195 else
16196   ac_have_decl=0
16197 fi
16198
16199 cat >>confdefs.h <<_ACEOF
16200 #define HAVE_DECL_STRTOLL $ac_have_decl
16201 _ACEOF
16202 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16203 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16204   ac_have_decl=1
16205 else
16206   ac_have_decl=0
16207 fi
16208
16209 cat >>confdefs.h <<_ACEOF
16210 #define HAVE_DECL_STRTOULL $ac_have_decl
16211 _ACEOF
16212
16213
16214 if test "$with_icu" = yes; then
16215   ac_save_CPPFLAGS=$CPPFLAGS
16216   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16217
16218   # Verify we have ICU's header files
16219   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16220 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16221
16222 else
16223   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16224 fi
16225
16226
16227
16228   CPPFLAGS=$ac_save_CPPFLAGS
16229 fi
16230
16231 if test "$with_llvm" = yes; then
16232
16233   # Check which functionality is present
16234   SAVE_CPPFLAGS="$CPPFLAGS"
16235   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16236   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16237 "
16238 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16239   ac_have_decl=1
16240 else
16241   ac_have_decl=0
16242 fi
16243
16244 cat >>confdefs.h <<_ACEOF
16245 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16246 _ACEOF
16247
16248   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16249 "
16250 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16251   ac_have_decl=1
16252 else
16253   ac_have_decl=0
16254 fi
16255
16256 cat >>confdefs.h <<_ACEOF
16257 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16258 _ACEOF
16259 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16260 "
16261 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16262   ac_have_decl=1
16263 else
16264   ac_have_decl=0
16265 fi
16266
16267 cat >>confdefs.h <<_ACEOF
16268 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16269 _ACEOF
16270
16271   ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16272 "
16273 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16274   ac_have_decl=1
16275 else
16276   ac_have_decl=0
16277 fi
16278
16279 cat >>confdefs.h <<_ACEOF
16280 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16281 _ACEOF
16282 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16283 "
16284 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16285   ac_have_decl=1
16286 else
16287   ac_have_decl=0
16288 fi
16289
16290 cat >>confdefs.h <<_ACEOF
16291 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16292 _ACEOF
16293
16294   CPPFLAGS="$SAVE_CPPFLAGS"
16295
16296 fi
16297
16298 # Lastly, restore full LIBS list and check for readline/libedit symbols
16299 LIBS="$LIBS_including_readline"
16300
16301 if test "$with_readline" = yes; then
16302   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16303 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16304 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16305   $as_echo_n "(cached) " >&6
16306 else
16307   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16308 /* end confdefs.h.  */
16309 #include <stdio.h>
16310 #ifdef HAVE_READLINE_READLINE_H
16311 # include <readline/readline.h>
16312 #elif defined(HAVE_READLINE_H)
16313 # include <readline.h>
16314 #endif
16315
16316 int
16317 main ()
16318 {
16319 rl_completion_append_character = 'x';
16320   ;
16321   return 0;
16322 }
16323 _ACEOF
16324 if ac_fn_c_try_link "$LINENO"; then :
16325   pgac_cv_var_rl_completion_append_character=yes
16326 else
16327   pgac_cv_var_rl_completion_append_character=no
16328 fi
16329 rm -f core conftest.err conftest.$ac_objext \
16330     conftest$ac_exeext conftest.$ac_ext
16331 fi
16332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16333 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16334 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16335
16336 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16337
16338 fi
16339   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16340 do :
16341   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16342 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16343 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16344   cat >>confdefs.h <<_ACEOF
16345 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16346 _ACEOF
16347
16348 fi
16349 done
16350
16351   for ac_func in append_history history_truncate_file
16352 do :
16353   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16354 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16355 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16356   cat >>confdefs.h <<_ACEOF
16357 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16358 _ACEOF
16359
16360 fi
16361 done
16362
16363 fi
16364
16365
16366 # This test makes sure that run tests work at all.  Sometimes a shared
16367 # library is found by the linker, but the runtime linker can't find it.
16368 # This check should come after all modifications of compiler or linker
16369 # variables, and before any other run tests.
16370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16371 $as_echo_n "checking test program... " >&6; }
16372 if test "$cross_compiling" = yes; then :
16373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16374 $as_echo "cross-compiling" >&6; }
16375 else
16376   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16377 /* end confdefs.h.  */
16378 int main() { return 0; }
16379 _ACEOF
16380 if ac_fn_c_try_run "$LINENO"; then :
16381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16382 $as_echo "ok" >&6; }
16383 else
16384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16385 $as_echo "failed" >&6; }
16386 as_fn_error $? "
16387 Could not execute a simple test program.  This may be a problem
16388 related to locating shared libraries.  Check the file 'config.log'
16389 for the exact reason." "$LINENO" 5
16390 fi
16391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16392   conftest.$ac_objext conftest.beam conftest.$ac_ext
16393 fi
16394
16395
16396 # --------------------
16397 # Run tests below here
16398 # --------------------
16399
16400
16401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16402 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16403 if ${pgac_cv_type_long_int_64+:} false; then :
16404   $as_echo_n "(cached) " >&6
16405 else
16406   if test "$cross_compiling" = yes; then :
16407   # If cross-compiling, check the size reported by the compiler and
16408 # trust that the arithmetic works.
16409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16410 /* end confdefs.h.  */
16411
16412 int
16413 main ()
16414 {
16415 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16416 test_array [0] = 0;
16417 return test_array [0];
16418
16419   ;
16420   return 0;
16421 }
16422 _ACEOF
16423 if ac_fn_c_try_compile "$LINENO"; then :
16424   pgac_cv_type_long_int_64=yes
16425 else
16426   pgac_cv_type_long_int_64=no
16427 fi
16428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16429 else
16430   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16431 /* end confdefs.h.  */
16432 typedef long int ac_int64;
16433
16434 /*
16435  * These are globals to discourage the compiler from folding all the
16436  * arithmetic tests down to compile-time constants.
16437  */
16438 ac_int64 a = 20000001;
16439 ac_int64 b = 40000005;
16440
16441 int does_int64_work()
16442 {
16443   ac_int64 c,d;
16444
16445   if (sizeof(ac_int64) != 8)
16446     return 0;                   /* definitely not the right size */
16447
16448   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16449   c = a * b;
16450   d = (c + b) / b;
16451   if (d != a+1)
16452     return 0;
16453   return 1;
16454 }
16455
16456 int
16457 main() {
16458   return (! does_int64_work());
16459 }
16460 _ACEOF
16461 if ac_fn_c_try_run "$LINENO"; then :
16462   pgac_cv_type_long_int_64=yes
16463 else
16464   pgac_cv_type_long_int_64=no
16465 fi
16466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16467   conftest.$ac_objext conftest.beam conftest.$ac_ext
16468 fi
16469
16470 fi
16471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16472 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16473
16474 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16475 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16476
16477 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16478
16479 fi
16480
16481
16482 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16483   pg_int64_type="long int"
16484 else
16485   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16486 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16487 if ${pgac_cv_type_long_long_int_64+:} false; then :
16488   $as_echo_n "(cached) " >&6
16489 else
16490   if test "$cross_compiling" = yes; then :
16491   # If cross-compiling, check the size reported by the compiler and
16492 # trust that the arithmetic works.
16493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16494 /* end confdefs.h.  */
16495
16496 int
16497 main ()
16498 {
16499 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16500 test_array [0] = 0;
16501 return test_array [0];
16502
16503   ;
16504   return 0;
16505 }
16506 _ACEOF
16507 if ac_fn_c_try_compile "$LINENO"; then :
16508   pgac_cv_type_long_long_int_64=yes
16509 else
16510   pgac_cv_type_long_long_int_64=no
16511 fi
16512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16513 else
16514   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16515 /* end confdefs.h.  */
16516 typedef long long int ac_int64;
16517
16518 /*
16519  * These are globals to discourage the compiler from folding all the
16520  * arithmetic tests down to compile-time constants.
16521  */
16522 ac_int64 a = 20000001;
16523 ac_int64 b = 40000005;
16524
16525 int does_int64_work()
16526 {
16527   ac_int64 c,d;
16528
16529   if (sizeof(ac_int64) != 8)
16530     return 0;                   /* definitely not the right size */
16531
16532   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16533   c = a * b;
16534   d = (c + b) / b;
16535   if (d != a+1)
16536     return 0;
16537   return 1;
16538 }
16539
16540 int
16541 main() {
16542   return (! does_int64_work());
16543 }
16544 _ACEOF
16545 if ac_fn_c_try_run "$LINENO"; then :
16546   pgac_cv_type_long_long_int_64=yes
16547 else
16548   pgac_cv_type_long_long_int_64=no
16549 fi
16550 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16551   conftest.$ac_objext conftest.beam conftest.$ac_ext
16552 fi
16553
16554 fi
16555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16556 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16557
16558 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16559 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16560
16561 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16562
16563 fi
16564
16565   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16566     pg_int64_type="long long int"
16567   else
16568     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16569   fi
16570 fi
16571
16572
16573 cat >>confdefs.h <<_ACEOF
16574 #define PG_INT64_TYPE $pg_int64_type
16575 _ACEOF
16576
16577
16578 # Select the printf length modifier that goes with that, too.
16579 if test x"$pg_int64_type" = x"long long int" ; then
16580   INT64_MODIFIER='"ll"'
16581 else
16582   INT64_MODIFIER='"l"'
16583 fi
16584
16585
16586 cat >>confdefs.h <<_ACEOF
16587 #define INT64_MODIFIER $INT64_MODIFIER
16588 _ACEOF
16589
16590
16591 # has to be down here, rather than with the other builtins, because
16592 # the test uses PG_INT64_TYPE.
16593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16594 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16595 if ${pgac_cv__builtin_op_overflow+:} false; then :
16596   $as_echo_n "(cached) " >&6
16597 else
16598   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16599 /* end confdefs.h.  */
16600
16601 PG_INT64_TYPE a = 1;
16602 PG_INT64_TYPE b = 1;
16603 PG_INT64_TYPE result;
16604 int oflo;
16605
16606 int
16607 main ()
16608 {
16609 oflo = __builtin_mul_overflow(a, b, &result);
16610   ;
16611   return 0;
16612 }
16613 _ACEOF
16614 if ac_fn_c_try_link "$LINENO"; then :
16615   pgac_cv__builtin_op_overflow=yes
16616 else
16617   pgac_cv__builtin_op_overflow=no
16618 fi
16619 rm -f core conftest.err conftest.$ac_objext \
16620     conftest$ac_exeext conftest.$ac_ext
16621 fi
16622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16623 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16624 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16625
16626 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16627
16628 fi
16629
16630 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16631 # The cast to long int works around a bug in the HP C Compiler
16632 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16633 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16634 # This bug is HP SR number 8606223364.
16635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16636 $as_echo_n "checking size of void *... " >&6; }
16637 if ${ac_cv_sizeof_void_p+:} false; then :
16638   $as_echo_n "(cached) " >&6
16639 else
16640   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16641
16642 else
16643   if test "$ac_cv_type_void_p" = yes; then
16644      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16645 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16646 as_fn_error 77 "cannot compute sizeof (void *)
16647 See \`config.log' for more details" "$LINENO" 5; }
16648    else
16649      ac_cv_sizeof_void_p=0
16650    fi
16651 fi
16652
16653 fi
16654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16655 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16656
16657
16658
16659 cat >>confdefs.h <<_ACEOF
16660 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16661 _ACEOF
16662
16663
16664 # The cast to long int works around a bug in the HP C Compiler
16665 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16666 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16667 # This bug is HP SR number 8606223364.
16668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16669 $as_echo_n "checking size of size_t... " >&6; }
16670 if ${ac_cv_sizeof_size_t+:} false; then :
16671   $as_echo_n "(cached) " >&6
16672 else
16673   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16674
16675 else
16676   if test "$ac_cv_type_size_t" = yes; then
16677      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16678 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16679 as_fn_error 77 "cannot compute sizeof (size_t)
16680 See \`config.log' for more details" "$LINENO" 5; }
16681    else
16682      ac_cv_sizeof_size_t=0
16683    fi
16684 fi
16685
16686 fi
16687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16688 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16689
16690
16691
16692 cat >>confdefs.h <<_ACEOF
16693 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16694 _ACEOF
16695
16696
16697 # The cast to long int works around a bug in the HP C Compiler
16698 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16699 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16700 # This bug is HP SR number 8606223364.
16701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16702 $as_echo_n "checking size of long... " >&6; }
16703 if ${ac_cv_sizeof_long+:} false; then :
16704   $as_echo_n "(cached) " >&6
16705 else
16706   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16707
16708 else
16709   if test "$ac_cv_type_long" = yes; then
16710      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16711 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16712 as_fn_error 77 "cannot compute sizeof (long)
16713 See \`config.log' for more details" "$LINENO" 5; }
16714    else
16715      ac_cv_sizeof_long=0
16716    fi
16717 fi
16718
16719 fi
16720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16721 $as_echo "$ac_cv_sizeof_long" >&6; }
16722
16723
16724
16725 cat >>confdefs.h <<_ACEOF
16726 #define SIZEOF_LONG $ac_cv_sizeof_long
16727 _ACEOF
16728
16729
16730
16731 # Decide whether float4 is passed by value: user-selectable, enabled by default
16732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16733 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16734
16735
16736 # Check whether --enable-float4-byval was given.
16737 if test "${enable_float4_byval+set}" = set; then :
16738   enableval=$enable_float4_byval;
16739   case $enableval in
16740     yes)
16741
16742 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16743
16744                float4passbyval=true
16745       ;;
16746     no)
16747       float4passbyval=false
16748       ;;
16749     *)
16750       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16751       ;;
16752   esac
16753
16754 else
16755   enable_float4_byval=yes
16756
16757 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16758
16759                float4passbyval=true
16760 fi
16761
16762
16763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16764 $as_echo "$enable_float4_byval" >&6; }
16765
16766 cat >>confdefs.h <<_ACEOF
16767 #define FLOAT4PASSBYVAL $float4passbyval
16768 _ACEOF
16769
16770
16771 # Decide whether float8 is passed by value.
16772 # Note: this setting also controls int8 and related types such as timestamp.
16773 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16774 # If not, trying to select it is an error.
16775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16776 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16777 if test $ac_cv_sizeof_void_p -ge 8 ; then
16778
16779
16780 # Check whether --enable-float8-byval was given.
16781 if test "${enable_float8_byval+set}" = set; then :
16782   enableval=$enable_float8_byval;
16783   case $enableval in
16784     yes)
16785       :
16786       ;;
16787     no)
16788       :
16789       ;;
16790     *)
16791       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16792       ;;
16793   esac
16794
16795 else
16796   enable_float8_byval=yes
16797
16798 fi
16799
16800
16801 else
16802
16803
16804 # Check whether --enable-float8-byval was given.
16805 if test "${enable_float8_byval+set}" = set; then :
16806   enableval=$enable_float8_byval;
16807   case $enableval in
16808     yes)
16809       :
16810       ;;
16811     no)
16812       :
16813       ;;
16814     *)
16815       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16816       ;;
16817   esac
16818
16819 else
16820   enable_float8_byval=no
16821
16822 fi
16823
16824
16825   if test "$enable_float8_byval" = yes ; then
16826     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16827   fi
16828 fi
16829 if test "$enable_float8_byval" = yes ; then
16830
16831 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16832
16833   float8passbyval=true
16834 else
16835   float8passbyval=false
16836 fi
16837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16838 $as_echo "$enable_float8_byval" >&6; }
16839
16840 cat >>confdefs.h <<_ACEOF
16841 #define FLOAT8PASSBYVAL $float8passbyval
16842 _ACEOF
16843
16844
16845 # Determine memory alignment requirements for the basic C data types.
16846
16847 # The cast to long int works around a bug in the HP C Compiler,
16848 # see AC_CHECK_SIZEOF for more information.
16849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16850 $as_echo_n "checking alignment of short... " >&6; }
16851 if ${ac_cv_alignof_short+:} false; then :
16852   $as_echo_n "(cached) " >&6
16853 else
16854   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16855 #ifndef offsetof
16856 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16857 #endif
16858 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16859
16860 else
16861   if test "$ac_cv_type_short" = yes; then
16862      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16863 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16864 as_fn_error 77 "cannot compute alignment of short
16865 See \`config.log' for more details" "$LINENO" 5; }
16866    else
16867      ac_cv_alignof_short=0
16868    fi
16869 fi
16870
16871 fi
16872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16873 $as_echo "$ac_cv_alignof_short" >&6; }
16874
16875
16876
16877 cat >>confdefs.h <<_ACEOF
16878 #define ALIGNOF_SHORT $ac_cv_alignof_short
16879 _ACEOF
16880
16881
16882 # The cast to long int works around a bug in the HP C Compiler,
16883 # see AC_CHECK_SIZEOF for more information.
16884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16885 $as_echo_n "checking alignment of int... " >&6; }
16886 if ${ac_cv_alignof_int+:} false; then :
16887   $as_echo_n "(cached) " >&6
16888 else
16889   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16890 #ifndef offsetof
16891 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16892 #endif
16893 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16894
16895 else
16896   if test "$ac_cv_type_int" = yes; then
16897      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16898 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16899 as_fn_error 77 "cannot compute alignment of int
16900 See \`config.log' for more details" "$LINENO" 5; }
16901    else
16902      ac_cv_alignof_int=0
16903    fi
16904 fi
16905
16906 fi
16907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16908 $as_echo "$ac_cv_alignof_int" >&6; }
16909
16910
16911
16912 cat >>confdefs.h <<_ACEOF
16913 #define ALIGNOF_INT $ac_cv_alignof_int
16914 _ACEOF
16915
16916
16917 # The cast to long int works around a bug in the HP C Compiler,
16918 # see AC_CHECK_SIZEOF for more information.
16919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16920 $as_echo_n "checking alignment of long... " >&6; }
16921 if ${ac_cv_alignof_long+:} false; then :
16922   $as_echo_n "(cached) " >&6
16923 else
16924   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16925 #ifndef offsetof
16926 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16927 #endif
16928 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16929
16930 else
16931   if test "$ac_cv_type_long" = yes; then
16932      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16933 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16934 as_fn_error 77 "cannot compute alignment of long
16935 See \`config.log' for more details" "$LINENO" 5; }
16936    else
16937      ac_cv_alignof_long=0
16938    fi
16939 fi
16940
16941 fi
16942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16943 $as_echo "$ac_cv_alignof_long" >&6; }
16944
16945
16946
16947 cat >>confdefs.h <<_ACEOF
16948 #define ALIGNOF_LONG $ac_cv_alignof_long
16949 _ACEOF
16950
16951
16952 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16953   # The cast to long int works around a bug in the HP C Compiler,
16954 # see AC_CHECK_SIZEOF for more information.
16955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16956 $as_echo_n "checking alignment of long long int... " >&6; }
16957 if ${ac_cv_alignof_long_long_int+:} false; then :
16958   $as_echo_n "(cached) " >&6
16959 else
16960   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
16961 #ifndef offsetof
16962 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16963 #endif
16964 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16965
16966 else
16967   if test "$ac_cv_type_long_long_int" = yes; then
16968      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16969 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16970 as_fn_error 77 "cannot compute alignment of long long int
16971 See \`config.log' for more details" "$LINENO" 5; }
16972    else
16973      ac_cv_alignof_long_long_int=0
16974    fi
16975 fi
16976
16977 fi
16978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16979 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16980
16981
16982
16983 cat >>confdefs.h <<_ACEOF
16984 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16985 _ACEOF
16986
16987
16988 fi
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 double" >&5
16992 $as_echo_n "checking alignment of double... " >&6; }
16993 if ${ac_cv_alignof_double+:} 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_double"        "$ac_includes_default
16997 #ifndef offsetof
16998 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16999 #endif
17000 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17001
17002 else
17003   if test "$ac_cv_type_double" = 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 double
17007 See \`config.log' for more details" "$LINENO" 5; }
17008    else
17009      ac_cv_alignof_double=0
17010    fi
17011 fi
17012
17013 fi
17014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17015 $as_echo "$ac_cv_alignof_double" >&6; }
17016
17017
17018
17019 cat >>confdefs.h <<_ACEOF
17020 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17021 _ACEOF
17022
17023
17024
17025 # Compute maximum alignment of any basic type.
17026 # We assume long's alignment is at least as strong as char, short, or int;
17027 # but we must check long long (if it is being used for int64) and double.
17028 # Note that we intentionally do not consider any types wider than 64 bits,
17029 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17030 # for disk and memory space.
17031
17032 MAX_ALIGNOF=$ac_cv_alignof_long
17033 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17034   MAX_ALIGNOF=$ac_cv_alignof_double
17035 fi
17036 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17037   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17038 fi
17039
17040 cat >>confdefs.h <<_ACEOF
17041 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17042 _ACEOF
17043
17044
17045
17046 # Some platforms predefine the types int8, int16, etc.  Only check
17047 # a (hopefully) representative subset.
17048 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17049 "
17050 if test "x$ac_cv_type_int8" = xyes; then :
17051
17052 cat >>confdefs.h <<_ACEOF
17053 #define HAVE_INT8 1
17054 _ACEOF
17055
17056
17057 fi
17058 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17059 "
17060 if test "x$ac_cv_type_uint8" = xyes; then :
17061
17062 cat >>confdefs.h <<_ACEOF
17063 #define HAVE_UINT8 1
17064 _ACEOF
17065
17066
17067 fi
17068 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17069 "
17070 if test "x$ac_cv_type_int64" = xyes; then :
17071
17072 cat >>confdefs.h <<_ACEOF
17073 #define HAVE_INT64 1
17074 _ACEOF
17075
17076
17077 fi
17078 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17079 "
17080 if test "x$ac_cv_type_uint64" = xyes; then :
17081
17082 cat >>confdefs.h <<_ACEOF
17083 #define HAVE_UINT64 1
17084 _ACEOF
17085
17086
17087 fi
17088
17089
17090 # Some compilers offer a 128-bit integer scalar type.
17091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17092 $as_echo_n "checking for __int128... " >&6; }
17093 if ${pgac_cv__128bit_int+:} false; then :
17094   $as_echo_n "(cached) " >&6
17095 else
17096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17097 /* end confdefs.h.  */
17098
17099 /*
17100  * We don't actually run this test, just link it to verify that any support
17101  * functions needed for __int128 are present.
17102  *
17103  * These are globals to discourage the compiler from folding all the
17104  * arithmetic tests down to compile-time constants.  We do not have
17105  * convenient support for 128bit literals at this point...
17106  */
17107 __int128 a = 48828125;
17108 __int128 b = 97656250;
17109
17110 int
17111 main ()
17112 {
17113
17114 __int128 c,d;
17115 a = (a << 12) + 1; /* 200000000001 */
17116 b = (b << 12) + 5; /* 400000000005 */
17117 /* try the most relevant arithmetic ops */
17118 c = a * b;
17119 d = (c + b) / b;
17120 /* must use the results, else compiler may optimize arithmetic away */
17121 if (d != a+1)
17122   return 1;
17123
17124   ;
17125   return 0;
17126 }
17127 _ACEOF
17128 if ac_fn_c_try_link "$LINENO"; then :
17129   pgac_cv__128bit_int=yes
17130 else
17131   pgac_cv__128bit_int=no
17132 fi
17133 rm -f core conftest.err conftest.$ac_objext \
17134     conftest$ac_exeext conftest.$ac_ext
17135 fi
17136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17137 $as_echo "$pgac_cv__128bit_int" >&6; }
17138 if test x"$pgac_cv__128bit_int" = xyes ; then
17139   # Use of non-default alignment with __int128 tickles bugs in some compilers.
17140   # If not cross-compiling, we can test for bugs and disable use of __int128
17141   # with buggy compilers.  If cross-compiling, hope for the best.
17142   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17143   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17144 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17145 if ${pgac_cv__128bit_int_bug+:} false; then :
17146   $as_echo_n "(cached) " >&6
17147 else
17148   if test "$cross_compiling" = yes; then :
17149   pgac_cv__128bit_int_bug="assuming ok"
17150 else
17151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17152 /* end confdefs.h.  */
17153
17154 /* This must match the corresponding code in c.h: */
17155 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17156 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17157 #endif
17158 typedef __int128 int128a
17159 #if defined(pg_attribute_aligned)
17160 pg_attribute_aligned(8)
17161 #endif
17162 ;
17163 int128a holder;
17164 void pass_by_val(void *buffer, int128a par) { holder = par; }
17165
17166 int
17167 main ()
17168 {
17169
17170 long int i64 = 97656225L << 12;
17171 int128a q;
17172 pass_by_val(main, (int128a) i64);
17173 q = (int128a) i64;
17174 if (q != holder)
17175   return 1;
17176
17177   ;
17178   return 0;
17179 }
17180 _ACEOF
17181 if ac_fn_c_try_run "$LINENO"; then :
17182   pgac_cv__128bit_int_bug=ok
17183 else
17184   pgac_cv__128bit_int_bug=broken
17185 fi
17186 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17187   conftest.$ac_objext conftest.beam conftest.$ac_ext
17188 fi
17189
17190 fi
17191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17192 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17193   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17194
17195 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17196
17197     # The cast to long int works around a bug in the HP C Compiler,
17198 # see AC_CHECK_SIZEOF for more information.
17199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17200 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17201 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17202   $as_echo_n "(cached) " >&6
17203 else
17204   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
17205 #ifndef offsetof
17206 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17207 #endif
17208 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17209
17210 else
17211   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17212      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17213 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17214 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17215 See \`config.log' for more details" "$LINENO" 5; }
17216    else
17217      ac_cv_alignof_PG_INT128_TYPE=0
17218    fi
17219 fi
17220
17221 fi
17222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17223 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17224
17225
17226
17227 cat >>confdefs.h <<_ACEOF
17228 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17229 _ACEOF
17230
17231
17232   fi
17233 fi
17234
17235 # Check for various atomic operations now that we have checked how to declare
17236 # 64bit integers.
17237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17238 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17239 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17240   $as_echo_n "(cached) " >&6
17241 else
17242   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17243 /* end confdefs.h.  */
17244
17245 int
17246 main ()
17247 {
17248 char lock = 0;
17249    __sync_lock_test_and_set(&lock, 1);
17250    __sync_lock_release(&lock);
17251   ;
17252   return 0;
17253 }
17254 _ACEOF
17255 if ac_fn_c_try_link "$LINENO"; then :
17256   pgac_cv_gcc_sync_char_tas="yes"
17257 else
17258   pgac_cv_gcc_sync_char_tas="no"
17259 fi
17260 rm -f core conftest.err conftest.$ac_objext \
17261     conftest$ac_exeext conftest.$ac_ext
17262 fi
17263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17264 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17265 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17266
17267 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17268
17269 fi
17270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17271 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17272 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17273   $as_echo_n "(cached) " >&6
17274 else
17275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17276 /* end confdefs.h.  */
17277
17278 int
17279 main ()
17280 {
17281 int lock = 0;
17282    __sync_lock_test_and_set(&lock, 1);
17283    __sync_lock_release(&lock);
17284   ;
17285   return 0;
17286 }
17287 _ACEOF
17288 if ac_fn_c_try_link "$LINENO"; then :
17289   pgac_cv_gcc_sync_int32_tas="yes"
17290 else
17291   pgac_cv_gcc_sync_int32_tas="no"
17292 fi
17293 rm -f core conftest.err conftest.$ac_objext \
17294     conftest$ac_exeext conftest.$ac_ext
17295 fi
17296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17297 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17298 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17299
17300 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17301
17302 fi
17303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17304 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17305 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17306   $as_echo_n "(cached) " >&6
17307 else
17308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17309 /* end confdefs.h.  */
17310
17311 int
17312 main ()
17313 {
17314 int val = 0;
17315    __sync_val_compare_and_swap(&val, 0, 37);
17316   ;
17317   return 0;
17318 }
17319 _ACEOF
17320 if ac_fn_c_try_link "$LINENO"; then :
17321   pgac_cv_gcc_sync_int32_cas="yes"
17322 else
17323   pgac_cv_gcc_sync_int32_cas="no"
17324 fi
17325 rm -f core conftest.err conftest.$ac_objext \
17326     conftest$ac_exeext conftest.$ac_ext
17327 fi
17328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17329 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17330 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17331
17332 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17333
17334 fi
17335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17336 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17337 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17338   $as_echo_n "(cached) " >&6
17339 else
17340   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17341 /* end confdefs.h.  */
17342
17343 int
17344 main ()
17345 {
17346 PG_INT64_TYPE lock = 0;
17347    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17348   ;
17349   return 0;
17350 }
17351 _ACEOF
17352 if ac_fn_c_try_link "$LINENO"; then :
17353   pgac_cv_gcc_sync_int64_cas="yes"
17354 else
17355   pgac_cv_gcc_sync_int64_cas="no"
17356 fi
17357 rm -f core conftest.err conftest.$ac_objext \
17358     conftest$ac_exeext conftest.$ac_ext
17359 fi
17360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17361 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17362 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17363
17364 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17365
17366 fi
17367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17368 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17369 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17370   $as_echo_n "(cached) " >&6
17371 else
17372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17373 /* end confdefs.h.  */
17374
17375 int
17376 main ()
17377 {
17378 int val = 0;
17379    int expect = 0;
17380    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17381   ;
17382   return 0;
17383 }
17384 _ACEOF
17385 if ac_fn_c_try_link "$LINENO"; then :
17386   pgac_cv_gcc_atomic_int32_cas="yes"
17387 else
17388   pgac_cv_gcc_atomic_int32_cas="no"
17389 fi
17390 rm -f core conftest.err conftest.$ac_objext \
17391     conftest$ac_exeext conftest.$ac_ext
17392 fi
17393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17394 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17395 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17396
17397 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17398
17399 fi
17400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17401 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17402 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17403   $as_echo_n "(cached) " >&6
17404 else
17405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17406 /* end confdefs.h.  */
17407
17408 int
17409 main ()
17410 {
17411 PG_INT64_TYPE val = 0;
17412    PG_INT64_TYPE expect = 0;
17413    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17414   ;
17415   return 0;
17416 }
17417 _ACEOF
17418 if ac_fn_c_try_link "$LINENO"; then :
17419   pgac_cv_gcc_atomic_int64_cas="yes"
17420 else
17421   pgac_cv_gcc_atomic_int64_cas="no"
17422 fi
17423 rm -f core conftest.err conftest.$ac_objext \
17424     conftest$ac_exeext conftest.$ac_ext
17425 fi
17426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17427 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17428 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17429
17430 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17431
17432 fi
17433
17434
17435 # Check for x86 cpuid instruction
17436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17437 $as_echo_n "checking for __get_cpuid... " >&6; }
17438 if ${pgac_cv__get_cpuid+:} false; then :
17439   $as_echo_n "(cached) " >&6
17440 else
17441   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17442 /* end confdefs.h.  */
17443 #include <cpuid.h>
17444 int
17445 main ()
17446 {
17447 unsigned int exx[4] = {0, 0, 0, 0};
17448   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17449
17450   ;
17451   return 0;
17452 }
17453 _ACEOF
17454 if ac_fn_c_try_link "$LINENO"; then :
17455   pgac_cv__get_cpuid="yes"
17456 else
17457   pgac_cv__get_cpuid="no"
17458 fi
17459 rm -f core conftest.err conftest.$ac_objext \
17460     conftest$ac_exeext conftest.$ac_ext
17461 fi
17462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17463 $as_echo "$pgac_cv__get_cpuid" >&6; }
17464 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17465
17466 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17467
17468 fi
17469
17470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17471 $as_echo_n "checking for __cpuid... " >&6; }
17472 if ${pgac_cv__cpuid+:} false; then :
17473   $as_echo_n "(cached) " >&6
17474 else
17475   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17476 /* end confdefs.h.  */
17477 #include <intrin.h>
17478 int
17479 main ()
17480 {
17481 unsigned int exx[4] = {0, 0, 0, 0};
17482   __get_cpuid(exx[0], 1);
17483
17484   ;
17485   return 0;
17486 }
17487 _ACEOF
17488 if ac_fn_c_try_link "$LINENO"; then :
17489   pgac_cv__cpuid="yes"
17490 else
17491   pgac_cv__cpuid="no"
17492 fi
17493 rm -f core conftest.err conftest.$ac_objext \
17494     conftest$ac_exeext conftest.$ac_ext
17495 fi
17496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17497 $as_echo "$pgac_cv__cpuid" >&6; }
17498 if test x"$pgac_cv__cpuid" = x"yes"; then
17499
17500 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17501
17502 fi
17503
17504 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17505 #
17506 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17507 # with the default compiler flags. If not, check if adding the -msse4.2
17508 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17510 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17511 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17512   $as_echo_n "(cached) " >&6
17513 else
17514   pgac_save_CFLAGS=$CFLAGS
17515 CFLAGS="$pgac_save_CFLAGS "
17516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17517 /* end confdefs.h.  */
17518 #include <nmmintrin.h>
17519 int
17520 main ()
17521 {
17522 unsigned int crc = 0;
17523    crc = _mm_crc32_u8(crc, 0);
17524    crc = _mm_crc32_u32(crc, 0);
17525    /* return computed value, to prevent the above being optimized away */
17526    return crc == 0;
17527   ;
17528   return 0;
17529 }
17530 _ACEOF
17531 if ac_fn_c_try_link "$LINENO"; then :
17532   pgac_cv_sse42_crc32_intrinsics_=yes
17533 else
17534   pgac_cv_sse42_crc32_intrinsics_=no
17535 fi
17536 rm -f core conftest.err conftest.$ac_objext \
17537     conftest$ac_exeext conftest.$ac_ext
17538 CFLAGS="$pgac_save_CFLAGS"
17539 fi
17540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17541 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17542 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17543   CFLAGS_SSE42=""
17544   pgac_sse42_crc32_intrinsics=yes
17545 fi
17546
17547 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17549 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17550 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17551   $as_echo_n "(cached) " >&6
17552 else
17553   pgac_save_CFLAGS=$CFLAGS
17554 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17556 /* end confdefs.h.  */
17557 #include <nmmintrin.h>
17558 int
17559 main ()
17560 {
17561 unsigned int crc = 0;
17562    crc = _mm_crc32_u8(crc, 0);
17563    crc = _mm_crc32_u32(crc, 0);
17564    /* return computed value, to prevent the above being optimized away */
17565    return crc == 0;
17566   ;
17567   return 0;
17568 }
17569 _ACEOF
17570 if ac_fn_c_try_link "$LINENO"; then :
17571   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17572 else
17573   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17574 fi
17575 rm -f core conftest.err conftest.$ac_objext \
17576     conftest$ac_exeext conftest.$ac_ext
17577 CFLAGS="$pgac_save_CFLAGS"
17578 fi
17579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17580 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17581 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17582   CFLAGS_SSE42="-msse4.2"
17583   pgac_sse42_crc32_intrinsics=yes
17584 fi
17585
17586 fi
17587
17588
17589 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17590 # define __SSE4_2__ in that case.
17591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17592 /* end confdefs.h.  */
17593
17594 int
17595 main ()
17596 {
17597
17598 #ifndef __SSE4_2__
17599 #error __SSE4_2__ not defined
17600 #endif
17601
17602   ;
17603   return 0;
17604 }
17605 _ACEOF
17606 if ac_fn_c_try_compile "$LINENO"; then :
17607   SSE4_2_TARGETED=1
17608 fi
17609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17610
17611 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17612 #
17613 # First check if __crc32c* intrinsics can be used with the default compiler
17614 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17615 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17617 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17618 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17619   $as_echo_n "(cached) " >&6
17620 else
17621   pgac_save_CFLAGS=$CFLAGS
17622 CFLAGS="$pgac_save_CFLAGS "
17623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17624 /* end confdefs.h.  */
17625 #include <arm_acle.h>
17626 int
17627 main ()
17628 {
17629 unsigned int crc = 0;
17630    crc = __crc32cb(crc, 0);
17631    crc = __crc32ch(crc, 0);
17632    crc = __crc32cw(crc, 0);
17633    crc = __crc32cd(crc, 0);
17634    /* return computed value, to prevent the above being optimized away */
17635    return crc == 0;
17636   ;
17637   return 0;
17638 }
17639 _ACEOF
17640 if ac_fn_c_try_link "$LINENO"; then :
17641   pgac_cv_armv8_crc32c_intrinsics_=yes
17642 else
17643   pgac_cv_armv8_crc32c_intrinsics_=no
17644 fi
17645 rm -f core conftest.err conftest.$ac_objext \
17646     conftest$ac_exeext conftest.$ac_ext
17647 CFLAGS="$pgac_save_CFLAGS"
17648 fi
17649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17650 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17651 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17652   CFLAGS_ARMV8_CRC32C=""
17653   pgac_armv8_crc32c_intrinsics=yes
17654 fi
17655
17656 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17658 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17659 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17660   $as_echo_n "(cached) " >&6
17661 else
17662   pgac_save_CFLAGS=$CFLAGS
17663 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17665 /* end confdefs.h.  */
17666 #include <arm_acle.h>
17667 int
17668 main ()
17669 {
17670 unsigned int crc = 0;
17671    crc = __crc32cb(crc, 0);
17672    crc = __crc32ch(crc, 0);
17673    crc = __crc32cw(crc, 0);
17674    crc = __crc32cd(crc, 0);
17675    /* return computed value, to prevent the above being optimized away */
17676    return crc == 0;
17677   ;
17678   return 0;
17679 }
17680 _ACEOF
17681 if ac_fn_c_try_link "$LINENO"; then :
17682   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17683 else
17684   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17685 fi
17686 rm -f core conftest.err conftest.$ac_objext \
17687     conftest$ac_exeext conftest.$ac_ext
17688 CFLAGS="$pgac_save_CFLAGS"
17689 fi
17690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17691 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17692 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17693   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17694   pgac_armv8_crc32c_intrinsics=yes
17695 fi
17696
17697 fi
17698
17699
17700 # Select CRC-32C implementation.
17701 #
17702 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17703 # use the special CRC instructions for calculating CRC-32C. If we're not
17704 # targeting such a processor, but we can nevertheless produce code that uses
17705 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17706 # implementations and select which one to use at runtime, depending on whether
17707 # SSE 4.2 is supported by the processor we're running on.
17708 #
17709 # Similarly, if we are targeting an ARM processor that has the CRC
17710 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17711 # we're not targeting such a processor, but can nevertheless produce code that
17712 # uses the CRC instructions, compile both, and select at runtime.
17713 #
17714 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17715 # in the template or configure command line.
17716 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
17717   # Use Intel SSE 4.2 if available.
17718   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17719     USE_SSE42_CRC32C=1
17720   else
17721     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17722     # the runtime check.
17723     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
17724       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17725     else
17726       # Use ARM CRC Extension if available.
17727       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17728         USE_ARMV8_CRC32C=1
17729       else
17730         # ARM CRC Extension, with runtime check?
17731         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17732           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17733         else
17734           # fall back to slicing-by-8 algorithm, which doesn't require any
17735           # special CPU support.
17736           USE_SLICING_BY_8_CRC32C=1
17737         fi
17738       fi
17739     fi
17740   fi
17741 fi
17742
17743 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17745 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17746 if test x"$USE_SSE42_CRC32C" = x"1"; then
17747
17748 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17749
17750   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17752 $as_echo "SSE 4.2" >&6; }
17753 else
17754   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17755
17756 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17757
17758     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17759     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17760 $as_echo "SSE 4.2 with runtime check" >&6; }
17761   else
17762     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17763
17764 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17765
17766       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17767       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17768 $as_echo "ARMv8 CRC instructions" >&6; }
17769     else
17770       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17771
17772 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17773
17774         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17775         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17776 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17777       else
17778
17779 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17780
17781         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17782         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17783 $as_echo "slicing-by-8" >&6; }
17784       fi
17785     fi
17786   fi
17787 fi
17788
17789
17790
17791 # Select semaphore implementation type.
17792 if test "$PORTNAME" != "win32"; then
17793   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17794     # Need sem_open for this
17795     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17796 $as_echo_n "checking for library containing sem_open... " >&6; }
17797 if ${ac_cv_search_sem_open+:} false; then :
17798   $as_echo_n "(cached) " >&6
17799 else
17800   ac_func_search_save_LIBS=$LIBS
17801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17802 /* end confdefs.h.  */
17803
17804 /* Override any GCC internal prototype to avoid an error.
17805    Use char because int might match the return type of a GCC
17806    builtin and then its argument prototype would still apply.  */
17807 #ifdef __cplusplus
17808 extern "C"
17809 #endif
17810 char sem_open ();
17811 int
17812 main ()
17813 {
17814 return sem_open ();
17815   ;
17816   return 0;
17817 }
17818 _ACEOF
17819 for ac_lib in '' rt pthread; do
17820   if test -z "$ac_lib"; then
17821     ac_res="none required"
17822   else
17823     ac_res=-l$ac_lib
17824     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17825   fi
17826   if ac_fn_c_try_link "$LINENO"; then :
17827   ac_cv_search_sem_open=$ac_res
17828 fi
17829 rm -f core conftest.err conftest.$ac_objext \
17830     conftest$ac_exeext
17831   if ${ac_cv_search_sem_open+:} false; then :
17832   break
17833 fi
17834 done
17835 if ${ac_cv_search_sem_open+:} false; then :
17836
17837 else
17838   ac_cv_search_sem_open=no
17839 fi
17840 rm conftest.$ac_ext
17841 LIBS=$ac_func_search_save_LIBS
17842 fi
17843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17844 $as_echo "$ac_cv_search_sem_open" >&6; }
17845 ac_res=$ac_cv_search_sem_open
17846 if test "$ac_res" != no; then :
17847   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17848   USE_NAMED_POSIX_SEMAPHORES=1
17849 fi
17850
17851   fi
17852   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17853     # Need sem_init for this
17854     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17855 $as_echo_n "checking for library containing sem_init... " >&6; }
17856 if ${ac_cv_search_sem_init+:} false; then :
17857   $as_echo_n "(cached) " >&6
17858 else
17859   ac_func_search_save_LIBS=$LIBS
17860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17861 /* end confdefs.h.  */
17862
17863 /* Override any GCC internal prototype to avoid an error.
17864    Use char because int might match the return type of a GCC
17865    builtin and then its argument prototype would still apply.  */
17866 #ifdef __cplusplus
17867 extern "C"
17868 #endif
17869 char sem_init ();
17870 int
17871 main ()
17872 {
17873 return sem_init ();
17874   ;
17875   return 0;
17876 }
17877 _ACEOF
17878 for ac_lib in '' rt pthread; do
17879   if test -z "$ac_lib"; then
17880     ac_res="none required"
17881   else
17882     ac_res=-l$ac_lib
17883     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17884   fi
17885   if ac_fn_c_try_link "$LINENO"; then :
17886   ac_cv_search_sem_init=$ac_res
17887 fi
17888 rm -f core conftest.err conftest.$ac_objext \
17889     conftest$ac_exeext
17890   if ${ac_cv_search_sem_init+:} false; then :
17891   break
17892 fi
17893 done
17894 if ${ac_cv_search_sem_init+:} false; then :
17895
17896 else
17897   ac_cv_search_sem_init=no
17898 fi
17899 rm conftest.$ac_ext
17900 LIBS=$ac_func_search_save_LIBS
17901 fi
17902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17903 $as_echo "$ac_cv_search_sem_init" >&6; }
17904 ac_res=$ac_cv_search_sem_init
17905 if test "$ac_res" != no; then :
17906   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17907   USE_UNNAMED_POSIX_SEMAPHORES=1
17908 fi
17909
17910   fi
17911   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17912 $as_echo_n "checking which semaphore API to use... " >&6; }
17913   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17914
17915 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17916
17917     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17918     sematype="named POSIX"
17919   else
17920     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17921
17922 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17923
17924       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17925       sematype="unnamed POSIX"
17926     else
17927
17928 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17929
17930       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17931       sematype="System V"
17932     fi
17933   fi
17934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17935 $as_echo "$sematype" >&6; }
17936 else
17937
17938 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17939
17940   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17941 fi
17942
17943
17944 # Select shared-memory implementation type.
17945 if test "$PORTNAME" != "win32"; then
17946
17947 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17948
17949   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17950 else
17951
17952 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17953
17954   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17955 fi
17956
17957 # Select random number source
17958 #
17959 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17960 # in the template or configure command line.
17961
17962 # If not selected manually, try to select a source automatically.
17963 if test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
17964   if test x"$with_openssl" = x"yes" ; then
17965     USE_OPENSSL_RANDOM=1
17966   elif test "$PORTNAME" = "win32" ; then
17967     USE_WIN32_RANDOM=1
17968   else
17969     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17970 $as_echo_n "checking for /dev/urandom... " >&6; }
17971 if ${ac_cv_file__dev_urandom+:} false; then :
17972   $as_echo_n "(cached) " >&6
17973 else
17974   test "$cross_compiling" = yes &&
17975   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17976 if test -r "/dev/urandom"; then
17977   ac_cv_file__dev_urandom=yes
17978 else
17979   ac_cv_file__dev_urandom=no
17980 fi
17981 fi
17982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17983 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17984 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17985
17986 fi
17987
17988
17989     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17990       USE_DEV_URANDOM=1
17991     fi
17992   fi
17993 fi
17994
17995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17996 $as_echo_n "checking which random number source to use... " >&6; }
17997 if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17998
17999 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
18000
18001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18002 $as_echo "OpenSSL" >&6; }
18003 elif test x"$USE_WIN32_RANDOM" = x"1" ; then
18004
18005 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
18006
18007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18008 $as_echo "Windows native" >&6; }
18009 elif test x"$USE_DEV_URANDOM" = x"1" ; then
18010
18011 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
18012
18013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18014 $as_echo "/dev/urandom" >&6; }
18015 else
18016   as_fn_error $? "
18017 no source of strong random numbers was found
18018 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers." "$LINENO" 5
18019 fi
18020
18021 # If not set in template file, set bytes to use libc memset()
18022 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18023   MEMSET_LOOP_LIMIT=1024
18024 fi
18025
18026 cat >>confdefs.h <<_ACEOF
18027 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18028 _ACEOF
18029
18030
18031
18032 if test "$enable_nls" = yes ; then
18033
18034   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18035 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18036 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18037   $as_echo_n "(cached) " >&6
18038 else
18039   ac_func_search_save_LIBS=$LIBS
18040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18041 /* end confdefs.h.  */
18042
18043 /* Override any GCC internal prototype to avoid an error.
18044    Use char because int might match the return type of a GCC
18045    builtin and then its argument prototype would still apply.  */
18046 #ifdef __cplusplus
18047 extern "C"
18048 #endif
18049 char bind_textdomain_codeset ();
18050 int
18051 main ()
18052 {
18053 return bind_textdomain_codeset ();
18054   ;
18055   return 0;
18056 }
18057 _ACEOF
18058 for ac_lib in '' intl; do
18059   if test -z "$ac_lib"; then
18060     ac_res="none required"
18061   else
18062     ac_res=-l$ac_lib
18063     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18064   fi
18065   if ac_fn_c_try_link "$LINENO"; then :
18066   ac_cv_search_bind_textdomain_codeset=$ac_res
18067 fi
18068 rm -f core conftest.err conftest.$ac_objext \
18069     conftest$ac_exeext
18070   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18071   break
18072 fi
18073 done
18074 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18075
18076 else
18077   ac_cv_search_bind_textdomain_codeset=no
18078 fi
18079 rm conftest.$ac_ext
18080 LIBS=$ac_func_search_save_LIBS
18081 fi
18082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18083 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18084 ac_res=$ac_cv_search_bind_textdomain_codeset
18085 if test "$ac_res" != no; then :
18086   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18087
18088 else
18089   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18090 fi
18091
18092   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18093 if test "x$ac_cv_header_libintl_h" = xyes; then :
18094
18095 else
18096   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18097 fi
18098
18099
18100   if test -z "$MSGFMT"; then
18101   for ac_prog in msgfmt
18102 do
18103   # Extract the first word of "$ac_prog", so it can be a program name with args.
18104 set dummy $ac_prog; ac_word=$2
18105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18106 $as_echo_n "checking for $ac_word... " >&6; }
18107 if ${ac_cv_path_MSGFMT+:} false; then :
18108   $as_echo_n "(cached) " >&6
18109 else
18110   case $MSGFMT in
18111   [\\/]* | ?:[\\/]*)
18112   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18113   ;;
18114   *)
18115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18116 for as_dir in $PATH
18117 do
18118   IFS=$as_save_IFS
18119   test -z "$as_dir" && as_dir=.
18120     for ac_exec_ext in '' $ac_executable_extensions; do
18121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18122     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18124     break 2
18125   fi
18126 done
18127   done
18128 IFS=$as_save_IFS
18129
18130   ;;
18131 esac
18132 fi
18133 MSGFMT=$ac_cv_path_MSGFMT
18134 if test -n "$MSGFMT"; then
18135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18136 $as_echo "$MSGFMT" >&6; }
18137 else
18138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18139 $as_echo "no" >&6; }
18140 fi
18141
18142
18143   test -n "$MSGFMT" && break
18144 done
18145
18146 else
18147   # Report the value of MSGFMT in configure's output in all cases.
18148   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18149 $as_echo_n "checking for MSGFMT... " >&6; }
18150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18151 $as_echo "$MSGFMT" >&6; }
18152 fi
18153
18154     if test -z "$MSGFMT"; then
18155     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18156   fi
18157   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18158 $as_echo_n "checking for msgfmt flags... " >&6; }
18159 if ${pgac_cv_msgfmt_flags+:} false; then :
18160   $as_echo_n "(cached) " >&6
18161 else
18162   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18163     pgac_cv_msgfmt_flags=-c
18164 fi
18165 fi
18166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18167 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18168   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18169
18170   if test -z "$MSGMERGE"; then
18171   for ac_prog in msgmerge
18172 do
18173   # Extract the first word of "$ac_prog", so it can be a program name with args.
18174 set dummy $ac_prog; ac_word=$2
18175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18176 $as_echo_n "checking for $ac_word... " >&6; }
18177 if ${ac_cv_path_MSGMERGE+:} false; then :
18178   $as_echo_n "(cached) " >&6
18179 else
18180   case $MSGMERGE in
18181   [\\/]* | ?:[\\/]*)
18182   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18183   ;;
18184   *)
18185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18186 for as_dir in $PATH
18187 do
18188   IFS=$as_save_IFS
18189   test -z "$as_dir" && as_dir=.
18190     for ac_exec_ext in '' $ac_executable_extensions; do
18191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18192     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18194     break 2
18195   fi
18196 done
18197   done
18198 IFS=$as_save_IFS
18199
18200   ;;
18201 esac
18202 fi
18203 MSGMERGE=$ac_cv_path_MSGMERGE
18204 if test -n "$MSGMERGE"; then
18205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18206 $as_echo "$MSGMERGE" >&6; }
18207 else
18208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18209 $as_echo "no" >&6; }
18210 fi
18211
18212
18213   test -n "$MSGMERGE" && break
18214 done
18215
18216 else
18217   # Report the value of MSGMERGE in configure's output in all cases.
18218   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18219 $as_echo_n "checking for MSGMERGE... " >&6; }
18220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18221 $as_echo "$MSGMERGE" >&6; }
18222 fi
18223
18224   if test -z "$XGETTEXT"; then
18225   for ac_prog in xgettext
18226 do
18227   # Extract the first word of "$ac_prog", so it can be a program name with args.
18228 set dummy $ac_prog; ac_word=$2
18229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18230 $as_echo_n "checking for $ac_word... " >&6; }
18231 if ${ac_cv_path_XGETTEXT+:} false; then :
18232   $as_echo_n "(cached) " >&6
18233 else
18234   case $XGETTEXT in
18235   [\\/]* | ?:[\\/]*)
18236   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18237   ;;
18238   *)
18239   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18240 for as_dir in $PATH
18241 do
18242   IFS=$as_save_IFS
18243   test -z "$as_dir" && as_dir=.
18244     for ac_exec_ext in '' $ac_executable_extensions; do
18245   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18246     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18247     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18248     break 2
18249   fi
18250 done
18251   done
18252 IFS=$as_save_IFS
18253
18254   ;;
18255 esac
18256 fi
18257 XGETTEXT=$ac_cv_path_XGETTEXT
18258 if test -n "$XGETTEXT"; then
18259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18260 $as_echo "$XGETTEXT" >&6; }
18261 else
18262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18263 $as_echo "no" >&6; }
18264 fi
18265
18266
18267   test -n "$XGETTEXT" && break
18268 done
18269
18270 else
18271   # Report the value of XGETTEXT in configure's output in all cases.
18272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18273 $as_echo_n "checking for XGETTEXT... " >&6; }
18274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18275 $as_echo "$XGETTEXT" >&6; }
18276 fi
18277
18278
18279 fi
18280
18281 # Check for Tcl configuration script tclConfig.sh
18282 if test "$with_tcl" = yes; then
18283     if test -z "$TCLSH"; then
18284   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18285 do
18286   # Extract the first word of "$ac_prog", so it can be a program name with args.
18287 set dummy $ac_prog; ac_word=$2
18288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18289 $as_echo_n "checking for $ac_word... " >&6; }
18290 if ${ac_cv_path_TCLSH+:} false; then :
18291   $as_echo_n "(cached) " >&6
18292 else
18293   case $TCLSH in
18294   [\\/]* | ?:[\\/]*)
18295   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18296   ;;
18297   *)
18298   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18299 for as_dir in $PATH
18300 do
18301   IFS=$as_save_IFS
18302   test -z "$as_dir" && as_dir=.
18303     for ac_exec_ext in '' $ac_executable_extensions; do
18304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18305     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18307     break 2
18308   fi
18309 done
18310   done
18311 IFS=$as_save_IFS
18312
18313   ;;
18314 esac
18315 fi
18316 TCLSH=$ac_cv_path_TCLSH
18317 if test -n "$TCLSH"; then
18318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18319 $as_echo "$TCLSH" >&6; }
18320 else
18321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18322 $as_echo "no" >&6; }
18323 fi
18324
18325
18326   test -n "$TCLSH" && break
18327 done
18328
18329 else
18330   # Report the value of TCLSH in configure's output in all cases.
18331   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18332 $as_echo_n "checking for TCLSH... " >&6; }
18333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18334 $as_echo "$TCLSH" >&6; }
18335 fi
18336
18337 if test x"$TCLSH" = x""; then
18338   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18339 fi
18340
18341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18342 $as_echo_n "checking for tclConfig.sh... " >&6; }
18343 # Let user override test
18344 if test -z "$TCL_CONFIG_SH"; then
18345     pgac_test_dirs="$with_tclconfig"
18346
18347     set X $pgac_test_dirs; shift
18348     if test $# -eq 0; then
18349         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18350         pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18351         # On newer macOS, $auto_path frequently doesn't include the place
18352         # where tclConfig.sh actually lives.  Append that to the end, so as not
18353         # to break cases where a non-default Tcl installation is being used.
18354         if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18355             pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18356         fi
18357         set X $pgac_test_dirs; shift
18358     fi
18359
18360     for pgac_dir do
18361         if test -r "$pgac_dir/tclConfig.sh"; then
18362             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18363             break
18364         fi
18365     done
18366 fi
18367
18368 if test -z "$TCL_CONFIG_SH"; then
18369     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18370 $as_echo "no" >&6; }
18371     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18372 else
18373     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18374 $as_echo "$TCL_CONFIG_SH" >&6; }
18375 fi
18376
18377
18378
18379     . "$TCL_CONFIG_SH"
18380 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18381 eval TCL_LIBS=\"$TCL_LIBS\"
18382 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18383 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18384
18385         if test "$TCL_SHARED_BUILD" != 1; then
18386       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18387 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18388     fi
18389     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18390     ac_save_CPPFLAGS=$CPPFLAGS
18391     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18392     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18393 if test "x$ac_cv_header_tcl_h" = xyes; then :
18394
18395 else
18396   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18397 fi
18398
18399
18400     CPPFLAGS=$ac_save_CPPFLAGS
18401 fi
18402
18403 # check for <perl.h>
18404 if test "$with_perl" = yes; then
18405   ac_save_CPPFLAGS=$CPPFLAGS
18406   CPPFLAGS="$CPPFLAGS $perl_includespec"
18407   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18408 "
18409 if test "x$ac_cv_header_perl_h" = xyes; then :
18410
18411 else
18412   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18413 fi
18414
18415
18416   # While we're at it, check that we can link to libperl.
18417   # On most platforms, if perl.h is there then libperl.so will be too, but at
18418   # this writing Debian packages them separately.  There is no known reason to
18419   # waste cycles on separate probes for the Tcl or Python libraries, though.
18420   pgac_save_LIBS=$LIBS
18421   LIBS="$perl_embed_ldflags"
18422   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18423 $as_echo_n "checking for libperl... " >&6; }
18424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18425 /* end confdefs.h.  */
18426
18427 #include <EXTERN.h>
18428 #include <perl.h>
18429
18430 int
18431 main ()
18432 {
18433 perl_alloc();
18434   ;
18435   return 0;
18436 }
18437 _ACEOF
18438 if ac_fn_c_try_link "$LINENO"; then :
18439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18440 $as_echo "yes" >&6; }
18441 else
18442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18443 $as_echo "no" >&6; }
18444      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18445 fi
18446 rm -f core conftest.err conftest.$ac_objext \
18447     conftest$ac_exeext conftest.$ac_ext
18448   LIBS=$pgac_save_LIBS
18449   CPPFLAGS=$ac_save_CPPFLAGS
18450 fi
18451
18452 # check for <Python.h>
18453 if test "$with_python" = yes; then
18454   ac_save_CPPFLAGS=$CPPFLAGS
18455   CPPFLAGS="$python_includespec $CPPFLAGS"
18456   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18457 if test "x$ac_cv_header_Python_h" = xyes; then :
18458
18459 else
18460   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18461 fi
18462
18463
18464   CPPFLAGS=$ac_save_CPPFLAGS
18465 fi
18466
18467 #
18468 # Check for DocBook and tools
18469 #
18470 if test -z "$XMLLINT"; then
18471   for ac_prog in xmllint
18472 do
18473   # Extract the first word of "$ac_prog", so it can be a program name with args.
18474 set dummy $ac_prog; ac_word=$2
18475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18476 $as_echo_n "checking for $ac_word... " >&6; }
18477 if ${ac_cv_path_XMLLINT+:} false; then :
18478   $as_echo_n "(cached) " >&6
18479 else
18480   case $XMLLINT in
18481   [\\/]* | ?:[\\/]*)
18482   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18483   ;;
18484   *)
18485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18486 for as_dir in $PATH
18487 do
18488   IFS=$as_save_IFS
18489   test -z "$as_dir" && as_dir=.
18490     for ac_exec_ext in '' $ac_executable_extensions; do
18491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18492     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18494     break 2
18495   fi
18496 done
18497   done
18498 IFS=$as_save_IFS
18499
18500   ;;
18501 esac
18502 fi
18503 XMLLINT=$ac_cv_path_XMLLINT
18504 if test -n "$XMLLINT"; then
18505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18506 $as_echo "$XMLLINT" >&6; }
18507 else
18508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18509 $as_echo "no" >&6; }
18510 fi
18511
18512
18513   test -n "$XMLLINT" && break
18514 done
18515
18516 else
18517   # Report the value of XMLLINT in configure's output in all cases.
18518   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18519 $as_echo_n "checking for XMLLINT... " >&6; }
18520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18521 $as_echo "$XMLLINT" >&6; }
18522 fi
18523
18524
18525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18526 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18527 if ${pgac_cv_check_docbook+:} false; then :
18528   $as_echo_n "(cached) " >&6
18529 else
18530   cat >conftest.xml <<EOF
18531 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18532 <book>
18533  <title>test</title>
18534  <chapter>
18535   <title>random</title>
18536    <sect1>
18537     <title>testsect</title>
18538     <para>text</para>
18539   </sect1>
18540  </chapter>
18541 </book>
18542 EOF
18543
18544 pgac_cv_check_docbook=no
18545
18546 if test -n "$XMLLINT"; then
18547   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18548   if test $? -eq 0; then
18549     pgac_cv_check_docbook=yes
18550   fi
18551 fi
18552 rm -f conftest.xml
18553 fi
18554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18555 $as_echo "$pgac_cv_check_docbook" >&6; }
18556
18557 have_docbook=$pgac_cv_check_docbook
18558
18559
18560 if test -z "$DBTOEPUB"; then
18561   for ac_prog in dbtoepub
18562 do
18563   # Extract the first word of "$ac_prog", so it can be a program name with args.
18564 set dummy $ac_prog; ac_word=$2
18565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18566 $as_echo_n "checking for $ac_word... " >&6; }
18567 if ${ac_cv_path_DBTOEPUB+:} false; then :
18568   $as_echo_n "(cached) " >&6
18569 else
18570   case $DBTOEPUB in
18571   [\\/]* | ?:[\\/]*)
18572   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18573   ;;
18574   *)
18575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18576 for as_dir in $PATH
18577 do
18578   IFS=$as_save_IFS
18579   test -z "$as_dir" && as_dir=.
18580     for ac_exec_ext in '' $ac_executable_extensions; do
18581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18582     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18584     break 2
18585   fi
18586 done
18587   done
18588 IFS=$as_save_IFS
18589
18590   ;;
18591 esac
18592 fi
18593 DBTOEPUB=$ac_cv_path_DBTOEPUB
18594 if test -n "$DBTOEPUB"; then
18595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18596 $as_echo "$DBTOEPUB" >&6; }
18597 else
18598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18599 $as_echo "no" >&6; }
18600 fi
18601
18602
18603   test -n "$DBTOEPUB" && break
18604 done
18605
18606 else
18607   # Report the value of DBTOEPUB in configure's output in all cases.
18608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18609 $as_echo_n "checking for DBTOEPUB... " >&6; }
18610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18611 $as_echo "$DBTOEPUB" >&6; }
18612 fi
18613
18614 if test -z "$XSLTPROC"; then
18615   for ac_prog in xsltproc
18616 do
18617   # Extract the first word of "$ac_prog", so it can be a program name with args.
18618 set dummy $ac_prog; ac_word=$2
18619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18620 $as_echo_n "checking for $ac_word... " >&6; }
18621 if ${ac_cv_path_XSLTPROC+:} false; then :
18622   $as_echo_n "(cached) " >&6
18623 else
18624   case $XSLTPROC in
18625   [\\/]* | ?:[\\/]*)
18626   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18627   ;;
18628   *)
18629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18630 for as_dir in $PATH
18631 do
18632   IFS=$as_save_IFS
18633   test -z "$as_dir" && as_dir=.
18634     for ac_exec_ext in '' $ac_executable_extensions; do
18635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18636     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18638     break 2
18639   fi
18640 done
18641   done
18642 IFS=$as_save_IFS
18643
18644   ;;
18645 esac
18646 fi
18647 XSLTPROC=$ac_cv_path_XSLTPROC
18648 if test -n "$XSLTPROC"; then
18649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18650 $as_echo "$XSLTPROC" >&6; }
18651 else
18652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18653 $as_echo "no" >&6; }
18654 fi
18655
18656
18657   test -n "$XSLTPROC" && break
18658 done
18659
18660 else
18661   # Report the value of XSLTPROC in configure's output in all cases.
18662   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18663 $as_echo_n "checking for XSLTPROC... " >&6; }
18664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18665 $as_echo "$XSLTPROC" >&6; }
18666 fi
18667
18668 if test -z "$FOP"; then
18669   for ac_prog in fop
18670 do
18671   # Extract the first word of "$ac_prog", so it can be a program name with args.
18672 set dummy $ac_prog; ac_word=$2
18673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18674 $as_echo_n "checking for $ac_word... " >&6; }
18675 if ${ac_cv_path_FOP+:} false; then :
18676   $as_echo_n "(cached) " >&6
18677 else
18678   case $FOP in
18679   [\\/]* | ?:[\\/]*)
18680   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18681   ;;
18682   *)
18683   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18684 for as_dir in $PATH
18685 do
18686   IFS=$as_save_IFS
18687   test -z "$as_dir" && as_dir=.
18688     for ac_exec_ext in '' $ac_executable_extensions; do
18689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18690     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18692     break 2
18693   fi
18694 done
18695   done
18696 IFS=$as_save_IFS
18697
18698   ;;
18699 esac
18700 fi
18701 FOP=$ac_cv_path_FOP
18702 if test -n "$FOP"; then
18703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18704 $as_echo "$FOP" >&6; }
18705 else
18706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18707 $as_echo "no" >&6; }
18708 fi
18709
18710
18711   test -n "$FOP" && break
18712 done
18713
18714 else
18715   # Report the value of FOP in configure's output in all cases.
18716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18717 $as_echo_n "checking for FOP... " >&6; }
18718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18719 $as_echo "$FOP" >&6; }
18720 fi
18721
18722
18723 #
18724 # Check for test tools
18725 #
18726 if test "$enable_tap_tests" = yes; then
18727   # Check for necessary modules, unless user has specified the "prove" to use;
18728   # in that case it's her responsibility to have a working configuration.
18729   # (prove might be part of a different Perl installation than perl, eg on
18730   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18731   if test -z "$PROVE"; then
18732     # Test::More and Time::HiRes are supposed to be part of core Perl,
18733     # but some distros omit them in a minimal installation.
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744 # Make sure we have perl
18745 if test -z "$PERL"; then
18746 # Extract the first word of "perl", so it can be a program name with args.
18747 set dummy perl; ac_word=$2
18748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18749 $as_echo_n "checking for $ac_word... " >&6; }
18750 if ${ac_cv_prog_PERL+:} false; then :
18751   $as_echo_n "(cached) " >&6
18752 else
18753   if test -n "$PERL"; then
18754   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18755 else
18756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18757 for as_dir in $PATH
18758 do
18759   IFS=$as_save_IFS
18760   test -z "$as_dir" && as_dir=.
18761     for ac_exec_ext in '' $ac_executable_extensions; do
18762   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18763     ac_cv_prog_PERL="perl"
18764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18765     break 2
18766   fi
18767 done
18768   done
18769 IFS=$as_save_IFS
18770
18771 fi
18772 fi
18773 PERL=$ac_cv_prog_PERL
18774 if test -n "$PERL"; then
18775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18776 $as_echo "$PERL" >&6; }
18777 else
18778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18779 $as_echo "no" >&6; }
18780 fi
18781
18782
18783 fi
18784
18785 if test "x$PERL" != x; then
18786   ax_perl_modules_failed=0
18787   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18788     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18789 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18790
18791     # Would be nice to log result here, but can't rely on autoconf internals
18792     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18793     if test $? -ne 0; then
18794       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18795 $as_echo "no" >&6; };
18796       ax_perl_modules_failed=1
18797    else
18798       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18799 $as_echo "ok" >&6; };
18800     fi
18801   done
18802
18803   # Run optional shell commands
18804   if test "$ax_perl_modules_failed" = 0; then
18805     :
18806
18807   else
18808     :
18809     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18810   fi
18811 else
18812   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18813 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18814 fi
18815   fi
18816   # Now make sure we know where prove is
18817   if test -z "$PROVE"; then
18818   for ac_prog in prove
18819 do
18820   # Extract the first word of "$ac_prog", so it can be a program name with args.
18821 set dummy $ac_prog; ac_word=$2
18822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18823 $as_echo_n "checking for $ac_word... " >&6; }
18824 if ${ac_cv_path_PROVE+:} false; then :
18825   $as_echo_n "(cached) " >&6
18826 else
18827   case $PROVE in
18828   [\\/]* | ?:[\\/]*)
18829   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18830   ;;
18831   *)
18832   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18833 for as_dir in $PATH
18834 do
18835   IFS=$as_save_IFS
18836   test -z "$as_dir" && as_dir=.
18837     for ac_exec_ext in '' $ac_executable_extensions; do
18838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18839     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18841     break 2
18842   fi
18843 done
18844   done
18845 IFS=$as_save_IFS
18846
18847   ;;
18848 esac
18849 fi
18850 PROVE=$ac_cv_path_PROVE
18851 if test -n "$PROVE"; then
18852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18853 $as_echo "$PROVE" >&6; }
18854 else
18855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18856 $as_echo "no" >&6; }
18857 fi
18858
18859
18860   test -n "$PROVE" && break
18861 done
18862
18863 else
18864   # Report the value of PROVE in configure's output in all cases.
18865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18866 $as_echo_n "checking for PROVE... " >&6; }
18867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18868 $as_echo "$PROVE" >&6; }
18869 fi
18870
18871   if test -z "$PROVE"; then
18872     as_fn_error $? "prove not found" "$LINENO" 5
18873   fi
18874 fi
18875
18876 # Thread testing
18877
18878 # We have to run the thread test near the end so we have all our symbols
18879 # defined.  Cross compiling throws a warning.
18880 #
18881 if test "$enable_thread_safety" = yes; then
18882 if test "$PORTNAME" != "win32"
18883 then
18884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18885 $as_echo_n "checking thread safety of required library functions... " >&6; }
18886
18887 _CFLAGS="$CFLAGS"
18888 _LIBS="$LIBS"
18889 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18890 LIBS="$LIBS $PTHREAD_LIBS"
18891 if test "$cross_compiling" = yes; then :
18892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18893 $as_echo "maybe" >&6; }
18894   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18895 *** Skipping thread test program because of cross-compile build.
18896 *** Run the program in src/test/thread on the target machine.
18897 " >&5
18898 $as_echo "$as_me: WARNING:
18899 *** Skipping thread test program because of cross-compile build.
18900 *** Run the program in src/test/thread on the target machine.
18901 " >&2;}
18902 else
18903   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18904 /* end confdefs.h.  */
18905 #include "$srcdir/src/test/thread/thread_test.c"
18906 _ACEOF
18907 if ac_fn_c_try_run "$LINENO"; then :
18908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18909 $as_echo "yes" >&6; }
18910 else
18911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18912 $as_echo "no" >&6; }
18913   as_fn_error $? "thread test program failed
18914 This platform is not thread-safe.  Check the file 'config.log' or compile
18915 and run src/test/thread/thread_test for the exact reason.
18916 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18917 fi
18918 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18919   conftest.$ac_objext conftest.beam conftest.$ac_ext
18920 fi
18921
18922 CFLAGS="$_CFLAGS"
18923 LIBS="$_LIBS"
18924 else
18925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18926 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18927 fi
18928 fi
18929
18930 # If compiler will take -Wl,--as-needed (or various platform-specific
18931 # spellings thereof) then add that to LDFLAGS.  This is much easier than
18932 # trying to filter LIBS to the minimum for each executable.
18933 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18934 # libreadline; therefore we postpone testing it until we know what library
18935 # dependencies readline has.  The test code will try to link with $LIBS.
18936 if test "$with_readline" = yes; then
18937   link_test_func=readline
18938 else
18939   link_test_func=exit
18940 fi
18941
18942 if test "$PORTNAME" = "darwin"; then
18943   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18944 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18945 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18946   $as_echo_n "(cached) " >&6
18947 else
18948   pgac_save_LDFLAGS=$LDFLAGS
18949 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18950 if test "$cross_compiling" = yes; then :
18951   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18952 else
18953   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18954 /* end confdefs.h.  */
18955 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18956 int
18957 main ()
18958 {
18959
18960   ;
18961   return 0;
18962 }
18963 _ACEOF
18964 if ac_fn_c_try_run "$LINENO"; then :
18965   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18966 else
18967   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18968 fi
18969 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18970   conftest.$ac_objext conftest.beam conftest.$ac_ext
18971 fi
18972
18973 LDFLAGS="$pgac_save_LDFLAGS"
18974 fi
18975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18976 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18977 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18978   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18979 fi
18980
18981 elif test "$PORTNAME" = "openbsd"; then
18982   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18983 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18984 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18985   $as_echo_n "(cached) " >&6
18986 else
18987   pgac_save_LDFLAGS=$LDFLAGS
18988 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18989 if test "$cross_compiling" = yes; then :
18990   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18991 else
18992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18993 /* end confdefs.h.  */
18994 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18995 int
18996 main ()
18997 {
18998
18999   ;
19000   return 0;
19001 }
19002 _ACEOF
19003 if ac_fn_c_try_run "$LINENO"; then :
19004   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19005 else
19006   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19007 fi
19008 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19009   conftest.$ac_objext conftest.beam conftest.$ac_ext
19010 fi
19011
19012 LDFLAGS="$pgac_save_LDFLAGS"
19013 fi
19014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19015 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19016 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19017   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19018 fi
19019
19020 else
19021   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19022 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19023 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19024   $as_echo_n "(cached) " >&6
19025 else
19026   pgac_save_LDFLAGS=$LDFLAGS
19027 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19028 if test "$cross_compiling" = yes; then :
19029   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19030 else
19031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19032 /* end confdefs.h.  */
19033 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19034 int
19035 main ()
19036 {
19037
19038   ;
19039   return 0;
19040 }
19041 _ACEOF
19042 if ac_fn_c_try_run "$LINENO"; then :
19043   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19044 else
19045   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19046 fi
19047 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19048   conftest.$ac_objext conftest.beam conftest.$ac_ext
19049 fi
19050
19051 LDFLAGS="$pgac_save_LDFLAGS"
19052 fi
19053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19054 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19055 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19056   LDFLAGS="$LDFLAGS -Wl,--as-needed"
19057 fi
19058
19059 fi
19060
19061 # Create compiler version string
19062 if test x"$GCC" = x"yes" ; then
19063   cc_string=`${CC} --version | sed q`
19064   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19065 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19066   cc_string=`${CC} -V 2>&1 | sed q`
19067 else
19068   cc_string=$CC
19069 fi
19070
19071
19072 cat >>confdefs.h <<_ACEOF
19073 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19074 _ACEOF
19075
19076
19077 # Supply a numeric version string for use by 3rd party add-ons
19078 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19079 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
19080 tr '.' '        ' |
19081 $AWK '{printf "%d%04d", $1, $2}'`"
19082
19083 cat >>confdefs.h <<_ACEOF
19084 #define PG_VERSION_NUM $PG_VERSION_NUM
19085 _ACEOF
19086
19087
19088
19089 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19090 # literally, so that it's possible to override it at build time using
19091 # a command like "make ... PG_SYSROOT=path".  This has to be done after
19092 # we've finished all configure checks that depend on CPPFLAGS.
19093 if test x"$PG_SYSROOT" != x; then
19094   CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19095 fi
19096
19097
19098
19099 # Begin output steps
19100
19101 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19102 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19103 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19104 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19105 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19106 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19107 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19108 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19109 # Currently only used when LLVM is used
19110 if test "$with_llvm" = yes ; then
19111    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19112 $as_echo "$as_me: using CXX=$CXX" >&6;}
19113    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19114 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19115    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19116 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19117    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19118 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19119    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19120 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19121 fi
19122
19123 # prepare build tree if outside source tree
19124 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19125 # Note 2: /bin/pwd might be better than shell's built-in at getting
19126 #         a symlink-free name.
19127 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19128   vpath_build=no
19129 else
19130   vpath_build=yes
19131   if test "$no_create" != yes; then
19132     $as_echo_n "preparing build tree... " >&6
19133     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19134     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19135       || as_fn_error $? "failed" "$LINENO" 5
19136     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19137 $as_echo "done" >&6; }
19138   fi
19139 fi
19140
19141
19142
19143 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19144
19145
19146 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}"
19147
19148
19149 if test "$PORTNAME" = "win32"; then
19150 ac_config_commands="$ac_config_commands check_win32_symlinks"
19151
19152 fi
19153
19154 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19155
19156
19157 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19158
19159
19160 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19161
19162
19163 cat >confcache <<\_ACEOF
19164 # This file is a shell script that caches the results of configure
19165 # tests run on this system so they can be shared between configure
19166 # scripts and configure runs, see configure's option --config-cache.
19167 # It is not useful on other systems.  If it contains results you don't
19168 # want to keep, you may remove or edit it.
19169 #
19170 # config.status only pays attention to the cache file if you give it
19171 # the --recheck option to rerun configure.
19172 #
19173 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19174 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19175 # following values.
19176
19177 _ACEOF
19178
19179 # The following way of writing the cache mishandles newlines in values,
19180 # but we know of no workaround that is simple, portable, and efficient.
19181 # So, we kill variables containing newlines.
19182 # Ultrix sh set writes to stderr and can't be redirected directly,
19183 # and sets the high bit in the cache file unless we assign to the vars.
19184 (
19185   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19186     eval ac_val=\$$ac_var
19187     case $ac_val in #(
19188     *${as_nl}*)
19189       case $ac_var in #(
19190       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19191 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19192       esac
19193       case $ac_var in #(
19194       _ | IFS | as_nl) ;; #(
19195       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19196       *) { eval $ac_var=; unset $ac_var;} ;;
19197       esac ;;
19198     esac
19199   done
19200
19201   (set) 2>&1 |
19202     case $as_nl`(ac_space=' '; set) 2>&1` in #(
19203     *${as_nl}ac_space=\ *)
19204       # `set' does not quote correctly, so add quotes: double-quote
19205       # substitution turns \\\\ into \\, and sed turns \\ into \.
19206       sed -n \
19207         "s/'/'\\\\''/g;
19208           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19209       ;; #(
19210     *)
19211       # `set' quotes correctly as required by POSIX, so do not add quotes.
19212       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19213       ;;
19214     esac |
19215     sort
19216 ) |
19217   sed '
19218      /^ac_cv_env_/b end
19219      t clear
19220      :clear
19221      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19222      t end
19223      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19224      :end' >>confcache
19225 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19226   if test -w "$cache_file"; then
19227     if test "x$cache_file" != "x/dev/null"; then
19228       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19229 $as_echo "$as_me: updating cache $cache_file" >&6;}
19230       if test ! -f "$cache_file" || test -h "$cache_file"; then
19231         cat confcache >"$cache_file"
19232       else
19233         case $cache_file in #(
19234         */* | ?:*)
19235           mv -f confcache "$cache_file"$$ &&
19236           mv -f "$cache_file"$$ "$cache_file" ;; #(
19237         *)
19238           mv -f confcache "$cache_file" ;;
19239         esac
19240       fi
19241     fi
19242   else
19243     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19244 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19245   fi
19246 fi
19247 rm -f confcache
19248
19249 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19250 # Let make expand exec_prefix.
19251 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19252
19253 DEFS=-DHAVE_CONFIG_H
19254
19255 ac_libobjs=
19256 ac_ltlibobjs=
19257 U=
19258 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19259   # 1. Remove the extension, and $U if already installed.
19260   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19261   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19262   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19263   #    will be set to the directory where LIBOBJS objects are built.
19264   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19265   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19266 done
19267 LIBOBJS=$ac_libobjs
19268
19269 LTLIBOBJS=$ac_ltlibobjs
19270
19271
19272
19273
19274 : "${CONFIG_STATUS=./config.status}"
19275 ac_write_fail=0
19276 ac_clean_files_save=$ac_clean_files
19277 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19278 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19279 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19280 as_write_fail=0
19281 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19282 #! $SHELL
19283 # Generated by $as_me.
19284 # Run this file to recreate the current configuration.
19285 # Compiler output produced by configure, useful for debugging
19286 # configure, is in config.log if it exists.
19287
19288 debug=false
19289 ac_cs_recheck=false
19290 ac_cs_silent=false
19291
19292 SHELL=\${CONFIG_SHELL-$SHELL}
19293 export SHELL
19294 _ASEOF
19295 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19296 ## -------------------- ##
19297 ## M4sh Initialization. ##
19298 ## -------------------- ##
19299
19300 # Be more Bourne compatible
19301 DUALCASE=1; export DUALCASE # for MKS sh
19302 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19303   emulate sh
19304   NULLCMD=:
19305   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19306   # is contrary to our usage.  Disable this feature.
19307   alias -g '${1+"$@"}'='"$@"'
19308   setopt NO_GLOB_SUBST
19309 else
19310   case `(set -o) 2>/dev/null` in #(
19311   *posix*) :
19312     set -o posix ;; #(
19313   *) :
19314      ;;
19315 esac
19316 fi
19317
19318
19319 as_nl='
19320 '
19321 export as_nl
19322 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19323 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19324 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19325 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19326 # Prefer a ksh shell builtin over an external printf program on Solaris,
19327 # but without wasting forks for bash or zsh.
19328 if test -z "$BASH_VERSION$ZSH_VERSION" \
19329     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19330   as_echo='print -r --'
19331   as_echo_n='print -rn --'
19332 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19333   as_echo='printf %s\n'
19334   as_echo_n='printf %s'
19335 else
19336   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19337     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19338     as_echo_n='/usr/ucb/echo -n'
19339   else
19340     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19341     as_echo_n_body='eval
19342       arg=$1;
19343       case $arg in #(
19344       *"$as_nl"*)
19345         expr "X$arg" : "X\\(.*\\)$as_nl";
19346         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19347       esac;
19348       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19349     '
19350     export as_echo_n_body
19351     as_echo_n='sh -c $as_echo_n_body as_echo'
19352   fi
19353   export as_echo_body
19354   as_echo='sh -c $as_echo_body as_echo'
19355 fi
19356
19357 # The user is always right.
19358 if test "${PATH_SEPARATOR+set}" != set; then
19359   PATH_SEPARATOR=:
19360   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19361     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19362       PATH_SEPARATOR=';'
19363   }
19364 fi
19365
19366
19367 # IFS
19368 # We need space, tab and new line, in precisely that order.  Quoting is
19369 # there to prevent editors from complaining about space-tab.
19370 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19371 # splitting by setting IFS to empty value.)
19372 IFS=" ""        $as_nl"
19373
19374 # Find who we are.  Look in the path if we contain no directory separator.
19375 as_myself=
19376 case $0 in #((
19377   *[\\/]* ) as_myself=$0 ;;
19378   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19379 for as_dir in $PATH
19380 do
19381   IFS=$as_save_IFS
19382   test -z "$as_dir" && as_dir=.
19383     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19384   done
19385 IFS=$as_save_IFS
19386
19387      ;;
19388 esac
19389 # We did not find ourselves, most probably we were run as `sh COMMAND'
19390 # in which case we are not to be found in the path.
19391 if test "x$as_myself" = x; then
19392   as_myself=$0
19393 fi
19394 if test ! -f "$as_myself"; then
19395   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19396   exit 1
19397 fi
19398
19399 # Unset variables that we do not need and which cause bugs (e.g. in
19400 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19401 # suppresses any "Segmentation fault" message there.  '((' could
19402 # trigger a bug in pdksh 5.2.14.
19403 for as_var in BASH_ENV ENV MAIL MAILPATH
19404 do eval test x\${$as_var+set} = xset \
19405   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19406 done
19407 PS1='$ '
19408 PS2='> '
19409 PS4='+ '
19410
19411 # NLS nuisances.
19412 LC_ALL=C
19413 export LC_ALL
19414 LANGUAGE=C
19415 export LANGUAGE
19416
19417 # CDPATH.
19418 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19419
19420
19421 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19422 # ----------------------------------------
19423 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19424 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19425 # script with STATUS, using 1 if that was 0.
19426 as_fn_error ()
19427 {
19428   as_status=$1; test $as_status -eq 0 && as_status=1
19429   if test "$4"; then
19430     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19431     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19432   fi
19433   $as_echo "$as_me: error: $2" >&2
19434   as_fn_exit $as_status
19435 } # as_fn_error
19436
19437
19438 # as_fn_set_status STATUS
19439 # -----------------------
19440 # Set $? to STATUS, without forking.
19441 as_fn_set_status ()
19442 {
19443   return $1
19444 } # as_fn_set_status
19445
19446 # as_fn_exit STATUS
19447 # -----------------
19448 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19449 as_fn_exit ()
19450 {
19451   set +e
19452   as_fn_set_status $1
19453   exit $1
19454 } # as_fn_exit
19455
19456 # as_fn_unset VAR
19457 # ---------------
19458 # Portably unset VAR.
19459 as_fn_unset ()
19460 {
19461   { eval $1=; unset $1;}
19462 }
19463 as_unset=as_fn_unset
19464 # as_fn_append VAR VALUE
19465 # ----------------------
19466 # Append the text in VALUE to the end of the definition contained in VAR. Take
19467 # advantage of any shell optimizations that allow amortized linear growth over
19468 # repeated appends, instead of the typical quadratic growth present in naive
19469 # implementations.
19470 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19471   eval 'as_fn_append ()
19472   {
19473     eval $1+=\$2
19474   }'
19475 else
19476   as_fn_append ()
19477   {
19478     eval $1=\$$1\$2
19479   }
19480 fi # as_fn_append
19481
19482 # as_fn_arith ARG...
19483 # ------------------
19484 # Perform arithmetic evaluation on the ARGs, and store the result in the
19485 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19486 # must be portable across $(()) and expr.
19487 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19488   eval 'as_fn_arith ()
19489   {
19490     as_val=$(( $* ))
19491   }'
19492 else
19493   as_fn_arith ()
19494   {
19495     as_val=`expr "$@" || test $? -eq 1`
19496   }
19497 fi # as_fn_arith
19498
19499
19500 if expr a : '\(a\)' >/dev/null 2>&1 &&
19501    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19502   as_expr=expr
19503 else
19504   as_expr=false
19505 fi
19506
19507 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19508   as_basename=basename
19509 else
19510   as_basename=false
19511 fi
19512
19513 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19514   as_dirname=dirname
19515 else
19516   as_dirname=false
19517 fi
19518
19519 as_me=`$as_basename -- "$0" ||
19520 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19521          X"$0" : 'X\(//\)$' \| \
19522          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19523 $as_echo X/"$0" |
19524     sed '/^.*\/\([^/][^/]*\)\/*$/{
19525             s//\1/
19526             q
19527           }
19528           /^X\/\(\/\/\)$/{
19529             s//\1/
19530             q
19531           }
19532           /^X\/\(\/\).*/{
19533             s//\1/
19534             q
19535           }
19536           s/.*/./; q'`
19537
19538 # Avoid depending upon Character Ranges.
19539 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19540 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19541 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19542 as_cr_digits='0123456789'
19543 as_cr_alnum=$as_cr_Letters$as_cr_digits
19544
19545 ECHO_C= ECHO_N= ECHO_T=
19546 case `echo -n x` in #(((((
19547 -n*)
19548   case `echo 'xy\c'` in
19549   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19550   xy)  ECHO_C='\c';;
19551   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19552        ECHO_T=' ';;
19553   esac;;
19554 *)
19555   ECHO_N='-n';;
19556 esac
19557
19558 rm -f conf$$ conf$$.exe conf$$.file
19559 if test -d conf$$.dir; then
19560   rm -f conf$$.dir/conf$$.file
19561 else
19562   rm -f conf$$.dir
19563   mkdir conf$$.dir 2>/dev/null
19564 fi
19565 if (echo >conf$$.file) 2>/dev/null; then
19566   if ln -s conf$$.file conf$$ 2>/dev/null; then
19567     as_ln_s='ln -s'
19568     # ... but there are two gotchas:
19569     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19570     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19571     # In both cases, we have to default to `cp -pR'.
19572     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19573       as_ln_s='cp -pR'
19574   elif ln conf$$.file conf$$ 2>/dev/null; then
19575     as_ln_s=ln
19576   else
19577     as_ln_s='cp -pR'
19578   fi
19579 else
19580   as_ln_s='cp -pR'
19581 fi
19582 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19583 rmdir conf$$.dir 2>/dev/null
19584
19585
19586 # as_fn_mkdir_p
19587 # -------------
19588 # Create "$as_dir" as a directory, including parents if necessary.
19589 as_fn_mkdir_p ()
19590 {
19591
19592   case $as_dir in #(
19593   -*) as_dir=./$as_dir;;
19594   esac
19595   test -d "$as_dir" || eval $as_mkdir_p || {
19596     as_dirs=
19597     while :; do
19598       case $as_dir in #(
19599       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19600       *) as_qdir=$as_dir;;
19601       esac
19602       as_dirs="'$as_qdir' $as_dirs"
19603       as_dir=`$as_dirname -- "$as_dir" ||
19604 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19605          X"$as_dir" : 'X\(//\)[^/]' \| \
19606          X"$as_dir" : 'X\(//\)$' \| \
19607          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19608 $as_echo X"$as_dir" |
19609     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19610             s//\1/
19611             q
19612           }
19613           /^X\(\/\/\)[^/].*/{
19614             s//\1/
19615             q
19616           }
19617           /^X\(\/\/\)$/{
19618             s//\1/
19619             q
19620           }
19621           /^X\(\/\).*/{
19622             s//\1/
19623             q
19624           }
19625           s/.*/./; q'`
19626       test -d "$as_dir" && break
19627     done
19628     test -z "$as_dirs" || eval "mkdir $as_dirs"
19629   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19630
19631
19632 } # as_fn_mkdir_p
19633 if mkdir -p . 2>/dev/null; then
19634   as_mkdir_p='mkdir -p "$as_dir"'
19635 else
19636   test -d ./-p && rmdir ./-p
19637   as_mkdir_p=false
19638 fi
19639
19640
19641 # as_fn_executable_p FILE
19642 # -----------------------
19643 # Test if FILE is an executable regular file.
19644 as_fn_executable_p ()
19645 {
19646   test -f "$1" && test -x "$1"
19647 } # as_fn_executable_p
19648 as_test_x='test -x'
19649 as_executable_p=as_fn_executable_p
19650
19651 # Sed expression to map a string onto a valid CPP name.
19652 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19653
19654 # Sed expression to map a string onto a valid variable name.
19655 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19656
19657
19658 exec 6>&1
19659 ## ----------------------------------- ##
19660 ## Main body of $CONFIG_STATUS script. ##
19661 ## ----------------------------------- ##
19662 _ASEOF
19663 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19664
19665 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19666 # Save the log message, to keep $0 and so on meaningful, and to
19667 # report actual input values of CONFIG_FILES etc. instead of their
19668 # values after options handling.
19669 ac_log="
19670 This file was extended by PostgreSQL $as_me 12devel, which was
19671 generated by GNU Autoconf 2.69.  Invocation command line was
19672
19673   CONFIG_FILES    = $CONFIG_FILES
19674   CONFIG_HEADERS  = $CONFIG_HEADERS
19675   CONFIG_LINKS    = $CONFIG_LINKS
19676   CONFIG_COMMANDS = $CONFIG_COMMANDS
19677   $ $0 $@
19678
19679 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19680 "
19681
19682 _ACEOF
19683
19684 case $ac_config_files in *"
19685 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19686 esac
19687
19688 case $ac_config_headers in *"
19689 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19690 esac
19691
19692
19693 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19694 # Files that config.status was made for.
19695 config_files="$ac_config_files"
19696 config_headers="$ac_config_headers"
19697 config_links="$ac_config_links"
19698 config_commands="$ac_config_commands"
19699
19700 _ACEOF
19701
19702 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19703 ac_cs_usage="\
19704 \`$as_me' instantiates files and other configuration actions
19705 from templates according to the current configuration.  Unless the files
19706 and actions are specified as TAGs, all are instantiated by default.
19707
19708 Usage: $0 [OPTION]... [TAG]...
19709
19710   -h, --help       print this help, then exit
19711   -V, --version    print version number and configuration settings, then exit
19712       --config     print configuration, then exit
19713   -q, --quiet, --silent
19714                    do not print progress messages
19715   -d, --debug      don't remove temporary files
19716       --recheck    update $as_me by reconfiguring in the same conditions
19717       --file=FILE[:TEMPLATE]
19718                    instantiate the configuration file FILE
19719       --header=FILE[:TEMPLATE]
19720                    instantiate the configuration header FILE
19721
19722 Configuration files:
19723 $config_files
19724
19725 Configuration headers:
19726 $config_headers
19727
19728 Configuration links:
19729 $config_links
19730
19731 Configuration commands:
19732 $config_commands
19733
19734 Report bugs to <pgsql-bugs@lists.postgresql.org>."
19735
19736 _ACEOF
19737 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19738 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19739 ac_cs_version="\\
19740 PostgreSQL config.status 12devel
19741 configured by $0, generated by GNU Autoconf 2.69,
19742   with options \\"\$ac_cs_config\\"
19743
19744 Copyright (C) 2012 Free Software Foundation, Inc.
19745 This config.status script is free software; the Free Software Foundation
19746 gives unlimited permission to copy, distribute and modify it."
19747
19748 ac_pwd='$ac_pwd'
19749 srcdir='$srcdir'
19750 INSTALL='$INSTALL'
19751 MKDIR_P='$MKDIR_P'
19752 AWK='$AWK'
19753 test -n "\$AWK" || AWK=awk
19754 _ACEOF
19755
19756 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19757 # The default lists apply if the user does not specify any file.
19758 ac_need_defaults=:
19759 while test $# != 0
19760 do
19761   case $1 in
19762   --*=?*)
19763     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19764     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19765     ac_shift=:
19766     ;;
19767   --*=)
19768     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19769     ac_optarg=
19770     ac_shift=:
19771     ;;
19772   *)
19773     ac_option=$1
19774     ac_optarg=$2
19775     ac_shift=shift
19776     ;;
19777   esac
19778
19779   case $ac_option in
19780   # Handling of the options.
19781   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19782     ac_cs_recheck=: ;;
19783   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19784     $as_echo "$ac_cs_version"; exit ;;
19785   --config | --confi | --conf | --con | --co | --c )
19786     $as_echo "$ac_cs_config"; exit ;;
19787   --debug | --debu | --deb | --de | --d | -d )
19788     debug=: ;;
19789   --file | --fil | --fi | --f )
19790     $ac_shift
19791     case $ac_optarg in
19792     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19793     '') as_fn_error $? "missing file argument" ;;
19794     esac
19795     as_fn_append CONFIG_FILES " '$ac_optarg'"
19796     ac_need_defaults=false;;
19797   --header | --heade | --head | --hea )
19798     $ac_shift
19799     case $ac_optarg in
19800     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19801     esac
19802     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19803     ac_need_defaults=false;;
19804   --he | --h)
19805     # Conflict between --help and --header
19806     as_fn_error $? "ambiguous option: \`$1'
19807 Try \`$0 --help' for more information.";;
19808   --help | --hel | -h )
19809     $as_echo "$ac_cs_usage"; exit ;;
19810   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19811   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19812     ac_cs_silent=: ;;
19813
19814   # This is an error.
19815   -*) as_fn_error $? "unrecognized option: \`$1'
19816 Try \`$0 --help' for more information." ;;
19817
19818   *) as_fn_append ac_config_targets " $1"
19819      ac_need_defaults=false ;;
19820
19821   esac
19822   shift
19823 done
19824
19825 ac_configure_extra_args=
19826
19827 if $ac_cs_silent; then
19828   exec 6>/dev/null
19829   ac_configure_extra_args="$ac_configure_extra_args --silent"
19830 fi
19831
19832 _ACEOF
19833 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19834 if \$ac_cs_recheck; then
19835   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19836   shift
19837   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19838   CONFIG_SHELL='$SHELL'
19839   export CONFIG_SHELL
19840   exec "\$@"
19841 fi
19842
19843 _ACEOF
19844 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19845 exec 5>>config.log
19846 {
19847   echo
19848   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19849 ## Running $as_me. ##
19850 _ASBOX
19851   $as_echo "$ac_log"
19852 } >&5
19853
19854 _ACEOF
19855 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19856 _ACEOF
19857
19858 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19859
19860 # Handling of arguments.
19861 for ac_config_target in $ac_config_targets
19862 do
19863   case $ac_config_target in
19864     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19865     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19866     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19867     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19868     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19869     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19870     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19871     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19872     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19873     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19874     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19875
19876   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19877   esac
19878 done
19879
19880
19881 # If the user did not use the arguments to specify the items to instantiate,
19882 # then the envvar interface is used.  Set only those that are not.
19883 # We use the long form for the default assignment because of an extremely
19884 # bizarre bug on SunOS 4.1.3.
19885 if $ac_need_defaults; then
19886   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19887   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19888   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19889   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19890 fi
19891
19892 # Have a temporary directory for convenience.  Make it in the build tree
19893 # simply because there is no reason against having it here, and in addition,
19894 # creating and moving files from /tmp can sometimes cause problems.
19895 # Hook for its removal unless debugging.
19896 # Note that there is a small window in which the directory will not be cleaned:
19897 # after its creation but before its name has been assigned to `$tmp'.
19898 $debug ||
19899 {
19900   tmp= ac_tmp=
19901   trap 'exit_status=$?
19902   : "${ac_tmp:=$tmp}"
19903   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19904 ' 0
19905   trap 'as_fn_exit 1' 1 2 13 15
19906 }
19907 # Create a (secure) tmp directory for tmp files.
19908
19909 {
19910   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19911   test -d "$tmp"
19912 }  ||
19913 {
19914   tmp=./conf$$-$RANDOM
19915   (umask 077 && mkdir "$tmp")
19916 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19917 ac_tmp=$tmp
19918
19919 # Set up the scripts for CONFIG_FILES section.
19920 # No need to generate them if there are no CONFIG_FILES.
19921 # This happens for instance with `./config.status config.h'.
19922 if test -n "$CONFIG_FILES"; then
19923
19924
19925 ac_cr=`echo X | tr X '\015'`
19926 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19927 # But we know of no other shell where ac_cr would be empty at this
19928 # point, so we can use a bashism as a fallback.
19929 if test "x$ac_cr" = x; then
19930   eval ac_cr=\$\'\\r\'
19931 fi
19932 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19933 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19934   ac_cs_awk_cr='\\r'
19935 else
19936   ac_cs_awk_cr=$ac_cr
19937 fi
19938
19939 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19940 _ACEOF
19941
19942
19943 {
19944   echo "cat >conf$$subs.awk <<_ACEOF" &&
19945   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19946   echo "_ACEOF"
19947 } >conf$$subs.sh ||
19948   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19949 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19950 ac_delim='%!_!# '
19951 for ac_last_try in false false false false false :; do
19952   . ./conf$$subs.sh ||
19953     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19954
19955   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19956   if test $ac_delim_n = $ac_delim_num; then
19957     break
19958   elif $ac_last_try; then
19959     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19960   else
19961     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19962   fi
19963 done
19964 rm -f conf$$subs.sh
19965
19966 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19967 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19968 _ACEOF
19969 sed -n '
19970 h
19971 s/^/S["/; s/!.*/"]=/
19972 p
19973 g
19974 s/^[^!]*!//
19975 :repl
19976 t repl
19977 s/'"$ac_delim"'$//
19978 t delim
19979 :nl
19980 h
19981 s/\(.\{148\}\)..*/\1/
19982 t more1
19983 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19984 p
19985 n
19986 b repl
19987 :more1
19988 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19989 p
19990 g
19991 s/.\{148\}//
19992 t nl
19993 :delim
19994 h
19995 s/\(.\{148\}\)..*/\1/
19996 t more2
19997 s/["\\]/\\&/g; s/^/"/; s/$/"/
19998 p
19999 b
20000 :more2
20001 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20002 p
20003 g
20004 s/.\{148\}//
20005 t delim
20006 ' <conf$$subs.awk | sed '
20007 /^[^""]/{
20008   N
20009   s/\n//
20010 }
20011 ' >>$CONFIG_STATUS || ac_write_fail=1
20012 rm -f conf$$subs.awk
20013 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20014 _ACAWK
20015 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20016   for (key in S) S_is_set[key] = 1
20017   FS = "\a"
20018
20019 }
20020 {
20021   line = $ 0
20022   nfields = split(line, field, "@")
20023   substed = 0
20024   len = length(field[1])
20025   for (i = 2; i < nfields; i++) {
20026     key = field[i]
20027     keylen = length(key)
20028     if (S_is_set[key]) {
20029       value = S[key]
20030       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20031       len += length(value) + length(field[++i])
20032       substed = 1
20033     } else
20034       len += 1 + keylen
20035   }
20036
20037   print line
20038 }
20039
20040 _ACAWK
20041 _ACEOF
20042 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20043 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20044   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20045 else
20046   cat
20047 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20048   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20049 _ACEOF
20050
20051 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20052 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20053 # trailing colons and then remove the whole line if VPATH becomes empty
20054 # (actually we leave an empty line to preserve line numbers).
20055 if test "x$srcdir" = x.; then
20056   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
20057 h
20058 s///
20059 s/^/:/
20060 s/[      ]*$/:/
20061 s/:\$(srcdir):/:/g
20062 s/:\${srcdir}:/:/g
20063 s/:@srcdir@:/:/g
20064 s/^:*//
20065 s/:*$//
20066 x
20067 s/\(=[   ]*\).*/\1/
20068 G
20069 s/\n//
20070 s/^[^=]*=[       ]*$//
20071 }'
20072 fi
20073
20074 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20075 fi # test -n "$CONFIG_FILES"
20076
20077 # Set up the scripts for CONFIG_HEADERS section.
20078 # No need to generate them if there are no CONFIG_HEADERS.
20079 # This happens for instance with `./config.status Makefile'.
20080 if test -n "$CONFIG_HEADERS"; then
20081 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20082 BEGIN {
20083 _ACEOF
20084
20085 # Transform confdefs.h into an awk script `defines.awk', embedded as
20086 # here-document in config.status, that substitutes the proper values into
20087 # config.h.in to produce config.h.
20088
20089 # Create a delimiter string that does not exist in confdefs.h, to ease
20090 # handling of long lines.
20091 ac_delim='%!_!# '
20092 for ac_last_try in false false :; do
20093   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20094   if test -z "$ac_tt"; then
20095     break
20096   elif $ac_last_try; then
20097     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20098   else
20099     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20100   fi
20101 done
20102
20103 # For the awk script, D is an array of macro values keyed by name,
20104 # likewise P contains macro parameters if any.  Preserve backslash
20105 # newline sequences.
20106
20107 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20108 sed -n '
20109 s/.\{148\}/&'"$ac_delim"'/g
20110 t rset
20111 :rset
20112 s/^[     ]*#[    ]*define[       ][      ]*/ /
20113 t def
20114 d
20115 :def
20116 s/\\$//
20117 t bsnl
20118 s/["\\]/\\&/g
20119 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20120 D["\1"]=" \3"/p
20121 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
20122 d
20123 :bsnl
20124 s/["\\]/\\&/g
20125 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20126 D["\1"]=" \3\\\\\\n"\\/p
20127 t cont
20128 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20129 t cont
20130 d
20131 :cont
20132 n
20133 s/.\{148\}/&'"$ac_delim"'/g
20134 t clear
20135 :clear
20136 s/\\$//
20137 t bsnlc
20138 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20139 d
20140 :bsnlc
20141 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20142 b cont
20143 ' <confdefs.h | sed '
20144 s/'"$ac_delim"'/"\\\
20145 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20146
20147 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20148   for (key in D) D_is_set[key] = 1
20149   FS = "\a"
20150 }
20151 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20152   line = \$ 0
20153   split(line, arg, " ")
20154   if (arg[1] == "#") {
20155     defundef = arg[2]
20156     mac1 = arg[3]
20157   } else {
20158     defundef = substr(arg[1], 2)
20159     mac1 = arg[2]
20160   }
20161   split(mac1, mac2, "(") #)
20162   macro = mac2[1]
20163   prefix = substr(line, 1, index(line, defundef) - 1)
20164   if (D_is_set[macro]) {
20165     # Preserve the white space surrounding the "#".
20166     print prefix "define", macro P[macro] D[macro]
20167     next
20168   } else {
20169     # Replace #undef with comments.  This is necessary, for example,
20170     # in the case of _POSIX_SOURCE, which is predefined and required
20171     # on some systems where configure will not decide to define it.
20172     if (defundef == "undef") {
20173       print "/*", prefix defundef, macro, "*/"
20174       next
20175     }
20176   }
20177 }
20178 { print }
20179 _ACAWK
20180 _ACEOF
20181 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20182   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20183 fi # test -n "$CONFIG_HEADERS"
20184
20185
20186 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
20187 shift
20188 for ac_tag
20189 do
20190   case $ac_tag in
20191   :[FHLC]) ac_mode=$ac_tag; continue;;
20192   esac
20193   case $ac_mode$ac_tag in
20194   :[FHL]*:*);;
20195   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20196   :[FH]-) ac_tag=-:-;;
20197   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20198   esac
20199   ac_save_IFS=$IFS
20200   IFS=:
20201   set x $ac_tag
20202   IFS=$ac_save_IFS
20203   shift
20204   ac_file=$1
20205   shift
20206
20207   case $ac_mode in
20208   :L) ac_source=$1;;
20209   :[FH])
20210     ac_file_inputs=
20211     for ac_f
20212     do
20213       case $ac_f in
20214       -) ac_f="$ac_tmp/stdin";;
20215       *) # Look for the file first in the build tree, then in the source tree
20216          # (if the path is not absolute).  The absolute path cannot be DOS-style,
20217          # because $ac_f cannot contain `:'.
20218          test -f "$ac_f" ||
20219            case $ac_f in
20220            [\\/$]*) false;;
20221            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20222            esac ||
20223            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20224       esac
20225       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20226       as_fn_append ac_file_inputs " '$ac_f'"
20227     done
20228
20229     # Let's still pretend it is `configure' which instantiates (i.e., don't
20230     # use $as_me), people would be surprised to read:
20231     #    /* config.h.  Generated by config.status.  */
20232     configure_input='Generated from '`
20233           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20234         `' by configure.'
20235     if test x"$ac_file" != x-; then
20236       configure_input="$ac_file.  $configure_input"
20237       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20238 $as_echo "$as_me: creating $ac_file" >&6;}
20239     fi
20240     # Neutralize special characters interpreted by sed in replacement strings.
20241     case $configure_input in #(
20242     *\&* | *\|* | *\\* )
20243        ac_sed_conf_input=`$as_echo "$configure_input" |
20244        sed 's/[\\\\&|]/\\\\&/g'`;; #(
20245     *) ac_sed_conf_input=$configure_input;;
20246     esac
20247
20248     case $ac_tag in
20249     *:-:* | *:-) cat >"$ac_tmp/stdin" \
20250       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20251     esac
20252     ;;
20253   esac
20254
20255   ac_dir=`$as_dirname -- "$ac_file" ||
20256 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20257          X"$ac_file" : 'X\(//\)[^/]' \| \
20258          X"$ac_file" : 'X\(//\)$' \| \
20259          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20260 $as_echo X"$ac_file" |
20261     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20262             s//\1/
20263             q
20264           }
20265           /^X\(\/\/\)[^/].*/{
20266             s//\1/
20267             q
20268           }
20269           /^X\(\/\/\)$/{
20270             s//\1/
20271             q
20272           }
20273           /^X\(\/\).*/{
20274             s//\1/
20275             q
20276           }
20277           s/.*/./; q'`
20278   as_dir="$ac_dir"; as_fn_mkdir_p
20279   ac_builddir=.
20280
20281 case "$ac_dir" in
20282 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20283 *)
20284   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20285   # A ".." for each directory in $ac_dir_suffix.
20286   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20287   case $ac_top_builddir_sub in
20288   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20289   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20290   esac ;;
20291 esac
20292 ac_abs_top_builddir=$ac_pwd
20293 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20294 # for backward compatibility:
20295 ac_top_builddir=$ac_top_build_prefix
20296
20297 case $srcdir in
20298   .)  # We are building in place.
20299     ac_srcdir=.
20300     ac_top_srcdir=$ac_top_builddir_sub
20301     ac_abs_top_srcdir=$ac_pwd ;;
20302   [\\/]* | ?:[\\/]* )  # Absolute name.
20303     ac_srcdir=$srcdir$ac_dir_suffix;
20304     ac_top_srcdir=$srcdir
20305     ac_abs_top_srcdir=$srcdir ;;
20306   *) # Relative name.
20307     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20308     ac_top_srcdir=$ac_top_build_prefix$srcdir
20309     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20310 esac
20311 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20312
20313
20314   case $ac_mode in
20315   :F)
20316   #
20317   # CONFIG_FILE
20318   #
20319
20320   case $INSTALL in
20321   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20322   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20323   esac
20324   ac_MKDIR_P=$MKDIR_P
20325   case $MKDIR_P in
20326   [\\/$]* | ?:[\\/]* ) ;;
20327   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20328   esac
20329 _ACEOF
20330
20331 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20332 # If the template does not know about datarootdir, expand it.
20333 # FIXME: This hack should be removed a few years after 2.60.
20334 ac_datarootdir_hack=; ac_datarootdir_seen=
20335 ac_sed_dataroot='
20336 /datarootdir/ {
20337   p
20338   q
20339 }
20340 /@datadir@/p
20341 /@docdir@/p
20342 /@infodir@/p
20343 /@localedir@/p
20344 /@mandir@/p'
20345 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20346 *datarootdir*) ac_datarootdir_seen=yes;;
20347 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20348   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20349 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20350 _ACEOF
20351 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20352   ac_datarootdir_hack='
20353   s&@datadir@&$datadir&g
20354   s&@docdir@&$docdir&g
20355   s&@infodir@&$infodir&g
20356   s&@localedir@&$localedir&g
20357   s&@mandir@&$mandir&g
20358   s&\\\${datarootdir}&$datarootdir&g' ;;
20359 esac
20360 _ACEOF
20361
20362 # Neutralize VPATH when `$srcdir' = `.'.
20363 # Shell code in configure.ac might set extrasub.
20364 # FIXME: do we really want to maintain this feature?
20365 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20366 ac_sed_extra="$ac_vpsub
20367 $extrasub
20368 _ACEOF
20369 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20370 :t
20371 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20372 s|@configure_input@|$ac_sed_conf_input|;t t
20373 s&@top_builddir@&$ac_top_builddir_sub&;t t
20374 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20375 s&@srcdir@&$ac_srcdir&;t t
20376 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20377 s&@top_srcdir@&$ac_top_srcdir&;t t
20378 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20379 s&@builddir@&$ac_builddir&;t t
20380 s&@abs_builddir@&$ac_abs_builddir&;t t
20381 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20382 s&@INSTALL@&$ac_INSTALL&;t t
20383 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20384 $ac_datarootdir_hack
20385 "
20386 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20387   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20388
20389 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20390   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20391   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20392       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20393   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20394 which seems to be undefined.  Please make sure it is defined" >&5
20395 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20396 which seems to be undefined.  Please make sure it is defined" >&2;}
20397
20398   rm -f "$ac_tmp/stdin"
20399   case $ac_file in
20400   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20401   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20402   esac \
20403   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20404  ;;
20405   :H)
20406   #
20407   # CONFIG_HEADER
20408   #
20409   if test x"$ac_file" != x-; then
20410     {
20411       $as_echo "/* $configure_input  */" \
20412       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20413     } >"$ac_tmp/config.h" \
20414       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20415     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20416       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20417 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20418     else
20419       rm -f "$ac_file"
20420       mv "$ac_tmp/config.h" "$ac_file" \
20421         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20422     fi
20423   else
20424     $as_echo "/* $configure_input  */" \
20425       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20426       || as_fn_error $? "could not create -" "$LINENO" 5
20427   fi
20428  ;;
20429   :L)
20430   #
20431   # CONFIG_LINK
20432   #
20433
20434   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20435     :
20436   else
20437     # Prefer the file from the source tree if names are identical.
20438     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20439       ac_source=$srcdir/$ac_source
20440     fi
20441
20442     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20443 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20444
20445     if test ! -r "$ac_source"; then
20446       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20447     fi
20448     rm -f "$ac_file"
20449
20450     # Try a relative symlink, then a hard link, then a copy.
20451     case $ac_source in
20452     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20453         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20454     esac
20455     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20456       ln "$ac_source" "$ac_file" 2>/dev/null ||
20457       cp -p "$ac_source" "$ac_file" ||
20458       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20459   fi
20460  ;;
20461   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20462 $as_echo "$as_me: executing $ac_file commands" >&6;}
20463  ;;
20464   esac
20465
20466
20467   case $ac_file$ac_mode in
20468     "check_win32_symlinks":C)
20469 # Links sometimes fail undetected on Mingw -
20470 # so here we detect it and warn the user
20471 for FILE in $CONFIG_LINKS
20472  do
20473         # test -e works for symlinks in the MinGW console
20474         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20475 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20476  done
20477  ;;
20478     "src/include/pg_config.h":H)
20479 # Update timestamp for pg_config.h (see Makefile.global)
20480 echo >src/include/stamp-h
20481  ;;
20482     "src/include/pg_config_ext.h":H)
20483 # Update timestamp for pg_config_ext.h (see Makefile.global)
20484 echo >src/include/stamp-ext-h
20485  ;;
20486     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20487
20488   esac
20489 done # for ac_tag
20490
20491
20492 as_fn_exit 0
20493 _ACEOF
20494 ac_clean_files=$ac_clean_files_save
20495
20496 test $ac_write_fail = 0 ||
20497   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20498
20499
20500 # configure is writing to config.log, and then calls config.status.
20501 # config.status does its own redirection, appending to config.log.
20502 # Unfortunately, on DOS this fails, as config.log is still kept open
20503 # by configure, so config.status won't be able to write to it; its
20504 # output is simply discarded.  So we exec the FD to /dev/null,
20505 # effectively closing config.log, so it can be properly (re)opened and
20506 # appended to by config.status.  When coming back to configure, we
20507 # need to make the FD available again.
20508 if test "$no_create" != yes; then
20509   ac_cs_success=:
20510   ac_config_status_args=
20511   test "$silent" = yes &&
20512     ac_config_status_args="$ac_config_status_args --quiet"
20513   exec 5>/dev/null
20514   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20515   exec 5>>config.log
20516   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20517   # would make configure fail if this is the last instruction.
20518   $ac_cs_success || as_fn_exit 1
20519 fi
20520 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20521   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20522 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20523 fi
20524