]> granicus.if.org Git - postgresql/blob - configure
Fix portability issues in pg_bitutils
[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 CFLAGS_POPCNT
655 UUID_LIBS
656 LDAP_LIBS_BE
657 LDAP_LIBS_FE
658 PTHREAD_CFLAGS
659 PTHREAD_LIBS
660 PTHREAD_CC
661 ax_pthread_config
662 SED
663 ZIC
664 python_additional_libs
665 python_libspec
666 python_libdir
667 python_includespec
668 python_version
669 python_majorversion
670 PYTHON
671 perl_embed_ldflags
672 perl_embed_ccflags
673 perl_includespec
674 perl_useshrplib
675 perl_privlibexp
676 perl_archlibexp
677 PERL
678 FLEXFLAGS
679 FLEX
680 BISONFLAGS
681 BISON
682 MKDIR_P
683 LN_S
684 TAR
685 install_bin
686 INSTALL_DATA
687 INSTALL_SCRIPT
688 INSTALL_PROGRAM
689 WINDRES
690 DLLWRAP
691 DLLTOOL
692 AR
693 STRIP_SHARED_LIB
694 STRIP_STATIC_LIB
695 STRIP
696 RANLIB
697 with_gnu_ld
698 LD
699 LDFLAGS_SL
700 LDFLAGS_EX
701 ELF_SYS
702 EGREP
703 GREP
704 with_zlib
705 with_system_tzdata
706 with_libxslt
707 with_libxml
708 XML2_CONFIG
709 UUID_EXTRA_OBJS
710 with_uuid
711 with_systemd
712 with_selinux
713 with_openssl
714 with_ldap
715 with_krb_srvnam
716 krb_srvtab
717 with_gssapi
718 with_python
719 with_perl
720 with_tcl
721 ICU_LIBS
722 ICU_CFLAGS
723 PKG_CONFIG_LIBDIR
724 PKG_CONFIG_PATH
725 PKG_CONFIG
726 with_icu
727 enable_thread_safety
728 INCLUDES
729 autodepend
730 TAS
731 GCC
732 CPP
733 BITCODE_CXXFLAGS
734 BITCODE_CFLAGS
735 CFLAGS_VECTOR
736 PERMIT_DECLARATION_AFTER_STATEMENT
737 LLVM_BINPATH
738 LLVM_CXXFLAGS
739 LLVM_CFLAGS
740 LLVM_CPPFLAGS
741 LLVM_LIBS
742 CLANG
743 LLVM_CONFIG
744 AWK
745 with_llvm
746 SUN_STUDIO_CC
747 ac_ct_CXX
748 CXXFLAGS
749 CXX
750 OBJEXT
751 EXEEXT
752 ac_ct_CC
753 CPPFLAGS
754 LDFLAGS
755 CFLAGS
756 CC
757 enable_tap_tests
758 enable_dtrace
759 DTRACEFLAGS
760 DTRACE
761 enable_coverage
762 GENHTML
763 LCOV
764 GCOV
765 enable_debug
766 enable_rpath
767 default_port
768 WANTED_LANGUAGES
769 enable_nls
770 PORTNAME
771 host_os
772 host_vendor
773 host_cpu
774 host
775 build_os
776 build_vendor
777 build_cpu
778 build
779 PG_MAJORVERSION
780 configure_args
781 target_alias
782 host_alias
783 build_alias
784 LIBS
785 ECHO_T
786 ECHO_N
787 ECHO_C
788 DEFS
789 mandir
790 localedir
791 libdir
792 psdir
793 pdfdir
794 dvidir
795 htmldir
796 infodir
797 docdir
798 oldincludedir
799 includedir
800 localstatedir
801 sharedstatedir
802 sysconfdir
803 datadir
804 datarootdir
805 libexecdir
806 sbindir
807 bindir
808 program_transform_name
809 prefix
810 exec_prefix
811 PACKAGE_URL
812 PACKAGE_BUGREPORT
813 PACKAGE_STRING
814 PACKAGE_VERSION
815 PACKAGE_TARNAME
816 PACKAGE_NAME
817 PATH_SEPARATOR
818 SHELL'
819 ac_subst_files=''
820 ac_user_opts='
821 enable_option_checking
822 with_extra_version
823 with_template
824 with_includes
825 with_libraries
826 with_libs
827 enable_integer_datetimes
828 enable_nls
829 with_pgport
830 enable_rpath
831 enable_spinlocks
832 enable_atomics
833 enable_debug
834 enable_profiling
835 enable_coverage
836 enable_dtrace
837 enable_tap_tests
838 with_blocksize
839 with_segsize
840 with_wal_blocksize
841 with_CC
842 with_llvm
843 enable_depend
844 enable_cassert
845 enable_thread_safety
846 with_icu
847 with_tcl
848 with_tclconfig
849 with_perl
850 with_python
851 with_gssapi
852 with_krb_srvnam
853 with_pam
854 with_bsd_auth
855 with_ldap
856 with_bonjour
857 with_openssl
858 with_selinux
859 with_systemd
860 with_readline
861 with_libedit_preferred
862 with_uuid
863 with_ossp_uuid
864 with_libxml
865 with_libxslt
866 with_system_tzdata
867 with_zlib
868 with_gnu_ld
869 enable_largefile
870 enable_float4_byval
871 enable_float8_byval
872 '
873       ac_precious_vars='build_alias
874 host_alias
875 target_alias
876 CC
877 CFLAGS
878 LDFLAGS
879 LIBS
880 CPPFLAGS
881 CXX
882 CXXFLAGS
883 CCC
884 LLVM_CONFIG
885 CLANG
886 CPP
887 PKG_CONFIG
888 PKG_CONFIG_PATH
889 PKG_CONFIG_LIBDIR
890 ICU_CFLAGS
891 ICU_LIBS
892 XML2_CONFIG
893 LDFLAGS_EX
894 LDFLAGS_SL
895 PERL
896 PYTHON
897 MSGFMT
898 TCLSH'
899
900
901 # Initialize some variables set by options.
902 ac_init_help=
903 ac_init_version=false
904 ac_unrecognized_opts=
905 ac_unrecognized_sep=
906 # The variables have the same names as the options, with
907 # dashes changed to underlines.
908 cache_file=/dev/null
909 exec_prefix=NONE
910 no_create=
911 no_recursion=
912 prefix=NONE
913 program_prefix=NONE
914 program_suffix=NONE
915 program_transform_name=s,x,x,
916 silent=
917 site=
918 srcdir=
919 verbose=
920 x_includes=NONE
921 x_libraries=NONE
922
923 # Installation directory options.
924 # These are left unexpanded so users can "make install exec_prefix=/foo"
925 # and all the variables that are supposed to be based on exec_prefix
926 # by default will actually change.
927 # Use braces instead of parens because sh, perl, etc. also accept them.
928 # (The list follows the same order as the GNU Coding Standards.)
929 bindir='${exec_prefix}/bin'
930 sbindir='${exec_prefix}/sbin'
931 libexecdir='${exec_prefix}/libexec'
932 datarootdir='${prefix}/share'
933 datadir='${datarootdir}'
934 sysconfdir='${prefix}/etc'
935 sharedstatedir='${prefix}/com'
936 localstatedir='${prefix}/var'
937 includedir='${prefix}/include'
938 oldincludedir='/usr/include'
939 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
940 infodir='${datarootdir}/info'
941 htmldir='${docdir}'
942 dvidir='${docdir}'
943 pdfdir='${docdir}'
944 psdir='${docdir}'
945 libdir='${exec_prefix}/lib'
946 localedir='${datarootdir}/locale'
947 mandir='${datarootdir}/man'
948
949 ac_prev=
950 ac_dashdash=
951 for ac_option
952 do
953   # If the previous option needs an argument, assign it.
954   if test -n "$ac_prev"; then
955     eval $ac_prev=\$ac_option
956     ac_prev=
957     continue
958   fi
959
960   case $ac_option in
961   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
962   *=)   ac_optarg= ;;
963   *)    ac_optarg=yes ;;
964   esac
965
966   # Accept the important Cygnus configure options, so we can diagnose typos.
967
968   case $ac_dashdash$ac_option in
969   --)
970     ac_dashdash=yes ;;
971
972   -bindir | --bindir | --bindi | --bind | --bin | --bi)
973     ac_prev=bindir ;;
974   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
975     bindir=$ac_optarg ;;
976
977   -build | --build | --buil | --bui | --bu)
978     ac_prev=build_alias ;;
979   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
980     build_alias=$ac_optarg ;;
981
982   -cache-file | --cache-file | --cache-fil | --cache-fi \
983   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
984     ac_prev=cache_file ;;
985   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
986   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
987     cache_file=$ac_optarg ;;
988
989   --config-cache | -C)
990     cache_file=config.cache ;;
991
992   -datadir | --datadir | --datadi | --datad)
993     ac_prev=datadir ;;
994   -datadir=* | --datadir=* | --datadi=* | --datad=*)
995     datadir=$ac_optarg ;;
996
997   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
998   | --dataroo | --dataro | --datar)
999     ac_prev=datarootdir ;;
1000   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1001   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1002     datarootdir=$ac_optarg ;;
1003
1004   -disable-* | --disable-*)
1005     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1006     # Reject names that are not valid shell variable names.
1007     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1008       as_fn_error $? "invalid feature name: $ac_useropt"
1009     ac_useropt_orig=$ac_useropt
1010     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1011     case $ac_user_opts in
1012       *"
1013 "enable_$ac_useropt"
1014 "*) ;;
1015       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1016          ac_unrecognized_sep=', ';;
1017     esac
1018     eval enable_$ac_useropt=no ;;
1019
1020   -docdir | --docdir | --docdi | --doc | --do)
1021     ac_prev=docdir ;;
1022   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1023     docdir=$ac_optarg ;;
1024
1025   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1026     ac_prev=dvidir ;;
1027   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1028     dvidir=$ac_optarg ;;
1029
1030   -enable-* | --enable-*)
1031     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1032     # Reject names that are not valid shell variable names.
1033     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1034       as_fn_error $? "invalid feature name: $ac_useropt"
1035     ac_useropt_orig=$ac_useropt
1036     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1037     case $ac_user_opts in
1038       *"
1039 "enable_$ac_useropt"
1040 "*) ;;
1041       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1042          ac_unrecognized_sep=', ';;
1043     esac
1044     eval enable_$ac_useropt=\$ac_optarg ;;
1045
1046   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1047   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1048   | --exec | --exe | --ex)
1049     ac_prev=exec_prefix ;;
1050   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1051   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1052   | --exec=* | --exe=* | --ex=*)
1053     exec_prefix=$ac_optarg ;;
1054
1055   -gas | --gas | --ga | --g)
1056     # Obsolete; use --with-gas.
1057     with_gas=yes ;;
1058
1059   -help | --help | --hel | --he | -h)
1060     ac_init_help=long ;;
1061   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1062     ac_init_help=recursive ;;
1063   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1064     ac_init_help=short ;;
1065
1066   -host | --host | --hos | --ho)
1067     ac_prev=host_alias ;;
1068   -host=* | --host=* | --hos=* | --ho=*)
1069     host_alias=$ac_optarg ;;
1070
1071   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1072     ac_prev=htmldir ;;
1073   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1074   | --ht=*)
1075     htmldir=$ac_optarg ;;
1076
1077   -includedir | --includedir | --includedi | --included | --include \
1078   | --includ | --inclu | --incl | --inc)
1079     ac_prev=includedir ;;
1080   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1081   | --includ=* | --inclu=* | --incl=* | --inc=*)
1082     includedir=$ac_optarg ;;
1083
1084   -infodir | --infodir | --infodi | --infod | --info | --inf)
1085     ac_prev=infodir ;;
1086   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1087     infodir=$ac_optarg ;;
1088
1089   -libdir | --libdir | --libdi | --libd)
1090     ac_prev=libdir ;;
1091   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1092     libdir=$ac_optarg ;;
1093
1094   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1095   | --libexe | --libex | --libe)
1096     ac_prev=libexecdir ;;
1097   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1098   | --libexe=* | --libex=* | --libe=*)
1099     libexecdir=$ac_optarg ;;
1100
1101   -localedir | --localedir | --localedi | --localed | --locale)
1102     ac_prev=localedir ;;
1103   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1104     localedir=$ac_optarg ;;
1105
1106   -localstatedir | --localstatedir | --localstatedi | --localstated \
1107   | --localstate | --localstat | --localsta | --localst | --locals)
1108     ac_prev=localstatedir ;;
1109   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1110   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1111     localstatedir=$ac_optarg ;;
1112
1113   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1114     ac_prev=mandir ;;
1115   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1116     mandir=$ac_optarg ;;
1117
1118   -nfp | --nfp | --nf)
1119     # Obsolete; use --without-fp.
1120     with_fp=no ;;
1121
1122   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1123   | --no-cr | --no-c | -n)
1124     no_create=yes ;;
1125
1126   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1127   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1128     no_recursion=yes ;;
1129
1130   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1131   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1132   | --oldin | --oldi | --old | --ol | --o)
1133     ac_prev=oldincludedir ;;
1134   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1135   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1136   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1137     oldincludedir=$ac_optarg ;;
1138
1139   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1140     ac_prev=prefix ;;
1141   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1142     prefix=$ac_optarg ;;
1143
1144   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1145   | --program-pre | --program-pr | --program-p)
1146     ac_prev=program_prefix ;;
1147   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1148   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1149     program_prefix=$ac_optarg ;;
1150
1151   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1152   | --program-suf | --program-su | --program-s)
1153     ac_prev=program_suffix ;;
1154   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1155   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1156     program_suffix=$ac_optarg ;;
1157
1158   -program-transform-name | --program-transform-name \
1159   | --program-transform-nam | --program-transform-na \
1160   | --program-transform-n | --program-transform- \
1161   | --program-transform | --program-transfor \
1162   | --program-transfo | --program-transf \
1163   | --program-trans | --program-tran \
1164   | --progr-tra | --program-tr | --program-t)
1165     ac_prev=program_transform_name ;;
1166   -program-transform-name=* | --program-transform-name=* \
1167   | --program-transform-nam=* | --program-transform-na=* \
1168   | --program-transform-n=* | --program-transform-=* \
1169   | --program-transform=* | --program-transfor=* \
1170   | --program-transfo=* | --program-transf=* \
1171   | --program-trans=* | --program-tran=* \
1172   | --progr-tra=* | --program-tr=* | --program-t=*)
1173     program_transform_name=$ac_optarg ;;
1174
1175   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1176     ac_prev=pdfdir ;;
1177   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1178     pdfdir=$ac_optarg ;;
1179
1180   -psdir | --psdir | --psdi | --psd | --ps)
1181     ac_prev=psdir ;;
1182   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1183     psdir=$ac_optarg ;;
1184
1185   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1186   | -silent | --silent | --silen | --sile | --sil)
1187     silent=yes ;;
1188
1189   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1190     ac_prev=sbindir ;;
1191   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1192   | --sbi=* | --sb=*)
1193     sbindir=$ac_optarg ;;
1194
1195   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1196   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1197   | --sharedst | --shareds | --shared | --share | --shar \
1198   | --sha | --sh)
1199     ac_prev=sharedstatedir ;;
1200   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1201   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1202   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1203   | --sha=* | --sh=*)
1204     sharedstatedir=$ac_optarg ;;
1205
1206   -site | --site | --sit)
1207     ac_prev=site ;;
1208   -site=* | --site=* | --sit=*)
1209     site=$ac_optarg ;;
1210
1211   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1212     ac_prev=srcdir ;;
1213   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1214     srcdir=$ac_optarg ;;
1215
1216   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1217   | --syscon | --sysco | --sysc | --sys | --sy)
1218     ac_prev=sysconfdir ;;
1219   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1220   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1221     sysconfdir=$ac_optarg ;;
1222
1223   -target | --target | --targe | --targ | --tar | --ta | --t)
1224     ac_prev=target_alias ;;
1225   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1226     target_alias=$ac_optarg ;;
1227
1228   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1229     verbose=yes ;;
1230
1231   -version | --version | --versio | --versi | --vers | -V)
1232     ac_init_version=: ;;
1233
1234   -with-* | --with-*)
1235     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1236     # Reject names that are not valid shell variable names.
1237     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1238       as_fn_error $? "invalid package name: $ac_useropt"
1239     ac_useropt_orig=$ac_useropt
1240     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1241     case $ac_user_opts in
1242       *"
1243 "with_$ac_useropt"
1244 "*) ;;
1245       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1246          ac_unrecognized_sep=', ';;
1247     esac
1248     eval with_$ac_useropt=\$ac_optarg ;;
1249
1250   -without-* | --without-*)
1251     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1252     # Reject names that are not valid shell variable names.
1253     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1254       as_fn_error $? "invalid package name: $ac_useropt"
1255     ac_useropt_orig=$ac_useropt
1256     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1257     case $ac_user_opts in
1258       *"
1259 "with_$ac_useropt"
1260 "*) ;;
1261       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1262          ac_unrecognized_sep=', ';;
1263     esac
1264     eval with_$ac_useropt=no ;;
1265
1266   --x)
1267     # Obsolete; use --with-x.
1268     with_x=yes ;;
1269
1270   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1271   | --x-incl | --x-inc | --x-in | --x-i)
1272     ac_prev=x_includes ;;
1273   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1274   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1275     x_includes=$ac_optarg ;;
1276
1277   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1278   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1279     ac_prev=x_libraries ;;
1280   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1281   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1282     x_libraries=$ac_optarg ;;
1283
1284   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1285 Try \`$0 --help' for more information"
1286     ;;
1287
1288   *=*)
1289     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1290     # Reject names that are not valid shell variable names.
1291     case $ac_envvar in #(
1292       '' | [0-9]* | *[!_$as_cr_alnum]* )
1293       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1294     esac
1295     eval $ac_envvar=\$ac_optarg
1296     export $ac_envvar ;;
1297
1298   *)
1299     # FIXME: should be removed in autoconf 3.0.
1300     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1301     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1302       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1303     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1304     ;;
1305
1306   esac
1307 done
1308
1309 if test -n "$ac_prev"; then
1310   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1311   as_fn_error $? "missing argument to $ac_option"
1312 fi
1313
1314 if test -n "$ac_unrecognized_opts"; then
1315   case $enable_option_checking in
1316     no) ;;
1317     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1318     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1319   esac
1320 fi
1321
1322 # Check all directory arguments for consistency.
1323 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1324                 datadir sysconfdir sharedstatedir localstatedir includedir \
1325                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1326                 libdir localedir mandir
1327 do
1328   eval ac_val=\$$ac_var
1329   # Remove trailing slashes.
1330   case $ac_val in
1331     */ )
1332       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1333       eval $ac_var=\$ac_val;;
1334   esac
1335   # Be sure to have absolute directory names.
1336   case $ac_val in
1337     [\\/$]* | ?:[\\/]* )  continue;;
1338     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1339   esac
1340   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1341 done
1342
1343 # There might be people who depend on the old broken behavior: `$host'
1344 # used to hold the argument of --host etc.
1345 # FIXME: To remove some day.
1346 build=$build_alias
1347 host=$host_alias
1348 target=$target_alias
1349
1350 # FIXME: To remove some day.
1351 if test "x$host_alias" != x; then
1352   if test "x$build_alias" = x; then
1353     cross_compiling=maybe
1354   elif test "x$build_alias" != "x$host_alias"; then
1355     cross_compiling=yes
1356   fi
1357 fi
1358
1359 ac_tool_prefix=
1360 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1361
1362 test "$silent" = yes && exec 6>/dev/null
1363
1364
1365 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1366 ac_ls_di=`ls -di .` &&
1367 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1368   as_fn_error $? "working directory cannot be determined"
1369 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1370   as_fn_error $? "pwd does not report name of working directory"
1371
1372
1373 # Find the source files, if location was not specified.
1374 if test -z "$srcdir"; then
1375   ac_srcdir_defaulted=yes
1376   # Try the directory containing this script, then the parent directory.
1377   ac_confdir=`$as_dirname -- "$as_myself" ||
1378 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1379          X"$as_myself" : 'X\(//\)[^/]' \| \
1380          X"$as_myself" : 'X\(//\)$' \| \
1381          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1382 $as_echo X"$as_myself" |
1383     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1384             s//\1/
1385             q
1386           }
1387           /^X\(\/\/\)[^/].*/{
1388             s//\1/
1389             q
1390           }
1391           /^X\(\/\/\)$/{
1392             s//\1/
1393             q
1394           }
1395           /^X\(\/\).*/{
1396             s//\1/
1397             q
1398           }
1399           s/.*/./; q'`
1400   srcdir=$ac_confdir
1401   if test ! -r "$srcdir/$ac_unique_file"; then
1402     srcdir=..
1403   fi
1404 else
1405   ac_srcdir_defaulted=no
1406 fi
1407 if test ! -r "$srcdir/$ac_unique_file"; then
1408   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1409   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1410 fi
1411 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1412 ac_abs_confdir=`(
1413         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1414         pwd)`
1415 # When building in place, set srcdir=.
1416 if test "$ac_abs_confdir" = "$ac_pwd"; then
1417   srcdir=.
1418 fi
1419 # Remove unnecessary trailing slashes from srcdir.
1420 # Double slashes in file names in object file debugging info
1421 # mess up M-x gdb in Emacs.
1422 case $srcdir in
1423 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1424 esac
1425 for ac_var in $ac_precious_vars; do
1426   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1427   eval ac_env_${ac_var}_value=\$${ac_var}
1428   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1429   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1430 done
1431
1432 #
1433 # Report the --help message.
1434 #
1435 if test "$ac_init_help" = "long"; then
1436   # Omit some internal or obsolete options to make the list less imposing.
1437   # This message is too long to be a string in the A/UX 3.1 sh.
1438   cat <<_ACEOF
1439 \`configure' configures PostgreSQL 12devel to adapt to many kinds of systems.
1440
1441 Usage: $0 [OPTION]... [VAR=VALUE]...
1442
1443 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1444 VAR=VALUE.  See below for descriptions of some of the useful variables.
1445
1446 Defaults for the options are specified in brackets.
1447
1448 Configuration:
1449   -h, --help              display this help and exit
1450       --help=short        display options specific to this package
1451       --help=recursive    display the short help of all the included packages
1452   -V, --version           display version information and exit
1453   -q, --quiet, --silent   do not print \`checking ...' messages
1454       --cache-file=FILE   cache test results in FILE [disabled]
1455   -C, --config-cache      alias for \`--cache-file=config.cache'
1456   -n, --no-create         do not create output files
1457       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1458
1459 Installation directories:
1460   --prefix=PREFIX         install architecture-independent files in PREFIX
1461                           [$ac_default_prefix]
1462   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1463                           [PREFIX]
1464
1465 By default, \`make install' will install all the files in
1466 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1467 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1468 for instance \`--prefix=\$HOME'.
1469
1470 For better control, use the options below.
1471
1472 Fine tuning of the installation directories:
1473   --bindir=DIR            user executables [EPREFIX/bin]
1474   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1475   --libexecdir=DIR        program executables [EPREFIX/libexec]
1476   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1477   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1478   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1479   --libdir=DIR            object code libraries [EPREFIX/lib]
1480   --includedir=DIR        C header files [PREFIX/include]
1481   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1482   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1483   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1484   --infodir=DIR           info documentation [DATAROOTDIR/info]
1485   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1486   --mandir=DIR            man documentation [DATAROOTDIR/man]
1487   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1488   --htmldir=DIR           html documentation [DOCDIR]
1489   --dvidir=DIR            dvi documentation [DOCDIR]
1490   --pdfdir=DIR            pdf documentation [DOCDIR]
1491   --psdir=DIR             ps documentation [DOCDIR]
1492 _ACEOF
1493
1494   cat <<\_ACEOF
1495
1496 System types:
1497   --build=BUILD     configure for building on BUILD [guessed]
1498   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1499 _ACEOF
1500 fi
1501
1502 if test -n "$ac_init_help"; then
1503   case $ac_init_help in
1504      short | recursive ) echo "Configuration of PostgreSQL 12devel:";;
1505    esac
1506   cat <<\_ACEOF
1507
1508 Optional Features:
1509   --disable-option-checking  ignore unrecognized --enable/--with options
1510   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1511   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1512   --disable-integer-datetimes
1513                           obsolete option, no longer supported
1514   --enable-nls[=LANGUAGES]
1515                           enable Native Language Support
1516   --disable-rpath         do not embed shared library search path in
1517                           executables
1518   --disable-spinlocks     do not use spinlocks
1519   --disable-atomics       do not use atomic operations
1520   --enable-debug          build with debugging symbols (-g)
1521   --enable-profiling      build with profiling enabled
1522   --enable-coverage       build with coverage testing instrumentation
1523   --enable-dtrace         build with DTrace support
1524   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1525   --enable-depend         turn on automatic dependency tracking
1526   --enable-cassert        enable assertion checks (for debugging)
1527   --disable-thread-safety disable thread-safety in client libraries
1528   --disable-largefile     omit support for large files
1529   --disable-float4-byval  disable float4 passed by value
1530   --disable-float8-byval  disable float8 passed by value
1531
1532 Optional Packages:
1533   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1534   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1535   --with-extra-version=STRING
1536                           append STRING to version
1537   --with-template=NAME    override operating system template
1538   --with-includes=DIRS    look for additional header files in DIRS
1539   --with-libraries=DIRS   look for additional libraries in DIRS
1540   --with-libs=DIRS        alternative spelling of --with-libraries
1541   --with-pgport=PORTNUM   set default port number [5432]
1542   --with-blocksize=BLOCKSIZE
1543                           set table block size in kB [8]
1544   --with-segsize=SEGSIZE  set table segment size in GB [1]
1545   --with-wal-blocksize=BLOCKSIZE
1546                           set WAL block size in kB [8]
1547   --with-CC=CMD           set compiler (deprecated)
1548   --with-llvm             build with LLVM based JIT support
1549   --with-icu              build with ICU support
1550   --with-tcl              build Tcl modules (PL/Tcl)
1551   --with-tclconfig=DIR    tclConfig.sh is in DIR
1552   --with-perl             build Perl modules (PL/Perl)
1553   --with-python           build Python modules (PL/Python)
1554   --with-gssapi           build with GSSAPI support
1555   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1556                           [postgres]
1557   --with-pam              build with PAM support
1558   --with-bsd-auth         build with BSD Authentication support
1559   --with-ldap             build with LDAP support
1560   --with-bonjour          build with Bonjour support
1561   --with-openssl          build with OpenSSL support
1562   --with-selinux          build with SELinux support
1563   --with-systemd          build with systemd support
1564   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1565   --with-libedit-preferred
1566                           prefer BSD Libedit over GNU Readline
1567   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1568   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1569   --with-libxml           build with XML support
1570   --with-libxslt          use XSLT support when building contrib/xml2
1571   --with-system-tzdata=DIR
1572                           use system time zone data in DIR
1573   --without-zlib          do not use Zlib
1574   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1575
1576 Some influential environment variables:
1577   CC          C compiler command
1578   CFLAGS      C compiler flags
1579   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1580               nonstandard directory <lib dir>
1581   LIBS        libraries to pass to the linker, e.g. -l<library>
1582   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1583               you have headers in a nonstandard directory <include dir>
1584   CXX         C++ compiler command
1585   CXXFLAGS    C++ compiler flags
1586   LLVM_CONFIG path to llvm-config command
1587   CLANG       path to clang compiler to generate bitcode
1588   CPP         C preprocessor
1589   PKG_CONFIG  path to pkg-config utility
1590   PKG_CONFIG_PATH
1591               directories to add to pkg-config's search path
1592   PKG_CONFIG_LIBDIR
1593               path overriding pkg-config's built-in search path
1594   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1595   ICU_LIBS    linker flags for ICU, overriding pkg-config
1596   XML2_CONFIG path to xml2-config utility
1597   LDFLAGS_EX  extra linker flags for linking executables only
1598   LDFLAGS_SL  extra linker flags for linking shared libraries only
1599   PERL        Perl program
1600   PYTHON      Python program
1601   MSGFMT      msgfmt program for NLS
1602   TCLSH       Tcl interpreter program (tclsh)
1603
1604 Use these variables to override the choices made by `configure' or to help
1605 it to find libraries and programs with nonstandard names/locations.
1606
1607 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1608 _ACEOF
1609 ac_status=$?
1610 fi
1611
1612 if test "$ac_init_help" = "recursive"; then
1613   # If there are subdirs, report their specific --help.
1614   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1615     test -d "$ac_dir" ||
1616       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1617       continue
1618     ac_builddir=.
1619
1620 case "$ac_dir" in
1621 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1622 *)
1623   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1624   # A ".." for each directory in $ac_dir_suffix.
1625   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1626   case $ac_top_builddir_sub in
1627   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1628   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1629   esac ;;
1630 esac
1631 ac_abs_top_builddir=$ac_pwd
1632 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1633 # for backward compatibility:
1634 ac_top_builddir=$ac_top_build_prefix
1635
1636 case $srcdir in
1637   .)  # We are building in place.
1638     ac_srcdir=.
1639     ac_top_srcdir=$ac_top_builddir_sub
1640     ac_abs_top_srcdir=$ac_pwd ;;
1641   [\\/]* | ?:[\\/]* )  # Absolute name.
1642     ac_srcdir=$srcdir$ac_dir_suffix;
1643     ac_top_srcdir=$srcdir
1644     ac_abs_top_srcdir=$srcdir ;;
1645   *) # Relative name.
1646     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1647     ac_top_srcdir=$ac_top_build_prefix$srcdir
1648     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1649 esac
1650 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1651
1652     cd "$ac_dir" || { ac_status=$?; continue; }
1653     # Check for guested configure.
1654     if test -f "$ac_srcdir/configure.gnu"; then
1655       echo &&
1656       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1657     elif test -f "$ac_srcdir/configure"; then
1658       echo &&
1659       $SHELL "$ac_srcdir/configure" --help=recursive
1660     else
1661       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1662     fi || ac_status=$?
1663     cd "$ac_pwd" || { ac_status=$?; break; }
1664   done
1665 fi
1666
1667 test -n "$ac_init_help" && exit $ac_status
1668 if $ac_init_version; then
1669   cat <<\_ACEOF
1670 PostgreSQL configure 12devel
1671 generated by GNU Autoconf 2.69
1672
1673 Copyright (C) 2012 Free Software Foundation, Inc.
1674 This configure script is free software; the Free Software Foundation
1675 gives unlimited permission to copy, distribute and modify it.
1676
1677 Copyright (c) 1996-2019, PostgreSQL Global Development Group
1678 _ACEOF
1679   exit
1680 fi
1681
1682 ## ------------------------ ##
1683 ## Autoconf initialization. ##
1684 ## ------------------------ ##
1685
1686 # ac_fn_c_try_compile LINENO
1687 # --------------------------
1688 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1689 ac_fn_c_try_compile ()
1690 {
1691   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692   rm -f conftest.$ac_objext
1693   if { { ac_try="$ac_compile"
1694 case "(($ac_try" in
1695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696   *) ac_try_echo=$ac_try;;
1697 esac
1698 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699 $as_echo "$ac_try_echo"; } >&5
1700   (eval "$ac_compile") 2>conftest.err
1701   ac_status=$?
1702   if test -s conftest.err; then
1703     grep -v '^ *+' conftest.err >conftest.er1
1704     cat conftest.er1 >&5
1705     mv -f conftest.er1 conftest.err
1706   fi
1707   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708   test $ac_status = 0; } && {
1709          test -z "$ac_c_werror_flag" ||
1710          test ! -s conftest.err
1711        } && test -s conftest.$ac_objext; then :
1712   ac_retval=0
1713 else
1714   $as_echo "$as_me: failed program was:" >&5
1715 sed 's/^/| /' conftest.$ac_ext >&5
1716
1717         ac_retval=1
1718 fi
1719   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1720   as_fn_set_status $ac_retval
1721
1722 } # ac_fn_c_try_compile
1723
1724 # ac_fn_cxx_try_compile LINENO
1725 # ----------------------------
1726 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1727 ac_fn_cxx_try_compile ()
1728 {
1729   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730   rm -f conftest.$ac_objext
1731   if { { ac_try="$ac_compile"
1732 case "(($ac_try" in
1733   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734   *) ac_try_echo=$ac_try;;
1735 esac
1736 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737 $as_echo "$ac_try_echo"; } >&5
1738   (eval "$ac_compile") 2>conftest.err
1739   ac_status=$?
1740   if test -s conftest.err; then
1741     grep -v '^ *+' conftest.err >conftest.er1
1742     cat conftest.er1 >&5
1743     mv -f conftest.er1 conftest.err
1744   fi
1745   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746   test $ac_status = 0; } && {
1747          test -z "$ac_cxx_werror_flag" ||
1748          test ! -s conftest.err
1749        } && test -s conftest.$ac_objext; then :
1750   ac_retval=0
1751 else
1752   $as_echo "$as_me: failed program was:" >&5
1753 sed 's/^/| /' conftest.$ac_ext >&5
1754
1755         ac_retval=1
1756 fi
1757   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1758   as_fn_set_status $ac_retval
1759
1760 } # ac_fn_cxx_try_compile
1761
1762 # ac_fn_c_try_link LINENO
1763 # -----------------------
1764 # Try to link conftest.$ac_ext, and return whether this succeeded.
1765 ac_fn_c_try_link ()
1766 {
1767   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768   rm -f conftest.$ac_objext conftest$ac_exeext
1769   if { { ac_try="$ac_link"
1770 case "(($ac_try" in
1771   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772   *) ac_try_echo=$ac_try;;
1773 esac
1774 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775 $as_echo "$ac_try_echo"; } >&5
1776   (eval "$ac_link") 2>conftest.err
1777   ac_status=$?
1778   if test -s conftest.err; then
1779     grep -v '^ *+' conftest.err >conftest.er1
1780     cat conftest.er1 >&5
1781     mv -f conftest.er1 conftest.err
1782   fi
1783   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784   test $ac_status = 0; } && {
1785          test -z "$ac_c_werror_flag" ||
1786          test ! -s conftest.err
1787        } && test -s conftest$ac_exeext && {
1788          test "$cross_compiling" = yes ||
1789          test -x conftest$ac_exeext
1790        }; then :
1791   ac_retval=0
1792 else
1793   $as_echo "$as_me: failed program was:" >&5
1794 sed 's/^/| /' conftest.$ac_ext >&5
1795
1796         ac_retval=1
1797 fi
1798   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1799   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1800   # interfere with the next link command; also delete a directory that is
1801   # left behind by Apple's compiler.  We do this before executing the actions.
1802   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1803   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1804   as_fn_set_status $ac_retval
1805
1806 } # ac_fn_c_try_link
1807
1808 # ac_fn_c_try_cpp LINENO
1809 # ----------------------
1810 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1811 ac_fn_c_try_cpp ()
1812 {
1813   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1814   if { { ac_try="$ac_cpp conftest.$ac_ext"
1815 case "(($ac_try" in
1816   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1817   *) ac_try_echo=$ac_try;;
1818 esac
1819 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1820 $as_echo "$ac_try_echo"; } >&5
1821   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1822   ac_status=$?
1823   if test -s conftest.err; then
1824     grep -v '^ *+' conftest.err >conftest.er1
1825     cat conftest.er1 >&5
1826     mv -f conftest.er1 conftest.err
1827   fi
1828   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1829   test $ac_status = 0; } > conftest.i && {
1830          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1831          test ! -s conftest.err
1832        }; then :
1833   ac_retval=0
1834 else
1835   $as_echo "$as_me: failed program was:" >&5
1836 sed 's/^/| /' conftest.$ac_ext >&5
1837
1838     ac_retval=1
1839 fi
1840   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1841   as_fn_set_status $ac_retval
1842
1843 } # ac_fn_c_try_cpp
1844
1845 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1846 # -------------------------------------------------------
1847 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1848 # the include files in INCLUDES and setting the cache variable VAR
1849 # accordingly.
1850 ac_fn_c_check_header_mongrel ()
1851 {
1852   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1853   if eval \${$3+:} false; then :
1854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1855 $as_echo_n "checking for $2... " >&6; }
1856 if eval \${$3+:} false; then :
1857   $as_echo_n "(cached) " >&6
1858 fi
1859 eval ac_res=\$$3
1860                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1861 $as_echo "$ac_res" >&6; }
1862 else
1863   # Is the header compilable?
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1865 $as_echo_n "checking $2 usability... " >&6; }
1866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1867 /* end confdefs.h.  */
1868 $4
1869 #include <$2>
1870 _ACEOF
1871 if ac_fn_c_try_compile "$LINENO"; then :
1872   ac_header_compiler=yes
1873 else
1874   ac_header_compiler=no
1875 fi
1876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1878 $as_echo "$ac_header_compiler" >&6; }
1879
1880 # Is the header present?
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1882 $as_echo_n "checking $2 presence... " >&6; }
1883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884 /* end confdefs.h.  */
1885 #include <$2>
1886 _ACEOF
1887 if ac_fn_c_try_cpp "$LINENO"; then :
1888   ac_header_preproc=yes
1889 else
1890   ac_header_preproc=no
1891 fi
1892 rm -f conftest.err conftest.i conftest.$ac_ext
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1894 $as_echo "$ac_header_preproc" >&6; }
1895
1896 # So?  What about this header?
1897 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1898   yes:no: )
1899     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1900 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1901     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1902 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1903     ;;
1904   no:yes:* )
1905     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1906 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1907     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1908 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1909     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1910 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1911     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1912 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1913     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1914 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1915 ( $as_echo "## ---------------------------------------------- ##
1916 ## Report this to pgsql-bugs@lists.postgresql.org ##
1917 ## ---------------------------------------------- ##"
1918      ) | sed "s/^/$as_me: WARNING:     /" >&2
1919     ;;
1920 esac
1921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1922 $as_echo_n "checking for $2... " >&6; }
1923 if eval \${$3+:} false; then :
1924   $as_echo_n "(cached) " >&6
1925 else
1926   eval "$3=\$ac_header_compiler"
1927 fi
1928 eval ac_res=\$$3
1929                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1930 $as_echo "$ac_res" >&6; }
1931 fi
1932   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1933
1934 } # ac_fn_c_check_header_mongrel
1935
1936 # ac_fn_c_try_run LINENO
1937 # ----------------------
1938 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1939 # that executables *can* be run.
1940 ac_fn_c_try_run ()
1941 {
1942   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1943   if { { ac_try="$ac_link"
1944 case "(($ac_try" in
1945   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1946   *) ac_try_echo=$ac_try;;
1947 esac
1948 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1949 $as_echo "$ac_try_echo"; } >&5
1950   (eval "$ac_link") 2>&5
1951   ac_status=$?
1952   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1953   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1954   { { case "(($ac_try" in
1955   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1956   *) ac_try_echo=$ac_try;;
1957 esac
1958 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1959 $as_echo "$ac_try_echo"; } >&5
1960   (eval "$ac_try") 2>&5
1961   ac_status=$?
1962   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1963   test $ac_status = 0; }; }; then :
1964   ac_retval=0
1965 else
1966   $as_echo "$as_me: program exited with status $ac_status" >&5
1967        $as_echo "$as_me: failed program was:" >&5
1968 sed 's/^/| /' conftest.$ac_ext >&5
1969
1970        ac_retval=$ac_status
1971 fi
1972   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1973   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1974   as_fn_set_status $ac_retval
1975
1976 } # ac_fn_c_try_run
1977
1978 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1979 # -------------------------------------------------------
1980 # Tests whether HEADER exists and can be compiled using the include files in
1981 # INCLUDES, setting the cache variable VAR accordingly.
1982 ac_fn_c_check_header_compile ()
1983 {
1984   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1986 $as_echo_n "checking for $2... " >&6; }
1987 if eval \${$3+:} false; then :
1988   $as_echo_n "(cached) " >&6
1989 else
1990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1991 /* end confdefs.h.  */
1992 $4
1993 #include <$2>
1994 _ACEOF
1995 if ac_fn_c_try_compile "$LINENO"; then :
1996   eval "$3=yes"
1997 else
1998   eval "$3=no"
1999 fi
2000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2001 fi
2002 eval ac_res=\$$3
2003                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2004 $as_echo "$ac_res" >&6; }
2005   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2006
2007 } # ac_fn_c_check_header_compile
2008
2009 # ac_fn_c_check_func LINENO FUNC VAR
2010 # ----------------------------------
2011 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2012 ac_fn_c_check_func ()
2013 {
2014   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2015   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2016 $as_echo_n "checking for $2... " >&6; }
2017 if eval \${$3+:} false; then :
2018   $as_echo_n "(cached) " >&6
2019 else
2020   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2021 /* end confdefs.h.  */
2022 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2023    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2024 #define $2 innocuous_$2
2025
2026 /* System header to define __stub macros and hopefully few prototypes,
2027     which can conflict with char $2 (); below.
2028     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2029     <limits.h> exists even on freestanding compilers.  */
2030
2031 #ifdef __STDC__
2032 # include <limits.h>
2033 #else
2034 # include <assert.h>
2035 #endif
2036
2037 #undef $2
2038
2039 /* Override any GCC internal prototype to avoid an error.
2040    Use char because int might match the return type of a GCC
2041    builtin and then its argument prototype would still apply.  */
2042 #ifdef __cplusplus
2043 extern "C"
2044 #endif
2045 char $2 ();
2046 /* The GNU C library defines this for functions which it implements
2047     to always fail with ENOSYS.  Some functions are actually named
2048     something starting with __ and the normal name is an alias.  */
2049 #if defined __stub_$2 || defined __stub___$2
2050 choke me
2051 #endif
2052
2053 int
2054 main ()
2055 {
2056 return $2 ();
2057   ;
2058   return 0;
2059 }
2060 _ACEOF
2061 if ac_fn_c_try_link "$LINENO"; then :
2062   eval "$3=yes"
2063 else
2064   eval "$3=no"
2065 fi
2066 rm -f core conftest.err conftest.$ac_objext \
2067     conftest$ac_exeext conftest.$ac_ext
2068 fi
2069 eval ac_res=\$$3
2070                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2071 $as_echo "$ac_res" >&6; }
2072   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2073
2074 } # ac_fn_c_check_func
2075
2076 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2077 # -------------------------------------------
2078 # Tests whether TYPE exists after having included INCLUDES, setting cache
2079 # variable VAR accordingly.
2080 ac_fn_c_check_type ()
2081 {
2082   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2084 $as_echo_n "checking for $2... " >&6; }
2085 if eval \${$3+:} false; then :
2086   $as_echo_n "(cached) " >&6
2087 else
2088   eval "$3=no"
2089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090 /* end confdefs.h.  */
2091 $4
2092 int
2093 main ()
2094 {
2095 if (sizeof ($2))
2096          return 0;
2097   ;
2098   return 0;
2099 }
2100 _ACEOF
2101 if ac_fn_c_try_compile "$LINENO"; then :
2102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103 /* end confdefs.h.  */
2104 $4
2105 int
2106 main ()
2107 {
2108 if (sizeof (($2)))
2109             return 0;
2110   ;
2111   return 0;
2112 }
2113 _ACEOF
2114 if ac_fn_c_try_compile "$LINENO"; then :
2115
2116 else
2117   eval "$3=yes"
2118 fi
2119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120 fi
2121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122 fi
2123 eval ac_res=\$$3
2124                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2125 $as_echo "$ac_res" >&6; }
2126   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2127
2128 } # ac_fn_c_check_type
2129
2130 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2131 # ----------------------------------------------------
2132 # Tries to find if the field MEMBER exists in type AGGR, after including
2133 # INCLUDES, setting cache variable VAR accordingly.
2134 ac_fn_c_check_member ()
2135 {
2136   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2137   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2138 $as_echo_n "checking for $2.$3... " >&6; }
2139 if eval \${$4+:} false; then :
2140   $as_echo_n "(cached) " >&6
2141 else
2142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143 /* end confdefs.h.  */
2144 $5
2145 int
2146 main ()
2147 {
2148 static $2 ac_aggr;
2149 if (ac_aggr.$3)
2150 return 0;
2151   ;
2152   return 0;
2153 }
2154 _ACEOF
2155 if ac_fn_c_try_compile "$LINENO"; then :
2156   eval "$4=yes"
2157 else
2158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159 /* end confdefs.h.  */
2160 $5
2161 int
2162 main ()
2163 {
2164 static $2 ac_aggr;
2165 if (sizeof ac_aggr.$3)
2166 return 0;
2167   ;
2168   return 0;
2169 }
2170 _ACEOF
2171 if ac_fn_c_try_compile "$LINENO"; then :
2172   eval "$4=yes"
2173 else
2174   eval "$4=no"
2175 fi
2176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177 fi
2178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179 fi
2180 eval ac_res=\$$4
2181                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2182 $as_echo "$ac_res" >&6; }
2183   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2184
2185 } # ac_fn_c_check_member
2186
2187 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2188 # --------------------------------------------
2189 # Tries to find the compile-time value of EXPR in a program that includes
2190 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2191 # computed
2192 ac_fn_c_compute_int ()
2193 {
2194   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2195   if test "$cross_compiling" = yes; then
2196     # Depending upon the size, compute the lo and hi bounds.
2197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198 /* end confdefs.h.  */
2199 $4
2200 int
2201 main ()
2202 {
2203 static int test_array [1 - 2 * !(($2) >= 0)];
2204 test_array [0] = 0;
2205 return test_array [0];
2206
2207   ;
2208   return 0;
2209 }
2210 _ACEOF
2211 if ac_fn_c_try_compile "$LINENO"; then :
2212   ac_lo=0 ac_mid=0
2213   while :; do
2214     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2215 /* end confdefs.h.  */
2216 $4
2217 int
2218 main ()
2219 {
2220 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2221 test_array [0] = 0;
2222 return test_array [0];
2223
2224   ;
2225   return 0;
2226 }
2227 _ACEOF
2228 if ac_fn_c_try_compile "$LINENO"; then :
2229   ac_hi=$ac_mid; break
2230 else
2231   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2232                         if test $ac_lo -le $ac_mid; then
2233                           ac_lo= ac_hi=
2234                           break
2235                         fi
2236                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2237 fi
2238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2239   done
2240 else
2241   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242 /* end confdefs.h.  */
2243 $4
2244 int
2245 main ()
2246 {
2247 static int test_array [1 - 2 * !(($2) < 0)];
2248 test_array [0] = 0;
2249 return test_array [0];
2250
2251   ;
2252   return 0;
2253 }
2254 _ACEOF
2255 if ac_fn_c_try_compile "$LINENO"; then :
2256   ac_hi=-1 ac_mid=-1
2257   while :; do
2258     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259 /* end confdefs.h.  */
2260 $4
2261 int
2262 main ()
2263 {
2264 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2265 test_array [0] = 0;
2266 return test_array [0];
2267
2268   ;
2269   return 0;
2270 }
2271 _ACEOF
2272 if ac_fn_c_try_compile "$LINENO"; then :
2273   ac_lo=$ac_mid; break
2274 else
2275   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2276                         if test $ac_mid -le $ac_hi; then
2277                           ac_lo= ac_hi=
2278                           break
2279                         fi
2280                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2281 fi
2282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2283   done
2284 else
2285   ac_lo= ac_hi=
2286 fi
2287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288 fi
2289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290 # Binary search between lo and hi bounds.
2291 while test "x$ac_lo" != "x$ac_hi"; do
2292   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294 /* end confdefs.h.  */
2295 $4
2296 int
2297 main ()
2298 {
2299 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2300 test_array [0] = 0;
2301 return test_array [0];
2302
2303   ;
2304   return 0;
2305 }
2306 _ACEOF
2307 if ac_fn_c_try_compile "$LINENO"; then :
2308   ac_hi=$ac_mid
2309 else
2310   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2311 fi
2312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313 done
2314 case $ac_lo in #((
2315 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2316 '') ac_retval=1 ;;
2317 esac
2318   else
2319     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320 /* end confdefs.h.  */
2321 $4
2322 static long int longval () { return $2; }
2323 static unsigned long int ulongval () { return $2; }
2324 #include <stdio.h>
2325 #include <stdlib.h>
2326 int
2327 main ()
2328 {
2329
2330   FILE *f = fopen ("conftest.val", "w");
2331   if (! f)
2332     return 1;
2333   if (($2) < 0)
2334     {
2335       long int i = longval ();
2336       if (i != ($2))
2337         return 1;
2338       fprintf (f, "%ld", i);
2339     }
2340   else
2341     {
2342       unsigned long int i = ulongval ();
2343       if (i != ($2))
2344         return 1;
2345       fprintf (f, "%lu", i);
2346     }
2347   /* Do not output a trailing newline, as this causes \r\n confusion
2348      on some platforms.  */
2349   return ferror (f) || fclose (f) != 0;
2350
2351   ;
2352   return 0;
2353 }
2354 _ACEOF
2355 if ac_fn_c_try_run "$LINENO"; then :
2356   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2357 else
2358   ac_retval=1
2359 fi
2360 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2361   conftest.$ac_objext conftest.beam conftest.$ac_ext
2362 rm -f conftest.val
2363
2364   fi
2365   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2366   as_fn_set_status $ac_retval
2367
2368 } # ac_fn_c_compute_int
2369
2370 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2371 # ---------------------------------------------
2372 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2373 # accordingly.
2374 ac_fn_c_check_decl ()
2375 {
2376   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2377   # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2378       as_decl_name=`echo $2|sed 's/ *(.*//'`
2379   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2380   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2381 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2382 if eval \${$3+:} false; then :
2383   $as_echo_n "(cached) " >&6
2384 else
2385   ac_save_werror_flag=$ac_c_werror_flag
2386   ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2387   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2388 /* end confdefs.h.  */
2389 $4
2390 int
2391 main ()
2392 {
2393 #ifndef $as_decl_name
2394 #ifdef __cplusplus
2395   (void) $as_decl_use;
2396 #else
2397   (void) $as_decl_name;
2398 #endif
2399 #endif
2400
2401   ;
2402   return 0;
2403 }
2404 _ACEOF
2405 if ac_fn_c_try_compile "$LINENO"; then :
2406   eval "$3=yes"
2407 else
2408   eval "$3=no"
2409 fi
2410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2411   ac_c_werror_flag=$ac_save_werror_flag
2412 fi
2413 eval ac_res=\$$3
2414                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2415 $as_echo "$ac_res" >&6; }
2416   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2417
2418 } # ac_fn_c_check_decl
2419 cat >config.log <<_ACEOF
2420 This file contains any messages produced by compilers while
2421 running configure, to aid debugging if configure makes a mistake.
2422
2423 It was created by PostgreSQL $as_me 12devel, which was
2424 generated by GNU Autoconf 2.69.  Invocation command line was
2425
2426   $ $0 $@
2427
2428 _ACEOF
2429 exec 5>>config.log
2430 {
2431 cat <<_ASUNAME
2432 ## --------- ##
2433 ## Platform. ##
2434 ## --------- ##
2435
2436 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2437 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2438 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2439 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2440 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2441
2442 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2443 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2444
2445 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2446 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2447 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2448 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2449 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2450 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2451 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2452
2453 _ASUNAME
2454
2455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2456 for as_dir in $PATH
2457 do
2458   IFS=$as_save_IFS
2459   test -z "$as_dir" && as_dir=.
2460     $as_echo "PATH: $as_dir"
2461   done
2462 IFS=$as_save_IFS
2463
2464 } >&5
2465
2466 cat >&5 <<_ACEOF
2467
2468
2469 ## ----------- ##
2470 ## Core tests. ##
2471 ## ----------- ##
2472
2473 _ACEOF
2474
2475
2476 # Keep a trace of the command line.
2477 # Strip out --no-create and --no-recursion so they do not pile up.
2478 # Strip out --silent because we don't want to record it for future runs.
2479 # Also quote any args containing shell meta-characters.
2480 # Make two passes to allow for proper duplicate-argument suppression.
2481 ac_configure_args=
2482 ac_configure_args0=
2483 ac_configure_args1=
2484 ac_must_keep_next=false
2485 for ac_pass in 1 2
2486 do
2487   for ac_arg
2488   do
2489     case $ac_arg in
2490     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2491     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2492     | -silent | --silent | --silen | --sile | --sil)
2493       continue ;;
2494     *\'*)
2495       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2496     esac
2497     case $ac_pass in
2498     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2499     2)
2500       as_fn_append ac_configure_args1 " '$ac_arg'"
2501       if test $ac_must_keep_next = true; then
2502         ac_must_keep_next=false # Got value, back to normal.
2503       else
2504         case $ac_arg in
2505           *=* | --config-cache | -C | -disable-* | --disable-* \
2506           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2507           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2508           | -with-* | --with-* | -without-* | --without-* | --x)
2509             case "$ac_configure_args0 " in
2510               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2511             esac
2512             ;;
2513           -* ) ac_must_keep_next=true ;;
2514         esac
2515       fi
2516       as_fn_append ac_configure_args " '$ac_arg'"
2517       ;;
2518     esac
2519   done
2520 done
2521 { ac_configure_args0=; unset ac_configure_args0;}
2522 { ac_configure_args1=; unset ac_configure_args1;}
2523
2524 # When interrupted or exit'd, cleanup temporary files, and complete
2525 # config.log.  We remove comments because anyway the quotes in there
2526 # would cause problems or look ugly.
2527 # WARNING: Use '\'' to represent an apostrophe within the trap.
2528 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2529 trap 'exit_status=$?
2530   # Save into config.log some information that might help in debugging.
2531   {
2532     echo
2533
2534     $as_echo "## ---------------- ##
2535 ## Cache variables. ##
2536 ## ---------------- ##"
2537     echo
2538     # The following way of writing the cache mishandles newlines in values,
2539 (
2540   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2541     eval ac_val=\$$ac_var
2542     case $ac_val in #(
2543     *${as_nl}*)
2544       case $ac_var in #(
2545       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2546 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2547       esac
2548       case $ac_var in #(
2549       _ | IFS | as_nl) ;; #(
2550       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2551       *) { eval $ac_var=; unset $ac_var;} ;;
2552       esac ;;
2553     esac
2554   done
2555   (set) 2>&1 |
2556     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2557     *${as_nl}ac_space=\ *)
2558       sed -n \
2559         "s/'\''/'\''\\\\'\'''\''/g;
2560           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2561       ;; #(
2562     *)
2563       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2564       ;;
2565     esac |
2566     sort
2567 )
2568     echo
2569
2570     $as_echo "## ----------------- ##
2571 ## Output variables. ##
2572 ## ----------------- ##"
2573     echo
2574     for ac_var in $ac_subst_vars
2575     do
2576       eval ac_val=\$$ac_var
2577       case $ac_val in
2578       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2579       esac
2580       $as_echo "$ac_var='\''$ac_val'\''"
2581     done | sort
2582     echo
2583
2584     if test -n "$ac_subst_files"; then
2585       $as_echo "## ------------------- ##
2586 ## File substitutions. ##
2587 ## ------------------- ##"
2588       echo
2589       for ac_var in $ac_subst_files
2590       do
2591         eval ac_val=\$$ac_var
2592         case $ac_val in
2593         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2594         esac
2595         $as_echo "$ac_var='\''$ac_val'\''"
2596       done | sort
2597       echo
2598     fi
2599
2600     if test -s confdefs.h; then
2601       $as_echo "## ----------- ##
2602 ## confdefs.h. ##
2603 ## ----------- ##"
2604       echo
2605       cat confdefs.h
2606       echo
2607     fi
2608     test "$ac_signal" != 0 &&
2609       $as_echo "$as_me: caught signal $ac_signal"
2610     $as_echo "$as_me: exit $exit_status"
2611   } >&5
2612   rm -f core *.core core.conftest.* &&
2613     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2614     exit $exit_status
2615 ' 0
2616 for ac_signal in 1 2 13 15; do
2617   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2618 done
2619 ac_signal=0
2620
2621 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2622 rm -f -r conftest* confdefs.h
2623
2624 $as_echo "/* confdefs.h */" > confdefs.h
2625
2626 # Predefined preprocessor variables.
2627
2628 cat >>confdefs.h <<_ACEOF
2629 #define PACKAGE_NAME "$PACKAGE_NAME"
2630 _ACEOF
2631
2632 cat >>confdefs.h <<_ACEOF
2633 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2634 _ACEOF
2635
2636 cat >>confdefs.h <<_ACEOF
2637 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2638 _ACEOF
2639
2640 cat >>confdefs.h <<_ACEOF
2641 #define PACKAGE_STRING "$PACKAGE_STRING"
2642 _ACEOF
2643
2644 cat >>confdefs.h <<_ACEOF
2645 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2646 _ACEOF
2647
2648 cat >>confdefs.h <<_ACEOF
2649 #define PACKAGE_URL "$PACKAGE_URL"
2650 _ACEOF
2651
2652
2653 # Let the site file select an alternate cache file if it wants to.
2654 # Prefer an explicitly selected file to automatically selected ones.
2655 ac_site_file1=NONE
2656 ac_site_file2=NONE
2657 if test -n "$CONFIG_SITE"; then
2658   # We do not want a PATH search for config.site.
2659   case $CONFIG_SITE in #((
2660     -*)  ac_site_file1=./$CONFIG_SITE;;
2661     */*) ac_site_file1=$CONFIG_SITE;;
2662     *)   ac_site_file1=./$CONFIG_SITE;;
2663   esac
2664 elif test "x$prefix" != xNONE; then
2665   ac_site_file1=$prefix/share/config.site
2666   ac_site_file2=$prefix/etc/config.site
2667 else
2668   ac_site_file1=$ac_default_prefix/share/config.site
2669   ac_site_file2=$ac_default_prefix/etc/config.site
2670 fi
2671 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2672 do
2673   test "x$ac_site_file" = xNONE && continue
2674   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2675     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2676 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2677     sed 's/^/| /' "$ac_site_file" >&5
2678     . "$ac_site_file" \
2679       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2680 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2681 as_fn_error $? "failed to load site script $ac_site_file
2682 See \`config.log' for more details" "$LINENO" 5; }
2683   fi
2684 done
2685
2686 if test -r "$cache_file"; then
2687   # Some versions of bash will fail to source /dev/null (special files
2688   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2689   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2690     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2691 $as_echo "$as_me: loading cache $cache_file" >&6;}
2692     case $cache_file in
2693       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2694       *)                      . "./$cache_file";;
2695     esac
2696   fi
2697 else
2698   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2699 $as_echo "$as_me: creating cache $cache_file" >&6;}
2700   >$cache_file
2701 fi
2702
2703 # Check that the precious variables saved in the cache have kept the same
2704 # value.
2705 ac_cache_corrupted=false
2706 for ac_var in $ac_precious_vars; do
2707   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2708   eval ac_new_set=\$ac_env_${ac_var}_set
2709   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2710   eval ac_new_val=\$ac_env_${ac_var}_value
2711   case $ac_old_set,$ac_new_set in
2712     set,)
2713       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2714 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2715       ac_cache_corrupted=: ;;
2716     ,set)
2717       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2718 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2719       ac_cache_corrupted=: ;;
2720     ,);;
2721     *)
2722       if test "x$ac_old_val" != "x$ac_new_val"; then
2723         # differences in whitespace do not lead to failure.
2724         ac_old_val_w=`echo x $ac_old_val`
2725         ac_new_val_w=`echo x $ac_new_val`
2726         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2727           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2728 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2729           ac_cache_corrupted=:
2730         else
2731           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2732 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2733           eval $ac_var=\$ac_old_val
2734         fi
2735         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2736 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2737         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2738 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2739       fi;;
2740   esac
2741   # Pass precious variables to config.status.
2742   if test "$ac_new_set" = set; then
2743     case $ac_new_val in
2744     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2745     *) ac_arg=$ac_var=$ac_new_val ;;
2746     esac
2747     case " $ac_configure_args " in
2748       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2749       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2750     esac
2751   fi
2752 done
2753 if $ac_cache_corrupted; then
2754   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2755 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2756   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2757 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2758   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2759 fi
2760 ## -------------------- ##
2761 ## Main body of script. ##
2762 ## -------------------- ##
2763
2764 ac_ext=c
2765 ac_cpp='$CPP $CPPFLAGS'
2766 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2767 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2768 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2769
2770
2771
2772
2773
2774
2775 ac_aux_dir=
2776 for ac_dir in config "$srcdir"/config; do
2777   if test -f "$ac_dir/install-sh"; then
2778     ac_aux_dir=$ac_dir
2779     ac_install_sh="$ac_aux_dir/install-sh -c"
2780     break
2781   elif test -f "$ac_dir/install.sh"; then
2782     ac_aux_dir=$ac_dir
2783     ac_install_sh="$ac_aux_dir/install.sh -c"
2784     break
2785   elif test -f "$ac_dir/shtool"; then
2786     ac_aux_dir=$ac_dir
2787     ac_install_sh="$ac_aux_dir/shtool install -c"
2788     break
2789   fi
2790 done
2791 if test -z "$ac_aux_dir"; then
2792   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2793 fi
2794
2795 # These three variables are undocumented and unsupported,
2796 # and are intended to be withdrawn in a future Autoconf release.
2797 # They can cause serious problems if a builder's source tree is in a directory
2798 # whose full name contains unusual characters.
2799 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2800 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2801 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2802
2803
2804
2805 configure_args=$ac_configure_args
2806
2807
2808 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2809
2810
2811 cat >>confdefs.h <<_ACEOF
2812 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2813 _ACEOF
2814
2815
2816
2817
2818
2819 # Check whether --with-extra-version was given.
2820 if test "${with_extra_version+set}" = set; then :
2821   withval=$with_extra_version;
2822   case $withval in
2823     yes)
2824       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2825       ;;
2826     no)
2827       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2828       ;;
2829     *)
2830       PG_VERSION="$PACKAGE_VERSION$withval"
2831       ;;
2832   esac
2833
2834 else
2835   PG_VERSION="$PACKAGE_VERSION"
2836 fi
2837
2838
2839
2840 cat >>confdefs.h <<_ACEOF
2841 #define PG_VERSION "$PG_VERSION"
2842 _ACEOF
2843
2844
2845 # Make sure we can run config.sub.
2846 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2847   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2848
2849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2850 $as_echo_n "checking build system type... " >&6; }
2851 if ${ac_cv_build+:} false; then :
2852   $as_echo_n "(cached) " >&6
2853 else
2854   ac_build_alias=$build_alias
2855 test "x$ac_build_alias" = x &&
2856   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2857 test "x$ac_build_alias" = x &&
2858   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2859 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2860   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2861
2862 fi
2863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2864 $as_echo "$ac_cv_build" >&6; }
2865 case $ac_cv_build in
2866 *-*-*) ;;
2867 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2868 esac
2869 build=$ac_cv_build
2870 ac_save_IFS=$IFS; IFS='-'
2871 set x $ac_cv_build
2872 shift
2873 build_cpu=$1
2874 build_vendor=$2
2875 shift; shift
2876 # Remember, the first character of IFS is used to create $*,
2877 # except with old shells:
2878 build_os=$*
2879 IFS=$ac_save_IFS
2880 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2881
2882
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2884 $as_echo_n "checking host system type... " >&6; }
2885 if ${ac_cv_host+:} false; then :
2886   $as_echo_n "(cached) " >&6
2887 else
2888   if test "x$host_alias" = x; then
2889   ac_cv_host=$ac_cv_build
2890 else
2891   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2892     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2893 fi
2894
2895 fi
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2897 $as_echo "$ac_cv_host" >&6; }
2898 case $ac_cv_host in
2899 *-*-*) ;;
2900 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2901 esac
2902 host=$ac_cv_host
2903 ac_save_IFS=$IFS; IFS='-'
2904 set x $ac_cv_host
2905 shift
2906 host_cpu=$1
2907 host_vendor=$2
2908 shift; shift
2909 # Remember, the first character of IFS is used to create $*,
2910 # except with old shells:
2911 host_os=$*
2912 IFS=$ac_save_IFS
2913 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2914
2915
2916
2917 template=
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2919 $as_echo_n "checking which template to use... " >&6; }
2920
2921
2922
2923
2924 # Check whether --with-template was given.
2925 if test "${with_template+set}" = set; then :
2926   withval=$with_template;
2927   case $withval in
2928     yes)
2929       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2930       ;;
2931     no)
2932       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2933       ;;
2934     *)
2935
2936   case $withval in
2937     list)   echo; ls "$srcdir/src/template"; exit;;
2938     *)      if test -f "$srcdir/src/template/$with_template" ; then
2939               template=$withval
2940             else
2941               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2942             fi;;
2943   esac
2944
2945       ;;
2946   esac
2947
2948 else
2949
2950 # --with-template not given
2951
2952 case $host_os in
2953      aix*) template=aix ;;
2954   cygwin*) template=cygwin ;;
2955   darwin*) template=darwin ;;
2956 dragonfly*) template=netbsd ;;
2957  freebsd*) template=freebsd ;;
2958     hpux*) template=hpux ;;
2959  linux*|gnu*|k*bsd*-gnu)
2960            template=linux ;;
2961    mingw*) template=win32 ;;
2962   netbsd*) template=netbsd ;;
2963  openbsd*) template=openbsd ;;
2964  solaris*) template=solaris ;;
2965 esac
2966
2967   if test x"$template" = x"" ; then
2968     as_fn_error $? "
2969 *******************************************************************
2970 PostgreSQL has apparently not been ported to your platform yet.
2971 To try a manual configuration, look into the src/template directory
2972 for a similar platform and use the '--with-template=' option.
2973
2974 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
2975 rectifying this.  Include the above 'checking host system type...'
2976 line.
2977 *******************************************************************
2978 " "$LINENO" 5
2979   fi
2980
2981
2982 fi
2983
2984
2985
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2987 $as_echo "$template" >&6; }
2988
2989 PORTNAME=$template
2990
2991
2992 # Initialize default assumption that we do not need separate assembly code
2993 # for TAS (test-and-set).  This can be overridden by the template file
2994 # when it's executed.
2995 need_tas=no
2996 tas_file=dummy.s
2997
2998
2999
3000 ##
3001 ## Command line options
3002 ##
3003
3004 #
3005 # Add non-standard directories to the include path
3006 #
3007
3008
3009
3010 # Check whether --with-includes was given.
3011 if test "${with_includes+set}" = set; then :
3012   withval=$with_includes;
3013   case $withval in
3014     yes)
3015       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3016       ;;
3017     no)
3018       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3019       ;;
3020     *)
3021
3022       ;;
3023   esac
3024
3025 fi
3026
3027
3028
3029
3030 #
3031 # Add non-standard directories to the library search path
3032 #
3033
3034
3035
3036 # Check whether --with-libraries was given.
3037 if test "${with_libraries+set}" = set; then :
3038   withval=$with_libraries;
3039   case $withval in
3040     yes)
3041       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3042       ;;
3043     no)
3044       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3045       ;;
3046     *)
3047       LIBRARY_DIRS=$withval
3048       ;;
3049   esac
3050
3051 fi
3052
3053
3054
3055
3056
3057
3058 # Check whether --with-libs was given.
3059 if test "${with_libs+set}" = set; then :
3060   withval=$with_libs;
3061   case $withval in
3062     yes)
3063       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3064       ;;
3065     no)
3066       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3067       ;;
3068     *)
3069       LIBRARY_DIRS=$withval
3070       ;;
3071   esac
3072
3073 fi
3074
3075
3076
3077
3078 #
3079 # 64-bit integer date/time storage is now the only option, but to avoid
3080 # unnecessary breakage of build scripts, continue to accept an explicit
3081 # "--enable-integer-datetimes" switch.
3082 #
3083
3084
3085 # Check whether --enable-integer-datetimes was given.
3086 if test "${enable_integer_datetimes+set}" = set; then :
3087   enableval=$enable_integer_datetimes;
3088   case $enableval in
3089     yes)
3090       :
3091       ;;
3092     no)
3093       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3094       ;;
3095     *)
3096       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3097       ;;
3098   esac
3099
3100 else
3101   enable_integer_datetimes=yes
3102
3103 fi
3104
3105
3106
3107
3108 #
3109 # NLS
3110 #
3111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3112 $as_echo_n "checking whether NLS is wanted... " >&6; }
3113
3114
3115 # Check whether --enable-nls was given.
3116 if test "${enable_nls+set}" = set; then :
3117   enableval=$enable_nls;
3118   case $enableval in
3119     yes)
3120       :
3121       ;;
3122     no)
3123       :
3124       ;;
3125     *)
3126       enable_nls=yes
3127 WANTED_LANGUAGES=$enableval
3128       ;;
3129   esac
3130
3131 else
3132   enable_nls=no
3133 fi
3134
3135
3136
3137 if test "$enable_nls" = yes; then
3138
3139 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3140
3141 fi
3142
3143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3144 $as_echo "$enable_nls" >&6; }
3145
3146
3147
3148 #
3149 # Default port number (--with-pgport), default 5432
3150 #
3151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3152 $as_echo_n "checking for default port number... " >&6; }
3153
3154
3155
3156 # Check whether --with-pgport was given.
3157 if test "${with_pgport+set}" = set; then :
3158   withval=$with_pgport;
3159   case $withval in
3160     yes)
3161       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3162       ;;
3163     no)
3164       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3165       ;;
3166     *)
3167       default_port=$withval
3168       ;;
3169   esac
3170
3171 else
3172   default_port=5432
3173 fi
3174
3175
3176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3177 $as_echo "$default_port" >&6; }
3178 # Need both of these because some places want an integer and some a string
3179
3180 cat >>confdefs.h <<_ACEOF
3181 #define DEF_PGPORT ${default_port}
3182 _ACEOF
3183
3184
3185 cat >>confdefs.h <<_ACEOF
3186 #define DEF_PGPORT_STR "${default_port}"
3187 _ACEOF
3188
3189
3190
3191 # It's worth validating port; you can get very confusing errors otherwise
3192 if test x"$default_port" = x""; then
3193   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3194 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3195   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3196 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3197   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3198 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3199   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3200 fi
3201
3202 #
3203 # '-rpath'-like feature can be disabled
3204 #
3205
3206
3207 # Check whether --enable-rpath was given.
3208 if test "${enable_rpath+set}" = set; then :
3209   enableval=$enable_rpath;
3210   case $enableval in
3211     yes)
3212       :
3213       ;;
3214     no)
3215       :
3216       ;;
3217     *)
3218       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3219       ;;
3220   esac
3221
3222 else
3223   enable_rpath=yes
3224
3225 fi
3226
3227
3228
3229
3230 #
3231 # Spinlocks
3232 #
3233
3234
3235 # Check whether --enable-spinlocks was given.
3236 if test "${enable_spinlocks+set}" = set; then :
3237   enableval=$enable_spinlocks;
3238   case $enableval in
3239     yes)
3240       :
3241       ;;
3242     no)
3243       :
3244       ;;
3245     *)
3246       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3247       ;;
3248   esac
3249
3250 else
3251   enable_spinlocks=yes
3252
3253 fi
3254
3255
3256
3257 #
3258 # Atomic operations
3259 #
3260
3261
3262 # Check whether --enable-atomics was given.
3263 if test "${enable_atomics+set}" = set; then :
3264   enableval=$enable_atomics;
3265   case $enableval in
3266     yes)
3267       :
3268       ;;
3269     no)
3270       :
3271       ;;
3272     *)
3273       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3274       ;;
3275   esac
3276
3277 else
3278   enable_atomics=yes
3279
3280 fi
3281
3282
3283
3284 #
3285 # --enable-debug adds -g to compiler flags
3286 #
3287
3288
3289 # Check whether --enable-debug was given.
3290 if test "${enable_debug+set}" = set; then :
3291   enableval=$enable_debug;
3292   case $enableval in
3293     yes)
3294       :
3295       ;;
3296     no)
3297       :
3298       ;;
3299     *)
3300       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3301       ;;
3302   esac
3303
3304 else
3305   enable_debug=no
3306
3307 fi
3308
3309
3310
3311
3312 #
3313 # --enable-profiling enables gcc profiling
3314 #
3315
3316
3317 # Check whether --enable-profiling was given.
3318 if test "${enable_profiling+set}" = set; then :
3319   enableval=$enable_profiling;
3320   case $enableval in
3321     yes)
3322       :
3323       ;;
3324     no)
3325       :
3326       ;;
3327     *)
3328       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3329       ;;
3330   esac
3331
3332 else
3333   enable_profiling=no
3334
3335 fi
3336
3337
3338
3339 #
3340 # --enable-coverage enables generation of code coverage metrics with gcov
3341 #
3342
3343
3344 # Check whether --enable-coverage was given.
3345 if test "${enable_coverage+set}" = set; then :
3346   enableval=$enable_coverage;
3347   case $enableval in
3348     yes)
3349       if test -z "$GCOV"; then
3350   for ac_prog in gcov
3351 do
3352   # Extract the first word of "$ac_prog", so it can be a program name with args.
3353 set dummy $ac_prog; ac_word=$2
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3355 $as_echo_n "checking for $ac_word... " >&6; }
3356 if ${ac_cv_path_GCOV+:} false; then :
3357   $as_echo_n "(cached) " >&6
3358 else
3359   case $GCOV in
3360   [\\/]* | ?:[\\/]*)
3361   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3362   ;;
3363   *)
3364   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3365 for as_dir in $PATH
3366 do
3367   IFS=$as_save_IFS
3368   test -z "$as_dir" && as_dir=.
3369     for ac_exec_ext in '' $ac_executable_extensions; do
3370   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3371     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3373     break 2
3374   fi
3375 done
3376   done
3377 IFS=$as_save_IFS
3378
3379   ;;
3380 esac
3381 fi
3382 GCOV=$ac_cv_path_GCOV
3383 if test -n "$GCOV"; then
3384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3385 $as_echo "$GCOV" >&6; }
3386 else
3387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3388 $as_echo "no" >&6; }
3389 fi
3390
3391
3392   test -n "$GCOV" && break
3393 done
3394
3395 else
3396   # Report the value of GCOV in configure's output in all cases.
3397   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3398 $as_echo_n "checking for GCOV... " >&6; }
3399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3400 $as_echo "$GCOV" >&6; }
3401 fi
3402
3403 if test -z "$GCOV"; then
3404   as_fn_error $? "gcov not found" "$LINENO" 5
3405 fi
3406 if test -z "$LCOV"; then
3407   for ac_prog in lcov
3408 do
3409   # Extract the first word of "$ac_prog", so it can be a program name with args.
3410 set dummy $ac_prog; ac_word=$2
3411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3412 $as_echo_n "checking for $ac_word... " >&6; }
3413 if ${ac_cv_path_LCOV+:} false; then :
3414   $as_echo_n "(cached) " >&6
3415 else
3416   case $LCOV in
3417   [\\/]* | ?:[\\/]*)
3418   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3419   ;;
3420   *)
3421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3422 for as_dir in $PATH
3423 do
3424   IFS=$as_save_IFS
3425   test -z "$as_dir" && as_dir=.
3426     for ac_exec_ext in '' $ac_executable_extensions; do
3427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3428     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3430     break 2
3431   fi
3432 done
3433   done
3434 IFS=$as_save_IFS
3435
3436   ;;
3437 esac
3438 fi
3439 LCOV=$ac_cv_path_LCOV
3440 if test -n "$LCOV"; then
3441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3442 $as_echo "$LCOV" >&6; }
3443 else
3444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3445 $as_echo "no" >&6; }
3446 fi
3447
3448
3449   test -n "$LCOV" && break
3450 done
3451
3452 else
3453   # Report the value of LCOV in configure's output in all cases.
3454   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3455 $as_echo_n "checking for LCOV... " >&6; }
3456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3457 $as_echo "$LCOV" >&6; }
3458 fi
3459
3460 if test -z "$LCOV"; then
3461   as_fn_error $? "lcov not found" "$LINENO" 5
3462 fi
3463 if test -z "$GENHTML"; then
3464   for ac_prog in genhtml
3465 do
3466   # Extract the first word of "$ac_prog", so it can be a program name with args.
3467 set dummy $ac_prog; ac_word=$2
3468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3469 $as_echo_n "checking for $ac_word... " >&6; }
3470 if ${ac_cv_path_GENHTML+:} false; then :
3471   $as_echo_n "(cached) " >&6
3472 else
3473   case $GENHTML in
3474   [\\/]* | ?:[\\/]*)
3475   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3476   ;;
3477   *)
3478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3479 for as_dir in $PATH
3480 do
3481   IFS=$as_save_IFS
3482   test -z "$as_dir" && as_dir=.
3483     for ac_exec_ext in '' $ac_executable_extensions; do
3484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3485     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3487     break 2
3488   fi
3489 done
3490   done
3491 IFS=$as_save_IFS
3492
3493   ;;
3494 esac
3495 fi
3496 GENHTML=$ac_cv_path_GENHTML
3497 if test -n "$GENHTML"; then
3498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3499 $as_echo "$GENHTML" >&6; }
3500 else
3501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3502 $as_echo "no" >&6; }
3503 fi
3504
3505
3506   test -n "$GENHTML" && break
3507 done
3508
3509 else
3510   # Report the value of GENHTML in configure's output in all cases.
3511   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3512 $as_echo_n "checking for GENHTML... " >&6; }
3513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3514 $as_echo "$GENHTML" >&6; }
3515 fi
3516
3517 if test -z "$GENHTML"; then
3518   as_fn_error $? "genhtml not found" "$LINENO" 5
3519 fi
3520       ;;
3521     no)
3522       :
3523       ;;
3524     *)
3525       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3526       ;;
3527   esac
3528
3529 else
3530   enable_coverage=no
3531
3532 fi
3533
3534
3535
3536
3537 #
3538 # DTrace
3539 #
3540
3541
3542 # Check whether --enable-dtrace was given.
3543 if test "${enable_dtrace+set}" = set; then :
3544   enableval=$enable_dtrace;
3545   case $enableval in
3546     yes)
3547       if test -z "$DTRACE"; then
3548   for ac_prog in dtrace
3549 do
3550   # Extract the first word of "$ac_prog", so it can be a program name with args.
3551 set dummy $ac_prog; ac_word=$2
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3553 $as_echo_n "checking for $ac_word... " >&6; }
3554 if ${ac_cv_path_DTRACE+:} false; then :
3555   $as_echo_n "(cached) " >&6
3556 else
3557   case $DTRACE in
3558   [\\/]* | ?:[\\/]*)
3559   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3560   ;;
3561   *)
3562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3563 for as_dir in $PATH
3564 do
3565   IFS=$as_save_IFS
3566   test -z "$as_dir" && as_dir=.
3567     for ac_exec_ext in '' $ac_executable_extensions; do
3568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3569     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3571     break 2
3572   fi
3573 done
3574   done
3575 IFS=$as_save_IFS
3576
3577   ;;
3578 esac
3579 fi
3580 DTRACE=$ac_cv_path_DTRACE
3581 if test -n "$DTRACE"; then
3582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3583 $as_echo "$DTRACE" >&6; }
3584 else
3585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3586 $as_echo "no" >&6; }
3587 fi
3588
3589
3590   test -n "$DTRACE" && break
3591 done
3592
3593 else
3594   # Report the value of DTRACE in configure's output in all cases.
3595   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3596 $as_echo_n "checking for DTRACE... " >&6; }
3597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3598 $as_echo "$DTRACE" >&6; }
3599 fi
3600
3601 if test -z "$DTRACE"; then
3602   as_fn_error $? "dtrace not found" "$LINENO" 5
3603 fi
3604
3605       ;;
3606     no)
3607       :
3608       ;;
3609     *)
3610       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3611       ;;
3612   esac
3613
3614 else
3615   enable_dtrace=no
3616
3617 fi
3618
3619
3620
3621
3622 #
3623 # TAP tests
3624 #
3625
3626
3627 # Check whether --enable-tap-tests was given.
3628 if test "${enable_tap_tests+set}" = set; then :
3629   enableval=$enable_tap_tests;
3630   case $enableval in
3631     yes)
3632       :
3633       ;;
3634     no)
3635       :
3636       ;;
3637     *)
3638       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3639       ;;
3640   esac
3641
3642 else
3643   enable_tap_tests=no
3644
3645 fi
3646
3647
3648
3649
3650 #
3651 # Block size
3652 #
3653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3654 $as_echo_n "checking for block size... " >&6; }
3655
3656
3657
3658 # Check whether --with-blocksize was given.
3659 if test "${with_blocksize+set}" = set; then :
3660   withval=$with_blocksize;
3661   case $withval in
3662     yes)
3663       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3664       ;;
3665     no)
3666       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3667       ;;
3668     *)
3669       blocksize=$withval
3670       ;;
3671   esac
3672
3673 else
3674   blocksize=8
3675 fi
3676
3677
3678 case ${blocksize} in
3679   1) BLCKSZ=1024;;
3680   2) BLCKSZ=2048;;
3681   4) BLCKSZ=4096;;
3682   8) BLCKSZ=8192;;
3683  16) BLCKSZ=16384;;
3684  32) BLCKSZ=32768;;
3685   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3686 esac
3687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3688 $as_echo "${blocksize}kB" >&6; }
3689
3690
3691 cat >>confdefs.h <<_ACEOF
3692 #define BLCKSZ ${BLCKSZ}
3693 _ACEOF
3694
3695
3696 #
3697 # Relation segment size
3698 #
3699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3700 $as_echo_n "checking for segment size... " >&6; }
3701
3702
3703
3704 # Check whether --with-segsize was given.
3705 if test "${with_segsize+set}" = set; then :
3706   withval=$with_segsize;
3707   case $withval in
3708     yes)
3709       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3710       ;;
3711     no)
3712       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3713       ;;
3714     *)
3715       segsize=$withval
3716       ;;
3717   esac
3718
3719 else
3720   segsize=1
3721 fi
3722
3723
3724 # this expression is set up to avoid unnecessary integer overflow
3725 # blocksize is already guaranteed to be a factor of 1024
3726 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3727 test $? -eq 0 || exit 1
3728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3729 $as_echo "${segsize}GB" >&6; }
3730
3731
3732 cat >>confdefs.h <<_ACEOF
3733 #define RELSEG_SIZE ${RELSEG_SIZE}
3734 _ACEOF
3735
3736
3737 #
3738 # WAL block size
3739 #
3740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3741 $as_echo_n "checking for WAL block size... " >&6; }
3742
3743
3744
3745 # Check whether --with-wal-blocksize was given.
3746 if test "${with_wal_blocksize+set}" = set; then :
3747   withval=$with_wal_blocksize;
3748   case $withval in
3749     yes)
3750       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3751       ;;
3752     no)
3753       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3754       ;;
3755     *)
3756       wal_blocksize=$withval
3757       ;;
3758   esac
3759
3760 else
3761   wal_blocksize=8
3762 fi
3763
3764
3765 case ${wal_blocksize} in
3766   1) XLOG_BLCKSZ=1024;;
3767   2) XLOG_BLCKSZ=2048;;
3768   4) XLOG_BLCKSZ=4096;;
3769   8) XLOG_BLCKSZ=8192;;
3770  16) XLOG_BLCKSZ=16384;;
3771  32) XLOG_BLCKSZ=32768;;
3772  64) XLOG_BLCKSZ=65536;;
3773   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3774 esac
3775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3776 $as_echo "${wal_blocksize}kB" >&6; }
3777
3778
3779 cat >>confdefs.h <<_ACEOF
3780 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3781 _ACEOF
3782
3783
3784 #
3785 # C compiler
3786 #
3787
3788 # For historical reasons you can also use --with-CC to specify the C compiler
3789 # to use, although the standard way to do this is to set the CC environment
3790 # variable.
3791
3792
3793
3794 # Check whether --with-CC was given.
3795 if test "${with_CC+set}" = set; then :
3796   withval=$with_CC;
3797   case $withval in
3798     yes)
3799       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3800       ;;
3801     no)
3802       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3803       ;;
3804     *)
3805       CC=$with_CC
3806       ;;
3807   esac
3808
3809 fi
3810
3811
3812
3813 case $template in
3814   aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3815     *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3816 esac
3817
3818 ac_ext=c
3819 ac_cpp='$CPP $CPPFLAGS'
3820 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3821 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3822 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3823 if test -n "$ac_tool_prefix"; then
3824   for ac_prog in $pgac_cc_list
3825   do
3826     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3827 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3829 $as_echo_n "checking for $ac_word... " >&6; }
3830 if ${ac_cv_prog_CC+:} false; then :
3831   $as_echo_n "(cached) " >&6
3832 else
3833   if test -n "$CC"; then
3834   ac_cv_prog_CC="$CC" # Let the user override the test.
3835 else
3836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3837 for as_dir in $PATH
3838 do
3839   IFS=$as_save_IFS
3840   test -z "$as_dir" && as_dir=.
3841     for ac_exec_ext in '' $ac_executable_extensions; do
3842   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3843     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3845     break 2
3846   fi
3847 done
3848   done
3849 IFS=$as_save_IFS
3850
3851 fi
3852 fi
3853 CC=$ac_cv_prog_CC
3854 if test -n "$CC"; then
3855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3856 $as_echo "$CC" >&6; }
3857 else
3858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3859 $as_echo "no" >&6; }
3860 fi
3861
3862
3863     test -n "$CC" && break
3864   done
3865 fi
3866 if test -z "$CC"; then
3867   ac_ct_CC=$CC
3868   for ac_prog in $pgac_cc_list
3869 do
3870   # Extract the first word of "$ac_prog", so it can be a program name with args.
3871 set dummy $ac_prog; ac_word=$2
3872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3873 $as_echo_n "checking for $ac_word... " >&6; }
3874 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3875   $as_echo_n "(cached) " >&6
3876 else
3877   if test -n "$ac_ct_CC"; then
3878   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3879 else
3880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3881 for as_dir in $PATH
3882 do
3883   IFS=$as_save_IFS
3884   test -z "$as_dir" && as_dir=.
3885     for ac_exec_ext in '' $ac_executable_extensions; do
3886   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3887     ac_cv_prog_ac_ct_CC="$ac_prog"
3888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3889     break 2
3890   fi
3891 done
3892   done
3893 IFS=$as_save_IFS
3894
3895 fi
3896 fi
3897 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3898 if test -n "$ac_ct_CC"; then
3899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3900 $as_echo "$ac_ct_CC" >&6; }
3901 else
3902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3903 $as_echo "no" >&6; }
3904 fi
3905
3906
3907   test -n "$ac_ct_CC" && break
3908 done
3909
3910   if test "x$ac_ct_CC" = x; then
3911     CC=""
3912   else
3913     case $cross_compiling:$ac_tool_warned in
3914 yes:)
3915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3916 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3917 ac_tool_warned=yes ;;
3918 esac
3919     CC=$ac_ct_CC
3920   fi
3921 fi
3922
3923
3924 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3925 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3926 as_fn_error $? "no acceptable C compiler found in \$PATH
3927 See \`config.log' for more details" "$LINENO" 5; }
3928
3929 # Provide some information about the compiler.
3930 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3931 set X $ac_compile
3932 ac_compiler=$2
3933 for ac_option in --version -v -V -qversion; do
3934   { { ac_try="$ac_compiler $ac_option >&5"
3935 case "(($ac_try" in
3936   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3937   *) ac_try_echo=$ac_try;;
3938 esac
3939 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3940 $as_echo "$ac_try_echo"; } >&5
3941   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3942   ac_status=$?
3943   if test -s conftest.err; then
3944     sed '10a\
3945 ... rest of stderr output deleted ...
3946          10q' conftest.err >conftest.er1
3947     cat conftest.er1 >&5
3948   fi
3949   rm -f conftest.er1 conftest.err
3950   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3951   test $ac_status = 0; }
3952 done
3953
3954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3955 /* end confdefs.h.  */
3956
3957 int
3958 main ()
3959 {
3960
3961   ;
3962   return 0;
3963 }
3964 _ACEOF
3965 ac_clean_files_save=$ac_clean_files
3966 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3967 # Try to create an executable without -o first, disregard a.out.
3968 # It will help us diagnose broken compilers, and finding out an intuition
3969 # of exeext.
3970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3971 $as_echo_n "checking whether the C compiler works... " >&6; }
3972 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3973
3974 # The possible output files:
3975 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3976
3977 ac_rmfiles=
3978 for ac_file in $ac_files
3979 do
3980   case $ac_file in
3981     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3982     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3983   esac
3984 done
3985 rm -f $ac_rmfiles
3986
3987 if { { ac_try="$ac_link_default"
3988 case "(($ac_try" in
3989   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3990   *) ac_try_echo=$ac_try;;
3991 esac
3992 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3993 $as_echo "$ac_try_echo"; } >&5
3994   (eval "$ac_link_default") 2>&5
3995   ac_status=$?
3996   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3997   test $ac_status = 0; }; then :
3998   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3999 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4000 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4001 # so that the user can short-circuit this test for compilers unknown to
4002 # Autoconf.
4003 for ac_file in $ac_files ''
4004 do
4005   test -f "$ac_file" || continue
4006   case $ac_file in
4007     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4008         ;;
4009     [ab].out )
4010         # We found the default executable, but exeext='' is most
4011         # certainly right.
4012         break;;
4013     *.* )
4014         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4015         then :; else
4016            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4017         fi
4018         # We set ac_cv_exeext here because the later test for it is not
4019         # safe: cross compilers may not add the suffix if given an `-o'
4020         # argument, so we may need to know it at that point already.
4021         # Even if this section looks crufty: it has the advantage of
4022         # actually working.
4023         break;;
4024     * )
4025         break;;
4026   esac
4027 done
4028 test "$ac_cv_exeext" = no && ac_cv_exeext=
4029
4030 else
4031   ac_file=''
4032 fi
4033 if test -z "$ac_file"; then :
4034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4035 $as_echo "no" >&6; }
4036 $as_echo "$as_me: failed program was:" >&5
4037 sed 's/^/| /' conftest.$ac_ext >&5
4038
4039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4040 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4041 as_fn_error 77 "C compiler cannot create executables
4042 See \`config.log' for more details" "$LINENO" 5; }
4043 else
4044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4045 $as_echo "yes" >&6; }
4046 fi
4047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4048 $as_echo_n "checking for C compiler default output file name... " >&6; }
4049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4050 $as_echo "$ac_file" >&6; }
4051 ac_exeext=$ac_cv_exeext
4052
4053 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4054 ac_clean_files=$ac_clean_files_save
4055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4056 $as_echo_n "checking for suffix of executables... " >&6; }
4057 if { { ac_try="$ac_link"
4058 case "(($ac_try" in
4059   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4060   *) ac_try_echo=$ac_try;;
4061 esac
4062 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4063 $as_echo "$ac_try_echo"; } >&5
4064   (eval "$ac_link") 2>&5
4065   ac_status=$?
4066   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4067   test $ac_status = 0; }; then :
4068   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4069 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4070 # work properly (i.e., refer to `conftest.exe'), while it won't with
4071 # `rm'.
4072 for ac_file in conftest.exe conftest conftest.*; do
4073   test -f "$ac_file" || continue
4074   case $ac_file in
4075     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4076     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4077           break;;
4078     * ) break;;
4079   esac
4080 done
4081 else
4082   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4083 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4084 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4085 See \`config.log' for more details" "$LINENO" 5; }
4086 fi
4087 rm -f conftest conftest$ac_cv_exeext
4088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4089 $as_echo "$ac_cv_exeext" >&6; }
4090
4091 rm -f conftest.$ac_ext
4092 EXEEXT=$ac_cv_exeext
4093 ac_exeext=$EXEEXT
4094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4095 /* end confdefs.h.  */
4096 #include <stdio.h>
4097 int
4098 main ()
4099 {
4100 FILE *f = fopen ("conftest.out", "w");
4101  return ferror (f) || fclose (f) != 0;
4102
4103   ;
4104   return 0;
4105 }
4106 _ACEOF
4107 ac_clean_files="$ac_clean_files conftest.out"
4108 # Check that the compiler produces executables we can run.  If not, either
4109 # the compiler is broken, or we cross compile.
4110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4111 $as_echo_n "checking whether we are cross compiling... " >&6; }
4112 if test "$cross_compiling" != yes; then
4113   { { ac_try="$ac_link"
4114 case "(($ac_try" in
4115   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4116   *) ac_try_echo=$ac_try;;
4117 esac
4118 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4119 $as_echo "$ac_try_echo"; } >&5
4120   (eval "$ac_link") 2>&5
4121   ac_status=$?
4122   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4123   test $ac_status = 0; }
4124   if { ac_try='./conftest$ac_cv_exeext'
4125   { { case "(($ac_try" in
4126   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4127   *) ac_try_echo=$ac_try;;
4128 esac
4129 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4130 $as_echo "$ac_try_echo"; } >&5
4131   (eval "$ac_try") 2>&5
4132   ac_status=$?
4133   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4134   test $ac_status = 0; }; }; then
4135     cross_compiling=no
4136   else
4137     if test "$cross_compiling" = maybe; then
4138         cross_compiling=yes
4139     else
4140         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4141 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4142 as_fn_error $? "cannot run C compiled programs.
4143 If you meant to cross compile, use \`--host'.
4144 See \`config.log' for more details" "$LINENO" 5; }
4145     fi
4146   fi
4147 fi
4148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4149 $as_echo "$cross_compiling" >&6; }
4150
4151 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4152 ac_clean_files=$ac_clean_files_save
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4154 $as_echo_n "checking for suffix of object files... " >&6; }
4155 if ${ac_cv_objext+:} false; then :
4156   $as_echo_n "(cached) " >&6
4157 else
4158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4159 /* end confdefs.h.  */
4160
4161 int
4162 main ()
4163 {
4164
4165   ;
4166   return 0;
4167 }
4168 _ACEOF
4169 rm -f conftest.o conftest.obj
4170 if { { ac_try="$ac_compile"
4171 case "(($ac_try" in
4172   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4173   *) ac_try_echo=$ac_try;;
4174 esac
4175 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4176 $as_echo "$ac_try_echo"; } >&5
4177   (eval "$ac_compile") 2>&5
4178   ac_status=$?
4179   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4180   test $ac_status = 0; }; then :
4181   for ac_file in conftest.o conftest.obj conftest.*; do
4182   test -f "$ac_file" || continue;
4183   case $ac_file in
4184     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4185     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4186        break;;
4187   esac
4188 done
4189 else
4190   $as_echo "$as_me: failed program was:" >&5
4191 sed 's/^/| /' conftest.$ac_ext >&5
4192
4193 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4194 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4195 as_fn_error $? "cannot compute suffix of object files: cannot compile
4196 See \`config.log' for more details" "$LINENO" 5; }
4197 fi
4198 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4199 fi
4200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4201 $as_echo "$ac_cv_objext" >&6; }
4202 OBJEXT=$ac_cv_objext
4203 ac_objext=$OBJEXT
4204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4205 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4206 if ${ac_cv_c_compiler_gnu+:} false; then :
4207   $as_echo_n "(cached) " >&6
4208 else
4209   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4210 /* end confdefs.h.  */
4211
4212 int
4213 main ()
4214 {
4215 #ifndef __GNUC__
4216        choke me
4217 #endif
4218
4219   ;
4220   return 0;
4221 }
4222 _ACEOF
4223 if ac_fn_c_try_compile "$LINENO"; then :
4224   ac_compiler_gnu=yes
4225 else
4226   ac_compiler_gnu=no
4227 fi
4228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4229 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4230
4231 fi
4232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4233 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4234 if test $ac_compiler_gnu = yes; then
4235   GCC=yes
4236 else
4237   GCC=
4238 fi
4239 ac_test_CFLAGS=${CFLAGS+set}
4240 ac_save_CFLAGS=$CFLAGS
4241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4242 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4243 if ${ac_cv_prog_cc_g+:} false; then :
4244   $as_echo_n "(cached) " >&6
4245 else
4246   ac_save_c_werror_flag=$ac_c_werror_flag
4247    ac_c_werror_flag=yes
4248    ac_cv_prog_cc_g=no
4249    CFLAGS="-g"
4250    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4251 /* end confdefs.h.  */
4252
4253 int
4254 main ()
4255 {
4256
4257   ;
4258   return 0;
4259 }
4260 _ACEOF
4261 if ac_fn_c_try_compile "$LINENO"; then :
4262   ac_cv_prog_cc_g=yes
4263 else
4264   CFLAGS=""
4265       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4266 /* end confdefs.h.  */
4267
4268 int
4269 main ()
4270 {
4271
4272   ;
4273   return 0;
4274 }
4275 _ACEOF
4276 if ac_fn_c_try_compile "$LINENO"; then :
4277
4278 else
4279   ac_c_werror_flag=$ac_save_c_werror_flag
4280          CFLAGS="-g"
4281          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4282 /* end confdefs.h.  */
4283
4284 int
4285 main ()
4286 {
4287
4288   ;
4289   return 0;
4290 }
4291 _ACEOF
4292 if ac_fn_c_try_compile "$LINENO"; then :
4293   ac_cv_prog_cc_g=yes
4294 fi
4295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4296 fi
4297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4298 fi
4299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4300    ac_c_werror_flag=$ac_save_c_werror_flag
4301 fi
4302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4303 $as_echo "$ac_cv_prog_cc_g" >&6; }
4304 if test "$ac_test_CFLAGS" = set; then
4305   CFLAGS=$ac_save_CFLAGS
4306 elif test $ac_cv_prog_cc_g = yes; then
4307   if test "$GCC" = yes; then
4308     CFLAGS="-g -O2"
4309   else
4310     CFLAGS="-g"
4311   fi
4312 else
4313   if test "$GCC" = yes; then
4314     CFLAGS="-O2"
4315   else
4316     CFLAGS=
4317   fi
4318 fi
4319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4320 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4321 if ${ac_cv_prog_cc_c89+:} false; then :
4322   $as_echo_n "(cached) " >&6
4323 else
4324   ac_cv_prog_cc_c89=no
4325 ac_save_CC=$CC
4326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4327 /* end confdefs.h.  */
4328 #include <stdarg.h>
4329 #include <stdio.h>
4330 struct stat;
4331 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4332 struct buf { int x; };
4333 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4334 static char *e (p, i)
4335      char **p;
4336      int i;
4337 {
4338   return p[i];
4339 }
4340 static char *f (char * (*g) (char **, int), char **p, ...)
4341 {
4342   char *s;
4343   va_list v;
4344   va_start (v,p);
4345   s = g (p, va_arg (v,int));
4346   va_end (v);
4347   return s;
4348 }
4349
4350 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4351    function prototypes and stuff, but not '\xHH' hex character constants.
4352    These don't provoke an error unfortunately, instead are silently treated
4353    as 'x'.  The following induces an error, until -std is added to get
4354    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4355    array size at least.  It's necessary to write '\x00'==0 to get something
4356    that's true only with -std.  */
4357 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4358
4359 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4360    inside strings and character constants.  */
4361 #define FOO(x) 'x'
4362 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4363
4364 int test (int i, double x);
4365 struct s1 {int (*f) (int a);};
4366 struct s2 {int (*f) (double a);};
4367 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4368 int argc;
4369 char **argv;
4370 int
4371 main ()
4372 {
4373 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4374   ;
4375   return 0;
4376 }
4377 _ACEOF
4378 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4379         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4380 do
4381   CC="$ac_save_CC $ac_arg"
4382   if ac_fn_c_try_compile "$LINENO"; then :
4383   ac_cv_prog_cc_c89=$ac_arg
4384 fi
4385 rm -f core conftest.err conftest.$ac_objext
4386   test "x$ac_cv_prog_cc_c89" != "xno" && break
4387 done
4388 rm -f conftest.$ac_ext
4389 CC=$ac_save_CC
4390
4391 fi
4392 # AC_CACHE_VAL
4393 case "x$ac_cv_prog_cc_c89" in
4394   x)
4395     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4396 $as_echo "none needed" >&6; } ;;
4397   xno)
4398     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4399 $as_echo "unsupported" >&6; } ;;
4400   *)
4401     CC="$CC $ac_cv_prog_cc_c89"
4402     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4403 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4404 esac
4405 if test "x$ac_cv_prog_cc_c89" != xno; then :
4406
4407 fi
4408
4409 ac_ext=c
4410 ac_cpp='$CPP $CPPFLAGS'
4411 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4412 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4413 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4414
4415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4416 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4417 if ${ac_cv_prog_cc_c99+:} false; then :
4418   $as_echo_n "(cached) " >&6
4419 else
4420   ac_cv_prog_cc_c99=no
4421 ac_save_CC=$CC
4422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4423 /* end confdefs.h.  */
4424 #include <stdarg.h>
4425 #include <stdbool.h>
4426 #include <stdlib.h>
4427 #include <wchar.h>
4428 #include <stdio.h>
4429
4430 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4431 #define debug(...) fprintf (stderr, __VA_ARGS__)
4432 #define showlist(...) puts (#__VA_ARGS__)
4433 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4434 static void
4435 test_varargs_macros (void)
4436 {
4437   int x = 1234;
4438   int y = 5678;
4439   debug ("Flag");
4440   debug ("X = %d\n", x);
4441   showlist (The first, second, and third items.);
4442   report (x>y, "x is %d but y is %d", x, y);
4443 }
4444
4445 // Check long long types.
4446 #define BIG64 18446744073709551615ull
4447 #define BIG32 4294967295ul
4448 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4449 #if !BIG_OK
4450   your preprocessor is broken;
4451 #endif
4452 #if BIG_OK
4453 #else
4454   your preprocessor is broken;
4455 #endif
4456 static long long int bignum = -9223372036854775807LL;
4457 static unsigned long long int ubignum = BIG64;
4458
4459 struct incomplete_array
4460 {
4461   int datasize;
4462   double data[];
4463 };
4464
4465 struct named_init {
4466   int number;
4467   const wchar_t *name;
4468   double average;
4469 };
4470
4471 typedef const char *ccp;
4472
4473 static inline int
4474 test_restrict (ccp restrict text)
4475 {
4476   // See if C++-style comments work.
4477   // Iterate through items via the restricted pointer.
4478   // Also check for declarations in for loops.
4479   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4480     continue;
4481   return 0;
4482 }
4483
4484 // Check varargs and va_copy.
4485 static void
4486 test_varargs (const char *format, ...)
4487 {
4488   va_list args;
4489   va_start (args, format);
4490   va_list args_copy;
4491   va_copy (args_copy, args);
4492
4493   const char *str;
4494   int number;
4495   float fnumber;
4496
4497   while (*format)
4498     {
4499       switch (*format++)
4500         {
4501         case 's': // string
4502           str = va_arg (args_copy, const char *);
4503           break;
4504         case 'd': // int
4505           number = va_arg (args_copy, int);
4506           break;
4507         case 'f': // float
4508           fnumber = va_arg (args_copy, double);
4509           break;
4510         default:
4511           break;
4512         }
4513     }
4514   va_end (args_copy);
4515   va_end (args);
4516 }
4517
4518 int
4519 main ()
4520 {
4521
4522   // Check bool.
4523   _Bool success = false;
4524
4525   // Check restrict.
4526   if (test_restrict ("String literal") == 0)
4527     success = true;
4528   char *restrict newvar = "Another string";
4529
4530   // Check varargs.
4531   test_varargs ("s, d' f .", "string", 65, 34.234);
4532   test_varargs_macros ();
4533
4534   // Check flexible array members.
4535   struct incomplete_array *ia =
4536     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4537   ia->datasize = 10;
4538   for (int i = 0; i < ia->datasize; ++i)
4539     ia->data[i] = i * 1.234;
4540
4541   // Check named initializers.
4542   struct named_init ni = {
4543     .number = 34,
4544     .name = L"Test wide string",
4545     .average = 543.34343,
4546   };
4547
4548   ni.number = 58;
4549
4550   int dynamic_array[ni.number];
4551   dynamic_array[ni.number - 1] = 543;
4552
4553   // work around unused variable warnings
4554   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4555           || dynamic_array[ni.number - 1] != 543);
4556
4557   ;
4558   return 0;
4559 }
4560 _ACEOF
4561 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4562 do
4563   CC="$ac_save_CC $ac_arg"
4564   if ac_fn_c_try_compile "$LINENO"; then :
4565   ac_cv_prog_cc_c99=$ac_arg
4566 fi
4567 rm -f core conftest.err conftest.$ac_objext
4568   test "x$ac_cv_prog_cc_c99" != "xno" && break
4569 done
4570 rm -f conftest.$ac_ext
4571 CC=$ac_save_CC
4572
4573 fi
4574 # AC_CACHE_VAL
4575 case "x$ac_cv_prog_cc_c99" in
4576   x)
4577     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4578 $as_echo "none needed" >&6; } ;;
4579   xno)
4580     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4581 $as_echo "unsupported" >&6; } ;;
4582   *)
4583     CC="$CC $ac_cv_prog_cc_c99"
4584     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4585 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4586 esac
4587 if test "x$ac_cv_prog_cc_c99" != xno; then :
4588
4589 fi
4590
4591
4592
4593 # Error out if the compiler does not support C99, as the codebase
4594 # relies on that.
4595 if test "$ac_cv_prog_cc_c99" = no; then
4596     as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4597 fi
4598
4599 ac_ext=cpp
4600 ac_cpp='$CXXCPP $CPPFLAGS'
4601 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4602 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4603 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4604 if test -z "$CXX"; then
4605   if test -n "$CCC"; then
4606     CXX=$CCC
4607   else
4608     if test -n "$ac_tool_prefix"; then
4609   for ac_prog in $pgac_cxx_list
4610   do
4611     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4612 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4614 $as_echo_n "checking for $ac_word... " >&6; }
4615 if ${ac_cv_prog_CXX+:} false; then :
4616   $as_echo_n "(cached) " >&6
4617 else
4618   if test -n "$CXX"; then
4619   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4620 else
4621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622 for as_dir in $PATH
4623 do
4624   IFS=$as_save_IFS
4625   test -z "$as_dir" && as_dir=.
4626     for ac_exec_ext in '' $ac_executable_extensions; do
4627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4628     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4630     break 2
4631   fi
4632 done
4633   done
4634 IFS=$as_save_IFS
4635
4636 fi
4637 fi
4638 CXX=$ac_cv_prog_CXX
4639 if test -n "$CXX"; then
4640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4641 $as_echo "$CXX" >&6; }
4642 else
4643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4644 $as_echo "no" >&6; }
4645 fi
4646
4647
4648     test -n "$CXX" && break
4649   done
4650 fi
4651 if test -z "$CXX"; then
4652   ac_ct_CXX=$CXX
4653   for ac_prog in $pgac_cxx_list
4654 do
4655   # Extract the first word of "$ac_prog", so it can be a program name with args.
4656 set dummy $ac_prog; ac_word=$2
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4658 $as_echo_n "checking for $ac_word... " >&6; }
4659 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4660   $as_echo_n "(cached) " >&6
4661 else
4662   if test -n "$ac_ct_CXX"; then
4663   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4664 else
4665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4666 for as_dir in $PATH
4667 do
4668   IFS=$as_save_IFS
4669   test -z "$as_dir" && as_dir=.
4670     for ac_exec_ext in '' $ac_executable_extensions; do
4671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4672     ac_cv_prog_ac_ct_CXX="$ac_prog"
4673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4674     break 2
4675   fi
4676 done
4677   done
4678 IFS=$as_save_IFS
4679
4680 fi
4681 fi
4682 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4683 if test -n "$ac_ct_CXX"; then
4684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4685 $as_echo "$ac_ct_CXX" >&6; }
4686 else
4687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4688 $as_echo "no" >&6; }
4689 fi
4690
4691
4692   test -n "$ac_ct_CXX" && break
4693 done
4694
4695   if test "x$ac_ct_CXX" = x; then
4696     CXX="g++"
4697   else
4698     case $cross_compiling:$ac_tool_warned in
4699 yes:)
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4701 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4702 ac_tool_warned=yes ;;
4703 esac
4704     CXX=$ac_ct_CXX
4705   fi
4706 fi
4707
4708   fi
4709 fi
4710 # Provide some information about the compiler.
4711 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4712 set X $ac_compile
4713 ac_compiler=$2
4714 for ac_option in --version -v -V -qversion; do
4715   { { ac_try="$ac_compiler $ac_option >&5"
4716 case "(($ac_try" in
4717   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4718   *) ac_try_echo=$ac_try;;
4719 esac
4720 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4721 $as_echo "$ac_try_echo"; } >&5
4722   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4723   ac_status=$?
4724   if test -s conftest.err; then
4725     sed '10a\
4726 ... rest of stderr output deleted ...
4727          10q' conftest.err >conftest.er1
4728     cat conftest.er1 >&5
4729   fi
4730   rm -f conftest.er1 conftest.err
4731   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4732   test $ac_status = 0; }
4733 done
4734
4735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4736 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4737 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4738   $as_echo_n "(cached) " >&6
4739 else
4740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4741 /* end confdefs.h.  */
4742
4743 int
4744 main ()
4745 {
4746 #ifndef __GNUC__
4747        choke me
4748 #endif
4749
4750   ;
4751   return 0;
4752 }
4753 _ACEOF
4754 if ac_fn_cxx_try_compile "$LINENO"; then :
4755   ac_compiler_gnu=yes
4756 else
4757   ac_compiler_gnu=no
4758 fi
4759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4760 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4761
4762 fi
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4764 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4765 if test $ac_compiler_gnu = yes; then
4766   GXX=yes
4767 else
4768   GXX=
4769 fi
4770 ac_test_CXXFLAGS=${CXXFLAGS+set}
4771 ac_save_CXXFLAGS=$CXXFLAGS
4772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4773 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4774 if ${ac_cv_prog_cxx_g+:} false; then :
4775   $as_echo_n "(cached) " >&6
4776 else
4777   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4778    ac_cxx_werror_flag=yes
4779    ac_cv_prog_cxx_g=no
4780    CXXFLAGS="-g"
4781    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4782 /* end confdefs.h.  */
4783
4784 int
4785 main ()
4786 {
4787
4788   ;
4789   return 0;
4790 }
4791 _ACEOF
4792 if ac_fn_cxx_try_compile "$LINENO"; then :
4793   ac_cv_prog_cxx_g=yes
4794 else
4795   CXXFLAGS=""
4796       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4797 /* end confdefs.h.  */
4798
4799 int
4800 main ()
4801 {
4802
4803   ;
4804   return 0;
4805 }
4806 _ACEOF
4807 if ac_fn_cxx_try_compile "$LINENO"; then :
4808
4809 else
4810   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4811          CXXFLAGS="-g"
4812          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4813 /* end confdefs.h.  */
4814
4815 int
4816 main ()
4817 {
4818
4819   ;
4820   return 0;
4821 }
4822 _ACEOF
4823 if ac_fn_cxx_try_compile "$LINENO"; then :
4824   ac_cv_prog_cxx_g=yes
4825 fi
4826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4827 fi
4828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4829 fi
4830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4831    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4832 fi
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4834 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4835 if test "$ac_test_CXXFLAGS" = set; then
4836   CXXFLAGS=$ac_save_CXXFLAGS
4837 elif test $ac_cv_prog_cxx_g = yes; then
4838   if test "$GXX" = yes; then
4839     CXXFLAGS="-g -O2"
4840   else
4841     CXXFLAGS="-g"
4842   fi
4843 else
4844   if test "$GXX" = yes; then
4845     CXXFLAGS="-O2"
4846   else
4847     CXXFLAGS=
4848   fi
4849 fi
4850 ac_ext=c
4851 ac_cpp='$CPP $CPPFLAGS'
4852 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4853 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4854 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4855
4856
4857 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4858 # but has idiosyncrasies of its own.  We assume icc will define
4859 # __INTEL_COMPILER regardless of CFLAGS.
4860
4861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4862 /* end confdefs.h.  */
4863
4864 int
4865 main ()
4866 {
4867 #ifndef __INTEL_COMPILER
4868 choke me
4869 #endif
4870   ;
4871   return 0;
4872 }
4873 _ACEOF
4874 if ac_fn_c_try_compile "$LINENO"; then :
4875   ICC=yes
4876 else
4877   ICC=no
4878 fi
4879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4880
4881 # Check if it's Sun Studio compiler. We assume that
4882 # __SUNPRO_C will be defined for Sun Studio compilers
4883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4884 /* end confdefs.h.  */
4885
4886 int
4887 main ()
4888 {
4889 #ifndef __SUNPRO_C
4890 choke me
4891 #endif
4892   ;
4893   return 0;
4894 }
4895 _ACEOF
4896 if ac_fn_c_try_compile "$LINENO"; then :
4897   SUN_STUDIO_CC=yes
4898 else
4899   SUN_STUDIO_CC=no
4900 fi
4901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4902
4903
4904
4905
4906 #
4907 # LLVM
4908 #
4909 # Checked early because subsequent tests depend on it.
4910
4911
4912
4913 # Check whether --with-llvm was given.
4914 if test "${with_llvm+set}" = set; then :
4915   withval=$with_llvm;
4916   case $withval in
4917     yes)
4918
4919 $as_echo "#define USE_LLVM 1" >>confdefs.h
4920
4921       ;;
4922     no)
4923       :
4924       ;;
4925     *)
4926       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4927       ;;
4928   esac
4929
4930 else
4931   with_llvm=no
4932
4933 fi
4934
4935
4936
4937 for ac_prog in gawk mawk nawk awk
4938 do
4939   # Extract the first word of "$ac_prog", so it can be a program name with args.
4940 set dummy $ac_prog; ac_word=$2
4941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4942 $as_echo_n "checking for $ac_word... " >&6; }
4943 if ${ac_cv_prog_AWK+:} false; then :
4944   $as_echo_n "(cached) " >&6
4945 else
4946   if test -n "$AWK"; then
4947   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4948 else
4949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4950 for as_dir in $PATH
4951 do
4952   IFS=$as_save_IFS
4953   test -z "$as_dir" && as_dir=.
4954     for ac_exec_ext in '' $ac_executable_extensions; do
4955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4956     ac_cv_prog_AWK="$ac_prog"
4957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4958     break 2
4959   fi
4960 done
4961   done
4962 IFS=$as_save_IFS
4963
4964 fi
4965 fi
4966 AWK=$ac_cv_prog_AWK
4967 if test -n "$AWK"; then
4968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4969 $as_echo "$AWK" >&6; }
4970 else
4971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4972 $as_echo "no" >&6; }
4973 fi
4974
4975
4976   test -n "$AWK" && break
4977 done
4978
4979 if test "$with_llvm" = yes; then :
4980
4981
4982
4983
4984
4985   if test -z "$LLVM_CONFIG"; then
4986   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
4987 do
4988   # Extract the first word of "$ac_prog", so it can be a program name with args.
4989 set dummy $ac_prog; ac_word=$2
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4991 $as_echo_n "checking for $ac_word... " >&6; }
4992 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4993   $as_echo_n "(cached) " >&6
4994 else
4995   case $LLVM_CONFIG in
4996   [\\/]* | ?:[\\/]*)
4997   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
4998   ;;
4999   *)
5000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001 for as_dir in $PATH
5002 do
5003   IFS=$as_save_IFS
5004   test -z "$as_dir" && as_dir=.
5005     for ac_exec_ext in '' $ac_executable_extensions; do
5006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5007     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5009     break 2
5010   fi
5011 done
5012   done
5013 IFS=$as_save_IFS
5014
5015   ;;
5016 esac
5017 fi
5018 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5019 if test -n "$LLVM_CONFIG"; then
5020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5021 $as_echo "$LLVM_CONFIG" >&6; }
5022 else
5023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5024 $as_echo "no" >&6; }
5025 fi
5026
5027
5028   test -n "$LLVM_CONFIG" && break
5029 done
5030
5031 else
5032   # Report the value of LLVM_CONFIG in configure's output in all cases.
5033   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5034 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5036 $as_echo "$LLVM_CONFIG" >&6; }
5037 fi
5038
5039
5040   # no point continuing if llvm wasn't found
5041   if test -z "$LLVM_CONFIG"; then
5042     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5043   fi
5044   # check if detected $LLVM_CONFIG is executable
5045   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5046   if test "x$pgac_llvm_version" = "xno"; then
5047     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5048   fi
5049   # and whether the version is supported
5050   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5051     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5052   fi
5053
5054   # need clang to create some bitcode files
5055
5056   if test -z "$CLANG"; then
5057   for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5058 do
5059   # Extract the first word of "$ac_prog", so it can be a program name with args.
5060 set dummy $ac_prog; ac_word=$2
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062 $as_echo_n "checking for $ac_word... " >&6; }
5063 if ${ac_cv_path_CLANG+:} false; then :
5064   $as_echo_n "(cached) " >&6
5065 else
5066   case $CLANG in
5067   [\\/]* | ?:[\\/]*)
5068   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5069   ;;
5070   *)
5071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5072 for as_dir in $PATH
5073 do
5074   IFS=$as_save_IFS
5075   test -z "$as_dir" && as_dir=.
5076     for ac_exec_ext in '' $ac_executable_extensions; do
5077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5078     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5080     break 2
5081   fi
5082 done
5083   done
5084 IFS=$as_save_IFS
5085
5086   ;;
5087 esac
5088 fi
5089 CLANG=$ac_cv_path_CLANG
5090 if test -n "$CLANG"; then
5091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5092 $as_echo "$CLANG" >&6; }
5093 else
5094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5095 $as_echo "no" >&6; }
5096 fi
5097
5098
5099   test -n "$CLANG" && break
5100 done
5101
5102 else
5103   # Report the value of CLANG in configure's output in all cases.
5104   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5105 $as_echo_n "checking for CLANG... " >&6; }
5106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5107 $as_echo "$CLANG" >&6; }
5108 fi
5109
5110   if test -z "$CLANG"; then
5111     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5112   fi
5113   # make sure clang is executable
5114   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5115     as_fn_error $? "$CLANG does not work" "$LINENO" 5
5116   fi
5117   # Could check clang version, but it doesn't seem that
5118   # important. Systems with a new enough LLVM version are usually
5119   # going to have a decent clang version too. It's also not entirely
5120   # clear what the minimum version is.
5121
5122   # Collect compiler flags necessary to build the LLVM dependent
5123   # shared library.
5124   for pgac_option in `$LLVM_CONFIG --cppflags`; do
5125     case $pgac_option in
5126       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5127     esac
5128   done
5129
5130   for pgac_option in `$LLVM_CONFIG --ldflags`; do
5131     case $pgac_option in
5132       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5133     esac
5134   done
5135
5136   # ABI influencing options, standard influencing options
5137   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5138     case $pgac_option in
5139       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5140       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5141     esac
5142   done
5143
5144   # Look for components we're interested in, collect necessary
5145   # libs. As some components are optional, we can't just list all of
5146   # them as it'd raise an error.
5147   pgac_components='';
5148   for pgac_component in `$LLVM_CONFIG --components`; do
5149     case $pgac_component in
5150       engine) pgac_components="$pgac_components $pgac_component";;
5151       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5152       orcjit) pgac_components="$pgac_components $pgac_component";;
5153       passes) pgac_components="$pgac_components $pgac_component";;
5154       perfjitevents) pgac_components="$pgac_components $pgac_component";;
5155     esac
5156   done;
5157
5158   # And then get the libraries that need to be linked in for the
5159   # selected components.  They're large libraries, we only want to
5160   # link them into the LLVM using shared library.
5161   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5162     case $pgac_option in
5163       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5164     esac
5165   done
5166
5167   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177 fi # fi
5178
5179
5180 unset CFLAGS
5181 unset CXXFLAGS
5182
5183 #
5184 # Read the template
5185 #
5186 . "$srcdir/src/template/$template" || exit
5187
5188 # C[XX]FLAGS are selected so:
5189 # If the user specifies something in the environment, that is used.
5190 # else:  If the template file set something, that is used.
5191 # else:  If coverage was enabled, don't set anything.
5192 # else:  If the compiler is GCC, then we use -O2.
5193 # else:  If the compiler is something else, then we use -O, unless debugging.
5194
5195 if test "$ac_env_CFLAGS_set" = set; then
5196   CFLAGS=$ac_env_CFLAGS_value
5197 elif test "${CFLAGS+set}" = set; then
5198   : # (keep what template set)
5199 elif test "$enable_coverage" = yes; then
5200   : # no optimization by default
5201 elif test "$GCC" = yes; then
5202   CFLAGS="-O2"
5203 else
5204   # if the user selected debug mode, don't use -O
5205   if test "$enable_debug" != yes; then
5206     CFLAGS="-O"
5207   fi
5208 fi
5209
5210 if test "$ac_env_CXXFLAGS_set" = set; then
5211   CXXFLAGS=$ac_env_CXXFLAGS_value
5212 elif test "${CXXFLAGS+set}" = set; then
5213   : # (keep what template set)
5214 elif test "$enable_coverage" = yes; then
5215   : # no optimization by default
5216 elif test "$GCC" = yes; then
5217   CXXFLAGS="-O2"
5218 else
5219   # if the user selected debug mode, don't use -O
5220   if test "$enable_debug" != yes; then
5221     CXXFLAGS="-O"
5222   fi
5223 fi
5224
5225 # When generating bitcode (for inlining) we always want to use -O2
5226 # even when --enable-debug is specified. The bitcode it's not going to
5227 # be used for line-by-line debugging, and JIT inlining doesn't work
5228 # without at least -O1 (otherwise clang will emit 'noinline'
5229 # attributes everywhere), which is bad for testing.  Still allow the
5230 # environment to override if done explicitly.
5231 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5232   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5233 else
5234   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5235 fi
5236 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5237   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5238 else
5239   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5240 fi
5241
5242 # C[XX]FLAGS we determined above will be added back at the end
5243 user_CFLAGS=$CFLAGS
5244 CFLAGS=""
5245 user_CXXFLAGS=$CXXFLAGS
5246 CXXFLAGS=""
5247 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5248 BITCODE_CFLAGS=""
5249 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5250 BITCODE_CXXFLAGS=""
5251
5252 # set CFLAGS_VECTOR from the environment, if available
5253 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5254   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5255 fi
5256
5257 # Some versions of GCC support some additional useful warning flags.
5258 # Check whether they are supported, and add them to CFLAGS if so.
5259 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5260 # but has its own.  Also check other compiler-specific flags here.
5261
5262 if test "$GCC" = yes -a "$ICC" = no; then
5263   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5264   CXXFLAGS="-Wall -Wpointer-arith"
5265   # These work in some but not all gcc versions
5266   save_CFLAGS=$CFLAGS
5267
5268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5269 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5270 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5271   $as_echo_n "(cached) " >&6
5272 else
5273   pgac_save_CFLAGS=$CFLAGS
5274 pgac_save_CC=$CC
5275 CC=${CC}
5276 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5277 ac_save_c_werror_flag=$ac_c_werror_flag
5278 ac_c_werror_flag=yes
5279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5280 /* end confdefs.h.  */
5281
5282 int
5283 main ()
5284 {
5285
5286   ;
5287   return 0;
5288 }
5289 _ACEOF
5290 if ac_fn_c_try_compile "$LINENO"; then :
5291   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5292 else
5293   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5294 fi
5295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5296 ac_c_werror_flag=$ac_save_c_werror_flag
5297 CFLAGS="$pgac_save_CFLAGS"
5298 CC="$pgac_save_CC"
5299 fi
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5301 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5302 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5303   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5304 fi
5305
5306
5307   # -Wdeclaration-after-statement isn't applicable for C++.  Specific C files
5308   # disable it, so AC_SUBST the negative form.
5309   PERMIT_DECLARATION_AFTER_STATEMENT=
5310   if test x"save_$CFLAGS" != x"$CFLAGS"; then
5311     PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5312   fi
5313
5314   # Really don't want VLAs to be used in our dialect of C
5315
5316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5317 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5318 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5319   $as_echo_n "(cached) " >&6
5320 else
5321   pgac_save_CFLAGS=$CFLAGS
5322 pgac_save_CC=$CC
5323 CC=${CC}
5324 CFLAGS="${CFLAGS} -Werror=vla"
5325 ac_save_c_werror_flag=$ac_c_werror_flag
5326 ac_c_werror_flag=yes
5327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5328 /* end confdefs.h.  */
5329
5330 int
5331 main ()
5332 {
5333
5334   ;
5335   return 0;
5336 }
5337 _ACEOF
5338 if ac_fn_c_try_compile "$LINENO"; then :
5339   pgac_cv_prog_CC_cflags__Werror_vla=yes
5340 else
5341   pgac_cv_prog_CC_cflags__Werror_vla=no
5342 fi
5343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5344 ac_c_werror_flag=$ac_save_c_werror_flag
5345 CFLAGS="$pgac_save_CFLAGS"
5346 CC="$pgac_save_CC"
5347 fi
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5349 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5350 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5351   CFLAGS="${CFLAGS} -Werror=vla"
5352 fi
5353
5354
5355   # -Wvla is not applicable for C++
5356
5357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5358 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5359 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5360   $as_echo_n "(cached) " >&6
5361 else
5362   pgac_save_CFLAGS=$CFLAGS
5363 pgac_save_CC=$CC
5364 CC=${CC}
5365 CFLAGS="${CFLAGS} -Wendif-labels"
5366 ac_save_c_werror_flag=$ac_c_werror_flag
5367 ac_c_werror_flag=yes
5368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5369 /* end confdefs.h.  */
5370
5371 int
5372 main ()
5373 {
5374
5375   ;
5376   return 0;
5377 }
5378 _ACEOF
5379 if ac_fn_c_try_compile "$LINENO"; then :
5380   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5381 else
5382   pgac_cv_prog_CC_cflags__Wendif_labels=no
5383 fi
5384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5385 ac_c_werror_flag=$ac_save_c_werror_flag
5386 CFLAGS="$pgac_save_CFLAGS"
5387 CC="$pgac_save_CC"
5388 fi
5389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5390 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5391 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5392   CFLAGS="${CFLAGS} -Wendif-labels"
5393 fi
5394
5395
5396   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5397 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5398 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5399   $as_echo_n "(cached) " >&6
5400 else
5401   pgac_save_CXXFLAGS=$CXXFLAGS
5402 pgac_save_CXX=$CXX
5403 CXX=${CXX}
5404 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5405 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5406 ac_cxx_werror_flag=yes
5407 ac_ext=cpp
5408 ac_cpp='$CXXCPP $CPPFLAGS'
5409 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5410 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5411 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5412
5413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5414 /* end confdefs.h.  */
5415
5416 int
5417 main ()
5418 {
5419
5420   ;
5421   return 0;
5422 }
5423 _ACEOF
5424 if ac_fn_cxx_try_compile "$LINENO"; then :
5425   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5426 else
5427   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5428 fi
5429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5430 ac_ext=c
5431 ac_cpp='$CPP $CPPFLAGS'
5432 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5433 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5434 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5435
5436 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5437 CXXFLAGS="$pgac_save_CXXFLAGS"
5438 CXX="$pgac_save_CXX"
5439 fi
5440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5441 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5442 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5443   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5444 fi
5445
5446
5447
5448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5449 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5450 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5451   $as_echo_n "(cached) " >&6
5452 else
5453   pgac_save_CFLAGS=$CFLAGS
5454 pgac_save_CC=$CC
5455 CC=${CC}
5456 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5457 ac_save_c_werror_flag=$ac_c_werror_flag
5458 ac_c_werror_flag=yes
5459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5460 /* end confdefs.h.  */
5461
5462 int
5463 main ()
5464 {
5465
5466   ;
5467   return 0;
5468 }
5469 _ACEOF
5470 if ac_fn_c_try_compile "$LINENO"; then :
5471   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5472 else
5473   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5474 fi
5475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476 ac_c_werror_flag=$ac_save_c_werror_flag
5477 CFLAGS="$pgac_save_CFLAGS"
5478 CC="$pgac_save_CC"
5479 fi
5480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5481 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5482 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5483   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5484 fi
5485
5486
5487   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5488 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5489 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5490   $as_echo_n "(cached) " >&6
5491 else
5492   pgac_save_CXXFLAGS=$CXXFLAGS
5493 pgac_save_CXX=$CXX
5494 CXX=${CXX}
5495 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5496 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5497 ac_cxx_werror_flag=yes
5498 ac_ext=cpp
5499 ac_cpp='$CXXCPP $CPPFLAGS'
5500 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5501 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5502 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5503
5504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5505 /* end confdefs.h.  */
5506
5507 int
5508 main ()
5509 {
5510
5511   ;
5512   return 0;
5513 }
5514 _ACEOF
5515 if ac_fn_cxx_try_compile "$LINENO"; then :
5516   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5517 else
5518   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5519 fi
5520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5521 ac_ext=c
5522 ac_cpp='$CPP $CPPFLAGS'
5523 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5524 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5525 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5526
5527 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5528 CXXFLAGS="$pgac_save_CXXFLAGS"
5529 CXX="$pgac_save_CXX"
5530 fi
5531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5532 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5533 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5534   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5535 fi
5536
5537
5538   # This was included in -Wall/-Wformat in older GCC versions
5539
5540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5541 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5542 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5543   $as_echo_n "(cached) " >&6
5544 else
5545   pgac_save_CFLAGS=$CFLAGS
5546 pgac_save_CC=$CC
5547 CC=${CC}
5548 CFLAGS="${CFLAGS} -Wformat-security"
5549 ac_save_c_werror_flag=$ac_c_werror_flag
5550 ac_c_werror_flag=yes
5551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5552 /* end confdefs.h.  */
5553
5554 int
5555 main ()
5556 {
5557
5558   ;
5559   return 0;
5560 }
5561 _ACEOF
5562 if ac_fn_c_try_compile "$LINENO"; then :
5563   pgac_cv_prog_CC_cflags__Wformat_security=yes
5564 else
5565   pgac_cv_prog_CC_cflags__Wformat_security=no
5566 fi
5567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5568 ac_c_werror_flag=$ac_save_c_werror_flag
5569 CFLAGS="$pgac_save_CFLAGS"
5570 CC="$pgac_save_CC"
5571 fi
5572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5573 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5574 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5575   CFLAGS="${CFLAGS} -Wformat-security"
5576 fi
5577
5578
5579   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5580 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5581 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5582   $as_echo_n "(cached) " >&6
5583 else
5584   pgac_save_CXXFLAGS=$CXXFLAGS
5585 pgac_save_CXX=$CXX
5586 CXX=${CXX}
5587 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5588 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5589 ac_cxx_werror_flag=yes
5590 ac_ext=cpp
5591 ac_cpp='$CXXCPP $CPPFLAGS'
5592 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5593 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5594 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5595
5596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5597 /* end confdefs.h.  */
5598
5599 int
5600 main ()
5601 {
5602
5603   ;
5604   return 0;
5605 }
5606 _ACEOF
5607 if ac_fn_cxx_try_compile "$LINENO"; then :
5608   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5609 else
5610   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5611 fi
5612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5613 ac_ext=c
5614 ac_cpp='$CPP $CPPFLAGS'
5615 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5616 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5617 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5618
5619 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5620 CXXFLAGS="$pgac_save_CXXFLAGS"
5621 CXX="$pgac_save_CXX"
5622 fi
5623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5624 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5625 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5626   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5627 fi
5628
5629
5630   # Disable strict-aliasing rules; needed for gcc 3.3+
5631
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5633 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5634 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5635   $as_echo_n "(cached) " >&6
5636 else
5637   pgac_save_CFLAGS=$CFLAGS
5638 pgac_save_CC=$CC
5639 CC=${CC}
5640 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5641 ac_save_c_werror_flag=$ac_c_werror_flag
5642 ac_c_werror_flag=yes
5643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5644 /* end confdefs.h.  */
5645
5646 int
5647 main ()
5648 {
5649
5650   ;
5651   return 0;
5652 }
5653 _ACEOF
5654 if ac_fn_c_try_compile "$LINENO"; then :
5655   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5656 else
5657   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5658 fi
5659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5660 ac_c_werror_flag=$ac_save_c_werror_flag
5661 CFLAGS="$pgac_save_CFLAGS"
5662 CC="$pgac_save_CC"
5663 fi
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5665 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5666 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5667   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5668 fi
5669
5670
5671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5672 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5673 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5674   $as_echo_n "(cached) " >&6
5675 else
5676   pgac_save_CXXFLAGS=$CXXFLAGS
5677 pgac_save_CXX=$CXX
5678 CXX=${CXX}
5679 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5680 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5681 ac_cxx_werror_flag=yes
5682 ac_ext=cpp
5683 ac_cpp='$CXXCPP $CPPFLAGS'
5684 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5685 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5686 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5687
5688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5689 /* end confdefs.h.  */
5690
5691 int
5692 main ()
5693 {
5694
5695   ;
5696   return 0;
5697 }
5698 _ACEOF
5699 if ac_fn_cxx_try_compile "$LINENO"; then :
5700   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5701 else
5702   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5703 fi
5704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5705 ac_ext=c
5706 ac_cpp='$CPP $CPPFLAGS'
5707 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5708 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5709 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5710
5711 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5712 CXXFLAGS="$pgac_save_CXXFLAGS"
5713 CXX="$pgac_save_CXX"
5714 fi
5715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5716 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5717 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5718   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5719 fi
5720
5721
5722   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5723
5724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5725 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5726 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5727   $as_echo_n "(cached) " >&6
5728 else
5729   pgac_save_CFLAGS=$CFLAGS
5730 pgac_save_CC=$CC
5731 CC=${CC}
5732 CFLAGS="${CFLAGS} -fwrapv"
5733 ac_save_c_werror_flag=$ac_c_werror_flag
5734 ac_c_werror_flag=yes
5735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5736 /* end confdefs.h.  */
5737
5738 int
5739 main ()
5740 {
5741
5742   ;
5743   return 0;
5744 }
5745 _ACEOF
5746 if ac_fn_c_try_compile "$LINENO"; then :
5747   pgac_cv_prog_CC_cflags__fwrapv=yes
5748 else
5749   pgac_cv_prog_CC_cflags__fwrapv=no
5750 fi
5751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5752 ac_c_werror_flag=$ac_save_c_werror_flag
5753 CFLAGS="$pgac_save_CFLAGS"
5754 CC="$pgac_save_CC"
5755 fi
5756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5757 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5758 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5759   CFLAGS="${CFLAGS} -fwrapv"
5760 fi
5761
5762
5763   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5764 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5765 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5766   $as_echo_n "(cached) " >&6
5767 else
5768   pgac_save_CXXFLAGS=$CXXFLAGS
5769 pgac_save_CXX=$CXX
5770 CXX=${CXX}
5771 CXXFLAGS="${CXXFLAGS} -fwrapv"
5772 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5773 ac_cxx_werror_flag=yes
5774 ac_ext=cpp
5775 ac_cpp='$CXXCPP $CPPFLAGS'
5776 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5777 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5778 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5779
5780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5781 /* end confdefs.h.  */
5782
5783 int
5784 main ()
5785 {
5786
5787   ;
5788   return 0;
5789 }
5790 _ACEOF
5791 if ac_fn_cxx_try_compile "$LINENO"; then :
5792   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5793 else
5794   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5795 fi
5796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5797 ac_ext=c
5798 ac_cpp='$CPP $CPPFLAGS'
5799 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5800 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5801 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5802
5803 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5804 CXXFLAGS="$pgac_save_CXXFLAGS"
5805 CXX="$pgac_save_CXX"
5806 fi
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5808 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5809 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5810   CXXFLAGS="${CXXFLAGS} -fwrapv"
5811 fi
5812
5813
5814   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5815
5816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5817 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5818 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5819   $as_echo_n "(cached) " >&6
5820 else
5821   pgac_save_CFLAGS=$CFLAGS
5822 pgac_save_CC=$CC
5823 CC=${CC}
5824 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5825 ac_save_c_werror_flag=$ac_c_werror_flag
5826 ac_c_werror_flag=yes
5827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5828 /* end confdefs.h.  */
5829
5830 int
5831 main ()
5832 {
5833
5834   ;
5835   return 0;
5836 }
5837 _ACEOF
5838 if ac_fn_c_try_compile "$LINENO"; then :
5839   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5840 else
5841   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5842 fi
5843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5844 ac_c_werror_flag=$ac_save_c_werror_flag
5845 CFLAGS="$pgac_save_CFLAGS"
5846 CC="$pgac_save_CC"
5847 fi
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5849 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5850 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5851   CFLAGS="${CFLAGS} -fexcess-precision=standard"
5852 fi
5853
5854
5855   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5856 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5857 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5858   $as_echo_n "(cached) " >&6
5859 else
5860   pgac_save_CXXFLAGS=$CXXFLAGS
5861 pgac_save_CXX=$CXX
5862 CXX=${CXX}
5863 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5864 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5865 ac_cxx_werror_flag=yes
5866 ac_ext=cpp
5867 ac_cpp='$CXXCPP $CPPFLAGS'
5868 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5869 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5870 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5871
5872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5873 /* end confdefs.h.  */
5874
5875 int
5876 main ()
5877 {
5878
5879   ;
5880   return 0;
5881 }
5882 _ACEOF
5883 if ac_fn_cxx_try_compile "$LINENO"; then :
5884   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5885 else
5886   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5887 fi
5888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5889 ac_ext=c
5890 ac_cpp='$CPP $CPPFLAGS'
5891 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5892 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5893 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5894
5895 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5896 CXXFLAGS="$pgac_save_CXXFLAGS"
5897 CXX="$pgac_save_CXX"
5898 fi
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5900 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5901 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5902   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5903 fi
5904
5905
5906   # Optimization flags for specific files that benefit from vectorization
5907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5908 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5909 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5910   $as_echo_n "(cached) " >&6
5911 else
5912   pgac_save_CFLAGS=$CFLAGS
5913 pgac_save_CC=$CC
5914 CC=${CC}
5915 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5916 ac_save_c_werror_flag=$ac_c_werror_flag
5917 ac_c_werror_flag=yes
5918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5919 /* end confdefs.h.  */
5920
5921 int
5922 main ()
5923 {
5924
5925   ;
5926   return 0;
5927 }
5928 _ACEOF
5929 if ac_fn_c_try_compile "$LINENO"; then :
5930   pgac_cv_prog_CC_cflags__funroll_loops=yes
5931 else
5932   pgac_cv_prog_CC_cflags__funroll_loops=no
5933 fi
5934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5935 ac_c_werror_flag=$ac_save_c_werror_flag
5936 CFLAGS="$pgac_save_CFLAGS"
5937 CC="$pgac_save_CC"
5938 fi
5939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5940 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5941 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5942   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5943 fi
5944
5945
5946   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5947 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5948 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5949   $as_echo_n "(cached) " >&6
5950 else
5951   pgac_save_CFLAGS=$CFLAGS
5952 pgac_save_CC=$CC
5953 CC=${CC}
5954 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5955 ac_save_c_werror_flag=$ac_c_werror_flag
5956 ac_c_werror_flag=yes
5957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5958 /* end confdefs.h.  */
5959
5960 int
5961 main ()
5962 {
5963
5964   ;
5965   return 0;
5966 }
5967 _ACEOF
5968 if ac_fn_c_try_compile "$LINENO"; then :
5969   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5970 else
5971   pgac_cv_prog_CC_cflags__ftree_vectorize=no
5972 fi
5973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5974 ac_c_werror_flag=$ac_save_c_werror_flag
5975 CFLAGS="$pgac_save_CFLAGS"
5976 CC="$pgac_save_CC"
5977 fi
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5979 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5980 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5981   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5982 fi
5983
5984
5985   # We want to suppress clang's unhelpful unused-command-line-argument warnings
5986   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5987   # test for the positive form and if that works, add the negative form
5988   NOT_THE_CFLAGS=""
5989   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5990 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5991 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
5992   $as_echo_n "(cached) " >&6
5993 else
5994   pgac_save_CFLAGS=$CFLAGS
5995 pgac_save_CC=$CC
5996 CC=${CC}
5997 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5998 ac_save_c_werror_flag=$ac_c_werror_flag
5999 ac_c_werror_flag=yes
6000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6001 /* end confdefs.h.  */
6002
6003 int
6004 main ()
6005 {
6006
6007   ;
6008   return 0;
6009 }
6010 _ACEOF
6011 if ac_fn_c_try_compile "$LINENO"; then :
6012   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6013 else
6014   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6015 fi
6016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6017 ac_c_werror_flag=$ac_save_c_werror_flag
6018 CFLAGS="$pgac_save_CFLAGS"
6019 CC="$pgac_save_CC"
6020 fi
6021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6022 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6023 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6024   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6025 fi
6026
6027
6028   if test -n "$NOT_THE_CFLAGS"; then
6029     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6030   fi
6031   # Similarly disable useless truncation warnings from gcc 8+
6032   NOT_THE_CFLAGS=""
6033   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6034 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6035 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6036   $as_echo_n "(cached) " >&6
6037 else
6038   pgac_save_CFLAGS=$CFLAGS
6039 pgac_save_CC=$CC
6040 CC=${CC}
6041 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6042 ac_save_c_werror_flag=$ac_c_werror_flag
6043 ac_c_werror_flag=yes
6044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6045 /* end confdefs.h.  */
6046
6047 int
6048 main ()
6049 {
6050
6051   ;
6052   return 0;
6053 }
6054 _ACEOF
6055 if ac_fn_c_try_compile "$LINENO"; then :
6056   pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6057 else
6058   pgac_cv_prog_CC_cflags__Wformat_truncation=no
6059 fi
6060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6061 ac_c_werror_flag=$ac_save_c_werror_flag
6062 CFLAGS="$pgac_save_CFLAGS"
6063 CC="$pgac_save_CC"
6064 fi
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6066 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6067 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6068   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6069 fi
6070
6071
6072   if test -n "$NOT_THE_CFLAGS"; then
6073     CFLAGS="$CFLAGS -Wno-format-truncation"
6074   fi
6075   NOT_THE_CFLAGS=""
6076   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6077 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6078 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6079   $as_echo_n "(cached) " >&6
6080 else
6081   pgac_save_CFLAGS=$CFLAGS
6082 pgac_save_CC=$CC
6083 CC=${CC}
6084 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6085 ac_save_c_werror_flag=$ac_c_werror_flag
6086 ac_c_werror_flag=yes
6087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6088 /* end confdefs.h.  */
6089
6090 int
6091 main ()
6092 {
6093
6094   ;
6095   return 0;
6096 }
6097 _ACEOF
6098 if ac_fn_c_try_compile "$LINENO"; then :
6099   pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6100 else
6101   pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6102 fi
6103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6104 ac_c_werror_flag=$ac_save_c_werror_flag
6105 CFLAGS="$pgac_save_CFLAGS"
6106 CC="$pgac_save_CC"
6107 fi
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6109 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6110 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6111   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6112 fi
6113
6114
6115   if test -n "$NOT_THE_CFLAGS"; then
6116     CFLAGS="$CFLAGS -Wno-stringop-truncation"
6117   fi
6118 elif test "$ICC" = yes; then
6119   # Intel's compiler has a bug/misoptimization in checking for
6120   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6121
6122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6123 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6124 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6125   $as_echo_n "(cached) " >&6
6126 else
6127   pgac_save_CFLAGS=$CFLAGS
6128 pgac_save_CC=$CC
6129 CC=${CC}
6130 CFLAGS="${CFLAGS} -mp1"
6131 ac_save_c_werror_flag=$ac_c_werror_flag
6132 ac_c_werror_flag=yes
6133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6134 /* end confdefs.h.  */
6135
6136 int
6137 main ()
6138 {
6139
6140   ;
6141   return 0;
6142 }
6143 _ACEOF
6144 if ac_fn_c_try_compile "$LINENO"; then :
6145   pgac_cv_prog_CC_cflags__mp1=yes
6146 else
6147   pgac_cv_prog_CC_cflags__mp1=no
6148 fi
6149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6150 ac_c_werror_flag=$ac_save_c_werror_flag
6151 CFLAGS="$pgac_save_CFLAGS"
6152 CC="$pgac_save_CC"
6153 fi
6154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6155 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6156 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6157   CFLAGS="${CFLAGS} -mp1"
6158 fi
6159
6160
6161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6162 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6163 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6164   $as_echo_n "(cached) " >&6
6165 else
6166   pgac_save_CXXFLAGS=$CXXFLAGS
6167 pgac_save_CXX=$CXX
6168 CXX=${CXX}
6169 CXXFLAGS="${CXXFLAGS} -mp1"
6170 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6171 ac_cxx_werror_flag=yes
6172 ac_ext=cpp
6173 ac_cpp='$CXXCPP $CPPFLAGS'
6174 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6175 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6176 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6177
6178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6179 /* end confdefs.h.  */
6180
6181 int
6182 main ()
6183 {
6184
6185   ;
6186   return 0;
6187 }
6188 _ACEOF
6189 if ac_fn_cxx_try_compile "$LINENO"; then :
6190   pgac_cv_prog_CXX_cxxflags__mp1=yes
6191 else
6192   pgac_cv_prog_CXX_cxxflags__mp1=no
6193 fi
6194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6195 ac_ext=c
6196 ac_cpp='$CPP $CPPFLAGS'
6197 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6198 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6199 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6200
6201 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6202 CXXFLAGS="$pgac_save_CXXFLAGS"
6203 CXX="$pgac_save_CXX"
6204 fi
6205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6206 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6207 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6208   CXXFLAGS="${CXXFLAGS} -mp1"
6209 fi
6210
6211
6212   # Make sure strict aliasing is off (though this is said to be the default)
6213
6214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6215 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6216 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6217   $as_echo_n "(cached) " >&6
6218 else
6219   pgac_save_CFLAGS=$CFLAGS
6220 pgac_save_CC=$CC
6221 CC=${CC}
6222 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6223 ac_save_c_werror_flag=$ac_c_werror_flag
6224 ac_c_werror_flag=yes
6225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6226 /* end confdefs.h.  */
6227
6228 int
6229 main ()
6230 {
6231
6232   ;
6233   return 0;
6234 }
6235 _ACEOF
6236 if ac_fn_c_try_compile "$LINENO"; then :
6237   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6238 else
6239   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6240 fi
6241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6242 ac_c_werror_flag=$ac_save_c_werror_flag
6243 CFLAGS="$pgac_save_CFLAGS"
6244 CC="$pgac_save_CC"
6245 fi
6246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6247 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6248 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6249   CFLAGS="${CFLAGS} -fno-strict-aliasing"
6250 fi
6251
6252
6253   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6254 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6255 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6256   $as_echo_n "(cached) " >&6
6257 else
6258   pgac_save_CXXFLAGS=$CXXFLAGS
6259 pgac_save_CXX=$CXX
6260 CXX=${CXX}
6261 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6262 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6263 ac_cxx_werror_flag=yes
6264 ac_ext=cpp
6265 ac_cpp='$CXXCPP $CPPFLAGS'
6266 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6267 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6268 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6269
6270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6271 /* end confdefs.h.  */
6272
6273 int
6274 main ()
6275 {
6276
6277   ;
6278   return 0;
6279 }
6280 _ACEOF
6281 if ac_fn_cxx_try_compile "$LINENO"; then :
6282   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6283 else
6284   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6285 fi
6286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6287 ac_ext=c
6288 ac_cpp='$CPP $CPPFLAGS'
6289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6292
6293 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6294 CXXFLAGS="$pgac_save_CXXFLAGS"
6295 CXX="$pgac_save_CXX"
6296 fi
6297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6298 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6299 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6300   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6301 fi
6302
6303
6304 elif test "$PORTNAME" = "aix"; then
6305   # AIX's xlc has to have strict aliasing turned off too
6306
6307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6308 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6309 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6310   $as_echo_n "(cached) " >&6
6311 else
6312   pgac_save_CFLAGS=$CFLAGS
6313 pgac_save_CC=$CC
6314 CC=${CC}
6315 CFLAGS="${CFLAGS} -qnoansialias"
6316 ac_save_c_werror_flag=$ac_c_werror_flag
6317 ac_c_werror_flag=yes
6318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6319 /* end confdefs.h.  */
6320
6321 int
6322 main ()
6323 {
6324
6325   ;
6326   return 0;
6327 }
6328 _ACEOF
6329 if ac_fn_c_try_compile "$LINENO"; then :
6330   pgac_cv_prog_CC_cflags__qnoansialias=yes
6331 else
6332   pgac_cv_prog_CC_cflags__qnoansialias=no
6333 fi
6334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6335 ac_c_werror_flag=$ac_save_c_werror_flag
6336 CFLAGS="$pgac_save_CFLAGS"
6337 CC="$pgac_save_CC"
6338 fi
6339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6340 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6341 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6342   CFLAGS="${CFLAGS} -qnoansialias"
6343 fi
6344
6345
6346   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6347 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6348 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6349   $as_echo_n "(cached) " >&6
6350 else
6351   pgac_save_CXXFLAGS=$CXXFLAGS
6352 pgac_save_CXX=$CXX
6353 CXX=${CXX}
6354 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6355 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6356 ac_cxx_werror_flag=yes
6357 ac_ext=cpp
6358 ac_cpp='$CXXCPP $CPPFLAGS'
6359 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6360 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6361 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6362
6363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6364 /* end confdefs.h.  */
6365
6366 int
6367 main ()
6368 {
6369
6370   ;
6371   return 0;
6372 }
6373 _ACEOF
6374 if ac_fn_cxx_try_compile "$LINENO"; then :
6375   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6376 else
6377   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6378 fi
6379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6380 ac_ext=c
6381 ac_cpp='$CPP $CPPFLAGS'
6382 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6383 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6384 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6385
6386 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6387 CXXFLAGS="$pgac_save_CXXFLAGS"
6388 CXX="$pgac_save_CXX"
6389 fi
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6391 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6392 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6393   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6394 fi
6395
6396
6397
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6399 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6400 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6401   $as_echo_n "(cached) " >&6
6402 else
6403   pgac_save_CFLAGS=$CFLAGS
6404 pgac_save_CC=$CC
6405 CC=${CC}
6406 CFLAGS="${CFLAGS} -qlonglong"
6407 ac_save_c_werror_flag=$ac_c_werror_flag
6408 ac_c_werror_flag=yes
6409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6410 /* end confdefs.h.  */
6411
6412 int
6413 main ()
6414 {
6415
6416   ;
6417   return 0;
6418 }
6419 _ACEOF
6420 if ac_fn_c_try_compile "$LINENO"; then :
6421   pgac_cv_prog_CC_cflags__qlonglong=yes
6422 else
6423   pgac_cv_prog_CC_cflags__qlonglong=no
6424 fi
6425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6426 ac_c_werror_flag=$ac_save_c_werror_flag
6427 CFLAGS="$pgac_save_CFLAGS"
6428 CC="$pgac_save_CC"
6429 fi
6430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6431 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6432 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6433   CFLAGS="${CFLAGS} -qlonglong"
6434 fi
6435
6436
6437   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6438 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6439 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6440   $as_echo_n "(cached) " >&6
6441 else
6442   pgac_save_CXXFLAGS=$CXXFLAGS
6443 pgac_save_CXX=$CXX
6444 CXX=${CXX}
6445 CXXFLAGS="${CXXFLAGS} -qlonglong"
6446 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6447 ac_cxx_werror_flag=yes
6448 ac_ext=cpp
6449 ac_cpp='$CXXCPP $CPPFLAGS'
6450 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6451 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6452 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6453
6454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6455 /* end confdefs.h.  */
6456
6457 int
6458 main ()
6459 {
6460
6461   ;
6462   return 0;
6463 }
6464 _ACEOF
6465 if ac_fn_cxx_try_compile "$LINENO"; then :
6466   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6467 else
6468   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6469 fi
6470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6471 ac_ext=c
6472 ac_cpp='$CPP $CPPFLAGS'
6473 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6474 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6475 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6476
6477 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6478 CXXFLAGS="$pgac_save_CXXFLAGS"
6479 CXX="$pgac_save_CXX"
6480 fi
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6482 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6483 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6484   CXXFLAGS="${CXXFLAGS} -qlonglong"
6485 fi
6486
6487
6488 elif test "$PORTNAME" = "hpux"; then
6489   # On some versions of HP-UX, libm functions do not set errno by default.
6490   # Fix that by using +Olibmerrno if the compiler recognizes it.
6491
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6493 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6494 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6495   $as_echo_n "(cached) " >&6
6496 else
6497   pgac_save_CFLAGS=$CFLAGS
6498 pgac_save_CC=$CC
6499 CC=${CC}
6500 CFLAGS="${CFLAGS} +Olibmerrno"
6501 ac_save_c_werror_flag=$ac_c_werror_flag
6502 ac_c_werror_flag=yes
6503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6504 /* end confdefs.h.  */
6505
6506 int
6507 main ()
6508 {
6509
6510   ;
6511   return 0;
6512 }
6513 _ACEOF
6514 if ac_fn_c_try_compile "$LINENO"; then :
6515   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6516 else
6517   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6518 fi
6519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6520 ac_c_werror_flag=$ac_save_c_werror_flag
6521 CFLAGS="$pgac_save_CFLAGS"
6522 CC="$pgac_save_CC"
6523 fi
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6525 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6526 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6527   CFLAGS="${CFLAGS} +Olibmerrno"
6528 fi
6529
6530
6531   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6532 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6533 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6534   $as_echo_n "(cached) " >&6
6535 else
6536   pgac_save_CXXFLAGS=$CXXFLAGS
6537 pgac_save_CXX=$CXX
6538 CXX=${CXX}
6539 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6540 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6541 ac_cxx_werror_flag=yes
6542 ac_ext=cpp
6543 ac_cpp='$CXXCPP $CPPFLAGS'
6544 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6545 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6546 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6547
6548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6549 /* end confdefs.h.  */
6550
6551 int
6552 main ()
6553 {
6554
6555   ;
6556   return 0;
6557 }
6558 _ACEOF
6559 if ac_fn_cxx_try_compile "$LINENO"; then :
6560   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6561 else
6562   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6563 fi
6564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6565 ac_ext=c
6566 ac_cpp='$CPP $CPPFLAGS'
6567 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6568 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6569 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6570
6571 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6572 CXXFLAGS="$pgac_save_CXXFLAGS"
6573 CXX="$pgac_save_CXX"
6574 fi
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6576 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6577 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6578   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6579 fi
6580
6581
6582 fi
6583
6584 CFLAGS_VECTOR=$CFLAGS_VECTOR
6585
6586
6587 # Determine flags used to emit bitcode for JIT inlining. Need to test
6588 # for behaviour changing compiler flags, to keep compatibility with
6589 # compiler used for normal postgres code.
6590 if test "$with_llvm" = yes ; then
6591   CLANGXX="$CLANG -xc++"
6592
6593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6594 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6595 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6596   $as_echo_n "(cached) " >&6
6597 else
6598   pgac_save_CFLAGS=$CFLAGS
6599 pgac_save_CC=$CC
6600 CC=${CLANG}
6601 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6602 ac_save_c_werror_flag=$ac_c_werror_flag
6603 ac_c_werror_flag=yes
6604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6605 /* end confdefs.h.  */
6606
6607 int
6608 main ()
6609 {
6610
6611   ;
6612   return 0;
6613 }
6614 _ACEOF
6615 if ac_fn_c_try_compile "$LINENO"; then :
6616   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6617 else
6618   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6619 fi
6620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6621 ac_c_werror_flag=$ac_save_c_werror_flag
6622 CFLAGS="$pgac_save_CFLAGS"
6623 CC="$pgac_save_CC"
6624 fi
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6626 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6627 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6628   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6629 fi
6630
6631   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6632 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6633 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6634   $as_echo_n "(cached) " >&6
6635 else
6636   pgac_save_CXXFLAGS=$CXXFLAGS
6637 pgac_save_CXX=$CXX
6638 CXX=${CLANGXX}
6639 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6640 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6641 ac_cxx_werror_flag=yes
6642 ac_ext=cpp
6643 ac_cpp='$CXXCPP $CPPFLAGS'
6644 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6645 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6646 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6647
6648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6649 /* end confdefs.h.  */
6650
6651 int
6652 main ()
6653 {
6654
6655   ;
6656   return 0;
6657 }
6658 _ACEOF
6659 if ac_fn_cxx_try_compile "$LINENO"; then :
6660   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6661 else
6662   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6663 fi
6664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6665 ac_ext=c
6666 ac_cpp='$CPP $CPPFLAGS'
6667 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6668 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6669 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6670
6671 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6672 CXXFLAGS="$pgac_save_CXXFLAGS"
6673 CXX="$pgac_save_CXX"
6674 fi
6675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6676 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6677 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6678   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6679 fi
6680
6681   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6682 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6683 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6684   $as_echo_n "(cached) " >&6
6685 else
6686   pgac_save_CFLAGS=$CFLAGS
6687 pgac_save_CC=$CC
6688 CC=${CLANG}
6689 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6690 ac_save_c_werror_flag=$ac_c_werror_flag
6691 ac_c_werror_flag=yes
6692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6693 /* end confdefs.h.  */
6694
6695 int
6696 main ()
6697 {
6698
6699   ;
6700   return 0;
6701 }
6702 _ACEOF
6703 if ac_fn_c_try_compile "$LINENO"; then :
6704   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6705 else
6706   pgac_cv_prog_CLANG_cflags__fwrapv=no
6707 fi
6708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6709 ac_c_werror_flag=$ac_save_c_werror_flag
6710 CFLAGS="$pgac_save_CFLAGS"
6711 CC="$pgac_save_CC"
6712 fi
6713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6714 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6715 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6716   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6717 fi
6718
6719   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6720 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6721 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6722   $as_echo_n "(cached) " >&6
6723 else
6724   pgac_save_CXXFLAGS=$CXXFLAGS
6725 pgac_save_CXX=$CXX
6726 CXX=${CLANGXX}
6727 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6728 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6729 ac_cxx_werror_flag=yes
6730 ac_ext=cpp
6731 ac_cpp='$CXXCPP $CPPFLAGS'
6732 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6733 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6734 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6735
6736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6737 /* end confdefs.h.  */
6738
6739 int
6740 main ()
6741 {
6742
6743   ;
6744   return 0;
6745 }
6746 _ACEOF
6747 if ac_fn_cxx_try_compile "$LINENO"; then :
6748   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6749 else
6750   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6751 fi
6752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6753 ac_ext=c
6754 ac_cpp='$CPP $CPPFLAGS'
6755 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6756 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6757 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6758
6759 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6760 CXXFLAGS="$pgac_save_CXXFLAGS"
6761 CXX="$pgac_save_CXX"
6762 fi
6763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6764 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6765 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6766   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6767 fi
6768
6769   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6770 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6771 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6772   $as_echo_n "(cached) " >&6
6773 else
6774   pgac_save_CFLAGS=$CFLAGS
6775 pgac_save_CC=$CC
6776 CC=${CLANG}
6777 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6778 ac_save_c_werror_flag=$ac_c_werror_flag
6779 ac_c_werror_flag=yes
6780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6781 /* end confdefs.h.  */
6782
6783 int
6784 main ()
6785 {
6786
6787   ;
6788   return 0;
6789 }
6790 _ACEOF
6791 if ac_fn_c_try_compile "$LINENO"; then :
6792   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6793 else
6794   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6795 fi
6796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6797 ac_c_werror_flag=$ac_save_c_werror_flag
6798 CFLAGS="$pgac_save_CFLAGS"
6799 CC="$pgac_save_CC"
6800 fi
6801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6802 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6803 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6804   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6805 fi
6806
6807   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6808 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6809 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6810   $as_echo_n "(cached) " >&6
6811 else
6812   pgac_save_CXXFLAGS=$CXXFLAGS
6813 pgac_save_CXX=$CXX
6814 CXX=${CLANGXX}
6815 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6816 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6817 ac_cxx_werror_flag=yes
6818 ac_ext=cpp
6819 ac_cpp='$CXXCPP $CPPFLAGS'
6820 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6821 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6822 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6823
6824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6825 /* end confdefs.h.  */
6826
6827 int
6828 main ()
6829 {
6830
6831   ;
6832   return 0;
6833 }
6834 _ACEOF
6835 if ac_fn_cxx_try_compile "$LINENO"; then :
6836   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6837 else
6838   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6839 fi
6840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6841 ac_ext=c
6842 ac_cpp='$CPP $CPPFLAGS'
6843 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6844 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6845 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6846
6847 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6848 CXXFLAGS="$pgac_save_CXXFLAGS"
6849 CXX="$pgac_save_CXX"
6850 fi
6851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6852 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6853 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6854   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6855 fi
6856
6857 fi
6858
6859 # supply -g if --enable-debug
6860 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6861   CFLAGS="$CFLAGS -g"
6862 fi
6863
6864 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6865   CXXFLAGS="$CXXFLAGS -g"
6866 fi
6867
6868 # enable code coverage if --enable-coverage
6869 if test "$enable_coverage" = yes; then
6870   if test "$GCC" = yes; then
6871     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6872     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6873   else
6874     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6875   fi
6876 fi
6877
6878 # enable profiling if --enable-profiling
6879 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6880   if test "$GCC" = yes; then
6881
6882 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6883
6884     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6885     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6886   else
6887     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6888   fi
6889 fi
6890
6891 # We already have this in Makefile.win32, but configure needs it too
6892 if test "$PORTNAME" = "win32"; then
6893   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6894 fi
6895
6896 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6897 # user-specified flags (if any) at the end.  This lets users override
6898 # the automatic additions.
6899 CFLAGS="$CFLAGS $user_CFLAGS"
6900 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6901 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6902 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6903
6904 BITCODE_CFLAGS=$BITCODE_CFLAGS
6905
6906 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6907
6908
6909 # Check if the compiler still works with the final flag settings
6910 # (note, we're not checking that for CXX, which is optional)
6911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6912 $as_echo_n "checking whether the C compiler still works... " >&6; }
6913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6914 /* end confdefs.h.  */
6915
6916 int
6917 main ()
6918 {
6919 return 0;
6920   ;
6921   return 0;
6922 }
6923 _ACEOF
6924 if ac_fn_c_try_link "$LINENO"; then :
6925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6926 $as_echo "yes" >&6; }
6927 else
6928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6929 $as_echo "no" >&6; }
6930    as_fn_error $? "cannot proceed" "$LINENO" 5
6931 fi
6932 rm -f core conftest.err conftest.$ac_objext \
6933     conftest$ac_exeext conftest.$ac_ext
6934
6935 # Defend against gcc -ffast-math
6936 if test "$GCC" = yes; then
6937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6938 /* end confdefs.h.  */
6939
6940 int
6941 main ()
6942 {
6943 #ifdef __FAST_MATH__
6944 choke me
6945 #endif
6946   ;
6947   return 0;
6948 }
6949 _ACEOF
6950 if ac_fn_c_try_compile "$LINENO"; then :
6951
6952 else
6953   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6954 fi
6955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6956 fi
6957
6958 # Defend against clang being used on x86-32 without SSE2 enabled.  As current
6959 # versions of clang do not understand -fexcess-precision=standard, the use of
6960 # x87 floating point operations leads to problems like isinf possibly returning
6961 # false for a value that is infinite when converted from the 80bit register to
6962 # the 8byte memory representation.
6963 #
6964 # Only perform the test if the compiler doesn't understand
6965 # -fexcess-precision=standard, that way a potentially fixed compiler will work
6966 # automatically.
6967 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
6968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6969 /* end confdefs.h.  */
6970
6971 int
6972 main ()
6973 {
6974
6975 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
6976 choke me
6977 #endif
6978
6979   ;
6980   return 0;
6981 }
6982 _ACEOF
6983 if ac_fn_c_try_compile "$LINENO"; then :
6984
6985 else
6986   as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
6987 fi
6988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6989 fi
6990
6991 ac_ext=c
6992 ac_cpp='$CPP $CPPFLAGS'
6993 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6994 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6995 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6997 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6998 # On Suns, sometimes $CPP names a directory.
6999 if test -n "$CPP" && test -d "$CPP"; then
7000   CPP=
7001 fi
7002 if test -z "$CPP"; then
7003   if ${ac_cv_prog_CPP+:} false; then :
7004   $as_echo_n "(cached) " >&6
7005 else
7006       # Double quotes because CPP needs to be expanded
7007     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7008     do
7009       ac_preproc_ok=false
7010 for ac_c_preproc_warn_flag in '' yes
7011 do
7012   # Use a header file that comes with gcc, so configuring glibc
7013   # with a fresh cross-compiler works.
7014   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7015   # <limits.h> exists even on freestanding compilers.
7016   # On the NeXT, cc -E runs the code through the compiler's parser,
7017   # not just through cpp. "Syntax error" is here to catch this case.
7018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7019 /* end confdefs.h.  */
7020 #ifdef __STDC__
7021 # include <limits.h>
7022 #else
7023 # include <assert.h>
7024 #endif
7025                      Syntax error
7026 _ACEOF
7027 if ac_fn_c_try_cpp "$LINENO"; then :
7028
7029 else
7030   # Broken: fails on valid input.
7031 continue
7032 fi
7033 rm -f conftest.err conftest.i conftest.$ac_ext
7034
7035   # OK, works on sane cases.  Now check whether nonexistent headers
7036   # can be detected and how.
7037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7038 /* end confdefs.h.  */
7039 #include <ac_nonexistent.h>
7040 _ACEOF
7041 if ac_fn_c_try_cpp "$LINENO"; then :
7042   # Broken: success on invalid input.
7043 continue
7044 else
7045   # Passes both tests.
7046 ac_preproc_ok=:
7047 break
7048 fi
7049 rm -f conftest.err conftest.i conftest.$ac_ext
7050
7051 done
7052 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7053 rm -f conftest.i conftest.err conftest.$ac_ext
7054 if $ac_preproc_ok; then :
7055   break
7056 fi
7057
7058     done
7059     ac_cv_prog_CPP=$CPP
7060
7061 fi
7062   CPP=$ac_cv_prog_CPP
7063 else
7064   ac_cv_prog_CPP=$CPP
7065 fi
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7067 $as_echo "$CPP" >&6; }
7068 ac_preproc_ok=false
7069 for ac_c_preproc_warn_flag in '' yes
7070 do
7071   # Use a header file that comes with gcc, so configuring glibc
7072   # with a fresh cross-compiler works.
7073   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7074   # <limits.h> exists even on freestanding compilers.
7075   # On the NeXT, cc -E runs the code through the compiler's parser,
7076   # not just through cpp. "Syntax error" is here to catch this case.
7077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7078 /* end confdefs.h.  */
7079 #ifdef __STDC__
7080 # include <limits.h>
7081 #else
7082 # include <assert.h>
7083 #endif
7084                      Syntax error
7085 _ACEOF
7086 if ac_fn_c_try_cpp "$LINENO"; then :
7087
7088 else
7089   # Broken: fails on valid input.
7090 continue
7091 fi
7092 rm -f conftest.err conftest.i conftest.$ac_ext
7093
7094   # OK, works on sane cases.  Now check whether nonexistent headers
7095   # can be detected and how.
7096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7097 /* end confdefs.h.  */
7098 #include <ac_nonexistent.h>
7099 _ACEOF
7100 if ac_fn_c_try_cpp "$LINENO"; then :
7101   # Broken: success on invalid input.
7102 continue
7103 else
7104   # Passes both tests.
7105 ac_preproc_ok=:
7106 break
7107 fi
7108 rm -f conftest.err conftest.i conftest.$ac_ext
7109
7110 done
7111 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7112 rm -f conftest.i conftest.err conftest.$ac_ext
7113 if $ac_preproc_ok; then :
7114
7115 else
7116   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7117 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7118 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7119 See \`config.log' for more details" "$LINENO" 5; }
7120 fi
7121
7122 ac_ext=c
7123 ac_cpp='$CPP $CPPFLAGS'
7124 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7125 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7126 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7127
7128
7129
7130
7131 #
7132 # Set up TAS assembly code if needed; the template file has now had its
7133 # chance to request this.
7134 #
7135 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7136
7137
7138 if test "$need_tas" = yes ; then
7139   TAS=tas.o
7140 else
7141   TAS=""
7142 fi
7143
7144
7145
7146 #
7147 # Automatic dependency tracking
7148 #
7149
7150
7151 # Check whether --enable-depend was given.
7152 if test "${enable_depend+set}" = set; then :
7153   enableval=$enable_depend;
7154   case $enableval in
7155     yes)
7156       autodepend=yes
7157       ;;
7158     no)
7159       :
7160       ;;
7161     *)
7162       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7163       ;;
7164   esac
7165
7166 else
7167   enable_depend=no
7168
7169 fi
7170
7171
7172
7173
7174
7175 #
7176 # Enable assert checks
7177 #
7178
7179
7180 # Check whether --enable-cassert was given.
7181 if test "${enable_cassert+set}" = set; then :
7182   enableval=$enable_cassert;
7183   case $enableval in
7184     yes)
7185
7186 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7187
7188       ;;
7189     no)
7190       :
7191       ;;
7192     *)
7193       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7194       ;;
7195   esac
7196
7197 else
7198   enable_cassert=no
7199
7200 fi
7201
7202
7203
7204
7205 #
7206 # Include directories
7207 #
7208 ac_save_IFS=$IFS
7209 IFS="${IFS}${PATH_SEPARATOR}"
7210 # SRCH_INC comes from the template file
7211 for dir in $with_includes $SRCH_INC; do
7212   if test -d "$dir"; then
7213     INCLUDES="$INCLUDES -I$dir"
7214   else
7215     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7216 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7217   fi
7218 done
7219 IFS=$ac_save_IFS
7220
7221
7222
7223 #
7224 # Library directories
7225 #
7226 ac_save_IFS=$IFS
7227 IFS="${IFS}${PATH_SEPARATOR}"
7228 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7229 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7230   if test -d "$dir"; then
7231     LIBDIRS="$LIBDIRS -L$dir"
7232   else
7233     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7234 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7235   fi
7236 done
7237 IFS=$ac_save_IFS
7238
7239 #
7240 # Enable thread-safe client libraries
7241 #
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7243 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7244
7245
7246 # Check whether --enable-thread-safety was given.
7247 if test "${enable_thread_safety+set}" = set; then :
7248   enableval=$enable_thread_safety;
7249   case $enableval in
7250     yes)
7251       :
7252       ;;
7253     no)
7254       :
7255       ;;
7256     *)
7257       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7258       ;;
7259   esac
7260
7261 else
7262   enable_thread_safety=yes
7263
7264 fi
7265
7266
7267 if test "$enable_thread_safety" = yes; then
7268
7269 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7270
7271 fi
7272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7273 $as_echo "$enable_thread_safety" >&6; }
7274
7275
7276 #
7277 # ICU
7278 #
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7280 $as_echo_n "checking whether to build with ICU support... " >&6; }
7281
7282
7283
7284 # Check whether --with-icu was given.
7285 if test "${with_icu+set}" = set; then :
7286   withval=$with_icu;
7287   case $withval in
7288     yes)
7289
7290 $as_echo "#define USE_ICU 1" >>confdefs.h
7291
7292       ;;
7293     no)
7294       :
7295       ;;
7296     *)
7297       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7298       ;;
7299   esac
7300
7301 else
7302   with_icu=no
7303
7304 fi
7305
7306
7307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7308 $as_echo "$with_icu" >&6; }
7309
7310
7311 if test "$with_icu" = yes; then
7312
7313
7314
7315
7316
7317
7318
7319 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7320         if test -n "$ac_tool_prefix"; then
7321   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7322 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7324 $as_echo_n "checking for $ac_word... " >&6; }
7325 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7326   $as_echo_n "(cached) " >&6
7327 else
7328   case $PKG_CONFIG in
7329   [\\/]* | ?:[\\/]*)
7330   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7331   ;;
7332   *)
7333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7334 for as_dir in $PATH
7335 do
7336   IFS=$as_save_IFS
7337   test -z "$as_dir" && as_dir=.
7338     for ac_exec_ext in '' $ac_executable_extensions; do
7339   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7340     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7342     break 2
7343   fi
7344 done
7345   done
7346 IFS=$as_save_IFS
7347
7348   ;;
7349 esac
7350 fi
7351 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7352 if test -n "$PKG_CONFIG"; then
7353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7354 $as_echo "$PKG_CONFIG" >&6; }
7355 else
7356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7357 $as_echo "no" >&6; }
7358 fi
7359
7360
7361 fi
7362 if test -z "$ac_cv_path_PKG_CONFIG"; then
7363   ac_pt_PKG_CONFIG=$PKG_CONFIG
7364   # Extract the first word of "pkg-config", so it can be a program name with args.
7365 set dummy pkg-config; ac_word=$2
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7367 $as_echo_n "checking for $ac_word... " >&6; }
7368 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7369   $as_echo_n "(cached) " >&6
7370 else
7371   case $ac_pt_PKG_CONFIG in
7372   [\\/]* | ?:[\\/]*)
7373   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7374   ;;
7375   *)
7376   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7377 for as_dir in $PATH
7378 do
7379   IFS=$as_save_IFS
7380   test -z "$as_dir" && as_dir=.
7381     for ac_exec_ext in '' $ac_executable_extensions; do
7382   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7383     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7385     break 2
7386   fi
7387 done
7388   done
7389 IFS=$as_save_IFS
7390
7391   ;;
7392 esac
7393 fi
7394 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7395 if test -n "$ac_pt_PKG_CONFIG"; then
7396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7397 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7398 else
7399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7400 $as_echo "no" >&6; }
7401 fi
7402
7403   if test "x$ac_pt_PKG_CONFIG" = x; then
7404     PKG_CONFIG=""
7405   else
7406     case $cross_compiling:$ac_tool_warned in
7407 yes:)
7408 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7409 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7410 ac_tool_warned=yes ;;
7411 esac
7412     PKG_CONFIG=$ac_pt_PKG_CONFIG
7413   fi
7414 else
7415   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7416 fi
7417
7418 fi
7419 if test -n "$PKG_CONFIG"; then
7420         _pkg_min_version=0.9.0
7421         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7422 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7423         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7424                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7425 $as_echo "yes" >&6; }
7426         else
7427                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7428 $as_echo "no" >&6; }
7429                 PKG_CONFIG=""
7430         fi
7431 fi
7432
7433 pkg_failed=no
7434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7435 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7436
7437 if test -n "$ICU_CFLAGS"; then
7438     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7439  elif test -n "$PKG_CONFIG"; then
7440     if test -n "$PKG_CONFIG" && \
7441     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7442   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7443   ac_status=$?
7444   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7445   test $ac_status = 0; }; then
7446   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7447                       test "x$?" != "x0" && pkg_failed=yes
7448 else
7449   pkg_failed=yes
7450 fi
7451  else
7452     pkg_failed=untried
7453 fi
7454 if test -n "$ICU_LIBS"; then
7455     pkg_cv_ICU_LIBS="$ICU_LIBS"
7456  elif test -n "$PKG_CONFIG"; then
7457     if test -n "$PKG_CONFIG" && \
7458     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7459   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7460   ac_status=$?
7461   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7462   test $ac_status = 0; }; then
7463   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7464                       test "x$?" != "x0" && pkg_failed=yes
7465 else
7466   pkg_failed=yes
7467 fi
7468  else
7469     pkg_failed=untried
7470 fi
7471
7472
7473
7474 if test $pkg_failed = yes; then
7475         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7476 $as_echo "no" >&6; }
7477
7478 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7479         _pkg_short_errors_supported=yes
7480 else
7481         _pkg_short_errors_supported=no
7482 fi
7483         if test $_pkg_short_errors_supported = yes; then
7484                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7485         else
7486                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7487         fi
7488         # Put the nasty error message in config.log where it belongs
7489         echo "$ICU_PKG_ERRORS" >&5
7490
7491         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7492
7493 $ICU_PKG_ERRORS
7494
7495 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7496 installed software in a non-standard prefix.
7497
7498 Alternatively, you may set the environment variables ICU_CFLAGS
7499 and ICU_LIBS to avoid the need to call pkg-config.
7500 See the pkg-config man page for more details." "$LINENO" 5
7501 elif test $pkg_failed = untried; then
7502         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7503 $as_echo "no" >&6; }
7504         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7505 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7506 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7507 is in your PATH or set the PKG_CONFIG environment variable to the full
7508 path to pkg-config.
7509
7510 Alternatively, you may set the environment variables ICU_CFLAGS
7511 and ICU_LIBS to avoid the need to call pkg-config.
7512 See the pkg-config man page for more details.
7513
7514 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7515 See \`config.log' for more details" "$LINENO" 5; }
7516 else
7517         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7518         ICU_LIBS=$pkg_cv_ICU_LIBS
7519         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7520 $as_echo "yes" >&6; }
7521
7522 fi
7523 fi
7524
7525 #
7526 # Optionally build Tcl modules (PL/Tcl)
7527 #
7528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7529 $as_echo_n "checking whether to build with Tcl... " >&6; }
7530
7531
7532
7533 # Check whether --with-tcl was given.
7534 if test "${with_tcl+set}" = set; then :
7535   withval=$with_tcl;
7536   case $withval in
7537     yes)
7538       :
7539       ;;
7540     no)
7541       :
7542       ;;
7543     *)
7544       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7545       ;;
7546   esac
7547
7548 else
7549   with_tcl=no
7550
7551 fi
7552
7553
7554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7555 $as_echo "$with_tcl" >&6; }
7556
7557
7558 # We see if the path to the Tcl/Tk configuration scripts is specified.
7559 # This will override the use of tclsh to find the paths to search.
7560
7561
7562
7563
7564 # Check whether --with-tclconfig was given.
7565 if test "${with_tclconfig+set}" = set; then :
7566   withval=$with_tclconfig;
7567   case $withval in
7568     yes)
7569       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7570       ;;
7571     no)
7572       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7573       ;;
7574     *)
7575
7576       ;;
7577   esac
7578
7579 fi
7580
7581
7582
7583 #
7584 # Optionally build Perl modules (PL/Perl)
7585 #
7586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7587 $as_echo_n "checking whether to build Perl modules... " >&6; }
7588
7589
7590
7591 # Check whether --with-perl was given.
7592 if test "${with_perl+set}" = set; then :
7593   withval=$with_perl;
7594   case $withval in
7595     yes)
7596       :
7597       ;;
7598     no)
7599       :
7600       ;;
7601     *)
7602       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7603       ;;
7604   esac
7605
7606 else
7607   with_perl=no
7608
7609 fi
7610
7611
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7613 $as_echo "$with_perl" >&6; }
7614
7615
7616 #
7617 # Optionally build Python modules (PL/Python)
7618 #
7619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7620 $as_echo_n "checking whether to build Python modules... " >&6; }
7621
7622
7623
7624 # Check whether --with-python was given.
7625 if test "${with_python+set}" = set; then :
7626   withval=$with_python;
7627   case $withval in
7628     yes)
7629       :
7630       ;;
7631     no)
7632       :
7633       ;;
7634     *)
7635       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7636       ;;
7637   esac
7638
7639 else
7640   with_python=no
7641
7642 fi
7643
7644
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7646 $as_echo "$with_python" >&6; }
7647
7648
7649 #
7650 # GSSAPI
7651 #
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7653 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7654
7655
7656
7657 # Check whether --with-gssapi was given.
7658 if test "${with_gssapi+set}" = set; then :
7659   withval=$with_gssapi;
7660   case $withval in
7661     yes)
7662
7663
7664 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7665
7666   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7667
7668       ;;
7669     no)
7670       :
7671       ;;
7672     *)
7673       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7674       ;;
7675   esac
7676
7677 else
7678   with_gssapi=no
7679
7680 fi
7681
7682
7683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7684 $as_echo "$with_gssapi" >&6; }
7685
7686
7687
7688
7689
7690
7691 #
7692 # Kerberos configuration parameters
7693 #
7694
7695
7696
7697 # Check whether --with-krb-srvnam was given.
7698 if test "${with_krb_srvnam+set}" = set; then :
7699   withval=$with_krb_srvnam;
7700   case $withval in
7701     yes)
7702       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7703       ;;
7704     no)
7705       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7706       ;;
7707     *)
7708
7709       ;;
7710   esac
7711
7712 else
7713   with_krb_srvnam="postgres"
7714 fi
7715
7716
7717
7718
7719 cat >>confdefs.h <<_ACEOF
7720 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7721 _ACEOF
7722
7723
7724
7725 #
7726 # PAM
7727 #
7728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7729 $as_echo_n "checking whether to build with PAM support... " >&6; }
7730
7731
7732
7733 # Check whether --with-pam was given.
7734 if test "${with_pam+set}" = set; then :
7735   withval=$with_pam;
7736   case $withval in
7737     yes)
7738
7739 $as_echo "#define USE_PAM 1" >>confdefs.h
7740
7741       ;;
7742     no)
7743       :
7744       ;;
7745     *)
7746       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7747       ;;
7748   esac
7749
7750 else
7751   with_pam=no
7752
7753 fi
7754
7755
7756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7757 $as_echo "$with_pam" >&6; }
7758
7759
7760 #
7761 # BSD AUTH
7762 #
7763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7764 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7765
7766
7767
7768 # Check whether --with-bsd-auth was given.
7769 if test "${with_bsd_auth+set}" = set; then :
7770   withval=$with_bsd_auth;
7771   case $withval in
7772     yes)
7773
7774 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7775
7776       ;;
7777     no)
7778       :
7779       ;;
7780     *)
7781       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7782       ;;
7783   esac
7784
7785 else
7786   with_bsd_auth=no
7787
7788 fi
7789
7790
7791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7792 $as_echo "$with_bsd_auth" >&6; }
7793
7794
7795 #
7796 # LDAP
7797 #
7798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7799 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7800
7801
7802
7803 # Check whether --with-ldap was given.
7804 if test "${with_ldap+set}" = set; then :
7805   withval=$with_ldap;
7806   case $withval in
7807     yes)
7808
7809 $as_echo "#define USE_LDAP 1" >>confdefs.h
7810
7811       ;;
7812     no)
7813       :
7814       ;;
7815     *)
7816       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7817       ;;
7818   esac
7819
7820 else
7821   with_ldap=no
7822
7823 fi
7824
7825
7826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7827 $as_echo "$with_ldap" >&6; }
7828
7829
7830
7831 #
7832 # Bonjour
7833 #
7834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7835 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7836
7837
7838
7839 # Check whether --with-bonjour was given.
7840 if test "${with_bonjour+set}" = set; then :
7841   withval=$with_bonjour;
7842   case $withval in
7843     yes)
7844
7845 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7846
7847       ;;
7848     no)
7849       :
7850       ;;
7851     *)
7852       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7853       ;;
7854   esac
7855
7856 else
7857   with_bonjour=no
7858
7859 fi
7860
7861
7862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7863 $as_echo "$with_bonjour" >&6; }
7864
7865
7866 #
7867 # OpenSSL
7868 #
7869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7870 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7871
7872
7873
7874 # Check whether --with-openssl was given.
7875 if test "${with_openssl+set}" = set; then :
7876   withval=$with_openssl;
7877   case $withval in
7878     yes)
7879
7880 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7881
7882       ;;
7883     no)
7884       :
7885       ;;
7886     *)
7887       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7888       ;;
7889   esac
7890
7891 else
7892   with_openssl=no
7893
7894 fi
7895
7896
7897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7898 $as_echo "$with_openssl" >&6; }
7899
7900
7901 #
7902 # SELinux
7903 #
7904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7905 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7906
7907
7908
7909 # Check whether --with-selinux was given.
7910 if test "${with_selinux+set}" = set; then :
7911   withval=$with_selinux;
7912   case $withval in
7913     yes)
7914       :
7915       ;;
7916     no)
7917       :
7918       ;;
7919     *)
7920       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7921       ;;
7922   esac
7923
7924 else
7925   with_selinux=no
7926
7927 fi
7928
7929
7930
7931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7932 $as_echo "$with_selinux" >&6; }
7933
7934 #
7935 # Systemd
7936 #
7937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7938 $as_echo_n "checking whether to build with systemd support... " >&6; }
7939
7940
7941
7942 # Check whether --with-systemd was given.
7943 if test "${with_systemd+set}" = set; then :
7944   withval=$with_systemd;
7945   case $withval in
7946     yes)
7947
7948 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7949
7950       ;;
7951     no)
7952       :
7953       ;;
7954     *)
7955       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7956       ;;
7957   esac
7958
7959 else
7960   with_systemd=no
7961
7962 fi
7963
7964
7965
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7967 $as_echo "$with_systemd" >&6; }
7968
7969 #
7970 # Readline
7971 #
7972
7973
7974
7975 # Check whether --with-readline was given.
7976 if test "${with_readline+set}" = set; then :
7977   withval=$with_readline;
7978   case $withval in
7979     yes)
7980       :
7981       ;;
7982     no)
7983       :
7984       ;;
7985     *)
7986       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7987       ;;
7988   esac
7989
7990 else
7991   with_readline=yes
7992
7993 fi
7994
7995
7996 # readline on MinGW has problems with backslashes in psql and other bugs.
7997 # This is particularly a problem with non-US code pages.
7998 # Therefore disable its use until we understand the cause. 2004-07-20
7999 if test "$PORTNAME" = "win32"; then
8000   if test "$with_readline" = yes; then
8001     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8002 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8003     with_readline=no
8004   fi
8005 fi
8006
8007
8008 #
8009 # Prefer libedit
8010 #
8011
8012
8013
8014 # Check whether --with-libedit-preferred was given.
8015 if test "${with_libedit_preferred+set}" = set; then :
8016   withval=$with_libedit_preferred;
8017   case $withval in
8018     yes)
8019       :
8020       ;;
8021     no)
8022       :
8023       ;;
8024     *)
8025       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8026       ;;
8027   esac
8028
8029 else
8030   with_libedit_preferred=no
8031
8032 fi
8033
8034
8035
8036
8037 #
8038 # UUID library
8039 #
8040 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8041 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8042 # UUID library.  More than one of these might be present on a given platform,
8043 # so we make the user say which one she wants.
8044 #
8045
8046
8047
8048 # Check whether --with-uuid was given.
8049 if test "${with_uuid+set}" = set; then :
8050   withval=$with_uuid;
8051   case $withval in
8052     yes)
8053       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8054       ;;
8055     no)
8056       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8057       ;;
8058     *)
8059
8060       ;;
8061   esac
8062
8063 fi
8064
8065
8066 if test x"$with_uuid" = x"" ; then
8067   with_uuid=no
8068 fi
8069
8070
8071
8072 # Check whether --with-ossp-uuid was given.
8073 if test "${with_ossp_uuid+set}" = set; then :
8074   withval=$with_ossp_uuid;
8075   case $withval in
8076     yes)
8077       :
8078       ;;
8079     no)
8080       :
8081       ;;
8082     *)
8083       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8084       ;;
8085   esac
8086
8087 else
8088   with_ossp_uuid=no
8089
8090 fi
8091
8092
8093 if test "$with_ossp_uuid" = yes ; then
8094   with_uuid=ossp
8095 fi
8096
8097 if test "$with_uuid" = bsd ; then
8098
8099 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8100
8101   UUID_EXTRA_OBJS="md5.o sha1.o"
8102 elif test "$with_uuid" = e2fs ; then
8103
8104 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8105
8106   UUID_EXTRA_OBJS="md5.o sha1.o"
8107 elif test "$with_uuid" = ossp ; then
8108
8109 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8110
8111   UUID_EXTRA_OBJS=""
8112 elif test "$with_uuid" = no ; then
8113   UUID_EXTRA_OBJS=""
8114 else
8115   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8116 fi
8117
8118
8119
8120
8121 #
8122 # XML
8123 #
8124
8125
8126
8127 # Check whether --with-libxml was given.
8128 if test "${with_libxml+set}" = set; then :
8129   withval=$with_libxml;
8130   case $withval in
8131     yes)
8132
8133 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8134
8135       ;;
8136     no)
8137       :
8138       ;;
8139     *)
8140       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8141       ;;
8142   esac
8143
8144 else
8145   with_libxml=no
8146
8147 fi
8148
8149
8150
8151 if test "$with_libxml" = yes ; then
8152   if test -z "$XML2_CONFIG"; then
8153   for ac_prog in xml2-config
8154 do
8155   # Extract the first word of "$ac_prog", so it can be a program name with args.
8156 set dummy $ac_prog; ac_word=$2
8157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8158 $as_echo_n "checking for $ac_word... " >&6; }
8159 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8160   $as_echo_n "(cached) " >&6
8161 else
8162   case $XML2_CONFIG in
8163   [\\/]* | ?:[\\/]*)
8164   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8165   ;;
8166   *)
8167   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8168 for as_dir in $PATH
8169 do
8170   IFS=$as_save_IFS
8171   test -z "$as_dir" && as_dir=.
8172     for ac_exec_ext in '' $ac_executable_extensions; do
8173   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8174     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8175     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8176     break 2
8177   fi
8178 done
8179   done
8180 IFS=$as_save_IFS
8181
8182   ;;
8183 esac
8184 fi
8185 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8186 if test -n "$XML2_CONFIG"; then
8187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8188 $as_echo "$XML2_CONFIG" >&6; }
8189 else
8190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191 $as_echo "no" >&6; }
8192 fi
8193
8194
8195   test -n "$XML2_CONFIG" && break
8196 done
8197
8198 else
8199   # Report the value of XML2_CONFIG in configure's output in all cases.
8200   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8201 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8203 $as_echo "$XML2_CONFIG" >&6; }
8204 fi
8205
8206     if test -n "$XML2_CONFIG"; then
8207     for pgac_option in `$XML2_CONFIG --cflags`; do
8208       case $pgac_option in
8209         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8210       esac
8211     done
8212     for pgac_option in `$XML2_CONFIG --libs`; do
8213       case $pgac_option in
8214         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8215       esac
8216     done
8217   fi
8218 fi
8219
8220
8221
8222 #
8223 # XSLT
8224 #
8225
8226
8227
8228 # Check whether --with-libxslt was given.
8229 if test "${with_libxslt+set}" = set; then :
8230   withval=$with_libxslt;
8231   case $withval in
8232     yes)
8233
8234 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8235
8236       ;;
8237     no)
8238       :
8239       ;;
8240     *)
8241       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8242       ;;
8243   esac
8244
8245 else
8246   with_libxslt=no
8247
8248 fi
8249
8250
8251
8252
8253
8254
8255 #
8256 # tzdata
8257 #
8258
8259
8260
8261 # Check whether --with-system-tzdata was given.
8262 if test "${with_system_tzdata+set}" = set; then :
8263   withval=$with_system_tzdata;
8264   case $withval in
8265     yes)
8266       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8267       ;;
8268     no)
8269       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8270       ;;
8271     *)
8272
8273       ;;
8274   esac
8275
8276 fi
8277
8278
8279
8280
8281 #
8282 # Zlib
8283 #
8284
8285
8286
8287 # Check whether --with-zlib was given.
8288 if test "${with_zlib+set}" = set; then :
8289   withval=$with_zlib;
8290   case $withval in
8291     yes)
8292       :
8293       ;;
8294     no)
8295       :
8296       ;;
8297     *)
8298       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8299       ;;
8300   esac
8301
8302 else
8303   with_zlib=yes
8304
8305 fi
8306
8307
8308
8309
8310 #
8311 # Elf
8312 #
8313
8314 # Assume system is ELF if it predefines __ELF__ as 1,
8315 # otherwise believe host_os based default.
8316 case $host_os in
8317     freebsd1*|freebsd2*) elf=no;;
8318     freebsd3*|freebsd4*) elf=yes;;
8319 esac
8320
8321
8322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8323 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8324 if ${ac_cv_path_GREP+:} false; then :
8325   $as_echo_n "(cached) " >&6
8326 else
8327   if test -z "$GREP"; then
8328   ac_path_GREP_found=false
8329   # Loop through the user's path and test for each of PROGNAME-LIST
8330   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8331 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8332 do
8333   IFS=$as_save_IFS
8334   test -z "$as_dir" && as_dir=.
8335     for ac_prog in grep ggrep; do
8336     for ac_exec_ext in '' $ac_executable_extensions; do
8337       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8338       as_fn_executable_p "$ac_path_GREP" || continue
8339 # Check for GNU ac_path_GREP and select it if it is found.
8340   # Check for GNU $ac_path_GREP
8341 case `"$ac_path_GREP" --version 2>&1` in
8342 *GNU*)
8343   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8344 *)
8345   ac_count=0
8346   $as_echo_n 0123456789 >"conftest.in"
8347   while :
8348   do
8349     cat "conftest.in" "conftest.in" >"conftest.tmp"
8350     mv "conftest.tmp" "conftest.in"
8351     cp "conftest.in" "conftest.nl"
8352     $as_echo 'GREP' >> "conftest.nl"
8353     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8354     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8355     as_fn_arith $ac_count + 1 && ac_count=$as_val
8356     if test $ac_count -gt ${ac_path_GREP_max-0}; then
8357       # Best one so far, save it but keep looking for a better one
8358       ac_cv_path_GREP="$ac_path_GREP"
8359       ac_path_GREP_max=$ac_count
8360     fi
8361     # 10*(2^10) chars as input seems more than enough
8362     test $ac_count -gt 10 && break
8363   done
8364   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8365 esac
8366
8367       $ac_path_GREP_found && break 3
8368     done
8369   done
8370   done
8371 IFS=$as_save_IFS
8372   if test -z "$ac_cv_path_GREP"; then
8373     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8374   fi
8375 else
8376   ac_cv_path_GREP=$GREP
8377 fi
8378
8379 fi
8380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8381 $as_echo "$ac_cv_path_GREP" >&6; }
8382  GREP="$ac_cv_path_GREP"
8383
8384
8385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8386 $as_echo_n "checking for egrep... " >&6; }
8387 if ${ac_cv_path_EGREP+:} false; then :
8388   $as_echo_n "(cached) " >&6
8389 else
8390   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8391    then ac_cv_path_EGREP="$GREP -E"
8392    else
8393      if test -z "$EGREP"; then
8394   ac_path_EGREP_found=false
8395   # Loop through the user's path and test for each of PROGNAME-LIST
8396   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8397 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8398 do
8399   IFS=$as_save_IFS
8400   test -z "$as_dir" && as_dir=.
8401     for ac_prog in egrep; do
8402     for ac_exec_ext in '' $ac_executable_extensions; do
8403       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8404       as_fn_executable_p "$ac_path_EGREP" || continue
8405 # Check for GNU ac_path_EGREP and select it if it is found.
8406   # Check for GNU $ac_path_EGREP
8407 case `"$ac_path_EGREP" --version 2>&1` in
8408 *GNU*)
8409   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8410 *)
8411   ac_count=0
8412   $as_echo_n 0123456789 >"conftest.in"
8413   while :
8414   do
8415     cat "conftest.in" "conftest.in" >"conftest.tmp"
8416     mv "conftest.tmp" "conftest.in"
8417     cp "conftest.in" "conftest.nl"
8418     $as_echo 'EGREP' >> "conftest.nl"
8419     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8420     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8421     as_fn_arith $ac_count + 1 && ac_count=$as_val
8422     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8423       # Best one so far, save it but keep looking for a better one
8424       ac_cv_path_EGREP="$ac_path_EGREP"
8425       ac_path_EGREP_max=$ac_count
8426     fi
8427     # 10*(2^10) chars as input seems more than enough
8428     test $ac_count -gt 10 && break
8429   done
8430   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8431 esac
8432
8433       $ac_path_EGREP_found && break 3
8434     done
8435   done
8436   done
8437 IFS=$as_save_IFS
8438   if test -z "$ac_cv_path_EGREP"; then
8439     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8440   fi
8441 else
8442   ac_cv_path_EGREP=$EGREP
8443 fi
8444
8445    fi
8446 fi
8447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8448 $as_echo "$ac_cv_path_EGREP" >&6; }
8449  EGREP="$ac_cv_path_EGREP"
8450
8451
8452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8453 /* end confdefs.h.  */
8454 #if __ELF__
8455   yes
8456 #endif
8457
8458 _ACEOF
8459 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8460   $EGREP "yes" >/dev/null 2>&1; then :
8461   ELF_SYS=true
8462 else
8463   if test "X$elf" = "Xyes" ; then
8464   ELF_SYS=true
8465 else
8466   ELF_SYS=
8467 fi
8468 fi
8469 rm -f conftest*
8470
8471
8472
8473 #
8474 # Assignments
8475 #
8476
8477 CPPFLAGS="$CPPFLAGS $INCLUDES"
8478 LDFLAGS="$LDFLAGS $LIBDIRS"
8479
8480
8481
8482
8483
8484 # Check whether --with-gnu-ld was given.
8485 if test "${with_gnu_ld+set}" = set; then :
8486   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8487 else
8488   with_gnu_ld=no
8489 fi
8490
8491 ac_prog=ld
8492 if test "$GCC" = yes; then
8493   # Check if gcc -print-prog-name=ld gives a path.
8494   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8495 $as_echo_n "checking for ld used by GCC... " >&6; }
8496   case $host in
8497   *-*-mingw*)
8498     # gcc leaves a trailing carriage return which upsets mingw
8499     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8500   *)
8501     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8502   esac
8503   case "$ac_prog" in
8504     # Accept absolute paths.
8505     [\\/]* | [A-Za-z]:[\\/]*)
8506       re_direlt='/[^/][^/]*/\.\./'
8507       # Canonicalize the path of ld
8508       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8509       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8510         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8511       done
8512       test -z "$LD" && LD="$ac_prog"
8513       ;;
8514   "")
8515     # If it fails, then pretend we aren't using GCC.
8516     ac_prog=ld
8517     ;;
8518   *)
8519     # If it is relative, then search for the first ld in PATH.
8520     with_gnu_ld=unknown
8521     ;;
8522   esac
8523 elif test "$with_gnu_ld" = yes; then
8524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8525 $as_echo_n "checking for GNU ld... " >&6; }
8526 else
8527   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8528 $as_echo_n "checking for non-GNU ld... " >&6; }
8529 fi
8530 if ${ac_cv_path_LD+:} false; then :
8531   $as_echo_n "(cached) " >&6
8532 else
8533   if test -z "$LD"; then
8534   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8535   for ac_dir in $PATH; do
8536     test -z "$ac_dir" && ac_dir=.
8537     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8538       ac_cv_path_LD="$ac_dir/$ac_prog"
8539       # Check to see if the program is GNU ld.  I'd rather use --version,
8540       # but apparently some GNU ld's only accept -v.
8541       # Break only if it was the GNU/non-GNU ld that we prefer.
8542       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8543         test "$with_gnu_ld" != no && break
8544       else
8545         test "$with_gnu_ld" != yes && break
8546       fi
8547     fi
8548   done
8549   IFS="$ac_save_ifs"
8550 else
8551   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8552 fi
8553 fi
8554
8555 LD="$ac_cv_path_LD"
8556 if test -n "$LD"; then
8557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8558 $as_echo "$LD" >&6; }
8559 else
8560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8561 $as_echo "no" >&6; }
8562 fi
8563 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8565 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8566 if ${ac_cv_prog_gnu_ld+:} false; then :
8567   $as_echo_n "(cached) " >&6
8568 else
8569   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8570 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8571   ac_cv_prog_gnu_ld=yes
8572 else
8573   ac_cv_prog_gnu_ld=no
8574 fi
8575 fi
8576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8577 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8578 with_gnu_ld=$ac_cv_prog_gnu_ld
8579
8580
8581
8582
8583 if test -n "$ac_tool_prefix"; then
8584   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8585 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8587 $as_echo_n "checking for $ac_word... " >&6; }
8588 if ${ac_cv_prog_RANLIB+:} false; then :
8589   $as_echo_n "(cached) " >&6
8590 else
8591   if test -n "$RANLIB"; then
8592   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8593 else
8594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8595 for as_dir in $PATH
8596 do
8597   IFS=$as_save_IFS
8598   test -z "$as_dir" && as_dir=.
8599     for ac_exec_ext in '' $ac_executable_extensions; do
8600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8601     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8603     break 2
8604   fi
8605 done
8606   done
8607 IFS=$as_save_IFS
8608
8609 fi
8610 fi
8611 RANLIB=$ac_cv_prog_RANLIB
8612 if test -n "$RANLIB"; then
8613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8614 $as_echo "$RANLIB" >&6; }
8615 else
8616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8617 $as_echo "no" >&6; }
8618 fi
8619
8620
8621 fi
8622 if test -z "$ac_cv_prog_RANLIB"; then
8623   ac_ct_RANLIB=$RANLIB
8624   # Extract the first word of "ranlib", so it can be a program name with args.
8625 set dummy ranlib; ac_word=$2
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8627 $as_echo_n "checking for $ac_word... " >&6; }
8628 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8629   $as_echo_n "(cached) " >&6
8630 else
8631   if test -n "$ac_ct_RANLIB"; then
8632   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8633 else
8634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8635 for as_dir in $PATH
8636 do
8637   IFS=$as_save_IFS
8638   test -z "$as_dir" && as_dir=.
8639     for ac_exec_ext in '' $ac_executable_extensions; do
8640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8641     ac_cv_prog_ac_ct_RANLIB="ranlib"
8642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8643     break 2
8644   fi
8645 done
8646   done
8647 IFS=$as_save_IFS
8648
8649 fi
8650 fi
8651 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8652 if test -n "$ac_ct_RANLIB"; then
8653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8654 $as_echo "$ac_ct_RANLIB" >&6; }
8655 else
8656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8657 $as_echo "no" >&6; }
8658 fi
8659
8660   if test "x$ac_ct_RANLIB" = x; then
8661     RANLIB=":"
8662   else
8663     case $cross_compiling:$ac_tool_warned in
8664 yes:)
8665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8666 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8667 ac_tool_warned=yes ;;
8668 esac
8669     RANLIB=$ac_ct_RANLIB
8670   fi
8671 else
8672   RANLIB="$ac_cv_prog_RANLIB"
8673 fi
8674
8675
8676   if test -n "$ac_tool_prefix"; then
8677   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8678 set dummy ${ac_tool_prefix}strip; ac_word=$2
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8680 $as_echo_n "checking for $ac_word... " >&6; }
8681 if ${ac_cv_prog_STRIP+:} false; then :
8682   $as_echo_n "(cached) " >&6
8683 else
8684   if test -n "$STRIP"; then
8685   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8686 else
8687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8688 for as_dir in $PATH
8689 do
8690   IFS=$as_save_IFS
8691   test -z "$as_dir" && as_dir=.
8692     for ac_exec_ext in '' $ac_executable_extensions; do
8693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8694     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8696     break 2
8697   fi
8698 done
8699   done
8700 IFS=$as_save_IFS
8701
8702 fi
8703 fi
8704 STRIP=$ac_cv_prog_STRIP
8705 if test -n "$STRIP"; then
8706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8707 $as_echo "$STRIP" >&6; }
8708 else
8709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8710 $as_echo "no" >&6; }
8711 fi
8712
8713
8714 fi
8715 if test -z "$ac_cv_prog_STRIP"; then
8716   ac_ct_STRIP=$STRIP
8717   # Extract the first word of "strip", so it can be a program name with args.
8718 set dummy strip; ac_word=$2
8719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8720 $as_echo_n "checking for $ac_word... " >&6; }
8721 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8722   $as_echo_n "(cached) " >&6
8723 else
8724   if test -n "$ac_ct_STRIP"; then
8725   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8726 else
8727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8728 for as_dir in $PATH
8729 do
8730   IFS=$as_save_IFS
8731   test -z "$as_dir" && as_dir=.
8732     for ac_exec_ext in '' $ac_executable_extensions; do
8733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8734     ac_cv_prog_ac_ct_STRIP="strip"
8735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8736     break 2
8737   fi
8738 done
8739   done
8740 IFS=$as_save_IFS
8741
8742 fi
8743 fi
8744 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8745 if test -n "$ac_ct_STRIP"; then
8746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8747 $as_echo "$ac_ct_STRIP" >&6; }
8748 else
8749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8750 $as_echo "no" >&6; }
8751 fi
8752
8753   if test "x$ac_ct_STRIP" = x; then
8754     STRIP=":"
8755   else
8756     case $cross_compiling:$ac_tool_warned in
8757 yes:)
8758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8759 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8760 ac_tool_warned=yes ;;
8761 esac
8762     STRIP=$ac_ct_STRIP
8763   fi
8764 else
8765   STRIP="$ac_cv_prog_STRIP"
8766 fi
8767
8768
8769   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8770 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8771   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8772     STRIP_STATIC_LIB="$STRIP -x"
8773     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8774     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8775 $as_echo "yes" >&6; }
8776   else
8777     case $host_os in
8778       darwin*)
8779         STRIP="$STRIP -x"
8780         STRIP_STATIC_LIB=$STRIP
8781         STRIP_SHARED_LIB=$STRIP
8782         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8783 $as_echo "yes" >&6; }
8784         ;;
8785       *)
8786         STRIP_STATIC_LIB=:
8787         STRIP_SHARED_LIB=:
8788         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8789 $as_echo "no" >&6; }
8790         ;;
8791     esac
8792   fi
8793
8794
8795
8796 if test -n "$ac_tool_prefix"; then
8797   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8798 set dummy ${ac_tool_prefix}ar; ac_word=$2
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8800 $as_echo_n "checking for $ac_word... " >&6; }
8801 if ${ac_cv_prog_AR+:} false; then :
8802   $as_echo_n "(cached) " >&6
8803 else
8804   if test -n "$AR"; then
8805   ac_cv_prog_AR="$AR" # Let the user override the test.
8806 else
8807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8808 for as_dir in $PATH
8809 do
8810   IFS=$as_save_IFS
8811   test -z "$as_dir" && as_dir=.
8812     for ac_exec_ext in '' $ac_executable_extensions; do
8813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8814     ac_cv_prog_AR="${ac_tool_prefix}ar"
8815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8816     break 2
8817   fi
8818 done
8819   done
8820 IFS=$as_save_IFS
8821
8822 fi
8823 fi
8824 AR=$ac_cv_prog_AR
8825 if test -n "$AR"; then
8826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8827 $as_echo "$AR" >&6; }
8828 else
8829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8830 $as_echo "no" >&6; }
8831 fi
8832
8833
8834 fi
8835 if test -z "$ac_cv_prog_AR"; then
8836   ac_ct_AR=$AR
8837   # Extract the first word of "ar", so it can be a program name with args.
8838 set dummy ar; ac_word=$2
8839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8840 $as_echo_n "checking for $ac_word... " >&6; }
8841 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8842   $as_echo_n "(cached) " >&6
8843 else
8844   if test -n "$ac_ct_AR"; then
8845   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8846 else
8847 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8848 for as_dir in $PATH
8849 do
8850   IFS=$as_save_IFS
8851   test -z "$as_dir" && as_dir=.
8852     for ac_exec_ext in '' $ac_executable_extensions; do
8853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8854     ac_cv_prog_ac_ct_AR="ar"
8855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8856     break 2
8857   fi
8858 done
8859   done
8860 IFS=$as_save_IFS
8861
8862 fi
8863 fi
8864 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8865 if test -n "$ac_ct_AR"; then
8866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8867 $as_echo "$ac_ct_AR" >&6; }
8868 else
8869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8870 $as_echo "no" >&6; }
8871 fi
8872
8873   if test "x$ac_ct_AR" = x; then
8874     AR="ar"
8875   else
8876     case $cross_compiling:$ac_tool_warned in
8877 yes:)
8878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8879 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8880 ac_tool_warned=yes ;;
8881 esac
8882     AR=$ac_ct_AR
8883   fi
8884 else
8885   AR="$ac_cv_prog_AR"
8886 fi
8887
8888 if test "$PORTNAME" = "win32"; then
8889   if test -n "$ac_tool_prefix"; then
8890   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8891 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8893 $as_echo_n "checking for $ac_word... " >&6; }
8894 if ${ac_cv_prog_DLLTOOL+:} false; then :
8895   $as_echo_n "(cached) " >&6
8896 else
8897   if test -n "$DLLTOOL"; then
8898   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8899 else
8900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8901 for as_dir in $PATH
8902 do
8903   IFS=$as_save_IFS
8904   test -z "$as_dir" && as_dir=.
8905     for ac_exec_ext in '' $ac_executable_extensions; do
8906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8907     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8909     break 2
8910   fi
8911 done
8912   done
8913 IFS=$as_save_IFS
8914
8915 fi
8916 fi
8917 DLLTOOL=$ac_cv_prog_DLLTOOL
8918 if test -n "$DLLTOOL"; then
8919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8920 $as_echo "$DLLTOOL" >&6; }
8921 else
8922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923 $as_echo "no" >&6; }
8924 fi
8925
8926
8927 fi
8928 if test -z "$ac_cv_prog_DLLTOOL"; then
8929   ac_ct_DLLTOOL=$DLLTOOL
8930   # Extract the first word of "dlltool", so it can be a program name with args.
8931 set dummy dlltool; ac_word=$2
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8933 $as_echo_n "checking for $ac_word... " >&6; }
8934 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8935   $as_echo_n "(cached) " >&6
8936 else
8937   if test -n "$ac_ct_DLLTOOL"; then
8938   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8939 else
8940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8941 for as_dir in $PATH
8942 do
8943   IFS=$as_save_IFS
8944   test -z "$as_dir" && as_dir=.
8945     for ac_exec_ext in '' $ac_executable_extensions; do
8946   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8947     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8949     break 2
8950   fi
8951 done
8952   done
8953 IFS=$as_save_IFS
8954
8955 fi
8956 fi
8957 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8958 if test -n "$ac_ct_DLLTOOL"; then
8959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8960 $as_echo "$ac_ct_DLLTOOL" >&6; }
8961 else
8962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8963 $as_echo "no" >&6; }
8964 fi
8965
8966   if test "x$ac_ct_DLLTOOL" = x; then
8967     DLLTOOL="dlltool"
8968   else
8969     case $cross_compiling:$ac_tool_warned in
8970 yes:)
8971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8972 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8973 ac_tool_warned=yes ;;
8974 esac
8975     DLLTOOL=$ac_ct_DLLTOOL
8976   fi
8977 else
8978   DLLTOOL="$ac_cv_prog_DLLTOOL"
8979 fi
8980
8981   if test -n "$ac_tool_prefix"; then
8982   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8983 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8985 $as_echo_n "checking for $ac_word... " >&6; }
8986 if ${ac_cv_prog_DLLWRAP+:} false; then :
8987   $as_echo_n "(cached) " >&6
8988 else
8989   if test -n "$DLLWRAP"; then
8990   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
8991 else
8992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8993 for as_dir in $PATH
8994 do
8995   IFS=$as_save_IFS
8996   test -z "$as_dir" && as_dir=.
8997     for ac_exec_ext in '' $ac_executable_extensions; do
8998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8999     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9001     break 2
9002   fi
9003 done
9004   done
9005 IFS=$as_save_IFS
9006
9007 fi
9008 fi
9009 DLLWRAP=$ac_cv_prog_DLLWRAP
9010 if test -n "$DLLWRAP"; then
9011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9012 $as_echo "$DLLWRAP" >&6; }
9013 else
9014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9015 $as_echo "no" >&6; }
9016 fi
9017
9018
9019 fi
9020 if test -z "$ac_cv_prog_DLLWRAP"; then
9021   ac_ct_DLLWRAP=$DLLWRAP
9022   # Extract the first word of "dllwrap", so it can be a program name with args.
9023 set dummy dllwrap; ac_word=$2
9024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9025 $as_echo_n "checking for $ac_word... " >&6; }
9026 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9027   $as_echo_n "(cached) " >&6
9028 else
9029   if test -n "$ac_ct_DLLWRAP"; then
9030   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9031 else
9032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9033 for as_dir in $PATH
9034 do
9035   IFS=$as_save_IFS
9036   test -z "$as_dir" && as_dir=.
9037     for ac_exec_ext in '' $ac_executable_extensions; do
9038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9039     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9041     break 2
9042   fi
9043 done
9044   done
9045 IFS=$as_save_IFS
9046
9047 fi
9048 fi
9049 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9050 if test -n "$ac_ct_DLLWRAP"; then
9051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9052 $as_echo "$ac_ct_DLLWRAP" >&6; }
9053 else
9054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9055 $as_echo "no" >&6; }
9056 fi
9057
9058   if test "x$ac_ct_DLLWRAP" = x; then
9059     DLLWRAP="dllwrap"
9060   else
9061     case $cross_compiling:$ac_tool_warned in
9062 yes:)
9063 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9064 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9065 ac_tool_warned=yes ;;
9066 esac
9067     DLLWRAP=$ac_ct_DLLWRAP
9068   fi
9069 else
9070   DLLWRAP="$ac_cv_prog_DLLWRAP"
9071 fi
9072
9073   if test -n "$ac_tool_prefix"; then
9074   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9075 set dummy ${ac_tool_prefix}windres; ac_word=$2
9076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9077 $as_echo_n "checking for $ac_word... " >&6; }
9078 if ${ac_cv_prog_WINDRES+:} false; then :
9079   $as_echo_n "(cached) " >&6
9080 else
9081   if test -n "$WINDRES"; then
9082   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9083 else
9084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9085 for as_dir in $PATH
9086 do
9087   IFS=$as_save_IFS
9088   test -z "$as_dir" && as_dir=.
9089     for ac_exec_ext in '' $ac_executable_extensions; do
9090   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9091     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9093     break 2
9094   fi
9095 done
9096   done
9097 IFS=$as_save_IFS
9098
9099 fi
9100 fi
9101 WINDRES=$ac_cv_prog_WINDRES
9102 if test -n "$WINDRES"; then
9103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9104 $as_echo "$WINDRES" >&6; }
9105 else
9106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9107 $as_echo "no" >&6; }
9108 fi
9109
9110
9111 fi
9112 if test -z "$ac_cv_prog_WINDRES"; then
9113   ac_ct_WINDRES=$WINDRES
9114   # Extract the first word of "windres", so it can be a program name with args.
9115 set dummy windres; ac_word=$2
9116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9117 $as_echo_n "checking for $ac_word... " >&6; }
9118 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9119   $as_echo_n "(cached) " >&6
9120 else
9121   if test -n "$ac_ct_WINDRES"; then
9122   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9123 else
9124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9125 for as_dir in $PATH
9126 do
9127   IFS=$as_save_IFS
9128   test -z "$as_dir" && as_dir=.
9129     for ac_exec_ext in '' $ac_executable_extensions; do
9130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9131     ac_cv_prog_ac_ct_WINDRES="windres"
9132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9133     break 2
9134   fi
9135 done
9136   done
9137 IFS=$as_save_IFS
9138
9139 fi
9140 fi
9141 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9142 if test -n "$ac_ct_WINDRES"; then
9143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9144 $as_echo "$ac_ct_WINDRES" >&6; }
9145 else
9146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9147 $as_echo "no" >&6; }
9148 fi
9149
9150   if test "x$ac_ct_WINDRES" = x; then
9151     WINDRES="windres"
9152   else
9153     case $cross_compiling:$ac_tool_warned in
9154 yes:)
9155 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9156 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9157 ac_tool_warned=yes ;;
9158 esac
9159     WINDRES=$ac_ct_WINDRES
9160   fi
9161 else
9162   WINDRES="$ac_cv_prog_WINDRES"
9163 fi
9164
9165 fi
9166
9167 # Find a good install program.  We prefer a C program (faster),
9168 # so one script is as good as another.  But avoid the broken or
9169 # incompatible versions:
9170 # SysV /etc/install, /usr/sbin/install
9171 # SunOS /usr/etc/install
9172 # IRIX /sbin/install
9173 # AIX /bin/install
9174 # AmigaOS /C/install, which installs bootblocks on floppy discs
9175 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9176 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9177 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9178 # OS/2's system install, which has a completely different semantic
9179 # ./install, which can be erroneously created by make from ./install.sh.
9180 # Reject install programs that cannot install multiple files.
9181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9182 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9183 if test -z "$INSTALL"; then
9184 if ${ac_cv_path_install+:} false; then :
9185   $as_echo_n "(cached) " >&6
9186 else
9187   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9188 for as_dir in $PATH
9189 do
9190   IFS=$as_save_IFS
9191   test -z "$as_dir" && as_dir=.
9192     # Account for people who put trailing slashes in PATH elements.
9193 case $as_dir/ in #((
9194   ./ | .// | /[cC]/* | \
9195   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9196   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9197   /usr/ucb/* ) ;;
9198   *)
9199     # OSF1 and SCO ODT 3.0 have their own names for install.
9200     # Don't use installbsd from OSF since it installs stuff as root
9201     # by default.
9202     for ac_prog in ginstall scoinst install; do
9203       for ac_exec_ext in '' $ac_executable_extensions; do
9204         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9205           if test $ac_prog = install &&
9206             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9207             # AIX install.  It has an incompatible calling convention.
9208             :
9209           elif test $ac_prog = install &&
9210             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9211             # program-specific install script used by HP pwplus--don't use.
9212             :
9213           else
9214             rm -rf conftest.one conftest.two conftest.dir
9215             echo one > conftest.one
9216             echo two > conftest.two
9217             mkdir conftest.dir
9218             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9219               test -s conftest.one && test -s conftest.two &&
9220               test -s conftest.dir/conftest.one &&
9221               test -s conftest.dir/conftest.two
9222             then
9223               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9224               break 3
9225             fi
9226           fi
9227         fi
9228       done
9229     done
9230     ;;
9231 esac
9232
9233   done
9234 IFS=$as_save_IFS
9235
9236 rm -rf conftest.one conftest.two conftest.dir
9237
9238 fi
9239   if test "${ac_cv_path_install+set}" = set; then
9240     INSTALL=$ac_cv_path_install
9241   else
9242     # As a last resort, use the slow shell script.  Don't cache a
9243     # value for INSTALL within a source directory, because that will
9244     # break other packages using the cache if that directory is
9245     # removed, or if the value is a relative name.
9246     INSTALL=$ac_install_sh
9247   fi
9248 fi
9249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9250 $as_echo "$INSTALL" >&6; }
9251
9252 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9253 # It thinks the first close brace ends the variable substitution.
9254 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9255
9256 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9257
9258 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9259
9260 # When Autoconf chooses install-sh as install program it tries to generate
9261 # a relative path to it in each makefile where it substitutes it. This clashes
9262 # with our Makefile.global concept. This workaround helps.
9263 case $INSTALL in
9264   *install-sh*) install_bin='';;
9265   *) install_bin=$INSTALL;;
9266 esac
9267
9268
9269 if test -z "$TAR"; then
9270   for ac_prog in tar
9271 do
9272   # Extract the first word of "$ac_prog", so it can be a program name with args.
9273 set dummy $ac_prog; ac_word=$2
9274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9275 $as_echo_n "checking for $ac_word... " >&6; }
9276 if ${ac_cv_path_TAR+:} false; then :
9277   $as_echo_n "(cached) " >&6
9278 else
9279   case $TAR in
9280   [\\/]* | ?:[\\/]*)
9281   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9282   ;;
9283   *)
9284   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9285 for as_dir in $PATH
9286 do
9287   IFS=$as_save_IFS
9288   test -z "$as_dir" && as_dir=.
9289     for ac_exec_ext in '' $ac_executable_extensions; do
9290   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9291     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9293     break 2
9294   fi
9295 done
9296   done
9297 IFS=$as_save_IFS
9298
9299   ;;
9300 esac
9301 fi
9302 TAR=$ac_cv_path_TAR
9303 if test -n "$TAR"; then
9304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9305 $as_echo "$TAR" >&6; }
9306 else
9307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9308 $as_echo "no" >&6; }
9309 fi
9310
9311
9312   test -n "$TAR" && break
9313 done
9314
9315 else
9316   # Report the value of TAR in configure's output in all cases.
9317   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9318 $as_echo_n "checking for TAR... " >&6; }
9319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9320 $as_echo "$TAR" >&6; }
9321 fi
9322
9323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9324 $as_echo_n "checking whether ln -s works... " >&6; }
9325 LN_S=$as_ln_s
9326 if test "$LN_S" = "ln -s"; then
9327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9328 $as_echo "yes" >&6; }
9329 else
9330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9331 $as_echo "no, using $LN_S" >&6; }
9332 fi
9333
9334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9335 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9336 if test -z "$MKDIR_P"; then
9337   if ${ac_cv_path_mkdir+:} false; then :
9338   $as_echo_n "(cached) " >&6
9339 else
9340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9341 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9342 do
9343   IFS=$as_save_IFS
9344   test -z "$as_dir" && as_dir=.
9345     for ac_prog in mkdir gmkdir; do
9346          for ac_exec_ext in '' $ac_executable_extensions; do
9347            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9348            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9349              'mkdir (GNU coreutils) '* | \
9350              'mkdir (coreutils) '* | \
9351              'mkdir (fileutils) '4.1*)
9352                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9353                break 3;;
9354            esac
9355          done
9356        done
9357   done
9358 IFS=$as_save_IFS
9359
9360 fi
9361
9362   test -d ./--version && rmdir ./--version
9363   if test "${ac_cv_path_mkdir+set}" = set; then
9364     MKDIR_P="$ac_cv_path_mkdir -p"
9365   else
9366     # As a last resort, use the slow shell script.  Don't cache a
9367     # value for MKDIR_P within a source directory, because that will
9368     # break other packages using the cache if that directory is
9369     # removed, or if the value is a relative name.
9370     MKDIR_P="$ac_install_sh -d"
9371   fi
9372 fi
9373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9374 $as_echo "$MKDIR_P" >&6; }
9375
9376 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9377 # a relative path to it in each makefile where it substitutes it. This clashes
9378 # with our Makefile.global concept. This workaround helps.
9379 case $MKDIR_P in
9380   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9381 esac
9382
9383 if test -z "$BISON"; then
9384   for ac_prog in bison
9385 do
9386   # Extract the first word of "$ac_prog", so it can be a program name with args.
9387 set dummy $ac_prog; ac_word=$2
9388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9389 $as_echo_n "checking for $ac_word... " >&6; }
9390 if ${ac_cv_path_BISON+:} false; then :
9391   $as_echo_n "(cached) " >&6
9392 else
9393   case $BISON in
9394   [\\/]* | ?:[\\/]*)
9395   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9396   ;;
9397   *)
9398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9399 for as_dir in $PATH
9400 do
9401   IFS=$as_save_IFS
9402   test -z "$as_dir" && as_dir=.
9403     for ac_exec_ext in '' $ac_executable_extensions; do
9404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9405     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9407     break 2
9408   fi
9409 done
9410   done
9411 IFS=$as_save_IFS
9412
9413   ;;
9414 esac
9415 fi
9416 BISON=$ac_cv_path_BISON
9417 if test -n "$BISON"; then
9418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9419 $as_echo "$BISON" >&6; }
9420 else
9421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9422 $as_echo "no" >&6; }
9423 fi
9424
9425
9426   test -n "$BISON" && break
9427 done
9428
9429 else
9430   # Report the value of BISON in configure's output in all cases.
9431   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9432 $as_echo_n "checking for BISON... " >&6; }
9433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9434 $as_echo "$BISON" >&6; }
9435 fi
9436
9437
9438 if test "$BISON"; then
9439   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9440   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9441 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9442   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9443   then
9444     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9445 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9446 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9447 $as_echo "$as_me: WARNING:
9448 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9449 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9450     BISON=""
9451   fi
9452   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9453   # of the now preferred %name-prefix "base_yy", but the latter
9454   # doesn't work with Bison 2.3 or less.  So for now we silence the
9455   # deprecation warnings.
9456   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9457   then
9458     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9459   fi
9460 fi
9461
9462 if test -z "$BISON"; then
9463   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9464 *** Without Bison you will not be able to build PostgreSQL from Git nor
9465 *** change any of the parser definition files.  You can obtain Bison from
9466 *** a GNU mirror site.  (If you are using the official distribution of
9467 *** PostgreSQL then you do not need to worry about this, because the Bison
9468 *** output is pre-generated.)" >&5
9469 $as_echo "$as_me: WARNING:
9470 *** Without Bison you will not be able to build PostgreSQL from Git nor
9471 *** change any of the parser definition files.  You can obtain Bison from
9472 *** a GNU mirror site.  (If you are using the official distribution of
9473 *** PostgreSQL then you do not need to worry about this, because the Bison
9474 *** output is pre-generated.)" >&2;}
9475 fi
9476
9477
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9479 $as_echo_n "checking for flex... " >&6; }
9480 if ${pgac_cv_path_flex+:} false; then :
9481   $as_echo_n "(cached) " >&6
9482 else
9483   # Let the user override the test
9484 if test -n "$FLEX"; then
9485   pgac_cv_path_flex=$FLEX
9486 else
9487   pgac_save_IFS=$IFS
9488   IFS=$PATH_SEPARATOR
9489   for pgac_dir in $PATH; do
9490     IFS=$pgac_save_IFS
9491     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9492       pgac_dir=`pwd`
9493     fi
9494     for pgac_prog in flex lex; do
9495       pgac_candidate="$pgac_dir/$pgac_prog"
9496       if test -f "$pgac_candidate" \
9497         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9498       then
9499         echo '%%'  > conftest.l
9500         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9501           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9502           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;}'
9503           then
9504             pgac_cv_path_flex=$pgac_candidate
9505             break 2
9506           else
9507             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9508 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9509 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9510 $as_echo "$as_me: WARNING:
9511 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9512 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9513           fi
9514         fi
9515       fi
9516     done
9517   done
9518   rm -f conftest.l lex.yy.c
9519   : ${pgac_cv_path_flex=no}
9520 fi
9521
9522 fi
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9524 $as_echo "$pgac_cv_path_flex" >&6; }
9525 if test x"$pgac_cv_path_flex" = x"no"; then
9526   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9527 *** Without Flex you will not be able to build PostgreSQL from Git nor
9528 *** change any of the scanner definition files.  You can obtain Flex from
9529 *** a GNU mirror site.  (If you are using the official distribution of
9530 *** PostgreSQL then you do not need to worry about this because the Flex
9531 *** output is pre-generated.)" >&5
9532 $as_echo "$as_me: WARNING:
9533 *** Without Flex you will not be able to build PostgreSQL from Git nor
9534 *** change any of the scanner definition files.  You can obtain Flex from
9535 *** a GNU mirror site.  (If you are using the official distribution of
9536 *** PostgreSQL then you do not need to worry about this because the Flex
9537 *** output is pre-generated.)" >&2;}
9538
9539   FLEX=
9540 else
9541   FLEX=$pgac_cv_path_flex
9542   pgac_flex_version=`$FLEX --version 2>/dev/null`
9543   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9544 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9545 fi
9546
9547
9548
9549
9550
9551 if test -z "$PERL"; then
9552   for ac_prog in perl
9553 do
9554   # Extract the first word of "$ac_prog", so it can be a program name with args.
9555 set dummy $ac_prog; ac_word=$2
9556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9557 $as_echo_n "checking for $ac_word... " >&6; }
9558 if ${ac_cv_path_PERL+:} false; then :
9559   $as_echo_n "(cached) " >&6
9560 else
9561   case $PERL in
9562   [\\/]* | ?:[\\/]*)
9563   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9564   ;;
9565   *)
9566   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9567 for as_dir in $PATH
9568 do
9569   IFS=$as_save_IFS
9570   test -z "$as_dir" && as_dir=.
9571     for ac_exec_ext in '' $ac_executable_extensions; do
9572   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9573     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9574     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9575     break 2
9576   fi
9577 done
9578   done
9579 IFS=$as_save_IFS
9580
9581   ;;
9582 esac
9583 fi
9584 PERL=$ac_cv_path_PERL
9585 if test -n "$PERL"; then
9586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9587 $as_echo "$PERL" >&6; }
9588 else
9589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9590 $as_echo "no" >&6; }
9591 fi
9592
9593
9594   test -n "$PERL" && break
9595 done
9596
9597 else
9598   # Report the value of PERL in configure's output in all cases.
9599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9600 $as_echo_n "checking for PERL... " >&6; }
9601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9602 $as_echo "$PERL" >&6; }
9603 fi
9604
9605
9606 if test "$PERL"; then
9607   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'`
9608   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9609 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9610   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9611     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9612   then
9613     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9614 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9615 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9616 $as_echo "$as_me: WARNING:
9617 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9618 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9619     PERL=""
9620   fi
9621 fi
9622
9623 if test -z "$PERL"; then
9624   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9625 *** Without Perl you will not be able to build PostgreSQL from Git.
9626 *** You can obtain Perl from any CPAN mirror site.
9627 *** (If you are using the official distribution of PostgreSQL then you do not
9628 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9629 $as_echo "$as_me: WARNING:
9630 *** Without Perl you will not be able to build PostgreSQL from Git.
9631 *** You can obtain Perl from any CPAN mirror site.
9632 *** (If you are using the official distribution of PostgreSQL then you do not
9633 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9634 fi
9635
9636 if test "$with_perl" = yes; then
9637   if test -z "$PERL"; then
9638     as_fn_error $? "Perl not found" "$LINENO" 5
9639   fi
9640
9641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9642 $as_echo_n "checking for Perl archlibexp... " >&6; }
9643 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9644 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9646 $as_echo "$perl_archlibexp" >&6; }
9647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9648 $as_echo_n "checking for Perl privlibexp... " >&6; }
9649 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9650 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9652 $as_echo "$perl_privlibexp" >&6; }
9653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9654 $as_echo_n "checking for Perl useshrplib... " >&6; }
9655 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9656 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9658 $as_echo "$perl_useshrplib" >&6; }
9659   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9660     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9661 You might have to rebuild your Perl installation.  Refer to the
9662 documentation for details.  Use --without-perl to disable building
9663 PL/Perl." "$LINENO" 5
9664   fi
9665   # On most platforms, archlibexp is also where the Perl include files live ...
9666   perl_includespec="-I$perl_archlibexp/CORE"
9667   # ... but on newer macOS versions, we must use -iwithsysroot to look
9668   # under $PG_SYSROOT
9669   if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9670     if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9671       perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9672     fi
9673   fi
9674
9675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9676 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9677 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9679 $as_echo "$perl_ccflags" >&6; }
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9681 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9682 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9684 $as_echo "$perl_embed_ccflags" >&6; }
9685
9686
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9688 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9689 if test "$PORTNAME" = "win32" ; then
9690         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9691         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9692                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9693         else
9694                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9695                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9696                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9697                 fi
9698         fi
9699 else
9700         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9701         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9702         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9703 fi
9704 if test -z "$perl_embed_ldflags" ; then
9705         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9706 $as_echo "no" >&6; }
9707         as_fn_error $? "could not determine flags for linking embedded Perl.
9708 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9709 installed." "$LINENO" 5
9710 else
9711         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9712 $as_echo "$perl_embed_ldflags" >&6; }
9713 fi
9714
9715 fi
9716
9717 if test "$with_python" = yes; then
9718   if test -z "$PYTHON"; then
9719   for ac_prog in python python3 python2
9720 do
9721   # Extract the first word of "$ac_prog", so it can be a program name with args.
9722 set dummy $ac_prog; ac_word=$2
9723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9724 $as_echo_n "checking for $ac_word... " >&6; }
9725 if ${ac_cv_path_PYTHON+:} false; then :
9726   $as_echo_n "(cached) " >&6
9727 else
9728   case $PYTHON in
9729   [\\/]* | ?:[\\/]*)
9730   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9731   ;;
9732   *)
9733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9734 for as_dir in $PATH
9735 do
9736   IFS=$as_save_IFS
9737   test -z "$as_dir" && as_dir=.
9738     for ac_exec_ext in '' $ac_executable_extensions; do
9739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9740     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9742     break 2
9743   fi
9744 done
9745   done
9746 IFS=$as_save_IFS
9747
9748   ;;
9749 esac
9750 fi
9751 PYTHON=$ac_cv_path_PYTHON
9752 if test -n "$PYTHON"; then
9753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9754 $as_echo "$PYTHON" >&6; }
9755 else
9756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9757 $as_echo "no" >&6; }
9758 fi
9759
9760
9761   test -n "$PYTHON" && break
9762 done
9763
9764 else
9765   # Report the value of PYTHON in configure's output in all cases.
9766   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9767 $as_echo_n "checking for PYTHON... " >&6; }
9768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9769 $as_echo "$PYTHON" >&6; }
9770 fi
9771
9772 if test x"$PYTHON" = x""; then
9773   as_fn_error $? "Python not found" "$LINENO" 5
9774 fi
9775
9776
9777 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9778 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9779 $as_echo "$as_me: using python $python_fullversion" >&6;}
9780 # python_fullversion is typically n.n.n plus some trailing junk
9781 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9782 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9783 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9784 # Reject unsupported Python versions as soon as practical.
9785 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9786   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9787 fi
9788
9789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9790 $as_echo_n "checking for Python distutils module... " >&6; }
9791 if "${PYTHON}" -c 'import distutils' 2>&5
9792 then
9793     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9794 $as_echo "yes" >&6; }
9795 else
9796     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9797 $as_echo "no" >&6; }
9798     as_fn_error $? "distutils module not found" "$LINENO" 5
9799 fi
9800
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9802 $as_echo_n "checking Python configuration directory... " >&6; }
9803 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9805 $as_echo "$python_configdir" >&6; }
9806
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9808 $as_echo_n "checking Python include directories... " >&6; }
9809 python_includespec=`${PYTHON} -c "
9810 import distutils.sysconfig
9811 a = '-I' + distutils.sysconfig.get_python_inc(False)
9812 b = '-I' + distutils.sysconfig.get_python_inc(True)
9813 if a == b:
9814     print(a)
9815 else:
9816     print(a + ' ' + b)"`
9817 if test "$PORTNAME" = win32 ; then
9818     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9819 fi
9820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9821 $as_echo "$python_includespec" >&6; }
9822
9823
9824
9825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9826 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9827
9828 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9829 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9830
9831 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9832 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9833 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9834 then
9835         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9836         found_shlib=1
9837 else
9838         # Otherwise, guess the base name of the shlib.
9839         # LDVERSION was added in Python 3.2, before that use VERSION,
9840         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9841         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9842         if test x"${python_ldversion}" != x""; then
9843                 ldlibrary="python${python_ldversion}"
9844         else
9845                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9846                 if test x"${python_version_var}" != x""; then
9847                         ldlibrary="python${python_version_var}"
9848                 else
9849                         ldlibrary="python${python_version}"
9850                 fi
9851         fi
9852         # Search for a likely-looking file.
9853         found_shlib=0
9854         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9855         do
9856                 # We don't know the platform DLSUFFIX here, so check 'em all.
9857                 for e in .so .dll .dylib .sl; do
9858                         if test -e "$d/lib${ldlibrary}$e"; then
9859                                 python_libdir="$d"
9860                                 found_shlib=1
9861                                 break 2
9862                         fi
9863                 done
9864         done
9865         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9866         # (".so.n.n") as well. However, check this only after failing to find
9867         # ".so" anywhere, because yet other platforms (Debian) put the .so
9868         # symlink in a different directory from the underlying versioned shlib.
9869         if test "$found_shlib" != 1; then
9870                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9871                 do
9872                         for f in "$d/lib${ldlibrary}.so."* ; do
9873                                 if test -e "$f"; then
9874                                         python_libdir="$d"
9875                                         found_shlib=1
9876                                         break 2
9877                                 fi
9878                         done
9879                 done
9880         fi
9881         # As usual, Windows has its own ideas.  Possible default library
9882         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9883         # and the "lib" prefix might not be there.
9884         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9885                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9886                 do
9887                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9888                                 if test -e "$f"; then
9889                                         python_libdir="$d"
9890                                         found_shlib=1
9891                                         break 2
9892                                 fi
9893                         done
9894                 done
9895         fi
9896 fi
9897 if test "$found_shlib" != 1; then
9898         as_fn_error $? "could not find shared library for Python
9899 You might have to rebuild your Python installation.  Refer to the
9900 documentation for details.  Use --without-python to disable building
9901 PL/Python." "$LINENO" 5
9902 fi
9903 python_libspec="-L${python_libdir} -l${ldlibrary}"
9904
9905 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9906
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9908 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9909
9910
9911
9912 fi
9913
9914 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9915   if test -z "$ZIC"; then
9916   for ac_prog in zic
9917 do
9918   # Extract the first word of "$ac_prog", so it can be a program name with args.
9919 set dummy $ac_prog; ac_word=$2
9920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9921 $as_echo_n "checking for $ac_word... " >&6; }
9922 if ${ac_cv_path_ZIC+:} false; then :
9923   $as_echo_n "(cached) " >&6
9924 else
9925   case $ZIC in
9926   [\\/]* | ?:[\\/]*)
9927   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9928   ;;
9929   *)
9930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9931 for as_dir in $PATH
9932 do
9933   IFS=$as_save_IFS
9934   test -z "$as_dir" && as_dir=.
9935     for ac_exec_ext in '' $ac_executable_extensions; do
9936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9937     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9939     break 2
9940   fi
9941 done
9942   done
9943 IFS=$as_save_IFS
9944
9945   ;;
9946 esac
9947 fi
9948 ZIC=$ac_cv_path_ZIC
9949 if test -n "$ZIC"; then
9950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9951 $as_echo "$ZIC" >&6; }
9952 else
9953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9954 $as_echo "no" >&6; }
9955 fi
9956
9957
9958   test -n "$ZIC" && break
9959 done
9960
9961 else
9962   # Report the value of ZIC in configure's output in all cases.
9963   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9964 $as_echo_n "checking for ZIC... " >&6; }
9965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9966 $as_echo "$ZIC" >&6; }
9967 fi
9968
9969   if test -z "$ZIC"; then
9970     as_fn_error $? "
9971 When cross-compiling, either use the option --with-system-tzdata to use
9972 existing time-zone data, or set the environment variable ZIC to a zic
9973 program to use during the build." "$LINENO" 5
9974   fi
9975 fi
9976
9977 #
9978 # Pthreads
9979 #
9980 # For each platform, we need to know about any special compile and link
9981 # libraries, and whether the normal C function names are thread-safe.
9982 # See the comment at the top of src/port/thread.c for more information.
9983 # WIN32 doesn't need the pthread tests;  it always uses threads
9984 #
9985 # These tests are run before the library-tests, because linking with the
9986 # other libraries can pull in the pthread functions as a side-effect.  We
9987 # want to use the -pthread or similar flags directly, and not rely on
9988 # the side-effects of linking with some other library.
9989
9990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
9991 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
9992 if ${ac_cv_path_SED+:} false; then :
9993   $as_echo_n "(cached) " >&6
9994 else
9995             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
9996      for ac_i in 1 2 3 4 5 6 7; do
9997        ac_script="$ac_script$as_nl$ac_script"
9998      done
9999      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10000      { ac_script=; unset ac_script;}
10001      if test -z "$SED"; then
10002   ac_path_SED_found=false
10003   # Loop through the user's path and test for each of PROGNAME-LIST
10004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10005 for as_dir in $PATH
10006 do
10007   IFS=$as_save_IFS
10008   test -z "$as_dir" && as_dir=.
10009     for ac_prog in sed gsed; do
10010     for ac_exec_ext in '' $ac_executable_extensions; do
10011       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10012       as_fn_executable_p "$ac_path_SED" || continue
10013 # Check for GNU ac_path_SED and select it if it is found.
10014   # Check for GNU $ac_path_SED
10015 case `"$ac_path_SED" --version 2>&1` in
10016 *GNU*)
10017   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10018 *)
10019   ac_count=0
10020   $as_echo_n 0123456789 >"conftest.in"
10021   while :
10022   do
10023     cat "conftest.in" "conftest.in" >"conftest.tmp"
10024     mv "conftest.tmp" "conftest.in"
10025     cp "conftest.in" "conftest.nl"
10026     $as_echo '' >> "conftest.nl"
10027     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10028     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10029     as_fn_arith $ac_count + 1 && ac_count=$as_val
10030     if test $ac_count -gt ${ac_path_SED_max-0}; then
10031       # Best one so far, save it but keep looking for a better one
10032       ac_cv_path_SED="$ac_path_SED"
10033       ac_path_SED_max=$ac_count
10034     fi
10035     # 10*(2^10) chars as input seems more than enough
10036     test $ac_count -gt 10 && break
10037   done
10038   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10039 esac
10040
10041       $ac_path_SED_found && break 3
10042     done
10043   done
10044   done
10045 IFS=$as_save_IFS
10046   if test -z "$ac_cv_path_SED"; then
10047     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10048   fi
10049 else
10050   ac_cv_path_SED=$SED
10051 fi
10052
10053 fi
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10055 $as_echo "$ac_cv_path_SED" >&6; }
10056  SED="$ac_cv_path_SED"
10057   rm -f conftest.sed
10058
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10060 $as_echo_n "checking for ANSI C header files... " >&6; }
10061 if ${ac_cv_header_stdc+:} false; then :
10062   $as_echo_n "(cached) " >&6
10063 else
10064   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10065 /* end confdefs.h.  */
10066 #include <stdlib.h>
10067 #include <stdarg.h>
10068 #include <string.h>
10069 #include <float.h>
10070
10071 int
10072 main ()
10073 {
10074
10075   ;
10076   return 0;
10077 }
10078 _ACEOF
10079 if ac_fn_c_try_compile "$LINENO"; then :
10080   ac_cv_header_stdc=yes
10081 else
10082   ac_cv_header_stdc=no
10083 fi
10084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10085
10086 if test $ac_cv_header_stdc = yes; then
10087   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10089 /* end confdefs.h.  */
10090 #include <string.h>
10091
10092 _ACEOF
10093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10094   $EGREP "memchr" >/dev/null 2>&1; then :
10095
10096 else
10097   ac_cv_header_stdc=no
10098 fi
10099 rm -f conftest*
10100
10101 fi
10102
10103 if test $ac_cv_header_stdc = yes; then
10104   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10106 /* end confdefs.h.  */
10107 #include <stdlib.h>
10108
10109 _ACEOF
10110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10111   $EGREP "free" >/dev/null 2>&1; then :
10112
10113 else
10114   ac_cv_header_stdc=no
10115 fi
10116 rm -f conftest*
10117
10118 fi
10119
10120 if test $ac_cv_header_stdc = yes; then
10121   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10122   if test "$cross_compiling" = yes; then :
10123   :
10124 else
10125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10126 /* end confdefs.h.  */
10127 #include <ctype.h>
10128 #include <stdlib.h>
10129 #if ((' ' & 0x0FF) == 0x020)
10130 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10131 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10132 #else
10133 # define ISLOWER(c) \
10134                    (('a' <= (c) && (c) <= 'i') \
10135                      || ('j' <= (c) && (c) <= 'r') \
10136                      || ('s' <= (c) && (c) <= 'z'))
10137 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10138 #endif
10139
10140 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10141 int
10142 main ()
10143 {
10144   int i;
10145   for (i = 0; i < 256; i++)
10146     if (XOR (islower (i), ISLOWER (i))
10147         || toupper (i) != TOUPPER (i))
10148       return 2;
10149   return 0;
10150 }
10151 _ACEOF
10152 if ac_fn_c_try_run "$LINENO"; then :
10153
10154 else
10155   ac_cv_header_stdc=no
10156 fi
10157 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10158   conftest.$ac_objext conftest.beam conftest.$ac_ext
10159 fi
10160
10161 fi
10162 fi
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10164 $as_echo "$ac_cv_header_stdc" >&6; }
10165 if test $ac_cv_header_stdc = yes; then
10166
10167 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10168
10169 fi
10170
10171 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10172 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10173                   inttypes.h stdint.h unistd.h
10174 do :
10175   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10176 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10177 "
10178 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10179   cat >>confdefs.h <<_ACEOF
10180 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10181 _ACEOF
10182
10183 fi
10184
10185 done
10186
10187
10188 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10189    # then
10190
10191
10192
10193
10194 ac_ext=c
10195 ac_cpp='$CPP $CPPFLAGS'
10196 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10197 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10198 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10199
10200 ax_pthread_ok=no
10201
10202 # We used to check for pthread.h first, but this fails if pthread.h
10203 # requires special compiler flags (e.g. on Tru64 or Sequent).
10204 # It gets checked for in the link test anyway.
10205
10206 # First of all, check if the user has set any of the PTHREAD_LIBS,
10207 # etcetera environment variables, and if threads linking works using
10208 # them:
10209 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10210         ax_pthread_save_CC="$CC"
10211         ax_pthread_save_CFLAGS="$CFLAGS"
10212         ax_pthread_save_LIBS="$LIBS"
10213         if test "x$PTHREAD_CC" != "x"; then :
10214   CC="$PTHREAD_CC"
10215 fi
10216         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10217         LIBS="$PTHREAD_LIBS $LIBS"
10218         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10219 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10220         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10221 /* end confdefs.h.  */
10222
10223 /* Override any GCC internal prototype to avoid an error.
10224    Use char because int might match the return type of a GCC
10225    builtin and then its argument prototype would still apply.  */
10226 #ifdef __cplusplus
10227 extern "C"
10228 #endif
10229 char pthread_join ();
10230 int
10231 main ()
10232 {
10233 return pthread_join ();
10234   ;
10235   return 0;
10236 }
10237 _ACEOF
10238 if ac_fn_c_try_link "$LINENO"; then :
10239   ax_pthread_ok=yes
10240 fi
10241 rm -f core conftest.err conftest.$ac_objext \
10242     conftest$ac_exeext conftest.$ac_ext
10243         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10244 $as_echo "$ax_pthread_ok" >&6; }
10245         if test "x$ax_pthread_ok" = "xno"; then
10246                 PTHREAD_LIBS=""
10247                 PTHREAD_CFLAGS=""
10248         fi
10249         CC="$ax_pthread_save_CC"
10250         CFLAGS="$ax_pthread_save_CFLAGS"
10251         LIBS="$ax_pthread_save_LIBS"
10252 fi
10253
10254 # We must check for the threads library under a number of different
10255 # names; the ordering is very important because some systems
10256 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10257 # libraries is broken (non-POSIX).
10258
10259 # Create a list of thread flags to try.  Items starting with a "-" are
10260 # C compiler flags, and other items are library names, except for "none"
10261 # which indicates that we try without any flags at all, and "pthread-config"
10262 # which is a program returning the flags for the Pth emulation library.
10263
10264 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10265
10266 # The ordering *is* (sometimes) important.  Some notes on the
10267 # individual items follow:
10268
10269 # pthreads: AIX (must check this before -lpthread)
10270 # none: in case threads are in libc; should be tried before -Kthread and
10271 #       other compiler flags to prevent continual compiler warnings
10272 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10273 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10274 #           (Note: HP C rejects this with "bad form for `-t' option")
10275 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10276 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10277 #      doesn't hurt to check since this sometimes defines pthreads and
10278 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10279 #      is present but should not be used directly; and before -mthreads,
10280 #      because the compiler interprets this as "-mt" + "-hreads")
10281 # -mthreads: Mingw32/gcc, Lynx/gcc
10282 # pthread: Linux, etcetera
10283 # --thread-safe: KAI C++
10284 # pthread-config: use pthread-config program (for GNU Pth library)
10285
10286 case $host_os in
10287
10288         freebsd*)
10289
10290         # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10291         # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10292
10293         ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10294         ;;
10295
10296         hpux*)
10297
10298         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10299         # multi-threading and also sets -lpthread."
10300
10301         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10302         ;;
10303
10304         openedition*)
10305
10306         # IBM z/OS requires a feature-test macro to be defined in order to
10307         # enable POSIX threads at all, so give the user a hint if this is
10308         # not set. (We don't define these ourselves, as they can affect
10309         # other portions of the system API in unpredictable ways.)
10310
10311         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10312 /* end confdefs.h.  */
10313
10314 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10315              AX_PTHREAD_ZOS_MISSING
10316 #            endif
10317
10318 _ACEOF
10319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10320   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10321   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10322 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10323 fi
10324 rm -f conftest*
10325
10326         ;;
10327
10328         solaris*)
10329
10330         # On Solaris (at least, for some versions), libc contains stubbed
10331         # (non-functional) versions of the pthreads routines, so link-based
10332         # tests will erroneously succeed. (N.B.: The stubs are missing
10333         # pthread_cleanup_push, or rather a function called by this macro,
10334         # so we could check for that, but who knows whether they'll stub
10335         # that too in a future libc.)  So we'll check first for the
10336         # standard Solaris way of linking pthreads (-mt -lpthread).
10337
10338         ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10339         ;;
10340 esac
10341
10342 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10343
10344 if test "x$GCC" = "xyes"; then :
10345   ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10346 fi
10347
10348 # The presence of a feature test macro requesting re-entrant function
10349 # definitions is, on some systems, a strong hint that pthreads support is
10350 # correctly enabled
10351
10352 case $host_os in
10353         darwin* | hpux* | linux* | osf* | solaris*)
10354         ax_pthread_check_macro="_REENTRANT"
10355         ;;
10356
10357         aix*)
10358         ax_pthread_check_macro="_THREAD_SAFE"
10359         ;;
10360
10361         *)
10362         ax_pthread_check_macro="--"
10363         ;;
10364 esac
10365 if test "x$ax_pthread_check_macro" = "x--"; then :
10366   ax_pthread_check_cond=0
10367 else
10368   ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10369 fi
10370
10371 # Are we compiling with Clang?
10372
10373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10374 $as_echo_n "checking whether $CC is Clang... " >&6; }
10375 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10376   $as_echo_n "(cached) " >&6
10377 else
10378   ax_cv_PTHREAD_CLANG=no
10379      # Note that Autoconf sets GCC=yes for Clang as well as GCC
10380      if test "x$GCC" = "xyes"; then
10381         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10382 /* end confdefs.h.  */
10383 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10384 #            if defined(__clang__) && defined(__llvm__)
10385              AX_PTHREAD_CC_IS_CLANG
10386 #            endif
10387
10388 _ACEOF
10389 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10390   $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10391   ax_cv_PTHREAD_CLANG=yes
10392 fi
10393 rm -f conftest*
10394
10395      fi
10396
10397 fi
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10399 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10400 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10401
10402 ax_pthread_clang_warning=no
10403
10404 # Clang needs special handling, because older versions handle the -pthread
10405 # option in a rather... idiosyncratic way
10406
10407 if test "x$ax_pthread_clang" = "xyes"; then
10408
10409         # Clang takes -pthread; it has never supported any other flag
10410
10411         # (Note 1: This will need to be revisited if a system that Clang
10412         # supports has POSIX threads in a separate library.  This tends not
10413         # to be the way of modern systems, but it's conceivable.)
10414
10415         # (Note 2: On some systems, notably Darwin, -pthread is not needed
10416         # to get POSIX threads support; the API is always present and
10417         # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
10418         # -pthread does define _REENTRANT, and while the Darwin headers
10419         # ignore this macro, third-party headers might not.)
10420
10421         PTHREAD_CFLAGS="-pthread"
10422         PTHREAD_LIBS=
10423
10424         ax_pthread_ok=yes
10425
10426         # However, older versions of Clang make a point of warning the user
10427         # that, in an invocation where only linking and no compilation is
10428         # taking place, the -pthread option has no effect ("argument unused
10429         # during compilation").  They expect -pthread to be passed in only
10430         # when source code is being compiled.
10431         #
10432         # Problem is, this is at odds with the way Automake and most other
10433         # C build frameworks function, which is that the same flags used in
10434         # compilation (CFLAGS) are also used in linking.  Many systems
10435         # supported by AX_PTHREAD require exactly this for POSIX threads
10436         # support, and in fact it is often not straightforward to specify a
10437         # flag that is used only in the compilation phase and not in
10438         # linking.  Such a scenario is extremely rare in practice.
10439         #
10440         # Even though use of the -pthread flag in linking would only print
10441         # a warning, this can be a nuisance for well-run software projects
10442         # that build with -Werror.  So if the active version of Clang has
10443         # this misfeature, we search for an option to squash it.
10444
10445         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10446 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10447 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10448   $as_echo_n "(cached) " >&6
10449 else
10450   ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10451              # Create an alternate version of $ac_link that compiles and
10452              # links in two steps (.c -> .o, .o -> exe) instead of one
10453              # (.c -> exe), because the warning occurs only in the second
10454              # step
10455              ax_pthread_save_ac_link="$ac_link"
10456              ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10457              ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10458              ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10459              ax_pthread_save_CFLAGS="$CFLAGS"
10460              for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10461                 if test "x$ax_pthread_try" = "xunknown"; then :
10462   break
10463 fi
10464                 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10465                 ac_link="$ax_pthread_save_ac_link"
10466                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10467 /* end confdefs.h.  */
10468 int main(void){return 0;}
10469 _ACEOF
10470 if ac_fn_c_try_link "$LINENO"; then :
10471   ac_link="$ax_pthread_2step_ac_link"
10472                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10473 /* end confdefs.h.  */
10474 int main(void){return 0;}
10475 _ACEOF
10476 if ac_fn_c_try_link "$LINENO"; then :
10477   break
10478 fi
10479 rm -f core conftest.err conftest.$ac_objext \
10480     conftest$ac_exeext conftest.$ac_ext
10481
10482 fi
10483 rm -f core conftest.err conftest.$ac_objext \
10484     conftest$ac_exeext conftest.$ac_ext
10485              done
10486              ac_link="$ax_pthread_save_ac_link"
10487              CFLAGS="$ax_pthread_save_CFLAGS"
10488              if test "x$ax_pthread_try" = "x"; then :
10489   ax_pthread_try=no
10490 fi
10491              ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10492
10493 fi
10494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10495 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10496
10497         case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10498                 no | unknown) ;;
10499                 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10500         esac
10501
10502 fi # $ax_pthread_clang = yes
10503
10504 if test "x$ax_pthread_ok" = "xno"; then
10505 for ax_pthread_try_flag in $ax_pthread_flags; do
10506
10507         case $ax_pthread_try_flag in
10508                 none)
10509                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10510 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10511                 ;;
10512
10513                 -mt,pthread)
10514                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10515 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10516                 PTHREAD_CFLAGS="-mt"
10517                 PTHREAD_LIBS="-lpthread"
10518                 ;;
10519
10520                 -*)
10521                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10522 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10523                 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10524                 ;;
10525
10526                 pthread-config)
10527                 # Extract the first word of "pthread-config", so it can be a program name with args.
10528 set dummy pthread-config; ac_word=$2
10529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10530 $as_echo_n "checking for $ac_word... " >&6; }
10531 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10532   $as_echo_n "(cached) " >&6
10533 else
10534   if test -n "$ax_pthread_config"; then
10535   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10536 else
10537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10538 for as_dir in $PATH
10539 do
10540   IFS=$as_save_IFS
10541   test -z "$as_dir" && as_dir=.
10542     for ac_exec_ext in '' $ac_executable_extensions; do
10543   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10544     ac_cv_prog_ax_pthread_config="yes"
10545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10546     break 2
10547   fi
10548 done
10549   done
10550 IFS=$as_save_IFS
10551
10552   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10553 fi
10554 fi
10555 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10556 if test -n "$ax_pthread_config"; then
10557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10558 $as_echo "$ax_pthread_config" >&6; }
10559 else
10560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10561 $as_echo "no" >&6; }
10562 fi
10563
10564
10565                 if test "x$ax_pthread_config" = "xno"; then :
10566   continue
10567 fi
10568                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10569                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10570                 ;;
10571
10572                 *)
10573                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
10574 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
10575                 PTHREAD_LIBS="-l$ax_pthread_try_flag"
10576                 ;;
10577         esac
10578
10579         ax_pthread_save_CFLAGS="$CFLAGS"
10580         ax_pthread_save_LIBS="$LIBS"
10581         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10582         LIBS="$PTHREAD_LIBS $LIBS"
10583
10584         # Check for various functions.  We must include pthread.h,
10585         # since some functions may be macros.  (On the Sequent, we
10586         # need a special flag -Kthread to make this header compile.)
10587         # We check for pthread_join because it is in -lpthread on IRIX
10588         # while pthread_create is in libc.  We check for pthread_attr_init
10589         # due to DEC craziness with -lpthreads.  We check for
10590         # pthread_cleanup_push because it is one of the few pthread
10591         # functions on Solaris that doesn't have a non-functional libc stub.
10592         # We try pthread_create on general principles.
10593
10594         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10595 /* end confdefs.h.  */
10596 #include <pthread.h>
10597 #                       if $ax_pthread_check_cond
10598 #                        error "$ax_pthread_check_macro must be defined"
10599 #                       endif
10600                         static void routine(void *a) { a = 0; }
10601                         static void *start_routine(void *a) { return a; }
10602 int
10603 main ()
10604 {
10605 pthread_t th; pthread_attr_t attr;
10606                         pthread_create(&th, 0, start_routine, 0);
10607                         pthread_join(th, 0);
10608                         pthread_attr_init(&attr);
10609                         pthread_cleanup_push(routine, 0);
10610                         pthread_cleanup_pop(0) /* ; */
10611   ;
10612   return 0;
10613 }
10614 _ACEOF
10615 if ac_fn_c_try_link "$LINENO"; then :
10616   ax_pthread_ok=yes
10617 fi
10618 rm -f core conftest.err conftest.$ac_objext \
10619     conftest$ac_exeext conftest.$ac_ext
10620
10621         CFLAGS="$ax_pthread_save_CFLAGS"
10622         LIBS="$ax_pthread_save_LIBS"
10623
10624         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10625 $as_echo "$ax_pthread_ok" >&6; }
10626         if test "x$ax_pthread_ok" = "xyes"; then :
10627   break
10628 fi
10629
10630         PTHREAD_LIBS=""
10631         PTHREAD_CFLAGS=""
10632 done
10633 fi
10634
10635 # Various other checks:
10636 if test "x$ax_pthread_ok" = "xyes"; then
10637         ax_pthread_save_CFLAGS="$CFLAGS"
10638         ax_pthread_save_LIBS="$LIBS"
10639         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10640         LIBS="$PTHREAD_LIBS $LIBS"
10641
10642         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10643         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10644 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10645 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10646   $as_echo_n "(cached) " >&6
10647 else
10648   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10649              for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10650                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10651 /* end confdefs.h.  */
10652 #include <pthread.h>
10653 int
10654 main ()
10655 {
10656 int attr = $ax_pthread_attr; return attr /* ; */
10657   ;
10658   return 0;
10659 }
10660 _ACEOF
10661 if ac_fn_c_try_link "$LINENO"; then :
10662   ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
10663 fi
10664 rm -f core conftest.err conftest.$ac_objext \
10665     conftest$ac_exeext conftest.$ac_ext
10666              done
10667
10668 fi
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10670 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10671         if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
10672                test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
10673                test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
10674
10675 cat >>confdefs.h <<_ACEOF
10676 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10677 _ACEOF
10678
10679                ax_pthread_joinable_attr_defined=yes
10680
10681 fi
10682
10683         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
10684 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
10685 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10686   $as_echo_n "(cached) " >&6
10687 else
10688   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10689              case $host_os in
10690              solaris*)
10691              ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
10692              ;;
10693              esac
10694
10695 fi
10696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10697 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10698         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10699                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10700   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10701                ax_pthread_special_flags_added=yes
10702 fi
10703
10704         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10705 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10706 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10707   $as_echo_n "(cached) " >&6
10708 else
10709   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10710 /* end confdefs.h.  */
10711 #include <pthread.h>
10712 int
10713 main ()
10714 {
10715 int i = PTHREAD_PRIO_INHERIT;
10716   ;
10717   return 0;
10718 }
10719 _ACEOF
10720 if ac_fn_c_try_link "$LINENO"; then :
10721   ax_cv_PTHREAD_PRIO_INHERIT=yes
10722 else
10723   ax_cv_PTHREAD_PRIO_INHERIT=no
10724 fi
10725 rm -f core conftest.err conftest.$ac_objext \
10726     conftest$ac_exeext conftest.$ac_ext
10727
10728 fi
10729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10730 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10731         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
10732                test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
10733
10734 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10735
10736                ax_pthread_prio_inherit_defined=yes
10737
10738 fi
10739
10740         CFLAGS="$ax_pthread_save_CFLAGS"
10741         LIBS="$ax_pthread_save_LIBS"
10742
10743         # More AIX lossage: compile with *_r variant
10744         if test "x$GCC" != "xyes"; then
10745             case $host_os in
10746                 aix*)
10747                 case "x/$CC" in #(
10748   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10749     #handle absolute path differently from PATH based program lookup
10750                      case "x$CC" in #(
10751   x/*) :
10752     if as_fn_executable_p ${CC}_r; then :
10753   PTHREAD_CC="${CC}_r"
10754 fi ;; #(
10755   *) :
10756     for ac_prog in ${CC}_r
10757 do
10758   # Extract the first word of "$ac_prog", so it can be a program name with args.
10759 set dummy $ac_prog; ac_word=$2
10760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10761 $as_echo_n "checking for $ac_word... " >&6; }
10762 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10763   $as_echo_n "(cached) " >&6
10764 else
10765   if test -n "$PTHREAD_CC"; then
10766   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10767 else
10768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10769 for as_dir in $PATH
10770 do
10771   IFS=$as_save_IFS
10772   test -z "$as_dir" && as_dir=.
10773     for ac_exec_ext in '' $ac_executable_extensions; do
10774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10775     ac_cv_prog_PTHREAD_CC="$ac_prog"
10776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10777     break 2
10778   fi
10779 done
10780   done
10781 IFS=$as_save_IFS
10782
10783 fi
10784 fi
10785 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10786 if test -n "$PTHREAD_CC"; then
10787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10788 $as_echo "$PTHREAD_CC" >&6; }
10789 else
10790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10791 $as_echo "no" >&6; }
10792 fi
10793
10794
10795   test -n "$PTHREAD_CC" && break
10796 done
10797 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10798  ;;
10799 esac ;; #(
10800   *) :
10801      ;;
10802 esac
10803                 ;;
10804             esac
10805         fi
10806 fi
10807
10808 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10809
10810
10811
10812
10813
10814 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10815 if test "x$ax_pthread_ok" = "xyes"; then
10816
10817 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10818
10819         :
10820 else
10821         ax_pthread_ok=no
10822
10823 fi
10824 ac_ext=c
10825 ac_cpp='$CPP $CPPFLAGS'
10826 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10827 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10828 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10829
10830         # set thread flags
10831
10832 # Some platforms use these, so just define them.  They can't hurt if they
10833 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10834 # enables 5-arg getpwuid_r, among other things.
10835 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10836
10837 # Check for *_r functions
10838 _CFLAGS="$CFLAGS"
10839 _LIBS="$LIBS"
10840 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10841 LIBS="$LIBS $PTHREAD_LIBS"
10842
10843 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10844 if test "x$ac_cv_header_pthread_h" = xyes; then :
10845
10846 else
10847   as_fn_error $? "
10848 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10849 fi
10850
10851
10852
10853 for ac_func in strerror_r getpwuid_r gethostbyname_r
10854 do :
10855   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10856 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10857 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10858   cat >>confdefs.h <<_ACEOF
10859 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10860 _ACEOF
10861
10862 fi
10863 done
10864
10865
10866 # Do test here with the proper thread flags
10867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10868 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10869 if ${pgac_cv_func_strerror_r_int+:} false; then :
10870   $as_echo_n "(cached) " >&6
10871 else
10872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10873 /* end confdefs.h.  */
10874 #include <string.h>
10875 int
10876 main ()
10877 {
10878 char buf[100];
10879   switch (strerror_r(1, buf, sizeof(buf)))
10880   { case 0: break; default: break; }
10881
10882   ;
10883   return 0;
10884 }
10885 _ACEOF
10886 if ac_fn_c_try_compile "$LINENO"; then :
10887   pgac_cv_func_strerror_r_int=yes
10888 else
10889   pgac_cv_func_strerror_r_int=no
10890 fi
10891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10892 fi
10893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10894 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10895 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10896
10897 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10898
10899 fi
10900
10901
10902 CFLAGS="$_CFLAGS"
10903 LIBS="$_LIBS"
10904
10905
10906 else
10907    # else
10908 # do not use values from template file
10909 PTHREAD_CFLAGS=
10910 PTHREAD_LIBS=
10911
10912 fi # fi
10913
10914
10915
10916
10917
10918 ##
10919 ## Libraries
10920 ##
10921 ## Most libraries are included only if they demonstrably provide a function
10922 ## we need, but libm is an exception: always include it, because there are
10923 ## too many compilers that play cute optimization games that will break
10924 ## probes for standard functions such as pow().
10925 ##
10926
10927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10928 $as_echo_n "checking for main in -lm... " >&6; }
10929 if ${ac_cv_lib_m_main+:} false; then :
10930   $as_echo_n "(cached) " >&6
10931 else
10932   ac_check_lib_save_LIBS=$LIBS
10933 LIBS="-lm  $LIBS"
10934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10935 /* end confdefs.h.  */
10936
10937
10938 int
10939 main ()
10940 {
10941 return main ();
10942   ;
10943   return 0;
10944 }
10945 _ACEOF
10946 if ac_fn_c_try_link "$LINENO"; then :
10947   ac_cv_lib_m_main=yes
10948 else
10949   ac_cv_lib_m_main=no
10950 fi
10951 rm -f core conftest.err conftest.$ac_objext \
10952     conftest$ac_exeext conftest.$ac_ext
10953 LIBS=$ac_check_lib_save_LIBS
10954 fi
10955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10956 $as_echo "$ac_cv_lib_m_main" >&6; }
10957 if test "x$ac_cv_lib_m_main" = xyes; then :
10958   cat >>confdefs.h <<_ACEOF
10959 #define HAVE_LIBM 1
10960 _ACEOF
10961
10962   LIBS="-lm $LIBS"
10963
10964 fi
10965
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10967 $as_echo_n "checking for library containing setproctitle... " >&6; }
10968 if ${ac_cv_search_setproctitle+:} false; then :
10969   $as_echo_n "(cached) " >&6
10970 else
10971   ac_func_search_save_LIBS=$LIBS
10972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10973 /* end confdefs.h.  */
10974
10975 /* Override any GCC internal prototype to avoid an error.
10976    Use char because int might match the return type of a GCC
10977    builtin and then its argument prototype would still apply.  */
10978 #ifdef __cplusplus
10979 extern "C"
10980 #endif
10981 char setproctitle ();
10982 int
10983 main ()
10984 {
10985 return setproctitle ();
10986   ;
10987   return 0;
10988 }
10989 _ACEOF
10990 for ac_lib in '' util; do
10991   if test -z "$ac_lib"; then
10992     ac_res="none required"
10993   else
10994     ac_res=-l$ac_lib
10995     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10996   fi
10997   if ac_fn_c_try_link "$LINENO"; then :
10998   ac_cv_search_setproctitle=$ac_res
10999 fi
11000 rm -f core conftest.err conftest.$ac_objext \
11001     conftest$ac_exeext
11002   if ${ac_cv_search_setproctitle+:} false; then :
11003   break
11004 fi
11005 done
11006 if ${ac_cv_search_setproctitle+:} false; then :
11007
11008 else
11009   ac_cv_search_setproctitle=no
11010 fi
11011 rm conftest.$ac_ext
11012 LIBS=$ac_func_search_save_LIBS
11013 fi
11014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11015 $as_echo "$ac_cv_search_setproctitle" >&6; }
11016 ac_res=$ac_cv_search_setproctitle
11017 if test "$ac_res" != no; then :
11018   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11019
11020 fi
11021
11022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11023 $as_echo_n "checking for library containing dlopen... " >&6; }
11024 if ${ac_cv_search_dlopen+:} false; then :
11025   $as_echo_n "(cached) " >&6
11026 else
11027   ac_func_search_save_LIBS=$LIBS
11028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11029 /* end confdefs.h.  */
11030
11031 /* Override any GCC internal prototype to avoid an error.
11032    Use char because int might match the return type of a GCC
11033    builtin and then its argument prototype would still apply.  */
11034 #ifdef __cplusplus
11035 extern "C"
11036 #endif
11037 char dlopen ();
11038 int
11039 main ()
11040 {
11041 return dlopen ();
11042   ;
11043   return 0;
11044 }
11045 _ACEOF
11046 for ac_lib in '' dl; do
11047   if test -z "$ac_lib"; then
11048     ac_res="none required"
11049   else
11050     ac_res=-l$ac_lib
11051     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11052   fi
11053   if ac_fn_c_try_link "$LINENO"; then :
11054   ac_cv_search_dlopen=$ac_res
11055 fi
11056 rm -f core conftest.err conftest.$ac_objext \
11057     conftest$ac_exeext
11058   if ${ac_cv_search_dlopen+:} false; then :
11059   break
11060 fi
11061 done
11062 if ${ac_cv_search_dlopen+:} false; then :
11063
11064 else
11065   ac_cv_search_dlopen=no
11066 fi
11067 rm conftest.$ac_ext
11068 LIBS=$ac_func_search_save_LIBS
11069 fi
11070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11071 $as_echo "$ac_cv_search_dlopen" >&6; }
11072 ac_res=$ac_cv_search_dlopen
11073 if test "$ac_res" != no; then :
11074   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11075
11076 fi
11077
11078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11079 $as_echo_n "checking for library containing socket... " >&6; }
11080 if ${ac_cv_search_socket+:} false; then :
11081   $as_echo_n "(cached) " >&6
11082 else
11083   ac_func_search_save_LIBS=$LIBS
11084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11085 /* end confdefs.h.  */
11086
11087 /* Override any GCC internal prototype to avoid an error.
11088    Use char because int might match the return type of a GCC
11089    builtin and then its argument prototype would still apply.  */
11090 #ifdef __cplusplus
11091 extern "C"
11092 #endif
11093 char socket ();
11094 int
11095 main ()
11096 {
11097 return socket ();
11098   ;
11099   return 0;
11100 }
11101 _ACEOF
11102 for ac_lib in '' socket ws2_32; do
11103   if test -z "$ac_lib"; then
11104     ac_res="none required"
11105   else
11106     ac_res=-l$ac_lib
11107     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11108   fi
11109   if ac_fn_c_try_link "$LINENO"; then :
11110   ac_cv_search_socket=$ac_res
11111 fi
11112 rm -f core conftest.err conftest.$ac_objext \
11113     conftest$ac_exeext
11114   if ${ac_cv_search_socket+:} false; then :
11115   break
11116 fi
11117 done
11118 if ${ac_cv_search_socket+:} false; then :
11119
11120 else
11121   ac_cv_search_socket=no
11122 fi
11123 rm conftest.$ac_ext
11124 LIBS=$ac_func_search_save_LIBS
11125 fi
11126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11127 $as_echo "$ac_cv_search_socket" >&6; }
11128 ac_res=$ac_cv_search_socket
11129 if test "$ac_res" != no; then :
11130   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11131
11132 fi
11133
11134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11135 $as_echo_n "checking for library containing shl_load... " >&6; }
11136 if ${ac_cv_search_shl_load+:} false; then :
11137   $as_echo_n "(cached) " >&6
11138 else
11139   ac_func_search_save_LIBS=$LIBS
11140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11141 /* end confdefs.h.  */
11142
11143 /* Override any GCC internal prototype to avoid an error.
11144    Use char because int might match the return type of a GCC
11145    builtin and then its argument prototype would still apply.  */
11146 #ifdef __cplusplus
11147 extern "C"
11148 #endif
11149 char shl_load ();
11150 int
11151 main ()
11152 {
11153 return shl_load ();
11154   ;
11155   return 0;
11156 }
11157 _ACEOF
11158 for ac_lib in '' dld; do
11159   if test -z "$ac_lib"; then
11160     ac_res="none required"
11161   else
11162     ac_res=-l$ac_lib
11163     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11164   fi
11165   if ac_fn_c_try_link "$LINENO"; then :
11166   ac_cv_search_shl_load=$ac_res
11167 fi
11168 rm -f core conftest.err conftest.$ac_objext \
11169     conftest$ac_exeext
11170   if ${ac_cv_search_shl_load+:} false; then :
11171   break
11172 fi
11173 done
11174 if ${ac_cv_search_shl_load+:} false; then :
11175
11176 else
11177   ac_cv_search_shl_load=no
11178 fi
11179 rm conftest.$ac_ext
11180 LIBS=$ac_func_search_save_LIBS
11181 fi
11182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11183 $as_echo "$ac_cv_search_shl_load" >&6; }
11184 ac_res=$ac_cv_search_shl_load
11185 if test "$ac_res" != no; then :
11186   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11187
11188 fi
11189
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11191 $as_echo_n "checking for library containing getopt_long... " >&6; }
11192 if ${ac_cv_search_getopt_long+:} false; then :
11193   $as_echo_n "(cached) " >&6
11194 else
11195   ac_func_search_save_LIBS=$LIBS
11196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11197 /* end confdefs.h.  */
11198
11199 /* Override any GCC internal prototype to avoid an error.
11200    Use char because int might match the return type of a GCC
11201    builtin and then its argument prototype would still apply.  */
11202 #ifdef __cplusplus
11203 extern "C"
11204 #endif
11205 char getopt_long ();
11206 int
11207 main ()
11208 {
11209 return getopt_long ();
11210   ;
11211   return 0;
11212 }
11213 _ACEOF
11214 for ac_lib in '' getopt gnugetopt; do
11215   if test -z "$ac_lib"; then
11216     ac_res="none required"
11217   else
11218     ac_res=-l$ac_lib
11219     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11220   fi
11221   if ac_fn_c_try_link "$LINENO"; then :
11222   ac_cv_search_getopt_long=$ac_res
11223 fi
11224 rm -f core conftest.err conftest.$ac_objext \
11225     conftest$ac_exeext
11226   if ${ac_cv_search_getopt_long+:} false; then :
11227   break
11228 fi
11229 done
11230 if ${ac_cv_search_getopt_long+:} false; then :
11231
11232 else
11233   ac_cv_search_getopt_long=no
11234 fi
11235 rm conftest.$ac_ext
11236 LIBS=$ac_func_search_save_LIBS
11237 fi
11238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11239 $as_echo "$ac_cv_search_getopt_long" >&6; }
11240 ac_res=$ac_cv_search_getopt_long
11241 if test "$ac_res" != no; then :
11242   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11243
11244 fi
11245
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11247 $as_echo_n "checking for library containing crypt... " >&6; }
11248 if ${ac_cv_search_crypt+:} false; then :
11249   $as_echo_n "(cached) " >&6
11250 else
11251   ac_func_search_save_LIBS=$LIBS
11252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11253 /* end confdefs.h.  */
11254
11255 /* Override any GCC internal prototype to avoid an error.
11256    Use char because int might match the return type of a GCC
11257    builtin and then its argument prototype would still apply.  */
11258 #ifdef __cplusplus
11259 extern "C"
11260 #endif
11261 char crypt ();
11262 int
11263 main ()
11264 {
11265 return crypt ();
11266   ;
11267   return 0;
11268 }
11269 _ACEOF
11270 for ac_lib in '' crypt; do
11271   if test -z "$ac_lib"; then
11272     ac_res="none required"
11273   else
11274     ac_res=-l$ac_lib
11275     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11276   fi
11277   if ac_fn_c_try_link "$LINENO"; then :
11278   ac_cv_search_crypt=$ac_res
11279 fi
11280 rm -f core conftest.err conftest.$ac_objext \
11281     conftest$ac_exeext
11282   if ${ac_cv_search_crypt+:} false; then :
11283   break
11284 fi
11285 done
11286 if ${ac_cv_search_crypt+:} false; then :
11287
11288 else
11289   ac_cv_search_crypt=no
11290 fi
11291 rm conftest.$ac_ext
11292 LIBS=$ac_func_search_save_LIBS
11293 fi
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11295 $as_echo "$ac_cv_search_crypt" >&6; }
11296 ac_res=$ac_cv_search_crypt
11297 if test "$ac_res" != no; then :
11298   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11299
11300 fi
11301
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11303 $as_echo_n "checking for library containing shm_open... " >&6; }
11304 if ${ac_cv_search_shm_open+:} false; then :
11305   $as_echo_n "(cached) " >&6
11306 else
11307   ac_func_search_save_LIBS=$LIBS
11308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11309 /* end confdefs.h.  */
11310
11311 /* Override any GCC internal prototype to avoid an error.
11312    Use char because int might match the return type of a GCC
11313    builtin and then its argument prototype would still apply.  */
11314 #ifdef __cplusplus
11315 extern "C"
11316 #endif
11317 char shm_open ();
11318 int
11319 main ()
11320 {
11321 return shm_open ();
11322   ;
11323   return 0;
11324 }
11325 _ACEOF
11326 for ac_lib in '' rt; do
11327   if test -z "$ac_lib"; then
11328     ac_res="none required"
11329   else
11330     ac_res=-l$ac_lib
11331     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11332   fi
11333   if ac_fn_c_try_link "$LINENO"; then :
11334   ac_cv_search_shm_open=$ac_res
11335 fi
11336 rm -f core conftest.err conftest.$ac_objext \
11337     conftest$ac_exeext
11338   if ${ac_cv_search_shm_open+:} false; then :
11339   break
11340 fi
11341 done
11342 if ${ac_cv_search_shm_open+:} false; then :
11343
11344 else
11345   ac_cv_search_shm_open=no
11346 fi
11347 rm conftest.$ac_ext
11348 LIBS=$ac_func_search_save_LIBS
11349 fi
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11351 $as_echo "$ac_cv_search_shm_open" >&6; }
11352 ac_res=$ac_cv_search_shm_open
11353 if test "$ac_res" != no; then :
11354   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11355
11356 fi
11357
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11359 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11360 if ${ac_cv_search_shm_unlink+:} false; then :
11361   $as_echo_n "(cached) " >&6
11362 else
11363   ac_func_search_save_LIBS=$LIBS
11364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11365 /* end confdefs.h.  */
11366
11367 /* Override any GCC internal prototype to avoid an error.
11368    Use char because int might match the return type of a GCC
11369    builtin and then its argument prototype would still apply.  */
11370 #ifdef __cplusplus
11371 extern "C"
11372 #endif
11373 char shm_unlink ();
11374 int
11375 main ()
11376 {
11377 return shm_unlink ();
11378   ;
11379   return 0;
11380 }
11381 _ACEOF
11382 for ac_lib in '' rt; do
11383   if test -z "$ac_lib"; then
11384     ac_res="none required"
11385   else
11386     ac_res=-l$ac_lib
11387     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11388   fi
11389   if ac_fn_c_try_link "$LINENO"; then :
11390   ac_cv_search_shm_unlink=$ac_res
11391 fi
11392 rm -f core conftest.err conftest.$ac_objext \
11393     conftest$ac_exeext
11394   if ${ac_cv_search_shm_unlink+:} false; then :
11395   break
11396 fi
11397 done
11398 if ${ac_cv_search_shm_unlink+:} false; then :
11399
11400 else
11401   ac_cv_search_shm_unlink=no
11402 fi
11403 rm conftest.$ac_ext
11404 LIBS=$ac_func_search_save_LIBS
11405 fi
11406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11407 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11408 ac_res=$ac_cv_search_shm_unlink
11409 if test "$ac_res" != no; then :
11410   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11411
11412 fi
11413
11414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11415 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11416 if ${ac_cv_search_clock_gettime+:} false; then :
11417   $as_echo_n "(cached) " >&6
11418 else
11419   ac_func_search_save_LIBS=$LIBS
11420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11421 /* end confdefs.h.  */
11422
11423 /* Override any GCC internal prototype to avoid an error.
11424    Use char because int might match the return type of a GCC
11425    builtin and then its argument prototype would still apply.  */
11426 #ifdef __cplusplus
11427 extern "C"
11428 #endif
11429 char clock_gettime ();
11430 int
11431 main ()
11432 {
11433 return clock_gettime ();
11434   ;
11435   return 0;
11436 }
11437 _ACEOF
11438 for ac_lib in '' rt posix4; do
11439   if test -z "$ac_lib"; then
11440     ac_res="none required"
11441   else
11442     ac_res=-l$ac_lib
11443     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11444   fi
11445   if ac_fn_c_try_link "$LINENO"; then :
11446   ac_cv_search_clock_gettime=$ac_res
11447 fi
11448 rm -f core conftest.err conftest.$ac_objext \
11449     conftest$ac_exeext
11450   if ${ac_cv_search_clock_gettime+:} false; then :
11451   break
11452 fi
11453 done
11454 if ${ac_cv_search_clock_gettime+:} false; then :
11455
11456 else
11457   ac_cv_search_clock_gettime=no
11458 fi
11459 rm conftest.$ac_ext
11460 LIBS=$ac_func_search_save_LIBS
11461 fi
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11463 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11464 ac_res=$ac_cv_search_clock_gettime
11465 if test "$ac_res" != no; then :
11466   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11467
11468 fi
11469
11470 # Solaris:
11471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11472 $as_echo_n "checking for library containing fdatasync... " >&6; }
11473 if ${ac_cv_search_fdatasync+:} false; then :
11474   $as_echo_n "(cached) " >&6
11475 else
11476   ac_func_search_save_LIBS=$LIBS
11477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11478 /* end confdefs.h.  */
11479
11480 /* Override any GCC internal prototype to avoid an error.
11481    Use char because int might match the return type of a GCC
11482    builtin and then its argument prototype would still apply.  */
11483 #ifdef __cplusplus
11484 extern "C"
11485 #endif
11486 char fdatasync ();
11487 int
11488 main ()
11489 {
11490 return fdatasync ();
11491   ;
11492   return 0;
11493 }
11494 _ACEOF
11495 for ac_lib in '' rt posix4; do
11496   if test -z "$ac_lib"; then
11497     ac_res="none required"
11498   else
11499     ac_res=-l$ac_lib
11500     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11501   fi
11502   if ac_fn_c_try_link "$LINENO"; then :
11503   ac_cv_search_fdatasync=$ac_res
11504 fi
11505 rm -f core conftest.err conftest.$ac_objext \
11506     conftest$ac_exeext
11507   if ${ac_cv_search_fdatasync+:} false; then :
11508   break
11509 fi
11510 done
11511 if ${ac_cv_search_fdatasync+:} false; then :
11512
11513 else
11514   ac_cv_search_fdatasync=no
11515 fi
11516 rm conftest.$ac_ext
11517 LIBS=$ac_func_search_save_LIBS
11518 fi
11519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11520 $as_echo "$ac_cv_search_fdatasync" >&6; }
11521 ac_res=$ac_cv_search_fdatasync
11522 if test "$ac_res" != no; then :
11523   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11524
11525 fi
11526
11527 # Required for thread_test.c on Solaris
11528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11529 $as_echo_n "checking for library containing sched_yield... " >&6; }
11530 if ${ac_cv_search_sched_yield+:} false; then :
11531   $as_echo_n "(cached) " >&6
11532 else
11533   ac_func_search_save_LIBS=$LIBS
11534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11535 /* end confdefs.h.  */
11536
11537 /* Override any GCC internal prototype to avoid an error.
11538    Use char because int might match the return type of a GCC
11539    builtin and then its argument prototype would still apply.  */
11540 #ifdef __cplusplus
11541 extern "C"
11542 #endif
11543 char sched_yield ();
11544 int
11545 main ()
11546 {
11547 return sched_yield ();
11548   ;
11549   return 0;
11550 }
11551 _ACEOF
11552 for ac_lib in '' rt; do
11553   if test -z "$ac_lib"; then
11554     ac_res="none required"
11555   else
11556     ac_res=-l$ac_lib
11557     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11558   fi
11559   if ac_fn_c_try_link "$LINENO"; then :
11560   ac_cv_search_sched_yield=$ac_res
11561 fi
11562 rm -f core conftest.err conftest.$ac_objext \
11563     conftest$ac_exeext
11564   if ${ac_cv_search_sched_yield+:} false; then :
11565   break
11566 fi
11567 done
11568 if ${ac_cv_search_sched_yield+:} false; then :
11569
11570 else
11571   ac_cv_search_sched_yield=no
11572 fi
11573 rm conftest.$ac_ext
11574 LIBS=$ac_func_search_save_LIBS
11575 fi
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11577 $as_echo "$ac_cv_search_sched_yield" >&6; }
11578 ac_res=$ac_cv_search_sched_yield
11579 if test "$ac_res" != no; then :
11580   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11581
11582 fi
11583
11584 # Required for thread_test.c on Solaris 2.5:
11585 # Other ports use it too (HP-UX) so test unconditionally
11586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11587 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11588 if ${ac_cv_search_gethostbyname_r+:} false; then :
11589   $as_echo_n "(cached) " >&6
11590 else
11591   ac_func_search_save_LIBS=$LIBS
11592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11593 /* end confdefs.h.  */
11594
11595 /* Override any GCC internal prototype to avoid an error.
11596    Use char because int might match the return type of a GCC
11597    builtin and then its argument prototype would still apply.  */
11598 #ifdef __cplusplus
11599 extern "C"
11600 #endif
11601 char gethostbyname_r ();
11602 int
11603 main ()
11604 {
11605 return gethostbyname_r ();
11606   ;
11607   return 0;
11608 }
11609 _ACEOF
11610 for ac_lib in '' nsl; do
11611   if test -z "$ac_lib"; then
11612     ac_res="none required"
11613   else
11614     ac_res=-l$ac_lib
11615     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11616   fi
11617   if ac_fn_c_try_link "$LINENO"; then :
11618   ac_cv_search_gethostbyname_r=$ac_res
11619 fi
11620 rm -f core conftest.err conftest.$ac_objext \
11621     conftest$ac_exeext
11622   if ${ac_cv_search_gethostbyname_r+:} false; then :
11623   break
11624 fi
11625 done
11626 if ${ac_cv_search_gethostbyname_r+:} false; then :
11627
11628 else
11629   ac_cv_search_gethostbyname_r=no
11630 fi
11631 rm conftest.$ac_ext
11632 LIBS=$ac_func_search_save_LIBS
11633 fi
11634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11635 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11636 ac_res=$ac_cv_search_gethostbyname_r
11637 if test "$ac_res" != no; then :
11638   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11639
11640 fi
11641
11642 # Cygwin:
11643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11644 $as_echo_n "checking for library containing shmget... " >&6; }
11645 if ${ac_cv_search_shmget+:} false; then :
11646   $as_echo_n "(cached) " >&6
11647 else
11648   ac_func_search_save_LIBS=$LIBS
11649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11650 /* end confdefs.h.  */
11651
11652 /* Override any GCC internal prototype to avoid an error.
11653    Use char because int might match the return type of a GCC
11654    builtin and then its argument prototype would still apply.  */
11655 #ifdef __cplusplus
11656 extern "C"
11657 #endif
11658 char shmget ();
11659 int
11660 main ()
11661 {
11662 return shmget ();
11663   ;
11664   return 0;
11665 }
11666 _ACEOF
11667 for ac_lib in '' cygipc; do
11668   if test -z "$ac_lib"; then
11669     ac_res="none required"
11670   else
11671     ac_res=-l$ac_lib
11672     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11673   fi
11674   if ac_fn_c_try_link "$LINENO"; then :
11675   ac_cv_search_shmget=$ac_res
11676 fi
11677 rm -f core conftest.err conftest.$ac_objext \
11678     conftest$ac_exeext
11679   if ${ac_cv_search_shmget+:} false; then :
11680   break
11681 fi
11682 done
11683 if ${ac_cv_search_shmget+:} false; then :
11684
11685 else
11686   ac_cv_search_shmget=no
11687 fi
11688 rm conftest.$ac_ext
11689 LIBS=$ac_func_search_save_LIBS
11690 fi
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11692 $as_echo "$ac_cv_search_shmget" >&6; }
11693 ac_res=$ac_cv_search_shmget
11694 if test "$ac_res" != no; then :
11695   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11696
11697 fi
11698
11699
11700 if test "$with_readline" = yes; then
11701
11702
11703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11704 $as_echo_n "checking for library containing readline... " >&6; }
11705 if ${pgac_cv_check_readline+:} false; then :
11706   $as_echo_n "(cached) " >&6
11707 else
11708   pgac_cv_check_readline=no
11709 pgac_save_LIBS=$LIBS
11710 if test x"$with_libedit_preferred" != x"yes"
11711 then    READLINE_ORDER="-lreadline -ledit"
11712 else    READLINE_ORDER="-ledit -lreadline"
11713 fi
11714 for pgac_rllib in $READLINE_ORDER ; do
11715   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11716     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11717     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11718 /* end confdefs.h.  */
11719
11720 /* Override any GCC internal prototype to avoid an error.
11721    Use char because int might match the return type of a GCC
11722    builtin and then its argument prototype would still apply.  */
11723 #ifdef __cplusplus
11724 extern "C"
11725 #endif
11726 char readline ();
11727 int
11728 main ()
11729 {
11730 return readline ();
11731   ;
11732   return 0;
11733 }
11734 _ACEOF
11735 if ac_fn_c_try_link "$LINENO"; then :
11736
11737       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11738       # recognize dependent libraries; assume curses is needed if we didn't
11739       # find any dependency.
11740       case $host_os in
11741         netbsd* | openbsd* | irix*)
11742           if test x"$pgac_lib" = x"" ; then
11743             pgac_lib=" -lcurses"
11744           fi ;;
11745       esac
11746
11747       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11748       break
11749
11750 fi
11751 rm -f core conftest.err conftest.$ac_objext \
11752     conftest$ac_exeext conftest.$ac_ext
11753   done
11754   if test "$pgac_cv_check_readline" != no ; then
11755     break
11756   fi
11757 done
11758 LIBS=$pgac_save_LIBS
11759
11760 fi
11761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11762 $as_echo "$pgac_cv_check_readline" >&6; }
11763 if test "$pgac_cv_check_readline" != no ; then
11764   LIBS="$pgac_cv_check_readline $LIBS"
11765
11766 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11767
11768 fi
11769
11770
11771   if test x"$pgac_cv_check_readline" = x"no"; then
11772     as_fn_error $? "readline library not found
11773 If you have readline already installed, see config.log for details on the
11774 failure.  It is possible the compiler isn't looking in the proper directory.
11775 Use --without-readline to disable readline support." "$LINENO" 5
11776   fi
11777 fi
11778
11779 if test "$with_zlib" = yes; then
11780   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11781 $as_echo_n "checking for inflate in -lz... " >&6; }
11782 if ${ac_cv_lib_z_inflate+:} false; then :
11783   $as_echo_n "(cached) " >&6
11784 else
11785   ac_check_lib_save_LIBS=$LIBS
11786 LIBS="-lz  $LIBS"
11787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11788 /* end confdefs.h.  */
11789
11790 /* Override any GCC internal prototype to avoid an error.
11791    Use char because int might match the return type of a GCC
11792    builtin and then its argument prototype would still apply.  */
11793 #ifdef __cplusplus
11794 extern "C"
11795 #endif
11796 char inflate ();
11797 int
11798 main ()
11799 {
11800 return inflate ();
11801   ;
11802   return 0;
11803 }
11804 _ACEOF
11805 if ac_fn_c_try_link "$LINENO"; then :
11806   ac_cv_lib_z_inflate=yes
11807 else
11808   ac_cv_lib_z_inflate=no
11809 fi
11810 rm -f core conftest.err conftest.$ac_objext \
11811     conftest$ac_exeext conftest.$ac_ext
11812 LIBS=$ac_check_lib_save_LIBS
11813 fi
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11815 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11816 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11817   cat >>confdefs.h <<_ACEOF
11818 #define HAVE_LIBZ 1
11819 _ACEOF
11820
11821   LIBS="-lz $LIBS"
11822
11823 else
11824   as_fn_error $? "zlib library not found
11825 If you have zlib already installed, see config.log for details on the
11826 failure.  It is possible the compiler isn't looking in the proper directory.
11827 Use --without-zlib to disable zlib support." "$LINENO" 5
11828 fi
11829
11830 fi
11831
11832 if test "$enable_spinlocks" = yes; then
11833
11834 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11835
11836 else
11837   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11838 *** Not using spinlocks will cause poor performance." >&5
11839 $as_echo "$as_me: WARNING:
11840 *** Not using spinlocks will cause poor performance." >&2;}
11841 fi
11842
11843 if test "$enable_atomics" = yes; then
11844
11845 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11846
11847 else
11848   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11849 *** Not using atomic operations will cause poor performance." >&5
11850 $as_echo "$as_me: WARNING:
11851 *** Not using atomic operations will cause poor performance." >&2;}
11852 fi
11853
11854 if test "$with_gssapi" = yes ; then
11855   if test "$PORTNAME" != "win32"; then
11856     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11857 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11858 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11859   $as_echo_n "(cached) " >&6
11860 else
11861   ac_func_search_save_LIBS=$LIBS
11862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11863 /* end confdefs.h.  */
11864
11865 /* Override any GCC internal prototype to avoid an error.
11866    Use char because int might match the return type of a GCC
11867    builtin and then its argument prototype would still apply.  */
11868 #ifdef __cplusplus
11869 extern "C"
11870 #endif
11871 char gss_init_sec_context ();
11872 int
11873 main ()
11874 {
11875 return gss_init_sec_context ();
11876   ;
11877   return 0;
11878 }
11879 _ACEOF
11880 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11881   if test -z "$ac_lib"; then
11882     ac_res="none required"
11883   else
11884     ac_res=-l$ac_lib
11885     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11886   fi
11887   if ac_fn_c_try_link "$LINENO"; then :
11888   ac_cv_search_gss_init_sec_context=$ac_res
11889 fi
11890 rm -f core conftest.err conftest.$ac_objext \
11891     conftest$ac_exeext
11892   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11893   break
11894 fi
11895 done
11896 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11897
11898 else
11899   ac_cv_search_gss_init_sec_context=no
11900 fi
11901 rm conftest.$ac_ext
11902 LIBS=$ac_func_search_save_LIBS
11903 fi
11904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11905 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11906 ac_res=$ac_cv_search_gss_init_sec_context
11907 if test "$ac_res" != no; then :
11908   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11909
11910 else
11911   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11912 fi
11913
11914   else
11915     LIBS="$LIBS -lgssapi32"
11916   fi
11917 fi
11918
11919 if test "$with_openssl" = yes ; then
11920     if test "$PORTNAME" != "win32"; then
11921      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11922 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11923 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11924   $as_echo_n "(cached) " >&6
11925 else
11926   ac_check_lib_save_LIBS=$LIBS
11927 LIBS="-lcrypto  $LIBS"
11928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11929 /* end confdefs.h.  */
11930
11931 /* Override any GCC internal prototype to avoid an error.
11932    Use char because int might match the return type of a GCC
11933    builtin and then its argument prototype would still apply.  */
11934 #ifdef __cplusplus
11935 extern "C"
11936 #endif
11937 char CRYPTO_new_ex_data ();
11938 int
11939 main ()
11940 {
11941 return CRYPTO_new_ex_data ();
11942   ;
11943   return 0;
11944 }
11945 _ACEOF
11946 if ac_fn_c_try_link "$LINENO"; then :
11947   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11948 else
11949   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11950 fi
11951 rm -f core conftest.err conftest.$ac_objext \
11952     conftest$ac_exeext conftest.$ac_ext
11953 LIBS=$ac_check_lib_save_LIBS
11954 fi
11955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11956 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11957 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11958   cat >>confdefs.h <<_ACEOF
11959 #define HAVE_LIBCRYPTO 1
11960 _ACEOF
11961
11962   LIBS="-lcrypto $LIBS"
11963
11964 else
11965   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11966 fi
11967
11968      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11969 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11970 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11971   $as_echo_n "(cached) " >&6
11972 else
11973   ac_check_lib_save_LIBS=$LIBS
11974 LIBS="-lssl  $LIBS"
11975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11976 /* end confdefs.h.  */
11977
11978 /* Override any GCC internal prototype to avoid an error.
11979    Use char because int might match the return type of a GCC
11980    builtin and then its argument prototype would still apply.  */
11981 #ifdef __cplusplus
11982 extern "C"
11983 #endif
11984 char SSL_new ();
11985 int
11986 main ()
11987 {
11988 return SSL_new ();
11989   ;
11990   return 0;
11991 }
11992 _ACEOF
11993 if ac_fn_c_try_link "$LINENO"; then :
11994   ac_cv_lib_ssl_SSL_new=yes
11995 else
11996   ac_cv_lib_ssl_SSL_new=no
11997 fi
11998 rm -f core conftest.err conftest.$ac_objext \
11999     conftest$ac_exeext conftest.$ac_ext
12000 LIBS=$ac_check_lib_save_LIBS
12001 fi
12002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12003 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12004 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12005   cat >>confdefs.h <<_ACEOF
12006 #define HAVE_LIBSSL 1
12007 _ACEOF
12008
12009   LIBS="-lssl $LIBS"
12010
12011 else
12012   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12013 fi
12014
12015   else
12016      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12017 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12018 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12019   $as_echo_n "(cached) " >&6
12020 else
12021   ac_func_search_save_LIBS=$LIBS
12022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12023 /* end confdefs.h.  */
12024
12025 /* Override any GCC internal prototype to avoid an error.
12026    Use char because int might match the return type of a GCC
12027    builtin and then its argument prototype would still apply.  */
12028 #ifdef __cplusplus
12029 extern "C"
12030 #endif
12031 char CRYPTO_new_ex_data ();
12032 int
12033 main ()
12034 {
12035 return CRYPTO_new_ex_data ();
12036   ;
12037   return 0;
12038 }
12039 _ACEOF
12040 for ac_lib in '' eay32 crypto; do
12041   if test -z "$ac_lib"; then
12042     ac_res="none required"
12043   else
12044     ac_res=-l$ac_lib
12045     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12046   fi
12047   if ac_fn_c_try_link "$LINENO"; then :
12048   ac_cv_search_CRYPTO_new_ex_data=$ac_res
12049 fi
12050 rm -f core conftest.err conftest.$ac_objext \
12051     conftest$ac_exeext
12052   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12053   break
12054 fi
12055 done
12056 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12057
12058 else
12059   ac_cv_search_CRYPTO_new_ex_data=no
12060 fi
12061 rm conftest.$ac_ext
12062 LIBS=$ac_func_search_save_LIBS
12063 fi
12064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12065 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12066 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12067 if test "$ac_res" != no; then :
12068   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12069
12070 else
12071   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12072 fi
12073
12074      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12075 $as_echo_n "checking for library containing SSL_new... " >&6; }
12076 if ${ac_cv_search_SSL_new+:} false; then :
12077   $as_echo_n "(cached) " >&6
12078 else
12079   ac_func_search_save_LIBS=$LIBS
12080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12081 /* end confdefs.h.  */
12082
12083 /* Override any GCC internal prototype to avoid an error.
12084    Use char because int might match the return type of a GCC
12085    builtin and then its argument prototype would still apply.  */
12086 #ifdef __cplusplus
12087 extern "C"
12088 #endif
12089 char SSL_new ();
12090 int
12091 main ()
12092 {
12093 return SSL_new ();
12094   ;
12095   return 0;
12096 }
12097 _ACEOF
12098 for ac_lib in '' ssleay32 ssl; do
12099   if test -z "$ac_lib"; then
12100     ac_res="none required"
12101   else
12102     ac_res=-l$ac_lib
12103     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12104   fi
12105   if ac_fn_c_try_link "$LINENO"; then :
12106   ac_cv_search_SSL_new=$ac_res
12107 fi
12108 rm -f core conftest.err conftest.$ac_objext \
12109     conftest$ac_exeext
12110   if ${ac_cv_search_SSL_new+:} false; then :
12111   break
12112 fi
12113 done
12114 if ${ac_cv_search_SSL_new+:} false; then :
12115
12116 else
12117   ac_cv_search_SSL_new=no
12118 fi
12119 rm conftest.$ac_ext
12120 LIBS=$ac_func_search_save_LIBS
12121 fi
12122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12123 $as_echo "$ac_cv_search_SSL_new" >&6; }
12124 ac_res=$ac_cv_search_SSL_new
12125 if test "$ac_res" != no; then :
12126   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12127
12128 else
12129   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12130 fi
12131
12132   fi
12133   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
12134 do :
12135   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12136 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12137 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12138   cat >>confdefs.h <<_ACEOF
12139 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12140 _ACEOF
12141
12142 fi
12143 done
12144
12145   # Functions introduced in OpenSSL 1.1.0. We used to check for
12146   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12147   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12148   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12149   # functions.
12150   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
12151 do :
12152   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12153 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12154 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12155   cat >>confdefs.h <<_ACEOF
12156 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12157 _ACEOF
12158
12159 fi
12160 done
12161
12162   # OpenSSL versions before 1.1.0 required setting callback functions, for
12163   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12164   # function was removed.
12165   for ac_func in CRYPTO_lock
12166 do :
12167   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12168 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12169   cat >>confdefs.h <<_ACEOF
12170 #define HAVE_CRYPTO_LOCK 1
12171 _ACEOF
12172
12173 fi
12174 done
12175
12176 fi
12177
12178 if test "$with_pam" = yes ; then
12179   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12180 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12181 if ${ac_cv_lib_pam_pam_start+:} false; then :
12182   $as_echo_n "(cached) " >&6
12183 else
12184   ac_check_lib_save_LIBS=$LIBS
12185 LIBS="-lpam  $LIBS"
12186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12187 /* end confdefs.h.  */
12188
12189 /* Override any GCC internal prototype to avoid an error.
12190    Use char because int might match the return type of a GCC
12191    builtin and then its argument prototype would still apply.  */
12192 #ifdef __cplusplus
12193 extern "C"
12194 #endif
12195 char pam_start ();
12196 int
12197 main ()
12198 {
12199 return pam_start ();
12200   ;
12201   return 0;
12202 }
12203 _ACEOF
12204 if ac_fn_c_try_link "$LINENO"; then :
12205   ac_cv_lib_pam_pam_start=yes
12206 else
12207   ac_cv_lib_pam_pam_start=no
12208 fi
12209 rm -f core conftest.err conftest.$ac_objext \
12210     conftest$ac_exeext conftest.$ac_ext
12211 LIBS=$ac_check_lib_save_LIBS
12212 fi
12213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12214 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12215 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12216   cat >>confdefs.h <<_ACEOF
12217 #define HAVE_LIBPAM 1
12218 _ACEOF
12219
12220   LIBS="-lpam $LIBS"
12221
12222 else
12223   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12224 fi
12225
12226 fi
12227
12228 if test "$with_libxml" = yes ; then
12229   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12230 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12231 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12232   $as_echo_n "(cached) " >&6
12233 else
12234   ac_check_lib_save_LIBS=$LIBS
12235 LIBS="-lxml2  $LIBS"
12236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12237 /* end confdefs.h.  */
12238
12239 /* Override any GCC internal prototype to avoid an error.
12240    Use char because int might match the return type of a GCC
12241    builtin and then its argument prototype would still apply.  */
12242 #ifdef __cplusplus
12243 extern "C"
12244 #endif
12245 char xmlSaveToBuffer ();
12246 int
12247 main ()
12248 {
12249 return xmlSaveToBuffer ();
12250   ;
12251   return 0;
12252 }
12253 _ACEOF
12254 if ac_fn_c_try_link "$LINENO"; then :
12255   ac_cv_lib_xml2_xmlSaveToBuffer=yes
12256 else
12257   ac_cv_lib_xml2_xmlSaveToBuffer=no
12258 fi
12259 rm -f core conftest.err conftest.$ac_objext \
12260     conftest$ac_exeext conftest.$ac_ext
12261 LIBS=$ac_check_lib_save_LIBS
12262 fi
12263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12264 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12265 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12266   cat >>confdefs.h <<_ACEOF
12267 #define HAVE_LIBXML2 1
12268 _ACEOF
12269
12270   LIBS="-lxml2 $LIBS"
12271
12272 else
12273   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12274 fi
12275
12276 fi
12277
12278 if test "$with_libxslt" = yes ; then
12279   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12280 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12281 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12282   $as_echo_n "(cached) " >&6
12283 else
12284   ac_check_lib_save_LIBS=$LIBS
12285 LIBS="-lxslt  $LIBS"
12286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12287 /* end confdefs.h.  */
12288
12289 /* Override any GCC internal prototype to avoid an error.
12290    Use char because int might match the return type of a GCC
12291    builtin and then its argument prototype would still apply.  */
12292 #ifdef __cplusplus
12293 extern "C"
12294 #endif
12295 char xsltCleanupGlobals ();
12296 int
12297 main ()
12298 {
12299 return xsltCleanupGlobals ();
12300   ;
12301   return 0;
12302 }
12303 _ACEOF
12304 if ac_fn_c_try_link "$LINENO"; then :
12305   ac_cv_lib_xslt_xsltCleanupGlobals=yes
12306 else
12307   ac_cv_lib_xslt_xsltCleanupGlobals=no
12308 fi
12309 rm -f core conftest.err conftest.$ac_objext \
12310     conftest$ac_exeext conftest.$ac_ext
12311 LIBS=$ac_check_lib_save_LIBS
12312 fi
12313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12314 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12315 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12316   cat >>confdefs.h <<_ACEOF
12317 #define HAVE_LIBXSLT 1
12318 _ACEOF
12319
12320   LIBS="-lxslt $LIBS"
12321
12322 else
12323   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12324 fi
12325
12326 fi
12327
12328 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12329 if test "$with_ldap" = yes ; then
12330   _LIBS="$LIBS"
12331   if test "$PORTNAME" != "win32"; then
12332     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12333 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12334 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12335   $as_echo_n "(cached) " >&6
12336 else
12337   ac_check_lib_save_LIBS=$LIBS
12338 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12340 /* end confdefs.h.  */
12341
12342 /* Override any GCC internal prototype to avoid an error.
12343    Use char because int might match the return type of a GCC
12344    builtin and then its argument prototype would still apply.  */
12345 #ifdef __cplusplus
12346 extern "C"
12347 #endif
12348 char ldap_bind ();
12349 int
12350 main ()
12351 {
12352 return ldap_bind ();
12353   ;
12354   return 0;
12355 }
12356 _ACEOF
12357 if ac_fn_c_try_link "$LINENO"; then :
12358   ac_cv_lib_ldap_ldap_bind=yes
12359 else
12360   ac_cv_lib_ldap_ldap_bind=no
12361 fi
12362 rm -f core conftest.err conftest.$ac_objext \
12363     conftest$ac_exeext conftest.$ac_ext
12364 LIBS=$ac_check_lib_save_LIBS
12365 fi
12366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12367 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12368 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12369   cat >>confdefs.h <<_ACEOF
12370 #define HAVE_LIBLDAP 1
12371 _ACEOF
12372
12373   LIBS="-lldap $LIBS"
12374
12375 else
12376   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12377 fi
12378
12379     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12380     if test "$enable_thread_safety" = yes; then
12381       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12382       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12383 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12384 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12385   $as_echo_n "(cached) " >&6
12386 else
12387   ac_check_lib_save_LIBS=$LIBS
12388 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12390 /* end confdefs.h.  */
12391
12392 /* Override any GCC internal prototype to avoid an error.
12393    Use char because int might match the return type of a GCC
12394    builtin and then its argument prototype would still apply.  */
12395 #ifdef __cplusplus
12396 extern "C"
12397 #endif
12398 char ldap_simple_bind ();
12399 int
12400 main ()
12401 {
12402 return ldap_simple_bind ();
12403   ;
12404   return 0;
12405 }
12406 _ACEOF
12407 if ac_fn_c_try_link "$LINENO"; then :
12408   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12409 else
12410   ac_cv_lib_ldap_r_ldap_simple_bind=no
12411 fi
12412 rm -f core conftest.err conftest.$ac_objext \
12413     conftest$ac_exeext conftest.$ac_ext
12414 LIBS=$ac_check_lib_save_LIBS
12415 fi
12416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12417 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12418 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12419   cat >>confdefs.h <<_ACEOF
12420 #define HAVE_LIBLDAP_R 1
12421 _ACEOF
12422
12423   LIBS="-lldap_r $LIBS"
12424
12425 else
12426   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12427 fi
12428
12429       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12430     else
12431       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12432     fi
12433     for ac_func in ldap_initialize
12434 do :
12435   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12436 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12437   cat >>confdefs.h <<_ACEOF
12438 #define HAVE_LDAP_INITIALIZE 1
12439 _ACEOF
12440
12441 fi
12442 done
12443
12444   else
12445     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12446 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12447 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12448   $as_echo_n "(cached) " >&6
12449 else
12450   ac_check_lib_save_LIBS=$LIBS
12451 LIBS="-lwldap32  $LIBS"
12452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12453 /* end confdefs.h.  */
12454
12455 /* Override any GCC internal prototype to avoid an error.
12456    Use char because int might match the return type of a GCC
12457    builtin and then its argument prototype would still apply.  */
12458 #ifdef __cplusplus
12459 extern "C"
12460 #endif
12461 char ldap_bind ();
12462 int
12463 main ()
12464 {
12465 return ldap_bind ();
12466   ;
12467   return 0;
12468 }
12469 _ACEOF
12470 if ac_fn_c_try_link "$LINENO"; then :
12471   ac_cv_lib_wldap32_ldap_bind=yes
12472 else
12473   ac_cv_lib_wldap32_ldap_bind=no
12474 fi
12475 rm -f core conftest.err conftest.$ac_objext \
12476     conftest$ac_exeext conftest.$ac_ext
12477 LIBS=$ac_check_lib_save_LIBS
12478 fi
12479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12480 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12481 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12482   cat >>confdefs.h <<_ACEOF
12483 #define HAVE_LIBWLDAP32 1
12484 _ACEOF
12485
12486   LIBS="-lwldap32 $LIBS"
12487
12488 else
12489   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12490 fi
12491
12492     LDAP_LIBS_FE="-lwldap32"
12493     LDAP_LIBS_BE="-lwldap32"
12494   fi
12495   LIBS="$_LIBS"
12496 fi
12497
12498
12499
12500 # for contrib/sepgsql
12501 if test "$with_selinux" = yes; then
12502   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12503 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12504 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12505   $as_echo_n "(cached) " >&6
12506 else
12507   ac_check_lib_save_LIBS=$LIBS
12508 LIBS="-lselinux  $LIBS"
12509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12510 /* end confdefs.h.  */
12511
12512 /* Override any GCC internal prototype to avoid an error.
12513    Use char because int might match the return type of a GCC
12514    builtin and then its argument prototype would still apply.  */
12515 #ifdef __cplusplus
12516 extern "C"
12517 #endif
12518 char security_compute_create_name ();
12519 int
12520 main ()
12521 {
12522 return security_compute_create_name ();
12523   ;
12524   return 0;
12525 }
12526 _ACEOF
12527 if ac_fn_c_try_link "$LINENO"; then :
12528   ac_cv_lib_selinux_security_compute_create_name=yes
12529 else
12530   ac_cv_lib_selinux_security_compute_create_name=no
12531 fi
12532 rm -f core conftest.err conftest.$ac_objext \
12533     conftest$ac_exeext conftest.$ac_ext
12534 LIBS=$ac_check_lib_save_LIBS
12535 fi
12536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12537 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12538 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12539   cat >>confdefs.h <<_ACEOF
12540 #define HAVE_LIBSELINUX 1
12541 _ACEOF
12542
12543   LIBS="-lselinux $LIBS"
12544
12545 else
12546   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12547 fi
12548
12549 fi
12550
12551 # for contrib/uuid-ossp
12552 if test "$with_uuid" = bsd ; then
12553   # On BSD, the UUID functions are in libc
12554   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12555 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12556   UUID_LIBS=""
12557 else
12558   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12559 fi
12560
12561 elif test "$with_uuid" = e2fs ; then
12562   # On macOS, the UUID functions are in libc
12563   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12564 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12565   UUID_LIBS=""
12566 else
12567   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12568 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12569 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12570   $as_echo_n "(cached) " >&6
12571 else
12572   ac_check_lib_save_LIBS=$LIBS
12573 LIBS="-luuid  $LIBS"
12574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12575 /* end confdefs.h.  */
12576
12577 /* Override any GCC internal prototype to avoid an error.
12578    Use char because int might match the return type of a GCC
12579    builtin and then its argument prototype would still apply.  */
12580 #ifdef __cplusplus
12581 extern "C"
12582 #endif
12583 char uuid_generate ();
12584 int
12585 main ()
12586 {
12587 return uuid_generate ();
12588   ;
12589   return 0;
12590 }
12591 _ACEOF
12592 if ac_fn_c_try_link "$LINENO"; then :
12593   ac_cv_lib_uuid_uuid_generate=yes
12594 else
12595   ac_cv_lib_uuid_uuid_generate=no
12596 fi
12597 rm -f core conftest.err conftest.$ac_objext \
12598     conftest$ac_exeext conftest.$ac_ext
12599 LIBS=$ac_check_lib_save_LIBS
12600 fi
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12602 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12603 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12604   UUID_LIBS="-luuid"
12605 else
12606   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12607 fi
12608
12609 fi
12610
12611 elif test "$with_uuid" = ossp ; then
12612   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12613 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12614 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12615   $as_echo_n "(cached) " >&6
12616 else
12617   ac_check_lib_save_LIBS=$LIBS
12618 LIBS="-lossp-uuid  $LIBS"
12619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12620 /* end confdefs.h.  */
12621
12622 /* Override any GCC internal prototype to avoid an error.
12623    Use char because int might match the return type of a GCC
12624    builtin and then its argument prototype would still apply.  */
12625 #ifdef __cplusplus
12626 extern "C"
12627 #endif
12628 char uuid_export ();
12629 int
12630 main ()
12631 {
12632 return uuid_export ();
12633   ;
12634   return 0;
12635 }
12636 _ACEOF
12637 if ac_fn_c_try_link "$LINENO"; then :
12638   ac_cv_lib_ossp_uuid_uuid_export=yes
12639 else
12640   ac_cv_lib_ossp_uuid_uuid_export=no
12641 fi
12642 rm -f core conftest.err conftest.$ac_objext \
12643     conftest$ac_exeext conftest.$ac_ext
12644 LIBS=$ac_check_lib_save_LIBS
12645 fi
12646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12647 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12648 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12649   UUID_LIBS="-lossp-uuid"
12650 else
12651   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12652 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12653 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12654   $as_echo_n "(cached) " >&6
12655 else
12656   ac_check_lib_save_LIBS=$LIBS
12657 LIBS="-luuid  $LIBS"
12658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12659 /* end confdefs.h.  */
12660
12661 /* Override any GCC internal prototype to avoid an error.
12662    Use char because int might match the return type of a GCC
12663    builtin and then its argument prototype would still apply.  */
12664 #ifdef __cplusplus
12665 extern "C"
12666 #endif
12667 char uuid_export ();
12668 int
12669 main ()
12670 {
12671 return uuid_export ();
12672   ;
12673   return 0;
12674 }
12675 _ACEOF
12676 if ac_fn_c_try_link "$LINENO"; then :
12677   ac_cv_lib_uuid_uuid_export=yes
12678 else
12679   ac_cv_lib_uuid_uuid_export=no
12680 fi
12681 rm -f core conftest.err conftest.$ac_objext \
12682     conftest$ac_exeext conftest.$ac_ext
12683 LIBS=$ac_check_lib_save_LIBS
12684 fi
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12686 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12687 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12688   UUID_LIBS="-luuid"
12689 else
12690   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12691 fi
12692
12693 fi
12694
12695 fi
12696
12697
12698
12699 ##
12700 ## Header files
12701 ##
12702
12703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12704 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12705 if ${ac_cv_header_stdbool_h+:} false; then :
12706   $as_echo_n "(cached) " >&6
12707 else
12708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12709 /* end confdefs.h.  */
12710
12711              #include <stdbool.h>
12712              #ifndef bool
12713               "error: bool is not defined"
12714              #endif
12715              #ifndef false
12716               "error: false is not defined"
12717              #endif
12718              #if false
12719               "error: false is not 0"
12720              #endif
12721              #ifndef true
12722               "error: true is not defined"
12723              #endif
12724              #if true != 1
12725               "error: true is not 1"
12726              #endif
12727              #ifndef __bool_true_false_are_defined
12728               "error: __bool_true_false_are_defined is not defined"
12729              #endif
12730
12731              struct s { _Bool s: 1; _Bool t; } s;
12732
12733              char a[true == 1 ? 1 : -1];
12734              char b[false == 0 ? 1 : -1];
12735              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12736              char d[(bool) 0.5 == true ? 1 : -1];
12737              /* See body of main program for 'e'.  */
12738              char f[(_Bool) 0.0 == false ? 1 : -1];
12739              char g[true];
12740              char h[sizeof (_Bool)];
12741              char i[sizeof s.t];
12742              enum { j = false, k = true, l = false * true, m = true * 256 };
12743              /* The following fails for
12744                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12745              _Bool n[m];
12746              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12747              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12748              /* Catch a bug in an HP-UX C compiler.  See
12749                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12750                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12751               */
12752              _Bool q = true;
12753              _Bool *pq = &q;
12754
12755 int
12756 main ()
12757 {
12758
12759              bool e = &s;
12760              *pq |= q;
12761              *pq |= ! q;
12762              /* Refer to every declared value, to avoid compiler optimizations.  */
12763              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12764                      + !m + !n + !o + !p + !q + !pq);
12765
12766   ;
12767   return 0;
12768 }
12769 _ACEOF
12770 if ac_fn_c_try_compile "$LINENO"; then :
12771   ac_cv_header_stdbool_h=yes
12772 else
12773   ac_cv_header_stdbool_h=no
12774 fi
12775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12776 fi
12777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12778 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12779    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12780 if test "x$ac_cv_type__Bool" = xyes; then :
12781
12782 cat >>confdefs.h <<_ACEOF
12783 #define HAVE__BOOL 1
12784 _ACEOF
12785
12786
12787 fi
12788
12789
12790 if test $ac_cv_header_stdbool_h = yes; then
12791
12792 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12793
12794 fi
12795
12796
12797 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
12798 do :
12799   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12800 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12801 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12802   cat >>confdefs.h <<_ACEOF
12803 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12804 _ACEOF
12805
12806 fi
12807
12808 done
12809
12810
12811 # On BSD, test for net/if.h will fail unless sys/socket.h
12812 # is included first.
12813 for ac_header in net/if.h
12814 do :
12815   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12816 #include <sys/socket.h>
12817
12818 "
12819 if test "x$ac_cv_header_net_if_h" = xyes; then :
12820   cat >>confdefs.h <<_ACEOF
12821 #define HAVE_NET_IF_H 1
12822 _ACEOF
12823
12824 fi
12825
12826 done
12827
12828
12829 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12830 # is included first.
12831 for ac_header in sys/ucred.h
12832 do :
12833   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12834 #include <sys/param.h>
12835
12836 "
12837 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12838   cat >>confdefs.h <<_ACEOF
12839 #define HAVE_SYS_UCRED_H 1
12840 _ACEOF
12841
12842 fi
12843
12844 done
12845
12846
12847 # At least on IRIX, test for netinet/tcp.h will fail unless
12848 # netinet/in.h is included first.
12849 for ac_header in netinet/tcp.h
12850 do :
12851   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12852 #include <netinet/in.h>
12853
12854 "
12855 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12856   cat >>confdefs.h <<_ACEOF
12857 #define HAVE_NETINET_TCP_H 1
12858 _ACEOF
12859
12860 fi
12861
12862 done
12863
12864
12865 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12866   for ac_header in readline/readline.h
12867 do :
12868   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12869 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12870   cat >>confdefs.h <<_ACEOF
12871 #define HAVE_READLINE_READLINE_H 1
12872 _ACEOF
12873
12874 else
12875   for ac_header in readline.h
12876 do :
12877   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12878 if test "x$ac_cv_header_readline_h" = xyes; then :
12879   cat >>confdefs.h <<_ACEOF
12880 #define HAVE_READLINE_H 1
12881 _ACEOF
12882
12883 else
12884   as_fn_error $? "readline header not found
12885 If you have readline already installed, see config.log for details on the
12886 failure.  It is possible the compiler isn't looking in the proper directory.
12887 Use --without-readline to disable readline support." "$LINENO" 5
12888 fi
12889
12890 done
12891
12892 fi
12893
12894 done
12895
12896   for ac_header in readline/history.h
12897 do :
12898   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12899 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12900   cat >>confdefs.h <<_ACEOF
12901 #define HAVE_READLINE_HISTORY_H 1
12902 _ACEOF
12903
12904 else
12905   for ac_header in history.h
12906 do :
12907   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12908 if test "x$ac_cv_header_history_h" = xyes; then :
12909   cat >>confdefs.h <<_ACEOF
12910 #define HAVE_HISTORY_H 1
12911 _ACEOF
12912
12913 else
12914   as_fn_error $? "history header not found
12915 If you have readline already installed, see config.log for details on the
12916 failure.  It is possible the compiler isn't looking in the proper directory.
12917 Use --without-readline to disable readline support." "$LINENO" 5
12918 fi
12919
12920 done
12921
12922 fi
12923
12924 done
12925
12926 fi
12927
12928 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12929 # Some installations of libedit usurp /usr/include/readline/, which seems
12930 # bad practice, since in combined installations readline will have its headers
12931 # there.  We might have to resort to AC_EGREP checks to make sure we found
12932 # the proper header...
12933   for ac_header in editline/readline.h
12934 do :
12935   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12936 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12937   cat >>confdefs.h <<_ACEOF
12938 #define HAVE_EDITLINE_READLINE_H 1
12939 _ACEOF
12940
12941 else
12942   for ac_header in readline.h
12943 do :
12944   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12945 if test "x$ac_cv_header_readline_h" = xyes; then :
12946   cat >>confdefs.h <<_ACEOF
12947 #define HAVE_READLINE_H 1
12948 _ACEOF
12949
12950 else
12951   for ac_header in readline/readline.h
12952 do :
12953   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12954 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12955   cat >>confdefs.h <<_ACEOF
12956 #define HAVE_READLINE_READLINE_H 1
12957 _ACEOF
12958
12959 else
12960   as_fn_error $? "readline header not found
12961 If you have libedit already installed, see config.log for details on the
12962 failure.  It is possible the compiler isn't looking in the proper directory.
12963 Use --without-readline to disable libedit support." "$LINENO" 5
12964 fi
12965
12966 done
12967
12968 fi
12969
12970 done
12971
12972 fi
12973
12974 done
12975
12976 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12977 # not be there at all.  Hence, don't complain if not found.  We must check
12978 # though, since in yet other versions it is an independent header.
12979   for ac_header in editline/history.h
12980 do :
12981   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12982 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12983   cat >>confdefs.h <<_ACEOF
12984 #define HAVE_EDITLINE_HISTORY_H 1
12985 _ACEOF
12986
12987 else
12988   for ac_header in history.h
12989 do :
12990   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12991 if test "x$ac_cv_header_history_h" = xyes; then :
12992   cat >>confdefs.h <<_ACEOF
12993 #define HAVE_HISTORY_H 1
12994 _ACEOF
12995
12996 else
12997   for ac_header in readline/history.h
12998 do :
12999   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13000 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13001   cat >>confdefs.h <<_ACEOF
13002 #define HAVE_READLINE_HISTORY_H 1
13003 _ACEOF
13004
13005 fi
13006
13007 done
13008
13009 fi
13010
13011 done
13012
13013 fi
13014
13015 done
13016
13017 fi
13018
13019 if test "$with_zlib" = yes; then
13020   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13021 if test "x$ac_cv_header_zlib_h" = xyes; then :
13022
13023 else
13024   as_fn_error $? "zlib header not found
13025 If you have zlib already installed, see config.log for details on the
13026 failure.  It is possible the compiler isn't looking in the proper directory.
13027 Use --without-zlib to disable zlib support." "$LINENO" 5
13028 fi
13029
13030
13031 fi
13032
13033 if test "$with_gssapi" = yes ; then
13034   for ac_header in gssapi/gssapi.h
13035 do :
13036   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13037 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13038   cat >>confdefs.h <<_ACEOF
13039 #define HAVE_GSSAPI_GSSAPI_H 1
13040 _ACEOF
13041
13042 else
13043   for ac_header in gssapi.h
13044 do :
13045   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13046 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13047   cat >>confdefs.h <<_ACEOF
13048 #define HAVE_GSSAPI_H 1
13049 _ACEOF
13050
13051 else
13052   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13053 fi
13054
13055 done
13056
13057 fi
13058
13059 done
13060
13061 fi
13062
13063 if test "$with_openssl" = yes ; then
13064   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13065 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13066
13067 else
13068   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13069 fi
13070
13071
13072   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13073 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13074
13075 else
13076   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13077 fi
13078
13079
13080 fi
13081
13082 if test "$with_pam" = yes ; then
13083   for ac_header in security/pam_appl.h
13084 do :
13085   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13086 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13087   cat >>confdefs.h <<_ACEOF
13088 #define HAVE_SECURITY_PAM_APPL_H 1
13089 _ACEOF
13090
13091 else
13092   for ac_header in pam/pam_appl.h
13093 do :
13094   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13095 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13096   cat >>confdefs.h <<_ACEOF
13097 #define HAVE_PAM_PAM_APPL_H 1
13098 _ACEOF
13099
13100 else
13101   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13102 fi
13103
13104 done
13105
13106 fi
13107
13108 done
13109
13110 fi
13111
13112 if test "$with_bsd_auth" = yes ; then
13113   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13114 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13115
13116 else
13117   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13118 fi
13119
13120
13121 fi
13122
13123 if test "$with_systemd" = yes ; then
13124   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13125 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13126
13127 else
13128   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13129 fi
13130
13131
13132 fi
13133
13134 if test "$with_libxml" = yes ; then
13135   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13136 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13137
13138 else
13139   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13140 fi
13141
13142
13143 fi
13144
13145 if test "$with_libxslt" = yes ; then
13146   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13147 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13148
13149 else
13150   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13151 fi
13152
13153
13154 fi
13155
13156 if test "$with_ldap" = yes ; then
13157   if test "$PORTNAME" != "win32"; then
13158      for ac_header in ldap.h
13159 do :
13160   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13161 if test "x$ac_cv_header_ldap_h" = xyes; then :
13162   cat >>confdefs.h <<_ACEOF
13163 #define HAVE_LDAP_H 1
13164 _ACEOF
13165
13166 else
13167   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13168 fi
13169
13170 done
13171
13172      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13173 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13174 if ${pgac_cv_ldap_safe+:} false; then :
13175   $as_echo_n "(cached) " >&6
13176 else
13177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13178 /* end confdefs.h.  */
13179 #include <ldap.h>
13180 #if !defined(LDAP_VENDOR_VERSION) || \
13181      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13182       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13183 choke me
13184 #endif
13185 int
13186 main ()
13187 {
13188
13189   ;
13190   return 0;
13191 }
13192 _ACEOF
13193 if ac_fn_c_try_compile "$LINENO"; then :
13194   pgac_cv_ldap_safe=yes
13195 else
13196   pgac_cv_ldap_safe=no
13197 fi
13198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13199 fi
13200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13201 $as_echo "$pgac_cv_ldap_safe" >&6; }
13202
13203 if test "$pgac_cv_ldap_safe" != yes; then
13204   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13205 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13206 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13207 *** also uses LDAP will crash on exit." >&5
13208 $as_echo "$as_me: WARNING:
13209 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13210 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13211 *** also uses LDAP will crash on exit." >&2;}
13212 fi
13213   else
13214      for ac_header in winldap.h
13215 do :
13216   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13217 #include <windows.h>
13218
13219 "
13220 if test "x$ac_cv_header_winldap_h" = xyes; then :
13221   cat >>confdefs.h <<_ACEOF
13222 #define HAVE_WINLDAP_H 1
13223 _ACEOF
13224
13225 else
13226   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13227 fi
13228
13229 done
13230
13231   fi
13232 fi
13233
13234 if test "$with_bonjour" = yes ; then
13235   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13236 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13237
13238 else
13239   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13240 fi
13241
13242
13243 fi
13244
13245 # for contrib/uuid-ossp
13246 if test "$with_uuid" = bsd ; then
13247   for ac_header in uuid.h
13248 do :
13249   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13250 if test "x$ac_cv_header_uuid_h" = xyes; then :
13251   cat >>confdefs.h <<_ACEOF
13252 #define HAVE_UUID_H 1
13253 _ACEOF
13254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13255 /* end confdefs.h.  */
13256 #include <uuid.h>
13257
13258 _ACEOF
13259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13260   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13261
13262 else
13263   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13264 fi
13265 rm -f conftest*
13266
13267 else
13268   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13269 fi
13270
13271 done
13272
13273 elif test "$with_uuid" = e2fs ; then
13274   for ac_header in uuid/uuid.h
13275 do :
13276   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13277 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13278   cat >>confdefs.h <<_ACEOF
13279 #define HAVE_UUID_UUID_H 1
13280 _ACEOF
13281  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13282 /* end confdefs.h.  */
13283 #include <uuid/uuid.h>
13284
13285 _ACEOF
13286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13287   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13288
13289 else
13290   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13291 fi
13292 rm -f conftest*
13293
13294 else
13295   for ac_header in uuid.h
13296 do :
13297   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13298 if test "x$ac_cv_header_uuid_h" = xyes; then :
13299   cat >>confdefs.h <<_ACEOF
13300 #define HAVE_UUID_H 1
13301 _ACEOF
13302  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13303 /* end confdefs.h.  */
13304 #include <uuid.h>
13305
13306 _ACEOF
13307 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13308   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13309
13310 else
13311   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13312 fi
13313 rm -f conftest*
13314
13315 else
13316   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13317 fi
13318
13319 done
13320
13321 fi
13322
13323 done
13324
13325 elif test "$with_uuid" = ossp ; then
13326   for ac_header in ossp/uuid.h
13327 do :
13328   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13329 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13330   cat >>confdefs.h <<_ACEOF
13331 #define HAVE_OSSP_UUID_H 1
13332 _ACEOF
13333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13334 /* end confdefs.h.  */
13335 #include <ossp/uuid.h>
13336
13337 _ACEOF
13338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13339   $EGREP "uuid_export" >/dev/null 2>&1; then :
13340
13341 else
13342   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13343 fi
13344 rm -f conftest*
13345
13346 else
13347   for ac_header in uuid.h
13348 do :
13349   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13350 if test "x$ac_cv_header_uuid_h" = xyes; then :
13351   cat >>confdefs.h <<_ACEOF
13352 #define HAVE_UUID_H 1
13353 _ACEOF
13354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13355 /* end confdefs.h.  */
13356 #include <uuid.h>
13357
13358 _ACEOF
13359 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13360   $EGREP "uuid_export" >/dev/null 2>&1; then :
13361
13362 else
13363   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13364 fi
13365 rm -f conftest*
13366
13367 else
13368   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13369 fi
13370
13371 done
13372
13373 fi
13374
13375 done
13376
13377 fi
13378
13379 if test "$PORTNAME" = "win32" ; then
13380    for ac_header in crtdefs.h
13381 do :
13382   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13383 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13384   cat >>confdefs.h <<_ACEOF
13385 #define HAVE_CRTDEFS_H 1
13386 _ACEOF
13387
13388 fi
13389
13390 done
13391
13392 fi
13393
13394 ##
13395 ## Types, structures, compiler characteristics
13396 ##
13397
13398   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13399 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13400 if ${ac_cv_c_bigendian+:} false; then :
13401   $as_echo_n "(cached) " >&6
13402 else
13403   ac_cv_c_bigendian=unknown
13404     # See if we're dealing with a universal compiler.
13405     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13406 /* end confdefs.h.  */
13407 #ifndef __APPLE_CC__
13408                not a universal capable compiler
13409              #endif
13410              typedef int dummy;
13411
13412 _ACEOF
13413 if ac_fn_c_try_compile "$LINENO"; then :
13414
13415         # Check for potential -arch flags.  It is not universal unless
13416         # there are at least two -arch flags with different values.
13417         ac_arch=
13418         ac_prev=
13419         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13420          if test -n "$ac_prev"; then
13421            case $ac_word in
13422              i?86 | x86_64 | ppc | ppc64)
13423                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13424                  ac_arch=$ac_word
13425                else
13426                  ac_cv_c_bigendian=universal
13427                  break
13428                fi
13429                ;;
13430            esac
13431            ac_prev=
13432          elif test "x$ac_word" = "x-arch"; then
13433            ac_prev=arch
13434          fi
13435        done
13436 fi
13437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13438     if test $ac_cv_c_bigendian = unknown; then
13439       # See if sys/param.h defines the BYTE_ORDER macro.
13440       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13441 /* end confdefs.h.  */
13442 #include <sys/types.h>
13443              #include <sys/param.h>
13444
13445 int
13446 main ()
13447 {
13448 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13449                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13450                      && LITTLE_ENDIAN)
13451               bogus endian macros
13452              #endif
13453
13454   ;
13455   return 0;
13456 }
13457 _ACEOF
13458 if ac_fn_c_try_compile "$LINENO"; then :
13459   # It does; now see whether it defined to BIG_ENDIAN or not.
13460          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13461 /* end confdefs.h.  */
13462 #include <sys/types.h>
13463                 #include <sys/param.h>
13464
13465 int
13466 main ()
13467 {
13468 #if BYTE_ORDER != BIG_ENDIAN
13469                  not big endian
13470                 #endif
13471
13472   ;
13473   return 0;
13474 }
13475 _ACEOF
13476 if ac_fn_c_try_compile "$LINENO"; then :
13477   ac_cv_c_bigendian=yes
13478 else
13479   ac_cv_c_bigendian=no
13480 fi
13481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13482 fi
13483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13484     fi
13485     if test $ac_cv_c_bigendian = unknown; then
13486       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13487       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13488 /* end confdefs.h.  */
13489 #include <limits.h>
13490
13491 int
13492 main ()
13493 {
13494 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13495               bogus endian macros
13496              #endif
13497
13498   ;
13499   return 0;
13500 }
13501 _ACEOF
13502 if ac_fn_c_try_compile "$LINENO"; then :
13503   # It does; now see whether it defined to _BIG_ENDIAN or not.
13504          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13505 /* end confdefs.h.  */
13506 #include <limits.h>
13507
13508 int
13509 main ()
13510 {
13511 #ifndef _BIG_ENDIAN
13512                  not big endian
13513                 #endif
13514
13515   ;
13516   return 0;
13517 }
13518 _ACEOF
13519 if ac_fn_c_try_compile "$LINENO"; then :
13520   ac_cv_c_bigendian=yes
13521 else
13522   ac_cv_c_bigendian=no
13523 fi
13524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13525 fi
13526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13527     fi
13528     if test $ac_cv_c_bigendian = unknown; then
13529       # Compile a test program.
13530       if test "$cross_compiling" = yes; then :
13531   # Try to guess by grepping values from an object file.
13532          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13533 /* end confdefs.h.  */
13534 short int ascii_mm[] =
13535                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13536                 short int ascii_ii[] =
13537                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13538                 int use_ascii (int i) {
13539                   return ascii_mm[i] + ascii_ii[i];
13540                 }
13541                 short int ebcdic_ii[] =
13542                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13543                 short int ebcdic_mm[] =
13544                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13545                 int use_ebcdic (int i) {
13546                   return ebcdic_mm[i] + ebcdic_ii[i];
13547                 }
13548                 extern int foo;
13549
13550 int
13551 main ()
13552 {
13553 return use_ascii (foo) == use_ebcdic (foo);
13554   ;
13555   return 0;
13556 }
13557 _ACEOF
13558 if ac_fn_c_try_compile "$LINENO"; then :
13559   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13560               ac_cv_c_bigendian=yes
13561             fi
13562             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13563               if test "$ac_cv_c_bigendian" = unknown; then
13564                 ac_cv_c_bigendian=no
13565               else
13566                 # finding both strings is unlikely to happen, but who knows?
13567                 ac_cv_c_bigendian=unknown
13568               fi
13569             fi
13570 fi
13571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13572 else
13573   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13574 /* end confdefs.h.  */
13575 $ac_includes_default
13576 int
13577 main ()
13578 {
13579
13580              /* Are we little or big endian?  From Harbison&Steele.  */
13581              union
13582              {
13583                long int l;
13584                char c[sizeof (long int)];
13585              } u;
13586              u.l = 1;
13587              return u.c[sizeof (long int) - 1] == 1;
13588
13589   ;
13590   return 0;
13591 }
13592 _ACEOF
13593 if ac_fn_c_try_run "$LINENO"; then :
13594   ac_cv_c_bigendian=no
13595 else
13596   ac_cv_c_bigendian=yes
13597 fi
13598 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13599   conftest.$ac_objext conftest.beam conftest.$ac_ext
13600 fi
13601
13602     fi
13603 fi
13604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13605 $as_echo "$ac_cv_c_bigendian" >&6; }
13606  case $ac_cv_c_bigendian in #(
13607    yes)
13608      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13609 ;; #(
13610    no)
13611       ;; #(
13612    universal)
13613
13614 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13615
13616      ;; #(
13617    *)
13618      as_fn_error $? "unknown endianness
13619  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13620  esac
13621
13622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13623 $as_echo_n "checking for inline... " >&6; }
13624 if ${ac_cv_c_inline+:} false; then :
13625   $as_echo_n "(cached) " >&6
13626 else
13627   ac_cv_c_inline=no
13628 for ac_kw in inline __inline__ __inline; do
13629   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13630 /* end confdefs.h.  */
13631 #ifndef __cplusplus
13632 typedef int foo_t;
13633 static $ac_kw foo_t static_foo () {return 0; }
13634 $ac_kw foo_t foo () {return 0; }
13635 #endif
13636
13637 _ACEOF
13638 if ac_fn_c_try_compile "$LINENO"; then :
13639   ac_cv_c_inline=$ac_kw
13640 fi
13641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13642   test "$ac_cv_c_inline" != no && break
13643 done
13644
13645 fi
13646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13647 $as_echo "$ac_cv_c_inline" >&6; }
13648
13649 case $ac_cv_c_inline in
13650   inline | yes) ;;
13651   *)
13652     case $ac_cv_c_inline in
13653       no) ac_val=;;
13654       *) ac_val=$ac_cv_c_inline;;
13655     esac
13656     cat >>confdefs.h <<_ACEOF
13657 #ifndef __cplusplus
13658 #define inline $ac_val
13659 #endif
13660 _ACEOF
13661     ;;
13662 esac
13663
13664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13665 $as_echo_n "checking for printf format archetype... " >&6; }
13666 if ${pgac_cv_printf_archetype+:} false; then :
13667   $as_echo_n "(cached) " >&6
13668 else
13669   pgac_cv_printf_archetype=gnu_printf
13670 ac_save_c_werror_flag=$ac_c_werror_flag
13671 ac_c_werror_flag=yes
13672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13673 /* end confdefs.h.  */
13674 extern void pgac_write(int ignore, const char *fmt,...)
13675 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13676 int
13677 main ()
13678 {
13679 pgac_write(0, "error %s: %m", "foo");
13680   ;
13681   return 0;
13682 }
13683 _ACEOF
13684 if ac_fn_c_try_compile "$LINENO"; then :
13685   ac_archetype_ok=yes
13686 else
13687   ac_archetype_ok=no
13688 fi
13689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13690 ac_c_werror_flag=$ac_save_c_werror_flag
13691
13692 if [ "$ac_archetype_ok" = no ]; then
13693   pgac_cv_printf_archetype=__syslog__
13694   ac_save_c_werror_flag=$ac_c_werror_flag
13695 ac_c_werror_flag=yes
13696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13697 /* end confdefs.h.  */
13698 extern void pgac_write(int ignore, const char *fmt,...)
13699 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13700 int
13701 main ()
13702 {
13703 pgac_write(0, "error %s: %m", "foo");
13704   ;
13705   return 0;
13706 }
13707 _ACEOF
13708 if ac_fn_c_try_compile "$LINENO"; then :
13709   ac_archetype_ok=yes
13710 else
13711   ac_archetype_ok=no
13712 fi
13713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13714 ac_c_werror_flag=$ac_save_c_werror_flag
13715
13716   if [ "$ac_archetype_ok" = no ]; then
13717     pgac_cv_printf_archetype=printf
13718   fi
13719 fi
13720 fi
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13722 $as_echo "$pgac_cv_printf_archetype" >&6; }
13723
13724 cat >>confdefs.h <<_ACEOF
13725 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13726 _ACEOF
13727
13728
13729
13730   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13731 $as_echo_n "checking for flexible array members... " >&6; }
13732 if ${ac_cv_c_flexmember+:} false; then :
13733   $as_echo_n "(cached) " >&6
13734 else
13735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13736 /* end confdefs.h.  */
13737 #include <stdlib.h>
13738             #include <stdio.h>
13739             #include <stddef.h>
13740             struct s { int n; double d[]; };
13741 int
13742 main ()
13743 {
13744 int m = getchar ();
13745             struct s *p = malloc (offsetof (struct s, d)
13746                                   + m * sizeof (double));
13747             p->d[0] = 0.0;
13748             return p->d != (double *) NULL;
13749   ;
13750   return 0;
13751 }
13752 _ACEOF
13753 if ac_fn_c_try_compile "$LINENO"; then :
13754   ac_cv_c_flexmember=yes
13755 else
13756   ac_cv_c_flexmember=no
13757 fi
13758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13759 fi
13760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13761 $as_echo "$ac_cv_c_flexmember" >&6; }
13762   if test $ac_cv_c_flexmember = yes; then
13763
13764 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13765
13766   else
13767     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13768
13769   fi
13770
13771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13772 $as_echo_n "checking for signed types... " >&6; }
13773 if ${pgac_cv_c_signed+:} false; then :
13774   $as_echo_n "(cached) " >&6
13775 else
13776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13777 /* end confdefs.h.  */
13778
13779 int
13780 main ()
13781 {
13782 signed char c; signed short s; signed int i;
13783   ;
13784   return 0;
13785 }
13786 _ACEOF
13787 if ac_fn_c_try_compile "$LINENO"; then :
13788   pgac_cv_c_signed=yes
13789 else
13790   pgac_cv_c_signed=no
13791 fi
13792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13793 fi
13794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13795 $as_echo "$pgac_cv_c_signed" >&6; }
13796 if test x"$pgac_cv_c_signed" = xno ; then
13797
13798 $as_echo "#define signed /**/" >>confdefs.h
13799
13800 fi
13801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13802 $as_echo_n "checking for __func__... " >&6; }
13803 if ${pgac_cv_funcname_func_support+:} false; then :
13804   $as_echo_n "(cached) " >&6
13805 else
13806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13807 /* end confdefs.h.  */
13808 #include <stdio.h>
13809 int
13810 main ()
13811 {
13812 printf("%s\n", __func__);
13813   ;
13814   return 0;
13815 }
13816 _ACEOF
13817 if ac_fn_c_try_compile "$LINENO"; then :
13818   pgac_cv_funcname_func_support=yes
13819 else
13820   pgac_cv_funcname_func_support=no
13821 fi
13822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13823 fi
13824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13825 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13826 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13827
13828 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13829
13830 else
13831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13832 $as_echo_n "checking for __FUNCTION__... " >&6; }
13833 if ${pgac_cv_funcname_function_support+:} false; then :
13834   $as_echo_n "(cached) " >&6
13835 else
13836   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13837 /* end confdefs.h.  */
13838 #include <stdio.h>
13839 int
13840 main ()
13841 {
13842 printf("%s\n", __FUNCTION__);
13843   ;
13844   return 0;
13845 }
13846 _ACEOF
13847 if ac_fn_c_try_compile "$LINENO"; then :
13848   pgac_cv_funcname_function_support=yes
13849 else
13850   pgac_cv_funcname_function_support=no
13851 fi
13852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13853 fi
13854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13855 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13856 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13857
13858 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13859
13860 fi
13861 fi
13862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13863 $as_echo_n "checking for _Static_assert... " >&6; }
13864 if ${pgac_cv__static_assert+:} false; then :
13865   $as_echo_n "(cached) " >&6
13866 else
13867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13868 /* end confdefs.h.  */
13869
13870 int
13871 main ()
13872 {
13873 ({ _Static_assert(1, "foo"); })
13874   ;
13875   return 0;
13876 }
13877 _ACEOF
13878 if ac_fn_c_try_link "$LINENO"; then :
13879   pgac_cv__static_assert=yes
13880 else
13881   pgac_cv__static_assert=no
13882 fi
13883 rm -f core conftest.err conftest.$ac_objext \
13884     conftest$ac_exeext conftest.$ac_ext
13885 fi
13886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13887 $as_echo "$pgac_cv__static_assert" >&6; }
13888 if test x"$pgac_cv__static_assert" = xyes ; then
13889
13890 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13891
13892 fi
13893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13894 $as_echo_n "checking for typeof... " >&6; }
13895 if ${pgac_cv_c_typeof+:} false; then :
13896   $as_echo_n "(cached) " >&6
13897 else
13898   pgac_cv_c_typeof=no
13899 for pgac_kw in typeof __typeof__ decltype; do
13900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13901 /* end confdefs.h.  */
13902
13903 int
13904 main ()
13905 {
13906 int x = 0;
13907 $pgac_kw(x) y;
13908 y = x;
13909 return y;
13910   ;
13911   return 0;
13912 }
13913 _ACEOF
13914 if ac_fn_c_try_compile "$LINENO"; then :
13915   pgac_cv_c_typeof=$pgac_kw
13916 fi
13917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13918   test "$pgac_cv_c_typeof" != no && break
13919 done
13920 fi
13921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13922 $as_echo "$pgac_cv_c_typeof" >&6; }
13923 if test "$pgac_cv_c_typeof" != no; then
13924
13925 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13926
13927   if test "$pgac_cv_c_typeof" != typeof; then
13928
13929 cat >>confdefs.h <<_ACEOF
13930 #define typeof $pgac_cv_c_typeof
13931 _ACEOF
13932
13933   fi
13934 fi
13935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13936 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13937 if ${pgac_cv__types_compatible+:} false; then :
13938   $as_echo_n "(cached) " >&6
13939 else
13940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13941 /* end confdefs.h.  */
13942
13943 int
13944 main ()
13945 {
13946  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13947   ;
13948   return 0;
13949 }
13950 _ACEOF
13951 if ac_fn_c_try_compile "$LINENO"; then :
13952   pgac_cv__types_compatible=yes
13953 else
13954   pgac_cv__types_compatible=no
13955 fi
13956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13957 fi
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13959 $as_echo "$pgac_cv__types_compatible" >&6; }
13960 if test x"$pgac_cv__types_compatible" = xyes ; then
13961
13962 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13963
13964 fi
13965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13966 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13967 if ${pgac_cv__builtin_bswap16+:} false; then :
13968   $as_echo_n "(cached) " >&6
13969 else
13970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13971 /* end confdefs.h.  */
13972 static unsigned long int x = __builtin_bswap16(0xaabb);
13973
13974 _ACEOF
13975 if ac_fn_c_try_compile "$LINENO"; then :
13976   pgac_cv__builtin_bswap16=yes
13977 else
13978   pgac_cv__builtin_bswap16=no
13979 fi
13980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13981 fi
13982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13983 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13984 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13985
13986 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13987
13988 fi
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13990 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13991 if ${pgac_cv__builtin_bswap32+:} false; then :
13992   $as_echo_n "(cached) " >&6
13993 else
13994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13995 /* end confdefs.h.  */
13996 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13997
13998 _ACEOF
13999 if ac_fn_c_try_compile "$LINENO"; then :
14000   pgac_cv__builtin_bswap32=yes
14001 else
14002   pgac_cv__builtin_bswap32=no
14003 fi
14004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14005 fi
14006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
14007 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
14008 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
14009
14010 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
14011
14012 fi
14013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
14014 $as_echo_n "checking for __builtin_bswap64... " >&6; }
14015 if ${pgac_cv__builtin_bswap64+:} false; then :
14016   $as_echo_n "(cached) " >&6
14017 else
14018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14019 /* end confdefs.h.  */
14020 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
14021
14022 _ACEOF
14023 if ac_fn_c_try_compile "$LINENO"; then :
14024   pgac_cv__builtin_bswap64=yes
14025 else
14026   pgac_cv__builtin_bswap64=no
14027 fi
14028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14029 fi
14030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
14031 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
14032 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
14033
14034 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
14035
14036 fi
14037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
14038 $as_echo_n "checking for __builtin_clz... " >&6; }
14039 if ${pgac_cv__builtin_clz+:} false; then :
14040   $as_echo_n "(cached) " >&6
14041 else
14042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14043 /* end confdefs.h.  */
14044 static int x = __builtin_clz(256);
14045
14046 _ACEOF
14047 if ac_fn_c_try_compile "$LINENO"; then :
14048   pgac_cv__builtin_clz=yes
14049 else
14050   pgac_cv__builtin_clz=no
14051 fi
14052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14053 fi
14054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
14055 $as_echo "$pgac_cv__builtin_clz" >&6; }
14056 if test x"$pgac_cv__builtin_clz" = xyes ; then
14057
14058 $as_echo "#define HAVE__BUILTIN_CLZ 1" >>confdefs.h
14059
14060 fi
14061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14062 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14063 if ${pgac_cv__builtin_constant_p+:} false; then :
14064   $as_echo_n "(cached) " >&6
14065 else
14066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14067 /* end confdefs.h.  */
14068 static int x;
14069   static int y[__builtin_constant_p(x) ? x : 1];
14070   static int z[__builtin_constant_p("string literal") ? 1 : x];
14071
14072
14073 _ACEOF
14074 if ac_fn_c_try_compile "$LINENO"; then :
14075   pgac_cv__builtin_constant_p=yes
14076 else
14077   pgac_cv__builtin_constant_p=no
14078 fi
14079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14080 fi
14081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14082 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14083 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14084
14085 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14086
14087 fi
14088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
14089 $as_echo_n "checking for __builtin_ctz... " >&6; }
14090 if ${pgac_cv__builtin_ctz+:} false; then :
14091   $as_echo_n "(cached) " >&6
14092 else
14093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14094 /* end confdefs.h.  */
14095 static int x = __builtin_ctz(256);
14096
14097 _ACEOF
14098 if ac_fn_c_try_compile "$LINENO"; then :
14099   pgac_cv__builtin_ctz=yes
14100 else
14101   pgac_cv__builtin_ctz=no
14102 fi
14103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14104 fi
14105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
14106 $as_echo "$pgac_cv__builtin_ctz" >&6; }
14107 if test x"$pgac_cv__builtin_ctz" = xyes ; then
14108
14109 $as_echo "#define HAVE__BUILTIN_CTZ 1" >>confdefs.h
14110
14111 fi
14112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
14113 $as_echo_n "checking for __builtin_popcount... " >&6; }
14114 if ${pgac_cv_popcount+:} false; then :
14115   $as_echo_n "(cached) " >&6
14116 else
14117   pgac_save_CFLAGS=$CFLAGS
14118 CFLAGS="$pgac_save_CFLAGS -mpopcnt"
14119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14120 /* end confdefs.h.  */
14121 static int x = __builtin_popcount(255);
14122 _ACEOF
14123 if ac_fn_c_try_compile "$LINENO"; then :
14124   pgac_cv_popcount=yes
14125 else
14126   pgac_cv_popcount=no
14127 fi
14128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14129 CFLAGS="$pgac_save_CFLAGS"
14130 fi
14131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_popcount" >&5
14132 $as_echo "$pgac_cv_popcount" >&6; }
14133 if test x"$pgac_cv_popcount" = x"yes"; then
14134   CFLAGS_POPCNT="-mpopcnt"
14135
14136 $as_echo "#define HAVE__BUILTIN_POPCOUNT 1" >>confdefs.h
14137
14138 fi
14139
14140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14141 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14142 if ${pgac_cv__builtin_unreachable+:} false; then :
14143   $as_echo_n "(cached) " >&6
14144 else
14145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14146 /* end confdefs.h.  */
14147
14148 int
14149 main ()
14150 {
14151 __builtin_unreachable();
14152   ;
14153   return 0;
14154 }
14155 _ACEOF
14156 if ac_fn_c_try_link "$LINENO"; then :
14157   pgac_cv__builtin_unreachable=yes
14158 else
14159   pgac_cv__builtin_unreachable=no
14160 fi
14161 rm -f core conftest.err conftest.$ac_objext \
14162     conftest$ac_exeext conftest.$ac_ext
14163 fi
14164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14165 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14166 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14167
14168 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14169
14170 fi
14171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14172 $as_echo_n "checking for computed goto support... " >&6; }
14173 if ${pgac_cv_computed_goto+:} false; then :
14174   $as_echo_n "(cached) " >&6
14175 else
14176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14177 /* end confdefs.h.  */
14178
14179 int
14180 main ()
14181 {
14182 void *labeladdrs[] = {&&my_label};
14183   goto *labeladdrs[0];
14184   my_label:
14185   return 1;
14186
14187   ;
14188   return 0;
14189 }
14190 _ACEOF
14191 if ac_fn_c_try_compile "$LINENO"; then :
14192   pgac_cv_computed_goto=yes
14193 else
14194   pgac_cv_computed_goto=no
14195 fi
14196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14197 fi
14198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14199 $as_echo "$pgac_cv_computed_goto" >&6; }
14200 if test x"$pgac_cv_computed_goto" = xyes ; then
14201
14202 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14203
14204 fi
14205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14206 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14207 if ${ac_cv_struct_tm+:} false; then :
14208   $as_echo_n "(cached) " >&6
14209 else
14210   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14211 /* end confdefs.h.  */
14212 #include <sys/types.h>
14213 #include <time.h>
14214
14215 int
14216 main ()
14217 {
14218 struct tm tm;
14219                                      int *p = &tm.tm_sec;
14220                                      return !p;
14221   ;
14222   return 0;
14223 }
14224 _ACEOF
14225 if ac_fn_c_try_compile "$LINENO"; then :
14226   ac_cv_struct_tm=time.h
14227 else
14228   ac_cv_struct_tm=sys/time.h
14229 fi
14230 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14231 fi
14232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14233 $as_echo "$ac_cv_struct_tm" >&6; }
14234 if test $ac_cv_struct_tm = sys/time.h; then
14235
14236 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14237
14238 fi
14239
14240 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14241 #include <$ac_cv_struct_tm>
14242
14243 "
14244 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14245
14246 cat >>confdefs.h <<_ACEOF
14247 #define HAVE_STRUCT_TM_TM_ZONE 1
14248 _ACEOF
14249
14250
14251 fi
14252
14253 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14254
14255 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14256
14257 fi
14258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14259 $as_echo_n "checking for tzname... " >&6; }
14260 if ${ac_cv_var_tzname+:} false; then :
14261   $as_echo_n "(cached) " >&6
14262 else
14263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14264 /* end confdefs.h.  */
14265 #include <stdlib.h>
14266 #include <time.h>
14267 #ifndef tzname /* For SGI.  */
14268 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
14269 #endif
14270
14271 int
14272 main ()
14273 {
14274 atoi(*tzname);
14275   ;
14276   return 0;
14277 }
14278 _ACEOF
14279 if ac_fn_c_try_link "$LINENO"; then :
14280   ac_cv_var_tzname=yes
14281 else
14282   ac_cv_var_tzname=no
14283 fi
14284 rm -f core conftest.err conftest.$ac_objext \
14285     conftest$ac_exeext conftest.$ac_ext
14286 fi
14287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14288 $as_echo "$ac_cv_var_tzname" >&6; }
14289 if test $ac_cv_var_tzname = yes; then
14290
14291 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14292
14293 fi
14294
14295 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14296 #ifdef HAVE_SYS_IPC_H
14297 #include <sys/ipc.h>
14298 #endif
14299 #ifdef HAVE_SYS_SEM_H
14300 #include <sys/sem.h>
14301 #endif
14302 "
14303 if test "x$ac_cv_type_union_semun" = xyes; then :
14304
14305 cat >>confdefs.h <<_ACEOF
14306 #define HAVE_UNION_SEMUN 1
14307 _ACEOF
14308
14309
14310 fi
14311
14312 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14313 #ifdef HAVE_SYS_UN_H
14314 #include <sys/un.h>
14315 #endif
14316
14317 "
14318 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14319
14320 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14321
14322 fi
14323
14324 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14325 #include <sys/socket.h>
14326
14327 "
14328 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14329
14330 cat >>confdefs.h <<_ACEOF
14331 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14332 _ACEOF
14333
14334
14335 fi
14336
14337 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14338 #include <sys/socket.h>
14339
14340 "
14341 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14342
14343 cat >>confdefs.h <<_ACEOF
14344 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14345 _ACEOF
14346
14347
14348 fi
14349 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14350 #include <sys/socket.h>
14351
14352 "
14353 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14354
14355 cat >>confdefs.h <<_ACEOF
14356 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14357 _ACEOF
14358
14359
14360 fi
14361 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14362 #include <sys/socket.h>
14363
14364 "
14365 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14366
14367 cat >>confdefs.h <<_ACEOF
14368 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14369 _ACEOF
14370
14371
14372 fi
14373 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14374 #include <sys/socket.h>
14375
14376 "
14377 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14378
14379 cat >>confdefs.h <<_ACEOF
14380 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14381 _ACEOF
14382
14383
14384 fi
14385 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14386 #include <sys/socket.h>
14387
14388 "
14389 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14390
14391 cat >>confdefs.h <<_ACEOF
14392 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14393 _ACEOF
14394
14395
14396 fi
14397
14398 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14399 #include <sys/socket.h>
14400 #include <netdb.h>
14401
14402 "
14403 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14404
14405 cat >>confdefs.h <<_ACEOF
14406 #define HAVE_STRUCT_ADDRINFO 1
14407 _ACEOF
14408
14409
14410 fi
14411
14412
14413   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14414 if test "x$ac_cv_type_intptr_t" = xyes; then :
14415
14416 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14417
14418 else
14419   for ac_type in 'int' 'long int' 'long long int'; do
14420        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14421 /* end confdefs.h.  */
14422 $ac_includes_default
14423 int
14424 main ()
14425 {
14426 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14427 test_array [0] = 0;
14428 return test_array [0];
14429
14430   ;
14431   return 0;
14432 }
14433 _ACEOF
14434 if ac_fn_c_try_compile "$LINENO"; then :
14435
14436 cat >>confdefs.h <<_ACEOF
14437 #define intptr_t $ac_type
14438 _ACEOF
14439
14440           ac_type=
14441 fi
14442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14443        test -z "$ac_type" && break
14444      done
14445 fi
14446
14447
14448
14449   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14450 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14451
14452 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14453
14454 else
14455   for ac_type in 'unsigned int' 'unsigned long int' \
14456         'unsigned long long int'; do
14457        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14458 /* end confdefs.h.  */
14459 $ac_includes_default
14460 int
14461 main ()
14462 {
14463 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14464 test_array [0] = 0;
14465 return test_array [0];
14466
14467   ;
14468   return 0;
14469 }
14470 _ACEOF
14471 if ac_fn_c_try_compile "$LINENO"; then :
14472
14473 cat >>confdefs.h <<_ACEOF
14474 #define uintptr_t $ac_type
14475 _ACEOF
14476
14477           ac_type=
14478 fi
14479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14480        test -z "$ac_type" && break
14481      done
14482 fi
14483
14484
14485
14486   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14487 $as_echo_n "checking for unsigned long long int... " >&6; }
14488 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14489   $as_echo_n "(cached) " >&6
14490 else
14491   ac_cv_type_unsigned_long_long_int=yes
14492      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14493        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14494 /* end confdefs.h.  */
14495
14496   /* For now, do not test the preprocessor; as of 2007 there are too many
14497          implementations with broken preprocessors.  Perhaps this can
14498          be revisited in 2012.  In the meantime, code should not expect
14499          #if to work with literals wider than 32 bits.  */
14500       /* Test literals.  */
14501       long long int ll = 9223372036854775807ll;
14502       long long int nll = -9223372036854775807LL;
14503       unsigned long long int ull = 18446744073709551615ULL;
14504       /* Test constant expressions.   */
14505       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14506                      ? 1 : -1)];
14507       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14508                      ? 1 : -1)];
14509       int i = 63;
14510 int
14511 main ()
14512 {
14513 /* Test availability of runtime routines for shift and division.  */
14514       long long int llmax = 9223372036854775807ll;
14515       unsigned long long int ullmax = 18446744073709551615ull;
14516       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14517               | (llmax / ll) | (llmax % ll)
14518               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14519               | (ullmax / ull) | (ullmax % ull));
14520   ;
14521   return 0;
14522 }
14523
14524 _ACEOF
14525 if ac_fn_c_try_link "$LINENO"; then :
14526
14527 else
14528   ac_cv_type_unsigned_long_long_int=no
14529 fi
14530 rm -f core conftest.err conftest.$ac_objext \
14531     conftest$ac_exeext conftest.$ac_ext
14532      fi
14533 fi
14534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14535 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14536   if test $ac_cv_type_unsigned_long_long_int = yes; then
14537
14538 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14539
14540   fi
14541
14542
14543
14544   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14545 $as_echo_n "checking for long long int... " >&6; }
14546 if ${ac_cv_type_long_long_int+:} false; then :
14547   $as_echo_n "(cached) " >&6
14548 else
14549   ac_cv_type_long_long_int=yes
14550       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14551         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14552         if test $ac_cv_type_long_long_int = yes; then
14553                                   if test "$cross_compiling" = yes; then :
14554   :
14555 else
14556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14557 /* end confdefs.h.  */
14558 #include <limits.h>
14559                  #ifndef LLONG_MAX
14560                  # define HALF \
14561                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14562                  # define LLONG_MAX (HALF - 1 + HALF)
14563                  #endif
14564 int
14565 main ()
14566 {
14567 long long int n = 1;
14568                  int i;
14569                  for (i = 0; ; i++)
14570                    {
14571                      long long int m = n << i;
14572                      if (m >> i != n)
14573                        return 1;
14574                      if (LLONG_MAX / 2 < m)
14575                        break;
14576                    }
14577                  return 0;
14578   ;
14579   return 0;
14580 }
14581 _ACEOF
14582 if ac_fn_c_try_run "$LINENO"; then :
14583
14584 else
14585   ac_cv_type_long_long_int=no
14586 fi
14587 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14588   conftest.$ac_objext conftest.beam conftest.$ac_ext
14589 fi
14590
14591         fi
14592       fi
14593 fi
14594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14595 $as_echo "$ac_cv_type_long_long_int" >&6; }
14596   if test $ac_cv_type_long_long_int = yes; then
14597
14598 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14599
14600   fi
14601
14602
14603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14604 $as_echo_n "checking for locale_t... " >&6; }
14605 if ${pgac_cv_type_locale_t+:} false; then :
14606   $as_echo_n "(cached) " >&6
14607 else
14608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14609 /* end confdefs.h.  */
14610 #include <locale.h>
14611 locale_t x;
14612 int
14613 main ()
14614 {
14615
14616   ;
14617   return 0;
14618 }
14619 _ACEOF
14620 if ac_fn_c_try_compile "$LINENO"; then :
14621   pgac_cv_type_locale_t=yes
14622 else
14623   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14624 /* end confdefs.h.  */
14625 #include <xlocale.h>
14626 locale_t x;
14627 int
14628 main ()
14629 {
14630
14631   ;
14632   return 0;
14633 }
14634 _ACEOF
14635 if ac_fn_c_try_compile "$LINENO"; then :
14636   pgac_cv_type_locale_t='yes (in xlocale.h)'
14637 else
14638   pgac_cv_type_locale_t=no
14639 fi
14640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14641 fi
14642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14643 fi
14644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14645 $as_echo "$pgac_cv_type_locale_t" >&6; }
14646 if test "$pgac_cv_type_locale_t" != no; then
14647
14648 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14649
14650 fi
14651 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14652
14653 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14654
14655 fi
14656
14657
14658
14659 # MSVC doesn't cope well with defining restrict to __restrict, the
14660 # spelling it understands, because it conflicts with
14661 # __declspec(restrict). Therefore we define pg_restrict to the
14662 # appropriate definition, which presumably won't conflict.
14663 #
14664 # Allow platforms with buggy compilers to force restrict to not be
14665 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14666 # template.
14667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14668 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14669 if ${ac_cv_c_restrict+:} false; then :
14670   $as_echo_n "(cached) " >&6
14671 else
14672   ac_cv_c_restrict=no
14673    # The order here caters to the fact that C++ does not require restrict.
14674    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14675      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14676 /* end confdefs.h.  */
14677 typedef int * int_ptr;
14678         int foo (int_ptr $ac_kw ip) {
14679         return ip[0];
14680        }
14681 int
14682 main ()
14683 {
14684 int s[1];
14685         int * $ac_kw t = s;
14686         t[0] = 0;
14687         return foo(t)
14688   ;
14689   return 0;
14690 }
14691 _ACEOF
14692 if ac_fn_c_try_compile "$LINENO"; then :
14693   ac_cv_c_restrict=$ac_kw
14694 fi
14695 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14696      test "$ac_cv_c_restrict" != no && break
14697    done
14698
14699 fi
14700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14701 $as_echo "$ac_cv_c_restrict" >&6; }
14702
14703  case $ac_cv_c_restrict in
14704    restrict) ;;
14705    no) $as_echo "#define restrict /**/" >>confdefs.h
14706  ;;
14707    *)  cat >>confdefs.h <<_ACEOF
14708 #define restrict $ac_cv_c_restrict
14709 _ACEOF
14710  ;;
14711  esac
14712
14713 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14714   pg_restrict=""
14715 else
14716   pg_restrict="$ac_cv_c_restrict"
14717 fi
14718
14719 cat >>confdefs.h <<_ACEOF
14720 #define pg_restrict $pg_restrict
14721 _ACEOF
14722
14723
14724 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14725 #include <sys/param.h>
14726 #ifdef HAVE_SYS_UCRED_H
14727 #include <sys/ucred.h>
14728 #endif
14729 "
14730 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14731
14732 cat >>confdefs.h <<_ACEOF
14733 #define HAVE_STRUCT_CMSGCRED 1
14734 _ACEOF
14735
14736
14737 fi
14738
14739
14740 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14741 #include <getopt.h>
14742 #endif
14743 "
14744 if test "x$ac_cv_type_struct_option" = xyes; then :
14745
14746 cat >>confdefs.h <<_ACEOF
14747 #define HAVE_STRUCT_OPTION 1
14748 _ACEOF
14749
14750
14751 fi
14752
14753
14754 if test "$with_zlib" = yes; then
14755   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14756   # did not).  While we could work around the lack of z_streamp, it
14757   # seems unwise to encourage people to use such old zlib versions...
14758   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14759 "
14760 if test "x$ac_cv_type_z_streamp" = xyes; then :
14761
14762 else
14763   as_fn_error $? "zlib version is too old
14764 Use --without-zlib to disable zlib support." "$LINENO" 5
14765 fi
14766
14767 fi
14768
14769 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14770 case $host_cpu in
14771   ppc*|powerpc*)
14772     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14773 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14774     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14775 /* end confdefs.h.  */
14776
14777 int
14778 main ()
14779 {
14780 int a = 0; int *p = &a; int r;
14781          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14782   ;
14783   return 0;
14784 }
14785 _ACEOF
14786 if ac_fn_c_try_compile "$LINENO"; then :
14787   pgac_cv_have_ppc_mutex_hint=yes
14788 else
14789   pgac_cv_have_ppc_mutex_hint=no
14790 fi
14791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14792     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14793 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14794     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14795
14796 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14797
14798     fi
14799   ;;
14800 esac
14801
14802 # Check largefile support.  You might think this is a system service not a
14803 # compiler characteristic, but you'd be wrong.  We must check this before
14804 # probing existence of related functions such as fseeko, since the largefile
14805 # defines can affect what is generated for that.
14806 if test "$PORTNAME" != "win32"; then
14807    # Check whether --enable-largefile was given.
14808 if test "${enable_largefile+set}" = set; then :
14809   enableval=$enable_largefile;
14810 fi
14811
14812 if test "$enable_largefile" != no; then
14813
14814   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14815 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14816 if ${ac_cv_sys_largefile_CC+:} false; then :
14817   $as_echo_n "(cached) " >&6
14818 else
14819   ac_cv_sys_largefile_CC=no
14820      if test "$GCC" != yes; then
14821        ac_save_CC=$CC
14822        while :; do
14823          # IRIX 6.2 and later do not support large files by default,
14824          # so use the C compiler's -n32 option if that helps.
14825          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14826 /* end confdefs.h.  */
14827 #include <sys/types.h>
14828  /* Check that off_t can represent 2**63 - 1 correctly.
14829     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14830     since some C++ compilers masquerading as C compilers
14831     incorrectly reject 9223372036854775807.  */
14832 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14833   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14834                        && LARGE_OFF_T % 2147483647 == 1)
14835                       ? 1 : -1];
14836 int
14837 main ()
14838 {
14839
14840   ;
14841   return 0;
14842 }
14843 _ACEOF
14844          if ac_fn_c_try_compile "$LINENO"; then :
14845   break
14846 fi
14847 rm -f core conftest.err conftest.$ac_objext
14848          CC="$CC -n32"
14849          if ac_fn_c_try_compile "$LINENO"; then :
14850   ac_cv_sys_largefile_CC=' -n32'; break
14851 fi
14852 rm -f core conftest.err conftest.$ac_objext
14853          break
14854        done
14855        CC=$ac_save_CC
14856        rm -f conftest.$ac_ext
14857     fi
14858 fi
14859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14860 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14861   if test "$ac_cv_sys_largefile_CC" != no; then
14862     CC=$CC$ac_cv_sys_largefile_CC
14863   fi
14864
14865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14866 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14867 if ${ac_cv_sys_file_offset_bits+:} false; then :
14868   $as_echo_n "(cached) " >&6
14869 else
14870   while :; do
14871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14872 /* end confdefs.h.  */
14873 #include <sys/types.h>
14874  /* Check that off_t can represent 2**63 - 1 correctly.
14875     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14876     since some C++ compilers masquerading as C compilers
14877     incorrectly reject 9223372036854775807.  */
14878 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14879   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14880                        && LARGE_OFF_T % 2147483647 == 1)
14881                       ? 1 : -1];
14882 int
14883 main ()
14884 {
14885
14886   ;
14887   return 0;
14888 }
14889 _ACEOF
14890 if ac_fn_c_try_compile "$LINENO"; then :
14891   ac_cv_sys_file_offset_bits=no; break
14892 fi
14893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895 /* end confdefs.h.  */
14896 #define _FILE_OFFSET_BITS 64
14897 #include <sys/types.h>
14898  /* Check that off_t can represent 2**63 - 1 correctly.
14899     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14900     since some C++ compilers masquerading as C compilers
14901     incorrectly reject 9223372036854775807.  */
14902 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14903   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14904                        && LARGE_OFF_T % 2147483647 == 1)
14905                       ? 1 : -1];
14906 int
14907 main ()
14908 {
14909
14910   ;
14911   return 0;
14912 }
14913 _ACEOF
14914 if ac_fn_c_try_compile "$LINENO"; then :
14915   ac_cv_sys_file_offset_bits=64; break
14916 fi
14917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14918   ac_cv_sys_file_offset_bits=unknown
14919   break
14920 done
14921 fi
14922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14923 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14924 case $ac_cv_sys_file_offset_bits in #(
14925   no | unknown) ;;
14926   *)
14927 cat >>confdefs.h <<_ACEOF
14928 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14929 _ACEOF
14930 ;;
14931 esac
14932 rm -rf conftest*
14933   if test $ac_cv_sys_file_offset_bits = unknown; then
14934     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14935 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14936 if ${ac_cv_sys_large_files+:} false; then :
14937   $as_echo_n "(cached) " >&6
14938 else
14939   while :; do
14940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14941 /* end confdefs.h.  */
14942 #include <sys/types.h>
14943  /* Check that off_t can represent 2**63 - 1 correctly.
14944     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14945     since some C++ compilers masquerading as C compilers
14946     incorrectly reject 9223372036854775807.  */
14947 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14948   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14949                        && LARGE_OFF_T % 2147483647 == 1)
14950                       ? 1 : -1];
14951 int
14952 main ()
14953 {
14954
14955   ;
14956   return 0;
14957 }
14958 _ACEOF
14959 if ac_fn_c_try_compile "$LINENO"; then :
14960   ac_cv_sys_large_files=no; break
14961 fi
14962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14964 /* end confdefs.h.  */
14965 #define _LARGE_FILES 1
14966 #include <sys/types.h>
14967  /* Check that off_t can represent 2**63 - 1 correctly.
14968     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14969     since some C++ compilers masquerading as C compilers
14970     incorrectly reject 9223372036854775807.  */
14971 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14972   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14973                        && LARGE_OFF_T % 2147483647 == 1)
14974                       ? 1 : -1];
14975 int
14976 main ()
14977 {
14978
14979   ;
14980   return 0;
14981 }
14982 _ACEOF
14983 if ac_fn_c_try_compile "$LINENO"; then :
14984   ac_cv_sys_large_files=1; break
14985 fi
14986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14987   ac_cv_sys_large_files=unknown
14988   break
14989 done
14990 fi
14991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14992 $as_echo "$ac_cv_sys_large_files" >&6; }
14993 case $ac_cv_sys_large_files in #(
14994   no | unknown) ;;
14995   *)
14996 cat >>confdefs.h <<_ACEOF
14997 #define _LARGE_FILES $ac_cv_sys_large_files
14998 _ACEOF
14999 ;;
15000 esac
15001 rm -rf conftest*
15002   fi
15003
15004
15005 fi
15006
15007
15008 fi
15009
15010 # The cast to long int works around a bug in the HP C Compiler
15011 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15012 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15013 # This bug is HP SR number 8606223364.
15014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15015 $as_echo_n "checking size of off_t... " >&6; }
15016 if ${ac_cv_sizeof_off_t+:} false; then :
15017   $as_echo_n "(cached) " >&6
15018 else
15019   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
15020
15021 else
15022   if test "$ac_cv_type_off_t" = yes; then
15023      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15024 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15025 as_fn_error 77 "cannot compute sizeof (off_t)
15026 See \`config.log' for more details" "$LINENO" 5; }
15027    else
15028      ac_cv_sizeof_off_t=0
15029    fi
15030 fi
15031
15032 fi
15033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15034 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15035
15036
15037
15038 cat >>confdefs.h <<_ACEOF
15039 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15040 _ACEOF
15041
15042
15043
15044 # If we don't have largefile support, can't handle segsize >= 2GB.
15045 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15046    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15047 fi
15048
15049 # The cast to long int works around a bug in the HP C Compiler
15050 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15051 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15052 # This bug is HP SR number 8606223364.
15053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15054 $as_echo_n "checking size of bool... " >&6; }
15055 if ${ac_cv_sizeof_bool+:} false; then :
15056   $as_echo_n "(cached) " >&6
15057 else
15058   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
15059 #include <stdbool.h>
15060 #endif
15061 "; then :
15062
15063 else
15064   if test "$ac_cv_type_bool" = yes; then
15065      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15066 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15067 as_fn_error 77 "cannot compute sizeof (bool)
15068 See \`config.log' for more details" "$LINENO" 5; }
15069    else
15070      ac_cv_sizeof_bool=0
15071    fi
15072 fi
15073
15074 fi
15075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15076 $as_echo "$ac_cv_sizeof_bool" >&6; }
15077
15078
15079
15080 cat >>confdefs.h <<_ACEOF
15081 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15082 _ACEOF
15083
15084
15085
15086
15087 ##
15088 ## Functions, global variables
15089 ##
15090
15091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15092 $as_echo_n "checking for int timezone... " >&6; }
15093 if ${pgac_cv_var_int_timezone+:} false; then :
15094   $as_echo_n "(cached) " >&6
15095 else
15096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15097 /* end confdefs.h.  */
15098 #include <time.h>
15099 int res;
15100 int
15101 main ()
15102 {
15103 #ifndef __CYGWIN__
15104 res = timezone / 60;
15105 #else
15106 res = _timezone / 60;
15107 #endif
15108   ;
15109   return 0;
15110 }
15111 _ACEOF
15112 if ac_fn_c_try_link "$LINENO"; then :
15113   pgac_cv_var_int_timezone=yes
15114 else
15115   pgac_cv_var_int_timezone=no
15116 fi
15117 rm -f core conftest.err conftest.$ac_objext \
15118     conftest$ac_exeext conftest.$ac_ext
15119 fi
15120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15121 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15122 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15123
15124 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15125
15126 fi
15127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15128 $as_echo_n "checking types of arguments for accept()... " >&6; }
15129  if ${ac_cv_func_accept_return+:} false; then :
15130   $as_echo_n "(cached) " >&6
15131 else
15132    if ${ac_cv_func_accept_arg1+:} false; then :
15133   $as_echo_n "(cached) " >&6
15134 else
15135     if ${ac_cv_func_accept_arg2+:} false; then :
15136   $as_echo_n "(cached) " >&6
15137 else
15138      if ${ac_cv_func_accept_arg3+:} false; then :
15139   $as_echo_n "(cached) " >&6
15140 else
15141       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
15142       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
15143        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15144         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15145          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15146 /* end confdefs.h.  */
15147 #include <sys/types.h>
15148 #include <sys/socket.h>
15149 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15150 _ACEOF
15151 if ac_fn_c_try_compile "$LINENO"; then :
15152   ac_not_found=no; break 4
15153 else
15154   ac_not_found=yes
15155 fi
15156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15157        done
15158       done
15159      done
15160     done
15161     if test "$ac_not_found" = yes; then
15162       as_fn_error $? "could not determine argument types" "$LINENO" 5
15163     fi
15164     if test "$ac_cv_func_accept_arg3" = "void"; then
15165       ac_cv_func_accept_arg3=int
15166     fi
15167
15168 fi
15169
15170 fi
15171
15172 fi
15173
15174 fi
15175  { $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
15176 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15177
15178 cat >>confdefs.h <<_ACEOF
15179 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15180 _ACEOF
15181
15182
15183 cat >>confdefs.h <<_ACEOF
15184 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15185 _ACEOF
15186
15187
15188 cat >>confdefs.h <<_ACEOF
15189 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15190 _ACEOF
15191
15192
15193 cat >>confdefs.h <<_ACEOF
15194 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15195 _ACEOF
15196
15197
15198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15199 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15200 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15201   $as_echo_n "(cached) " >&6
15202 else
15203   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15204 /* end confdefs.h.  */
15205 #include <sys/time.h>
15206 int
15207 main ()
15208 {
15209 struct timeval *tp;
15210 struct timezone *tzp;
15211 gettimeofday(tp,tzp);
15212   ;
15213   return 0;
15214 }
15215 _ACEOF
15216 if ac_fn_c_try_compile "$LINENO"; then :
15217   pgac_cv_func_gettimeofday_1arg=no
15218 else
15219   pgac_cv_func_gettimeofday_1arg=yes
15220 fi
15221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15222 fi
15223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15224 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15225 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15226
15227 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15228
15229 fi
15230
15231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15232 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15233 if ${pgac_cv_func_wcstombs_l+:} false; then :
15234   $as_echo_n "(cached) " >&6
15235 else
15236   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15237 /* end confdefs.h.  */
15238 #include <stdlib.h>
15239 #include <locale.h>
15240 int
15241 main ()
15242 {
15243 #ifndef wcstombs_l
15244 (void) wcstombs_l;
15245 #endif
15246   ;
15247   return 0;
15248 }
15249 _ACEOF
15250 if ac_fn_c_try_compile "$LINENO"; then :
15251   pgac_cv_func_wcstombs_l='yes'
15252 else
15253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15254 /* end confdefs.h.  */
15255 #include <stdlib.h>
15256 #include <locale.h>
15257 #include <xlocale.h>
15258 int
15259 main ()
15260 {
15261 #ifndef wcstombs_l
15262 (void) wcstombs_l;
15263 #endif
15264   ;
15265   return 0;
15266 }
15267 _ACEOF
15268 if ac_fn_c_try_compile "$LINENO"; then :
15269   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15270 else
15271   pgac_cv_func_wcstombs_l='no'
15272 fi
15273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15274 fi
15275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15276 fi
15277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15278 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15279 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15280
15281 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15282
15283 fi
15284
15285 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15286 # symbols that that library has no business exposing to the world.  Pending
15287 # acquisition of a clue by those developers, ignore libedit (including its
15288 # possible alias of libreadline) while checking for everything else.
15289 LIBS_including_readline="$LIBS"
15290 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15291
15292 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
15293 do :
15294   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15295 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15296 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15297   cat >>confdefs.h <<_ACEOF
15298 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15299 _ACEOF
15300
15301 fi
15302 done
15303
15304
15305 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15306 if test "x$ac_cv_func_fseeko" = xyes; then :
15307   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15308
15309 else
15310   case " $LIBOBJS " in
15311   *" fseeko.$ac_objext "* ) ;;
15312   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15313  ;;
15314 esac
15315
15316 fi
15317
15318
15319 case $host_os in
15320         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15321         # Mingw uses macros to access Win32 API calls
15322         netbsd*|mingw*)
15323
15324 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15325
15326                 ac_cv_func_fseeko=yes;;
15327         *)
15328                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15329 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15330 if ${ac_cv_sys_largefile_source+:} false; then :
15331   $as_echo_n "(cached) " >&6
15332 else
15333   while :; do
15334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15335 /* end confdefs.h.  */
15336 #include <sys/types.h> /* for off_t */
15337      #include <stdio.h>
15338 int
15339 main ()
15340 {
15341 int (*fp) (FILE *, off_t, int) = fseeko;
15342      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15343   ;
15344   return 0;
15345 }
15346 _ACEOF
15347 if ac_fn_c_try_link "$LINENO"; then :
15348   ac_cv_sys_largefile_source=no; break
15349 fi
15350 rm -f core conftest.err conftest.$ac_objext \
15351     conftest$ac_exeext conftest.$ac_ext
15352   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15353 /* end confdefs.h.  */
15354 #define _LARGEFILE_SOURCE 1
15355 #include <sys/types.h> /* for off_t */
15356      #include <stdio.h>
15357 int
15358 main ()
15359 {
15360 int (*fp) (FILE *, off_t, int) = fseeko;
15361      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15362   ;
15363   return 0;
15364 }
15365 _ACEOF
15366 if ac_fn_c_try_link "$LINENO"; then :
15367   ac_cv_sys_largefile_source=1; break
15368 fi
15369 rm -f core conftest.err conftest.$ac_objext \
15370     conftest$ac_exeext conftest.$ac_ext
15371   ac_cv_sys_largefile_source=unknown
15372   break
15373 done
15374 fi
15375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15376 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15377 case $ac_cv_sys_largefile_source in #(
15378   no | unknown) ;;
15379   *)
15380 cat >>confdefs.h <<_ACEOF
15381 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15382 _ACEOF
15383 ;;
15384 esac
15385 rm -rf conftest*
15386
15387 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15388 # in glibc 2.1.3, but that breaks too many other things.
15389 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15390 if test $ac_cv_sys_largefile_source != unknown; then
15391
15392 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15393
15394 fi
15395 ;;
15396 esac
15397
15398 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15399 # by calling it, 2009-04-02
15400 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15401 # The Clang compiler raises a warning for an undeclared identifier that matches
15402 # a compiler builtin function.  All extant Clang versions are affected, as of
15403 # Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
15404 # C and Objective C languages, but Clang does report an error under C++ and
15405 # Objective C++.
15406 #
15407 # Passing -fno-builtin to the compiler would suppress this problem.  That
15408 # strategy would have the advantage of being insensitive to stray warnings, but
15409 # it would make tests less realistic.
15410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15411 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15412 if ${ac_cv_c_decl_report+:} false; then :
15413   $as_echo_n "(cached) " >&6
15414 else
15415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15416 /* end confdefs.h.  */
15417
15418 int
15419 main ()
15420 {
15421 (void) strchr;
15422   ;
15423   return 0;
15424 }
15425 _ACEOF
15426 if ac_fn_c_try_compile "$LINENO"; then :
15427   if test -s conftest.err; then :
15428       # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15429     # valid AC_CHECK_DECL input.  No library function is consistently available
15430     # on freestanding implementations, so test against a dummy declaration.
15431     # Include always-available headers on the off chance that they somehow
15432     # elicit warnings.
15433     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15434 /* end confdefs.h.  */
15435 #include <float.h>
15436 #include <limits.h>
15437 #include <stdarg.h>
15438 #include <stddef.h>
15439 extern void ac_decl (int, char *);
15440 int
15441 main ()
15442 {
15443 #ifdef __cplusplus
15444   (void) ac_decl ((int) 0, (char *) 0);
15445   (void) ac_decl;
15446 #else
15447   (void) ac_decl;
15448 #endif
15449
15450   ;
15451   return 0;
15452 }
15453 _ACEOF
15454 if ac_fn_c_try_compile "$LINENO"; then :
15455   if test -s conftest.err; then :
15456   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15457 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15458 as_fn_error $? "cannot detect from compiler exit status or warnings
15459 See \`config.log' for more details" "$LINENO" 5; }
15460 else
15461   ac_cv_c_decl_report=warning
15462 fi
15463 else
15464   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15465 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15466 as_fn_error $? "cannot compile a simple declaration test
15467 See \`config.log' for more details" "$LINENO" 5; }
15468 fi
15469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15470 else
15471   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15472 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15473 as_fn_error $? "compiler does not report undeclared identifiers
15474 See \`config.log' for more details" "$LINENO" 5; }
15475 fi
15476 else
15477   ac_cv_c_decl_report=error
15478 fi
15479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15480 fi
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15482 $as_echo "$ac_cv_c_decl_report" >&6; }
15483
15484 case $ac_cv_c_decl_report in
15485   warning) ac_c_decl_warn_flag=yes ;;
15486   *) ac_c_decl_warn_flag= ;;
15487 esac
15488
15489 if test "$PORTNAME" != "solaris"; then :
15490
15491 for ac_func in posix_fadvise
15492 do :
15493   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15494 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15495   cat >>confdefs.h <<_ACEOF
15496 #define HAVE_POSIX_FADVISE 1
15497 _ACEOF
15498
15499 fi
15500 done
15501
15502 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15503 "
15504 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15505   ac_have_decl=1
15506 else
15507   ac_have_decl=0
15508 fi
15509
15510 cat >>confdefs.h <<_ACEOF
15511 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15512 _ACEOF
15513
15514
15515 fi # fi
15516
15517 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15518 "
15519 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15520   ac_have_decl=1
15521 else
15522   ac_have_decl=0
15523 fi
15524
15525 cat >>confdefs.h <<_ACEOF
15526 #define HAVE_DECL_FDATASYNC $ac_have_decl
15527 _ACEOF
15528
15529 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15530 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15531   ac_have_decl=1
15532 else
15533   ac_have_decl=0
15534 fi
15535
15536 cat >>confdefs.h <<_ACEOF
15537 #define HAVE_DECL_STRLCAT $ac_have_decl
15538 _ACEOF
15539 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15540 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15541   ac_have_decl=1
15542 else
15543   ac_have_decl=0
15544 fi
15545
15546 cat >>confdefs.h <<_ACEOF
15547 #define HAVE_DECL_STRLCPY $ac_have_decl
15548 _ACEOF
15549 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15550 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15551   ac_have_decl=1
15552 else
15553   ac_have_decl=0
15554 fi
15555
15556 cat >>confdefs.h <<_ACEOF
15557 #define HAVE_DECL_STRNLEN $ac_have_decl
15558 _ACEOF
15559
15560 # This is probably only present on macOS, but may as well check always
15561 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15562 "
15563 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15564   ac_have_decl=1
15565 else
15566   ac_have_decl=0
15567 fi
15568
15569 cat >>confdefs.h <<_ACEOF
15570 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15571 _ACEOF
15572
15573
15574 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15575 "
15576 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15577   ac_have_decl=1
15578 else
15579   ac_have_decl=0
15580 fi
15581
15582 cat >>confdefs.h <<_ACEOF
15583 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15584 _ACEOF
15585 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15586 "
15587 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15588   ac_have_decl=1
15589 else
15590   ac_have_decl=0
15591 fi
15592
15593 cat >>confdefs.h <<_ACEOF
15594 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15595 _ACEOF
15596
15597
15598 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15599 #include <netinet/in.h>
15600 "
15601 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15602
15603 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15604
15605 fi
15606
15607
15608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15609 $as_echo_n "checking for PS_STRINGS... " >&6; }
15610 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15611   $as_echo_n "(cached) " >&6
15612 else
15613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15614 /* end confdefs.h.  */
15615 #include <machine/vmparam.h>
15616 #include <sys/exec.h>
15617
15618 int
15619 main ()
15620 {
15621 PS_STRINGS->ps_nargvstr = 1;
15622 PS_STRINGS->ps_argvstr = "foo";
15623   ;
15624   return 0;
15625 }
15626 _ACEOF
15627 if ac_fn_c_try_link "$LINENO"; then :
15628   pgac_cv_var_PS_STRINGS=yes
15629 else
15630   pgac_cv_var_PS_STRINGS=no
15631 fi
15632 rm -f core conftest.err conftest.$ac_objext \
15633     conftest$ac_exeext conftest.$ac_ext
15634 fi
15635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15636 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15637 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15638
15639 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15640
15641 fi
15642
15643
15644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15645 $as_echo_n "checking for isinf... " >&6; }
15646 if ${ac_cv_func_isinf+:} false; then :
15647   $as_echo_n "(cached) " >&6
15648 else
15649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15650 /* end confdefs.h.  */
15651
15652 #include <math.h>
15653 double glob_double;
15654
15655 int
15656 main ()
15657 {
15658 return isinf(glob_double) ? 0 : 1;
15659   ;
15660   return 0;
15661 }
15662 _ACEOF
15663 if ac_fn_c_try_link "$LINENO"; then :
15664   ac_cv_func_isinf=yes
15665 else
15666   ac_cv_func_isinf=no
15667 fi
15668 rm -f core conftest.err conftest.$ac_objext \
15669     conftest$ac_exeext conftest.$ac_ext
15670 fi
15671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15672 $as_echo "$ac_cv_func_isinf" >&6; }
15673
15674 if test $ac_cv_func_isinf = yes ; then
15675
15676 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15677
15678 else
15679   case " $LIBOBJS " in
15680   *" isinf.$ac_objext "* ) ;;
15681   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15682  ;;
15683 esac
15684
15685   # Look for a way to implement a substitute for isinf()
15686   for ac_func in fpclass fp_class fp_class_d class
15687 do :
15688   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15689 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15690 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15691   cat >>confdefs.h <<_ACEOF
15692 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15693 _ACEOF
15694  break
15695 fi
15696 done
15697
15698 fi
15699
15700 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15701 if test "x$ac_cv_func_crypt" = xyes; then :
15702   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15703
15704 else
15705   case " $LIBOBJS " in
15706   *" crypt.$ac_objext "* ) ;;
15707   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15708  ;;
15709 esac
15710
15711 fi
15712
15713 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15714 if test "x$ac_cv_func_dlopen" = xyes; then :
15715   $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15716
15717 else
15718   case " $LIBOBJS " in
15719   *" dlopen.$ac_objext "* ) ;;
15720   *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15721  ;;
15722 esac
15723
15724 fi
15725
15726 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15727 if test "x$ac_cv_func_fls" = xyes; then :
15728   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15729
15730 else
15731   case " $LIBOBJS " in
15732   *" fls.$ac_objext "* ) ;;
15733   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15734  ;;
15735 esac
15736
15737 fi
15738
15739 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15740 if test "x$ac_cv_func_getopt" = xyes; then :
15741   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15742
15743 else
15744   case " $LIBOBJS " in
15745   *" getopt.$ac_objext "* ) ;;
15746   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15747  ;;
15748 esac
15749
15750 fi
15751
15752 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15753 if test "x$ac_cv_func_getrusage" = xyes; then :
15754   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15755
15756 else
15757   case " $LIBOBJS " in
15758   *" getrusage.$ac_objext "* ) ;;
15759   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15760  ;;
15761 esac
15762
15763 fi
15764
15765 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15766 if test "x$ac_cv_func_inet_aton" = xyes; then :
15767   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15768
15769 else
15770   case " $LIBOBJS " in
15771   *" inet_aton.$ac_objext "* ) ;;
15772   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15773  ;;
15774 esac
15775
15776 fi
15777
15778 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15779 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15780   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15781
15782 else
15783   case " $LIBOBJS " in
15784   *" mkdtemp.$ac_objext "* ) ;;
15785   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15786  ;;
15787 esac
15788
15789 fi
15790
15791 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
15792 if test "x$ac_cv_func_pread" = xyes; then :
15793   $as_echo "#define HAVE_PREAD 1" >>confdefs.h
15794
15795 else
15796   case " $LIBOBJS " in
15797   *" pread.$ac_objext "* ) ;;
15798   *) LIBOBJS="$LIBOBJS pread.$ac_objext"
15799  ;;
15800 esac
15801
15802 fi
15803
15804 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
15805 if test "x$ac_cv_func_pwrite" = xyes; then :
15806   $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
15807
15808 else
15809   case " $LIBOBJS " in
15810   *" pwrite.$ac_objext "* ) ;;
15811   *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
15812  ;;
15813 esac
15814
15815 fi
15816
15817 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15818 if test "x$ac_cv_func_random" = xyes; then :
15819   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15820
15821 else
15822   case " $LIBOBJS " in
15823   *" random.$ac_objext "* ) ;;
15824   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15825  ;;
15826 esac
15827
15828 fi
15829
15830 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15831 if test "x$ac_cv_func_rint" = xyes; then :
15832   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15833
15834 else
15835   case " $LIBOBJS " in
15836   *" rint.$ac_objext "* ) ;;
15837   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15838  ;;
15839 esac
15840
15841 fi
15842
15843 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15844 if test "x$ac_cv_func_srandom" = xyes; then :
15845   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15846
15847 else
15848   case " $LIBOBJS " in
15849   *" srandom.$ac_objext "* ) ;;
15850   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15851  ;;
15852 esac
15853
15854 fi
15855
15856 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15857 if test "x$ac_cv_func_strlcat" = xyes; then :
15858   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15859
15860 else
15861   case " $LIBOBJS " in
15862   *" strlcat.$ac_objext "* ) ;;
15863   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15864  ;;
15865 esac
15866
15867 fi
15868
15869 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15870 if test "x$ac_cv_func_strlcpy" = xyes; then :
15871   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15872
15873 else
15874   case " $LIBOBJS " in
15875   *" strlcpy.$ac_objext "* ) ;;
15876   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15877  ;;
15878 esac
15879
15880 fi
15881
15882 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15883 if test "x$ac_cv_func_strnlen" = xyes; then :
15884   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15885
15886 else
15887   case " $LIBOBJS " in
15888   *" strnlen.$ac_objext "* ) ;;
15889   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15890  ;;
15891 esac
15892
15893 fi
15894
15895 ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
15896 if test "x$ac_cv_func_strtof" = xyes; then :
15897   $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
15898
15899 else
15900   case " $LIBOBJS " in
15901   *" strtof.$ac_objext "* ) ;;
15902   *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15903  ;;
15904 esac
15905
15906 fi
15907
15908
15909
15910 case $host_os in
15911
15912         # Windows uses a specialised env handler
15913         # and doesn't need a replacement getpeereid because it doesn't use
15914         # Unix sockets.
15915         mingw*)
15916
15917 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15918
15919
15920 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15921
15922                 ac_cv_func_unsetenv=yes
15923                 ac_cv_func_getpeereid=yes;;
15924         *)
15925                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15926 if test "x$ac_cv_func_unsetenv" = xyes; then :
15927   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15928
15929 else
15930   case " $LIBOBJS " in
15931   *" unsetenv.$ac_objext "* ) ;;
15932   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15933  ;;
15934 esac
15935
15936 fi
15937
15938 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15939 if test "x$ac_cv_func_getpeereid" = xyes; then :
15940   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15941
15942 else
15943   case " $LIBOBJS " in
15944   *" getpeereid.$ac_objext "* ) ;;
15945   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15946  ;;
15947 esac
15948
15949 fi
15950
15951
15952                 ;;
15953 esac
15954
15955 # System's version of getaddrinfo(), if any, may be used only if we found
15956 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15957 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15958 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15959    test "$PORTNAME" != "win32"; then
15960   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15961 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15962   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15963
15964 else
15965   case " $LIBOBJS " in
15966   *" getaddrinfo.$ac_objext "* ) ;;
15967   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15968  ;;
15969 esac
15970
15971 fi
15972
15973
15974 else
15975   case " $LIBOBJS " in
15976   *" getaddrinfo.$ac_objext "* ) ;;
15977   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15978  ;;
15979 esac
15980
15981 fi
15982
15983 # Similarly, use system's getopt_long() only if system provides struct option.
15984 if test x"$ac_cv_type_struct_option" = xyes ; then
15985   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15986 if test "x$ac_cv_func_getopt_long" = xyes; then :
15987   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15988
15989 else
15990   case " $LIBOBJS " in
15991   *" getopt_long.$ac_objext "* ) ;;
15992   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15993  ;;
15994 esac
15995
15996 fi
15997
15998
15999 else
16000   case " $LIBOBJS " in
16001   *" getopt_long.$ac_objext "* ) ;;
16002   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16003  ;;
16004 esac
16005
16006 fi
16007
16008 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16009 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16010 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16011   case " $LIBOBJS " in
16012   *" getopt.$ac_objext "* ) ;;
16013   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16014  ;;
16015 esac
16016
16017 fi
16018
16019 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16020 # so always use our version on Windows.
16021 if test "$PORTNAME" = "win32"; then
16022   case " $LIBOBJS " in
16023   *" getopt.$ac_objext "* ) ;;
16024   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16025  ;;
16026 esac
16027
16028   case " $LIBOBJS " in
16029   *" getopt_long.$ac_objext "* ) ;;
16030   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16031  ;;
16032 esac
16033
16034 fi
16035
16036 # Win32 (really MinGW) support
16037 if test "$PORTNAME" = "win32"; then
16038   for ac_func in _configthreadlocale
16039 do :
16040   ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16041 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16042   cat >>confdefs.h <<_ACEOF
16043 #define HAVE__CONFIGTHREADLOCALE 1
16044 _ACEOF
16045
16046 fi
16047 done
16048
16049   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
16050 if test "x$ac_cv_func_gettimeofday" = xyes; then :
16051   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
16052
16053 else
16054   case " $LIBOBJS " in
16055   *" gettimeofday.$ac_objext "* ) ;;
16056   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
16057  ;;
16058 esac
16059
16060 fi
16061
16062
16063   case " $LIBOBJS " in
16064   *" dirmod.$ac_objext "* ) ;;
16065   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16066  ;;
16067 esac
16068
16069   case " $LIBOBJS " in
16070   *" kill.$ac_objext "* ) ;;
16071   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16072  ;;
16073 esac
16074
16075   case " $LIBOBJS " in
16076   *" open.$ac_objext "* ) ;;
16077   *) LIBOBJS="$LIBOBJS open.$ac_objext"
16078  ;;
16079 esac
16080
16081   case " $LIBOBJS " in
16082   *" system.$ac_objext "* ) ;;
16083   *) LIBOBJS="$LIBOBJS system.$ac_objext"
16084  ;;
16085 esac
16086
16087   case " $LIBOBJS " in
16088   *" win32env.$ac_objext "* ) ;;
16089   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16090  ;;
16091 esac
16092
16093   case " $LIBOBJS " in
16094   *" win32error.$ac_objext "* ) ;;
16095   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16096  ;;
16097 esac
16098
16099   case " $LIBOBJS " in
16100   *" win32security.$ac_objext "* ) ;;
16101   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16102  ;;
16103 esac
16104
16105   case " $LIBOBJS " in
16106   *" win32setlocale.$ac_objext "* ) ;;
16107   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16108  ;;
16109 esac
16110
16111
16112 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16113
16114   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16115 #define WIN32_LEAN_AND_MEAN
16116 #include <windows.h>
16117 #include <string.h>
16118 #include <dbghelp.h>
16119 "
16120 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16121
16122 cat >>confdefs.h <<_ACEOF
16123 #define HAVE_MINIDUMP_TYPE 1
16124 _ACEOF
16125
16126 pgac_minidump_type=yes
16127 else
16128   pgac_minidump_type=no
16129 fi
16130
16131 fi
16132 if test x"$pgac_minidump_type" = x"yes" ; then
16133   have_win32_dbghelp=yes
16134
16135 else
16136   have_win32_dbghelp=no
16137
16138 fi
16139
16140 # Cygwin needs only a bit of that
16141 if test "$PORTNAME" = "cygwin"; then
16142   case " $LIBOBJS " in
16143   *" dirmod.$ac_objext "* ) ;;
16144   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16145  ;;
16146 esac
16147
16148 fi
16149
16150 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16151 if test "x$ac_cv_func_syslog" = xyes; then :
16152   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16153 if test "x$ac_cv_header_syslog_h" = xyes; then :
16154
16155 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16156
16157 fi
16158
16159
16160 fi
16161
16162
16163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16164 $as_echo_n "checking for opterr... " >&6; }
16165 if ${pgac_cv_var_int_opterr+:} false; then :
16166   $as_echo_n "(cached) " >&6
16167 else
16168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16169 /* end confdefs.h.  */
16170 #include <unistd.h>
16171 int
16172 main ()
16173 {
16174 extern int opterr; opterr = 1;
16175   ;
16176   return 0;
16177 }
16178 _ACEOF
16179 if ac_fn_c_try_link "$LINENO"; then :
16180   pgac_cv_var_int_opterr=yes
16181 else
16182   pgac_cv_var_int_opterr=no
16183 fi
16184 rm -f core conftest.err conftest.$ac_objext \
16185     conftest$ac_exeext conftest.$ac_ext
16186 fi
16187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16188 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16189 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16190
16191 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16192
16193 fi
16194
16195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16196 $as_echo_n "checking for optreset... " >&6; }
16197 if ${pgac_cv_var_int_optreset+:} false; then :
16198   $as_echo_n "(cached) " >&6
16199 else
16200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16201 /* end confdefs.h.  */
16202 #include <unistd.h>
16203 int
16204 main ()
16205 {
16206 extern int optreset; optreset = 1;
16207   ;
16208   return 0;
16209 }
16210 _ACEOF
16211 if ac_fn_c_try_link "$LINENO"; then :
16212   pgac_cv_var_int_optreset=yes
16213 else
16214   pgac_cv_var_int_optreset=no
16215 fi
16216 rm -f core conftest.err conftest.$ac_objext \
16217     conftest$ac_exeext conftest.$ac_ext
16218 fi
16219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16220 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16221 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16222
16223 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16224
16225 fi
16226
16227 for ac_func in strtoll __strtoll strtoq
16228 do :
16229   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16230 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16231 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16232   cat >>confdefs.h <<_ACEOF
16233 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16234 _ACEOF
16235  break
16236 fi
16237 done
16238
16239 for ac_func in strtoull __strtoull strtouq
16240 do :
16241   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16242 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16243 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16244   cat >>confdefs.h <<_ACEOF
16245 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16246 _ACEOF
16247  break
16248 fi
16249 done
16250
16251 # strto[u]ll may exist but not be declared
16252 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16253 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16254   ac_have_decl=1
16255 else
16256   ac_have_decl=0
16257 fi
16258
16259 cat >>confdefs.h <<_ACEOF
16260 #define HAVE_DECL_STRTOLL $ac_have_decl
16261 _ACEOF
16262 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16263 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16264   ac_have_decl=1
16265 else
16266   ac_have_decl=0
16267 fi
16268
16269 cat >>confdefs.h <<_ACEOF
16270 #define HAVE_DECL_STRTOULL $ac_have_decl
16271 _ACEOF
16272
16273
16274 if test "$with_icu" = yes; then
16275   ac_save_CPPFLAGS=$CPPFLAGS
16276   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16277
16278   # Verify we have ICU's header files
16279   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16280 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16281
16282 else
16283   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16284 fi
16285
16286
16287
16288   CPPFLAGS=$ac_save_CPPFLAGS
16289 fi
16290
16291 if test "$with_llvm" = yes; then
16292
16293   # Check which functionality is present
16294   SAVE_CPPFLAGS="$CPPFLAGS"
16295   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16296   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16297 "
16298 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16299   ac_have_decl=1
16300 else
16301   ac_have_decl=0
16302 fi
16303
16304 cat >>confdefs.h <<_ACEOF
16305 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16306 _ACEOF
16307
16308   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16309 "
16310 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16311   ac_have_decl=1
16312 else
16313   ac_have_decl=0
16314 fi
16315
16316 cat >>confdefs.h <<_ACEOF
16317 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16318 _ACEOF
16319 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16320 "
16321 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16322   ac_have_decl=1
16323 else
16324   ac_have_decl=0
16325 fi
16326
16327 cat >>confdefs.h <<_ACEOF
16328 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16329 _ACEOF
16330
16331   ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16332 "
16333 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16334   ac_have_decl=1
16335 else
16336   ac_have_decl=0
16337 fi
16338
16339 cat >>confdefs.h <<_ACEOF
16340 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16341 _ACEOF
16342 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16343 "
16344 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16345   ac_have_decl=1
16346 else
16347   ac_have_decl=0
16348 fi
16349
16350 cat >>confdefs.h <<_ACEOF
16351 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16352 _ACEOF
16353
16354   CPPFLAGS="$SAVE_CPPFLAGS"
16355
16356 fi
16357
16358 # Lastly, restore full LIBS list and check for readline/libedit symbols
16359 LIBS="$LIBS_including_readline"
16360
16361 if test "$with_readline" = yes; then
16362   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16363 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16364 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16365   $as_echo_n "(cached) " >&6
16366 else
16367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16368 /* end confdefs.h.  */
16369 #include <stdio.h>
16370 #ifdef HAVE_READLINE_READLINE_H
16371 # include <readline/readline.h>
16372 #elif defined(HAVE_READLINE_H)
16373 # include <readline.h>
16374 #endif
16375
16376 int
16377 main ()
16378 {
16379 rl_completion_append_character = 'x';
16380   ;
16381   return 0;
16382 }
16383 _ACEOF
16384 if ac_fn_c_try_link "$LINENO"; then :
16385   pgac_cv_var_rl_completion_append_character=yes
16386 else
16387   pgac_cv_var_rl_completion_append_character=no
16388 fi
16389 rm -f core conftest.err conftest.$ac_objext \
16390     conftest$ac_exeext conftest.$ac_ext
16391 fi
16392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16393 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16394 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16395
16396 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16397
16398 fi
16399   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16400 do :
16401   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16402 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16403 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16404   cat >>confdefs.h <<_ACEOF
16405 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16406 _ACEOF
16407
16408 fi
16409 done
16410
16411   for ac_func in append_history history_truncate_file
16412 do :
16413   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16414 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16415 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16416   cat >>confdefs.h <<_ACEOF
16417 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16418 _ACEOF
16419
16420 fi
16421 done
16422
16423 fi
16424
16425
16426 # This test makes sure that run tests work at all.  Sometimes a shared
16427 # library is found by the linker, but the runtime linker can't find it.
16428 # This check should come after all modifications of compiler or linker
16429 # variables, and before any other run tests.
16430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16431 $as_echo_n "checking test program... " >&6; }
16432 if test "$cross_compiling" = yes; then :
16433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16434 $as_echo "cross-compiling" >&6; }
16435 else
16436   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16437 /* end confdefs.h.  */
16438 int main() { return 0; }
16439 _ACEOF
16440 if ac_fn_c_try_run "$LINENO"; then :
16441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16442 $as_echo "ok" >&6; }
16443 else
16444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16445 $as_echo "failed" >&6; }
16446 as_fn_error $? "
16447 Could not execute a simple test program.  This may be a problem
16448 related to locating shared libraries.  Check the file 'config.log'
16449 for the exact reason." "$LINENO" 5
16450 fi
16451 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16452   conftest.$ac_objext conftest.beam conftest.$ac_ext
16453 fi
16454
16455
16456 # --------------------
16457 # Run tests below here
16458 # --------------------
16459
16460
16461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16462 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16463 if ${pgac_cv_type_long_int_64+:} false; then :
16464   $as_echo_n "(cached) " >&6
16465 else
16466   if test "$cross_compiling" = yes; then :
16467   # If cross-compiling, check the size reported by the compiler and
16468 # trust that the arithmetic works.
16469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16470 /* end confdefs.h.  */
16471
16472 int
16473 main ()
16474 {
16475 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16476 test_array [0] = 0;
16477 return test_array [0];
16478
16479   ;
16480   return 0;
16481 }
16482 _ACEOF
16483 if ac_fn_c_try_compile "$LINENO"; then :
16484   pgac_cv_type_long_int_64=yes
16485 else
16486   pgac_cv_type_long_int_64=no
16487 fi
16488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16489 else
16490   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16491 /* end confdefs.h.  */
16492 typedef long int ac_int64;
16493
16494 /*
16495  * These are globals to discourage the compiler from folding all the
16496  * arithmetic tests down to compile-time constants.
16497  */
16498 ac_int64 a = 20000001;
16499 ac_int64 b = 40000005;
16500
16501 int does_int64_work()
16502 {
16503   ac_int64 c,d;
16504
16505   if (sizeof(ac_int64) != 8)
16506     return 0;                   /* definitely not the right size */
16507
16508   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16509   c = a * b;
16510   d = (c + b) / b;
16511   if (d != a+1)
16512     return 0;
16513   return 1;
16514 }
16515
16516 int
16517 main() {
16518   return (! does_int64_work());
16519 }
16520 _ACEOF
16521 if ac_fn_c_try_run "$LINENO"; then :
16522   pgac_cv_type_long_int_64=yes
16523 else
16524   pgac_cv_type_long_int_64=no
16525 fi
16526 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16527   conftest.$ac_objext conftest.beam conftest.$ac_ext
16528 fi
16529
16530 fi
16531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16532 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16533
16534 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16535 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16536
16537 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16538
16539 fi
16540
16541
16542 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16543   pg_int64_type="long int"
16544 else
16545   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16546 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16547 if ${pgac_cv_type_long_long_int_64+:} false; then :
16548   $as_echo_n "(cached) " >&6
16549 else
16550   if test "$cross_compiling" = yes; then :
16551   # If cross-compiling, check the size reported by the compiler and
16552 # trust that the arithmetic works.
16553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16554 /* end confdefs.h.  */
16555
16556 int
16557 main ()
16558 {
16559 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16560 test_array [0] = 0;
16561 return test_array [0];
16562
16563   ;
16564   return 0;
16565 }
16566 _ACEOF
16567 if ac_fn_c_try_compile "$LINENO"; then :
16568   pgac_cv_type_long_long_int_64=yes
16569 else
16570   pgac_cv_type_long_long_int_64=no
16571 fi
16572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16573 else
16574   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16575 /* end confdefs.h.  */
16576 typedef long long int ac_int64;
16577
16578 /*
16579  * These are globals to discourage the compiler from folding all the
16580  * arithmetic tests down to compile-time constants.
16581  */
16582 ac_int64 a = 20000001;
16583 ac_int64 b = 40000005;
16584
16585 int does_int64_work()
16586 {
16587   ac_int64 c,d;
16588
16589   if (sizeof(ac_int64) != 8)
16590     return 0;                   /* definitely not the right size */
16591
16592   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16593   c = a * b;
16594   d = (c + b) / b;
16595   if (d != a+1)
16596     return 0;
16597   return 1;
16598 }
16599
16600 int
16601 main() {
16602   return (! does_int64_work());
16603 }
16604 _ACEOF
16605 if ac_fn_c_try_run "$LINENO"; then :
16606   pgac_cv_type_long_long_int_64=yes
16607 else
16608   pgac_cv_type_long_long_int_64=no
16609 fi
16610 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16611   conftest.$ac_objext conftest.beam conftest.$ac_ext
16612 fi
16613
16614 fi
16615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16616 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16617
16618 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16619 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16620
16621 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16622
16623 fi
16624
16625   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16626     pg_int64_type="long long int"
16627   else
16628     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16629   fi
16630 fi
16631
16632
16633 cat >>confdefs.h <<_ACEOF
16634 #define PG_INT64_TYPE $pg_int64_type
16635 _ACEOF
16636
16637
16638 # Select the printf length modifier that goes with that, too.
16639 if test x"$pg_int64_type" = x"long long int" ; then
16640   INT64_MODIFIER='"ll"'
16641 else
16642   INT64_MODIFIER='"l"'
16643 fi
16644
16645
16646 cat >>confdefs.h <<_ACEOF
16647 #define INT64_MODIFIER $INT64_MODIFIER
16648 _ACEOF
16649
16650
16651 # has to be down here, rather than with the other builtins, because
16652 # the test uses PG_INT64_TYPE.
16653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16654 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16655 if ${pgac_cv__builtin_op_overflow+:} false; then :
16656   $as_echo_n "(cached) " >&6
16657 else
16658   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16659 /* end confdefs.h.  */
16660
16661 PG_INT64_TYPE a = 1;
16662 PG_INT64_TYPE b = 1;
16663 PG_INT64_TYPE result;
16664 int oflo;
16665
16666 int
16667 main ()
16668 {
16669 oflo = __builtin_mul_overflow(a, b, &result);
16670   ;
16671   return 0;
16672 }
16673 _ACEOF
16674 if ac_fn_c_try_link "$LINENO"; then :
16675   pgac_cv__builtin_op_overflow=yes
16676 else
16677   pgac_cv__builtin_op_overflow=no
16678 fi
16679 rm -f core conftest.err conftest.$ac_objext \
16680     conftest$ac_exeext conftest.$ac_ext
16681 fi
16682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16683 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16684 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16685
16686 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16687
16688 fi
16689
16690 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16691 # The cast to long int works around a bug in the HP C Compiler
16692 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16693 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16694 # This bug is HP SR number 8606223364.
16695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16696 $as_echo_n "checking size of void *... " >&6; }
16697 if ${ac_cv_sizeof_void_p+:} false; then :
16698   $as_echo_n "(cached) " >&6
16699 else
16700   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16701
16702 else
16703   if test "$ac_cv_type_void_p" = yes; then
16704      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16705 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16706 as_fn_error 77 "cannot compute sizeof (void *)
16707 See \`config.log' for more details" "$LINENO" 5; }
16708    else
16709      ac_cv_sizeof_void_p=0
16710    fi
16711 fi
16712
16713 fi
16714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16715 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16716
16717
16718
16719 cat >>confdefs.h <<_ACEOF
16720 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16721 _ACEOF
16722
16723
16724 # The cast to long int works around a bug in the HP C Compiler
16725 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16726 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16727 # This bug is HP SR number 8606223364.
16728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16729 $as_echo_n "checking size of size_t... " >&6; }
16730 if ${ac_cv_sizeof_size_t+:} false; then :
16731   $as_echo_n "(cached) " >&6
16732 else
16733   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16734
16735 else
16736   if test "$ac_cv_type_size_t" = yes; then
16737      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16738 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16739 as_fn_error 77 "cannot compute sizeof (size_t)
16740 See \`config.log' for more details" "$LINENO" 5; }
16741    else
16742      ac_cv_sizeof_size_t=0
16743    fi
16744 fi
16745
16746 fi
16747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16748 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16749
16750
16751
16752 cat >>confdefs.h <<_ACEOF
16753 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16754 _ACEOF
16755
16756
16757 # The cast to long int works around a bug in the HP C Compiler
16758 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16759 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16760 # This bug is HP SR number 8606223364.
16761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16762 $as_echo_n "checking size of long... " >&6; }
16763 if ${ac_cv_sizeof_long+:} false; then :
16764   $as_echo_n "(cached) " >&6
16765 else
16766   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16767
16768 else
16769   if test "$ac_cv_type_long" = yes; then
16770      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16771 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16772 as_fn_error 77 "cannot compute sizeof (long)
16773 See \`config.log' for more details" "$LINENO" 5; }
16774    else
16775      ac_cv_sizeof_long=0
16776    fi
16777 fi
16778
16779 fi
16780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16781 $as_echo "$ac_cv_sizeof_long" >&6; }
16782
16783
16784
16785 cat >>confdefs.h <<_ACEOF
16786 #define SIZEOF_LONG $ac_cv_sizeof_long
16787 _ACEOF
16788
16789
16790
16791 # Decide whether float4 is passed by value: user-selectable, enabled by default
16792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16793 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16794
16795
16796 # Check whether --enable-float4-byval was given.
16797 if test "${enable_float4_byval+set}" = set; then :
16798   enableval=$enable_float4_byval;
16799   case $enableval in
16800     yes)
16801
16802 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16803
16804                float4passbyval=true
16805       ;;
16806     no)
16807       float4passbyval=false
16808       ;;
16809     *)
16810       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16811       ;;
16812   esac
16813
16814 else
16815   enable_float4_byval=yes
16816
16817 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16818
16819                float4passbyval=true
16820 fi
16821
16822
16823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16824 $as_echo "$enable_float4_byval" >&6; }
16825
16826 cat >>confdefs.h <<_ACEOF
16827 #define FLOAT4PASSBYVAL $float4passbyval
16828 _ACEOF
16829
16830
16831 # Decide whether float8 is passed by value.
16832 # Note: this setting also controls int8 and related types such as timestamp.
16833 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16834 # If not, trying to select it is an error.
16835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16836 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16837 if test $ac_cv_sizeof_void_p -ge 8 ; then
16838
16839
16840 # Check whether --enable-float8-byval was given.
16841 if test "${enable_float8_byval+set}" = set; then :
16842   enableval=$enable_float8_byval;
16843   case $enableval in
16844     yes)
16845       :
16846       ;;
16847     no)
16848       :
16849       ;;
16850     *)
16851       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16852       ;;
16853   esac
16854
16855 else
16856   enable_float8_byval=yes
16857
16858 fi
16859
16860
16861 else
16862
16863
16864 # Check whether --enable-float8-byval was given.
16865 if test "${enable_float8_byval+set}" = set; then :
16866   enableval=$enable_float8_byval;
16867   case $enableval in
16868     yes)
16869       :
16870       ;;
16871     no)
16872       :
16873       ;;
16874     *)
16875       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16876       ;;
16877   esac
16878
16879 else
16880   enable_float8_byval=no
16881
16882 fi
16883
16884
16885   if test "$enable_float8_byval" = yes ; then
16886     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16887   fi
16888 fi
16889 if test "$enable_float8_byval" = yes ; then
16890
16891 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16892
16893   float8passbyval=true
16894 else
16895   float8passbyval=false
16896 fi
16897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16898 $as_echo "$enable_float8_byval" >&6; }
16899
16900 cat >>confdefs.h <<_ACEOF
16901 #define FLOAT8PASSBYVAL $float8passbyval
16902 _ACEOF
16903
16904
16905 # Determine memory alignment requirements for the basic C data types.
16906
16907 # The cast to long int works around a bug in the HP C Compiler,
16908 # see AC_CHECK_SIZEOF for more information.
16909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16910 $as_echo_n "checking alignment of short... " >&6; }
16911 if ${ac_cv_alignof_short+:} false; then :
16912   $as_echo_n "(cached) " >&6
16913 else
16914   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16915 #ifndef offsetof
16916 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16917 #endif
16918 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16919
16920 else
16921   if test "$ac_cv_type_short" = yes; then
16922      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16923 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16924 as_fn_error 77 "cannot compute alignment of short
16925 See \`config.log' for more details" "$LINENO" 5; }
16926    else
16927      ac_cv_alignof_short=0
16928    fi
16929 fi
16930
16931 fi
16932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16933 $as_echo "$ac_cv_alignof_short" >&6; }
16934
16935
16936
16937 cat >>confdefs.h <<_ACEOF
16938 #define ALIGNOF_SHORT $ac_cv_alignof_short
16939 _ACEOF
16940
16941
16942 # The cast to long int works around a bug in the HP C Compiler,
16943 # see AC_CHECK_SIZEOF for more information.
16944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16945 $as_echo_n "checking alignment of int... " >&6; }
16946 if ${ac_cv_alignof_int+:} false; then :
16947   $as_echo_n "(cached) " >&6
16948 else
16949   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16950 #ifndef offsetof
16951 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16952 #endif
16953 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16954
16955 else
16956   if test "$ac_cv_type_int" = yes; then
16957      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16958 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16959 as_fn_error 77 "cannot compute alignment of int
16960 See \`config.log' for more details" "$LINENO" 5; }
16961    else
16962      ac_cv_alignof_int=0
16963    fi
16964 fi
16965
16966 fi
16967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16968 $as_echo "$ac_cv_alignof_int" >&6; }
16969
16970
16971
16972 cat >>confdefs.h <<_ACEOF
16973 #define ALIGNOF_INT $ac_cv_alignof_int
16974 _ACEOF
16975
16976
16977 # The cast to long int works around a bug in the HP C Compiler,
16978 # see AC_CHECK_SIZEOF for more information.
16979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16980 $as_echo_n "checking alignment of long... " >&6; }
16981 if ${ac_cv_alignof_long+:} false; then :
16982   $as_echo_n "(cached) " >&6
16983 else
16984   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16985 #ifndef offsetof
16986 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16987 #endif
16988 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16989
16990 else
16991   if test "$ac_cv_type_long" = yes; then
16992      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16993 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16994 as_fn_error 77 "cannot compute alignment of long
16995 See \`config.log' for more details" "$LINENO" 5; }
16996    else
16997      ac_cv_alignof_long=0
16998    fi
16999 fi
17000
17001 fi
17002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17003 $as_echo "$ac_cv_alignof_long" >&6; }
17004
17005
17006
17007 cat >>confdefs.h <<_ACEOF
17008 #define ALIGNOF_LONG $ac_cv_alignof_long
17009 _ACEOF
17010
17011
17012 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17013   # The cast to long int works around a bug in the HP C Compiler,
17014 # see AC_CHECK_SIZEOF for more information.
17015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17016 $as_echo_n "checking alignment of long long int... " >&6; }
17017 if ${ac_cv_alignof_long_long_int+:} false; then :
17018   $as_echo_n "(cached) " >&6
17019 else
17020   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
17021 #ifndef offsetof
17022 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17023 #endif
17024 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17025
17026 else
17027   if test "$ac_cv_type_long_long_int" = yes; then
17028      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17029 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17030 as_fn_error 77 "cannot compute alignment of long long int
17031 See \`config.log' for more details" "$LINENO" 5; }
17032    else
17033      ac_cv_alignof_long_long_int=0
17034    fi
17035 fi
17036
17037 fi
17038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17039 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17040
17041
17042
17043 cat >>confdefs.h <<_ACEOF
17044 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17045 _ACEOF
17046
17047
17048 fi
17049 # The cast to long int works around a bug in the HP C Compiler,
17050 # see AC_CHECK_SIZEOF for more information.
17051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17052 $as_echo_n "checking alignment of double... " >&6; }
17053 if ${ac_cv_alignof_double+:} false; then :
17054   $as_echo_n "(cached) " >&6
17055 else
17056   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
17057 #ifndef offsetof
17058 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17059 #endif
17060 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17061
17062 else
17063   if test "$ac_cv_type_double" = yes; then
17064      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17065 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17066 as_fn_error 77 "cannot compute alignment of double
17067 See \`config.log' for more details" "$LINENO" 5; }
17068    else
17069      ac_cv_alignof_double=0
17070    fi
17071 fi
17072
17073 fi
17074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17075 $as_echo "$ac_cv_alignof_double" >&6; }
17076
17077
17078
17079 cat >>confdefs.h <<_ACEOF
17080 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17081 _ACEOF
17082
17083
17084
17085 # Compute maximum alignment of any basic type.
17086 # We assume long's alignment is at least as strong as char, short, or int;
17087 # but we must check long long (if it is being used for int64) and double.
17088 # Note that we intentionally do not consider any types wider than 64 bits,
17089 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17090 # for disk and memory space.
17091
17092 MAX_ALIGNOF=$ac_cv_alignof_long
17093 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17094   MAX_ALIGNOF=$ac_cv_alignof_double
17095 fi
17096 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17097   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17098 fi
17099
17100 cat >>confdefs.h <<_ACEOF
17101 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17102 _ACEOF
17103
17104
17105
17106 # Some platforms predefine the types int8, int16, etc.  Only check
17107 # a (hopefully) representative subset.
17108 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17109 "
17110 if test "x$ac_cv_type_int8" = xyes; then :
17111
17112 cat >>confdefs.h <<_ACEOF
17113 #define HAVE_INT8 1
17114 _ACEOF
17115
17116
17117 fi
17118 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17119 "
17120 if test "x$ac_cv_type_uint8" = xyes; then :
17121
17122 cat >>confdefs.h <<_ACEOF
17123 #define HAVE_UINT8 1
17124 _ACEOF
17125
17126
17127 fi
17128 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17129 "
17130 if test "x$ac_cv_type_int64" = xyes; then :
17131
17132 cat >>confdefs.h <<_ACEOF
17133 #define HAVE_INT64 1
17134 _ACEOF
17135
17136
17137 fi
17138 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17139 "
17140 if test "x$ac_cv_type_uint64" = xyes; then :
17141
17142 cat >>confdefs.h <<_ACEOF
17143 #define HAVE_UINT64 1
17144 _ACEOF
17145
17146
17147 fi
17148
17149
17150 # Some compilers offer a 128-bit integer scalar type.
17151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17152 $as_echo_n "checking for __int128... " >&6; }
17153 if ${pgac_cv__128bit_int+:} false; then :
17154   $as_echo_n "(cached) " >&6
17155 else
17156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17157 /* end confdefs.h.  */
17158
17159 /*
17160  * We don't actually run this test, just link it to verify that any support
17161  * functions needed for __int128 are present.
17162  *
17163  * These are globals to discourage the compiler from folding all the
17164  * arithmetic tests down to compile-time constants.  We do not have
17165  * convenient support for 128bit literals at this point...
17166  */
17167 __int128 a = 48828125;
17168 __int128 b = 97656250;
17169
17170 int
17171 main ()
17172 {
17173
17174 __int128 c,d;
17175 a = (a << 12) + 1; /* 200000000001 */
17176 b = (b << 12) + 5; /* 400000000005 */
17177 /* try the most relevant arithmetic ops */
17178 c = a * b;
17179 d = (c + b) / b;
17180 /* must use the results, else compiler may optimize arithmetic away */
17181 if (d != a+1)
17182   return 1;
17183
17184   ;
17185   return 0;
17186 }
17187 _ACEOF
17188 if ac_fn_c_try_link "$LINENO"; then :
17189   pgac_cv__128bit_int=yes
17190 else
17191   pgac_cv__128bit_int=no
17192 fi
17193 rm -f core conftest.err conftest.$ac_objext \
17194     conftest$ac_exeext conftest.$ac_ext
17195 fi
17196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17197 $as_echo "$pgac_cv__128bit_int" >&6; }
17198 if test x"$pgac_cv__128bit_int" = xyes ; then
17199   # Use of non-default alignment with __int128 tickles bugs in some compilers.
17200   # If not cross-compiling, we can test for bugs and disable use of __int128
17201   # with buggy compilers.  If cross-compiling, hope for the best.
17202   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17203   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17204 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17205 if ${pgac_cv__128bit_int_bug+:} false; then :
17206   $as_echo_n "(cached) " >&6
17207 else
17208   if test "$cross_compiling" = yes; then :
17209   pgac_cv__128bit_int_bug="assuming ok"
17210 else
17211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17212 /* end confdefs.h.  */
17213
17214 /* This must match the corresponding code in c.h: */
17215 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17216 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17217 #endif
17218 typedef __int128 int128a
17219 #if defined(pg_attribute_aligned)
17220 pg_attribute_aligned(8)
17221 #endif
17222 ;
17223 int128a holder;
17224 void pass_by_val(void *buffer, int128a par) { holder = par; }
17225
17226 int
17227 main ()
17228 {
17229
17230 long int i64 = 97656225L << 12;
17231 int128a q;
17232 pass_by_val(main, (int128a) i64);
17233 q = (int128a) i64;
17234 if (q != holder)
17235   return 1;
17236
17237   ;
17238   return 0;
17239 }
17240 _ACEOF
17241 if ac_fn_c_try_run "$LINENO"; then :
17242   pgac_cv__128bit_int_bug=ok
17243 else
17244   pgac_cv__128bit_int_bug=broken
17245 fi
17246 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17247   conftest.$ac_objext conftest.beam conftest.$ac_ext
17248 fi
17249
17250 fi
17251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17252 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17253   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17254
17255 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17256
17257     # The cast to long int works around a bug in the HP C Compiler,
17258 # see AC_CHECK_SIZEOF for more information.
17259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17260 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17261 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17262   $as_echo_n "(cached) " >&6
17263 else
17264   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
17265 #ifndef offsetof
17266 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17267 #endif
17268 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17269
17270 else
17271   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17272      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17273 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17274 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17275 See \`config.log' for more details" "$LINENO" 5; }
17276    else
17277      ac_cv_alignof_PG_INT128_TYPE=0
17278    fi
17279 fi
17280
17281 fi
17282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17283 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17284
17285
17286
17287 cat >>confdefs.h <<_ACEOF
17288 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17289 _ACEOF
17290
17291
17292   fi
17293 fi
17294
17295 # Check for various atomic operations now that we have checked how to declare
17296 # 64bit integers.
17297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17298 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17299 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17300   $as_echo_n "(cached) " >&6
17301 else
17302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17303 /* end confdefs.h.  */
17304
17305 int
17306 main ()
17307 {
17308 char lock = 0;
17309    __sync_lock_test_and_set(&lock, 1);
17310    __sync_lock_release(&lock);
17311   ;
17312   return 0;
17313 }
17314 _ACEOF
17315 if ac_fn_c_try_link "$LINENO"; then :
17316   pgac_cv_gcc_sync_char_tas="yes"
17317 else
17318   pgac_cv_gcc_sync_char_tas="no"
17319 fi
17320 rm -f core conftest.err conftest.$ac_objext \
17321     conftest$ac_exeext conftest.$ac_ext
17322 fi
17323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17324 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17325 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17326
17327 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17328
17329 fi
17330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17331 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17332 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17333   $as_echo_n "(cached) " >&6
17334 else
17335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17336 /* end confdefs.h.  */
17337
17338 int
17339 main ()
17340 {
17341 int lock = 0;
17342    __sync_lock_test_and_set(&lock, 1);
17343    __sync_lock_release(&lock);
17344   ;
17345   return 0;
17346 }
17347 _ACEOF
17348 if ac_fn_c_try_link "$LINENO"; then :
17349   pgac_cv_gcc_sync_int32_tas="yes"
17350 else
17351   pgac_cv_gcc_sync_int32_tas="no"
17352 fi
17353 rm -f core conftest.err conftest.$ac_objext \
17354     conftest$ac_exeext conftest.$ac_ext
17355 fi
17356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17357 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17358 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17359
17360 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17361
17362 fi
17363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17364 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17365 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17366   $as_echo_n "(cached) " >&6
17367 else
17368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17369 /* end confdefs.h.  */
17370
17371 int
17372 main ()
17373 {
17374 int val = 0;
17375    __sync_val_compare_and_swap(&val, 0, 37);
17376   ;
17377   return 0;
17378 }
17379 _ACEOF
17380 if ac_fn_c_try_link "$LINENO"; then :
17381   pgac_cv_gcc_sync_int32_cas="yes"
17382 else
17383   pgac_cv_gcc_sync_int32_cas="no"
17384 fi
17385 rm -f core conftest.err conftest.$ac_objext \
17386     conftest$ac_exeext conftest.$ac_ext
17387 fi
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17389 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17390 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17391
17392 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17393
17394 fi
17395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17396 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17397 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17398   $as_echo_n "(cached) " >&6
17399 else
17400   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17401 /* end confdefs.h.  */
17402
17403 int
17404 main ()
17405 {
17406 PG_INT64_TYPE lock = 0;
17407    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17408   ;
17409   return 0;
17410 }
17411 _ACEOF
17412 if ac_fn_c_try_link "$LINENO"; then :
17413   pgac_cv_gcc_sync_int64_cas="yes"
17414 else
17415   pgac_cv_gcc_sync_int64_cas="no"
17416 fi
17417 rm -f core conftest.err conftest.$ac_objext \
17418     conftest$ac_exeext conftest.$ac_ext
17419 fi
17420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17421 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17422 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17423
17424 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17425
17426 fi
17427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17428 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17429 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17430   $as_echo_n "(cached) " >&6
17431 else
17432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17433 /* end confdefs.h.  */
17434
17435 int
17436 main ()
17437 {
17438 int val = 0;
17439    int expect = 0;
17440    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17441   ;
17442   return 0;
17443 }
17444 _ACEOF
17445 if ac_fn_c_try_link "$LINENO"; then :
17446   pgac_cv_gcc_atomic_int32_cas="yes"
17447 else
17448   pgac_cv_gcc_atomic_int32_cas="no"
17449 fi
17450 rm -f core conftest.err conftest.$ac_objext \
17451     conftest$ac_exeext conftest.$ac_ext
17452 fi
17453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17454 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17455 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17456
17457 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17458
17459 fi
17460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17461 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17462 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17463   $as_echo_n "(cached) " >&6
17464 else
17465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17466 /* end confdefs.h.  */
17467
17468 int
17469 main ()
17470 {
17471 PG_INT64_TYPE val = 0;
17472    PG_INT64_TYPE expect = 0;
17473    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17474   ;
17475   return 0;
17476 }
17477 _ACEOF
17478 if ac_fn_c_try_link "$LINENO"; then :
17479   pgac_cv_gcc_atomic_int64_cas="yes"
17480 else
17481   pgac_cv_gcc_atomic_int64_cas="no"
17482 fi
17483 rm -f core conftest.err conftest.$ac_objext \
17484     conftest$ac_exeext conftest.$ac_ext
17485 fi
17486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17487 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17488 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17489
17490 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17491
17492 fi
17493
17494
17495 # Check for x86 cpuid instruction
17496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17497 $as_echo_n "checking for __get_cpuid... " >&6; }
17498 if ${pgac_cv__get_cpuid+:} false; then :
17499   $as_echo_n "(cached) " >&6
17500 else
17501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17502 /* end confdefs.h.  */
17503 #include <cpuid.h>
17504 int
17505 main ()
17506 {
17507 unsigned int exx[4] = {0, 0, 0, 0};
17508   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17509
17510   ;
17511   return 0;
17512 }
17513 _ACEOF
17514 if ac_fn_c_try_link "$LINENO"; then :
17515   pgac_cv__get_cpuid="yes"
17516 else
17517   pgac_cv__get_cpuid="no"
17518 fi
17519 rm -f core conftest.err conftest.$ac_objext \
17520     conftest$ac_exeext conftest.$ac_ext
17521 fi
17522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17523 $as_echo "$pgac_cv__get_cpuid" >&6; }
17524 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17525
17526 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17527
17528 fi
17529
17530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17531 $as_echo_n "checking for __cpuid... " >&6; }
17532 if ${pgac_cv__cpuid+:} false; then :
17533   $as_echo_n "(cached) " >&6
17534 else
17535   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17536 /* end confdefs.h.  */
17537 #include <intrin.h>
17538 int
17539 main ()
17540 {
17541 unsigned int exx[4] = {0, 0, 0, 0};
17542   __get_cpuid(exx[0], 1);
17543
17544   ;
17545   return 0;
17546 }
17547 _ACEOF
17548 if ac_fn_c_try_link "$LINENO"; then :
17549   pgac_cv__cpuid="yes"
17550 else
17551   pgac_cv__cpuid="no"
17552 fi
17553 rm -f core conftest.err conftest.$ac_objext \
17554     conftest$ac_exeext conftest.$ac_ext
17555 fi
17556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17557 $as_echo "$pgac_cv__cpuid" >&6; }
17558 if test x"$pgac_cv__cpuid" = x"yes"; then
17559
17560 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17561
17562 fi
17563
17564 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17565 #
17566 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17567 # with the default compiler flags. If not, check if adding the -msse4.2
17568 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17570 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17571 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17572   $as_echo_n "(cached) " >&6
17573 else
17574   pgac_save_CFLAGS=$CFLAGS
17575 CFLAGS="$pgac_save_CFLAGS "
17576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17577 /* end confdefs.h.  */
17578 #include <nmmintrin.h>
17579 int
17580 main ()
17581 {
17582 unsigned int crc = 0;
17583    crc = _mm_crc32_u8(crc, 0);
17584    crc = _mm_crc32_u32(crc, 0);
17585    /* return computed value, to prevent the above being optimized away */
17586    return crc == 0;
17587   ;
17588   return 0;
17589 }
17590 _ACEOF
17591 if ac_fn_c_try_link "$LINENO"; then :
17592   pgac_cv_sse42_crc32_intrinsics_=yes
17593 else
17594   pgac_cv_sse42_crc32_intrinsics_=no
17595 fi
17596 rm -f core conftest.err conftest.$ac_objext \
17597     conftest$ac_exeext conftest.$ac_ext
17598 CFLAGS="$pgac_save_CFLAGS"
17599 fi
17600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17601 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17602 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17603   CFLAGS_SSE42=""
17604   pgac_sse42_crc32_intrinsics=yes
17605 fi
17606
17607 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17609 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17610 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17611   $as_echo_n "(cached) " >&6
17612 else
17613   pgac_save_CFLAGS=$CFLAGS
17614 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17616 /* end confdefs.h.  */
17617 #include <nmmintrin.h>
17618 int
17619 main ()
17620 {
17621 unsigned int crc = 0;
17622    crc = _mm_crc32_u8(crc, 0);
17623    crc = _mm_crc32_u32(crc, 0);
17624    /* return computed value, to prevent the above being optimized away */
17625    return crc == 0;
17626   ;
17627   return 0;
17628 }
17629 _ACEOF
17630 if ac_fn_c_try_link "$LINENO"; then :
17631   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17632 else
17633   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17634 fi
17635 rm -f core conftest.err conftest.$ac_objext \
17636     conftest$ac_exeext conftest.$ac_ext
17637 CFLAGS="$pgac_save_CFLAGS"
17638 fi
17639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17640 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17641 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17642   CFLAGS_SSE42="-msse4.2"
17643   pgac_sse42_crc32_intrinsics=yes
17644 fi
17645
17646 fi
17647
17648
17649 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17650 # define __SSE4_2__ in that case.
17651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17652 /* end confdefs.h.  */
17653
17654 int
17655 main ()
17656 {
17657
17658 #ifndef __SSE4_2__
17659 #error __SSE4_2__ not defined
17660 #endif
17661
17662   ;
17663   return 0;
17664 }
17665 _ACEOF
17666 if ac_fn_c_try_compile "$LINENO"; then :
17667   SSE4_2_TARGETED=1
17668 fi
17669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17670
17671 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17672 #
17673 # First check if __crc32c* intrinsics can be used with the default compiler
17674 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17675 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17677 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17678 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17679   $as_echo_n "(cached) " >&6
17680 else
17681   pgac_save_CFLAGS=$CFLAGS
17682 CFLAGS="$pgac_save_CFLAGS "
17683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17684 /* end confdefs.h.  */
17685 #include <arm_acle.h>
17686 int
17687 main ()
17688 {
17689 unsigned int crc = 0;
17690    crc = __crc32cb(crc, 0);
17691    crc = __crc32ch(crc, 0);
17692    crc = __crc32cw(crc, 0);
17693    crc = __crc32cd(crc, 0);
17694    /* return computed value, to prevent the above being optimized away */
17695    return crc == 0;
17696   ;
17697   return 0;
17698 }
17699 _ACEOF
17700 if ac_fn_c_try_link "$LINENO"; then :
17701   pgac_cv_armv8_crc32c_intrinsics_=yes
17702 else
17703   pgac_cv_armv8_crc32c_intrinsics_=no
17704 fi
17705 rm -f core conftest.err conftest.$ac_objext \
17706     conftest$ac_exeext conftest.$ac_ext
17707 CFLAGS="$pgac_save_CFLAGS"
17708 fi
17709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17710 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17711 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17712   CFLAGS_ARMV8_CRC32C=""
17713   pgac_armv8_crc32c_intrinsics=yes
17714 fi
17715
17716 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17718 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17719 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17720   $as_echo_n "(cached) " >&6
17721 else
17722   pgac_save_CFLAGS=$CFLAGS
17723 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17725 /* end confdefs.h.  */
17726 #include <arm_acle.h>
17727 int
17728 main ()
17729 {
17730 unsigned int crc = 0;
17731    crc = __crc32cb(crc, 0);
17732    crc = __crc32ch(crc, 0);
17733    crc = __crc32cw(crc, 0);
17734    crc = __crc32cd(crc, 0);
17735    /* return computed value, to prevent the above being optimized away */
17736    return crc == 0;
17737   ;
17738   return 0;
17739 }
17740 _ACEOF
17741 if ac_fn_c_try_link "$LINENO"; then :
17742   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17743 else
17744   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17745 fi
17746 rm -f core conftest.err conftest.$ac_objext \
17747     conftest$ac_exeext conftest.$ac_ext
17748 CFLAGS="$pgac_save_CFLAGS"
17749 fi
17750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17751 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17752 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17753   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17754   pgac_armv8_crc32c_intrinsics=yes
17755 fi
17756
17757 fi
17758
17759
17760 # Select CRC-32C implementation.
17761 #
17762 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17763 # use the special CRC instructions for calculating CRC-32C. If we're not
17764 # targeting such a processor, but we can nevertheless produce code that uses
17765 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17766 # implementations and select which one to use at runtime, depending on whether
17767 # SSE 4.2 is supported by the processor we're running on.
17768 #
17769 # Similarly, if we are targeting an ARM processor that has the CRC
17770 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17771 # we're not targeting such a processor, but can nevertheless produce code that
17772 # uses the CRC instructions, compile both, and select at runtime.
17773 #
17774 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17775 # in the template or configure command line.
17776 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
17777   # Use Intel SSE 4.2 if available.
17778   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17779     USE_SSE42_CRC32C=1
17780   else
17781     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17782     # the runtime check.
17783     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
17784       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17785     else
17786       # Use ARM CRC Extension if available.
17787       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17788         USE_ARMV8_CRC32C=1
17789       else
17790         # ARM CRC Extension, with runtime check?
17791         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17792           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17793         else
17794           # fall back to slicing-by-8 algorithm, which doesn't require any
17795           # special CPU support.
17796           USE_SLICING_BY_8_CRC32C=1
17797         fi
17798       fi
17799     fi
17800   fi
17801 fi
17802
17803 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17805 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17806 if test x"$USE_SSE42_CRC32C" = x"1"; then
17807
17808 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17809
17810   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17812 $as_echo "SSE 4.2" >&6; }
17813 else
17814   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17815
17816 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17817
17818     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17819     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17820 $as_echo "SSE 4.2 with runtime check" >&6; }
17821   else
17822     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17823
17824 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17825
17826       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17827       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17828 $as_echo "ARMv8 CRC instructions" >&6; }
17829     else
17830       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17831
17832 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17833
17834         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17835         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17836 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17837       else
17838
17839 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17840
17841         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17842         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17843 $as_echo "slicing-by-8" >&6; }
17844       fi
17845     fi
17846   fi
17847 fi
17848
17849
17850
17851 # Select semaphore implementation type.
17852 if test "$PORTNAME" != "win32"; then
17853   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17854     # Need sem_open for this
17855     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17856 $as_echo_n "checking for library containing sem_open... " >&6; }
17857 if ${ac_cv_search_sem_open+:} false; then :
17858   $as_echo_n "(cached) " >&6
17859 else
17860   ac_func_search_save_LIBS=$LIBS
17861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17862 /* end confdefs.h.  */
17863
17864 /* Override any GCC internal prototype to avoid an error.
17865    Use char because int might match the return type of a GCC
17866    builtin and then its argument prototype would still apply.  */
17867 #ifdef __cplusplus
17868 extern "C"
17869 #endif
17870 char sem_open ();
17871 int
17872 main ()
17873 {
17874 return sem_open ();
17875   ;
17876   return 0;
17877 }
17878 _ACEOF
17879 for ac_lib in '' rt pthread; do
17880   if test -z "$ac_lib"; then
17881     ac_res="none required"
17882   else
17883     ac_res=-l$ac_lib
17884     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17885   fi
17886   if ac_fn_c_try_link "$LINENO"; then :
17887   ac_cv_search_sem_open=$ac_res
17888 fi
17889 rm -f core conftest.err conftest.$ac_objext \
17890     conftest$ac_exeext
17891   if ${ac_cv_search_sem_open+:} false; then :
17892   break
17893 fi
17894 done
17895 if ${ac_cv_search_sem_open+:} false; then :
17896
17897 else
17898   ac_cv_search_sem_open=no
17899 fi
17900 rm conftest.$ac_ext
17901 LIBS=$ac_func_search_save_LIBS
17902 fi
17903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17904 $as_echo "$ac_cv_search_sem_open" >&6; }
17905 ac_res=$ac_cv_search_sem_open
17906 if test "$ac_res" != no; then :
17907   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17908   USE_NAMED_POSIX_SEMAPHORES=1
17909 fi
17910
17911   fi
17912   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17913     # Need sem_init for this
17914     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17915 $as_echo_n "checking for library containing sem_init... " >&6; }
17916 if ${ac_cv_search_sem_init+:} false; then :
17917   $as_echo_n "(cached) " >&6
17918 else
17919   ac_func_search_save_LIBS=$LIBS
17920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17921 /* end confdefs.h.  */
17922
17923 /* Override any GCC internal prototype to avoid an error.
17924    Use char because int might match the return type of a GCC
17925    builtin and then its argument prototype would still apply.  */
17926 #ifdef __cplusplus
17927 extern "C"
17928 #endif
17929 char sem_init ();
17930 int
17931 main ()
17932 {
17933 return sem_init ();
17934   ;
17935   return 0;
17936 }
17937 _ACEOF
17938 for ac_lib in '' rt pthread; do
17939   if test -z "$ac_lib"; then
17940     ac_res="none required"
17941   else
17942     ac_res=-l$ac_lib
17943     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17944   fi
17945   if ac_fn_c_try_link "$LINENO"; then :
17946   ac_cv_search_sem_init=$ac_res
17947 fi
17948 rm -f core conftest.err conftest.$ac_objext \
17949     conftest$ac_exeext
17950   if ${ac_cv_search_sem_init+:} false; then :
17951   break
17952 fi
17953 done
17954 if ${ac_cv_search_sem_init+:} false; then :
17955
17956 else
17957   ac_cv_search_sem_init=no
17958 fi
17959 rm conftest.$ac_ext
17960 LIBS=$ac_func_search_save_LIBS
17961 fi
17962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17963 $as_echo "$ac_cv_search_sem_init" >&6; }
17964 ac_res=$ac_cv_search_sem_init
17965 if test "$ac_res" != no; then :
17966   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17967   USE_UNNAMED_POSIX_SEMAPHORES=1
17968 fi
17969
17970   fi
17971   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17972 $as_echo_n "checking which semaphore API to use... " >&6; }
17973   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17974
17975 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17976
17977     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17978     sematype="named POSIX"
17979   else
17980     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17981
17982 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17983
17984       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17985       sematype="unnamed POSIX"
17986     else
17987
17988 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17989
17990       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17991       sematype="System V"
17992     fi
17993   fi
17994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17995 $as_echo "$sematype" >&6; }
17996 else
17997
17998 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17999
18000   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18001 fi
18002
18003
18004 # Select shared-memory implementation type.
18005 if test "$PORTNAME" != "win32"; then
18006
18007 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18008
18009   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18010 else
18011
18012 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18013
18014   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18015 fi
18016
18017 # Select random number source
18018 #
18019 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
18020 # in the template or configure command line.
18021
18022 # If not selected manually, try to select a source automatically.
18023 if test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
18024   if test x"$with_openssl" = x"yes" ; then
18025     USE_OPENSSL_RANDOM=1
18026   elif test "$PORTNAME" = "win32" ; then
18027     USE_WIN32_RANDOM=1
18028   else
18029     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18030 $as_echo_n "checking for /dev/urandom... " >&6; }
18031 if ${ac_cv_file__dev_urandom+:} false; then :
18032   $as_echo_n "(cached) " >&6
18033 else
18034   test "$cross_compiling" = yes &&
18035   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18036 if test -r "/dev/urandom"; then
18037   ac_cv_file__dev_urandom=yes
18038 else
18039   ac_cv_file__dev_urandom=no
18040 fi
18041 fi
18042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18043 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18044 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18045
18046 fi
18047
18048
18049     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
18050       USE_DEV_URANDOM=1
18051     fi
18052   fi
18053 fi
18054
18055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18056 $as_echo_n "checking which random number source to use... " >&6; }
18057 if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
18058
18059 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
18060
18061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18062 $as_echo "OpenSSL" >&6; }
18063 elif test x"$USE_WIN32_RANDOM" = x"1" ; then
18064
18065 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
18066
18067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18068 $as_echo "Windows native" >&6; }
18069 elif test x"$USE_DEV_URANDOM" = x"1" ; then
18070
18071 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
18072
18073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18074 $as_echo "/dev/urandom" >&6; }
18075 else
18076   as_fn_error $? "
18077 no source of strong random numbers was found
18078 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers." "$LINENO" 5
18079 fi
18080
18081 # If not set in template file, set bytes to use libc memset()
18082 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18083   MEMSET_LOOP_LIMIT=1024
18084 fi
18085
18086 cat >>confdefs.h <<_ACEOF
18087 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18088 _ACEOF
18089
18090
18091
18092 if test "$enable_nls" = yes ; then
18093
18094   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18095 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18096 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18097   $as_echo_n "(cached) " >&6
18098 else
18099   ac_func_search_save_LIBS=$LIBS
18100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18101 /* end confdefs.h.  */
18102
18103 /* Override any GCC internal prototype to avoid an error.
18104    Use char because int might match the return type of a GCC
18105    builtin and then its argument prototype would still apply.  */
18106 #ifdef __cplusplus
18107 extern "C"
18108 #endif
18109 char bind_textdomain_codeset ();
18110 int
18111 main ()
18112 {
18113 return bind_textdomain_codeset ();
18114   ;
18115   return 0;
18116 }
18117 _ACEOF
18118 for ac_lib in '' intl; do
18119   if test -z "$ac_lib"; then
18120     ac_res="none required"
18121   else
18122     ac_res=-l$ac_lib
18123     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18124   fi
18125   if ac_fn_c_try_link "$LINENO"; then :
18126   ac_cv_search_bind_textdomain_codeset=$ac_res
18127 fi
18128 rm -f core conftest.err conftest.$ac_objext \
18129     conftest$ac_exeext
18130   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18131   break
18132 fi
18133 done
18134 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18135
18136 else
18137   ac_cv_search_bind_textdomain_codeset=no
18138 fi
18139 rm conftest.$ac_ext
18140 LIBS=$ac_func_search_save_LIBS
18141 fi
18142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18143 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18144 ac_res=$ac_cv_search_bind_textdomain_codeset
18145 if test "$ac_res" != no; then :
18146   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18147
18148 else
18149   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18150 fi
18151
18152   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18153 if test "x$ac_cv_header_libintl_h" = xyes; then :
18154
18155 else
18156   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18157 fi
18158
18159
18160   if test -z "$MSGFMT"; then
18161   for ac_prog in msgfmt
18162 do
18163   # Extract the first word of "$ac_prog", so it can be a program name with args.
18164 set dummy $ac_prog; ac_word=$2
18165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18166 $as_echo_n "checking for $ac_word... " >&6; }
18167 if ${ac_cv_path_MSGFMT+:} false; then :
18168   $as_echo_n "(cached) " >&6
18169 else
18170   case $MSGFMT in
18171   [\\/]* | ?:[\\/]*)
18172   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18173   ;;
18174   *)
18175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18176 for as_dir in $PATH
18177 do
18178   IFS=$as_save_IFS
18179   test -z "$as_dir" && as_dir=.
18180     for ac_exec_ext in '' $ac_executable_extensions; do
18181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18182     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18184     break 2
18185   fi
18186 done
18187   done
18188 IFS=$as_save_IFS
18189
18190   ;;
18191 esac
18192 fi
18193 MSGFMT=$ac_cv_path_MSGFMT
18194 if test -n "$MSGFMT"; then
18195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18196 $as_echo "$MSGFMT" >&6; }
18197 else
18198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18199 $as_echo "no" >&6; }
18200 fi
18201
18202
18203   test -n "$MSGFMT" && break
18204 done
18205
18206 else
18207   # Report the value of MSGFMT in configure's output in all cases.
18208   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18209 $as_echo_n "checking for MSGFMT... " >&6; }
18210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18211 $as_echo "$MSGFMT" >&6; }
18212 fi
18213
18214     if test -z "$MSGFMT"; then
18215     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18216   fi
18217   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18218 $as_echo_n "checking for msgfmt flags... " >&6; }
18219 if ${pgac_cv_msgfmt_flags+:} false; then :
18220   $as_echo_n "(cached) " >&6
18221 else
18222   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18223     pgac_cv_msgfmt_flags=-c
18224 fi
18225 fi
18226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18227 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18228   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18229
18230   if test -z "$MSGMERGE"; then
18231   for ac_prog in msgmerge
18232 do
18233   # Extract the first word of "$ac_prog", so it can be a program name with args.
18234 set dummy $ac_prog; ac_word=$2
18235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18236 $as_echo_n "checking for $ac_word... " >&6; }
18237 if ${ac_cv_path_MSGMERGE+:} false; then :
18238   $as_echo_n "(cached) " >&6
18239 else
18240   case $MSGMERGE in
18241   [\\/]* | ?:[\\/]*)
18242   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18243   ;;
18244   *)
18245   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18246 for as_dir in $PATH
18247 do
18248   IFS=$as_save_IFS
18249   test -z "$as_dir" && as_dir=.
18250     for ac_exec_ext in '' $ac_executable_extensions; do
18251   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18252     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18253     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18254     break 2
18255   fi
18256 done
18257   done
18258 IFS=$as_save_IFS
18259
18260   ;;
18261 esac
18262 fi
18263 MSGMERGE=$ac_cv_path_MSGMERGE
18264 if test -n "$MSGMERGE"; then
18265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18266 $as_echo "$MSGMERGE" >&6; }
18267 else
18268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18269 $as_echo "no" >&6; }
18270 fi
18271
18272
18273   test -n "$MSGMERGE" && break
18274 done
18275
18276 else
18277   # Report the value of MSGMERGE in configure's output in all cases.
18278   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18279 $as_echo_n "checking for MSGMERGE... " >&6; }
18280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18281 $as_echo "$MSGMERGE" >&6; }
18282 fi
18283
18284   if test -z "$XGETTEXT"; then
18285   for ac_prog in xgettext
18286 do
18287   # Extract the first word of "$ac_prog", so it can be a program name with args.
18288 set dummy $ac_prog; ac_word=$2
18289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18290 $as_echo_n "checking for $ac_word... " >&6; }
18291 if ${ac_cv_path_XGETTEXT+:} false; then :
18292   $as_echo_n "(cached) " >&6
18293 else
18294   case $XGETTEXT in
18295   [\\/]* | ?:[\\/]*)
18296   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18297   ;;
18298   *)
18299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18300 for as_dir in $PATH
18301 do
18302   IFS=$as_save_IFS
18303   test -z "$as_dir" && as_dir=.
18304     for ac_exec_ext in '' $ac_executable_extensions; do
18305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18306     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18308     break 2
18309   fi
18310 done
18311   done
18312 IFS=$as_save_IFS
18313
18314   ;;
18315 esac
18316 fi
18317 XGETTEXT=$ac_cv_path_XGETTEXT
18318 if test -n "$XGETTEXT"; then
18319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18320 $as_echo "$XGETTEXT" >&6; }
18321 else
18322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18323 $as_echo "no" >&6; }
18324 fi
18325
18326
18327   test -n "$XGETTEXT" && break
18328 done
18329
18330 else
18331   # Report the value of XGETTEXT in configure's output in all cases.
18332   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18333 $as_echo_n "checking for XGETTEXT... " >&6; }
18334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18335 $as_echo "$XGETTEXT" >&6; }
18336 fi
18337
18338
18339 fi
18340
18341 # Check for Tcl configuration script tclConfig.sh
18342 if test "$with_tcl" = yes; then
18343     if test -z "$TCLSH"; then
18344   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18345 do
18346   # Extract the first word of "$ac_prog", so it can be a program name with args.
18347 set dummy $ac_prog; ac_word=$2
18348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18349 $as_echo_n "checking for $ac_word... " >&6; }
18350 if ${ac_cv_path_TCLSH+:} false; then :
18351   $as_echo_n "(cached) " >&6
18352 else
18353   case $TCLSH in
18354   [\\/]* | ?:[\\/]*)
18355   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18356   ;;
18357   *)
18358   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18359 for as_dir in $PATH
18360 do
18361   IFS=$as_save_IFS
18362   test -z "$as_dir" && as_dir=.
18363     for ac_exec_ext in '' $ac_executable_extensions; do
18364   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18365     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18366     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18367     break 2
18368   fi
18369 done
18370   done
18371 IFS=$as_save_IFS
18372
18373   ;;
18374 esac
18375 fi
18376 TCLSH=$ac_cv_path_TCLSH
18377 if test -n "$TCLSH"; then
18378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18379 $as_echo "$TCLSH" >&6; }
18380 else
18381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18382 $as_echo "no" >&6; }
18383 fi
18384
18385
18386   test -n "$TCLSH" && break
18387 done
18388
18389 else
18390   # Report the value of TCLSH in configure's output in all cases.
18391   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18392 $as_echo_n "checking for TCLSH... " >&6; }
18393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18394 $as_echo "$TCLSH" >&6; }
18395 fi
18396
18397 if test x"$TCLSH" = x""; then
18398   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18399 fi
18400
18401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18402 $as_echo_n "checking for tclConfig.sh... " >&6; }
18403 # Let user override test
18404 if test -z "$TCL_CONFIG_SH"; then
18405     pgac_test_dirs="$with_tclconfig"
18406
18407     set X $pgac_test_dirs; shift
18408     if test $# -eq 0; then
18409         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18410         pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18411         # On newer macOS, $auto_path frequently doesn't include the place
18412         # where tclConfig.sh actually lives.  Append that to the end, so as not
18413         # to break cases where a non-default Tcl installation is being used.
18414         if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18415             pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18416         fi
18417         set X $pgac_test_dirs; shift
18418     fi
18419
18420     for pgac_dir do
18421         if test -r "$pgac_dir/tclConfig.sh"; then
18422             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18423             break
18424         fi
18425     done
18426 fi
18427
18428 if test -z "$TCL_CONFIG_SH"; then
18429     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18430 $as_echo "no" >&6; }
18431     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18432 else
18433     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18434 $as_echo "$TCL_CONFIG_SH" >&6; }
18435 fi
18436
18437
18438
18439     . "$TCL_CONFIG_SH"
18440 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18441 eval TCL_LIBS=\"$TCL_LIBS\"
18442 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18443 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18444
18445         if test "$TCL_SHARED_BUILD" != 1; then
18446       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18447 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18448     fi
18449     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18450     ac_save_CPPFLAGS=$CPPFLAGS
18451     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18452     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18453 if test "x$ac_cv_header_tcl_h" = xyes; then :
18454
18455 else
18456   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18457 fi
18458
18459
18460     CPPFLAGS=$ac_save_CPPFLAGS
18461 fi
18462
18463 # check for <perl.h>
18464 if test "$with_perl" = yes; then
18465   ac_save_CPPFLAGS=$CPPFLAGS
18466   CPPFLAGS="$CPPFLAGS $perl_includespec"
18467   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18468 "
18469 if test "x$ac_cv_header_perl_h" = xyes; then :
18470
18471 else
18472   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18473 fi
18474
18475
18476   # While we're at it, check that we can link to libperl.
18477   # On most platforms, if perl.h is there then libperl.so will be too, but at
18478   # this writing Debian packages them separately.  There is no known reason to
18479   # waste cycles on separate probes for the Tcl or Python libraries, though.
18480   pgac_save_LIBS=$LIBS
18481   LIBS="$perl_embed_ldflags"
18482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18483 $as_echo_n "checking for libperl... " >&6; }
18484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18485 /* end confdefs.h.  */
18486
18487 #include <EXTERN.h>
18488 #include <perl.h>
18489
18490 int
18491 main ()
18492 {
18493 perl_alloc();
18494   ;
18495   return 0;
18496 }
18497 _ACEOF
18498 if ac_fn_c_try_link "$LINENO"; then :
18499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18500 $as_echo "yes" >&6; }
18501 else
18502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18503 $as_echo "no" >&6; }
18504      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18505 fi
18506 rm -f core conftest.err conftest.$ac_objext \
18507     conftest$ac_exeext conftest.$ac_ext
18508   LIBS=$pgac_save_LIBS
18509   CPPFLAGS=$ac_save_CPPFLAGS
18510 fi
18511
18512 # check for <Python.h>
18513 if test "$with_python" = yes; then
18514   ac_save_CPPFLAGS=$CPPFLAGS
18515   CPPFLAGS="$python_includespec $CPPFLAGS"
18516   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18517 if test "x$ac_cv_header_Python_h" = xyes; then :
18518
18519 else
18520   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18521 fi
18522
18523
18524   CPPFLAGS=$ac_save_CPPFLAGS
18525 fi
18526
18527 #
18528 # Check for DocBook and tools
18529 #
18530 if test -z "$XMLLINT"; then
18531   for ac_prog in xmllint
18532 do
18533   # Extract the first word of "$ac_prog", so it can be a program name with args.
18534 set dummy $ac_prog; ac_word=$2
18535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18536 $as_echo_n "checking for $ac_word... " >&6; }
18537 if ${ac_cv_path_XMLLINT+:} false; then :
18538   $as_echo_n "(cached) " >&6
18539 else
18540   case $XMLLINT in
18541   [\\/]* | ?:[\\/]*)
18542   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18543   ;;
18544   *)
18545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18546 for as_dir in $PATH
18547 do
18548   IFS=$as_save_IFS
18549   test -z "$as_dir" && as_dir=.
18550     for ac_exec_ext in '' $ac_executable_extensions; do
18551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18552     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18554     break 2
18555   fi
18556 done
18557   done
18558 IFS=$as_save_IFS
18559
18560   ;;
18561 esac
18562 fi
18563 XMLLINT=$ac_cv_path_XMLLINT
18564 if test -n "$XMLLINT"; then
18565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18566 $as_echo "$XMLLINT" >&6; }
18567 else
18568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18569 $as_echo "no" >&6; }
18570 fi
18571
18572
18573   test -n "$XMLLINT" && break
18574 done
18575
18576 else
18577   # Report the value of XMLLINT in configure's output in all cases.
18578   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18579 $as_echo_n "checking for XMLLINT... " >&6; }
18580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18581 $as_echo "$XMLLINT" >&6; }
18582 fi
18583
18584
18585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18586 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18587 if ${pgac_cv_check_docbook+:} false; then :
18588   $as_echo_n "(cached) " >&6
18589 else
18590   cat >conftest.xml <<EOF
18591 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18592 <book>
18593  <title>test</title>
18594  <chapter>
18595   <title>random</title>
18596    <sect1>
18597     <title>testsect</title>
18598     <para>text</para>
18599   </sect1>
18600  </chapter>
18601 </book>
18602 EOF
18603
18604 pgac_cv_check_docbook=no
18605
18606 if test -n "$XMLLINT"; then
18607   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18608   if test $? -eq 0; then
18609     pgac_cv_check_docbook=yes
18610   fi
18611 fi
18612 rm -f conftest.xml
18613 fi
18614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18615 $as_echo "$pgac_cv_check_docbook" >&6; }
18616
18617 have_docbook=$pgac_cv_check_docbook
18618
18619
18620 if test -z "$DBTOEPUB"; then
18621   for ac_prog in dbtoepub
18622 do
18623   # Extract the first word of "$ac_prog", so it can be a program name with args.
18624 set dummy $ac_prog; ac_word=$2
18625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18626 $as_echo_n "checking for $ac_word... " >&6; }
18627 if ${ac_cv_path_DBTOEPUB+:} false; then :
18628   $as_echo_n "(cached) " >&6
18629 else
18630   case $DBTOEPUB in
18631   [\\/]* | ?:[\\/]*)
18632   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18633   ;;
18634   *)
18635   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18636 for as_dir in $PATH
18637 do
18638   IFS=$as_save_IFS
18639   test -z "$as_dir" && as_dir=.
18640     for ac_exec_ext in '' $ac_executable_extensions; do
18641   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18642     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18643     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18644     break 2
18645   fi
18646 done
18647   done
18648 IFS=$as_save_IFS
18649
18650   ;;
18651 esac
18652 fi
18653 DBTOEPUB=$ac_cv_path_DBTOEPUB
18654 if test -n "$DBTOEPUB"; then
18655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18656 $as_echo "$DBTOEPUB" >&6; }
18657 else
18658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18659 $as_echo "no" >&6; }
18660 fi
18661
18662
18663   test -n "$DBTOEPUB" && break
18664 done
18665
18666 else
18667   # Report the value of DBTOEPUB in configure's output in all cases.
18668   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18669 $as_echo_n "checking for DBTOEPUB... " >&6; }
18670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18671 $as_echo "$DBTOEPUB" >&6; }
18672 fi
18673
18674 if test -z "$XSLTPROC"; then
18675   for ac_prog in xsltproc
18676 do
18677   # Extract the first word of "$ac_prog", so it can be a program name with args.
18678 set dummy $ac_prog; ac_word=$2
18679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18680 $as_echo_n "checking for $ac_word... " >&6; }
18681 if ${ac_cv_path_XSLTPROC+:} false; then :
18682   $as_echo_n "(cached) " >&6
18683 else
18684   case $XSLTPROC in
18685   [\\/]* | ?:[\\/]*)
18686   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18687   ;;
18688   *)
18689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18690 for as_dir in $PATH
18691 do
18692   IFS=$as_save_IFS
18693   test -z "$as_dir" && as_dir=.
18694     for ac_exec_ext in '' $ac_executable_extensions; do
18695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18696     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18698     break 2
18699   fi
18700 done
18701   done
18702 IFS=$as_save_IFS
18703
18704   ;;
18705 esac
18706 fi
18707 XSLTPROC=$ac_cv_path_XSLTPROC
18708 if test -n "$XSLTPROC"; then
18709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18710 $as_echo "$XSLTPROC" >&6; }
18711 else
18712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18713 $as_echo "no" >&6; }
18714 fi
18715
18716
18717   test -n "$XSLTPROC" && break
18718 done
18719
18720 else
18721   # Report the value of XSLTPROC in configure's output in all cases.
18722   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18723 $as_echo_n "checking for XSLTPROC... " >&6; }
18724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18725 $as_echo "$XSLTPROC" >&6; }
18726 fi
18727
18728 if test -z "$FOP"; then
18729   for ac_prog in fop
18730 do
18731   # Extract the first word of "$ac_prog", so it can be a program name with args.
18732 set dummy $ac_prog; ac_word=$2
18733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18734 $as_echo_n "checking for $ac_word... " >&6; }
18735 if ${ac_cv_path_FOP+:} false; then :
18736   $as_echo_n "(cached) " >&6
18737 else
18738   case $FOP in
18739   [\\/]* | ?:[\\/]*)
18740   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18741   ;;
18742   *)
18743   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18744 for as_dir in $PATH
18745 do
18746   IFS=$as_save_IFS
18747   test -z "$as_dir" && as_dir=.
18748     for ac_exec_ext in '' $ac_executable_extensions; do
18749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18750     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18752     break 2
18753   fi
18754 done
18755   done
18756 IFS=$as_save_IFS
18757
18758   ;;
18759 esac
18760 fi
18761 FOP=$ac_cv_path_FOP
18762 if test -n "$FOP"; then
18763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18764 $as_echo "$FOP" >&6; }
18765 else
18766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18767 $as_echo "no" >&6; }
18768 fi
18769
18770
18771   test -n "$FOP" && break
18772 done
18773
18774 else
18775   # Report the value of FOP in configure's output in all cases.
18776   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18777 $as_echo_n "checking for FOP... " >&6; }
18778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18779 $as_echo "$FOP" >&6; }
18780 fi
18781
18782
18783 #
18784 # Check for test tools
18785 #
18786 if test "$enable_tap_tests" = yes; then
18787   # Check for necessary modules, unless user has specified the "prove" to use;
18788   # in that case it's her responsibility to have a working configuration.
18789   # (prove might be part of a different Perl installation than perl, eg on
18790   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18791   if test -z "$PROVE"; then
18792     # Test::More and Time::HiRes are supposed to be part of core Perl,
18793     # but some distros omit them in a minimal installation.
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804 # Make sure we have perl
18805 if test -z "$PERL"; then
18806 # Extract the first word of "perl", so it can be a program name with args.
18807 set dummy perl; ac_word=$2
18808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18809 $as_echo_n "checking for $ac_word... " >&6; }
18810 if ${ac_cv_prog_PERL+:} false; then :
18811   $as_echo_n "(cached) " >&6
18812 else
18813   if test -n "$PERL"; then
18814   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18815 else
18816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18817 for as_dir in $PATH
18818 do
18819   IFS=$as_save_IFS
18820   test -z "$as_dir" && as_dir=.
18821     for ac_exec_ext in '' $ac_executable_extensions; do
18822   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18823     ac_cv_prog_PERL="perl"
18824     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18825     break 2
18826   fi
18827 done
18828   done
18829 IFS=$as_save_IFS
18830
18831 fi
18832 fi
18833 PERL=$ac_cv_prog_PERL
18834 if test -n "$PERL"; then
18835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18836 $as_echo "$PERL" >&6; }
18837 else
18838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18839 $as_echo "no" >&6; }
18840 fi
18841
18842
18843 fi
18844
18845 if test "x$PERL" != x; then
18846   ax_perl_modules_failed=0
18847   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18848     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18849 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18850
18851     # Would be nice to log result here, but can't rely on autoconf internals
18852     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18853     if test $? -ne 0; then
18854       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18855 $as_echo "no" >&6; };
18856       ax_perl_modules_failed=1
18857    else
18858       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18859 $as_echo "ok" >&6; };
18860     fi
18861   done
18862
18863   # Run optional shell commands
18864   if test "$ax_perl_modules_failed" = 0; then
18865     :
18866
18867   else
18868     :
18869     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18870   fi
18871 else
18872   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18873 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18874 fi
18875   fi
18876   # Now make sure we know where prove is
18877   if test -z "$PROVE"; then
18878   for ac_prog in prove
18879 do
18880   # Extract the first word of "$ac_prog", so it can be a program name with args.
18881 set dummy $ac_prog; ac_word=$2
18882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18883 $as_echo_n "checking for $ac_word... " >&6; }
18884 if ${ac_cv_path_PROVE+:} false; then :
18885   $as_echo_n "(cached) " >&6
18886 else
18887   case $PROVE in
18888   [\\/]* | ?:[\\/]*)
18889   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18890   ;;
18891   *)
18892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18893 for as_dir in $PATH
18894 do
18895   IFS=$as_save_IFS
18896   test -z "$as_dir" && as_dir=.
18897     for ac_exec_ext in '' $ac_executable_extensions; do
18898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18899     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18901     break 2
18902   fi
18903 done
18904   done
18905 IFS=$as_save_IFS
18906
18907   ;;
18908 esac
18909 fi
18910 PROVE=$ac_cv_path_PROVE
18911 if test -n "$PROVE"; then
18912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18913 $as_echo "$PROVE" >&6; }
18914 else
18915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18916 $as_echo "no" >&6; }
18917 fi
18918
18919
18920   test -n "$PROVE" && break
18921 done
18922
18923 else
18924   # Report the value of PROVE in configure's output in all cases.
18925   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18926 $as_echo_n "checking for PROVE... " >&6; }
18927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18928 $as_echo "$PROVE" >&6; }
18929 fi
18930
18931   if test -z "$PROVE"; then
18932     as_fn_error $? "prove not found" "$LINENO" 5
18933   fi
18934 fi
18935
18936 # Thread testing
18937
18938 # We have to run the thread test near the end so we have all our symbols
18939 # defined.  Cross compiling throws a warning.
18940 #
18941 if test "$enable_thread_safety" = yes; then
18942 if test "$PORTNAME" != "win32"
18943 then
18944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18945 $as_echo_n "checking thread safety of required library functions... " >&6; }
18946
18947 _CFLAGS="$CFLAGS"
18948 _LIBS="$LIBS"
18949 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18950 LIBS="$LIBS $PTHREAD_LIBS"
18951 if test "$cross_compiling" = yes; then :
18952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18953 $as_echo "maybe" >&6; }
18954   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18955 *** Skipping thread test program because of cross-compile build.
18956 *** Run the program in src/test/thread on the target machine.
18957 " >&5
18958 $as_echo "$as_me: WARNING:
18959 *** Skipping thread test program because of cross-compile build.
18960 *** Run the program in src/test/thread on the target machine.
18961 " >&2;}
18962 else
18963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18964 /* end confdefs.h.  */
18965 #include "$srcdir/src/test/thread/thread_test.c"
18966 _ACEOF
18967 if ac_fn_c_try_run "$LINENO"; then :
18968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18969 $as_echo "yes" >&6; }
18970 else
18971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18972 $as_echo "no" >&6; }
18973   as_fn_error $? "thread test program failed
18974 This platform is not thread-safe.  Check the file 'config.log' or compile
18975 and run src/test/thread/thread_test for the exact reason.
18976 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18977 fi
18978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18979   conftest.$ac_objext conftest.beam conftest.$ac_ext
18980 fi
18981
18982 CFLAGS="$_CFLAGS"
18983 LIBS="$_LIBS"
18984 else
18985 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18986 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18987 fi
18988 fi
18989
18990 # If compiler will take -Wl,--as-needed (or various platform-specific
18991 # spellings thereof) then add that to LDFLAGS.  This is much easier than
18992 # trying to filter LIBS to the minimum for each executable.
18993 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18994 # libreadline; therefore we postpone testing it until we know what library
18995 # dependencies readline has.  The test code will try to link with $LIBS.
18996 if test "$with_readline" = yes; then
18997   link_test_func=readline
18998 else
18999   link_test_func=exit
19000 fi
19001
19002 if test "$PORTNAME" = "darwin"; then
19003   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19004 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19005 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19006   $as_echo_n "(cached) " >&6
19007 else
19008   pgac_save_LDFLAGS=$LDFLAGS
19009 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19010 if test "$cross_compiling" = yes; then :
19011   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19012 else
19013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19014 /* end confdefs.h.  */
19015 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19016 int
19017 main ()
19018 {
19019
19020   ;
19021   return 0;
19022 }
19023 _ACEOF
19024 if ac_fn_c_try_run "$LINENO"; then :
19025   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19026 else
19027   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19028 fi
19029 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19030   conftest.$ac_objext conftest.beam conftest.$ac_ext
19031 fi
19032
19033 LDFLAGS="$pgac_save_LDFLAGS"
19034 fi
19035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19036 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19037 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19038   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19039 fi
19040
19041 elif test "$PORTNAME" = "openbsd"; then
19042   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19043 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19044 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19045   $as_echo_n "(cached) " >&6
19046 else
19047   pgac_save_LDFLAGS=$LDFLAGS
19048 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19049 if test "$cross_compiling" = yes; then :
19050   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19051 else
19052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19053 /* end confdefs.h.  */
19054 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19055 int
19056 main ()
19057 {
19058
19059   ;
19060   return 0;
19061 }
19062 _ACEOF
19063 if ac_fn_c_try_run "$LINENO"; then :
19064   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19065 else
19066   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19067 fi
19068 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19069   conftest.$ac_objext conftest.beam conftest.$ac_ext
19070 fi
19071
19072 LDFLAGS="$pgac_save_LDFLAGS"
19073 fi
19074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19075 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19076 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19077   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19078 fi
19079
19080 else
19081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19082 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19083 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19084   $as_echo_n "(cached) " >&6
19085 else
19086   pgac_save_LDFLAGS=$LDFLAGS
19087 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19088 if test "$cross_compiling" = yes; then :
19089   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19090 else
19091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19092 /* end confdefs.h.  */
19093 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19094 int
19095 main ()
19096 {
19097
19098   ;
19099   return 0;
19100 }
19101 _ACEOF
19102 if ac_fn_c_try_run "$LINENO"; then :
19103   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19104 else
19105   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19106 fi
19107 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19108   conftest.$ac_objext conftest.beam conftest.$ac_ext
19109 fi
19110
19111 LDFLAGS="$pgac_save_LDFLAGS"
19112 fi
19113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19114 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19115 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19116   LDFLAGS="$LDFLAGS -Wl,--as-needed"
19117 fi
19118
19119 fi
19120
19121 # Create compiler version string
19122 if test x"$GCC" = x"yes" ; then
19123   cc_string=`${CC} --version | sed q`
19124   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19125 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19126   cc_string=`${CC} -V 2>&1 | sed q`
19127 else
19128   cc_string=$CC
19129 fi
19130
19131
19132 cat >>confdefs.h <<_ACEOF
19133 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19134 _ACEOF
19135
19136
19137 # Supply a numeric version string for use by 3rd party add-ons
19138 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19139 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
19140 tr '.' '        ' |
19141 $AWK '{printf "%d%04d", $1, $2}'`"
19142
19143 cat >>confdefs.h <<_ACEOF
19144 #define PG_VERSION_NUM $PG_VERSION_NUM
19145 _ACEOF
19146
19147
19148
19149 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19150 # literally, so that it's possible to override it at build time using
19151 # a command like "make ... PG_SYSROOT=path".  This has to be done after
19152 # we've finished all configure checks that depend on CPPFLAGS.
19153 if test x"$PG_SYSROOT" != x; then
19154   CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19155 fi
19156
19157
19158
19159 # Begin output steps
19160
19161 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19162 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19163 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19164 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19165 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19166 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19167 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19168 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19169 # Currently only used when LLVM is used
19170 if test "$with_llvm" = yes ; then
19171    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19172 $as_echo "$as_me: using CXX=$CXX" >&6;}
19173    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19174 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19175    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19176 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19177    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19178 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19179    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19180 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19181 fi
19182
19183 # prepare build tree if outside source tree
19184 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19185 # Note 2: /bin/pwd might be better than shell's built-in at getting
19186 #         a symlink-free name.
19187 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19188   vpath_build=no
19189 else
19190   vpath_build=yes
19191   if test "$no_create" != yes; then
19192     $as_echo_n "preparing build tree... " >&6
19193     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19194     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19195       || as_fn_error $? "failed" "$LINENO" 5
19196     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19197 $as_echo "done" >&6; }
19198   fi
19199 fi
19200
19201
19202
19203 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19204
19205
19206 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}"
19207
19208
19209 if test "$PORTNAME" = "win32"; then
19210 ac_config_commands="$ac_config_commands check_win32_symlinks"
19211
19212 fi
19213
19214 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19215
19216
19217 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19218
19219
19220 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19221
19222
19223 cat >confcache <<\_ACEOF
19224 # This file is a shell script that caches the results of configure
19225 # tests run on this system so they can be shared between configure
19226 # scripts and configure runs, see configure's option --config-cache.
19227 # It is not useful on other systems.  If it contains results you don't
19228 # want to keep, you may remove or edit it.
19229 #
19230 # config.status only pays attention to the cache file if you give it
19231 # the --recheck option to rerun configure.
19232 #
19233 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19234 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19235 # following values.
19236
19237 _ACEOF
19238
19239 # The following way of writing the cache mishandles newlines in values,
19240 # but we know of no workaround that is simple, portable, and efficient.
19241 # So, we kill variables containing newlines.
19242 # Ultrix sh set writes to stderr and can't be redirected directly,
19243 # and sets the high bit in the cache file unless we assign to the vars.
19244 (
19245   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19246     eval ac_val=\$$ac_var
19247     case $ac_val in #(
19248     *${as_nl}*)
19249       case $ac_var in #(
19250       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19251 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19252       esac
19253       case $ac_var in #(
19254       _ | IFS | as_nl) ;; #(
19255       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19256       *) { eval $ac_var=; unset $ac_var;} ;;
19257       esac ;;
19258     esac
19259   done
19260
19261   (set) 2>&1 |
19262     case $as_nl`(ac_space=' '; set) 2>&1` in #(
19263     *${as_nl}ac_space=\ *)
19264       # `set' does not quote correctly, so add quotes: double-quote
19265       # substitution turns \\\\ into \\, and sed turns \\ into \.
19266       sed -n \
19267         "s/'/'\\\\''/g;
19268           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19269       ;; #(
19270     *)
19271       # `set' quotes correctly as required by POSIX, so do not add quotes.
19272       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19273       ;;
19274     esac |
19275     sort
19276 ) |
19277   sed '
19278      /^ac_cv_env_/b end
19279      t clear
19280      :clear
19281      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19282      t end
19283      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19284      :end' >>confcache
19285 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19286   if test -w "$cache_file"; then
19287     if test "x$cache_file" != "x/dev/null"; then
19288       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19289 $as_echo "$as_me: updating cache $cache_file" >&6;}
19290       if test ! -f "$cache_file" || test -h "$cache_file"; then
19291         cat confcache >"$cache_file"
19292       else
19293         case $cache_file in #(
19294         */* | ?:*)
19295           mv -f confcache "$cache_file"$$ &&
19296           mv -f "$cache_file"$$ "$cache_file" ;; #(
19297         *)
19298           mv -f confcache "$cache_file" ;;
19299         esac
19300       fi
19301     fi
19302   else
19303     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19304 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19305   fi
19306 fi
19307 rm -f confcache
19308
19309 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19310 # Let make expand exec_prefix.
19311 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19312
19313 DEFS=-DHAVE_CONFIG_H
19314
19315 ac_libobjs=
19316 ac_ltlibobjs=
19317 U=
19318 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19319   # 1. Remove the extension, and $U if already installed.
19320   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19321   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19322   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19323   #    will be set to the directory where LIBOBJS objects are built.
19324   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19325   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19326 done
19327 LIBOBJS=$ac_libobjs
19328
19329 LTLIBOBJS=$ac_ltlibobjs
19330
19331
19332
19333
19334 : "${CONFIG_STATUS=./config.status}"
19335 ac_write_fail=0
19336 ac_clean_files_save=$ac_clean_files
19337 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19338 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19339 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19340 as_write_fail=0
19341 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19342 #! $SHELL
19343 # Generated by $as_me.
19344 # Run this file to recreate the current configuration.
19345 # Compiler output produced by configure, useful for debugging
19346 # configure, is in config.log if it exists.
19347
19348 debug=false
19349 ac_cs_recheck=false
19350 ac_cs_silent=false
19351
19352 SHELL=\${CONFIG_SHELL-$SHELL}
19353 export SHELL
19354 _ASEOF
19355 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19356 ## -------------------- ##
19357 ## M4sh Initialization. ##
19358 ## -------------------- ##
19359
19360 # Be more Bourne compatible
19361 DUALCASE=1; export DUALCASE # for MKS sh
19362 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19363   emulate sh
19364   NULLCMD=:
19365   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19366   # is contrary to our usage.  Disable this feature.
19367   alias -g '${1+"$@"}'='"$@"'
19368   setopt NO_GLOB_SUBST
19369 else
19370   case `(set -o) 2>/dev/null` in #(
19371   *posix*) :
19372     set -o posix ;; #(
19373   *) :
19374      ;;
19375 esac
19376 fi
19377
19378
19379 as_nl='
19380 '
19381 export as_nl
19382 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19383 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19384 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19385 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19386 # Prefer a ksh shell builtin over an external printf program on Solaris,
19387 # but without wasting forks for bash or zsh.
19388 if test -z "$BASH_VERSION$ZSH_VERSION" \
19389     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19390   as_echo='print -r --'
19391   as_echo_n='print -rn --'
19392 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19393   as_echo='printf %s\n'
19394   as_echo_n='printf %s'
19395 else
19396   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19397     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19398     as_echo_n='/usr/ucb/echo -n'
19399   else
19400     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19401     as_echo_n_body='eval
19402       arg=$1;
19403       case $arg in #(
19404       *"$as_nl"*)
19405         expr "X$arg" : "X\\(.*\\)$as_nl";
19406         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19407       esac;
19408       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19409     '
19410     export as_echo_n_body
19411     as_echo_n='sh -c $as_echo_n_body as_echo'
19412   fi
19413   export as_echo_body
19414   as_echo='sh -c $as_echo_body as_echo'
19415 fi
19416
19417 # The user is always right.
19418 if test "${PATH_SEPARATOR+set}" != set; then
19419   PATH_SEPARATOR=:
19420   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19421     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19422       PATH_SEPARATOR=';'
19423   }
19424 fi
19425
19426
19427 # IFS
19428 # We need space, tab and new line, in precisely that order.  Quoting is
19429 # there to prevent editors from complaining about space-tab.
19430 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19431 # splitting by setting IFS to empty value.)
19432 IFS=" ""        $as_nl"
19433
19434 # Find who we are.  Look in the path if we contain no directory separator.
19435 as_myself=
19436 case $0 in #((
19437   *[\\/]* ) as_myself=$0 ;;
19438   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19439 for as_dir in $PATH
19440 do
19441   IFS=$as_save_IFS
19442   test -z "$as_dir" && as_dir=.
19443     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19444   done
19445 IFS=$as_save_IFS
19446
19447      ;;
19448 esac
19449 # We did not find ourselves, most probably we were run as `sh COMMAND'
19450 # in which case we are not to be found in the path.
19451 if test "x$as_myself" = x; then
19452   as_myself=$0
19453 fi
19454 if test ! -f "$as_myself"; then
19455   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19456   exit 1
19457 fi
19458
19459 # Unset variables that we do not need and which cause bugs (e.g. in
19460 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19461 # suppresses any "Segmentation fault" message there.  '((' could
19462 # trigger a bug in pdksh 5.2.14.
19463 for as_var in BASH_ENV ENV MAIL MAILPATH
19464 do eval test x\${$as_var+set} = xset \
19465   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19466 done
19467 PS1='$ '
19468 PS2='> '
19469 PS4='+ '
19470
19471 # NLS nuisances.
19472 LC_ALL=C
19473 export LC_ALL
19474 LANGUAGE=C
19475 export LANGUAGE
19476
19477 # CDPATH.
19478 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19479
19480
19481 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19482 # ----------------------------------------
19483 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19484 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19485 # script with STATUS, using 1 if that was 0.
19486 as_fn_error ()
19487 {
19488   as_status=$1; test $as_status -eq 0 && as_status=1
19489   if test "$4"; then
19490     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19491     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19492   fi
19493   $as_echo "$as_me: error: $2" >&2
19494   as_fn_exit $as_status
19495 } # as_fn_error
19496
19497
19498 # as_fn_set_status STATUS
19499 # -----------------------
19500 # Set $? to STATUS, without forking.
19501 as_fn_set_status ()
19502 {
19503   return $1
19504 } # as_fn_set_status
19505
19506 # as_fn_exit STATUS
19507 # -----------------
19508 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19509 as_fn_exit ()
19510 {
19511   set +e
19512   as_fn_set_status $1
19513   exit $1
19514 } # as_fn_exit
19515
19516 # as_fn_unset VAR
19517 # ---------------
19518 # Portably unset VAR.
19519 as_fn_unset ()
19520 {
19521   { eval $1=; unset $1;}
19522 }
19523 as_unset=as_fn_unset
19524 # as_fn_append VAR VALUE
19525 # ----------------------
19526 # Append the text in VALUE to the end of the definition contained in VAR. Take
19527 # advantage of any shell optimizations that allow amortized linear growth over
19528 # repeated appends, instead of the typical quadratic growth present in naive
19529 # implementations.
19530 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19531   eval 'as_fn_append ()
19532   {
19533     eval $1+=\$2
19534   }'
19535 else
19536   as_fn_append ()
19537   {
19538     eval $1=\$$1\$2
19539   }
19540 fi # as_fn_append
19541
19542 # as_fn_arith ARG...
19543 # ------------------
19544 # Perform arithmetic evaluation on the ARGs, and store the result in the
19545 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19546 # must be portable across $(()) and expr.
19547 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19548   eval 'as_fn_arith ()
19549   {
19550     as_val=$(( $* ))
19551   }'
19552 else
19553   as_fn_arith ()
19554   {
19555     as_val=`expr "$@" || test $? -eq 1`
19556   }
19557 fi # as_fn_arith
19558
19559
19560 if expr a : '\(a\)' >/dev/null 2>&1 &&
19561    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19562   as_expr=expr
19563 else
19564   as_expr=false
19565 fi
19566
19567 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19568   as_basename=basename
19569 else
19570   as_basename=false
19571 fi
19572
19573 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19574   as_dirname=dirname
19575 else
19576   as_dirname=false
19577 fi
19578
19579 as_me=`$as_basename -- "$0" ||
19580 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19581          X"$0" : 'X\(//\)$' \| \
19582          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19583 $as_echo X/"$0" |
19584     sed '/^.*\/\([^/][^/]*\)\/*$/{
19585             s//\1/
19586             q
19587           }
19588           /^X\/\(\/\/\)$/{
19589             s//\1/
19590             q
19591           }
19592           /^X\/\(\/\).*/{
19593             s//\1/
19594             q
19595           }
19596           s/.*/./; q'`
19597
19598 # Avoid depending upon Character Ranges.
19599 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19600 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19601 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19602 as_cr_digits='0123456789'
19603 as_cr_alnum=$as_cr_Letters$as_cr_digits
19604
19605 ECHO_C= ECHO_N= ECHO_T=
19606 case `echo -n x` in #(((((
19607 -n*)
19608   case `echo 'xy\c'` in
19609   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19610   xy)  ECHO_C='\c';;
19611   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19612        ECHO_T=' ';;
19613   esac;;
19614 *)
19615   ECHO_N='-n';;
19616 esac
19617
19618 rm -f conf$$ conf$$.exe conf$$.file
19619 if test -d conf$$.dir; then
19620   rm -f conf$$.dir/conf$$.file
19621 else
19622   rm -f conf$$.dir
19623   mkdir conf$$.dir 2>/dev/null
19624 fi
19625 if (echo >conf$$.file) 2>/dev/null; then
19626   if ln -s conf$$.file conf$$ 2>/dev/null; then
19627     as_ln_s='ln -s'
19628     # ... but there are two gotchas:
19629     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19630     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19631     # In both cases, we have to default to `cp -pR'.
19632     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19633       as_ln_s='cp -pR'
19634   elif ln conf$$.file conf$$ 2>/dev/null; then
19635     as_ln_s=ln
19636   else
19637     as_ln_s='cp -pR'
19638   fi
19639 else
19640   as_ln_s='cp -pR'
19641 fi
19642 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19643 rmdir conf$$.dir 2>/dev/null
19644
19645
19646 # as_fn_mkdir_p
19647 # -------------
19648 # Create "$as_dir" as a directory, including parents if necessary.
19649 as_fn_mkdir_p ()
19650 {
19651
19652   case $as_dir in #(
19653   -*) as_dir=./$as_dir;;
19654   esac
19655   test -d "$as_dir" || eval $as_mkdir_p || {
19656     as_dirs=
19657     while :; do
19658       case $as_dir in #(
19659       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19660       *) as_qdir=$as_dir;;
19661       esac
19662       as_dirs="'$as_qdir' $as_dirs"
19663       as_dir=`$as_dirname -- "$as_dir" ||
19664 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19665          X"$as_dir" : 'X\(//\)[^/]' \| \
19666          X"$as_dir" : 'X\(//\)$' \| \
19667          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19668 $as_echo X"$as_dir" |
19669     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19670             s//\1/
19671             q
19672           }
19673           /^X\(\/\/\)[^/].*/{
19674             s//\1/
19675             q
19676           }
19677           /^X\(\/\/\)$/{
19678             s//\1/
19679             q
19680           }
19681           /^X\(\/\).*/{
19682             s//\1/
19683             q
19684           }
19685           s/.*/./; q'`
19686       test -d "$as_dir" && break
19687     done
19688     test -z "$as_dirs" || eval "mkdir $as_dirs"
19689   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19690
19691
19692 } # as_fn_mkdir_p
19693 if mkdir -p . 2>/dev/null; then
19694   as_mkdir_p='mkdir -p "$as_dir"'
19695 else
19696   test -d ./-p && rmdir ./-p
19697   as_mkdir_p=false
19698 fi
19699
19700
19701 # as_fn_executable_p FILE
19702 # -----------------------
19703 # Test if FILE is an executable regular file.
19704 as_fn_executable_p ()
19705 {
19706   test -f "$1" && test -x "$1"
19707 } # as_fn_executable_p
19708 as_test_x='test -x'
19709 as_executable_p=as_fn_executable_p
19710
19711 # Sed expression to map a string onto a valid CPP name.
19712 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19713
19714 # Sed expression to map a string onto a valid variable name.
19715 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19716
19717
19718 exec 6>&1
19719 ## ----------------------------------- ##
19720 ## Main body of $CONFIG_STATUS script. ##
19721 ## ----------------------------------- ##
19722 _ASEOF
19723 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19724
19725 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19726 # Save the log message, to keep $0 and so on meaningful, and to
19727 # report actual input values of CONFIG_FILES etc. instead of their
19728 # values after options handling.
19729 ac_log="
19730 This file was extended by PostgreSQL $as_me 12devel, which was
19731 generated by GNU Autoconf 2.69.  Invocation command line was
19732
19733   CONFIG_FILES    = $CONFIG_FILES
19734   CONFIG_HEADERS  = $CONFIG_HEADERS
19735   CONFIG_LINKS    = $CONFIG_LINKS
19736   CONFIG_COMMANDS = $CONFIG_COMMANDS
19737   $ $0 $@
19738
19739 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19740 "
19741
19742 _ACEOF
19743
19744 case $ac_config_files in *"
19745 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19746 esac
19747
19748 case $ac_config_headers in *"
19749 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19750 esac
19751
19752
19753 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19754 # Files that config.status was made for.
19755 config_files="$ac_config_files"
19756 config_headers="$ac_config_headers"
19757 config_links="$ac_config_links"
19758 config_commands="$ac_config_commands"
19759
19760 _ACEOF
19761
19762 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19763 ac_cs_usage="\
19764 \`$as_me' instantiates files and other configuration actions
19765 from templates according to the current configuration.  Unless the files
19766 and actions are specified as TAGs, all are instantiated by default.
19767
19768 Usage: $0 [OPTION]... [TAG]...
19769
19770   -h, --help       print this help, then exit
19771   -V, --version    print version number and configuration settings, then exit
19772       --config     print configuration, then exit
19773   -q, --quiet, --silent
19774                    do not print progress messages
19775   -d, --debug      don't remove temporary files
19776       --recheck    update $as_me by reconfiguring in the same conditions
19777       --file=FILE[:TEMPLATE]
19778                    instantiate the configuration file FILE
19779       --header=FILE[:TEMPLATE]
19780                    instantiate the configuration header FILE
19781
19782 Configuration files:
19783 $config_files
19784
19785 Configuration headers:
19786 $config_headers
19787
19788 Configuration links:
19789 $config_links
19790
19791 Configuration commands:
19792 $config_commands
19793
19794 Report bugs to <pgsql-bugs@lists.postgresql.org>."
19795
19796 _ACEOF
19797 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19798 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19799 ac_cs_version="\\
19800 PostgreSQL config.status 12devel
19801 configured by $0, generated by GNU Autoconf 2.69,
19802   with options \\"\$ac_cs_config\\"
19803
19804 Copyright (C) 2012 Free Software Foundation, Inc.
19805 This config.status script is free software; the Free Software Foundation
19806 gives unlimited permission to copy, distribute and modify it."
19807
19808 ac_pwd='$ac_pwd'
19809 srcdir='$srcdir'
19810 INSTALL='$INSTALL'
19811 MKDIR_P='$MKDIR_P'
19812 AWK='$AWK'
19813 test -n "\$AWK" || AWK=awk
19814 _ACEOF
19815
19816 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19817 # The default lists apply if the user does not specify any file.
19818 ac_need_defaults=:
19819 while test $# != 0
19820 do
19821   case $1 in
19822   --*=?*)
19823     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19824     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19825     ac_shift=:
19826     ;;
19827   --*=)
19828     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19829     ac_optarg=
19830     ac_shift=:
19831     ;;
19832   *)
19833     ac_option=$1
19834     ac_optarg=$2
19835     ac_shift=shift
19836     ;;
19837   esac
19838
19839   case $ac_option in
19840   # Handling of the options.
19841   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19842     ac_cs_recheck=: ;;
19843   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19844     $as_echo "$ac_cs_version"; exit ;;
19845   --config | --confi | --conf | --con | --co | --c )
19846     $as_echo "$ac_cs_config"; exit ;;
19847   --debug | --debu | --deb | --de | --d | -d )
19848     debug=: ;;
19849   --file | --fil | --fi | --f )
19850     $ac_shift
19851     case $ac_optarg in
19852     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19853     '') as_fn_error $? "missing file argument" ;;
19854     esac
19855     as_fn_append CONFIG_FILES " '$ac_optarg'"
19856     ac_need_defaults=false;;
19857   --header | --heade | --head | --hea )
19858     $ac_shift
19859     case $ac_optarg in
19860     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19861     esac
19862     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19863     ac_need_defaults=false;;
19864   --he | --h)
19865     # Conflict between --help and --header
19866     as_fn_error $? "ambiguous option: \`$1'
19867 Try \`$0 --help' for more information.";;
19868   --help | --hel | -h )
19869     $as_echo "$ac_cs_usage"; exit ;;
19870   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19871   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19872     ac_cs_silent=: ;;
19873
19874   # This is an error.
19875   -*) as_fn_error $? "unrecognized option: \`$1'
19876 Try \`$0 --help' for more information." ;;
19877
19878   *) as_fn_append ac_config_targets " $1"
19879      ac_need_defaults=false ;;
19880
19881   esac
19882   shift
19883 done
19884
19885 ac_configure_extra_args=
19886
19887 if $ac_cs_silent; then
19888   exec 6>/dev/null
19889   ac_configure_extra_args="$ac_configure_extra_args --silent"
19890 fi
19891
19892 _ACEOF
19893 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19894 if \$ac_cs_recheck; then
19895   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19896   shift
19897   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19898   CONFIG_SHELL='$SHELL'
19899   export CONFIG_SHELL
19900   exec "\$@"
19901 fi
19902
19903 _ACEOF
19904 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19905 exec 5>>config.log
19906 {
19907   echo
19908   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19909 ## Running $as_me. ##
19910 _ASBOX
19911   $as_echo "$ac_log"
19912 } >&5
19913
19914 _ACEOF
19915 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19916 _ACEOF
19917
19918 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19919
19920 # Handling of arguments.
19921 for ac_config_target in $ac_config_targets
19922 do
19923   case $ac_config_target in
19924     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19925     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19926     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19927     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19928     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19929     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19930     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19931     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19932     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19933     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19934     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19935
19936   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19937   esac
19938 done
19939
19940
19941 # If the user did not use the arguments to specify the items to instantiate,
19942 # then the envvar interface is used.  Set only those that are not.
19943 # We use the long form for the default assignment because of an extremely
19944 # bizarre bug on SunOS 4.1.3.
19945 if $ac_need_defaults; then
19946   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19947   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19948   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19949   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19950 fi
19951
19952 # Have a temporary directory for convenience.  Make it in the build tree
19953 # simply because there is no reason against having it here, and in addition,
19954 # creating and moving files from /tmp can sometimes cause problems.
19955 # Hook for its removal unless debugging.
19956 # Note that there is a small window in which the directory will not be cleaned:
19957 # after its creation but before its name has been assigned to `$tmp'.
19958 $debug ||
19959 {
19960   tmp= ac_tmp=
19961   trap 'exit_status=$?
19962   : "${ac_tmp:=$tmp}"
19963   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19964 ' 0
19965   trap 'as_fn_exit 1' 1 2 13 15
19966 }
19967 # Create a (secure) tmp directory for tmp files.
19968
19969 {
19970   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19971   test -d "$tmp"
19972 }  ||
19973 {
19974   tmp=./conf$$-$RANDOM
19975   (umask 077 && mkdir "$tmp")
19976 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19977 ac_tmp=$tmp
19978
19979 # Set up the scripts for CONFIG_FILES section.
19980 # No need to generate them if there are no CONFIG_FILES.
19981 # This happens for instance with `./config.status config.h'.
19982 if test -n "$CONFIG_FILES"; then
19983
19984
19985 ac_cr=`echo X | tr X '\015'`
19986 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19987 # But we know of no other shell where ac_cr would be empty at this
19988 # point, so we can use a bashism as a fallback.
19989 if test "x$ac_cr" = x; then
19990   eval ac_cr=\$\'\\r\'
19991 fi
19992 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19993 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19994   ac_cs_awk_cr='\\r'
19995 else
19996   ac_cs_awk_cr=$ac_cr
19997 fi
19998
19999 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20000 _ACEOF
20001
20002
20003 {
20004   echo "cat >conf$$subs.awk <<_ACEOF" &&
20005   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20006   echo "_ACEOF"
20007 } >conf$$subs.sh ||
20008   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20009 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20010 ac_delim='%!_!# '
20011 for ac_last_try in false false false false false :; do
20012   . ./conf$$subs.sh ||
20013     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20014
20015   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20016   if test $ac_delim_n = $ac_delim_num; then
20017     break
20018   elif $ac_last_try; then
20019     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20020   else
20021     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20022   fi
20023 done
20024 rm -f conf$$subs.sh
20025
20026 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20027 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20028 _ACEOF
20029 sed -n '
20030 h
20031 s/^/S["/; s/!.*/"]=/
20032 p
20033 g
20034 s/^[^!]*!//
20035 :repl
20036 t repl
20037 s/'"$ac_delim"'$//
20038 t delim
20039 :nl
20040 h
20041 s/\(.\{148\}\)..*/\1/
20042 t more1
20043 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20044 p
20045 n
20046 b repl
20047 :more1
20048 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20049 p
20050 g
20051 s/.\{148\}//
20052 t nl
20053 :delim
20054 h
20055 s/\(.\{148\}\)..*/\1/
20056 t more2
20057 s/["\\]/\\&/g; s/^/"/; s/$/"/
20058 p
20059 b
20060 :more2
20061 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20062 p
20063 g
20064 s/.\{148\}//
20065 t delim
20066 ' <conf$$subs.awk | sed '
20067 /^[^""]/{
20068   N
20069   s/\n//
20070 }
20071 ' >>$CONFIG_STATUS || ac_write_fail=1
20072 rm -f conf$$subs.awk
20073 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20074 _ACAWK
20075 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20076   for (key in S) S_is_set[key] = 1
20077   FS = "\a"
20078
20079 }
20080 {
20081   line = $ 0
20082   nfields = split(line, field, "@")
20083   substed = 0
20084   len = length(field[1])
20085   for (i = 2; i < nfields; i++) {
20086     key = field[i]
20087     keylen = length(key)
20088     if (S_is_set[key]) {
20089       value = S[key]
20090       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20091       len += length(value) + length(field[++i])
20092       substed = 1
20093     } else
20094       len += 1 + keylen
20095   }
20096
20097   print line
20098 }
20099
20100 _ACAWK
20101 _ACEOF
20102 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20103 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20104   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20105 else
20106   cat
20107 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20108   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20109 _ACEOF
20110
20111 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20112 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20113 # trailing colons and then remove the whole line if VPATH becomes empty
20114 # (actually we leave an empty line to preserve line numbers).
20115 if test "x$srcdir" = x.; then
20116   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
20117 h
20118 s///
20119 s/^/:/
20120 s/[      ]*$/:/
20121 s/:\$(srcdir):/:/g
20122 s/:\${srcdir}:/:/g
20123 s/:@srcdir@:/:/g
20124 s/^:*//
20125 s/:*$//
20126 x
20127 s/\(=[   ]*\).*/\1/
20128 G
20129 s/\n//
20130 s/^[^=]*=[       ]*$//
20131 }'
20132 fi
20133
20134 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20135 fi # test -n "$CONFIG_FILES"
20136
20137 # Set up the scripts for CONFIG_HEADERS section.
20138 # No need to generate them if there are no CONFIG_HEADERS.
20139 # This happens for instance with `./config.status Makefile'.
20140 if test -n "$CONFIG_HEADERS"; then
20141 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20142 BEGIN {
20143 _ACEOF
20144
20145 # Transform confdefs.h into an awk script `defines.awk', embedded as
20146 # here-document in config.status, that substitutes the proper values into
20147 # config.h.in to produce config.h.
20148
20149 # Create a delimiter string that does not exist in confdefs.h, to ease
20150 # handling of long lines.
20151 ac_delim='%!_!# '
20152 for ac_last_try in false false :; do
20153   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20154   if test -z "$ac_tt"; then
20155     break
20156   elif $ac_last_try; then
20157     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20158   else
20159     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20160   fi
20161 done
20162
20163 # For the awk script, D is an array of macro values keyed by name,
20164 # likewise P contains macro parameters if any.  Preserve backslash
20165 # newline sequences.
20166
20167 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20168 sed -n '
20169 s/.\{148\}/&'"$ac_delim"'/g
20170 t rset
20171 :rset
20172 s/^[     ]*#[    ]*define[       ][      ]*/ /
20173 t def
20174 d
20175 :def
20176 s/\\$//
20177 t bsnl
20178 s/["\\]/\\&/g
20179 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20180 D["\1"]=" \3"/p
20181 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
20182 d
20183 :bsnl
20184 s/["\\]/\\&/g
20185 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20186 D["\1"]=" \3\\\\\\n"\\/p
20187 t cont
20188 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20189 t cont
20190 d
20191 :cont
20192 n
20193 s/.\{148\}/&'"$ac_delim"'/g
20194 t clear
20195 :clear
20196 s/\\$//
20197 t bsnlc
20198 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20199 d
20200 :bsnlc
20201 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20202 b cont
20203 ' <confdefs.h | sed '
20204 s/'"$ac_delim"'/"\\\
20205 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20206
20207 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20208   for (key in D) D_is_set[key] = 1
20209   FS = "\a"
20210 }
20211 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20212   line = \$ 0
20213   split(line, arg, " ")
20214   if (arg[1] == "#") {
20215     defundef = arg[2]
20216     mac1 = arg[3]
20217   } else {
20218     defundef = substr(arg[1], 2)
20219     mac1 = arg[2]
20220   }
20221   split(mac1, mac2, "(") #)
20222   macro = mac2[1]
20223   prefix = substr(line, 1, index(line, defundef) - 1)
20224   if (D_is_set[macro]) {
20225     # Preserve the white space surrounding the "#".
20226     print prefix "define", macro P[macro] D[macro]
20227     next
20228   } else {
20229     # Replace #undef with comments.  This is necessary, for example,
20230     # in the case of _POSIX_SOURCE, which is predefined and required
20231     # on some systems where configure will not decide to define it.
20232     if (defundef == "undef") {
20233       print "/*", prefix defundef, macro, "*/"
20234       next
20235     }
20236   }
20237 }
20238 { print }
20239 _ACAWK
20240 _ACEOF
20241 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20242   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20243 fi # test -n "$CONFIG_HEADERS"
20244
20245
20246 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
20247 shift
20248 for ac_tag
20249 do
20250   case $ac_tag in
20251   :[FHLC]) ac_mode=$ac_tag; continue;;
20252   esac
20253   case $ac_mode$ac_tag in
20254   :[FHL]*:*);;
20255   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20256   :[FH]-) ac_tag=-:-;;
20257   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20258   esac
20259   ac_save_IFS=$IFS
20260   IFS=:
20261   set x $ac_tag
20262   IFS=$ac_save_IFS
20263   shift
20264   ac_file=$1
20265   shift
20266
20267   case $ac_mode in
20268   :L) ac_source=$1;;
20269   :[FH])
20270     ac_file_inputs=
20271     for ac_f
20272     do
20273       case $ac_f in
20274       -) ac_f="$ac_tmp/stdin";;
20275       *) # Look for the file first in the build tree, then in the source tree
20276          # (if the path is not absolute).  The absolute path cannot be DOS-style,
20277          # because $ac_f cannot contain `:'.
20278          test -f "$ac_f" ||
20279            case $ac_f in
20280            [\\/$]*) false;;
20281            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20282            esac ||
20283            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20284       esac
20285       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20286       as_fn_append ac_file_inputs " '$ac_f'"
20287     done
20288
20289     # Let's still pretend it is `configure' which instantiates (i.e., don't
20290     # use $as_me), people would be surprised to read:
20291     #    /* config.h.  Generated by config.status.  */
20292     configure_input='Generated from '`
20293           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20294         `' by configure.'
20295     if test x"$ac_file" != x-; then
20296       configure_input="$ac_file.  $configure_input"
20297       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20298 $as_echo "$as_me: creating $ac_file" >&6;}
20299     fi
20300     # Neutralize special characters interpreted by sed in replacement strings.
20301     case $configure_input in #(
20302     *\&* | *\|* | *\\* )
20303        ac_sed_conf_input=`$as_echo "$configure_input" |
20304        sed 's/[\\\\&|]/\\\\&/g'`;; #(
20305     *) ac_sed_conf_input=$configure_input;;
20306     esac
20307
20308     case $ac_tag in
20309     *:-:* | *:-) cat >"$ac_tmp/stdin" \
20310       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20311     esac
20312     ;;
20313   esac
20314
20315   ac_dir=`$as_dirname -- "$ac_file" ||
20316 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20317          X"$ac_file" : 'X\(//\)[^/]' \| \
20318          X"$ac_file" : 'X\(//\)$' \| \
20319          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20320 $as_echo X"$ac_file" |
20321     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20322             s//\1/
20323             q
20324           }
20325           /^X\(\/\/\)[^/].*/{
20326             s//\1/
20327             q
20328           }
20329           /^X\(\/\/\)$/{
20330             s//\1/
20331             q
20332           }
20333           /^X\(\/\).*/{
20334             s//\1/
20335             q
20336           }
20337           s/.*/./; q'`
20338   as_dir="$ac_dir"; as_fn_mkdir_p
20339   ac_builddir=.
20340
20341 case "$ac_dir" in
20342 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20343 *)
20344   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20345   # A ".." for each directory in $ac_dir_suffix.
20346   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20347   case $ac_top_builddir_sub in
20348   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20349   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20350   esac ;;
20351 esac
20352 ac_abs_top_builddir=$ac_pwd
20353 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20354 # for backward compatibility:
20355 ac_top_builddir=$ac_top_build_prefix
20356
20357 case $srcdir in
20358   .)  # We are building in place.
20359     ac_srcdir=.
20360     ac_top_srcdir=$ac_top_builddir_sub
20361     ac_abs_top_srcdir=$ac_pwd ;;
20362   [\\/]* | ?:[\\/]* )  # Absolute name.
20363     ac_srcdir=$srcdir$ac_dir_suffix;
20364     ac_top_srcdir=$srcdir
20365     ac_abs_top_srcdir=$srcdir ;;
20366   *) # Relative name.
20367     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20368     ac_top_srcdir=$ac_top_build_prefix$srcdir
20369     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20370 esac
20371 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20372
20373
20374   case $ac_mode in
20375   :F)
20376   #
20377   # CONFIG_FILE
20378   #
20379
20380   case $INSTALL in
20381   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20382   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20383   esac
20384   ac_MKDIR_P=$MKDIR_P
20385   case $MKDIR_P in
20386   [\\/$]* | ?:[\\/]* ) ;;
20387   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20388   esac
20389 _ACEOF
20390
20391 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20392 # If the template does not know about datarootdir, expand it.
20393 # FIXME: This hack should be removed a few years after 2.60.
20394 ac_datarootdir_hack=; ac_datarootdir_seen=
20395 ac_sed_dataroot='
20396 /datarootdir/ {
20397   p
20398   q
20399 }
20400 /@datadir@/p
20401 /@docdir@/p
20402 /@infodir@/p
20403 /@localedir@/p
20404 /@mandir@/p'
20405 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20406 *datarootdir*) ac_datarootdir_seen=yes;;
20407 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20408   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20409 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20410 _ACEOF
20411 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20412   ac_datarootdir_hack='
20413   s&@datadir@&$datadir&g
20414   s&@docdir@&$docdir&g
20415   s&@infodir@&$infodir&g
20416   s&@localedir@&$localedir&g
20417   s&@mandir@&$mandir&g
20418   s&\\\${datarootdir}&$datarootdir&g' ;;
20419 esac
20420 _ACEOF
20421
20422 # Neutralize VPATH when `$srcdir' = `.'.
20423 # Shell code in configure.ac might set extrasub.
20424 # FIXME: do we really want to maintain this feature?
20425 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20426 ac_sed_extra="$ac_vpsub
20427 $extrasub
20428 _ACEOF
20429 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20430 :t
20431 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20432 s|@configure_input@|$ac_sed_conf_input|;t t
20433 s&@top_builddir@&$ac_top_builddir_sub&;t t
20434 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20435 s&@srcdir@&$ac_srcdir&;t t
20436 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20437 s&@top_srcdir@&$ac_top_srcdir&;t t
20438 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20439 s&@builddir@&$ac_builddir&;t t
20440 s&@abs_builddir@&$ac_abs_builddir&;t t
20441 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20442 s&@INSTALL@&$ac_INSTALL&;t t
20443 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20444 $ac_datarootdir_hack
20445 "
20446 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20447   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20448
20449 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20450   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20451   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20452       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20453   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20454 which seems to be undefined.  Please make sure it is defined" >&5
20455 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20456 which seems to be undefined.  Please make sure it is defined" >&2;}
20457
20458   rm -f "$ac_tmp/stdin"
20459   case $ac_file in
20460   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20461   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20462   esac \
20463   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20464  ;;
20465   :H)
20466   #
20467   # CONFIG_HEADER
20468   #
20469   if test x"$ac_file" != x-; then
20470     {
20471       $as_echo "/* $configure_input  */" \
20472       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20473     } >"$ac_tmp/config.h" \
20474       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20475     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20476       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20477 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20478     else
20479       rm -f "$ac_file"
20480       mv "$ac_tmp/config.h" "$ac_file" \
20481         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20482     fi
20483   else
20484     $as_echo "/* $configure_input  */" \
20485       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20486       || as_fn_error $? "could not create -" "$LINENO" 5
20487   fi
20488  ;;
20489   :L)
20490   #
20491   # CONFIG_LINK
20492   #
20493
20494   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20495     :
20496   else
20497     # Prefer the file from the source tree if names are identical.
20498     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20499       ac_source=$srcdir/$ac_source
20500     fi
20501
20502     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20503 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20504
20505     if test ! -r "$ac_source"; then
20506       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20507     fi
20508     rm -f "$ac_file"
20509
20510     # Try a relative symlink, then a hard link, then a copy.
20511     case $ac_source in
20512     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20513         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20514     esac
20515     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20516       ln "$ac_source" "$ac_file" 2>/dev/null ||
20517       cp -p "$ac_source" "$ac_file" ||
20518       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20519   fi
20520  ;;
20521   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20522 $as_echo "$as_me: executing $ac_file commands" >&6;}
20523  ;;
20524   esac
20525
20526
20527   case $ac_file$ac_mode in
20528     "check_win32_symlinks":C)
20529 # Links sometimes fail undetected on Mingw -
20530 # so here we detect it and warn the user
20531 for FILE in $CONFIG_LINKS
20532  do
20533         # test -e works for symlinks in the MinGW console
20534         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20535 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20536  done
20537  ;;
20538     "src/include/pg_config.h":H)
20539 # Update timestamp for pg_config.h (see Makefile.global)
20540 echo >src/include/stamp-h
20541  ;;
20542     "src/include/pg_config_ext.h":H)
20543 # Update timestamp for pg_config_ext.h (see Makefile.global)
20544 echo >src/include/stamp-ext-h
20545  ;;
20546     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20547
20548   esac
20549 done # for ac_tag
20550
20551
20552 as_fn_exit 0
20553 _ACEOF
20554 ac_clean_files=$ac_clean_files_save
20555
20556 test $ac_write_fail = 0 ||
20557   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20558
20559
20560 # configure is writing to config.log, and then calls config.status.
20561 # config.status does its own redirection, appending to config.log.
20562 # Unfortunately, on DOS this fails, as config.log is still kept open
20563 # by configure, so config.status won't be able to write to it; its
20564 # output is simply discarded.  So we exec the FD to /dev/null,
20565 # effectively closing config.log, so it can be properly (re)opened and
20566 # appended to by config.status.  When coming back to configure, we
20567 # need to make the FD available again.
20568 if test "$no_create" != yes; then
20569   ac_cs_success=:
20570   ac_config_status_args=
20571   test "$silent" = yes &&
20572     ac_config_status_args="$ac_config_status_args --quiet"
20573   exec 5>/dev/null
20574   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20575   exec 5>>config.log
20576   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20577   # would make configure fail if this is the last instruction.
20578   $ac_cs_success || as_fn_exit 1
20579 fi
20580 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20581   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20582 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20583 fi
20584