]> granicus.if.org Git - postgresql/blob - configure
pg_upgrade: Allow use of file cloning
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 12devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 #
14 # Copyright (c) 1996-2018, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else
29   case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='print -r --'
50   as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in #(
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order.  Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" ""        $as_nl"
92
93 # Find who we are.  Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96   *[\\/]* ) as_myself=$0 ;;
97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100   IFS=$as_save_IFS
101   test -z "$as_dir" && as_dir=.
102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103   done
104 IFS=$as_save_IFS
105
106      ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111   as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115   exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there.  '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 # Use a proper internal environment variable to ensure we don't fall
140   # into an infinite loop, continuously re-executing ourselves.
141   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142     _as_can_reexec=no; export _as_can_reexec;
143     # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151   *v*x* | *x*v* ) as_opts=-vx ;;
152   *v* ) as_opts=-v ;;
153   *x* ) as_opts=-x ;;
154   * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
161   fi
162   # We don't want this to propagate to other subprocesses.
163           { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166   emulate sh
167   NULLCMD=:
168   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169   # is contrary to our usage.  Disable this feature.
170   alias -g '\${1+\"\$@\"}'='\"\$@\"'
171   setopt NO_GLOB_SUBST
172 else
173   case \`(set -o) 2>/dev/null\` in #(
174   *posix*) :
175     set -o posix ;; #(
176   *) :
177      ;;
178 esac
179 fi
180 "
181   as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
186
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194 else
195   exitcode=1; echo positional parameters were not saved.
196 fi
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204   if (eval "$as_required") 2>/dev/null; then :
205   as_have_required=yes
206 else
207   as_have_required=no
208 fi
209   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211 else
212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 do
216   IFS=$as_save_IFS
217   test -z "$as_dir" && as_dir=.
218   as_found=:
219   case $as_dir in #(
220          /*)
221            for as_base in sh bash ksh sh5; do
222              # Try only shells that exist, to save several forks.
223              as_shell=$as_dir/$as_base
224              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   CONFIG_SHELL=$as_shell as_have_required=yes
227                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228   break 2
229 fi
230 fi
231            done;;
232        esac
233   as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237   CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
240
241
242       if test "x$CONFIG_SHELL" != x; then :
243   export CONFIG_SHELL
244              # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252   *v*x* | *x*v* ) as_opts=-vx ;;
253   *v* ) as_opts=-v ;;
254   *x* ) as_opts=-x ;;
255   * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
262 fi
263
264     if test x$as_have_required = xno; then :
265   $as_echo "$0: This script requires a shell more modern than all"
266   $as_echo "$0: the shells that I found on your system."
267   if test x${ZSH_VERSION+set} = xset ; then
268     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270   else
271     $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@postgresql.org about your system, including
273 $0: any error possibly output before this message. Then
274 $0: install a modern shell, or manually run the script
275 $0: under such a shell if you do have one."
276   fi
277   exit 1
278 fi
279 fi
280 fi
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
286
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
294 {
295   { eval $1=; unset $1;}
296 }
297 as_unset=as_fn_unset
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304   return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312   set +e
313   as_fn_set_status $1
314   exit $1
315 } # as_fn_exit
316
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
321 {
322
323   case $as_dir in #(
324   -*) as_dir=./$as_dir;;
325   esac
326   test -d "$as_dir" || eval $as_mkdir_p || {
327     as_dirs=
328     while :; do
329       case $as_dir in #(
330       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331       *) as_qdir=$as_dir;;
332       esac
333       as_dirs="'$as_qdir' $as_dirs"
334       as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336          X"$as_dir" : 'X\(//\)[^/]' \| \
337          X"$as_dir" : 'X\(//\)$' \| \
338          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341             s//\1/
342             q
343           }
344           /^X\(\/\/\)[^/].*/{
345             s//\1/
346             q
347           }
348           /^X\(\/\/\)$/{
349             s//\1/
350             q
351           }
352           /^X\(\/\).*/{
353             s//\1/
354             q
355           }
356           s/.*/./; q'`
357       test -d "$as_dir" && break
358     done
359     test -z "$as_dirs" || eval "mkdir $as_dirs"
360   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363 } # as_fn_mkdir_p
364
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
369 {
370   test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379   eval 'as_fn_append ()
380   {
381     eval $1+=\$2
382   }'
383 else
384   as_fn_append ()
385   {
386     eval $1=\$$1\$2
387   }
388 fi # as_fn_append
389
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396   eval 'as_fn_arith ()
397   {
398     as_val=$(( $* ))
399   }'
400 else
401   as_fn_arith ()
402   {
403     as_val=`expr "$@" || test $? -eq 1`
404   }
405 fi # as_fn_arith
406
407
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
414 {
415   as_status=$1; test $as_status -eq 0 && as_status=1
416   if test "$4"; then
417     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419   fi
420   $as_echo "$as_me: error: $2" >&2
421   as_fn_exit $as_status
422 } # as_fn_error
423
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425    test "X`expr 00001 : '.*\(...\)'`" = X001; then
426   as_expr=expr
427 else
428   as_expr=false
429 fi
430
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432   as_basename=basename
433 else
434   as_basename=false
435 fi
436
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438   as_dirname=dirname
439 else
440   as_dirname=false
441 fi
442
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445          X"$0" : 'X\(//\)$' \| \
446          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448     sed '/^.*\/\([^/][^/]*\)\/*$/{
449             s//\1/
450             q
451           }
452           /^X\/\(\/\/\)$/{
453             s//\1/
454             q
455           }
456           /^X\/\(\/\).*/{
457             s//\1/
458             q
459           }
460           s/.*/./; q'`
461
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
468
469
470   as_lineno_1=$LINENO as_lineno_1a=$LINENO
471   as_lineno_2=$LINENO as_lineno_2a=$LINENO
472   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
475   sed -n '
476     p
477     /[$]LINENO/=
478   ' <$as_myself |
479     sed '
480       s/[$]LINENO.*/&-/
481       t lineno
482       b
483       :lineno
484       N
485       :loop
486       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487       t loop
488       s/-\n.*//
489     ' >$as_me.lineno &&
490   chmod +x "$as_me.lineno" ||
491     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
492
493   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494   # already done that, so ensure we don't try to do so again and fall
495   # in an infinite loop.  This has already happened in practice.
496   _as_can_reexec=no; export _as_can_reexec
497   # Don't try to exec as it changes $[0], causing all sort of problems
498   # (the dirname of $[0] is not the place where we might find the
499   # original and so on.  Autoconf is especially sensitive to this).
500   . "./$as_me.lineno"
501   # Exit status is that of the last command.
502   exit
503 }
504
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508   case `echo 'xy\c'` in
509   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
510   xy)  ECHO_C='\c';;
511   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
512        ECHO_T=' ';;
513   esac;;
514 *)
515   ECHO_N='-n';;
516 esac
517
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520   rm -f conf$$.dir/conf$$.file
521 else
522   rm -f conf$$.dir
523   mkdir conf$$.dir 2>/dev/null
524 fi
525 if (echo >conf$$.file) 2>/dev/null; then
526   if ln -s conf$$.file conf$$ 2>/dev/null; then
527     as_ln_s='ln -s'
528     # ... but there are two gotchas:
529     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531     # In both cases, we have to default to `cp -pR'.
532     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533       as_ln_s='cp -pR'
534   elif ln conf$$.file conf$$ 2>/dev/null; then
535     as_ln_s=ln
536   else
537     as_ln_s='cp -pR'
538   fi
539 else
540   as_ln_s='cp -pR'
541 fi
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
544
545 if mkdir -p . 2>/dev/null; then
546   as_mkdir_p='mkdir -p "$as_dir"'
547 else
548   test -d ./-p && rmdir ./-p
549   as_mkdir_p=false
550 fi
551
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
554
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
564
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
569
570 #
571 # Initializations.
572 #
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
581
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='12devel'
586 PACKAGE_STRING='PostgreSQL 12devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
588 PACKAGE_URL=''
589
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 #  include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 #  include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
627
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 PROVE
633 FOP
634 XSLTPROC
635 DBTOEPUB
636 have_docbook
637 XMLLINT
638 TCL_SHLIB_LD_LIBS
639 TCL_SHARED_BUILD
640 TCL_LIB_SPEC
641 TCL_LIBS
642 TCL_INCLUDE_SPEC
643 TCL_CONFIG_SH
644 TCLSH
645 XGETTEXT
646 MSGMERGE
647 MSGFMT_FLAGS
648 MSGFMT
649 PG_CRC32C_OBJS
650 CFLAGS_ARMV8_CRC32C
651 CFLAGS_SSE42
652 have_win32_dbghelp
653 LIBOBJS
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 PTHREAD_CFLAGS
658 PTHREAD_LIBS
659 PTHREAD_CC
660 ax_pthread_config
661 ZIC
662 python_additional_libs
663 python_libspec
664 python_libdir
665 python_includespec
666 python_version
667 python_majorversion
668 PYTHON
669 perl_embed_ldflags
670 perl_embed_ccflags
671 perl_includespec
672 perl_useshrplib
673 perl_privlibexp
674 perl_archlibexp
675 PERL
676 FLEXFLAGS
677 FLEX
678 BISONFLAGS
679 BISON
680 MKDIR_P
681 LN_S
682 TAR
683 install_bin
684 INSTALL_DATA
685 INSTALL_SCRIPT
686 INSTALL_PROGRAM
687 WINDRES
688 DLLWRAP
689 DLLTOOL
690 AR
691 STRIP_SHARED_LIB
692 STRIP_STATIC_LIB
693 STRIP
694 RANLIB
695 with_gnu_ld
696 LD
697 LDFLAGS_SL
698 LDFLAGS_EX
699 ELF_SYS
700 EGREP
701 GREP
702 with_zlib
703 with_system_tzdata
704 with_libxslt
705 with_libxml
706 XML2_CONFIG
707 UUID_EXTRA_OBJS
708 with_uuid
709 with_systemd
710 with_selinux
711 with_openssl
712 with_ldap
713 with_krb_srvnam
714 krb_srvtab
715 with_gssapi
716 with_python
717 with_perl
718 with_tcl
719 ICU_LIBS
720 ICU_CFLAGS
721 PKG_CONFIG_LIBDIR
722 PKG_CONFIG_PATH
723 PKG_CONFIG
724 with_icu
725 enable_thread_safety
726 INCLUDES
727 autodepend
728 TAS
729 GCC
730 CPP
731 BITCODE_CXXFLAGS
732 BITCODE_CFLAGS
733 CFLAGS_VECTOR
734 LLVM_BINPATH
735 LLVM_CXXFLAGS
736 LLVM_CFLAGS
737 LLVM_CPPFLAGS
738 LLVM_LIBS
739 CLANG
740 LLVM_CONFIG
741 AWK
742 with_llvm
743 SUN_STUDIO_CC
744 ac_ct_CXX
745 CXXFLAGS
746 CXX
747 OBJEXT
748 EXEEXT
749 ac_ct_CC
750 CPPFLAGS
751 LDFLAGS
752 CFLAGS
753 CC
754 enable_tap_tests
755 enable_dtrace
756 DTRACEFLAGS
757 DTRACE
758 enable_coverage
759 GENHTML
760 LCOV
761 GCOV
762 enable_debug
763 enable_strong_random
764 enable_rpath
765 default_port
766 WANTED_LANGUAGES
767 enable_nls
768 PORTNAME
769 host_os
770 host_vendor
771 host_cpu
772 host
773 build_os
774 build_vendor
775 build_cpu
776 build
777 PG_MAJORVERSION
778 configure_args
779 target_alias
780 host_alias
781 build_alias
782 LIBS
783 ECHO_T
784 ECHO_N
785 ECHO_C
786 DEFS
787 mandir
788 localedir
789 libdir
790 psdir
791 pdfdir
792 dvidir
793 htmldir
794 infodir
795 docdir
796 oldincludedir
797 includedir
798 localstatedir
799 sharedstatedir
800 sysconfdir
801 datadir
802 datarootdir
803 libexecdir
804 sbindir
805 bindir
806 program_transform_name
807 prefix
808 exec_prefix
809 PACKAGE_URL
810 PACKAGE_BUGREPORT
811 PACKAGE_STRING
812 PACKAGE_VERSION
813 PACKAGE_TARNAME
814 PACKAGE_NAME
815 PATH_SEPARATOR
816 SHELL'
817 ac_subst_files=''
818 ac_user_opts='
819 enable_option_checking
820 with_extra_version
821 with_template
822 with_includes
823 with_libraries
824 with_libs
825 enable_integer_datetimes
826 enable_nls
827 with_pgport
828 enable_rpath
829 enable_spinlocks
830 enable_atomics
831 enable_strong_random
832 enable_debug
833 enable_profiling
834 enable_coverage
835 enable_dtrace
836 enable_tap_tests
837 with_blocksize
838 with_segsize
839 with_wal_blocksize
840 with_CC
841 with_llvm
842 enable_depend
843 enable_cassert
844 enable_thread_safety
845 with_icu
846 with_tcl
847 with_tclconfig
848 with_perl
849 with_python
850 with_gssapi
851 with_krb_srvnam
852 with_pam
853 with_bsd_auth
854 with_ldap
855 with_bonjour
856 with_openssl
857 with_selinux
858 with_systemd
859 with_readline
860 with_libedit_preferred
861 with_uuid
862 with_ossp_uuid
863 with_libxml
864 with_libxslt
865 with_system_tzdata
866 with_zlib
867 with_gnu_ld
868 enable_largefile
869 enable_float4_byval
870 enable_float8_byval
871 '
872       ac_precious_vars='build_alias
873 host_alias
874 target_alias
875 CC
876 CFLAGS
877 LDFLAGS
878 LIBS
879 CPPFLAGS
880 CXX
881 CXXFLAGS
882 CCC
883 LLVM_CONFIG
884 CLANG
885 CPP
886 PKG_CONFIG
887 PKG_CONFIG_PATH
888 PKG_CONFIG_LIBDIR
889 ICU_CFLAGS
890 ICU_LIBS
891 LDFLAGS_EX
892 LDFLAGS_SL'
893
894
895 # Initialize some variables set by options.
896 ac_init_help=
897 ac_init_version=false
898 ac_unrecognized_opts=
899 ac_unrecognized_sep=
900 # The variables have the same names as the options, with
901 # dashes changed to underlines.
902 cache_file=/dev/null
903 exec_prefix=NONE
904 no_create=
905 no_recursion=
906 prefix=NONE
907 program_prefix=NONE
908 program_suffix=NONE
909 program_transform_name=s,x,x,
910 silent=
911 site=
912 srcdir=
913 verbose=
914 x_includes=NONE
915 x_libraries=NONE
916
917 # Installation directory options.
918 # These are left unexpanded so users can "make install exec_prefix=/foo"
919 # and all the variables that are supposed to be based on exec_prefix
920 # by default will actually change.
921 # Use braces instead of parens because sh, perl, etc. also accept them.
922 # (The list follows the same order as the GNU Coding Standards.)
923 bindir='${exec_prefix}/bin'
924 sbindir='${exec_prefix}/sbin'
925 libexecdir='${exec_prefix}/libexec'
926 datarootdir='${prefix}/share'
927 datadir='${datarootdir}'
928 sysconfdir='${prefix}/etc'
929 sharedstatedir='${prefix}/com'
930 localstatedir='${prefix}/var'
931 includedir='${prefix}/include'
932 oldincludedir='/usr/include'
933 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
934 infodir='${datarootdir}/info'
935 htmldir='${docdir}'
936 dvidir='${docdir}'
937 pdfdir='${docdir}'
938 psdir='${docdir}'
939 libdir='${exec_prefix}/lib'
940 localedir='${datarootdir}/locale'
941 mandir='${datarootdir}/man'
942
943 ac_prev=
944 ac_dashdash=
945 for ac_option
946 do
947   # If the previous option needs an argument, assign it.
948   if test -n "$ac_prev"; then
949     eval $ac_prev=\$ac_option
950     ac_prev=
951     continue
952   fi
953
954   case $ac_option in
955   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
956   *=)   ac_optarg= ;;
957   *)    ac_optarg=yes ;;
958   esac
959
960   # Accept the important Cygnus configure options, so we can diagnose typos.
961
962   case $ac_dashdash$ac_option in
963   --)
964     ac_dashdash=yes ;;
965
966   -bindir | --bindir | --bindi | --bind | --bin | --bi)
967     ac_prev=bindir ;;
968   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
969     bindir=$ac_optarg ;;
970
971   -build | --build | --buil | --bui | --bu)
972     ac_prev=build_alias ;;
973   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
974     build_alias=$ac_optarg ;;
975
976   -cache-file | --cache-file | --cache-fil | --cache-fi \
977   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
978     ac_prev=cache_file ;;
979   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
980   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
981     cache_file=$ac_optarg ;;
982
983   --config-cache | -C)
984     cache_file=config.cache ;;
985
986   -datadir | --datadir | --datadi | --datad)
987     ac_prev=datadir ;;
988   -datadir=* | --datadir=* | --datadi=* | --datad=*)
989     datadir=$ac_optarg ;;
990
991   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
992   | --dataroo | --dataro | --datar)
993     ac_prev=datarootdir ;;
994   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
995   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
996     datarootdir=$ac_optarg ;;
997
998   -disable-* | --disable-*)
999     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1000     # Reject names that are not valid shell variable names.
1001     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1002       as_fn_error $? "invalid feature name: $ac_useropt"
1003     ac_useropt_orig=$ac_useropt
1004     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1005     case $ac_user_opts in
1006       *"
1007 "enable_$ac_useropt"
1008 "*) ;;
1009       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1010          ac_unrecognized_sep=', ';;
1011     esac
1012     eval enable_$ac_useropt=no ;;
1013
1014   -docdir | --docdir | --docdi | --doc | --do)
1015     ac_prev=docdir ;;
1016   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1017     docdir=$ac_optarg ;;
1018
1019   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1020     ac_prev=dvidir ;;
1021   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1022     dvidir=$ac_optarg ;;
1023
1024   -enable-* | --enable-*)
1025     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1026     # Reject names that are not valid shell variable names.
1027     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1028       as_fn_error $? "invalid feature name: $ac_useropt"
1029     ac_useropt_orig=$ac_useropt
1030     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1031     case $ac_user_opts in
1032       *"
1033 "enable_$ac_useropt"
1034 "*) ;;
1035       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1036          ac_unrecognized_sep=', ';;
1037     esac
1038     eval enable_$ac_useropt=\$ac_optarg ;;
1039
1040   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1041   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1042   | --exec | --exe | --ex)
1043     ac_prev=exec_prefix ;;
1044   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1045   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1046   | --exec=* | --exe=* | --ex=*)
1047     exec_prefix=$ac_optarg ;;
1048
1049   -gas | --gas | --ga | --g)
1050     # Obsolete; use --with-gas.
1051     with_gas=yes ;;
1052
1053   -help | --help | --hel | --he | -h)
1054     ac_init_help=long ;;
1055   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1056     ac_init_help=recursive ;;
1057   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1058     ac_init_help=short ;;
1059
1060   -host | --host | --hos | --ho)
1061     ac_prev=host_alias ;;
1062   -host=* | --host=* | --hos=* | --ho=*)
1063     host_alias=$ac_optarg ;;
1064
1065   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1066     ac_prev=htmldir ;;
1067   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1068   | --ht=*)
1069     htmldir=$ac_optarg ;;
1070
1071   -includedir | --includedir | --includedi | --included | --include \
1072   | --includ | --inclu | --incl | --inc)
1073     ac_prev=includedir ;;
1074   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1075   | --includ=* | --inclu=* | --incl=* | --inc=*)
1076     includedir=$ac_optarg ;;
1077
1078   -infodir | --infodir | --infodi | --infod | --info | --inf)
1079     ac_prev=infodir ;;
1080   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1081     infodir=$ac_optarg ;;
1082
1083   -libdir | --libdir | --libdi | --libd)
1084     ac_prev=libdir ;;
1085   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1086     libdir=$ac_optarg ;;
1087
1088   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1089   | --libexe | --libex | --libe)
1090     ac_prev=libexecdir ;;
1091   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1092   | --libexe=* | --libex=* | --libe=*)
1093     libexecdir=$ac_optarg ;;
1094
1095   -localedir | --localedir | --localedi | --localed | --locale)
1096     ac_prev=localedir ;;
1097   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1098     localedir=$ac_optarg ;;
1099
1100   -localstatedir | --localstatedir | --localstatedi | --localstated \
1101   | --localstate | --localstat | --localsta | --localst | --locals)
1102     ac_prev=localstatedir ;;
1103   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1104   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1105     localstatedir=$ac_optarg ;;
1106
1107   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1108     ac_prev=mandir ;;
1109   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1110     mandir=$ac_optarg ;;
1111
1112   -nfp | --nfp | --nf)
1113     # Obsolete; use --without-fp.
1114     with_fp=no ;;
1115
1116   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1117   | --no-cr | --no-c | -n)
1118     no_create=yes ;;
1119
1120   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1121   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1122     no_recursion=yes ;;
1123
1124   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1125   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1126   | --oldin | --oldi | --old | --ol | --o)
1127     ac_prev=oldincludedir ;;
1128   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1129   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1130   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1131     oldincludedir=$ac_optarg ;;
1132
1133   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1134     ac_prev=prefix ;;
1135   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1136     prefix=$ac_optarg ;;
1137
1138   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1139   | --program-pre | --program-pr | --program-p)
1140     ac_prev=program_prefix ;;
1141   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1142   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1143     program_prefix=$ac_optarg ;;
1144
1145   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1146   | --program-suf | --program-su | --program-s)
1147     ac_prev=program_suffix ;;
1148   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1149   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1150     program_suffix=$ac_optarg ;;
1151
1152   -program-transform-name | --program-transform-name \
1153   | --program-transform-nam | --program-transform-na \
1154   | --program-transform-n | --program-transform- \
1155   | --program-transform | --program-transfor \
1156   | --program-transfo | --program-transf \
1157   | --program-trans | --program-tran \
1158   | --progr-tra | --program-tr | --program-t)
1159     ac_prev=program_transform_name ;;
1160   -program-transform-name=* | --program-transform-name=* \
1161   | --program-transform-nam=* | --program-transform-na=* \
1162   | --program-transform-n=* | --program-transform-=* \
1163   | --program-transform=* | --program-transfor=* \
1164   | --program-transfo=* | --program-transf=* \
1165   | --program-trans=* | --program-tran=* \
1166   | --progr-tra=* | --program-tr=* | --program-t=*)
1167     program_transform_name=$ac_optarg ;;
1168
1169   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1170     ac_prev=pdfdir ;;
1171   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1172     pdfdir=$ac_optarg ;;
1173
1174   -psdir | --psdir | --psdi | --psd | --ps)
1175     ac_prev=psdir ;;
1176   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1177     psdir=$ac_optarg ;;
1178
1179   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1180   | -silent | --silent | --silen | --sile | --sil)
1181     silent=yes ;;
1182
1183   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1184     ac_prev=sbindir ;;
1185   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1186   | --sbi=* | --sb=*)
1187     sbindir=$ac_optarg ;;
1188
1189   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1190   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1191   | --sharedst | --shareds | --shared | --share | --shar \
1192   | --sha | --sh)
1193     ac_prev=sharedstatedir ;;
1194   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1195   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1196   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1197   | --sha=* | --sh=*)
1198     sharedstatedir=$ac_optarg ;;
1199
1200   -site | --site | --sit)
1201     ac_prev=site ;;
1202   -site=* | --site=* | --sit=*)
1203     site=$ac_optarg ;;
1204
1205   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1206     ac_prev=srcdir ;;
1207   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1208     srcdir=$ac_optarg ;;
1209
1210   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1211   | --syscon | --sysco | --sysc | --sys | --sy)
1212     ac_prev=sysconfdir ;;
1213   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1214   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1215     sysconfdir=$ac_optarg ;;
1216
1217   -target | --target | --targe | --targ | --tar | --ta | --t)
1218     ac_prev=target_alias ;;
1219   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1220     target_alias=$ac_optarg ;;
1221
1222   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1223     verbose=yes ;;
1224
1225   -version | --version | --versio | --versi | --vers | -V)
1226     ac_init_version=: ;;
1227
1228   -with-* | --with-*)
1229     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1230     # Reject names that are not valid shell variable names.
1231     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1232       as_fn_error $? "invalid package name: $ac_useropt"
1233     ac_useropt_orig=$ac_useropt
1234     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1235     case $ac_user_opts in
1236       *"
1237 "with_$ac_useropt"
1238 "*) ;;
1239       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1240          ac_unrecognized_sep=', ';;
1241     esac
1242     eval with_$ac_useropt=\$ac_optarg ;;
1243
1244   -without-* | --without-*)
1245     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1246     # Reject names that are not valid shell variable names.
1247     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1248       as_fn_error $? "invalid package name: $ac_useropt"
1249     ac_useropt_orig=$ac_useropt
1250     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1251     case $ac_user_opts in
1252       *"
1253 "with_$ac_useropt"
1254 "*) ;;
1255       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1256          ac_unrecognized_sep=', ';;
1257     esac
1258     eval with_$ac_useropt=no ;;
1259
1260   --x)
1261     # Obsolete; use --with-x.
1262     with_x=yes ;;
1263
1264   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1265   | --x-incl | --x-inc | --x-in | --x-i)
1266     ac_prev=x_includes ;;
1267   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1268   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1269     x_includes=$ac_optarg ;;
1270
1271   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1272   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1273     ac_prev=x_libraries ;;
1274   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1275   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1276     x_libraries=$ac_optarg ;;
1277
1278   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1279 Try \`$0 --help' for more information"
1280     ;;
1281
1282   *=*)
1283     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1284     # Reject names that are not valid shell variable names.
1285     case $ac_envvar in #(
1286       '' | [0-9]* | *[!_$as_cr_alnum]* )
1287       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1288     esac
1289     eval $ac_envvar=\$ac_optarg
1290     export $ac_envvar ;;
1291
1292   *)
1293     # FIXME: should be removed in autoconf 3.0.
1294     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1295     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1296       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1297     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1298     ;;
1299
1300   esac
1301 done
1302
1303 if test -n "$ac_prev"; then
1304   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1305   as_fn_error $? "missing argument to $ac_option"
1306 fi
1307
1308 if test -n "$ac_unrecognized_opts"; then
1309   case $enable_option_checking in
1310     no) ;;
1311     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1312     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1313   esac
1314 fi
1315
1316 # Check all directory arguments for consistency.
1317 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1318                 datadir sysconfdir sharedstatedir localstatedir includedir \
1319                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1320                 libdir localedir mandir
1321 do
1322   eval ac_val=\$$ac_var
1323   # Remove trailing slashes.
1324   case $ac_val in
1325     */ )
1326       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1327       eval $ac_var=\$ac_val;;
1328   esac
1329   # Be sure to have absolute directory names.
1330   case $ac_val in
1331     [\\/$]* | ?:[\\/]* )  continue;;
1332     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1333   esac
1334   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1335 done
1336
1337 # There might be people who depend on the old broken behavior: `$host'
1338 # used to hold the argument of --host etc.
1339 # FIXME: To remove some day.
1340 build=$build_alias
1341 host=$host_alias
1342 target=$target_alias
1343
1344 # FIXME: To remove some day.
1345 if test "x$host_alias" != x; then
1346   if test "x$build_alias" = x; then
1347     cross_compiling=maybe
1348   elif test "x$build_alias" != "x$host_alias"; then
1349     cross_compiling=yes
1350   fi
1351 fi
1352
1353 ac_tool_prefix=
1354 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1355
1356 test "$silent" = yes && exec 6>/dev/null
1357
1358
1359 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1360 ac_ls_di=`ls -di .` &&
1361 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1362   as_fn_error $? "working directory cannot be determined"
1363 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1364   as_fn_error $? "pwd does not report name of working directory"
1365
1366
1367 # Find the source files, if location was not specified.
1368 if test -z "$srcdir"; then
1369   ac_srcdir_defaulted=yes
1370   # Try the directory containing this script, then the parent directory.
1371   ac_confdir=`$as_dirname -- "$as_myself" ||
1372 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1373          X"$as_myself" : 'X\(//\)[^/]' \| \
1374          X"$as_myself" : 'X\(//\)$' \| \
1375          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1376 $as_echo X"$as_myself" |
1377     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1378             s//\1/
1379             q
1380           }
1381           /^X\(\/\/\)[^/].*/{
1382             s//\1/
1383             q
1384           }
1385           /^X\(\/\/\)$/{
1386             s//\1/
1387             q
1388           }
1389           /^X\(\/\).*/{
1390             s//\1/
1391             q
1392           }
1393           s/.*/./; q'`
1394   srcdir=$ac_confdir
1395   if test ! -r "$srcdir/$ac_unique_file"; then
1396     srcdir=..
1397   fi
1398 else
1399   ac_srcdir_defaulted=no
1400 fi
1401 if test ! -r "$srcdir/$ac_unique_file"; then
1402   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1403   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1404 fi
1405 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1406 ac_abs_confdir=`(
1407         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1408         pwd)`
1409 # When building in place, set srcdir=.
1410 if test "$ac_abs_confdir" = "$ac_pwd"; then
1411   srcdir=.
1412 fi
1413 # Remove unnecessary trailing slashes from srcdir.
1414 # Double slashes in file names in object file debugging info
1415 # mess up M-x gdb in Emacs.
1416 case $srcdir in
1417 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1418 esac
1419 for ac_var in $ac_precious_vars; do
1420   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1421   eval ac_env_${ac_var}_value=\$${ac_var}
1422   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1423   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1424 done
1425
1426 #
1427 # Report the --help message.
1428 #
1429 if test "$ac_init_help" = "long"; then
1430   # Omit some internal or obsolete options to make the list less imposing.
1431   # This message is too long to be a string in the A/UX 3.1 sh.
1432   cat <<_ACEOF
1433 \`configure' configures PostgreSQL 12devel to adapt to many kinds of systems.
1434
1435 Usage: $0 [OPTION]... [VAR=VALUE]...
1436
1437 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1438 VAR=VALUE.  See below for descriptions of some of the useful variables.
1439
1440 Defaults for the options are specified in brackets.
1441
1442 Configuration:
1443   -h, --help              display this help and exit
1444       --help=short        display options specific to this package
1445       --help=recursive    display the short help of all the included packages
1446   -V, --version           display version information and exit
1447   -q, --quiet, --silent   do not print \`checking ...' messages
1448       --cache-file=FILE   cache test results in FILE [disabled]
1449   -C, --config-cache      alias for \`--cache-file=config.cache'
1450   -n, --no-create         do not create output files
1451       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1452
1453 Installation directories:
1454   --prefix=PREFIX         install architecture-independent files in PREFIX
1455                           [$ac_default_prefix]
1456   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1457                           [PREFIX]
1458
1459 By default, \`make install' will install all the files in
1460 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1461 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1462 for instance \`--prefix=\$HOME'.
1463
1464 For better control, use the options below.
1465
1466 Fine tuning of the installation directories:
1467   --bindir=DIR            user executables [EPREFIX/bin]
1468   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1469   --libexecdir=DIR        program executables [EPREFIX/libexec]
1470   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1471   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1472   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1473   --libdir=DIR            object code libraries [EPREFIX/lib]
1474   --includedir=DIR        C header files [PREFIX/include]
1475   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1476   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1477   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1478   --infodir=DIR           info documentation [DATAROOTDIR/info]
1479   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1480   --mandir=DIR            man documentation [DATAROOTDIR/man]
1481   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1482   --htmldir=DIR           html documentation [DOCDIR]
1483   --dvidir=DIR            dvi documentation [DOCDIR]
1484   --pdfdir=DIR            pdf documentation [DOCDIR]
1485   --psdir=DIR             ps documentation [DOCDIR]
1486 _ACEOF
1487
1488   cat <<\_ACEOF
1489
1490 System types:
1491   --build=BUILD     configure for building on BUILD [guessed]
1492   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1493 _ACEOF
1494 fi
1495
1496 if test -n "$ac_init_help"; then
1497   case $ac_init_help in
1498      short | recursive ) echo "Configuration of PostgreSQL 12devel:";;
1499    esac
1500   cat <<\_ACEOF
1501
1502 Optional Features:
1503   --disable-option-checking  ignore unrecognized --enable/--with options
1504   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1505   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1506   --disable-integer-datetimes
1507                           obsolete option, no longer supported
1508   --enable-nls[=LANGUAGES]
1509                           enable Native Language Support
1510   --disable-rpath         do not embed shared library search path in
1511                           executables
1512   --disable-spinlocks     do not use spinlocks
1513   --disable-atomics       do not use atomic operations
1514   --disable-strong-random do not use a strong random number source
1515   --enable-debug          build with debugging symbols (-g)
1516   --enable-profiling      build with profiling enabled
1517   --enable-coverage       build with coverage testing instrumentation
1518   --enable-dtrace         build with DTrace support
1519   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1520   --enable-depend         turn on automatic dependency tracking
1521   --enable-cassert        enable assertion checks (for debugging)
1522   --disable-thread-safety disable thread-safety in client libraries
1523   --disable-largefile     omit support for large files
1524   --disable-float4-byval  disable float4 passed by value
1525   --disable-float8-byval  disable float8 passed by value
1526
1527 Optional Packages:
1528   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1529   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1530   --with-extra-version=STRING
1531                           append STRING to version
1532   --with-template=NAME    override operating system template
1533   --with-includes=DIRS    look for additional header files in DIRS
1534   --with-libraries=DIRS   look for additional libraries in DIRS
1535   --with-libs=DIRS        alternative spelling of --with-libraries
1536   --with-pgport=PORTNUM   set default port number [5432]
1537   --with-blocksize=BLOCKSIZE
1538                           set table block size in kB [8]
1539   --with-segsize=SEGSIZE  set table segment size in GB [1]
1540   --with-wal-blocksize=BLOCKSIZE
1541                           set WAL block size in kB [8]
1542   --with-CC=CMD           set compiler (deprecated)
1543   --with-llvm             build with LLVM based JIT support
1544   --with-icu              build with ICU support
1545   --with-tcl              build Tcl modules (PL/Tcl)
1546   --with-tclconfig=DIR    tclConfig.sh is in DIR
1547   --with-perl             build Perl modules (PL/Perl)
1548   --with-python           build Python modules (PL/Python)
1549   --with-gssapi           build with GSSAPI support
1550   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1551                           [postgres]
1552   --with-pam              build with PAM support
1553   --with-bsd-auth         build with BSD Authentication support
1554   --with-ldap             build with LDAP support
1555   --with-bonjour          build with Bonjour support
1556   --with-openssl          build with OpenSSL support
1557   --with-selinux          build with SELinux support
1558   --with-systemd          build with systemd support
1559   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1560   --with-libedit-preferred
1561                           prefer BSD Libedit over GNU Readline
1562   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1563   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1564   --with-libxml           build with XML support
1565   --with-libxslt          use XSLT support when building contrib/xml2
1566   --with-system-tzdata=DIR
1567                           use system time zone data in DIR
1568   --without-zlib          do not use Zlib
1569   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1570
1571 Some influential environment variables:
1572   CC          C compiler command
1573   CFLAGS      C compiler flags
1574   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1575               nonstandard directory <lib dir>
1576   LIBS        libraries to pass to the linker, e.g. -l<library>
1577   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1578               you have headers in a nonstandard directory <include dir>
1579   CXX         C++ compiler command
1580   CXXFLAGS    C++ compiler flags
1581   LLVM_CONFIG path to llvm-config command
1582   CLANG       path to clang compiler to generate bitcode
1583   CPP         C preprocessor
1584   PKG_CONFIG  path to pkg-config utility
1585   PKG_CONFIG_PATH
1586               directories to add to pkg-config's search path
1587   PKG_CONFIG_LIBDIR
1588               path overriding pkg-config's built-in search path
1589   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1590   ICU_LIBS    linker flags for ICU, overriding pkg-config
1591   LDFLAGS_EX  extra linker flags for linking executables only
1592   LDFLAGS_SL  extra linker flags for linking shared libraries only
1593
1594 Use these variables to override the choices made by `configure' or to help
1595 it to find libraries and programs with nonstandard names/locations.
1596
1597 Report bugs to <pgsql-bugs@postgresql.org>.
1598 _ACEOF
1599 ac_status=$?
1600 fi
1601
1602 if test "$ac_init_help" = "recursive"; then
1603   # If there are subdirs, report their specific --help.
1604   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1605     test -d "$ac_dir" ||
1606       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1607       continue
1608     ac_builddir=.
1609
1610 case "$ac_dir" in
1611 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1612 *)
1613   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1614   # A ".." for each directory in $ac_dir_suffix.
1615   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1616   case $ac_top_builddir_sub in
1617   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1618   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1619   esac ;;
1620 esac
1621 ac_abs_top_builddir=$ac_pwd
1622 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1623 # for backward compatibility:
1624 ac_top_builddir=$ac_top_build_prefix
1625
1626 case $srcdir in
1627   .)  # We are building in place.
1628     ac_srcdir=.
1629     ac_top_srcdir=$ac_top_builddir_sub
1630     ac_abs_top_srcdir=$ac_pwd ;;
1631   [\\/]* | ?:[\\/]* )  # Absolute name.
1632     ac_srcdir=$srcdir$ac_dir_suffix;
1633     ac_top_srcdir=$srcdir
1634     ac_abs_top_srcdir=$srcdir ;;
1635   *) # Relative name.
1636     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1637     ac_top_srcdir=$ac_top_build_prefix$srcdir
1638     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1639 esac
1640 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1641
1642     cd "$ac_dir" || { ac_status=$?; continue; }
1643     # Check for guested configure.
1644     if test -f "$ac_srcdir/configure.gnu"; then
1645       echo &&
1646       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1647     elif test -f "$ac_srcdir/configure"; then
1648       echo &&
1649       $SHELL "$ac_srcdir/configure" --help=recursive
1650     else
1651       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1652     fi || ac_status=$?
1653     cd "$ac_pwd" || { ac_status=$?; break; }
1654   done
1655 fi
1656
1657 test -n "$ac_init_help" && exit $ac_status
1658 if $ac_init_version; then
1659   cat <<\_ACEOF
1660 PostgreSQL configure 12devel
1661 generated by GNU Autoconf 2.69
1662
1663 Copyright (C) 2012 Free Software Foundation, Inc.
1664 This configure script is free software; the Free Software Foundation
1665 gives unlimited permission to copy, distribute and modify it.
1666
1667 Copyright (c) 1996-2018, PostgreSQL Global Development Group
1668 _ACEOF
1669   exit
1670 fi
1671
1672 ## ------------------------ ##
1673 ## Autoconf initialization. ##
1674 ## ------------------------ ##
1675
1676 # ac_fn_c_try_compile LINENO
1677 # --------------------------
1678 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1679 ac_fn_c_try_compile ()
1680 {
1681   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682   rm -f conftest.$ac_objext
1683   if { { ac_try="$ac_compile"
1684 case "(($ac_try" in
1685   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1686   *) ac_try_echo=$ac_try;;
1687 esac
1688 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1689 $as_echo "$ac_try_echo"; } >&5
1690   (eval "$ac_compile") 2>conftest.err
1691   ac_status=$?
1692   if test -s conftest.err; then
1693     grep -v '^ *+' conftest.err >conftest.er1
1694     cat conftest.er1 >&5
1695     mv -f conftest.er1 conftest.err
1696   fi
1697   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1698   test $ac_status = 0; } && {
1699          test -z "$ac_c_werror_flag" ||
1700          test ! -s conftest.err
1701        } && test -s conftest.$ac_objext; then :
1702   ac_retval=0
1703 else
1704   $as_echo "$as_me: failed program was:" >&5
1705 sed 's/^/| /' conftest.$ac_ext >&5
1706
1707         ac_retval=1
1708 fi
1709   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1710   as_fn_set_status $ac_retval
1711
1712 } # ac_fn_c_try_compile
1713
1714 # ac_fn_cxx_try_compile LINENO
1715 # ----------------------------
1716 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1717 ac_fn_cxx_try_compile ()
1718 {
1719   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1720   rm -f conftest.$ac_objext
1721   if { { ac_try="$ac_compile"
1722 case "(($ac_try" in
1723   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1724   *) ac_try_echo=$ac_try;;
1725 esac
1726 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1727 $as_echo "$ac_try_echo"; } >&5
1728   (eval "$ac_compile") 2>conftest.err
1729   ac_status=$?
1730   if test -s conftest.err; then
1731     grep -v '^ *+' conftest.err >conftest.er1
1732     cat conftest.er1 >&5
1733     mv -f conftest.er1 conftest.err
1734   fi
1735   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1736   test $ac_status = 0; } && {
1737          test -z "$ac_cxx_werror_flag" ||
1738          test ! -s conftest.err
1739        } && test -s conftest.$ac_objext; then :
1740   ac_retval=0
1741 else
1742   $as_echo "$as_me: failed program was:" >&5
1743 sed 's/^/| /' conftest.$ac_ext >&5
1744
1745         ac_retval=1
1746 fi
1747   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1748   as_fn_set_status $ac_retval
1749
1750 } # ac_fn_cxx_try_compile
1751
1752 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1753 # ---------------------------------------------
1754 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1755 # accordingly.
1756 ac_fn_c_check_decl ()
1757 {
1758   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1759   as_decl_name=`echo $2|sed 's/ *(.*//'`
1760   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1761   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1762 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1763 if eval \${$3+:} false; then :
1764   $as_echo_n "(cached) " >&6
1765 else
1766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1767 /* end confdefs.h.  */
1768 $4
1769 int
1770 main ()
1771 {
1772 #ifndef $as_decl_name
1773 #ifdef __cplusplus
1774   (void) $as_decl_use;
1775 #else
1776   (void) $as_decl_name;
1777 #endif
1778 #endif
1779
1780   ;
1781   return 0;
1782 }
1783 _ACEOF
1784 if ac_fn_c_try_compile "$LINENO"; then :
1785   eval "$3=yes"
1786 else
1787   eval "$3=no"
1788 fi
1789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1790 fi
1791 eval ac_res=\$$3
1792                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1793 $as_echo "$ac_res" >&6; }
1794   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1795
1796 } # ac_fn_c_check_decl
1797
1798 # ac_fn_c_try_link LINENO
1799 # -----------------------
1800 # Try to link conftest.$ac_ext, and return whether this succeeded.
1801 ac_fn_c_try_link ()
1802 {
1803   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1804   rm -f conftest.$ac_objext conftest$ac_exeext
1805   if { { ac_try="$ac_link"
1806 case "(($ac_try" in
1807   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1808   *) ac_try_echo=$ac_try;;
1809 esac
1810 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1811 $as_echo "$ac_try_echo"; } >&5
1812   (eval "$ac_link") 2>conftest.err
1813   ac_status=$?
1814   if test -s conftest.err; then
1815     grep -v '^ *+' conftest.err >conftest.er1
1816     cat conftest.er1 >&5
1817     mv -f conftest.er1 conftest.err
1818   fi
1819   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1820   test $ac_status = 0; } && {
1821          test -z "$ac_c_werror_flag" ||
1822          test ! -s conftest.err
1823        } && test -s conftest$ac_exeext && {
1824          test "$cross_compiling" = yes ||
1825          test -x conftest$ac_exeext
1826        }; then :
1827   ac_retval=0
1828 else
1829   $as_echo "$as_me: failed program was:" >&5
1830 sed 's/^/| /' conftest.$ac_ext >&5
1831
1832         ac_retval=1
1833 fi
1834   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1835   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1836   # interfere with the next link command; also delete a directory that is
1837   # left behind by Apple's compiler.  We do this before executing the actions.
1838   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1839   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840   as_fn_set_status $ac_retval
1841
1842 } # ac_fn_c_try_link
1843
1844 # ac_fn_c_try_cpp LINENO
1845 # ----------------------
1846 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1847 ac_fn_c_try_cpp ()
1848 {
1849   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850   if { { ac_try="$ac_cpp conftest.$ac_ext"
1851 case "(($ac_try" in
1852   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1853   *) ac_try_echo=$ac_try;;
1854 esac
1855 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1856 $as_echo "$ac_try_echo"; } >&5
1857   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1858   ac_status=$?
1859   if test -s conftest.err; then
1860     grep -v '^ *+' conftest.err >conftest.er1
1861     cat conftest.er1 >&5
1862     mv -f conftest.er1 conftest.err
1863   fi
1864   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1865   test $ac_status = 0; } > conftest.i && {
1866          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1867          test ! -s conftest.err
1868        }; then :
1869   ac_retval=0
1870 else
1871   $as_echo "$as_me: failed program was:" >&5
1872 sed 's/^/| /' conftest.$ac_ext >&5
1873
1874     ac_retval=1
1875 fi
1876   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1877   as_fn_set_status $ac_retval
1878
1879 } # ac_fn_c_try_cpp
1880
1881 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1882 # -------------------------------------------------------
1883 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1884 # the include files in INCLUDES and setting the cache variable VAR
1885 # accordingly.
1886 ac_fn_c_check_header_mongrel ()
1887 {
1888   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889   if eval \${$3+:} false; then :
1890   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891 $as_echo_n "checking for $2... " >&6; }
1892 if eval \${$3+:} false; then :
1893   $as_echo_n "(cached) " >&6
1894 fi
1895 eval ac_res=\$$3
1896                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1897 $as_echo "$ac_res" >&6; }
1898 else
1899   # Is the header compilable?
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1901 $as_echo_n "checking $2 usability... " >&6; }
1902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1903 /* end confdefs.h.  */
1904 $4
1905 #include <$2>
1906 _ACEOF
1907 if ac_fn_c_try_compile "$LINENO"; then :
1908   ac_header_compiler=yes
1909 else
1910   ac_header_compiler=no
1911 fi
1912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1914 $as_echo "$ac_header_compiler" >&6; }
1915
1916 # Is the header present?
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1918 $as_echo_n "checking $2 presence... " >&6; }
1919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1920 /* end confdefs.h.  */
1921 #include <$2>
1922 _ACEOF
1923 if ac_fn_c_try_cpp "$LINENO"; then :
1924   ac_header_preproc=yes
1925 else
1926   ac_header_preproc=no
1927 fi
1928 rm -f conftest.err conftest.i conftest.$ac_ext
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1930 $as_echo "$ac_header_preproc" >&6; }
1931
1932 # So?  What about this header?
1933 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1934   yes:no: )
1935     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1936 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1937     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1938 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1939     ;;
1940   no:yes:* )
1941     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1942 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1943     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1944 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1945     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1946 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1947     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1948 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1949     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1950 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1951 ( $as_echo "## ---------------------------------------- ##
1952 ## Report this to pgsql-bugs@postgresql.org ##
1953 ## ---------------------------------------- ##"
1954      ) | sed "s/^/$as_me: WARNING:     /" >&2
1955     ;;
1956 esac
1957   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1958 $as_echo_n "checking for $2... " >&6; }
1959 if eval \${$3+:} false; then :
1960   $as_echo_n "(cached) " >&6
1961 else
1962   eval "$3=\$ac_header_compiler"
1963 fi
1964 eval ac_res=\$$3
1965                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1966 $as_echo "$ac_res" >&6; }
1967 fi
1968   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1969
1970 } # ac_fn_c_check_header_mongrel
1971
1972 # ac_fn_c_try_run LINENO
1973 # ----------------------
1974 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1975 # that executables *can* be run.
1976 ac_fn_c_try_run ()
1977 {
1978   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1979   if { { ac_try="$ac_link"
1980 case "(($ac_try" in
1981   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1982   *) ac_try_echo=$ac_try;;
1983 esac
1984 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1985 $as_echo "$ac_try_echo"; } >&5
1986   (eval "$ac_link") 2>&5
1987   ac_status=$?
1988   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1989   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1990   { { case "(($ac_try" in
1991   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1992   *) ac_try_echo=$ac_try;;
1993 esac
1994 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1995 $as_echo "$ac_try_echo"; } >&5
1996   (eval "$ac_try") 2>&5
1997   ac_status=$?
1998   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1999   test $ac_status = 0; }; }; then :
2000   ac_retval=0
2001 else
2002   $as_echo "$as_me: program exited with status $ac_status" >&5
2003        $as_echo "$as_me: failed program was:" >&5
2004 sed 's/^/| /' conftest.$ac_ext >&5
2005
2006        ac_retval=$ac_status
2007 fi
2008   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2009   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2010   as_fn_set_status $ac_retval
2011
2012 } # ac_fn_c_try_run
2013
2014 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2015 # -------------------------------------------------------
2016 # Tests whether HEADER exists and can be compiled using the include files in
2017 # INCLUDES, setting the cache variable VAR accordingly.
2018 ac_fn_c_check_header_compile ()
2019 {
2020   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2021   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2022 $as_echo_n "checking for $2... " >&6; }
2023 if eval \${$3+:} false; then :
2024   $as_echo_n "(cached) " >&6
2025 else
2026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2027 /* end confdefs.h.  */
2028 $4
2029 #include <$2>
2030 _ACEOF
2031 if ac_fn_c_try_compile "$LINENO"; then :
2032   eval "$3=yes"
2033 else
2034   eval "$3=no"
2035 fi
2036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037 fi
2038 eval ac_res=\$$3
2039                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2040 $as_echo "$ac_res" >&6; }
2041   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2042
2043 } # ac_fn_c_check_header_compile
2044
2045 # ac_fn_c_check_func LINENO FUNC VAR
2046 # ----------------------------------
2047 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2048 ac_fn_c_check_func ()
2049 {
2050   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2052 $as_echo_n "checking for $2... " >&6; }
2053 if eval \${$3+:} false; then :
2054   $as_echo_n "(cached) " >&6
2055 else
2056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057 /* end confdefs.h.  */
2058 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2059    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2060 #define $2 innocuous_$2
2061
2062 /* System header to define __stub macros and hopefully few prototypes,
2063     which can conflict with char $2 (); below.
2064     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2065     <limits.h> exists even on freestanding compilers.  */
2066
2067 #ifdef __STDC__
2068 # include <limits.h>
2069 #else
2070 # include <assert.h>
2071 #endif
2072
2073 #undef $2
2074
2075 /* Override any GCC internal prototype to avoid an error.
2076    Use char because int might match the return type of a GCC
2077    builtin and then its argument prototype would still apply.  */
2078 #ifdef __cplusplus
2079 extern "C"
2080 #endif
2081 char $2 ();
2082 /* The GNU C library defines this for functions which it implements
2083     to always fail with ENOSYS.  Some functions are actually named
2084     something starting with __ and the normal name is an alias.  */
2085 #if defined __stub_$2 || defined __stub___$2
2086 choke me
2087 #endif
2088
2089 int
2090 main ()
2091 {
2092 return $2 ();
2093   ;
2094   return 0;
2095 }
2096 _ACEOF
2097 if ac_fn_c_try_link "$LINENO"; then :
2098   eval "$3=yes"
2099 else
2100   eval "$3=no"
2101 fi
2102 rm -f core conftest.err conftest.$ac_objext \
2103     conftest$ac_exeext conftest.$ac_ext
2104 fi
2105 eval ac_res=\$$3
2106                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2107 $as_echo "$ac_res" >&6; }
2108   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2109
2110 } # ac_fn_c_check_func
2111
2112 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2113 # -------------------------------------------
2114 # Tests whether TYPE exists after having included INCLUDES, setting cache
2115 # variable VAR accordingly.
2116 ac_fn_c_check_type ()
2117 {
2118   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2119   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2120 $as_echo_n "checking for $2... " >&6; }
2121 if eval \${$3+:} false; then :
2122   $as_echo_n "(cached) " >&6
2123 else
2124   eval "$3=no"
2125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126 /* end confdefs.h.  */
2127 $4
2128 int
2129 main ()
2130 {
2131 if (sizeof ($2))
2132          return 0;
2133   ;
2134   return 0;
2135 }
2136 _ACEOF
2137 if ac_fn_c_try_compile "$LINENO"; then :
2138   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139 /* end confdefs.h.  */
2140 $4
2141 int
2142 main ()
2143 {
2144 if (sizeof (($2)))
2145             return 0;
2146   ;
2147   return 0;
2148 }
2149 _ACEOF
2150 if ac_fn_c_try_compile "$LINENO"; then :
2151
2152 else
2153   eval "$3=yes"
2154 fi
2155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2156 fi
2157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2158 fi
2159 eval ac_res=\$$3
2160                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2161 $as_echo "$ac_res" >&6; }
2162   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2163
2164 } # ac_fn_c_check_type
2165
2166 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2167 # ----------------------------------------------------
2168 # Tries to find if the field MEMBER exists in type AGGR, after including
2169 # INCLUDES, setting cache variable VAR accordingly.
2170 ac_fn_c_check_member ()
2171 {
2172   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2174 $as_echo_n "checking for $2.$3... " >&6; }
2175 if eval \${$4+:} false; then :
2176   $as_echo_n "(cached) " >&6
2177 else
2178   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179 /* end confdefs.h.  */
2180 $5
2181 int
2182 main ()
2183 {
2184 static $2 ac_aggr;
2185 if (ac_aggr.$3)
2186 return 0;
2187   ;
2188   return 0;
2189 }
2190 _ACEOF
2191 if ac_fn_c_try_compile "$LINENO"; then :
2192   eval "$4=yes"
2193 else
2194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2195 /* end confdefs.h.  */
2196 $5
2197 int
2198 main ()
2199 {
2200 static $2 ac_aggr;
2201 if (sizeof ac_aggr.$3)
2202 return 0;
2203   ;
2204   return 0;
2205 }
2206 _ACEOF
2207 if ac_fn_c_try_compile "$LINENO"; then :
2208   eval "$4=yes"
2209 else
2210   eval "$4=no"
2211 fi
2212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2213 fi
2214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2215 fi
2216 eval ac_res=\$$4
2217                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2218 $as_echo "$ac_res" >&6; }
2219   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2220
2221 } # ac_fn_c_check_member
2222
2223 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2224 # --------------------------------------------
2225 # Tries to find the compile-time value of EXPR in a program that includes
2226 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2227 # computed
2228 ac_fn_c_compute_int ()
2229 {
2230   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2231   if test "$cross_compiling" = yes; then
2232     # Depending upon the size, compute the lo and hi bounds.
2233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2234 /* end confdefs.h.  */
2235 $4
2236 int
2237 main ()
2238 {
2239 static int test_array [1 - 2 * !(($2) >= 0)];
2240 test_array [0] = 0;
2241 return test_array [0];
2242
2243   ;
2244   return 0;
2245 }
2246 _ACEOF
2247 if ac_fn_c_try_compile "$LINENO"; then :
2248   ac_lo=0 ac_mid=0
2249   while :; do
2250     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251 /* end confdefs.h.  */
2252 $4
2253 int
2254 main ()
2255 {
2256 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2257 test_array [0] = 0;
2258 return test_array [0];
2259
2260   ;
2261   return 0;
2262 }
2263 _ACEOF
2264 if ac_fn_c_try_compile "$LINENO"; then :
2265   ac_hi=$ac_mid; break
2266 else
2267   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2268                         if test $ac_lo -le $ac_mid; then
2269                           ac_lo= ac_hi=
2270                           break
2271                         fi
2272                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2273 fi
2274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275   done
2276 else
2277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278 /* end confdefs.h.  */
2279 $4
2280 int
2281 main ()
2282 {
2283 static int test_array [1 - 2 * !(($2) < 0)];
2284 test_array [0] = 0;
2285 return test_array [0];
2286
2287   ;
2288   return 0;
2289 }
2290 _ACEOF
2291 if ac_fn_c_try_compile "$LINENO"; then :
2292   ac_hi=-1 ac_mid=-1
2293   while :; do
2294     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295 /* end confdefs.h.  */
2296 $4
2297 int
2298 main ()
2299 {
2300 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2301 test_array [0] = 0;
2302 return test_array [0];
2303
2304   ;
2305   return 0;
2306 }
2307 _ACEOF
2308 if ac_fn_c_try_compile "$LINENO"; then :
2309   ac_lo=$ac_mid; break
2310 else
2311   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2312                         if test $ac_mid -le $ac_hi; then
2313                           ac_lo= ac_hi=
2314                           break
2315                         fi
2316                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2317 fi
2318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319   done
2320 else
2321   ac_lo= ac_hi=
2322 fi
2323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2324 fi
2325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326 # Binary search between lo and hi bounds.
2327 while test "x$ac_lo" != "x$ac_hi"; do
2328   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2329   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2330 /* end confdefs.h.  */
2331 $4
2332 int
2333 main ()
2334 {
2335 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2336 test_array [0] = 0;
2337 return test_array [0];
2338
2339   ;
2340   return 0;
2341 }
2342 _ACEOF
2343 if ac_fn_c_try_compile "$LINENO"; then :
2344   ac_hi=$ac_mid
2345 else
2346   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2347 fi
2348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349 done
2350 case $ac_lo in #((
2351 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2352 '') ac_retval=1 ;;
2353 esac
2354   else
2355     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356 /* end confdefs.h.  */
2357 $4
2358 static long int longval () { return $2; }
2359 static unsigned long int ulongval () { return $2; }
2360 #include <stdio.h>
2361 #include <stdlib.h>
2362 int
2363 main ()
2364 {
2365
2366   FILE *f = fopen ("conftest.val", "w");
2367   if (! f)
2368     return 1;
2369   if (($2) < 0)
2370     {
2371       long int i = longval ();
2372       if (i != ($2))
2373         return 1;
2374       fprintf (f, "%ld", i);
2375     }
2376   else
2377     {
2378       unsigned long int i = ulongval ();
2379       if (i != ($2))
2380         return 1;
2381       fprintf (f, "%lu", i);
2382     }
2383   /* Do not output a trailing newline, as this causes \r\n confusion
2384      on some platforms.  */
2385   return ferror (f) || fclose (f) != 0;
2386
2387   ;
2388   return 0;
2389 }
2390 _ACEOF
2391 if ac_fn_c_try_run "$LINENO"; then :
2392   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2393 else
2394   ac_retval=1
2395 fi
2396 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2397   conftest.$ac_objext conftest.beam conftest.$ac_ext
2398 rm -f conftest.val
2399
2400   fi
2401   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2402   as_fn_set_status $ac_retval
2403
2404 } # ac_fn_c_compute_int
2405 cat >config.log <<_ACEOF
2406 This file contains any messages produced by compilers while
2407 running configure, to aid debugging if configure makes a mistake.
2408
2409 It was created by PostgreSQL $as_me 12devel, which was
2410 generated by GNU Autoconf 2.69.  Invocation command line was
2411
2412   $ $0 $@
2413
2414 _ACEOF
2415 exec 5>>config.log
2416 {
2417 cat <<_ASUNAME
2418 ## --------- ##
2419 ## Platform. ##
2420 ## --------- ##
2421
2422 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2423 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2424 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2425 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2426 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2427
2428 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2429 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2430
2431 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2432 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2433 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2434 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2435 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2436 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2437 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2438
2439 _ASUNAME
2440
2441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2442 for as_dir in $PATH
2443 do
2444   IFS=$as_save_IFS
2445   test -z "$as_dir" && as_dir=.
2446     $as_echo "PATH: $as_dir"
2447   done
2448 IFS=$as_save_IFS
2449
2450 } >&5
2451
2452 cat >&5 <<_ACEOF
2453
2454
2455 ## ----------- ##
2456 ## Core tests. ##
2457 ## ----------- ##
2458
2459 _ACEOF
2460
2461
2462 # Keep a trace of the command line.
2463 # Strip out --no-create and --no-recursion so they do not pile up.
2464 # Strip out --silent because we don't want to record it for future runs.
2465 # Also quote any args containing shell meta-characters.
2466 # Make two passes to allow for proper duplicate-argument suppression.
2467 ac_configure_args=
2468 ac_configure_args0=
2469 ac_configure_args1=
2470 ac_must_keep_next=false
2471 for ac_pass in 1 2
2472 do
2473   for ac_arg
2474   do
2475     case $ac_arg in
2476     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2477     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2478     | -silent | --silent | --silen | --sile | --sil)
2479       continue ;;
2480     *\'*)
2481       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2482     esac
2483     case $ac_pass in
2484     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2485     2)
2486       as_fn_append ac_configure_args1 " '$ac_arg'"
2487       if test $ac_must_keep_next = true; then
2488         ac_must_keep_next=false # Got value, back to normal.
2489       else
2490         case $ac_arg in
2491           *=* | --config-cache | -C | -disable-* | --disable-* \
2492           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2493           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2494           | -with-* | --with-* | -without-* | --without-* | --x)
2495             case "$ac_configure_args0 " in
2496               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2497             esac
2498             ;;
2499           -* ) ac_must_keep_next=true ;;
2500         esac
2501       fi
2502       as_fn_append ac_configure_args " '$ac_arg'"
2503       ;;
2504     esac
2505   done
2506 done
2507 { ac_configure_args0=; unset ac_configure_args0;}
2508 { ac_configure_args1=; unset ac_configure_args1;}
2509
2510 # When interrupted or exit'd, cleanup temporary files, and complete
2511 # config.log.  We remove comments because anyway the quotes in there
2512 # would cause problems or look ugly.
2513 # WARNING: Use '\'' to represent an apostrophe within the trap.
2514 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2515 trap 'exit_status=$?
2516   # Save into config.log some information that might help in debugging.
2517   {
2518     echo
2519
2520     $as_echo "## ---------------- ##
2521 ## Cache variables. ##
2522 ## ---------------- ##"
2523     echo
2524     # The following way of writing the cache mishandles newlines in values,
2525 (
2526   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2527     eval ac_val=\$$ac_var
2528     case $ac_val in #(
2529     *${as_nl}*)
2530       case $ac_var in #(
2531       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2532 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2533       esac
2534       case $ac_var in #(
2535       _ | IFS | as_nl) ;; #(
2536       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2537       *) { eval $ac_var=; unset $ac_var;} ;;
2538       esac ;;
2539     esac
2540   done
2541   (set) 2>&1 |
2542     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2543     *${as_nl}ac_space=\ *)
2544       sed -n \
2545         "s/'\''/'\''\\\\'\'''\''/g;
2546           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2547       ;; #(
2548     *)
2549       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2550       ;;
2551     esac |
2552     sort
2553 )
2554     echo
2555
2556     $as_echo "## ----------------- ##
2557 ## Output variables. ##
2558 ## ----------------- ##"
2559     echo
2560     for ac_var in $ac_subst_vars
2561     do
2562       eval ac_val=\$$ac_var
2563       case $ac_val in
2564       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2565       esac
2566       $as_echo "$ac_var='\''$ac_val'\''"
2567     done | sort
2568     echo
2569
2570     if test -n "$ac_subst_files"; then
2571       $as_echo "## ------------------- ##
2572 ## File substitutions. ##
2573 ## ------------------- ##"
2574       echo
2575       for ac_var in $ac_subst_files
2576       do
2577         eval ac_val=\$$ac_var
2578         case $ac_val in
2579         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2580         esac
2581         $as_echo "$ac_var='\''$ac_val'\''"
2582       done | sort
2583       echo
2584     fi
2585
2586     if test -s confdefs.h; then
2587       $as_echo "## ----------- ##
2588 ## confdefs.h. ##
2589 ## ----------- ##"
2590       echo
2591       cat confdefs.h
2592       echo
2593     fi
2594     test "$ac_signal" != 0 &&
2595       $as_echo "$as_me: caught signal $ac_signal"
2596     $as_echo "$as_me: exit $exit_status"
2597   } >&5
2598   rm -f core *.core core.conftest.* &&
2599     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2600     exit $exit_status
2601 ' 0
2602 for ac_signal in 1 2 13 15; do
2603   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2604 done
2605 ac_signal=0
2606
2607 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2608 rm -f -r conftest* confdefs.h
2609
2610 $as_echo "/* confdefs.h */" > confdefs.h
2611
2612 # Predefined preprocessor variables.
2613
2614 cat >>confdefs.h <<_ACEOF
2615 #define PACKAGE_NAME "$PACKAGE_NAME"
2616 _ACEOF
2617
2618 cat >>confdefs.h <<_ACEOF
2619 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2620 _ACEOF
2621
2622 cat >>confdefs.h <<_ACEOF
2623 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2624 _ACEOF
2625
2626 cat >>confdefs.h <<_ACEOF
2627 #define PACKAGE_STRING "$PACKAGE_STRING"
2628 _ACEOF
2629
2630 cat >>confdefs.h <<_ACEOF
2631 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2632 _ACEOF
2633
2634 cat >>confdefs.h <<_ACEOF
2635 #define PACKAGE_URL "$PACKAGE_URL"
2636 _ACEOF
2637
2638
2639 # Let the site file select an alternate cache file if it wants to.
2640 # Prefer an explicitly selected file to automatically selected ones.
2641 ac_site_file1=NONE
2642 ac_site_file2=NONE
2643 if test -n "$CONFIG_SITE"; then
2644   # We do not want a PATH search for config.site.
2645   case $CONFIG_SITE in #((
2646     -*)  ac_site_file1=./$CONFIG_SITE;;
2647     */*) ac_site_file1=$CONFIG_SITE;;
2648     *)   ac_site_file1=./$CONFIG_SITE;;
2649   esac
2650 elif test "x$prefix" != xNONE; then
2651   ac_site_file1=$prefix/share/config.site
2652   ac_site_file2=$prefix/etc/config.site
2653 else
2654   ac_site_file1=$ac_default_prefix/share/config.site
2655   ac_site_file2=$ac_default_prefix/etc/config.site
2656 fi
2657 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2658 do
2659   test "x$ac_site_file" = xNONE && continue
2660   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2661     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2662 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2663     sed 's/^/| /' "$ac_site_file" >&5
2664     . "$ac_site_file" \
2665       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2666 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2667 as_fn_error $? "failed to load site script $ac_site_file
2668 See \`config.log' for more details" "$LINENO" 5; }
2669   fi
2670 done
2671
2672 if test -r "$cache_file"; then
2673   # Some versions of bash will fail to source /dev/null (special files
2674   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2675   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2676     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2677 $as_echo "$as_me: loading cache $cache_file" >&6;}
2678     case $cache_file in
2679       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2680       *)                      . "./$cache_file";;
2681     esac
2682   fi
2683 else
2684   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2685 $as_echo "$as_me: creating cache $cache_file" >&6;}
2686   >$cache_file
2687 fi
2688
2689 # Check that the precious variables saved in the cache have kept the same
2690 # value.
2691 ac_cache_corrupted=false
2692 for ac_var in $ac_precious_vars; do
2693   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2694   eval ac_new_set=\$ac_env_${ac_var}_set
2695   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2696   eval ac_new_val=\$ac_env_${ac_var}_value
2697   case $ac_old_set,$ac_new_set in
2698     set,)
2699       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2700 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2701       ac_cache_corrupted=: ;;
2702     ,set)
2703       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2704 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2705       ac_cache_corrupted=: ;;
2706     ,);;
2707     *)
2708       if test "x$ac_old_val" != "x$ac_new_val"; then
2709         # differences in whitespace do not lead to failure.
2710         ac_old_val_w=`echo x $ac_old_val`
2711         ac_new_val_w=`echo x $ac_new_val`
2712         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2713           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2714 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2715           ac_cache_corrupted=:
2716         else
2717           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2718 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2719           eval $ac_var=\$ac_old_val
2720         fi
2721         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2722 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2723         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2724 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2725       fi;;
2726   esac
2727   # Pass precious variables to config.status.
2728   if test "$ac_new_set" = set; then
2729     case $ac_new_val in
2730     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2731     *) ac_arg=$ac_var=$ac_new_val ;;
2732     esac
2733     case " $ac_configure_args " in
2734       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2735       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2736     esac
2737   fi
2738 done
2739 if $ac_cache_corrupted; then
2740   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2741 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2742   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2743 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2744   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2745 fi
2746 ## -------------------- ##
2747 ## Main body of script. ##
2748 ## -------------------- ##
2749
2750 ac_ext=c
2751 ac_cpp='$CPP $CPPFLAGS'
2752 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2753 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2754 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2755
2756
2757
2758
2759
2760
2761 ac_aux_dir=
2762 for ac_dir in config "$srcdir"/config; do
2763   if test -f "$ac_dir/install-sh"; then
2764     ac_aux_dir=$ac_dir
2765     ac_install_sh="$ac_aux_dir/install-sh -c"
2766     break
2767   elif test -f "$ac_dir/install.sh"; then
2768     ac_aux_dir=$ac_dir
2769     ac_install_sh="$ac_aux_dir/install.sh -c"
2770     break
2771   elif test -f "$ac_dir/shtool"; then
2772     ac_aux_dir=$ac_dir
2773     ac_install_sh="$ac_aux_dir/shtool install -c"
2774     break
2775   fi
2776 done
2777 if test -z "$ac_aux_dir"; then
2778   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2779 fi
2780
2781 # These three variables are undocumented and unsupported,
2782 # and are intended to be withdrawn in a future Autoconf release.
2783 # They can cause serious problems if a builder's source tree is in a directory
2784 # whose full name contains unusual characters.
2785 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2786 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2787 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2788
2789
2790
2791 configure_args=$ac_configure_args
2792
2793
2794 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2795
2796
2797 cat >>confdefs.h <<_ACEOF
2798 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2799 _ACEOF
2800
2801
2802
2803
2804
2805 # Check whether --with-extra-version was given.
2806 if test "${with_extra_version+set}" = set; then :
2807   withval=$with_extra_version;
2808   case $withval in
2809     yes)
2810       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2811       ;;
2812     no)
2813       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2814       ;;
2815     *)
2816       PG_VERSION="$PACKAGE_VERSION$withval"
2817       ;;
2818   esac
2819
2820 else
2821   PG_VERSION="$PACKAGE_VERSION"
2822 fi
2823
2824
2825
2826 cat >>confdefs.h <<_ACEOF
2827 #define PG_VERSION "$PG_VERSION"
2828 _ACEOF
2829
2830
2831 # Make sure we can run config.sub.
2832 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2833   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2834
2835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2836 $as_echo_n "checking build system type... " >&6; }
2837 if ${ac_cv_build+:} false; then :
2838   $as_echo_n "(cached) " >&6
2839 else
2840   ac_build_alias=$build_alias
2841 test "x$ac_build_alias" = x &&
2842   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2843 test "x$ac_build_alias" = x &&
2844   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2845 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2846   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2847
2848 fi
2849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2850 $as_echo "$ac_cv_build" >&6; }
2851 case $ac_cv_build in
2852 *-*-*) ;;
2853 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2854 esac
2855 build=$ac_cv_build
2856 ac_save_IFS=$IFS; IFS='-'
2857 set x $ac_cv_build
2858 shift
2859 build_cpu=$1
2860 build_vendor=$2
2861 shift; shift
2862 # Remember, the first character of IFS is used to create $*,
2863 # except with old shells:
2864 build_os=$*
2865 IFS=$ac_save_IFS
2866 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2867
2868
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2870 $as_echo_n "checking host system type... " >&6; }
2871 if ${ac_cv_host+:} false; then :
2872   $as_echo_n "(cached) " >&6
2873 else
2874   if test "x$host_alias" = x; then
2875   ac_cv_host=$ac_cv_build
2876 else
2877   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2878     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2879 fi
2880
2881 fi
2882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2883 $as_echo "$ac_cv_host" >&6; }
2884 case $ac_cv_host in
2885 *-*-*) ;;
2886 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2887 esac
2888 host=$ac_cv_host
2889 ac_save_IFS=$IFS; IFS='-'
2890 set x $ac_cv_host
2891 shift
2892 host_cpu=$1
2893 host_vendor=$2
2894 shift; shift
2895 # Remember, the first character of IFS is used to create $*,
2896 # except with old shells:
2897 host_os=$*
2898 IFS=$ac_save_IFS
2899 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2900
2901
2902
2903 template=
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2905 $as_echo_n "checking which template to use... " >&6; }
2906
2907
2908
2909
2910 # Check whether --with-template was given.
2911 if test "${with_template+set}" = set; then :
2912   withval=$with_template;
2913   case $withval in
2914     yes)
2915       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2916       ;;
2917     no)
2918       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2919       ;;
2920     *)
2921
2922   case $withval in
2923     list)   echo; ls "$srcdir/src/template"; exit;;
2924     *)      if test -f "$srcdir/src/template/$with_template" ; then
2925               template=$withval
2926             else
2927               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2928             fi;;
2929   esac
2930
2931       ;;
2932   esac
2933
2934 else
2935
2936 # --with-template not given
2937
2938 case $host_os in
2939      aix*) template=aix ;;
2940   cygwin*) template=cygwin ;;
2941   darwin*) template=darwin ;;
2942 dragonfly*) template=netbsd ;;
2943  freebsd*) template=freebsd ;;
2944     hpux*) template=hpux ;;
2945  linux*|gnu*|k*bsd*-gnu)
2946            template=linux ;;
2947    mingw*) template=win32 ;;
2948   netbsd*) template=netbsd ;;
2949  openbsd*) template=openbsd ;;
2950  solaris*) template=solaris ;;
2951 esac
2952
2953   if test x"$template" = x"" ; then
2954     as_fn_error $? "
2955 *******************************************************************
2956 PostgreSQL has apparently not been ported to your platform yet.
2957 To try a manual configuration, look into the src/template directory
2958 for a similar platform and use the '--with-template=' option.
2959
2960 Please also contact <pgsql-bugs@postgresql.org> to see about
2961 rectifying this.  Include the above 'checking host system type...'
2962 line.
2963 *******************************************************************
2964 " "$LINENO" 5
2965   fi
2966
2967
2968 fi
2969
2970
2971
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2973 $as_echo "$template" >&6; }
2974
2975 PORTNAME=$template
2976
2977
2978 # Initialize default assumption that we do not need separate assembly code
2979 # for TAS (test-and-set).  This can be overridden by the template file
2980 # when it's executed.
2981 need_tas=no
2982 tas_file=dummy.s
2983
2984
2985
2986 ##
2987 ## Command line options
2988 ##
2989
2990 #
2991 # Add non-standard directories to the include path
2992 #
2993
2994
2995
2996 # Check whether --with-includes was given.
2997 if test "${with_includes+set}" = set; then :
2998   withval=$with_includes;
2999   case $withval in
3000     yes)
3001       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3002       ;;
3003     no)
3004       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3005       ;;
3006     *)
3007
3008       ;;
3009   esac
3010
3011 fi
3012
3013
3014
3015
3016 #
3017 # Add non-standard directories to the library search path
3018 #
3019
3020
3021
3022 # Check whether --with-libraries was given.
3023 if test "${with_libraries+set}" = set; then :
3024   withval=$with_libraries;
3025   case $withval in
3026     yes)
3027       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3028       ;;
3029     no)
3030       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3031       ;;
3032     *)
3033       LIBRARY_DIRS=$withval
3034       ;;
3035   esac
3036
3037 fi
3038
3039
3040
3041
3042
3043
3044 # Check whether --with-libs was given.
3045 if test "${with_libs+set}" = set; then :
3046   withval=$with_libs;
3047   case $withval in
3048     yes)
3049       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3050       ;;
3051     no)
3052       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3053       ;;
3054     *)
3055       LIBRARY_DIRS=$withval
3056       ;;
3057   esac
3058
3059 fi
3060
3061
3062
3063
3064 #
3065 # 64-bit integer date/time storage is now the only option, but to avoid
3066 # unnecessary breakage of build scripts, continue to accept an explicit
3067 # "--enable-integer-datetimes" switch.
3068 #
3069
3070
3071 # Check whether --enable-integer-datetimes was given.
3072 if test "${enable_integer_datetimes+set}" = set; then :
3073   enableval=$enable_integer_datetimes;
3074   case $enableval in
3075     yes)
3076       :
3077       ;;
3078     no)
3079       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3080       ;;
3081     *)
3082       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3083       ;;
3084   esac
3085
3086 else
3087   enable_integer_datetimes=yes
3088
3089 fi
3090
3091
3092
3093
3094 #
3095 # NLS
3096 #
3097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3098 $as_echo_n "checking whether NLS is wanted... " >&6; }
3099
3100
3101 # Check whether --enable-nls was given.
3102 if test "${enable_nls+set}" = set; then :
3103   enableval=$enable_nls;
3104   case $enableval in
3105     yes)
3106       :
3107       ;;
3108     no)
3109       :
3110       ;;
3111     *)
3112       enable_nls=yes
3113 WANTED_LANGUAGES=$enableval
3114       ;;
3115   esac
3116
3117 else
3118   enable_nls=no
3119 fi
3120
3121
3122
3123 if test "$enable_nls" = yes; then
3124
3125 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3126
3127 fi
3128
3129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3130 $as_echo "$enable_nls" >&6; }
3131
3132
3133
3134 #
3135 # Default port number (--with-pgport), default 5432
3136 #
3137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3138 $as_echo_n "checking for default port number... " >&6; }
3139
3140
3141
3142 # Check whether --with-pgport was given.
3143 if test "${with_pgport+set}" = set; then :
3144   withval=$with_pgport;
3145   case $withval in
3146     yes)
3147       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3148       ;;
3149     no)
3150       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3151       ;;
3152     *)
3153       default_port=$withval
3154       ;;
3155   esac
3156
3157 else
3158   default_port=5432
3159 fi
3160
3161
3162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3163 $as_echo "$default_port" >&6; }
3164 # Need both of these because some places want an integer and some a string
3165
3166 cat >>confdefs.h <<_ACEOF
3167 #define DEF_PGPORT ${default_port}
3168 _ACEOF
3169
3170
3171 cat >>confdefs.h <<_ACEOF
3172 #define DEF_PGPORT_STR "${default_port}"
3173 _ACEOF
3174
3175
3176
3177 # It's worth validating port; you can get very confusing errors otherwise
3178 if test x"$default_port" = x""; then
3179   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3180 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3181   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3182 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3183   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3184 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3185   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3186 fi
3187
3188 #
3189 # '-rpath'-like feature can be disabled
3190 #
3191
3192
3193 # Check whether --enable-rpath was given.
3194 if test "${enable_rpath+set}" = set; then :
3195   enableval=$enable_rpath;
3196   case $enableval in
3197     yes)
3198       :
3199       ;;
3200     no)
3201       :
3202       ;;
3203     *)
3204       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3205       ;;
3206   esac
3207
3208 else
3209   enable_rpath=yes
3210
3211 fi
3212
3213
3214
3215
3216 #
3217 # Spinlocks
3218 #
3219
3220
3221 # Check whether --enable-spinlocks was given.
3222 if test "${enable_spinlocks+set}" = set; then :
3223   enableval=$enable_spinlocks;
3224   case $enableval in
3225     yes)
3226       :
3227       ;;
3228     no)
3229       :
3230       ;;
3231     *)
3232       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3233       ;;
3234   esac
3235
3236 else
3237   enable_spinlocks=yes
3238
3239 fi
3240
3241
3242
3243 #
3244 # Atomic operations
3245 #
3246
3247
3248 # Check whether --enable-atomics was given.
3249 if test "${enable_atomics+set}" = set; then :
3250   enableval=$enable_atomics;
3251   case $enableval in
3252     yes)
3253       :
3254       ;;
3255     no)
3256       :
3257       ;;
3258     *)
3259       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3260       ;;
3261   esac
3262
3263 else
3264   enable_atomics=yes
3265
3266 fi
3267
3268
3269
3270 #
3271 # Random number generation
3272 #
3273
3274
3275 # Check whether --enable-strong-random was given.
3276 if test "${enable_strong_random+set}" = set; then :
3277   enableval=$enable_strong_random;
3278   case $enableval in
3279     yes)
3280       :
3281       ;;
3282     no)
3283       :
3284       ;;
3285     *)
3286       as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3287       ;;
3288   esac
3289
3290 else
3291   enable_strong_random=yes
3292
3293 fi
3294
3295
3296
3297
3298 #
3299 # --enable-debug adds -g to compiler flags
3300 #
3301
3302
3303 # Check whether --enable-debug was given.
3304 if test "${enable_debug+set}" = set; then :
3305   enableval=$enable_debug;
3306   case $enableval in
3307     yes)
3308       :
3309       ;;
3310     no)
3311       :
3312       ;;
3313     *)
3314       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3315       ;;
3316   esac
3317
3318 else
3319   enable_debug=no
3320
3321 fi
3322
3323
3324
3325
3326 #
3327 # --enable-profiling enables gcc profiling
3328 #
3329
3330
3331 # Check whether --enable-profiling was given.
3332 if test "${enable_profiling+set}" = set; then :
3333   enableval=$enable_profiling;
3334   case $enableval in
3335     yes)
3336       :
3337       ;;
3338     no)
3339       :
3340       ;;
3341     *)
3342       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3343       ;;
3344   esac
3345
3346 else
3347   enable_profiling=no
3348
3349 fi
3350
3351
3352
3353 #
3354 # --enable-coverage enables generation of code coverage metrics with gcov
3355 #
3356
3357
3358 # Check whether --enable-coverage was given.
3359 if test "${enable_coverage+set}" = set; then :
3360   enableval=$enable_coverage;
3361   case $enableval in
3362     yes)
3363       if test -z "$GCOV"; then
3364   for ac_prog in gcov
3365 do
3366   # Extract the first word of "$ac_prog", so it can be a program name with args.
3367 set dummy $ac_prog; ac_word=$2
3368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3369 $as_echo_n "checking for $ac_word... " >&6; }
3370 if ${ac_cv_path_GCOV+:} false; then :
3371   $as_echo_n "(cached) " >&6
3372 else
3373   case $GCOV in
3374   [\\/]* | ?:[\\/]*)
3375   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3376   ;;
3377   *)
3378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3379 for as_dir in $PATH
3380 do
3381   IFS=$as_save_IFS
3382   test -z "$as_dir" && as_dir=.
3383     for ac_exec_ext in '' $ac_executable_extensions; do
3384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3385     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3387     break 2
3388   fi
3389 done
3390   done
3391 IFS=$as_save_IFS
3392
3393   ;;
3394 esac
3395 fi
3396 GCOV=$ac_cv_path_GCOV
3397 if test -n "$GCOV"; then
3398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3399 $as_echo "$GCOV" >&6; }
3400 else
3401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3402 $as_echo "no" >&6; }
3403 fi
3404
3405
3406   test -n "$GCOV" && break
3407 done
3408
3409 else
3410   # Report the value of GCOV in configure's output in all cases.
3411   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3412 $as_echo_n "checking for GCOV... " >&6; }
3413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3414 $as_echo "$GCOV" >&6; }
3415 fi
3416
3417 if test -z "$GCOV"; then
3418   as_fn_error $? "gcov not found" "$LINENO" 5
3419 fi
3420 if test -z "$LCOV"; then
3421   for ac_prog in lcov
3422 do
3423   # Extract the first word of "$ac_prog", so it can be a program name with args.
3424 set dummy $ac_prog; ac_word=$2
3425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3426 $as_echo_n "checking for $ac_word... " >&6; }
3427 if ${ac_cv_path_LCOV+:} false; then :
3428   $as_echo_n "(cached) " >&6
3429 else
3430   case $LCOV in
3431   [\\/]* | ?:[\\/]*)
3432   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3433   ;;
3434   *)
3435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3436 for as_dir in $PATH
3437 do
3438   IFS=$as_save_IFS
3439   test -z "$as_dir" && as_dir=.
3440     for ac_exec_ext in '' $ac_executable_extensions; do
3441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3442     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3444     break 2
3445   fi
3446 done
3447   done
3448 IFS=$as_save_IFS
3449
3450   ;;
3451 esac
3452 fi
3453 LCOV=$ac_cv_path_LCOV
3454 if test -n "$LCOV"; then
3455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3456 $as_echo "$LCOV" >&6; }
3457 else
3458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3459 $as_echo "no" >&6; }
3460 fi
3461
3462
3463   test -n "$LCOV" && break
3464 done
3465
3466 else
3467   # Report the value of LCOV in configure's output in all cases.
3468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3469 $as_echo_n "checking for LCOV... " >&6; }
3470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3471 $as_echo "$LCOV" >&6; }
3472 fi
3473
3474 if test -z "$LCOV"; then
3475   as_fn_error $? "lcov not found" "$LINENO" 5
3476 fi
3477 if test -z "$GENHTML"; then
3478   for ac_prog in genhtml
3479 do
3480   # Extract the first word of "$ac_prog", so it can be a program name with args.
3481 set dummy $ac_prog; ac_word=$2
3482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3483 $as_echo_n "checking for $ac_word... " >&6; }
3484 if ${ac_cv_path_GENHTML+:} false; then :
3485   $as_echo_n "(cached) " >&6
3486 else
3487   case $GENHTML in
3488   [\\/]* | ?:[\\/]*)
3489   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3490   ;;
3491   *)
3492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3493 for as_dir in $PATH
3494 do
3495   IFS=$as_save_IFS
3496   test -z "$as_dir" && as_dir=.
3497     for ac_exec_ext in '' $ac_executable_extensions; do
3498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3499     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3501     break 2
3502   fi
3503 done
3504   done
3505 IFS=$as_save_IFS
3506
3507   ;;
3508 esac
3509 fi
3510 GENHTML=$ac_cv_path_GENHTML
3511 if test -n "$GENHTML"; then
3512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3513 $as_echo "$GENHTML" >&6; }
3514 else
3515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3516 $as_echo "no" >&6; }
3517 fi
3518
3519
3520   test -n "$GENHTML" && break
3521 done
3522
3523 else
3524   # Report the value of GENHTML in configure's output in all cases.
3525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3526 $as_echo_n "checking for GENHTML... " >&6; }
3527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3528 $as_echo "$GENHTML" >&6; }
3529 fi
3530
3531 if test -z "$GENHTML"; then
3532   as_fn_error $? "genhtml not found" "$LINENO" 5
3533 fi
3534       ;;
3535     no)
3536       :
3537       ;;
3538     *)
3539       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3540       ;;
3541   esac
3542
3543 else
3544   enable_coverage=no
3545
3546 fi
3547
3548
3549
3550
3551 #
3552 # DTrace
3553 #
3554
3555
3556 # Check whether --enable-dtrace was given.
3557 if test "${enable_dtrace+set}" = set; then :
3558   enableval=$enable_dtrace;
3559   case $enableval in
3560     yes)
3561       if test -z "$DTRACE"; then
3562   for ac_prog in dtrace
3563 do
3564   # Extract the first word of "$ac_prog", so it can be a program name with args.
3565 set dummy $ac_prog; ac_word=$2
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3567 $as_echo_n "checking for $ac_word... " >&6; }
3568 if ${ac_cv_path_DTRACE+:} false; then :
3569   $as_echo_n "(cached) " >&6
3570 else
3571   case $DTRACE in
3572   [\\/]* | ?:[\\/]*)
3573   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3574   ;;
3575   *)
3576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3577 for as_dir in $PATH
3578 do
3579   IFS=$as_save_IFS
3580   test -z "$as_dir" && as_dir=.
3581     for ac_exec_ext in '' $ac_executable_extensions; do
3582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3583     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3585     break 2
3586   fi
3587 done
3588   done
3589 IFS=$as_save_IFS
3590
3591   ;;
3592 esac
3593 fi
3594 DTRACE=$ac_cv_path_DTRACE
3595 if test -n "$DTRACE"; then
3596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3597 $as_echo "$DTRACE" >&6; }
3598 else
3599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3600 $as_echo "no" >&6; }
3601 fi
3602
3603
3604   test -n "$DTRACE" && break
3605 done
3606
3607 else
3608   # Report the value of DTRACE in configure's output in all cases.
3609   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3610 $as_echo_n "checking for DTRACE... " >&6; }
3611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3612 $as_echo "$DTRACE" >&6; }
3613 fi
3614
3615 if test -z "$DTRACE"; then
3616   as_fn_error $? "dtrace not found" "$LINENO" 5
3617 fi
3618
3619       ;;
3620     no)
3621       :
3622       ;;
3623     *)
3624       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3625       ;;
3626   esac
3627
3628 else
3629   enable_dtrace=no
3630
3631 fi
3632
3633
3634
3635
3636 #
3637 # TAP tests
3638 #
3639
3640
3641 # Check whether --enable-tap-tests was given.
3642 if test "${enable_tap_tests+set}" = set; then :
3643   enableval=$enable_tap_tests;
3644   case $enableval in
3645     yes)
3646       :
3647       ;;
3648     no)
3649       :
3650       ;;
3651     *)
3652       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3653       ;;
3654   esac
3655
3656 else
3657   enable_tap_tests=no
3658
3659 fi
3660
3661
3662
3663
3664 #
3665 # Block size
3666 #
3667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3668 $as_echo_n "checking for block size... " >&6; }
3669
3670
3671
3672 # Check whether --with-blocksize was given.
3673 if test "${with_blocksize+set}" = set; then :
3674   withval=$with_blocksize;
3675   case $withval in
3676     yes)
3677       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3678       ;;
3679     no)
3680       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3681       ;;
3682     *)
3683       blocksize=$withval
3684       ;;
3685   esac
3686
3687 else
3688   blocksize=8
3689 fi
3690
3691
3692 case ${blocksize} in
3693   1) BLCKSZ=1024;;
3694   2) BLCKSZ=2048;;
3695   4) BLCKSZ=4096;;
3696   8) BLCKSZ=8192;;
3697  16) BLCKSZ=16384;;
3698  32) BLCKSZ=32768;;
3699   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3700 esac
3701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3702 $as_echo "${blocksize}kB" >&6; }
3703
3704
3705 cat >>confdefs.h <<_ACEOF
3706 #define BLCKSZ ${BLCKSZ}
3707 _ACEOF
3708
3709
3710 #
3711 # Relation segment size
3712 #
3713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3714 $as_echo_n "checking for segment size... " >&6; }
3715
3716
3717
3718 # Check whether --with-segsize was given.
3719 if test "${with_segsize+set}" = set; then :
3720   withval=$with_segsize;
3721   case $withval in
3722     yes)
3723       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3724       ;;
3725     no)
3726       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3727       ;;
3728     *)
3729       segsize=$withval
3730       ;;
3731   esac
3732
3733 else
3734   segsize=1
3735 fi
3736
3737
3738 # this expression is set up to avoid unnecessary integer overflow
3739 # blocksize is already guaranteed to be a factor of 1024
3740 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3741 test $? -eq 0 || exit 1
3742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3743 $as_echo "${segsize}GB" >&6; }
3744
3745
3746 cat >>confdefs.h <<_ACEOF
3747 #define RELSEG_SIZE ${RELSEG_SIZE}
3748 _ACEOF
3749
3750
3751 #
3752 # WAL block size
3753 #
3754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3755 $as_echo_n "checking for WAL block size... " >&6; }
3756
3757
3758
3759 # Check whether --with-wal-blocksize was given.
3760 if test "${with_wal_blocksize+set}" = set; then :
3761   withval=$with_wal_blocksize;
3762   case $withval in
3763     yes)
3764       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3765       ;;
3766     no)
3767       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3768       ;;
3769     *)
3770       wal_blocksize=$withval
3771       ;;
3772   esac
3773
3774 else
3775   wal_blocksize=8
3776 fi
3777
3778
3779 case ${wal_blocksize} in
3780   1) XLOG_BLCKSZ=1024;;
3781   2) XLOG_BLCKSZ=2048;;
3782   4) XLOG_BLCKSZ=4096;;
3783   8) XLOG_BLCKSZ=8192;;
3784  16) XLOG_BLCKSZ=16384;;
3785  32) XLOG_BLCKSZ=32768;;
3786  64) XLOG_BLCKSZ=65536;;
3787   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3788 esac
3789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3790 $as_echo "${wal_blocksize}kB" >&6; }
3791
3792
3793 cat >>confdefs.h <<_ACEOF
3794 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3795 _ACEOF
3796
3797
3798 #
3799 # C compiler
3800 #
3801
3802 # For historical reasons you can also use --with-CC to specify the C compiler
3803 # to use, although the standard way to do this is to set the CC environment
3804 # variable.
3805
3806
3807
3808 # Check whether --with-CC was given.
3809 if test "${with_CC+set}" = set; then :
3810   withval=$with_CC;
3811   case $withval in
3812     yes)
3813       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3814       ;;
3815     no)
3816       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3817       ;;
3818     *)
3819       CC=$with_CC
3820       ;;
3821   esac
3822
3823 fi
3824
3825
3826
3827 case $template in
3828   aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3829     *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3830 esac
3831
3832 ac_ext=c
3833 ac_cpp='$CPP $CPPFLAGS'
3834 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3835 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3836 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3837 if test -n "$ac_tool_prefix"; then
3838   for ac_prog in $pgac_cc_list
3839   do
3840     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3841 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3843 $as_echo_n "checking for $ac_word... " >&6; }
3844 if ${ac_cv_prog_CC+:} false; then :
3845   $as_echo_n "(cached) " >&6
3846 else
3847   if test -n "$CC"; then
3848   ac_cv_prog_CC="$CC" # Let the user override the test.
3849 else
3850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3851 for as_dir in $PATH
3852 do
3853   IFS=$as_save_IFS
3854   test -z "$as_dir" && as_dir=.
3855     for ac_exec_ext in '' $ac_executable_extensions; do
3856   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3857     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3858     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3859     break 2
3860   fi
3861 done
3862   done
3863 IFS=$as_save_IFS
3864
3865 fi
3866 fi
3867 CC=$ac_cv_prog_CC
3868 if test -n "$CC"; then
3869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3870 $as_echo "$CC" >&6; }
3871 else
3872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3873 $as_echo "no" >&6; }
3874 fi
3875
3876
3877     test -n "$CC" && break
3878   done
3879 fi
3880 if test -z "$CC"; then
3881   ac_ct_CC=$CC
3882   for ac_prog in $pgac_cc_list
3883 do
3884   # Extract the first word of "$ac_prog", so it can be a program name with args.
3885 set dummy $ac_prog; ac_word=$2
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3887 $as_echo_n "checking for $ac_word... " >&6; }
3888 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3889   $as_echo_n "(cached) " >&6
3890 else
3891   if test -n "$ac_ct_CC"; then
3892   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3893 else
3894 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3895 for as_dir in $PATH
3896 do
3897   IFS=$as_save_IFS
3898   test -z "$as_dir" && as_dir=.
3899     for ac_exec_ext in '' $ac_executable_extensions; do
3900   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3901     ac_cv_prog_ac_ct_CC="$ac_prog"
3902     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3903     break 2
3904   fi
3905 done
3906   done
3907 IFS=$as_save_IFS
3908
3909 fi
3910 fi
3911 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3912 if test -n "$ac_ct_CC"; then
3913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3914 $as_echo "$ac_ct_CC" >&6; }
3915 else
3916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3917 $as_echo "no" >&6; }
3918 fi
3919
3920
3921   test -n "$ac_ct_CC" && break
3922 done
3923
3924   if test "x$ac_ct_CC" = x; then
3925     CC=""
3926   else
3927     case $cross_compiling:$ac_tool_warned in
3928 yes:)
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3930 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3931 ac_tool_warned=yes ;;
3932 esac
3933     CC=$ac_ct_CC
3934   fi
3935 fi
3936
3937
3938 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3939 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3940 as_fn_error $? "no acceptable C compiler found in \$PATH
3941 See \`config.log' for more details" "$LINENO" 5; }
3942
3943 # Provide some information about the compiler.
3944 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3945 set X $ac_compile
3946 ac_compiler=$2
3947 for ac_option in --version -v -V -qversion; do
3948   { { ac_try="$ac_compiler $ac_option >&5"
3949 case "(($ac_try" in
3950   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3951   *) ac_try_echo=$ac_try;;
3952 esac
3953 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3954 $as_echo "$ac_try_echo"; } >&5
3955   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3956   ac_status=$?
3957   if test -s conftest.err; then
3958     sed '10a\
3959 ... rest of stderr output deleted ...
3960          10q' conftest.err >conftest.er1
3961     cat conftest.er1 >&5
3962   fi
3963   rm -f conftest.er1 conftest.err
3964   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3965   test $ac_status = 0; }
3966 done
3967
3968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3969 /* end confdefs.h.  */
3970
3971 int
3972 main ()
3973 {
3974
3975   ;
3976   return 0;
3977 }
3978 _ACEOF
3979 ac_clean_files_save=$ac_clean_files
3980 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3981 # Try to create an executable without -o first, disregard a.out.
3982 # It will help us diagnose broken compilers, and finding out an intuition
3983 # of exeext.
3984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3985 $as_echo_n "checking whether the C compiler works... " >&6; }
3986 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3987
3988 # The possible output files:
3989 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3990
3991 ac_rmfiles=
3992 for ac_file in $ac_files
3993 do
3994   case $ac_file in
3995     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3996     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3997   esac
3998 done
3999 rm -f $ac_rmfiles
4000
4001 if { { ac_try="$ac_link_default"
4002 case "(($ac_try" in
4003   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4004   *) ac_try_echo=$ac_try;;
4005 esac
4006 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4007 $as_echo "$ac_try_echo"; } >&5
4008   (eval "$ac_link_default") 2>&5
4009   ac_status=$?
4010   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4011   test $ac_status = 0; }; then :
4012   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4013 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4014 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4015 # so that the user can short-circuit this test for compilers unknown to
4016 # Autoconf.
4017 for ac_file in $ac_files ''
4018 do
4019   test -f "$ac_file" || continue
4020   case $ac_file in
4021     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4022         ;;
4023     [ab].out )
4024         # We found the default executable, but exeext='' is most
4025         # certainly right.
4026         break;;
4027     *.* )
4028         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4029         then :; else
4030            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4031         fi
4032         # We set ac_cv_exeext here because the later test for it is not
4033         # safe: cross compilers may not add the suffix if given an `-o'
4034         # argument, so we may need to know it at that point already.
4035         # Even if this section looks crufty: it has the advantage of
4036         # actually working.
4037         break;;
4038     * )
4039         break;;
4040   esac
4041 done
4042 test "$ac_cv_exeext" = no && ac_cv_exeext=
4043
4044 else
4045   ac_file=''
4046 fi
4047 if test -z "$ac_file"; then :
4048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4049 $as_echo "no" >&6; }
4050 $as_echo "$as_me: failed program was:" >&5
4051 sed 's/^/| /' conftest.$ac_ext >&5
4052
4053 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4054 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4055 as_fn_error 77 "C compiler cannot create executables
4056 See \`config.log' for more details" "$LINENO" 5; }
4057 else
4058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4059 $as_echo "yes" >&6; }
4060 fi
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4062 $as_echo_n "checking for C compiler default output file name... " >&6; }
4063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4064 $as_echo "$ac_file" >&6; }
4065 ac_exeext=$ac_cv_exeext
4066
4067 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4068 ac_clean_files=$ac_clean_files_save
4069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4070 $as_echo_n "checking for suffix of executables... " >&6; }
4071 if { { ac_try="$ac_link"
4072 case "(($ac_try" in
4073   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4074   *) ac_try_echo=$ac_try;;
4075 esac
4076 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4077 $as_echo "$ac_try_echo"; } >&5
4078   (eval "$ac_link") 2>&5
4079   ac_status=$?
4080   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4081   test $ac_status = 0; }; then :
4082   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4083 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4084 # work properly (i.e., refer to `conftest.exe'), while it won't with
4085 # `rm'.
4086 for ac_file in conftest.exe conftest conftest.*; do
4087   test -f "$ac_file" || continue
4088   case $ac_file in
4089     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4090     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4091           break;;
4092     * ) break;;
4093   esac
4094 done
4095 else
4096   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4097 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4098 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4099 See \`config.log' for more details" "$LINENO" 5; }
4100 fi
4101 rm -f conftest conftest$ac_cv_exeext
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4103 $as_echo "$ac_cv_exeext" >&6; }
4104
4105 rm -f conftest.$ac_ext
4106 EXEEXT=$ac_cv_exeext
4107 ac_exeext=$EXEEXT
4108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4109 /* end confdefs.h.  */
4110 #include <stdio.h>
4111 int
4112 main ()
4113 {
4114 FILE *f = fopen ("conftest.out", "w");
4115  return ferror (f) || fclose (f) != 0;
4116
4117   ;
4118   return 0;
4119 }
4120 _ACEOF
4121 ac_clean_files="$ac_clean_files conftest.out"
4122 # Check that the compiler produces executables we can run.  If not, either
4123 # the compiler is broken, or we cross compile.
4124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4125 $as_echo_n "checking whether we are cross compiling... " >&6; }
4126 if test "$cross_compiling" != yes; then
4127   { { ac_try="$ac_link"
4128 case "(($ac_try" in
4129   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4130   *) ac_try_echo=$ac_try;;
4131 esac
4132 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4133 $as_echo "$ac_try_echo"; } >&5
4134   (eval "$ac_link") 2>&5
4135   ac_status=$?
4136   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4137   test $ac_status = 0; }
4138   if { ac_try='./conftest$ac_cv_exeext'
4139   { { case "(($ac_try" in
4140   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4141   *) ac_try_echo=$ac_try;;
4142 esac
4143 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4144 $as_echo "$ac_try_echo"; } >&5
4145   (eval "$ac_try") 2>&5
4146   ac_status=$?
4147   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4148   test $ac_status = 0; }; }; then
4149     cross_compiling=no
4150   else
4151     if test "$cross_compiling" = maybe; then
4152         cross_compiling=yes
4153     else
4154         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4155 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4156 as_fn_error $? "cannot run C compiled programs.
4157 If you meant to cross compile, use \`--host'.
4158 See \`config.log' for more details" "$LINENO" 5; }
4159     fi
4160   fi
4161 fi
4162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4163 $as_echo "$cross_compiling" >&6; }
4164
4165 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4166 ac_clean_files=$ac_clean_files_save
4167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4168 $as_echo_n "checking for suffix of object files... " >&6; }
4169 if ${ac_cv_objext+:} false; then :
4170   $as_echo_n "(cached) " >&6
4171 else
4172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4173 /* end confdefs.h.  */
4174
4175 int
4176 main ()
4177 {
4178
4179   ;
4180   return 0;
4181 }
4182 _ACEOF
4183 rm -f conftest.o conftest.obj
4184 if { { ac_try="$ac_compile"
4185 case "(($ac_try" in
4186   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4187   *) ac_try_echo=$ac_try;;
4188 esac
4189 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4190 $as_echo "$ac_try_echo"; } >&5
4191   (eval "$ac_compile") 2>&5
4192   ac_status=$?
4193   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4194   test $ac_status = 0; }; then :
4195   for ac_file in conftest.o conftest.obj conftest.*; do
4196   test -f "$ac_file" || continue;
4197   case $ac_file in
4198     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4199     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4200        break;;
4201   esac
4202 done
4203 else
4204   $as_echo "$as_me: failed program was:" >&5
4205 sed 's/^/| /' conftest.$ac_ext >&5
4206
4207 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4208 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4209 as_fn_error $? "cannot compute suffix of object files: cannot compile
4210 See \`config.log' for more details" "$LINENO" 5; }
4211 fi
4212 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4213 fi
4214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4215 $as_echo "$ac_cv_objext" >&6; }
4216 OBJEXT=$ac_cv_objext
4217 ac_objext=$OBJEXT
4218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4219 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4220 if ${ac_cv_c_compiler_gnu+:} false; then :
4221   $as_echo_n "(cached) " >&6
4222 else
4223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4224 /* end confdefs.h.  */
4225
4226 int
4227 main ()
4228 {
4229 #ifndef __GNUC__
4230        choke me
4231 #endif
4232
4233   ;
4234   return 0;
4235 }
4236 _ACEOF
4237 if ac_fn_c_try_compile "$LINENO"; then :
4238   ac_compiler_gnu=yes
4239 else
4240   ac_compiler_gnu=no
4241 fi
4242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4243 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4244
4245 fi
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4247 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4248 if test $ac_compiler_gnu = yes; then
4249   GCC=yes
4250 else
4251   GCC=
4252 fi
4253 ac_test_CFLAGS=${CFLAGS+set}
4254 ac_save_CFLAGS=$CFLAGS
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4256 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4257 if ${ac_cv_prog_cc_g+:} false; then :
4258   $as_echo_n "(cached) " >&6
4259 else
4260   ac_save_c_werror_flag=$ac_c_werror_flag
4261    ac_c_werror_flag=yes
4262    ac_cv_prog_cc_g=no
4263    CFLAGS="-g"
4264    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4265 /* end confdefs.h.  */
4266
4267 int
4268 main ()
4269 {
4270
4271   ;
4272   return 0;
4273 }
4274 _ACEOF
4275 if ac_fn_c_try_compile "$LINENO"; then :
4276   ac_cv_prog_cc_g=yes
4277 else
4278   CFLAGS=""
4279       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4280 /* end confdefs.h.  */
4281
4282 int
4283 main ()
4284 {
4285
4286   ;
4287   return 0;
4288 }
4289 _ACEOF
4290 if ac_fn_c_try_compile "$LINENO"; then :
4291
4292 else
4293   ac_c_werror_flag=$ac_save_c_werror_flag
4294          CFLAGS="-g"
4295          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4296 /* end confdefs.h.  */
4297
4298 int
4299 main ()
4300 {
4301
4302   ;
4303   return 0;
4304 }
4305 _ACEOF
4306 if ac_fn_c_try_compile "$LINENO"; then :
4307   ac_cv_prog_cc_g=yes
4308 fi
4309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4310 fi
4311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4312 fi
4313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4314    ac_c_werror_flag=$ac_save_c_werror_flag
4315 fi
4316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4317 $as_echo "$ac_cv_prog_cc_g" >&6; }
4318 if test "$ac_test_CFLAGS" = set; then
4319   CFLAGS=$ac_save_CFLAGS
4320 elif test $ac_cv_prog_cc_g = yes; then
4321   if test "$GCC" = yes; then
4322     CFLAGS="-g -O2"
4323   else
4324     CFLAGS="-g"
4325   fi
4326 else
4327   if test "$GCC" = yes; then
4328     CFLAGS="-O2"
4329   else
4330     CFLAGS=
4331   fi
4332 fi
4333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4334 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4335 if ${ac_cv_prog_cc_c89+:} false; then :
4336   $as_echo_n "(cached) " >&6
4337 else
4338   ac_cv_prog_cc_c89=no
4339 ac_save_CC=$CC
4340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4341 /* end confdefs.h.  */
4342 #include <stdarg.h>
4343 #include <stdio.h>
4344 struct stat;
4345 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4346 struct buf { int x; };
4347 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4348 static char *e (p, i)
4349      char **p;
4350      int i;
4351 {
4352   return p[i];
4353 }
4354 static char *f (char * (*g) (char **, int), char **p, ...)
4355 {
4356   char *s;
4357   va_list v;
4358   va_start (v,p);
4359   s = g (p, va_arg (v,int));
4360   va_end (v);
4361   return s;
4362 }
4363
4364 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4365    function prototypes and stuff, but not '\xHH' hex character constants.
4366    These don't provoke an error unfortunately, instead are silently treated
4367    as 'x'.  The following induces an error, until -std is added to get
4368    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4369    array size at least.  It's necessary to write '\x00'==0 to get something
4370    that's true only with -std.  */
4371 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4372
4373 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4374    inside strings and character constants.  */
4375 #define FOO(x) 'x'
4376 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4377
4378 int test (int i, double x);
4379 struct s1 {int (*f) (int a);};
4380 struct s2 {int (*f) (double a);};
4381 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4382 int argc;
4383 char **argv;
4384 int
4385 main ()
4386 {
4387 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4388   ;
4389   return 0;
4390 }
4391 _ACEOF
4392 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4393         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4394 do
4395   CC="$ac_save_CC $ac_arg"
4396   if ac_fn_c_try_compile "$LINENO"; then :
4397   ac_cv_prog_cc_c89=$ac_arg
4398 fi
4399 rm -f core conftest.err conftest.$ac_objext
4400   test "x$ac_cv_prog_cc_c89" != "xno" && break
4401 done
4402 rm -f conftest.$ac_ext
4403 CC=$ac_save_CC
4404
4405 fi
4406 # AC_CACHE_VAL
4407 case "x$ac_cv_prog_cc_c89" in
4408   x)
4409     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4410 $as_echo "none needed" >&6; } ;;
4411   xno)
4412     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4413 $as_echo "unsupported" >&6; } ;;
4414   *)
4415     CC="$CC $ac_cv_prog_cc_c89"
4416     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4417 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4418 esac
4419 if test "x$ac_cv_prog_cc_c89" != xno; then :
4420
4421 fi
4422
4423 ac_ext=c
4424 ac_cpp='$CPP $CPPFLAGS'
4425 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4426 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4427 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4428
4429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4430 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4431 if ${ac_cv_prog_cc_c99+:} false; then :
4432   $as_echo_n "(cached) " >&6
4433 else
4434   ac_cv_prog_cc_c99=no
4435 ac_save_CC=$CC
4436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4437 /* end confdefs.h.  */
4438 #include <stdarg.h>
4439 #include <stdbool.h>
4440 #include <stdlib.h>
4441 #include <wchar.h>
4442 #include <stdio.h>
4443
4444 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4445 #define debug(...) fprintf (stderr, __VA_ARGS__)
4446 #define showlist(...) puts (#__VA_ARGS__)
4447 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4448 static void
4449 test_varargs_macros (void)
4450 {
4451   int x = 1234;
4452   int y = 5678;
4453   debug ("Flag");
4454   debug ("X = %d\n", x);
4455   showlist (The first, second, and third items.);
4456   report (x>y, "x is %d but y is %d", x, y);
4457 }
4458
4459 // Check long long types.
4460 #define BIG64 18446744073709551615ull
4461 #define BIG32 4294967295ul
4462 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4463 #if !BIG_OK
4464   your preprocessor is broken;
4465 #endif
4466 #if BIG_OK
4467 #else
4468   your preprocessor is broken;
4469 #endif
4470 static long long int bignum = -9223372036854775807LL;
4471 static unsigned long long int ubignum = BIG64;
4472
4473 struct incomplete_array
4474 {
4475   int datasize;
4476   double data[];
4477 };
4478
4479 struct named_init {
4480   int number;
4481   const wchar_t *name;
4482   double average;
4483 };
4484
4485 typedef const char *ccp;
4486
4487 static inline int
4488 test_restrict (ccp restrict text)
4489 {
4490   // See if C++-style comments work.
4491   // Iterate through items via the restricted pointer.
4492   // Also check for declarations in for loops.
4493   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4494     continue;
4495   return 0;
4496 }
4497
4498 // Check varargs and va_copy.
4499 static void
4500 test_varargs (const char *format, ...)
4501 {
4502   va_list args;
4503   va_start (args, format);
4504   va_list args_copy;
4505   va_copy (args_copy, args);
4506
4507   const char *str;
4508   int number;
4509   float fnumber;
4510
4511   while (*format)
4512     {
4513       switch (*format++)
4514         {
4515         case 's': // string
4516           str = va_arg (args_copy, const char *);
4517           break;
4518         case 'd': // int
4519           number = va_arg (args_copy, int);
4520           break;
4521         case 'f': // float
4522           fnumber = va_arg (args_copy, double);
4523           break;
4524         default:
4525           break;
4526         }
4527     }
4528   va_end (args_copy);
4529   va_end (args);
4530 }
4531
4532 int
4533 main ()
4534 {
4535
4536   // Check bool.
4537   _Bool success = false;
4538
4539   // Check restrict.
4540   if (test_restrict ("String literal") == 0)
4541     success = true;
4542   char *restrict newvar = "Another string";
4543
4544   // Check varargs.
4545   test_varargs ("s, d' f .", "string", 65, 34.234);
4546   test_varargs_macros ();
4547
4548   // Check flexible array members.
4549   struct incomplete_array *ia =
4550     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4551   ia->datasize = 10;
4552   for (int i = 0; i < ia->datasize; ++i)
4553     ia->data[i] = i * 1.234;
4554
4555   // Check named initializers.
4556   struct named_init ni = {
4557     .number = 34,
4558     .name = L"Test wide string",
4559     .average = 543.34343,
4560   };
4561
4562   ni.number = 58;
4563
4564   int dynamic_array[ni.number];
4565   dynamic_array[ni.number - 1] = 543;
4566
4567   // work around unused variable warnings
4568   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4569           || dynamic_array[ni.number - 1] != 543);
4570
4571   ;
4572   return 0;
4573 }
4574 _ACEOF
4575 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4576 do
4577   CC="$ac_save_CC $ac_arg"
4578   if ac_fn_c_try_compile "$LINENO"; then :
4579   ac_cv_prog_cc_c99=$ac_arg
4580 fi
4581 rm -f core conftest.err conftest.$ac_objext
4582   test "x$ac_cv_prog_cc_c99" != "xno" && break
4583 done
4584 rm -f conftest.$ac_ext
4585 CC=$ac_save_CC
4586
4587 fi
4588 # AC_CACHE_VAL
4589 case "x$ac_cv_prog_cc_c99" in
4590   x)
4591     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4592 $as_echo "none needed" >&6; } ;;
4593   xno)
4594     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4595 $as_echo "unsupported" >&6; } ;;
4596   *)
4597     CC="$CC $ac_cv_prog_cc_c99"
4598     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4599 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4600 esac
4601 if test "x$ac_cv_prog_cc_c99" != xno; then :
4602
4603 fi
4604
4605
4606
4607 # Error out if the compiler does not support C99, as the codebase
4608 # relies on that.
4609 if test "$ac_cv_prog_cc_c99" = no; then
4610     as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4611 fi
4612
4613 ac_ext=cpp
4614 ac_cpp='$CXXCPP $CPPFLAGS'
4615 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4616 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4617 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4618 if test -z "$CXX"; then
4619   if test -n "$CCC"; then
4620     CXX=$CCC
4621   else
4622     if test -n "$ac_tool_prefix"; then
4623   for ac_prog in $pgac_cxx_list
4624   do
4625     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4626 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4628 $as_echo_n "checking for $ac_word... " >&6; }
4629 if ${ac_cv_prog_CXX+:} false; then :
4630   $as_echo_n "(cached) " >&6
4631 else
4632   if test -n "$CXX"; then
4633   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4634 else
4635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4636 for as_dir in $PATH
4637 do
4638   IFS=$as_save_IFS
4639   test -z "$as_dir" && as_dir=.
4640     for ac_exec_ext in '' $ac_executable_extensions; do
4641   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4642     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4643     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4644     break 2
4645   fi
4646 done
4647   done
4648 IFS=$as_save_IFS
4649
4650 fi
4651 fi
4652 CXX=$ac_cv_prog_CXX
4653 if test -n "$CXX"; then
4654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4655 $as_echo "$CXX" >&6; }
4656 else
4657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658 $as_echo "no" >&6; }
4659 fi
4660
4661
4662     test -n "$CXX" && break
4663   done
4664 fi
4665 if test -z "$CXX"; then
4666   ac_ct_CXX=$CXX
4667   for ac_prog in $pgac_cxx_list
4668 do
4669   # Extract the first word of "$ac_prog", so it can be a program name with args.
4670 set dummy $ac_prog; ac_word=$2
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4672 $as_echo_n "checking for $ac_word... " >&6; }
4673 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4674   $as_echo_n "(cached) " >&6
4675 else
4676   if test -n "$ac_ct_CXX"; then
4677   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4678 else
4679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4680 for as_dir in $PATH
4681 do
4682   IFS=$as_save_IFS
4683   test -z "$as_dir" && as_dir=.
4684     for ac_exec_ext in '' $ac_executable_extensions; do
4685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4686     ac_cv_prog_ac_ct_CXX="$ac_prog"
4687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4688     break 2
4689   fi
4690 done
4691   done
4692 IFS=$as_save_IFS
4693
4694 fi
4695 fi
4696 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4697 if test -n "$ac_ct_CXX"; then
4698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4699 $as_echo "$ac_ct_CXX" >&6; }
4700 else
4701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702 $as_echo "no" >&6; }
4703 fi
4704
4705
4706   test -n "$ac_ct_CXX" && break
4707 done
4708
4709   if test "x$ac_ct_CXX" = x; then
4710     CXX="g++"
4711   else
4712     case $cross_compiling:$ac_tool_warned in
4713 yes:)
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4715 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4716 ac_tool_warned=yes ;;
4717 esac
4718     CXX=$ac_ct_CXX
4719   fi
4720 fi
4721
4722   fi
4723 fi
4724 # Provide some information about the compiler.
4725 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4726 set X $ac_compile
4727 ac_compiler=$2
4728 for ac_option in --version -v -V -qversion; do
4729   { { ac_try="$ac_compiler $ac_option >&5"
4730 case "(($ac_try" in
4731   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4732   *) ac_try_echo=$ac_try;;
4733 esac
4734 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4735 $as_echo "$ac_try_echo"; } >&5
4736   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4737   ac_status=$?
4738   if test -s conftest.err; then
4739     sed '10a\
4740 ... rest of stderr output deleted ...
4741          10q' conftest.err >conftest.er1
4742     cat conftest.er1 >&5
4743   fi
4744   rm -f conftest.er1 conftest.err
4745   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4746   test $ac_status = 0; }
4747 done
4748
4749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4750 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4751 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4752   $as_echo_n "(cached) " >&6
4753 else
4754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4755 /* end confdefs.h.  */
4756
4757 int
4758 main ()
4759 {
4760 #ifndef __GNUC__
4761        choke me
4762 #endif
4763
4764   ;
4765   return 0;
4766 }
4767 _ACEOF
4768 if ac_fn_cxx_try_compile "$LINENO"; then :
4769   ac_compiler_gnu=yes
4770 else
4771   ac_compiler_gnu=no
4772 fi
4773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4774 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4775
4776 fi
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4778 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4779 if test $ac_compiler_gnu = yes; then
4780   GXX=yes
4781 else
4782   GXX=
4783 fi
4784 ac_test_CXXFLAGS=${CXXFLAGS+set}
4785 ac_save_CXXFLAGS=$CXXFLAGS
4786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4787 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4788 if ${ac_cv_prog_cxx_g+:} false; then :
4789   $as_echo_n "(cached) " >&6
4790 else
4791   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4792    ac_cxx_werror_flag=yes
4793    ac_cv_prog_cxx_g=no
4794    CXXFLAGS="-g"
4795    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4796 /* end confdefs.h.  */
4797
4798 int
4799 main ()
4800 {
4801
4802   ;
4803   return 0;
4804 }
4805 _ACEOF
4806 if ac_fn_cxx_try_compile "$LINENO"; then :
4807   ac_cv_prog_cxx_g=yes
4808 else
4809   CXXFLAGS=""
4810       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4811 /* end confdefs.h.  */
4812
4813 int
4814 main ()
4815 {
4816
4817   ;
4818   return 0;
4819 }
4820 _ACEOF
4821 if ac_fn_cxx_try_compile "$LINENO"; then :
4822
4823 else
4824   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4825          CXXFLAGS="-g"
4826          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4827 /* end confdefs.h.  */
4828
4829 int
4830 main ()
4831 {
4832
4833   ;
4834   return 0;
4835 }
4836 _ACEOF
4837 if ac_fn_cxx_try_compile "$LINENO"; then :
4838   ac_cv_prog_cxx_g=yes
4839 fi
4840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4841 fi
4842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4843 fi
4844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4845    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4846 fi
4847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4848 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4849 if test "$ac_test_CXXFLAGS" = set; then
4850   CXXFLAGS=$ac_save_CXXFLAGS
4851 elif test $ac_cv_prog_cxx_g = yes; then
4852   if test "$GXX" = yes; then
4853     CXXFLAGS="-g -O2"
4854   else
4855     CXXFLAGS="-g"
4856   fi
4857 else
4858   if test "$GXX" = yes; then
4859     CXXFLAGS="-O2"
4860   else
4861     CXXFLAGS=
4862   fi
4863 fi
4864 ac_ext=c
4865 ac_cpp='$CPP $CPPFLAGS'
4866 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4867 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4868 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4869
4870
4871 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4872 # but has idiosyncrasies of its own.  We assume icc will define
4873 # __INTEL_COMPILER regardless of CFLAGS.
4874
4875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4876 /* end confdefs.h.  */
4877
4878 int
4879 main ()
4880 {
4881 #ifndef __INTEL_COMPILER
4882 choke me
4883 #endif
4884   ;
4885   return 0;
4886 }
4887 _ACEOF
4888 if ac_fn_c_try_compile "$LINENO"; then :
4889   ICC=yes
4890 else
4891   ICC=no
4892 fi
4893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4894
4895 # Check if it's Sun Studio compiler. We assume that
4896 # __SUNPRO_C will be defined for Sun Studio compilers
4897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4898 /* end confdefs.h.  */
4899
4900 int
4901 main ()
4902 {
4903 #ifndef __SUNPRO_C
4904 choke me
4905 #endif
4906   ;
4907   return 0;
4908 }
4909 _ACEOF
4910 if ac_fn_c_try_compile "$LINENO"; then :
4911   SUN_STUDIO_CC=yes
4912 else
4913   SUN_STUDIO_CC=no
4914 fi
4915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4916
4917
4918
4919
4920 #
4921 # LLVM
4922 #
4923 # Checked early because subsequent tests depend on it.
4924
4925
4926
4927 # Check whether --with-llvm was given.
4928 if test "${with_llvm+set}" = set; then :
4929   withval=$with_llvm;
4930   case $withval in
4931     yes)
4932
4933 $as_echo "#define USE_LLVM 1" >>confdefs.h
4934
4935       ;;
4936     no)
4937       :
4938       ;;
4939     *)
4940       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4941       ;;
4942   esac
4943
4944 else
4945   with_llvm=no
4946
4947 fi
4948
4949
4950
4951 if test "$with_llvm" = yes ; then
4952    for ac_prog in gawk mawk nawk awk
4953 do
4954   # Extract the first word of "$ac_prog", so it can be a program name with args.
4955 set dummy $ac_prog; ac_word=$2
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4957 $as_echo_n "checking for $ac_word... " >&6; }
4958 if ${ac_cv_prog_AWK+:} false; then :
4959   $as_echo_n "(cached) " >&6
4960 else
4961   if test -n "$AWK"; then
4962   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4963 else
4964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4965 for as_dir in $PATH
4966 do
4967   IFS=$as_save_IFS
4968   test -z "$as_dir" && as_dir=.
4969     for ac_exec_ext in '' $ac_executable_extensions; do
4970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4971     ac_cv_prog_AWK="$ac_prog"
4972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4973     break 2
4974   fi
4975 done
4976   done
4977 IFS=$as_save_IFS
4978
4979 fi
4980 fi
4981 AWK=$ac_cv_prog_AWK
4982 if test -n "$AWK"; then
4983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4984 $as_echo "$AWK" >&6; }
4985 else
4986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4987 $as_echo "no" >&6; }
4988 fi
4989
4990
4991   test -n "$AWK" && break
4992 done
4993
4994
4995
4996
4997
4998   if test -z "$LLVM_CONFIG"; then
4999   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
5000 do
5001   # Extract the first word of "$ac_prog", so it can be a program name with args.
5002 set dummy $ac_prog; ac_word=$2
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004 $as_echo_n "checking for $ac_word... " >&6; }
5005 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5006   $as_echo_n "(cached) " >&6
5007 else
5008   case $LLVM_CONFIG in
5009   [\\/]* | ?:[\\/]*)
5010   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5011   ;;
5012   *)
5013   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5014 for as_dir in $PATH
5015 do
5016   IFS=$as_save_IFS
5017   test -z "$as_dir" && as_dir=.
5018     for ac_exec_ext in '' $ac_executable_extensions; do
5019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5020     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5022     break 2
5023   fi
5024 done
5025   done
5026 IFS=$as_save_IFS
5027
5028   ;;
5029 esac
5030 fi
5031 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5032 if test -n "$LLVM_CONFIG"; then
5033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5034 $as_echo "$LLVM_CONFIG" >&6; }
5035 else
5036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5037 $as_echo "no" >&6; }
5038 fi
5039
5040
5041   test -n "$LLVM_CONFIG" && break
5042 done
5043
5044 else
5045   # Report the value of LLVM_CONFIG in configure's output in all cases.
5046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5047 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5049 $as_echo "$LLVM_CONFIG" >&6; }
5050 fi
5051
5052
5053   # no point continuing if llvm wasn't found
5054   if test -z "$LLVM_CONFIG"; then
5055     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5056   fi
5057   # check if detected $LLVM_CONFIG is executable
5058   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5059   if test "x$pgac_llvm_version" = "xno"; then
5060     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5061   fi
5062   # and whether the version is supported
5063   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5064     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5065   fi
5066
5067   # need clang to create some bitcode files
5068
5069   if test -z "$CLANG"; then
5070   for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5071 do
5072   # Extract the first word of "$ac_prog", so it can be a program name with args.
5073 set dummy $ac_prog; ac_word=$2
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5075 $as_echo_n "checking for $ac_word... " >&6; }
5076 if ${ac_cv_path_CLANG+:} false; then :
5077   $as_echo_n "(cached) " >&6
5078 else
5079   case $CLANG in
5080   [\\/]* | ?:[\\/]*)
5081   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5082   ;;
5083   *)
5084   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085 for as_dir in $PATH
5086 do
5087   IFS=$as_save_IFS
5088   test -z "$as_dir" && as_dir=.
5089     for ac_exec_ext in '' $ac_executable_extensions; do
5090   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5091     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5093     break 2
5094   fi
5095 done
5096   done
5097 IFS=$as_save_IFS
5098
5099   ;;
5100 esac
5101 fi
5102 CLANG=$ac_cv_path_CLANG
5103 if test -n "$CLANG"; then
5104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5105 $as_echo "$CLANG" >&6; }
5106 else
5107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5108 $as_echo "no" >&6; }
5109 fi
5110
5111
5112   test -n "$CLANG" && break
5113 done
5114
5115 else
5116   # Report the value of CLANG in configure's output in all cases.
5117   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5118 $as_echo_n "checking for CLANG... " >&6; }
5119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5120 $as_echo "$CLANG" >&6; }
5121 fi
5122
5123   if test -z "$CLANG"; then
5124     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5125   fi
5126   # make sure clang is executable
5127   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5128     as_fn_error $? "$CLANG does not work" "$LINENO" 5
5129   fi
5130   # Could check clang version, but it doesn't seem that
5131   # important. Systems with a new enough LLVM version are usually
5132   # going to have a decent clang version too. It's also not entirely
5133   # clear what the minimum version is.
5134
5135   # Collect compiler flags necessary to build the LLVM dependent
5136   # shared library.
5137   for pgac_option in `$LLVM_CONFIG --cppflags`; do
5138     case $pgac_option in
5139       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5140     esac
5141   done
5142
5143   for pgac_option in `$LLVM_CONFIG --ldflags`; do
5144     case $pgac_option in
5145       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5146     esac
5147   done
5148
5149   # ABI influencing options, standard influencing options
5150   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5151     case $pgac_option in
5152       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5153       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5154     esac
5155   done
5156
5157   # Look for components we're interested in, collect necessary
5158   # libs. As some components are optional, we can't just list all of
5159   # them as it'd raise an error.
5160   pgac_components='';
5161   for pgac_component in `$LLVM_CONFIG --components`; do
5162     case $pgac_component in
5163       engine) pgac_components="$pgac_components $pgac_component";;
5164       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5165       orcjit) pgac_components="$pgac_components $pgac_component";;
5166       passes) pgac_components="$pgac_components $pgac_component";;
5167       perfjitevents) pgac_components="$pgac_components $pgac_component";;
5168     esac
5169   done;
5170
5171   # And then get the libraries that need to be linked in for the
5172   # selected components.  They're large libraries, we only want to
5173   # link them into the LLVM using shared library.
5174   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5175     case $pgac_option in
5176       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5177     esac
5178   done
5179
5180   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5181
5182   # Check which functionality is present
5183   SAVE_CPPFLAGS="$CPPFLAGS"
5184   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
5185   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
5186 "
5187 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
5188   ac_have_decl=1
5189 else
5190   ac_have_decl=0
5191 fi
5192
5193 cat >>confdefs.h <<_ACEOF
5194 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
5195 _ACEOF
5196
5197   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
5198 "
5199 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
5200   ac_have_decl=1
5201 else
5202   ac_have_decl=0
5203 fi
5204
5205 cat >>confdefs.h <<_ACEOF
5206 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
5207 _ACEOF
5208 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
5209 "
5210 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
5211   ac_have_decl=1
5212 else
5213   ac_have_decl=0
5214 fi
5215
5216 cat >>confdefs.h <<_ACEOF
5217 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
5218 _ACEOF
5219
5220   ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
5221 "
5222 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
5223   ac_have_decl=1
5224 else
5225   ac_have_decl=0
5226 fi
5227
5228 cat >>confdefs.h <<_ACEOF
5229 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
5230 _ACEOF
5231 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
5232 "
5233 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
5234   ac_have_decl=1
5235 else
5236   ac_have_decl=0
5237 fi
5238
5239 cat >>confdefs.h <<_ACEOF
5240 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
5241 _ACEOF
5242
5243   CPPFLAGS="$SAVE_CPPFLAGS"
5244
5245   # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5246
5247
5248
5249
5250
5251
5252
5253 fi
5254
5255
5256 unset CFLAGS
5257 unset CXXFLAGS
5258
5259 #
5260 # Read the template
5261 #
5262 . "$srcdir/src/template/$template" || exit
5263
5264 # C[XX]FLAGS are selected so:
5265 # If the user specifies something in the environment, that is used.
5266 # else:  If the template file set something, that is used.
5267 # else:  If coverage was enabled, don't set anything.
5268 # else:  If the compiler is GCC, then we use -O2.
5269 # else:  If the compiler is something else, then we use -O, unless debugging.
5270
5271 if test "$ac_env_CFLAGS_set" = set; then
5272   CFLAGS=$ac_env_CFLAGS_value
5273 elif test "${CFLAGS+set}" = set; then
5274   : # (keep what template set)
5275 elif test "$enable_coverage" = yes; then
5276   : # no optimization by default
5277 elif test "$GCC" = yes; then
5278   CFLAGS="-O2"
5279 else
5280   # if the user selected debug mode, don't use -O
5281   if test "$enable_debug" != yes; then
5282     CFLAGS="-O"
5283   fi
5284 fi
5285
5286 if test "$ac_env_CXXFLAGS_set" = set; then
5287   CXXFLAGS=$ac_env_CXXFLAGS_value
5288 elif test "${CXXFLAGS+set}" = set; then
5289   : # (keep what template set)
5290 elif test "$enable_coverage" = yes; then
5291   : # no optimization by default
5292 elif test "$GCC" = yes; then
5293   CXXFLAGS="-O2"
5294 else
5295   # if the user selected debug mode, don't use -O
5296   if test "$enable_debug" != yes; then
5297     CXXFLAGS="-O"
5298   fi
5299 fi
5300
5301 # When generating bitcode (for inlining) we always want to use -O2
5302 # even when --enable-debug is specified. The bitcode it's not going to
5303 # be used for line-by-line debugging, and JIT inlining doesn't work
5304 # without at least -O1 (otherwise clang will emit 'noinline'
5305 # attributes everywhere), which is bad for testing.  Still allow the
5306 # environment to override if done explicitly.
5307 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5308   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5309 else
5310   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5311 fi
5312 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5313   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5314 else
5315   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5316 fi
5317
5318 # C[XX]FLAGS we determined above will be added back at the end
5319 user_CFLAGS=$CFLAGS
5320 CFLAGS=""
5321 user_CXXFLAGS=$CXXFLAGS
5322 CXXFLAGS=""
5323 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5324 BITCODE_CFLAGS=""
5325 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5326 BITCODE_CXXFLAGS=""
5327
5328 # set CFLAGS_VECTOR from the environment, if available
5329 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5330   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5331 fi
5332
5333 # Some versions of GCC support some additional useful warning flags.
5334 # Check whether they are supported, and add them to CFLAGS if so.
5335 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5336 # but has its own.  Also check other compiler-specific flags here.
5337
5338 if test "$GCC" = yes -a "$ICC" = no; then
5339   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5340   CXXFLAGS="-Wall -Wpointer-arith"
5341   # These work in some but not all gcc versions
5342
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5344 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5345 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5346   $as_echo_n "(cached) " >&6
5347 else
5348   pgac_save_CFLAGS=$CFLAGS
5349 pgac_save_CC=$CC
5350 CC=${CC}
5351 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5352 ac_save_c_werror_flag=$ac_c_werror_flag
5353 ac_c_werror_flag=yes
5354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5355 /* end confdefs.h.  */
5356
5357 int
5358 main ()
5359 {
5360
5361   ;
5362   return 0;
5363 }
5364 _ACEOF
5365 if ac_fn_c_try_compile "$LINENO"; then :
5366   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5367 else
5368   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5369 fi
5370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5371 ac_c_werror_flag=$ac_save_c_werror_flag
5372 CFLAGS="$pgac_save_CFLAGS"
5373 CC="$pgac_save_CC"
5374 fi
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5376 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5377 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5378   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5379 fi
5380
5381
5382   # -Wdeclaration-after-statement isn't applicable for C++
5383   # Really don't want VLAs to be used in our dialect of C
5384
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5386 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5387 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5388   $as_echo_n "(cached) " >&6
5389 else
5390   pgac_save_CFLAGS=$CFLAGS
5391 pgac_save_CC=$CC
5392 CC=${CC}
5393 CFLAGS="${CFLAGS} -Werror=vla"
5394 ac_save_c_werror_flag=$ac_c_werror_flag
5395 ac_c_werror_flag=yes
5396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5397 /* end confdefs.h.  */
5398
5399 int
5400 main ()
5401 {
5402
5403   ;
5404   return 0;
5405 }
5406 _ACEOF
5407 if ac_fn_c_try_compile "$LINENO"; then :
5408   pgac_cv_prog_CC_cflags__Werror_vla=yes
5409 else
5410   pgac_cv_prog_CC_cflags__Werror_vla=no
5411 fi
5412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5413 ac_c_werror_flag=$ac_save_c_werror_flag
5414 CFLAGS="$pgac_save_CFLAGS"
5415 CC="$pgac_save_CC"
5416 fi
5417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5418 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5419 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5420   CFLAGS="${CFLAGS} -Werror=vla"
5421 fi
5422
5423
5424   # -Wvla is not applicable for C++
5425
5426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5427 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5428 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5429   $as_echo_n "(cached) " >&6
5430 else
5431   pgac_save_CFLAGS=$CFLAGS
5432 pgac_save_CC=$CC
5433 CC=${CC}
5434 CFLAGS="${CFLAGS} -Wendif-labels"
5435 ac_save_c_werror_flag=$ac_c_werror_flag
5436 ac_c_werror_flag=yes
5437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5438 /* end confdefs.h.  */
5439
5440 int
5441 main ()
5442 {
5443
5444   ;
5445   return 0;
5446 }
5447 _ACEOF
5448 if ac_fn_c_try_compile "$LINENO"; then :
5449   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5450 else
5451   pgac_cv_prog_CC_cflags__Wendif_labels=no
5452 fi
5453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5454 ac_c_werror_flag=$ac_save_c_werror_flag
5455 CFLAGS="$pgac_save_CFLAGS"
5456 CC="$pgac_save_CC"
5457 fi
5458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5459 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5460 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5461   CFLAGS="${CFLAGS} -Wendif-labels"
5462 fi
5463
5464
5465   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5466 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5467 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5468   $as_echo_n "(cached) " >&6
5469 else
5470   pgac_save_CXXFLAGS=$CXXFLAGS
5471 pgac_save_CXX=$CXX
5472 CXX=${CXX}
5473 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5474 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5475 ac_cxx_werror_flag=yes
5476 ac_ext=cpp
5477 ac_cpp='$CXXCPP $CPPFLAGS'
5478 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5479 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5480 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5481
5482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5483 /* end confdefs.h.  */
5484
5485 int
5486 main ()
5487 {
5488
5489   ;
5490   return 0;
5491 }
5492 _ACEOF
5493 if ac_fn_cxx_try_compile "$LINENO"; then :
5494   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5495 else
5496   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5497 fi
5498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5499 ac_ext=c
5500 ac_cpp='$CPP $CPPFLAGS'
5501 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5502 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5503 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5504
5505 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5506 CXXFLAGS="$pgac_save_CXXFLAGS"
5507 CXX="$pgac_save_CXX"
5508 fi
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5510 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5511 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5512   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5513 fi
5514
5515
5516
5517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5518 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5519 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5520   $as_echo_n "(cached) " >&6
5521 else
5522   pgac_save_CFLAGS=$CFLAGS
5523 pgac_save_CC=$CC
5524 CC=${CC}
5525 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5526 ac_save_c_werror_flag=$ac_c_werror_flag
5527 ac_c_werror_flag=yes
5528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5529 /* end confdefs.h.  */
5530
5531 int
5532 main ()
5533 {
5534
5535   ;
5536   return 0;
5537 }
5538 _ACEOF
5539 if ac_fn_c_try_compile "$LINENO"; then :
5540   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5541 else
5542   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5543 fi
5544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5545 ac_c_werror_flag=$ac_save_c_werror_flag
5546 CFLAGS="$pgac_save_CFLAGS"
5547 CC="$pgac_save_CC"
5548 fi
5549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5550 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5551 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5552   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5553 fi
5554
5555
5556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5557 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5558 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5559   $as_echo_n "(cached) " >&6
5560 else
5561   pgac_save_CXXFLAGS=$CXXFLAGS
5562 pgac_save_CXX=$CXX
5563 CXX=${CXX}
5564 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5565 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5566 ac_cxx_werror_flag=yes
5567 ac_ext=cpp
5568 ac_cpp='$CXXCPP $CPPFLAGS'
5569 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5570 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5571 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5572
5573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5574 /* end confdefs.h.  */
5575
5576 int
5577 main ()
5578 {
5579
5580   ;
5581   return 0;
5582 }
5583 _ACEOF
5584 if ac_fn_cxx_try_compile "$LINENO"; then :
5585   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5586 else
5587   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5588 fi
5589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5590 ac_ext=c
5591 ac_cpp='$CPP $CPPFLAGS'
5592 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5593 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5594 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5595
5596 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5597 CXXFLAGS="$pgac_save_CXXFLAGS"
5598 CXX="$pgac_save_CXX"
5599 fi
5600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5601 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5602 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5603   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5604 fi
5605
5606
5607   # This was included in -Wall/-Wformat in older GCC versions
5608
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5610 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5611 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5612   $as_echo_n "(cached) " >&6
5613 else
5614   pgac_save_CFLAGS=$CFLAGS
5615 pgac_save_CC=$CC
5616 CC=${CC}
5617 CFLAGS="${CFLAGS} -Wformat-security"
5618 ac_save_c_werror_flag=$ac_c_werror_flag
5619 ac_c_werror_flag=yes
5620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5621 /* end confdefs.h.  */
5622
5623 int
5624 main ()
5625 {
5626
5627   ;
5628   return 0;
5629 }
5630 _ACEOF
5631 if ac_fn_c_try_compile "$LINENO"; then :
5632   pgac_cv_prog_CC_cflags__Wformat_security=yes
5633 else
5634   pgac_cv_prog_CC_cflags__Wformat_security=no
5635 fi
5636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5637 ac_c_werror_flag=$ac_save_c_werror_flag
5638 CFLAGS="$pgac_save_CFLAGS"
5639 CC="$pgac_save_CC"
5640 fi
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5642 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5643 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5644   CFLAGS="${CFLAGS} -Wformat-security"
5645 fi
5646
5647
5648   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5649 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5650 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5651   $as_echo_n "(cached) " >&6
5652 else
5653   pgac_save_CXXFLAGS=$CXXFLAGS
5654 pgac_save_CXX=$CXX
5655 CXX=${CXX}
5656 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5657 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5658 ac_cxx_werror_flag=yes
5659 ac_ext=cpp
5660 ac_cpp='$CXXCPP $CPPFLAGS'
5661 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5662 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5663 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5664
5665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5666 /* end confdefs.h.  */
5667
5668 int
5669 main ()
5670 {
5671
5672   ;
5673   return 0;
5674 }
5675 _ACEOF
5676 if ac_fn_cxx_try_compile "$LINENO"; then :
5677   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5678 else
5679   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5680 fi
5681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5682 ac_ext=c
5683 ac_cpp='$CPP $CPPFLAGS'
5684 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5685 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5686 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5687
5688 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5689 CXXFLAGS="$pgac_save_CXXFLAGS"
5690 CXX="$pgac_save_CXX"
5691 fi
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5693 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5694 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5695   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5696 fi
5697
5698
5699   # Disable strict-aliasing rules; needed for gcc 3.3+
5700
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5702 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5703 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5704   $as_echo_n "(cached) " >&6
5705 else
5706   pgac_save_CFLAGS=$CFLAGS
5707 pgac_save_CC=$CC
5708 CC=${CC}
5709 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5710 ac_save_c_werror_flag=$ac_c_werror_flag
5711 ac_c_werror_flag=yes
5712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5713 /* end confdefs.h.  */
5714
5715 int
5716 main ()
5717 {
5718
5719   ;
5720   return 0;
5721 }
5722 _ACEOF
5723 if ac_fn_c_try_compile "$LINENO"; then :
5724   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5725 else
5726   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5727 fi
5728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5729 ac_c_werror_flag=$ac_save_c_werror_flag
5730 CFLAGS="$pgac_save_CFLAGS"
5731 CC="$pgac_save_CC"
5732 fi
5733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5734 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5735 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5736   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5737 fi
5738
5739
5740   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5741 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5742 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5743   $as_echo_n "(cached) " >&6
5744 else
5745   pgac_save_CXXFLAGS=$CXXFLAGS
5746 pgac_save_CXX=$CXX
5747 CXX=${CXX}
5748 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5749 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5750 ac_cxx_werror_flag=yes
5751 ac_ext=cpp
5752 ac_cpp='$CXXCPP $CPPFLAGS'
5753 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5754 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5755 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5756
5757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5758 /* end confdefs.h.  */
5759
5760 int
5761 main ()
5762 {
5763
5764   ;
5765   return 0;
5766 }
5767 _ACEOF
5768 if ac_fn_cxx_try_compile "$LINENO"; then :
5769   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5770 else
5771   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5772 fi
5773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5774 ac_ext=c
5775 ac_cpp='$CPP $CPPFLAGS'
5776 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5777 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5778 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5779
5780 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5781 CXXFLAGS="$pgac_save_CXXFLAGS"
5782 CXX="$pgac_save_CXX"
5783 fi
5784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5785 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5786 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5787   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5788 fi
5789
5790
5791   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5792
5793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5794 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5795 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5796   $as_echo_n "(cached) " >&6
5797 else
5798   pgac_save_CFLAGS=$CFLAGS
5799 pgac_save_CC=$CC
5800 CC=${CC}
5801 CFLAGS="${CFLAGS} -fwrapv"
5802 ac_save_c_werror_flag=$ac_c_werror_flag
5803 ac_c_werror_flag=yes
5804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5805 /* end confdefs.h.  */
5806
5807 int
5808 main ()
5809 {
5810
5811   ;
5812   return 0;
5813 }
5814 _ACEOF
5815 if ac_fn_c_try_compile "$LINENO"; then :
5816   pgac_cv_prog_CC_cflags__fwrapv=yes
5817 else
5818   pgac_cv_prog_CC_cflags__fwrapv=no
5819 fi
5820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5821 ac_c_werror_flag=$ac_save_c_werror_flag
5822 CFLAGS="$pgac_save_CFLAGS"
5823 CC="$pgac_save_CC"
5824 fi
5825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5826 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5827 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5828   CFLAGS="${CFLAGS} -fwrapv"
5829 fi
5830
5831
5832   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5833 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5834 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5835   $as_echo_n "(cached) " >&6
5836 else
5837   pgac_save_CXXFLAGS=$CXXFLAGS
5838 pgac_save_CXX=$CXX
5839 CXX=${CXX}
5840 CXXFLAGS="${CXXFLAGS} -fwrapv"
5841 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5842 ac_cxx_werror_flag=yes
5843 ac_ext=cpp
5844 ac_cpp='$CXXCPP $CPPFLAGS'
5845 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5846 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5847 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5848
5849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5850 /* end confdefs.h.  */
5851
5852 int
5853 main ()
5854 {
5855
5856   ;
5857   return 0;
5858 }
5859 _ACEOF
5860 if ac_fn_cxx_try_compile "$LINENO"; then :
5861   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5862 else
5863   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5864 fi
5865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5866 ac_ext=c
5867 ac_cpp='$CPP $CPPFLAGS'
5868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5871
5872 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5873 CXXFLAGS="$pgac_save_CXXFLAGS"
5874 CXX="$pgac_save_CXX"
5875 fi
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5877 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5878 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5879   CXXFLAGS="${CXXFLAGS} -fwrapv"
5880 fi
5881
5882
5883   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5884
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5886 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5887 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5888   $as_echo_n "(cached) " >&6
5889 else
5890   pgac_save_CFLAGS=$CFLAGS
5891 pgac_save_CC=$CC
5892 CC=${CC}
5893 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5894 ac_save_c_werror_flag=$ac_c_werror_flag
5895 ac_c_werror_flag=yes
5896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5897 /* end confdefs.h.  */
5898
5899 int
5900 main ()
5901 {
5902
5903   ;
5904   return 0;
5905 }
5906 _ACEOF
5907 if ac_fn_c_try_compile "$LINENO"; then :
5908   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5909 else
5910   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5911 fi
5912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5913 ac_c_werror_flag=$ac_save_c_werror_flag
5914 CFLAGS="$pgac_save_CFLAGS"
5915 CC="$pgac_save_CC"
5916 fi
5917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5918 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5919 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5920   CFLAGS="${CFLAGS} -fexcess-precision=standard"
5921 fi
5922
5923
5924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5925 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5926 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5927   $as_echo_n "(cached) " >&6
5928 else
5929   pgac_save_CXXFLAGS=$CXXFLAGS
5930 pgac_save_CXX=$CXX
5931 CXX=${CXX}
5932 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5933 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5934 ac_cxx_werror_flag=yes
5935 ac_ext=cpp
5936 ac_cpp='$CXXCPP $CPPFLAGS'
5937 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5938 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5939 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5940
5941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5942 /* end confdefs.h.  */
5943
5944 int
5945 main ()
5946 {
5947
5948   ;
5949   return 0;
5950 }
5951 _ACEOF
5952 if ac_fn_cxx_try_compile "$LINENO"; then :
5953   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5954 else
5955   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5956 fi
5957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5958 ac_ext=c
5959 ac_cpp='$CPP $CPPFLAGS'
5960 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5961 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5962 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5963
5964 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5965 CXXFLAGS="$pgac_save_CXXFLAGS"
5966 CXX="$pgac_save_CXX"
5967 fi
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5969 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5970 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5971   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5972 fi
5973
5974
5975   # Optimization flags for specific files that benefit from vectorization
5976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5977 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5978 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5979   $as_echo_n "(cached) " >&6
5980 else
5981   pgac_save_CFLAGS=$CFLAGS
5982 pgac_save_CC=$CC
5983 CC=${CC}
5984 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5985 ac_save_c_werror_flag=$ac_c_werror_flag
5986 ac_c_werror_flag=yes
5987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5988 /* end confdefs.h.  */
5989
5990 int
5991 main ()
5992 {
5993
5994   ;
5995   return 0;
5996 }
5997 _ACEOF
5998 if ac_fn_c_try_compile "$LINENO"; then :
5999   pgac_cv_prog_CC_cflags__funroll_loops=yes
6000 else
6001   pgac_cv_prog_CC_cflags__funroll_loops=no
6002 fi
6003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6004 ac_c_werror_flag=$ac_save_c_werror_flag
6005 CFLAGS="$pgac_save_CFLAGS"
6006 CC="$pgac_save_CC"
6007 fi
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6009 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6010 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6011   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
6012 fi
6013
6014
6015   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
6016 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
6017 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6018   $as_echo_n "(cached) " >&6
6019 else
6020   pgac_save_CFLAGS=$CFLAGS
6021 pgac_save_CC=$CC
6022 CC=${CC}
6023 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
6024 ac_save_c_werror_flag=$ac_c_werror_flag
6025 ac_c_werror_flag=yes
6026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6027 /* end confdefs.h.  */
6028
6029 int
6030 main ()
6031 {
6032
6033   ;
6034   return 0;
6035 }
6036 _ACEOF
6037 if ac_fn_c_try_compile "$LINENO"; then :
6038   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6039 else
6040   pgac_cv_prog_CC_cflags__ftree_vectorize=no
6041 fi
6042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6043 ac_c_werror_flag=$ac_save_c_werror_flag
6044 CFLAGS="$pgac_save_CFLAGS"
6045 CC="$pgac_save_CC"
6046 fi
6047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6048 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6049 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6050   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
6051 fi
6052
6053
6054   # We want to suppress clang's unhelpful unused-command-line-argument warnings
6055   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
6056   # test for the positive form and if that works, add the negative form
6057   NOT_THE_CFLAGS=""
6058   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6059 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6060 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6061   $as_echo_n "(cached) " >&6
6062 else
6063   pgac_save_CFLAGS=$CFLAGS
6064 pgac_save_CC=$CC
6065 CC=${CC}
6066 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6067 ac_save_c_werror_flag=$ac_c_werror_flag
6068 ac_c_werror_flag=yes
6069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6070 /* end confdefs.h.  */
6071
6072 int
6073 main ()
6074 {
6075
6076   ;
6077   return 0;
6078 }
6079 _ACEOF
6080 if ac_fn_c_try_compile "$LINENO"; then :
6081   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6082 else
6083   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6084 fi
6085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6086 ac_c_werror_flag=$ac_save_c_werror_flag
6087 CFLAGS="$pgac_save_CFLAGS"
6088 CC="$pgac_save_CC"
6089 fi
6090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6091 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6092 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6093   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6094 fi
6095
6096
6097   if test -n "$NOT_THE_CFLAGS"; then
6098     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6099   fi
6100   # Similarly disable useless truncation warnings from gcc 8+
6101   NOT_THE_CFLAGS=""
6102   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6103 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6104 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6105   $as_echo_n "(cached) " >&6
6106 else
6107   pgac_save_CFLAGS=$CFLAGS
6108 pgac_save_CC=$CC
6109 CC=${CC}
6110 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6111 ac_save_c_werror_flag=$ac_c_werror_flag
6112 ac_c_werror_flag=yes
6113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6114 /* end confdefs.h.  */
6115
6116 int
6117 main ()
6118 {
6119
6120   ;
6121   return 0;
6122 }
6123 _ACEOF
6124 if ac_fn_c_try_compile "$LINENO"; then :
6125   pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6126 else
6127   pgac_cv_prog_CC_cflags__Wformat_truncation=no
6128 fi
6129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6130 ac_c_werror_flag=$ac_save_c_werror_flag
6131 CFLAGS="$pgac_save_CFLAGS"
6132 CC="$pgac_save_CC"
6133 fi
6134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6135 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6136 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6137   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6138 fi
6139
6140
6141   if test -n "$NOT_THE_CFLAGS"; then
6142     CFLAGS="$CFLAGS -Wno-format-truncation"
6143   fi
6144   NOT_THE_CFLAGS=""
6145   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6146 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6147 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6148   $as_echo_n "(cached) " >&6
6149 else
6150   pgac_save_CFLAGS=$CFLAGS
6151 pgac_save_CC=$CC
6152 CC=${CC}
6153 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6154 ac_save_c_werror_flag=$ac_c_werror_flag
6155 ac_c_werror_flag=yes
6156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6157 /* end confdefs.h.  */
6158
6159 int
6160 main ()
6161 {
6162
6163   ;
6164   return 0;
6165 }
6166 _ACEOF
6167 if ac_fn_c_try_compile "$LINENO"; then :
6168   pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6169 else
6170   pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6171 fi
6172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6173 ac_c_werror_flag=$ac_save_c_werror_flag
6174 CFLAGS="$pgac_save_CFLAGS"
6175 CC="$pgac_save_CC"
6176 fi
6177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6178 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6179 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6180   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6181 fi
6182
6183
6184   if test -n "$NOT_THE_CFLAGS"; then
6185     CFLAGS="$CFLAGS -Wno-stringop-truncation"
6186   fi
6187 elif test "$ICC" = yes; then
6188   # Intel's compiler has a bug/misoptimization in checking for
6189   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6190
6191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6192 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6193 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6194   $as_echo_n "(cached) " >&6
6195 else
6196   pgac_save_CFLAGS=$CFLAGS
6197 pgac_save_CC=$CC
6198 CC=${CC}
6199 CFLAGS="${CFLAGS} -mp1"
6200 ac_save_c_werror_flag=$ac_c_werror_flag
6201 ac_c_werror_flag=yes
6202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6203 /* end confdefs.h.  */
6204
6205 int
6206 main ()
6207 {
6208
6209   ;
6210   return 0;
6211 }
6212 _ACEOF
6213 if ac_fn_c_try_compile "$LINENO"; then :
6214   pgac_cv_prog_CC_cflags__mp1=yes
6215 else
6216   pgac_cv_prog_CC_cflags__mp1=no
6217 fi
6218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6219 ac_c_werror_flag=$ac_save_c_werror_flag
6220 CFLAGS="$pgac_save_CFLAGS"
6221 CC="$pgac_save_CC"
6222 fi
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6224 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6225 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6226   CFLAGS="${CFLAGS} -mp1"
6227 fi
6228
6229
6230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6231 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6232 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6233   $as_echo_n "(cached) " >&6
6234 else
6235   pgac_save_CXXFLAGS=$CXXFLAGS
6236 pgac_save_CXX=$CXX
6237 CXX=${CXX}
6238 CXXFLAGS="${CXXFLAGS} -mp1"
6239 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6240 ac_cxx_werror_flag=yes
6241 ac_ext=cpp
6242 ac_cpp='$CXXCPP $CPPFLAGS'
6243 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6244 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6245 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6246
6247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6248 /* end confdefs.h.  */
6249
6250 int
6251 main ()
6252 {
6253
6254   ;
6255   return 0;
6256 }
6257 _ACEOF
6258 if ac_fn_cxx_try_compile "$LINENO"; then :
6259   pgac_cv_prog_CXX_cxxflags__mp1=yes
6260 else
6261   pgac_cv_prog_CXX_cxxflags__mp1=no
6262 fi
6263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6264 ac_ext=c
6265 ac_cpp='$CPP $CPPFLAGS'
6266 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6267 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6268 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6269
6270 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6271 CXXFLAGS="$pgac_save_CXXFLAGS"
6272 CXX="$pgac_save_CXX"
6273 fi
6274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6275 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6276 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6277   CXXFLAGS="${CXXFLAGS} -mp1"
6278 fi
6279
6280
6281   # Make sure strict aliasing is off (though this is said to be the default)
6282
6283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6284 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6285 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6286   $as_echo_n "(cached) " >&6
6287 else
6288   pgac_save_CFLAGS=$CFLAGS
6289 pgac_save_CC=$CC
6290 CC=${CC}
6291 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6292 ac_save_c_werror_flag=$ac_c_werror_flag
6293 ac_c_werror_flag=yes
6294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6295 /* end confdefs.h.  */
6296
6297 int
6298 main ()
6299 {
6300
6301   ;
6302   return 0;
6303 }
6304 _ACEOF
6305 if ac_fn_c_try_compile "$LINENO"; then :
6306   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6307 else
6308   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6309 fi
6310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6311 ac_c_werror_flag=$ac_save_c_werror_flag
6312 CFLAGS="$pgac_save_CFLAGS"
6313 CC="$pgac_save_CC"
6314 fi
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6316 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6317 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6318   CFLAGS="${CFLAGS} -fno-strict-aliasing"
6319 fi
6320
6321
6322   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6323 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6324 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6325   $as_echo_n "(cached) " >&6
6326 else
6327   pgac_save_CXXFLAGS=$CXXFLAGS
6328 pgac_save_CXX=$CXX
6329 CXX=${CXX}
6330 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6331 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6332 ac_cxx_werror_flag=yes
6333 ac_ext=cpp
6334 ac_cpp='$CXXCPP $CPPFLAGS'
6335 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6336 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6337 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6338
6339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6340 /* end confdefs.h.  */
6341
6342 int
6343 main ()
6344 {
6345
6346   ;
6347   return 0;
6348 }
6349 _ACEOF
6350 if ac_fn_cxx_try_compile "$LINENO"; then :
6351   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6352 else
6353   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6354 fi
6355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6356 ac_ext=c
6357 ac_cpp='$CPP $CPPFLAGS'
6358 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6359 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6361
6362 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6363 CXXFLAGS="$pgac_save_CXXFLAGS"
6364 CXX="$pgac_save_CXX"
6365 fi
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6367 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6368 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6369   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6370 fi
6371
6372
6373 elif test "$PORTNAME" = "aix"; then
6374   # AIX's xlc has to have strict aliasing turned off too
6375
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6377 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6378 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6379   $as_echo_n "(cached) " >&6
6380 else
6381   pgac_save_CFLAGS=$CFLAGS
6382 pgac_save_CC=$CC
6383 CC=${CC}
6384 CFLAGS="${CFLAGS} -qnoansialias"
6385 ac_save_c_werror_flag=$ac_c_werror_flag
6386 ac_c_werror_flag=yes
6387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6388 /* end confdefs.h.  */
6389
6390 int
6391 main ()
6392 {
6393
6394   ;
6395   return 0;
6396 }
6397 _ACEOF
6398 if ac_fn_c_try_compile "$LINENO"; then :
6399   pgac_cv_prog_CC_cflags__qnoansialias=yes
6400 else
6401   pgac_cv_prog_CC_cflags__qnoansialias=no
6402 fi
6403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6404 ac_c_werror_flag=$ac_save_c_werror_flag
6405 CFLAGS="$pgac_save_CFLAGS"
6406 CC="$pgac_save_CC"
6407 fi
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6409 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6410 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6411   CFLAGS="${CFLAGS} -qnoansialias"
6412 fi
6413
6414
6415   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6416 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6417 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6418   $as_echo_n "(cached) " >&6
6419 else
6420   pgac_save_CXXFLAGS=$CXXFLAGS
6421 pgac_save_CXX=$CXX
6422 CXX=${CXX}
6423 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6424 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6425 ac_cxx_werror_flag=yes
6426 ac_ext=cpp
6427 ac_cpp='$CXXCPP $CPPFLAGS'
6428 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6429 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6430 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6431
6432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6433 /* end confdefs.h.  */
6434
6435 int
6436 main ()
6437 {
6438
6439   ;
6440   return 0;
6441 }
6442 _ACEOF
6443 if ac_fn_cxx_try_compile "$LINENO"; then :
6444   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6445 else
6446   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6447 fi
6448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6449 ac_ext=c
6450 ac_cpp='$CPP $CPPFLAGS'
6451 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6452 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6453 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6454
6455 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6456 CXXFLAGS="$pgac_save_CXXFLAGS"
6457 CXX="$pgac_save_CXX"
6458 fi
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6460 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6461 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6462   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6463 fi
6464
6465
6466
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6468 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6469 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6470   $as_echo_n "(cached) " >&6
6471 else
6472   pgac_save_CFLAGS=$CFLAGS
6473 pgac_save_CC=$CC
6474 CC=${CC}
6475 CFLAGS="${CFLAGS} -qlonglong"
6476 ac_save_c_werror_flag=$ac_c_werror_flag
6477 ac_c_werror_flag=yes
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479 /* end confdefs.h.  */
6480
6481 int
6482 main ()
6483 {
6484
6485   ;
6486   return 0;
6487 }
6488 _ACEOF
6489 if ac_fn_c_try_compile "$LINENO"; then :
6490   pgac_cv_prog_CC_cflags__qlonglong=yes
6491 else
6492   pgac_cv_prog_CC_cflags__qlonglong=no
6493 fi
6494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6495 ac_c_werror_flag=$ac_save_c_werror_flag
6496 CFLAGS="$pgac_save_CFLAGS"
6497 CC="$pgac_save_CC"
6498 fi
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6500 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6501 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6502   CFLAGS="${CFLAGS} -qlonglong"
6503 fi
6504
6505
6506   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6507 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6508 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6509   $as_echo_n "(cached) " >&6
6510 else
6511   pgac_save_CXXFLAGS=$CXXFLAGS
6512 pgac_save_CXX=$CXX
6513 CXX=${CXX}
6514 CXXFLAGS="${CXXFLAGS} -qlonglong"
6515 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6516 ac_cxx_werror_flag=yes
6517 ac_ext=cpp
6518 ac_cpp='$CXXCPP $CPPFLAGS'
6519 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6520 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6521 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6522
6523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6524 /* end confdefs.h.  */
6525
6526 int
6527 main ()
6528 {
6529
6530   ;
6531   return 0;
6532 }
6533 _ACEOF
6534 if ac_fn_cxx_try_compile "$LINENO"; then :
6535   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6536 else
6537   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6538 fi
6539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6540 ac_ext=c
6541 ac_cpp='$CPP $CPPFLAGS'
6542 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6543 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6544 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6545
6546 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6547 CXXFLAGS="$pgac_save_CXXFLAGS"
6548 CXX="$pgac_save_CXX"
6549 fi
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6551 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6552 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6553   CXXFLAGS="${CXXFLAGS} -qlonglong"
6554 fi
6555
6556
6557 elif test "$PORTNAME" = "hpux"; then
6558   # On some versions of HP-UX, libm functions do not set errno by default.
6559   # Fix that by using +Olibmerrno if the compiler recognizes it.
6560
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6562 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6563 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6564   $as_echo_n "(cached) " >&6
6565 else
6566   pgac_save_CFLAGS=$CFLAGS
6567 pgac_save_CC=$CC
6568 CC=${CC}
6569 CFLAGS="${CFLAGS} +Olibmerrno"
6570 ac_save_c_werror_flag=$ac_c_werror_flag
6571 ac_c_werror_flag=yes
6572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6573 /* end confdefs.h.  */
6574
6575 int
6576 main ()
6577 {
6578
6579   ;
6580   return 0;
6581 }
6582 _ACEOF
6583 if ac_fn_c_try_compile "$LINENO"; then :
6584   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6585 else
6586   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6587 fi
6588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6589 ac_c_werror_flag=$ac_save_c_werror_flag
6590 CFLAGS="$pgac_save_CFLAGS"
6591 CC="$pgac_save_CC"
6592 fi
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6594 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6595 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6596   CFLAGS="${CFLAGS} +Olibmerrno"
6597 fi
6598
6599
6600   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6601 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6602 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6603   $as_echo_n "(cached) " >&6
6604 else
6605   pgac_save_CXXFLAGS=$CXXFLAGS
6606 pgac_save_CXX=$CXX
6607 CXX=${CXX}
6608 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6609 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6610 ac_cxx_werror_flag=yes
6611 ac_ext=cpp
6612 ac_cpp='$CXXCPP $CPPFLAGS'
6613 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6614 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6615 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6616
6617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6618 /* end confdefs.h.  */
6619
6620 int
6621 main ()
6622 {
6623
6624   ;
6625   return 0;
6626 }
6627 _ACEOF
6628 if ac_fn_cxx_try_compile "$LINENO"; then :
6629   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6630 else
6631   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6632 fi
6633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6634 ac_ext=c
6635 ac_cpp='$CPP $CPPFLAGS'
6636 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6637 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6638 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6639
6640 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6641 CXXFLAGS="$pgac_save_CXXFLAGS"
6642 CXX="$pgac_save_CXX"
6643 fi
6644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6645 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6646 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6647   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6648 fi
6649
6650
6651 fi
6652
6653 CFLAGS_VECTOR=$CFLAGS_VECTOR
6654
6655
6656 # Determine flags used to emit bitcode for JIT inlining. Need to test
6657 # for behaviour changing compiler flags, to keep compatibility with
6658 # compiler used for normal postgres code.
6659 if test "$with_llvm" = yes ; then
6660   CLANGXX="$CLANG -xc++"
6661
6662   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6663 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6664 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6665   $as_echo_n "(cached) " >&6
6666 else
6667   pgac_save_CFLAGS=$CFLAGS
6668 pgac_save_CC=$CC
6669 CC=${CLANG}
6670 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6671 ac_save_c_werror_flag=$ac_c_werror_flag
6672 ac_c_werror_flag=yes
6673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6674 /* end confdefs.h.  */
6675
6676 int
6677 main ()
6678 {
6679
6680   ;
6681   return 0;
6682 }
6683 _ACEOF
6684 if ac_fn_c_try_compile "$LINENO"; then :
6685   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6686 else
6687   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6688 fi
6689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6690 ac_c_werror_flag=$ac_save_c_werror_flag
6691 CFLAGS="$pgac_save_CFLAGS"
6692 CC="$pgac_save_CC"
6693 fi
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6695 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6696 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6697   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6698 fi
6699
6700   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6701 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6702 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6703   $as_echo_n "(cached) " >&6
6704 else
6705   pgac_save_CXXFLAGS=$CXXFLAGS
6706 pgac_save_CXX=$CXX
6707 CXX=${CLANGXX}
6708 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6709 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6710 ac_cxx_werror_flag=yes
6711 ac_ext=cpp
6712 ac_cpp='$CXXCPP $CPPFLAGS'
6713 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6714 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6715 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6716
6717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6718 /* end confdefs.h.  */
6719
6720 int
6721 main ()
6722 {
6723
6724   ;
6725   return 0;
6726 }
6727 _ACEOF
6728 if ac_fn_cxx_try_compile "$LINENO"; then :
6729   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6730 else
6731   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6732 fi
6733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6734 ac_ext=c
6735 ac_cpp='$CPP $CPPFLAGS'
6736 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6737 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6738 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6739
6740 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6741 CXXFLAGS="$pgac_save_CXXFLAGS"
6742 CXX="$pgac_save_CXX"
6743 fi
6744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6745 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6746 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6747   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6748 fi
6749
6750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6751 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6752 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6753   $as_echo_n "(cached) " >&6
6754 else
6755   pgac_save_CFLAGS=$CFLAGS
6756 pgac_save_CC=$CC
6757 CC=${CLANG}
6758 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6759 ac_save_c_werror_flag=$ac_c_werror_flag
6760 ac_c_werror_flag=yes
6761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6762 /* end confdefs.h.  */
6763
6764 int
6765 main ()
6766 {
6767
6768   ;
6769   return 0;
6770 }
6771 _ACEOF
6772 if ac_fn_c_try_compile "$LINENO"; then :
6773   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6774 else
6775   pgac_cv_prog_CLANG_cflags__fwrapv=no
6776 fi
6777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6778 ac_c_werror_flag=$ac_save_c_werror_flag
6779 CFLAGS="$pgac_save_CFLAGS"
6780 CC="$pgac_save_CC"
6781 fi
6782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6783 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6784 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6785   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6786 fi
6787
6788   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6789 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6790 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6791   $as_echo_n "(cached) " >&6
6792 else
6793   pgac_save_CXXFLAGS=$CXXFLAGS
6794 pgac_save_CXX=$CXX
6795 CXX=${CLANGXX}
6796 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6797 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6798 ac_cxx_werror_flag=yes
6799 ac_ext=cpp
6800 ac_cpp='$CXXCPP $CPPFLAGS'
6801 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6802 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6803 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6804
6805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6806 /* end confdefs.h.  */
6807
6808 int
6809 main ()
6810 {
6811
6812   ;
6813   return 0;
6814 }
6815 _ACEOF
6816 if ac_fn_cxx_try_compile "$LINENO"; then :
6817   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6818 else
6819   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6820 fi
6821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6822 ac_ext=c
6823 ac_cpp='$CPP $CPPFLAGS'
6824 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6825 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6826 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6827
6828 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6829 CXXFLAGS="$pgac_save_CXXFLAGS"
6830 CXX="$pgac_save_CXX"
6831 fi
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6833 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6834 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6835   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6836 fi
6837
6838   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6839 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6840 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6841   $as_echo_n "(cached) " >&6
6842 else
6843   pgac_save_CFLAGS=$CFLAGS
6844 pgac_save_CC=$CC
6845 CC=${CLANG}
6846 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6847 ac_save_c_werror_flag=$ac_c_werror_flag
6848 ac_c_werror_flag=yes
6849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6850 /* end confdefs.h.  */
6851
6852 int
6853 main ()
6854 {
6855
6856   ;
6857   return 0;
6858 }
6859 _ACEOF
6860 if ac_fn_c_try_compile "$LINENO"; then :
6861   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6862 else
6863   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6864 fi
6865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6866 ac_c_werror_flag=$ac_save_c_werror_flag
6867 CFLAGS="$pgac_save_CFLAGS"
6868 CC="$pgac_save_CC"
6869 fi
6870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6871 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6872 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6873   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6874 fi
6875
6876   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6877 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6878 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6879   $as_echo_n "(cached) " >&6
6880 else
6881   pgac_save_CXXFLAGS=$CXXFLAGS
6882 pgac_save_CXX=$CXX
6883 CXX=${CLANGXX}
6884 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6885 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6886 ac_cxx_werror_flag=yes
6887 ac_ext=cpp
6888 ac_cpp='$CXXCPP $CPPFLAGS'
6889 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6890 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6891 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6892
6893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6894 /* end confdefs.h.  */
6895
6896 int
6897 main ()
6898 {
6899
6900   ;
6901   return 0;
6902 }
6903 _ACEOF
6904 if ac_fn_cxx_try_compile "$LINENO"; then :
6905   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6906 else
6907   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6908 fi
6909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6910 ac_ext=c
6911 ac_cpp='$CPP $CPPFLAGS'
6912 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6913 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6914 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6915
6916 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6917 CXXFLAGS="$pgac_save_CXXFLAGS"
6918 CXX="$pgac_save_CXX"
6919 fi
6920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6921 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6922 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6923   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6924 fi
6925
6926 fi
6927
6928 # supply -g if --enable-debug
6929 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6930   CFLAGS="$CFLAGS -g"
6931 fi
6932
6933 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6934   CXXFLAGS="$CXXFLAGS -g"
6935 fi
6936
6937 # enable code coverage if --enable-coverage
6938 if test "$enable_coverage" = yes; then
6939   if test "$GCC" = yes; then
6940     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6941     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6942   else
6943     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6944   fi
6945 fi
6946
6947 # enable profiling if --enable-profiling
6948 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6949   if test "$GCC" = yes; then
6950
6951 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6952
6953     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6954     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6955   else
6956     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6957   fi
6958 fi
6959
6960 # We already have this in Makefile.win32, but configure needs it too
6961 if test "$PORTNAME" = "win32"; then
6962   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6963 fi
6964
6965 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6966 # user-specified flags (if any) at the end.  This lets users override
6967 # the automatic additions.
6968 CFLAGS="$CFLAGS $user_CFLAGS"
6969 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6970 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6971 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6972
6973 BITCODE_CFLAGS=$BITCODE_CFLAGS
6974
6975 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6976
6977
6978 # Check if the compiler still works with the final flag settings
6979 # (note, we're not checking that for CXX, which is optional)
6980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6981 $as_echo_n "checking whether the C compiler still works... " >&6; }
6982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6983 /* end confdefs.h.  */
6984
6985 int
6986 main ()
6987 {
6988 return 0;
6989   ;
6990   return 0;
6991 }
6992 _ACEOF
6993 if ac_fn_c_try_link "$LINENO"; then :
6994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6995 $as_echo "yes" >&6; }
6996 else
6997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6998 $as_echo "no" >&6; }
6999    as_fn_error $? "cannot proceed" "$LINENO" 5
7000 fi
7001 rm -f core conftest.err conftest.$ac_objext \
7002     conftest$ac_exeext conftest.$ac_ext
7003
7004 # Defend against gcc -ffast-math
7005 if test "$GCC" = yes; then
7006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7007 /* end confdefs.h.  */
7008
7009 int
7010 main ()
7011 {
7012 #ifdef __FAST_MATH__
7013 choke me
7014 #endif
7015   ;
7016   return 0;
7017 }
7018 _ACEOF
7019 if ac_fn_c_try_compile "$LINENO"; then :
7020
7021 else
7022   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7023 fi
7024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7025 fi
7026
7027 # Defend against clang being used on x86-32 without SSE2 enabled.  As current
7028 # versions of clang do not understand -fexcess-precision=standard, the use of
7029 # x87 floating point operations leads to problems like isinf possibly returning
7030 # false for a value that is infinite when converted from the 80bit register to
7031 # the 8byte memory representation.
7032 #
7033 # Only perform the test if the compiler doesn't understand
7034 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7035 # automatically.
7036 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7038 /* end confdefs.h.  */
7039
7040 int
7041 main ()
7042 {
7043
7044 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7045 choke me
7046 #endif
7047
7048   ;
7049   return 0;
7050 }
7051 _ACEOF
7052 if ac_fn_c_try_compile "$LINENO"; then :
7053
7054 else
7055   as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7056 fi
7057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7058 fi
7059
7060 ac_ext=c
7061 ac_cpp='$CPP $CPPFLAGS'
7062 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7063 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7064 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7066 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7067 # On Suns, sometimes $CPP names a directory.
7068 if test -n "$CPP" && test -d "$CPP"; then
7069   CPP=
7070 fi
7071 if test -z "$CPP"; then
7072   if ${ac_cv_prog_CPP+:} false; then :
7073   $as_echo_n "(cached) " >&6
7074 else
7075       # Double quotes because CPP needs to be expanded
7076     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7077     do
7078       ac_preproc_ok=false
7079 for ac_c_preproc_warn_flag in '' yes
7080 do
7081   # Use a header file that comes with gcc, so configuring glibc
7082   # with a fresh cross-compiler works.
7083   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7084   # <limits.h> exists even on freestanding compilers.
7085   # On the NeXT, cc -E runs the code through the compiler's parser,
7086   # not just through cpp. "Syntax error" is here to catch this case.
7087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7088 /* end confdefs.h.  */
7089 #ifdef __STDC__
7090 # include <limits.h>
7091 #else
7092 # include <assert.h>
7093 #endif
7094                      Syntax error
7095 _ACEOF
7096 if ac_fn_c_try_cpp "$LINENO"; then :
7097
7098 else
7099   # Broken: fails on valid input.
7100 continue
7101 fi
7102 rm -f conftest.err conftest.i conftest.$ac_ext
7103
7104   # OK, works on sane cases.  Now check whether nonexistent headers
7105   # can be detected and how.
7106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7107 /* end confdefs.h.  */
7108 #include <ac_nonexistent.h>
7109 _ACEOF
7110 if ac_fn_c_try_cpp "$LINENO"; then :
7111   # Broken: success on invalid input.
7112 continue
7113 else
7114   # Passes both tests.
7115 ac_preproc_ok=:
7116 break
7117 fi
7118 rm -f conftest.err conftest.i conftest.$ac_ext
7119
7120 done
7121 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7122 rm -f conftest.i conftest.err conftest.$ac_ext
7123 if $ac_preproc_ok; then :
7124   break
7125 fi
7126
7127     done
7128     ac_cv_prog_CPP=$CPP
7129
7130 fi
7131   CPP=$ac_cv_prog_CPP
7132 else
7133   ac_cv_prog_CPP=$CPP
7134 fi
7135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7136 $as_echo "$CPP" >&6; }
7137 ac_preproc_ok=false
7138 for ac_c_preproc_warn_flag in '' yes
7139 do
7140   # Use a header file that comes with gcc, so configuring glibc
7141   # with a fresh cross-compiler works.
7142   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7143   # <limits.h> exists even on freestanding compilers.
7144   # On the NeXT, cc -E runs the code through the compiler's parser,
7145   # not just through cpp. "Syntax error" is here to catch this case.
7146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7147 /* end confdefs.h.  */
7148 #ifdef __STDC__
7149 # include <limits.h>
7150 #else
7151 # include <assert.h>
7152 #endif
7153                      Syntax error
7154 _ACEOF
7155 if ac_fn_c_try_cpp "$LINENO"; then :
7156
7157 else
7158   # Broken: fails on valid input.
7159 continue
7160 fi
7161 rm -f conftest.err conftest.i conftest.$ac_ext
7162
7163   # OK, works on sane cases.  Now check whether nonexistent headers
7164   # can be detected and how.
7165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7166 /* end confdefs.h.  */
7167 #include <ac_nonexistent.h>
7168 _ACEOF
7169 if ac_fn_c_try_cpp "$LINENO"; then :
7170   # Broken: success on invalid input.
7171 continue
7172 else
7173   # Passes both tests.
7174 ac_preproc_ok=:
7175 break
7176 fi
7177 rm -f conftest.err conftest.i conftest.$ac_ext
7178
7179 done
7180 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7181 rm -f conftest.i conftest.err conftest.$ac_ext
7182 if $ac_preproc_ok; then :
7183
7184 else
7185   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7186 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7187 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7188 See \`config.log' for more details" "$LINENO" 5; }
7189 fi
7190
7191 ac_ext=c
7192 ac_cpp='$CPP $CPPFLAGS'
7193 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7194 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7195 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7196
7197
7198
7199
7200 #
7201 # Set up TAS assembly code if needed; the template file has now had its
7202 # chance to request this.
7203 #
7204 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7205
7206
7207 if test "$need_tas" = yes ; then
7208   TAS=tas.o
7209 else
7210   TAS=""
7211 fi
7212
7213
7214
7215 #
7216 # Automatic dependency tracking
7217 #
7218
7219
7220 # Check whether --enable-depend was given.
7221 if test "${enable_depend+set}" = set; then :
7222   enableval=$enable_depend;
7223   case $enableval in
7224     yes)
7225       autodepend=yes
7226       ;;
7227     no)
7228       :
7229       ;;
7230     *)
7231       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7232       ;;
7233   esac
7234
7235 else
7236   enable_depend=no
7237
7238 fi
7239
7240
7241
7242
7243
7244 #
7245 # Enable assert checks
7246 #
7247
7248
7249 # Check whether --enable-cassert was given.
7250 if test "${enable_cassert+set}" = set; then :
7251   enableval=$enable_cassert;
7252   case $enableval in
7253     yes)
7254
7255 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7256
7257       ;;
7258     no)
7259       :
7260       ;;
7261     *)
7262       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7263       ;;
7264   esac
7265
7266 else
7267   enable_cassert=no
7268
7269 fi
7270
7271
7272
7273
7274 #
7275 # Include directories
7276 #
7277 ac_save_IFS=$IFS
7278 IFS="${IFS}${PATH_SEPARATOR}"
7279 # SRCH_INC comes from the template file
7280 for dir in $with_includes $SRCH_INC; do
7281   if test -d "$dir"; then
7282     INCLUDES="$INCLUDES -I$dir"
7283   else
7284     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7285 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7286   fi
7287 done
7288 IFS=$ac_save_IFS
7289
7290
7291
7292 #
7293 # Library directories
7294 #
7295 ac_save_IFS=$IFS
7296 IFS="${IFS}${PATH_SEPARATOR}"
7297 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7298 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7299   if test -d "$dir"; then
7300     LIBDIRS="$LIBDIRS -L$dir"
7301   else
7302     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7303 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7304   fi
7305 done
7306 IFS=$ac_save_IFS
7307
7308 #
7309 # Enable thread-safe client libraries
7310 #
7311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7312 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7313
7314
7315 # Check whether --enable-thread-safety was given.
7316 if test "${enable_thread_safety+set}" = set; then :
7317   enableval=$enable_thread_safety;
7318   case $enableval in
7319     yes)
7320       :
7321       ;;
7322     no)
7323       :
7324       ;;
7325     *)
7326       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7327       ;;
7328   esac
7329
7330 else
7331   enable_thread_safety=yes
7332
7333 fi
7334
7335
7336 if test "$enable_thread_safety" = yes; then
7337
7338 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7339
7340 fi
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7342 $as_echo "$enable_thread_safety" >&6; }
7343
7344
7345 #
7346 # ICU
7347 #
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7349 $as_echo_n "checking whether to build with ICU support... " >&6; }
7350
7351
7352
7353 # Check whether --with-icu was given.
7354 if test "${with_icu+set}" = set; then :
7355   withval=$with_icu;
7356   case $withval in
7357     yes)
7358
7359 $as_echo "#define USE_ICU 1" >>confdefs.h
7360
7361       ;;
7362     no)
7363       :
7364       ;;
7365     *)
7366       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7367       ;;
7368   esac
7369
7370 else
7371   with_icu=no
7372
7373 fi
7374
7375
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7377 $as_echo "$with_icu" >&6; }
7378
7379
7380 if test "$with_icu" = yes; then
7381
7382
7383
7384
7385
7386
7387
7388 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7389         if test -n "$ac_tool_prefix"; then
7390   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7391 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7393 $as_echo_n "checking for $ac_word... " >&6; }
7394 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7395   $as_echo_n "(cached) " >&6
7396 else
7397   case $PKG_CONFIG in
7398   [\\/]* | ?:[\\/]*)
7399   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7400   ;;
7401   *)
7402   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7403 for as_dir in $PATH
7404 do
7405   IFS=$as_save_IFS
7406   test -z "$as_dir" && as_dir=.
7407     for ac_exec_ext in '' $ac_executable_extensions; do
7408   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7409     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7410     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7411     break 2
7412   fi
7413 done
7414   done
7415 IFS=$as_save_IFS
7416
7417   ;;
7418 esac
7419 fi
7420 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7421 if test -n "$PKG_CONFIG"; then
7422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7423 $as_echo "$PKG_CONFIG" >&6; }
7424 else
7425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7426 $as_echo "no" >&6; }
7427 fi
7428
7429
7430 fi
7431 if test -z "$ac_cv_path_PKG_CONFIG"; then
7432   ac_pt_PKG_CONFIG=$PKG_CONFIG
7433   # Extract the first word of "pkg-config", so it can be a program name with args.
7434 set dummy pkg-config; ac_word=$2
7435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7436 $as_echo_n "checking for $ac_word... " >&6; }
7437 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7438   $as_echo_n "(cached) " >&6
7439 else
7440   case $ac_pt_PKG_CONFIG in
7441   [\\/]* | ?:[\\/]*)
7442   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7443   ;;
7444   *)
7445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7446 for as_dir in $PATH
7447 do
7448   IFS=$as_save_IFS
7449   test -z "$as_dir" && as_dir=.
7450     for ac_exec_ext in '' $ac_executable_extensions; do
7451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7452     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7454     break 2
7455   fi
7456 done
7457   done
7458 IFS=$as_save_IFS
7459
7460   ;;
7461 esac
7462 fi
7463 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7464 if test -n "$ac_pt_PKG_CONFIG"; then
7465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7466 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7467 else
7468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469 $as_echo "no" >&6; }
7470 fi
7471
7472   if test "x$ac_pt_PKG_CONFIG" = x; then
7473     PKG_CONFIG=""
7474   else
7475     case $cross_compiling:$ac_tool_warned in
7476 yes:)
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7478 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7479 ac_tool_warned=yes ;;
7480 esac
7481     PKG_CONFIG=$ac_pt_PKG_CONFIG
7482   fi
7483 else
7484   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7485 fi
7486
7487 fi
7488 if test -n "$PKG_CONFIG"; then
7489         _pkg_min_version=0.9.0
7490         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7491 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7492         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7493                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7494 $as_echo "yes" >&6; }
7495         else
7496                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7497 $as_echo "no" >&6; }
7498                 PKG_CONFIG=""
7499         fi
7500 fi
7501
7502 pkg_failed=no
7503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7504 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7505
7506 if test -n "$ICU_CFLAGS"; then
7507     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7508  elif test -n "$PKG_CONFIG"; then
7509     if test -n "$PKG_CONFIG" && \
7510     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7511   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7512   ac_status=$?
7513   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7514   test $ac_status = 0; }; then
7515   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7516                       test "x$?" != "x0" && pkg_failed=yes
7517 else
7518   pkg_failed=yes
7519 fi
7520  else
7521     pkg_failed=untried
7522 fi
7523 if test -n "$ICU_LIBS"; then
7524     pkg_cv_ICU_LIBS="$ICU_LIBS"
7525  elif test -n "$PKG_CONFIG"; then
7526     if test -n "$PKG_CONFIG" && \
7527     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7528   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7529   ac_status=$?
7530   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7531   test $ac_status = 0; }; then
7532   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7533                       test "x$?" != "x0" && pkg_failed=yes
7534 else
7535   pkg_failed=yes
7536 fi
7537  else
7538     pkg_failed=untried
7539 fi
7540
7541
7542
7543 if test $pkg_failed = yes; then
7544         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7545 $as_echo "no" >&6; }
7546
7547 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7548         _pkg_short_errors_supported=yes
7549 else
7550         _pkg_short_errors_supported=no
7551 fi
7552         if test $_pkg_short_errors_supported = yes; then
7553                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7554         else
7555                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7556         fi
7557         # Put the nasty error message in config.log where it belongs
7558         echo "$ICU_PKG_ERRORS" >&5
7559
7560         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7561
7562 $ICU_PKG_ERRORS
7563
7564 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7565 installed software in a non-standard prefix.
7566
7567 Alternatively, you may set the environment variables ICU_CFLAGS
7568 and ICU_LIBS to avoid the need to call pkg-config.
7569 See the pkg-config man page for more details." "$LINENO" 5
7570 elif test $pkg_failed = untried; then
7571         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7572 $as_echo "no" >&6; }
7573         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7574 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7575 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7576 is in your PATH or set the PKG_CONFIG environment variable to the full
7577 path to pkg-config.
7578
7579 Alternatively, you may set the environment variables ICU_CFLAGS
7580 and ICU_LIBS to avoid the need to call pkg-config.
7581 See the pkg-config man page for more details.
7582
7583 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7584 See \`config.log' for more details" "$LINENO" 5; }
7585 else
7586         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7587         ICU_LIBS=$pkg_cv_ICU_LIBS
7588         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7589 $as_echo "yes" >&6; }
7590
7591 fi
7592 fi
7593
7594 #
7595 # Optionally build Tcl modules (PL/Tcl)
7596 #
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7598 $as_echo_n "checking whether to build with Tcl... " >&6; }
7599
7600
7601
7602 # Check whether --with-tcl was given.
7603 if test "${with_tcl+set}" = set; then :
7604   withval=$with_tcl;
7605   case $withval in
7606     yes)
7607       :
7608       ;;
7609     no)
7610       :
7611       ;;
7612     *)
7613       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7614       ;;
7615   esac
7616
7617 else
7618   with_tcl=no
7619
7620 fi
7621
7622
7623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7624 $as_echo "$with_tcl" >&6; }
7625
7626
7627 # We see if the path to the Tcl/Tk configuration scripts is specified.
7628 # This will override the use of tclsh to find the paths to search.
7629
7630
7631
7632
7633 # Check whether --with-tclconfig was given.
7634 if test "${with_tclconfig+set}" = set; then :
7635   withval=$with_tclconfig;
7636   case $withval in
7637     yes)
7638       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7639       ;;
7640     no)
7641       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7642       ;;
7643     *)
7644
7645       ;;
7646   esac
7647
7648 fi
7649
7650
7651
7652 #
7653 # Optionally build Perl modules (PL/Perl)
7654 #
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7656 $as_echo_n "checking whether to build Perl modules... " >&6; }
7657
7658
7659
7660 # Check whether --with-perl was given.
7661 if test "${with_perl+set}" = set; then :
7662   withval=$with_perl;
7663   case $withval in
7664     yes)
7665       :
7666       ;;
7667     no)
7668       :
7669       ;;
7670     *)
7671       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7672       ;;
7673   esac
7674
7675 else
7676   with_perl=no
7677
7678 fi
7679
7680
7681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7682 $as_echo "$with_perl" >&6; }
7683
7684
7685 #
7686 # Optionally build Python modules (PL/Python)
7687 #
7688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7689 $as_echo_n "checking whether to build Python modules... " >&6; }
7690
7691
7692
7693 # Check whether --with-python was given.
7694 if test "${with_python+set}" = set; then :
7695   withval=$with_python;
7696   case $withval in
7697     yes)
7698       :
7699       ;;
7700     no)
7701       :
7702       ;;
7703     *)
7704       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7705       ;;
7706   esac
7707
7708 else
7709   with_python=no
7710
7711 fi
7712
7713
7714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7715 $as_echo "$with_python" >&6; }
7716
7717
7718 #
7719 # GSSAPI
7720 #
7721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7722 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7723
7724
7725
7726 # Check whether --with-gssapi was given.
7727 if test "${with_gssapi+set}" = set; then :
7728   withval=$with_gssapi;
7729   case $withval in
7730     yes)
7731
7732
7733 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7734
7735   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7736
7737       ;;
7738     no)
7739       :
7740       ;;
7741     *)
7742       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7743       ;;
7744   esac
7745
7746 else
7747   with_gssapi=no
7748
7749 fi
7750
7751
7752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7753 $as_echo "$with_gssapi" >&6; }
7754
7755
7756
7757
7758
7759
7760 #
7761 # Kerberos configuration parameters
7762 #
7763
7764
7765
7766 # Check whether --with-krb-srvnam was given.
7767 if test "${with_krb_srvnam+set}" = set; then :
7768   withval=$with_krb_srvnam;
7769   case $withval in
7770     yes)
7771       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7772       ;;
7773     no)
7774       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7775       ;;
7776     *)
7777
7778       ;;
7779   esac
7780
7781 else
7782   with_krb_srvnam="postgres"
7783 fi
7784
7785
7786
7787
7788 cat >>confdefs.h <<_ACEOF
7789 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7790 _ACEOF
7791
7792
7793
7794 #
7795 # PAM
7796 #
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7798 $as_echo_n "checking whether to build with PAM support... " >&6; }
7799
7800
7801
7802 # Check whether --with-pam was given.
7803 if test "${with_pam+set}" = set; then :
7804   withval=$with_pam;
7805   case $withval in
7806     yes)
7807
7808 $as_echo "#define USE_PAM 1" >>confdefs.h
7809
7810       ;;
7811     no)
7812       :
7813       ;;
7814     *)
7815       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7816       ;;
7817   esac
7818
7819 else
7820   with_pam=no
7821
7822 fi
7823
7824
7825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7826 $as_echo "$with_pam" >&6; }
7827
7828
7829 #
7830 # BSD AUTH
7831 #
7832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7833 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7834
7835
7836
7837 # Check whether --with-bsd-auth was given.
7838 if test "${with_bsd_auth+set}" = set; then :
7839   withval=$with_bsd_auth;
7840   case $withval in
7841     yes)
7842
7843 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7844
7845       ;;
7846     no)
7847       :
7848       ;;
7849     *)
7850       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7851       ;;
7852   esac
7853
7854 else
7855   with_bsd_auth=no
7856
7857 fi
7858
7859
7860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7861 $as_echo "$with_bsd_auth" >&6; }
7862
7863
7864 #
7865 # LDAP
7866 #
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7868 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7869
7870
7871
7872 # Check whether --with-ldap was given.
7873 if test "${with_ldap+set}" = set; then :
7874   withval=$with_ldap;
7875   case $withval in
7876     yes)
7877
7878 $as_echo "#define USE_LDAP 1" >>confdefs.h
7879
7880       ;;
7881     no)
7882       :
7883       ;;
7884     *)
7885       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7886       ;;
7887   esac
7888
7889 else
7890   with_ldap=no
7891
7892 fi
7893
7894
7895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7896 $as_echo "$with_ldap" >&6; }
7897
7898
7899
7900 #
7901 # Bonjour
7902 #
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7904 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7905
7906
7907
7908 # Check whether --with-bonjour was given.
7909 if test "${with_bonjour+set}" = set; then :
7910   withval=$with_bonjour;
7911   case $withval in
7912     yes)
7913
7914 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7915
7916       ;;
7917     no)
7918       :
7919       ;;
7920     *)
7921       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7922       ;;
7923   esac
7924
7925 else
7926   with_bonjour=no
7927
7928 fi
7929
7930
7931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7932 $as_echo "$with_bonjour" >&6; }
7933
7934
7935 #
7936 # OpenSSL
7937 #
7938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7939 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7940
7941
7942
7943 # Check whether --with-openssl was given.
7944 if test "${with_openssl+set}" = set; then :
7945   withval=$with_openssl;
7946   case $withval in
7947     yes)
7948
7949 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7950
7951       ;;
7952     no)
7953       :
7954       ;;
7955     *)
7956       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7957       ;;
7958   esac
7959
7960 else
7961   with_openssl=no
7962
7963 fi
7964
7965
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7967 $as_echo "$with_openssl" >&6; }
7968
7969
7970 #
7971 # SELinux
7972 #
7973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7974 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7975
7976
7977
7978 # Check whether --with-selinux was given.
7979 if test "${with_selinux+set}" = set; then :
7980   withval=$with_selinux;
7981   case $withval in
7982     yes)
7983       :
7984       ;;
7985     no)
7986       :
7987       ;;
7988     *)
7989       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7990       ;;
7991   esac
7992
7993 else
7994   with_selinux=no
7995
7996 fi
7997
7998
7999
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8001 $as_echo "$with_selinux" >&6; }
8002
8003 #
8004 # Systemd
8005 #
8006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8007 $as_echo_n "checking whether to build with systemd support... " >&6; }
8008
8009
8010
8011 # Check whether --with-systemd was given.
8012 if test "${with_systemd+set}" = set; then :
8013   withval=$with_systemd;
8014   case $withval in
8015     yes)
8016
8017 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8018
8019       ;;
8020     no)
8021       :
8022       ;;
8023     *)
8024       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8025       ;;
8026   esac
8027
8028 else
8029   with_systemd=no
8030
8031 fi
8032
8033
8034
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8036 $as_echo "$with_systemd" >&6; }
8037
8038 #
8039 # Readline
8040 #
8041
8042
8043
8044 # Check whether --with-readline was given.
8045 if test "${with_readline+set}" = set; then :
8046   withval=$with_readline;
8047   case $withval in
8048     yes)
8049       :
8050       ;;
8051     no)
8052       :
8053       ;;
8054     *)
8055       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8056       ;;
8057   esac
8058
8059 else
8060   with_readline=yes
8061
8062 fi
8063
8064
8065 # readline on MinGW has problems with backslashes in psql and other bugs.
8066 # This is particularly a problem with non-US code pages.
8067 # Therefore disable its use until we understand the cause. 2004-07-20
8068 if test "$PORTNAME" = "win32"; then
8069   if test "$with_readline" = yes; then
8070     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8071 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8072     with_readline=no
8073   fi
8074 fi
8075
8076
8077 #
8078 # Prefer libedit
8079 #
8080
8081
8082
8083 # Check whether --with-libedit-preferred was given.
8084 if test "${with_libedit_preferred+set}" = set; then :
8085   withval=$with_libedit_preferred;
8086   case $withval in
8087     yes)
8088       :
8089       ;;
8090     no)
8091       :
8092       ;;
8093     *)
8094       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8095       ;;
8096   esac
8097
8098 else
8099   with_libedit_preferred=no
8100
8101 fi
8102
8103
8104
8105
8106 #
8107 # UUID library
8108 #
8109 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8110 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8111 # UUID library.  More than one of these might be present on a given platform,
8112 # so we make the user say which one she wants.
8113 #
8114
8115
8116
8117 # Check whether --with-uuid was given.
8118 if test "${with_uuid+set}" = set; then :
8119   withval=$with_uuid;
8120   case $withval in
8121     yes)
8122       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8123       ;;
8124     no)
8125       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8126       ;;
8127     *)
8128
8129       ;;
8130   esac
8131
8132 fi
8133
8134
8135 if test x"$with_uuid" = x"" ; then
8136   with_uuid=no
8137 fi
8138
8139
8140
8141 # Check whether --with-ossp-uuid was given.
8142 if test "${with_ossp_uuid+set}" = set; then :
8143   withval=$with_ossp_uuid;
8144   case $withval in
8145     yes)
8146       :
8147       ;;
8148     no)
8149       :
8150       ;;
8151     *)
8152       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8153       ;;
8154   esac
8155
8156 else
8157   with_ossp_uuid=no
8158
8159 fi
8160
8161
8162 if test "$with_ossp_uuid" = yes ; then
8163   with_uuid=ossp
8164 fi
8165
8166 if test "$with_uuid" = bsd ; then
8167
8168 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8169
8170   UUID_EXTRA_OBJS="md5.o sha1.o"
8171 elif test "$with_uuid" = e2fs ; then
8172
8173 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8174
8175   UUID_EXTRA_OBJS="md5.o sha1.o"
8176 elif test "$with_uuid" = ossp ; then
8177
8178 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8179
8180   UUID_EXTRA_OBJS=""
8181 elif test "$with_uuid" = no ; then
8182   UUID_EXTRA_OBJS=""
8183 else
8184   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8185 fi
8186
8187
8188
8189
8190 #
8191 # XML
8192 #
8193
8194
8195
8196 # Check whether --with-libxml was given.
8197 if test "${with_libxml+set}" = set; then :
8198   withval=$with_libxml;
8199   case $withval in
8200     yes)
8201
8202 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8203
8204       ;;
8205     no)
8206       :
8207       ;;
8208     *)
8209       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8210       ;;
8211   esac
8212
8213 else
8214   with_libxml=no
8215
8216 fi
8217
8218
8219
8220 if test "$with_libxml" = yes ; then
8221   if test -z "$XML2_CONFIG"; then
8222   for ac_prog in xml2-config
8223 do
8224   # Extract the first word of "$ac_prog", so it can be a program name with args.
8225 set dummy $ac_prog; ac_word=$2
8226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8227 $as_echo_n "checking for $ac_word... " >&6; }
8228 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8229   $as_echo_n "(cached) " >&6
8230 else
8231   case $XML2_CONFIG in
8232   [\\/]* | ?:[\\/]*)
8233   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8234   ;;
8235   *)
8236   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8237 for as_dir in $PATH
8238 do
8239   IFS=$as_save_IFS
8240   test -z "$as_dir" && as_dir=.
8241     for ac_exec_ext in '' $ac_executable_extensions; do
8242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8243     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8245     break 2
8246   fi
8247 done
8248   done
8249 IFS=$as_save_IFS
8250
8251   ;;
8252 esac
8253 fi
8254 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8255 if test -n "$XML2_CONFIG"; then
8256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8257 $as_echo "$XML2_CONFIG" >&6; }
8258 else
8259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8260 $as_echo "no" >&6; }
8261 fi
8262
8263
8264   test -n "$XML2_CONFIG" && break
8265 done
8266
8267 else
8268   # Report the value of XML2_CONFIG in configure's output in all cases.
8269   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8270 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8272 $as_echo "$XML2_CONFIG" >&6; }
8273 fi
8274
8275   if test -n "$XML2_CONFIG"; then
8276     for pgac_option in `$XML2_CONFIG --cflags`; do
8277       case $pgac_option in
8278         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8279       esac
8280     done
8281     for pgac_option in `$XML2_CONFIG --libs`; do
8282       case $pgac_option in
8283         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8284       esac
8285     done
8286   fi
8287 fi
8288
8289
8290
8291 #
8292 # XSLT
8293 #
8294
8295
8296
8297 # Check whether --with-libxslt was given.
8298 if test "${with_libxslt+set}" = set; then :
8299   withval=$with_libxslt;
8300   case $withval in
8301     yes)
8302
8303 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8304
8305       ;;
8306     no)
8307       :
8308       ;;
8309     *)
8310       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8311       ;;
8312   esac
8313
8314 else
8315   with_libxslt=no
8316
8317 fi
8318
8319
8320
8321
8322
8323
8324 #
8325 # tzdata
8326 #
8327
8328
8329
8330 # Check whether --with-system-tzdata was given.
8331 if test "${with_system_tzdata+set}" = set; then :
8332   withval=$with_system_tzdata;
8333   case $withval in
8334     yes)
8335       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8336       ;;
8337     no)
8338       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8339       ;;
8340     *)
8341
8342       ;;
8343   esac
8344
8345 fi
8346
8347
8348
8349
8350 #
8351 # Zlib
8352 #
8353
8354
8355
8356 # Check whether --with-zlib was given.
8357 if test "${with_zlib+set}" = set; then :
8358   withval=$with_zlib;
8359   case $withval in
8360     yes)
8361       :
8362       ;;
8363     no)
8364       :
8365       ;;
8366     *)
8367       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8368       ;;
8369   esac
8370
8371 else
8372   with_zlib=yes
8373
8374 fi
8375
8376
8377
8378
8379 #
8380 # Elf
8381 #
8382
8383 # Assume system is ELF if it predefines __ELF__ as 1,
8384 # otherwise believe host_os based default.
8385 case $host_os in
8386     freebsd1*|freebsd2*) elf=no;;
8387     freebsd3*|freebsd4*) elf=yes;;
8388 esac
8389
8390
8391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8392 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8393 if ${ac_cv_path_GREP+:} false; then :
8394   $as_echo_n "(cached) " >&6
8395 else
8396   if test -z "$GREP"; then
8397   ac_path_GREP_found=false
8398   # Loop through the user's path and test for each of PROGNAME-LIST
8399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8400 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8401 do
8402   IFS=$as_save_IFS
8403   test -z "$as_dir" && as_dir=.
8404     for ac_prog in grep ggrep; do
8405     for ac_exec_ext in '' $ac_executable_extensions; do
8406       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8407       as_fn_executable_p "$ac_path_GREP" || continue
8408 # Check for GNU ac_path_GREP and select it if it is found.
8409   # Check for GNU $ac_path_GREP
8410 case `"$ac_path_GREP" --version 2>&1` in
8411 *GNU*)
8412   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8413 *)
8414   ac_count=0
8415   $as_echo_n 0123456789 >"conftest.in"
8416   while :
8417   do
8418     cat "conftest.in" "conftest.in" >"conftest.tmp"
8419     mv "conftest.tmp" "conftest.in"
8420     cp "conftest.in" "conftest.nl"
8421     $as_echo 'GREP' >> "conftest.nl"
8422     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8423     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8424     as_fn_arith $ac_count + 1 && ac_count=$as_val
8425     if test $ac_count -gt ${ac_path_GREP_max-0}; then
8426       # Best one so far, save it but keep looking for a better one
8427       ac_cv_path_GREP="$ac_path_GREP"
8428       ac_path_GREP_max=$ac_count
8429     fi
8430     # 10*(2^10) chars as input seems more than enough
8431     test $ac_count -gt 10 && break
8432   done
8433   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8434 esac
8435
8436       $ac_path_GREP_found && break 3
8437     done
8438   done
8439   done
8440 IFS=$as_save_IFS
8441   if test -z "$ac_cv_path_GREP"; then
8442     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8443   fi
8444 else
8445   ac_cv_path_GREP=$GREP
8446 fi
8447
8448 fi
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8450 $as_echo "$ac_cv_path_GREP" >&6; }
8451  GREP="$ac_cv_path_GREP"
8452
8453
8454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8455 $as_echo_n "checking for egrep... " >&6; }
8456 if ${ac_cv_path_EGREP+:} false; then :
8457   $as_echo_n "(cached) " >&6
8458 else
8459   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8460    then ac_cv_path_EGREP="$GREP -E"
8461    else
8462      if test -z "$EGREP"; then
8463   ac_path_EGREP_found=false
8464   # Loop through the user's path and test for each of PROGNAME-LIST
8465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8466 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8467 do
8468   IFS=$as_save_IFS
8469   test -z "$as_dir" && as_dir=.
8470     for ac_prog in egrep; do
8471     for ac_exec_ext in '' $ac_executable_extensions; do
8472       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8473       as_fn_executable_p "$ac_path_EGREP" || continue
8474 # Check for GNU ac_path_EGREP and select it if it is found.
8475   # Check for GNU $ac_path_EGREP
8476 case `"$ac_path_EGREP" --version 2>&1` in
8477 *GNU*)
8478   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8479 *)
8480   ac_count=0
8481   $as_echo_n 0123456789 >"conftest.in"
8482   while :
8483   do
8484     cat "conftest.in" "conftest.in" >"conftest.tmp"
8485     mv "conftest.tmp" "conftest.in"
8486     cp "conftest.in" "conftest.nl"
8487     $as_echo 'EGREP' >> "conftest.nl"
8488     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8489     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8490     as_fn_arith $ac_count + 1 && ac_count=$as_val
8491     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8492       # Best one so far, save it but keep looking for a better one
8493       ac_cv_path_EGREP="$ac_path_EGREP"
8494       ac_path_EGREP_max=$ac_count
8495     fi
8496     # 10*(2^10) chars as input seems more than enough
8497     test $ac_count -gt 10 && break
8498   done
8499   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8500 esac
8501
8502       $ac_path_EGREP_found && break 3
8503     done
8504   done
8505   done
8506 IFS=$as_save_IFS
8507   if test -z "$ac_cv_path_EGREP"; then
8508     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8509   fi
8510 else
8511   ac_cv_path_EGREP=$EGREP
8512 fi
8513
8514    fi
8515 fi
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8517 $as_echo "$ac_cv_path_EGREP" >&6; }
8518  EGREP="$ac_cv_path_EGREP"
8519
8520
8521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8522 /* end confdefs.h.  */
8523 #if __ELF__
8524   yes
8525 #endif
8526
8527 _ACEOF
8528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8529   $EGREP "yes" >/dev/null 2>&1; then :
8530   ELF_SYS=true
8531 else
8532   if test "X$elf" = "Xyes" ; then
8533   ELF_SYS=true
8534 else
8535   ELF_SYS=
8536 fi
8537 fi
8538 rm -f conftest*
8539
8540
8541
8542 #
8543 # Assignments
8544 #
8545
8546 CPPFLAGS="$CPPFLAGS $INCLUDES"
8547 LDFLAGS="$LDFLAGS $LIBDIRS"
8548
8549
8550
8551
8552
8553 # Check whether --with-gnu-ld was given.
8554 if test "${with_gnu_ld+set}" = set; then :
8555   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8556 else
8557   with_gnu_ld=no
8558 fi
8559
8560 ac_prog=ld
8561 if test "$GCC" = yes; then
8562   # Check if gcc -print-prog-name=ld gives a path.
8563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8564 $as_echo_n "checking for ld used by GCC... " >&6; }
8565   case $host in
8566   *-*-mingw*)
8567     # gcc leaves a trailing carriage return which upsets mingw
8568     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8569   *)
8570     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8571   esac
8572   case "$ac_prog" in
8573     # Accept absolute paths.
8574     [\\/]* | [A-Za-z]:[\\/]*)
8575       re_direlt='/[^/][^/]*/\.\./'
8576       # Canonicalize the path of ld
8577       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8578       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8579         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8580       done
8581       test -z "$LD" && LD="$ac_prog"
8582       ;;
8583   "")
8584     # If it fails, then pretend we aren't using GCC.
8585     ac_prog=ld
8586     ;;
8587   *)
8588     # If it is relative, then search for the first ld in PATH.
8589     with_gnu_ld=unknown
8590     ;;
8591   esac
8592 elif test "$with_gnu_ld" = yes; then
8593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8594 $as_echo_n "checking for GNU ld... " >&6; }
8595 else
8596   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8597 $as_echo_n "checking for non-GNU ld... " >&6; }
8598 fi
8599 if ${ac_cv_path_LD+:} false; then :
8600   $as_echo_n "(cached) " >&6
8601 else
8602   if test -z "$LD"; then
8603   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8604   for ac_dir in $PATH; do
8605     test -z "$ac_dir" && ac_dir=.
8606     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8607       ac_cv_path_LD="$ac_dir/$ac_prog"
8608       # Check to see if the program is GNU ld.  I'd rather use --version,
8609       # but apparently some GNU ld's only accept -v.
8610       # Break only if it was the GNU/non-GNU ld that we prefer.
8611       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8612         test "$with_gnu_ld" != no && break
8613       else
8614         test "$with_gnu_ld" != yes && break
8615       fi
8616     fi
8617   done
8618   IFS="$ac_save_ifs"
8619 else
8620   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8621 fi
8622 fi
8623
8624 LD="$ac_cv_path_LD"
8625 if test -n "$LD"; then
8626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8627 $as_echo "$LD" >&6; }
8628 else
8629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8630 $as_echo "no" >&6; }
8631 fi
8632 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8634 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8635 if ${ac_cv_prog_gnu_ld+:} false; then :
8636   $as_echo_n "(cached) " >&6
8637 else
8638   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8639 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8640   ac_cv_prog_gnu_ld=yes
8641 else
8642   ac_cv_prog_gnu_ld=no
8643 fi
8644 fi
8645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8646 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8647 with_gnu_ld=$ac_cv_prog_gnu_ld
8648
8649
8650
8651
8652 if test -n "$ac_tool_prefix"; then
8653   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8654 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8656 $as_echo_n "checking for $ac_word... " >&6; }
8657 if ${ac_cv_prog_RANLIB+:} false; then :
8658   $as_echo_n "(cached) " >&6
8659 else
8660   if test -n "$RANLIB"; then
8661   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8662 else
8663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8664 for as_dir in $PATH
8665 do
8666   IFS=$as_save_IFS
8667   test -z "$as_dir" && as_dir=.
8668     for ac_exec_ext in '' $ac_executable_extensions; do
8669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8670     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8672     break 2
8673   fi
8674 done
8675   done
8676 IFS=$as_save_IFS
8677
8678 fi
8679 fi
8680 RANLIB=$ac_cv_prog_RANLIB
8681 if test -n "$RANLIB"; then
8682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8683 $as_echo "$RANLIB" >&6; }
8684 else
8685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8686 $as_echo "no" >&6; }
8687 fi
8688
8689
8690 fi
8691 if test -z "$ac_cv_prog_RANLIB"; then
8692   ac_ct_RANLIB=$RANLIB
8693   # Extract the first word of "ranlib", so it can be a program name with args.
8694 set dummy ranlib; ac_word=$2
8695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8696 $as_echo_n "checking for $ac_word... " >&6; }
8697 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8698   $as_echo_n "(cached) " >&6
8699 else
8700   if test -n "$ac_ct_RANLIB"; then
8701   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8702 else
8703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8704 for as_dir in $PATH
8705 do
8706   IFS=$as_save_IFS
8707   test -z "$as_dir" && as_dir=.
8708     for ac_exec_ext in '' $ac_executable_extensions; do
8709   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8710     ac_cv_prog_ac_ct_RANLIB="ranlib"
8711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8712     break 2
8713   fi
8714 done
8715   done
8716 IFS=$as_save_IFS
8717
8718 fi
8719 fi
8720 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8721 if test -n "$ac_ct_RANLIB"; then
8722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8723 $as_echo "$ac_ct_RANLIB" >&6; }
8724 else
8725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726 $as_echo "no" >&6; }
8727 fi
8728
8729   if test "x$ac_ct_RANLIB" = x; then
8730     RANLIB=":"
8731   else
8732     case $cross_compiling:$ac_tool_warned in
8733 yes:)
8734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8735 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8736 ac_tool_warned=yes ;;
8737 esac
8738     RANLIB=$ac_ct_RANLIB
8739   fi
8740 else
8741   RANLIB="$ac_cv_prog_RANLIB"
8742 fi
8743
8744
8745   if test -n "$ac_tool_prefix"; then
8746   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8747 set dummy ${ac_tool_prefix}strip; ac_word=$2
8748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8749 $as_echo_n "checking for $ac_word... " >&6; }
8750 if ${ac_cv_prog_STRIP+:} false; then :
8751   $as_echo_n "(cached) " >&6
8752 else
8753   if test -n "$STRIP"; then
8754   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8755 else
8756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8757 for as_dir in $PATH
8758 do
8759   IFS=$as_save_IFS
8760   test -z "$as_dir" && as_dir=.
8761     for ac_exec_ext in '' $ac_executable_extensions; do
8762   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8763     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8765     break 2
8766   fi
8767 done
8768   done
8769 IFS=$as_save_IFS
8770
8771 fi
8772 fi
8773 STRIP=$ac_cv_prog_STRIP
8774 if test -n "$STRIP"; then
8775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8776 $as_echo "$STRIP" >&6; }
8777 else
8778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8779 $as_echo "no" >&6; }
8780 fi
8781
8782
8783 fi
8784 if test -z "$ac_cv_prog_STRIP"; then
8785   ac_ct_STRIP=$STRIP
8786   # Extract the first word of "strip", so it can be a program name with args.
8787 set dummy strip; ac_word=$2
8788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8789 $as_echo_n "checking for $ac_word... " >&6; }
8790 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8791   $as_echo_n "(cached) " >&6
8792 else
8793   if test -n "$ac_ct_STRIP"; then
8794   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8795 else
8796 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8797 for as_dir in $PATH
8798 do
8799   IFS=$as_save_IFS
8800   test -z "$as_dir" && as_dir=.
8801     for ac_exec_ext in '' $ac_executable_extensions; do
8802   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8803     ac_cv_prog_ac_ct_STRIP="strip"
8804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8805     break 2
8806   fi
8807 done
8808   done
8809 IFS=$as_save_IFS
8810
8811 fi
8812 fi
8813 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8814 if test -n "$ac_ct_STRIP"; then
8815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8816 $as_echo "$ac_ct_STRIP" >&6; }
8817 else
8818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8819 $as_echo "no" >&6; }
8820 fi
8821
8822   if test "x$ac_ct_STRIP" = x; then
8823     STRIP=":"
8824   else
8825     case $cross_compiling:$ac_tool_warned in
8826 yes:)
8827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8828 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8829 ac_tool_warned=yes ;;
8830 esac
8831     STRIP=$ac_ct_STRIP
8832   fi
8833 else
8834   STRIP="$ac_cv_prog_STRIP"
8835 fi
8836
8837
8838   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8839 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8840   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8841     STRIP_STATIC_LIB="$STRIP -x"
8842     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8843     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8844 $as_echo "yes" >&6; }
8845   else
8846     case $host_os in
8847       darwin*)
8848         STRIP="$STRIP -x"
8849         STRIP_STATIC_LIB=$STRIP
8850         STRIP_SHARED_LIB=$STRIP
8851         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8852 $as_echo "yes" >&6; }
8853         ;;
8854       *)
8855         STRIP_STATIC_LIB=:
8856         STRIP_SHARED_LIB=:
8857         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8858 $as_echo "no" >&6; }
8859         ;;
8860     esac
8861   fi
8862
8863
8864
8865 if test -n "$ac_tool_prefix"; then
8866   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8867 set dummy ${ac_tool_prefix}ar; ac_word=$2
8868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8869 $as_echo_n "checking for $ac_word... " >&6; }
8870 if ${ac_cv_prog_AR+:} false; then :
8871   $as_echo_n "(cached) " >&6
8872 else
8873   if test -n "$AR"; then
8874   ac_cv_prog_AR="$AR" # Let the user override the test.
8875 else
8876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8877 for as_dir in $PATH
8878 do
8879   IFS=$as_save_IFS
8880   test -z "$as_dir" && as_dir=.
8881     for ac_exec_ext in '' $ac_executable_extensions; do
8882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8883     ac_cv_prog_AR="${ac_tool_prefix}ar"
8884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8885     break 2
8886   fi
8887 done
8888   done
8889 IFS=$as_save_IFS
8890
8891 fi
8892 fi
8893 AR=$ac_cv_prog_AR
8894 if test -n "$AR"; then
8895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8896 $as_echo "$AR" >&6; }
8897 else
8898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8899 $as_echo "no" >&6; }
8900 fi
8901
8902
8903 fi
8904 if test -z "$ac_cv_prog_AR"; then
8905   ac_ct_AR=$AR
8906   # Extract the first word of "ar", so it can be a program name with args.
8907 set dummy ar; ac_word=$2
8908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8909 $as_echo_n "checking for $ac_word... " >&6; }
8910 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8911   $as_echo_n "(cached) " >&6
8912 else
8913   if test -n "$ac_ct_AR"; then
8914   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8915 else
8916 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8917 for as_dir in $PATH
8918 do
8919   IFS=$as_save_IFS
8920   test -z "$as_dir" && as_dir=.
8921     for ac_exec_ext in '' $ac_executable_extensions; do
8922   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8923     ac_cv_prog_ac_ct_AR="ar"
8924     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8925     break 2
8926   fi
8927 done
8928   done
8929 IFS=$as_save_IFS
8930
8931 fi
8932 fi
8933 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8934 if test -n "$ac_ct_AR"; then
8935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8936 $as_echo "$ac_ct_AR" >&6; }
8937 else
8938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8939 $as_echo "no" >&6; }
8940 fi
8941
8942   if test "x$ac_ct_AR" = x; then
8943     AR="ar"
8944   else
8945     case $cross_compiling:$ac_tool_warned in
8946 yes:)
8947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8948 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8949 ac_tool_warned=yes ;;
8950 esac
8951     AR=$ac_ct_AR
8952   fi
8953 else
8954   AR="$ac_cv_prog_AR"
8955 fi
8956
8957 if test "$PORTNAME" = "win32"; then
8958   if test -n "$ac_tool_prefix"; then
8959   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8960 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8962 $as_echo_n "checking for $ac_word... " >&6; }
8963 if ${ac_cv_prog_DLLTOOL+:} false; then :
8964   $as_echo_n "(cached) " >&6
8965 else
8966   if test -n "$DLLTOOL"; then
8967   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8968 else
8969 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8970 for as_dir in $PATH
8971 do
8972   IFS=$as_save_IFS
8973   test -z "$as_dir" && as_dir=.
8974     for ac_exec_ext in '' $ac_executable_extensions; do
8975   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8976     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8977     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8978     break 2
8979   fi
8980 done
8981   done
8982 IFS=$as_save_IFS
8983
8984 fi
8985 fi
8986 DLLTOOL=$ac_cv_prog_DLLTOOL
8987 if test -n "$DLLTOOL"; then
8988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8989 $as_echo "$DLLTOOL" >&6; }
8990 else
8991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8992 $as_echo "no" >&6; }
8993 fi
8994
8995
8996 fi
8997 if test -z "$ac_cv_prog_DLLTOOL"; then
8998   ac_ct_DLLTOOL=$DLLTOOL
8999   # Extract the first word of "dlltool", so it can be a program name with args.
9000 set dummy dlltool; ac_word=$2
9001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9002 $as_echo_n "checking for $ac_word... " >&6; }
9003 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9004   $as_echo_n "(cached) " >&6
9005 else
9006   if test -n "$ac_ct_DLLTOOL"; then
9007   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9008 else
9009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9010 for as_dir in $PATH
9011 do
9012   IFS=$as_save_IFS
9013   test -z "$as_dir" && as_dir=.
9014     for ac_exec_ext in '' $ac_executable_extensions; do
9015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9016     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9018     break 2
9019   fi
9020 done
9021   done
9022 IFS=$as_save_IFS
9023
9024 fi
9025 fi
9026 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9027 if test -n "$ac_ct_DLLTOOL"; then
9028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9029 $as_echo "$ac_ct_DLLTOOL" >&6; }
9030 else
9031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9032 $as_echo "no" >&6; }
9033 fi
9034
9035   if test "x$ac_ct_DLLTOOL" = x; then
9036     DLLTOOL="dlltool"
9037   else
9038     case $cross_compiling:$ac_tool_warned in
9039 yes:)
9040 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9041 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9042 ac_tool_warned=yes ;;
9043 esac
9044     DLLTOOL=$ac_ct_DLLTOOL
9045   fi
9046 else
9047   DLLTOOL="$ac_cv_prog_DLLTOOL"
9048 fi
9049
9050   if test -n "$ac_tool_prefix"; then
9051   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9052 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9054 $as_echo_n "checking for $ac_word... " >&6; }
9055 if ${ac_cv_prog_DLLWRAP+:} false; then :
9056   $as_echo_n "(cached) " >&6
9057 else
9058   if test -n "$DLLWRAP"; then
9059   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9060 else
9061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9062 for as_dir in $PATH
9063 do
9064   IFS=$as_save_IFS
9065   test -z "$as_dir" && as_dir=.
9066     for ac_exec_ext in '' $ac_executable_extensions; do
9067   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9068     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9070     break 2
9071   fi
9072 done
9073   done
9074 IFS=$as_save_IFS
9075
9076 fi
9077 fi
9078 DLLWRAP=$ac_cv_prog_DLLWRAP
9079 if test -n "$DLLWRAP"; then
9080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9081 $as_echo "$DLLWRAP" >&6; }
9082 else
9083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9084 $as_echo "no" >&6; }
9085 fi
9086
9087
9088 fi
9089 if test -z "$ac_cv_prog_DLLWRAP"; then
9090   ac_ct_DLLWRAP=$DLLWRAP
9091   # Extract the first word of "dllwrap", so it can be a program name with args.
9092 set dummy dllwrap; ac_word=$2
9093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9094 $as_echo_n "checking for $ac_word... " >&6; }
9095 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9096   $as_echo_n "(cached) " >&6
9097 else
9098   if test -n "$ac_ct_DLLWRAP"; then
9099   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9100 else
9101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9102 for as_dir in $PATH
9103 do
9104   IFS=$as_save_IFS
9105   test -z "$as_dir" && as_dir=.
9106     for ac_exec_ext in '' $ac_executable_extensions; do
9107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9108     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9110     break 2
9111   fi
9112 done
9113   done
9114 IFS=$as_save_IFS
9115
9116 fi
9117 fi
9118 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9119 if test -n "$ac_ct_DLLWRAP"; then
9120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9121 $as_echo "$ac_ct_DLLWRAP" >&6; }
9122 else
9123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124 $as_echo "no" >&6; }
9125 fi
9126
9127   if test "x$ac_ct_DLLWRAP" = x; then
9128     DLLWRAP="dllwrap"
9129   else
9130     case $cross_compiling:$ac_tool_warned in
9131 yes:)
9132 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9133 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9134 ac_tool_warned=yes ;;
9135 esac
9136     DLLWRAP=$ac_ct_DLLWRAP
9137   fi
9138 else
9139   DLLWRAP="$ac_cv_prog_DLLWRAP"
9140 fi
9141
9142   if test -n "$ac_tool_prefix"; then
9143   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9144 set dummy ${ac_tool_prefix}windres; ac_word=$2
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9146 $as_echo_n "checking for $ac_word... " >&6; }
9147 if ${ac_cv_prog_WINDRES+:} false; then :
9148   $as_echo_n "(cached) " >&6
9149 else
9150   if test -n "$WINDRES"; then
9151   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9152 else
9153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9154 for as_dir in $PATH
9155 do
9156   IFS=$as_save_IFS
9157   test -z "$as_dir" && as_dir=.
9158     for ac_exec_ext in '' $ac_executable_extensions; do
9159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9160     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9162     break 2
9163   fi
9164 done
9165   done
9166 IFS=$as_save_IFS
9167
9168 fi
9169 fi
9170 WINDRES=$ac_cv_prog_WINDRES
9171 if test -n "$WINDRES"; then
9172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9173 $as_echo "$WINDRES" >&6; }
9174 else
9175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9176 $as_echo "no" >&6; }
9177 fi
9178
9179
9180 fi
9181 if test -z "$ac_cv_prog_WINDRES"; then
9182   ac_ct_WINDRES=$WINDRES
9183   # Extract the first word of "windres", so it can be a program name with args.
9184 set dummy windres; ac_word=$2
9185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9186 $as_echo_n "checking for $ac_word... " >&6; }
9187 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9188   $as_echo_n "(cached) " >&6
9189 else
9190   if test -n "$ac_ct_WINDRES"; then
9191   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9192 else
9193 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9194 for as_dir in $PATH
9195 do
9196   IFS=$as_save_IFS
9197   test -z "$as_dir" && as_dir=.
9198     for ac_exec_ext in '' $ac_executable_extensions; do
9199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9200     ac_cv_prog_ac_ct_WINDRES="windres"
9201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9202     break 2
9203   fi
9204 done
9205   done
9206 IFS=$as_save_IFS
9207
9208 fi
9209 fi
9210 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9211 if test -n "$ac_ct_WINDRES"; then
9212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9213 $as_echo "$ac_ct_WINDRES" >&6; }
9214 else
9215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9216 $as_echo "no" >&6; }
9217 fi
9218
9219   if test "x$ac_ct_WINDRES" = x; then
9220     WINDRES="windres"
9221   else
9222     case $cross_compiling:$ac_tool_warned in
9223 yes:)
9224 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9225 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9226 ac_tool_warned=yes ;;
9227 esac
9228     WINDRES=$ac_ct_WINDRES
9229   fi
9230 else
9231   WINDRES="$ac_cv_prog_WINDRES"
9232 fi
9233
9234 fi
9235
9236 # Find a good install program.  We prefer a C program (faster),
9237 # so one script is as good as another.  But avoid the broken or
9238 # incompatible versions:
9239 # SysV /etc/install, /usr/sbin/install
9240 # SunOS /usr/etc/install
9241 # IRIX /sbin/install
9242 # AIX /bin/install
9243 # AmigaOS /C/install, which installs bootblocks on floppy discs
9244 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9245 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9246 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9247 # OS/2's system install, which has a completely different semantic
9248 # ./install, which can be erroneously created by make from ./install.sh.
9249 # Reject install programs that cannot install multiple files.
9250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9251 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9252 if test -z "$INSTALL"; then
9253 if ${ac_cv_path_install+:} false; then :
9254   $as_echo_n "(cached) " >&6
9255 else
9256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9257 for as_dir in $PATH
9258 do
9259   IFS=$as_save_IFS
9260   test -z "$as_dir" && as_dir=.
9261     # Account for people who put trailing slashes in PATH elements.
9262 case $as_dir/ in #((
9263   ./ | .// | /[cC]/* | \
9264   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9265   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9266   /usr/ucb/* ) ;;
9267   *)
9268     # OSF1 and SCO ODT 3.0 have their own names for install.
9269     # Don't use installbsd from OSF since it installs stuff as root
9270     # by default.
9271     for ac_prog in ginstall scoinst install; do
9272       for ac_exec_ext in '' $ac_executable_extensions; do
9273         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9274           if test $ac_prog = install &&
9275             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9276             # AIX install.  It has an incompatible calling convention.
9277             :
9278           elif test $ac_prog = install &&
9279             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9280             # program-specific install script used by HP pwplus--don't use.
9281             :
9282           else
9283             rm -rf conftest.one conftest.two conftest.dir
9284             echo one > conftest.one
9285             echo two > conftest.two
9286             mkdir conftest.dir
9287             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9288               test -s conftest.one && test -s conftest.two &&
9289               test -s conftest.dir/conftest.one &&
9290               test -s conftest.dir/conftest.two
9291             then
9292               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9293               break 3
9294             fi
9295           fi
9296         fi
9297       done
9298     done
9299     ;;
9300 esac
9301
9302   done
9303 IFS=$as_save_IFS
9304
9305 rm -rf conftest.one conftest.two conftest.dir
9306
9307 fi
9308   if test "${ac_cv_path_install+set}" = set; then
9309     INSTALL=$ac_cv_path_install
9310   else
9311     # As a last resort, use the slow shell script.  Don't cache a
9312     # value for INSTALL within a source directory, because that will
9313     # break other packages using the cache if that directory is
9314     # removed, or if the value is a relative name.
9315     INSTALL=$ac_install_sh
9316   fi
9317 fi
9318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9319 $as_echo "$INSTALL" >&6; }
9320
9321 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9322 # It thinks the first close brace ends the variable substitution.
9323 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9324
9325 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9326
9327 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9328
9329 # When Autoconf chooses install-sh as install program it tries to generate
9330 # a relative path to it in each makefile where it substitutes it. This clashes
9331 # with our Makefile.global concept. This workaround helps.
9332 case $INSTALL in
9333   *install-sh*) install_bin='';;
9334   *) install_bin=$INSTALL;;
9335 esac
9336
9337
9338 if test -z "$TAR"; then
9339   for ac_prog in tar
9340 do
9341   # Extract the first word of "$ac_prog", so it can be a program name with args.
9342 set dummy $ac_prog; ac_word=$2
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9344 $as_echo_n "checking for $ac_word... " >&6; }
9345 if ${ac_cv_path_TAR+:} false; then :
9346   $as_echo_n "(cached) " >&6
9347 else
9348   case $TAR in
9349   [\\/]* | ?:[\\/]*)
9350   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9351   ;;
9352   *)
9353   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9354 for as_dir in $PATH
9355 do
9356   IFS=$as_save_IFS
9357   test -z "$as_dir" && as_dir=.
9358     for ac_exec_ext in '' $ac_executable_extensions; do
9359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9360     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9362     break 2
9363   fi
9364 done
9365   done
9366 IFS=$as_save_IFS
9367
9368   ;;
9369 esac
9370 fi
9371 TAR=$ac_cv_path_TAR
9372 if test -n "$TAR"; then
9373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9374 $as_echo "$TAR" >&6; }
9375 else
9376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377 $as_echo "no" >&6; }
9378 fi
9379
9380
9381   test -n "$TAR" && break
9382 done
9383
9384 else
9385   # Report the value of TAR in configure's output in all cases.
9386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9387 $as_echo_n "checking for TAR... " >&6; }
9388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9389 $as_echo "$TAR" >&6; }
9390 fi
9391
9392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9393 $as_echo_n "checking whether ln -s works... " >&6; }
9394 LN_S=$as_ln_s
9395 if test "$LN_S" = "ln -s"; then
9396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9397 $as_echo "yes" >&6; }
9398 else
9399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9400 $as_echo "no, using $LN_S" >&6; }
9401 fi
9402
9403 for ac_prog in gawk mawk nawk awk
9404 do
9405   # Extract the first word of "$ac_prog", so it can be a program name with args.
9406 set dummy $ac_prog; ac_word=$2
9407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9408 $as_echo_n "checking for $ac_word... " >&6; }
9409 if ${ac_cv_prog_AWK+:} false; then :
9410   $as_echo_n "(cached) " >&6
9411 else
9412   if test -n "$AWK"; then
9413   ac_cv_prog_AWK="$AWK" # Let the user override the test.
9414 else
9415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9416 for as_dir in $PATH
9417 do
9418   IFS=$as_save_IFS
9419   test -z "$as_dir" && as_dir=.
9420     for ac_exec_ext in '' $ac_executable_extensions; do
9421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9422     ac_cv_prog_AWK="$ac_prog"
9423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9424     break 2
9425   fi
9426 done
9427   done
9428 IFS=$as_save_IFS
9429
9430 fi
9431 fi
9432 AWK=$ac_cv_prog_AWK
9433 if test -n "$AWK"; then
9434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9435 $as_echo "$AWK" >&6; }
9436 else
9437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9438 $as_echo "no" >&6; }
9439 fi
9440
9441
9442   test -n "$AWK" && break
9443 done
9444
9445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9446 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9447 if test -z "$MKDIR_P"; then
9448   if ${ac_cv_path_mkdir+:} false; then :
9449   $as_echo_n "(cached) " >&6
9450 else
9451   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9452 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9453 do
9454   IFS=$as_save_IFS
9455   test -z "$as_dir" && as_dir=.
9456     for ac_prog in mkdir gmkdir; do
9457          for ac_exec_ext in '' $ac_executable_extensions; do
9458            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9459            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9460              'mkdir (GNU coreutils) '* | \
9461              'mkdir (coreutils) '* | \
9462              'mkdir (fileutils) '4.1*)
9463                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9464                break 3;;
9465            esac
9466          done
9467        done
9468   done
9469 IFS=$as_save_IFS
9470
9471 fi
9472
9473   test -d ./--version && rmdir ./--version
9474   if test "${ac_cv_path_mkdir+set}" = set; then
9475     MKDIR_P="$ac_cv_path_mkdir -p"
9476   else
9477     # As a last resort, use the slow shell script.  Don't cache a
9478     # value for MKDIR_P within a source directory, because that will
9479     # break other packages using the cache if that directory is
9480     # removed, or if the value is a relative name.
9481     MKDIR_P="$ac_install_sh -d"
9482   fi
9483 fi
9484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9485 $as_echo "$MKDIR_P" >&6; }
9486
9487 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9488 # a relative path to it in each makefile where it substitutes it. This clashes
9489 # with our Makefile.global concept. This workaround helps.
9490 case $MKDIR_P in
9491   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9492 esac
9493
9494 if test -z "$BISON"; then
9495   for ac_prog in bison
9496 do
9497   # Extract the first word of "$ac_prog", so it can be a program name with args.
9498 set dummy $ac_prog; ac_word=$2
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9500 $as_echo_n "checking for $ac_word... " >&6; }
9501 if ${ac_cv_path_BISON+:} false; then :
9502   $as_echo_n "(cached) " >&6
9503 else
9504   case $BISON in
9505   [\\/]* | ?:[\\/]*)
9506   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9507   ;;
9508   *)
9509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9510 for as_dir in $PATH
9511 do
9512   IFS=$as_save_IFS
9513   test -z "$as_dir" && as_dir=.
9514     for ac_exec_ext in '' $ac_executable_extensions; do
9515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9516     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9518     break 2
9519   fi
9520 done
9521   done
9522 IFS=$as_save_IFS
9523
9524   ;;
9525 esac
9526 fi
9527 BISON=$ac_cv_path_BISON
9528 if test -n "$BISON"; then
9529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9530 $as_echo "$BISON" >&6; }
9531 else
9532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9533 $as_echo "no" >&6; }
9534 fi
9535
9536
9537   test -n "$BISON" && break
9538 done
9539
9540 else
9541   # Report the value of BISON in configure's output in all cases.
9542   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9543 $as_echo_n "checking for BISON... " >&6; }
9544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9545 $as_echo "$BISON" >&6; }
9546 fi
9547
9548
9549 if test "$BISON"; then
9550   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9551   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9552 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9553   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9554   then
9555     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9556 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9557 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9558 $as_echo "$as_me: WARNING:
9559 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9560 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9561     BISON=""
9562   fi
9563   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9564   # of the now preferred %name-prefix "base_yy", but the latter
9565   # doesn't work with Bison 2.3 or less.  So for now we silence the
9566   # deprecation warnings.
9567   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9568   then
9569     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9570   fi
9571 fi
9572
9573 if test -z "$BISON"; then
9574   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9575 *** Without Bison you will not be able to build PostgreSQL from Git nor
9576 *** change any of the parser definition files.  You can obtain Bison from
9577 *** a GNU mirror site.  (If you are using the official distribution of
9578 *** PostgreSQL then you do not need to worry about this, because the Bison
9579 *** output is pre-generated.)" >&5
9580 $as_echo "$as_me: WARNING:
9581 *** Without Bison you will not be able to build PostgreSQL from Git nor
9582 *** change any of the parser definition files.  You can obtain Bison from
9583 *** a GNU mirror site.  (If you are using the official distribution of
9584 *** PostgreSQL then you do not need to worry about this, because the Bison
9585 *** output is pre-generated.)" >&2;}
9586 fi
9587 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9588
9589
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9591 $as_echo_n "checking for flex... " >&6; }
9592 if ${pgac_cv_path_flex+:} false; then :
9593   $as_echo_n "(cached) " >&6
9594 else
9595   # Let the user override the test
9596 if test -n "$FLEX"; then
9597   pgac_cv_path_flex=$FLEX
9598 else
9599   pgac_save_IFS=$IFS
9600   IFS=$PATH_SEPARATOR
9601   for pgac_dir in $PATH; do
9602     IFS=$pgac_save_IFS
9603     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9604       pgac_dir=`pwd`
9605     fi
9606     for pgac_prog in flex lex; do
9607       pgac_candidate="$pgac_dir/$pgac_prog"
9608       if test -f "$pgac_candidate" \
9609         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9610       then
9611         echo '%%'  > conftest.l
9612         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9613           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9614           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;}'
9615           then
9616             pgac_cv_path_flex=$pgac_candidate
9617             break 2
9618           else
9619             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9620 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9621 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9622 $as_echo "$as_me: WARNING:
9623 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9624 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9625           fi
9626         fi
9627       fi
9628     done
9629   done
9630   rm -f conftest.l lex.yy.c
9631   : ${pgac_cv_path_flex=no}
9632 fi
9633
9634 fi
9635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9636 $as_echo "$pgac_cv_path_flex" >&6; }
9637 if test x"$pgac_cv_path_flex" = x"no"; then
9638   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9639 *** Without Flex you will not be able to build PostgreSQL from Git nor
9640 *** change any of the scanner definition files.  You can obtain Flex from
9641 *** a GNU mirror site.  (If you are using the official distribution of
9642 *** PostgreSQL then you do not need to worry about this because the Flex
9643 *** output is pre-generated.)" >&5
9644 $as_echo "$as_me: WARNING:
9645 *** Without Flex you will not be able to build PostgreSQL from Git nor
9646 *** change any of the scanner definition files.  You can obtain Flex from
9647 *** a GNU mirror site.  (If you are using the official distribution of
9648 *** PostgreSQL then you do not need to worry about this because the Flex
9649 *** output is pre-generated.)" >&2;}
9650
9651   FLEX=
9652 else
9653   FLEX=$pgac_cv_path_flex
9654   pgac_flex_version=`$FLEX --version 2>/dev/null`
9655   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9656 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9657 fi
9658
9659
9660
9661
9662
9663 if test -z "$PERL"; then
9664   for ac_prog in perl
9665 do
9666   # Extract the first word of "$ac_prog", so it can be a program name with args.
9667 set dummy $ac_prog; ac_word=$2
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9669 $as_echo_n "checking for $ac_word... " >&6; }
9670 if ${ac_cv_path_PERL+:} false; then :
9671   $as_echo_n "(cached) " >&6
9672 else
9673   case $PERL in
9674   [\\/]* | ?:[\\/]*)
9675   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9676   ;;
9677   *)
9678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9679 for as_dir in $PATH
9680 do
9681   IFS=$as_save_IFS
9682   test -z "$as_dir" && as_dir=.
9683     for ac_exec_ext in '' $ac_executable_extensions; do
9684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9685     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9687     break 2
9688   fi
9689 done
9690   done
9691 IFS=$as_save_IFS
9692
9693   ;;
9694 esac
9695 fi
9696 PERL=$ac_cv_path_PERL
9697 if test -n "$PERL"; then
9698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9699 $as_echo "$PERL" >&6; }
9700 else
9701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9702 $as_echo "no" >&6; }
9703 fi
9704
9705
9706   test -n "$PERL" && break
9707 done
9708
9709 else
9710   # Report the value of PERL in configure's output in all cases.
9711   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9712 $as_echo_n "checking for PERL... " >&6; }
9713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9714 $as_echo "$PERL" >&6; }
9715 fi
9716
9717
9718 if test "$PERL"; then
9719   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'`
9720   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9721 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9722   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9723     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9724   then
9725     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9726 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9727 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9728 $as_echo "$as_me: WARNING:
9729 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9730 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9731     PERL=""
9732   fi
9733 fi
9734
9735 if test -z "$PERL"; then
9736   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9737 *** Without Perl you will not be able to build PostgreSQL from Git.
9738 *** You can obtain Perl from any CPAN mirror site.
9739 *** (If you are using the official distribution of PostgreSQL then you do not
9740 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9741 $as_echo "$as_me: WARNING:
9742 *** Without Perl you will not be able to build PostgreSQL from Git.
9743 *** You can obtain Perl from any CPAN mirror site.
9744 *** (If you are using the official distribution of PostgreSQL then you do not
9745 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9746 fi
9747
9748 if test "$with_perl" = yes; then
9749   if test -z "$PERL"; then
9750     as_fn_error $? "Perl not found" "$LINENO" 5
9751   fi
9752
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9754 $as_echo_n "checking for Perl archlibexp... " >&6; }
9755 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9756 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9758 $as_echo "$perl_archlibexp" >&6; }
9759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9760 $as_echo_n "checking for Perl privlibexp... " >&6; }
9761 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9762 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9764 $as_echo "$perl_privlibexp" >&6; }
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9766 $as_echo_n "checking for Perl useshrplib... " >&6; }
9767 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9768 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9770 $as_echo "$perl_useshrplib" >&6; }
9771   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9772     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9773 You might have to rebuild your Perl installation.  Refer to the
9774 documentation for details.  Use --without-perl to disable building
9775 PL/Perl." "$LINENO" 5
9776   fi
9777   # On most platforms, archlibexp is also where the Perl include files live ...
9778   perl_includespec="-I$perl_archlibexp/CORE"
9779   # ... but on newer macOS versions, we must use -iwithsysroot to look
9780   # under $PG_SYSROOT
9781   if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9782     if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9783       perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9784     fi
9785   fi
9786
9787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9788 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9789 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9791 $as_echo "$perl_ccflags" >&6; }
9792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9793 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9794 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9796 $as_echo "$perl_embed_ccflags" >&6; }
9797
9798
9799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9800 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9801 if test "$PORTNAME" = "win32" ; then
9802         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9803         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9804                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9805         else
9806                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9807                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9808                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9809                 fi
9810         fi
9811 else
9812         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9813         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9814         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9815 fi
9816 if test -z "$perl_embed_ldflags" ; then
9817         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9818 $as_echo "no" >&6; }
9819         as_fn_error $? "could not determine flags for linking embedded Perl.
9820 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9821 installed." "$LINENO" 5
9822 else
9823         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9824 $as_echo "$perl_embed_ldflags" >&6; }
9825 fi
9826
9827 fi
9828
9829 if test "$with_python" = yes; then
9830   if test -z "$PYTHON"; then
9831   for ac_prog in python
9832 do
9833   # Extract the first word of "$ac_prog", so it can be a program name with args.
9834 set dummy $ac_prog; ac_word=$2
9835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9836 $as_echo_n "checking for $ac_word... " >&6; }
9837 if ${ac_cv_path_PYTHON+:} false; then :
9838   $as_echo_n "(cached) " >&6
9839 else
9840   case $PYTHON in
9841   [\\/]* | ?:[\\/]*)
9842   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9843   ;;
9844   *)
9845   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9846 for as_dir in $PATH
9847 do
9848   IFS=$as_save_IFS
9849   test -z "$as_dir" && as_dir=.
9850     for ac_exec_ext in '' $ac_executable_extensions; do
9851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9852     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9854     break 2
9855   fi
9856 done
9857   done
9858 IFS=$as_save_IFS
9859
9860   ;;
9861 esac
9862 fi
9863 PYTHON=$ac_cv_path_PYTHON
9864 if test -n "$PYTHON"; then
9865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9866 $as_echo "$PYTHON" >&6; }
9867 else
9868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9869 $as_echo "no" >&6; }
9870 fi
9871
9872
9873   test -n "$PYTHON" && break
9874 done
9875
9876 else
9877   # Report the value of PYTHON in configure's output in all cases.
9878   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9879 $as_echo_n "checking for PYTHON... " >&6; }
9880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9881 $as_echo "$PYTHON" >&6; }
9882 fi
9883
9884 if test x"$PYTHON" = x""; then
9885   as_fn_error $? "Python not found" "$LINENO" 5
9886 fi
9887
9888
9889 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9890 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9891 $as_echo "$as_me: using python $python_fullversion" >&6;}
9892 # python_fullversion is typically n.n.n plus some trailing junk
9893 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9894 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9895 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9896 # Reject unsupported Python versions as soon as practical.
9897 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9898   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9899 fi
9900
9901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9902 $as_echo_n "checking for Python distutils module... " >&6; }
9903 if "${PYTHON}" -c 'import distutils' 2>&5
9904 then
9905     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9906 $as_echo "yes" >&6; }
9907 else
9908     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9909 $as_echo "no" >&6; }
9910     as_fn_error $? "distutils module not found" "$LINENO" 5
9911 fi
9912
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9914 $as_echo_n "checking Python configuration directory... " >&6; }
9915 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9917 $as_echo "$python_configdir" >&6; }
9918
9919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9920 $as_echo_n "checking Python include directories... " >&6; }
9921 python_includespec=`${PYTHON} -c "
9922 import distutils.sysconfig
9923 a = '-I' + distutils.sysconfig.get_python_inc(False)
9924 b = '-I' + distutils.sysconfig.get_python_inc(True)
9925 if a == b:
9926     print(a)
9927 else:
9928     print(a + ' ' + b)"`
9929 if test "$PORTNAME" = win32 ; then
9930     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9931 fi
9932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9933 $as_echo "$python_includespec" >&6; }
9934
9935
9936
9937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9938 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9939
9940 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9941 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9942
9943 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9944 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9945 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9946 then
9947         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9948         found_shlib=1
9949 else
9950         # Otherwise, guess the base name of the shlib.
9951         # LDVERSION was added in Python 3.2, before that use VERSION,
9952         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9953         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9954         if test x"${python_ldversion}" != x""; then
9955                 ldlibrary="python${python_ldversion}"
9956         else
9957                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9958                 if test x"${python_version_var}" != x""; then
9959                         ldlibrary="python${python_version_var}"
9960                 else
9961                         ldlibrary="python${python_version}"
9962                 fi
9963         fi
9964         # Search for a likely-looking file.
9965         found_shlib=0
9966         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9967         do
9968                 # We don't know the platform DLSUFFIX here, so check 'em all.
9969                 for e in .so .dll .dylib .sl; do
9970                         if test -e "$d/lib${ldlibrary}$e"; then
9971                                 python_libdir="$d"
9972                                 found_shlib=1
9973                                 break 2
9974                         fi
9975                 done
9976         done
9977         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9978         # (".so.n.n") as well. However, check this only after failing to find
9979         # ".so" anywhere, because yet other platforms (Debian) put the .so
9980         # symlink in a different directory from the underlying versioned shlib.
9981         if test "$found_shlib" != 1; then
9982                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9983                 do
9984                         for f in "$d/lib${ldlibrary}.so."* ; do
9985                                 if test -e "$f"; then
9986                                         python_libdir="$d"
9987                                         found_shlib=1
9988                                         break 2
9989                                 fi
9990                         done
9991                 done
9992         fi
9993         # As usual, Windows has its own ideas.  Possible default library
9994         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9995         # and the "lib" prefix might not be there.
9996         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9997                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9998                 do
9999                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10000                                 if test -e "$f"; then
10001                                         python_libdir="$d"
10002                                         found_shlib=1
10003                                         break 2
10004                                 fi
10005                         done
10006                 done
10007         fi
10008 fi
10009 if test "$found_shlib" != 1; then
10010         as_fn_error $? "could not find shared library for Python
10011 You might have to rebuild your Python installation.  Refer to the
10012 documentation for details.  Use --without-python to disable building
10013 PL/Python." "$LINENO" 5
10014 fi
10015 python_libspec="-L${python_libdir} -l${ldlibrary}"
10016
10017 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10018
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10020 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10021
10022
10023
10024 fi
10025
10026 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
10027   if test -z "$ZIC"; then
10028   for ac_prog in zic
10029 do
10030   # Extract the first word of "$ac_prog", so it can be a program name with args.
10031 set dummy $ac_prog; ac_word=$2
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10033 $as_echo_n "checking for $ac_word... " >&6; }
10034 if ${ac_cv_path_ZIC+:} false; then :
10035   $as_echo_n "(cached) " >&6
10036 else
10037   case $ZIC in
10038   [\\/]* | ?:[\\/]*)
10039   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10040   ;;
10041   *)
10042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10043 for as_dir in $PATH
10044 do
10045   IFS=$as_save_IFS
10046   test -z "$as_dir" && as_dir=.
10047     for ac_exec_ext in '' $ac_executable_extensions; do
10048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10049     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10051     break 2
10052   fi
10053 done
10054   done
10055 IFS=$as_save_IFS
10056
10057   ;;
10058 esac
10059 fi
10060 ZIC=$ac_cv_path_ZIC
10061 if test -n "$ZIC"; then
10062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10063 $as_echo "$ZIC" >&6; }
10064 else
10065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10066 $as_echo "no" >&6; }
10067 fi
10068
10069
10070   test -n "$ZIC" && break
10071 done
10072
10073 else
10074   # Report the value of ZIC in configure's output in all cases.
10075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10076 $as_echo_n "checking for ZIC... " >&6; }
10077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10078 $as_echo "$ZIC" >&6; }
10079 fi
10080
10081   if test -z "$ZIC"; then
10082     as_fn_error $? "
10083 When cross-compiling, either use the option --with-system-tzdata to use
10084 existing time-zone data, or set the environment variable ZIC to a zic
10085 program to use during the build." "$LINENO" 5
10086   fi
10087 fi
10088
10089 #
10090 # Pthreads
10091 #
10092 # For each platform, we need to know about any special compile and link
10093 # libraries, and whether the normal C function names are thread-safe.
10094 # See the comment at the top of src/port/thread.c for more information.
10095 # WIN32 doesn't need the pthread tests;  it always uses threads
10096 #
10097 # These tests are run before the library-tests, because linking with the
10098 # other libraries can pull in the pthread functions as a side-effect.  We
10099 # want to use the -pthread or similar flags directly, and not rely on
10100 # the side-effects of linking with some other library.
10101 #
10102 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
10103 # invocation below is the first one in the script, and autoconf generates
10104 # additional code for that, which must not be inside the if-block. AS_IF
10105 # knows how to do that.
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10107 $as_echo_n "checking for ANSI C header files... " >&6; }
10108 if ${ac_cv_header_stdc+:} false; then :
10109   $as_echo_n "(cached) " >&6
10110 else
10111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10112 /* end confdefs.h.  */
10113 #include <stdlib.h>
10114 #include <stdarg.h>
10115 #include <string.h>
10116 #include <float.h>
10117
10118 int
10119 main ()
10120 {
10121
10122   ;
10123   return 0;
10124 }
10125 _ACEOF
10126 if ac_fn_c_try_compile "$LINENO"; then :
10127   ac_cv_header_stdc=yes
10128 else
10129   ac_cv_header_stdc=no
10130 fi
10131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10132
10133 if test $ac_cv_header_stdc = yes; then
10134   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10135   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10136 /* end confdefs.h.  */
10137 #include <string.h>
10138
10139 _ACEOF
10140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10141   $EGREP "memchr" >/dev/null 2>&1; then :
10142
10143 else
10144   ac_cv_header_stdc=no
10145 fi
10146 rm -f conftest*
10147
10148 fi
10149
10150 if test $ac_cv_header_stdc = yes; then
10151   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10153 /* end confdefs.h.  */
10154 #include <stdlib.h>
10155
10156 _ACEOF
10157 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10158   $EGREP "free" >/dev/null 2>&1; then :
10159
10160 else
10161   ac_cv_header_stdc=no
10162 fi
10163 rm -f conftest*
10164
10165 fi
10166
10167 if test $ac_cv_header_stdc = yes; then
10168   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10169   if test "$cross_compiling" = yes; then :
10170   :
10171 else
10172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10173 /* end confdefs.h.  */
10174 #include <ctype.h>
10175 #include <stdlib.h>
10176 #if ((' ' & 0x0FF) == 0x020)
10177 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10178 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10179 #else
10180 # define ISLOWER(c) \
10181                    (('a' <= (c) && (c) <= 'i') \
10182                      || ('j' <= (c) && (c) <= 'r') \
10183                      || ('s' <= (c) && (c) <= 'z'))
10184 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10185 #endif
10186
10187 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10188 int
10189 main ()
10190 {
10191   int i;
10192   for (i = 0; i < 256; i++)
10193     if (XOR (islower (i), ISLOWER (i))
10194         || toupper (i) != TOUPPER (i))
10195       return 2;
10196   return 0;
10197 }
10198 _ACEOF
10199 if ac_fn_c_try_run "$LINENO"; then :
10200
10201 else
10202   ac_cv_header_stdc=no
10203 fi
10204 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10205   conftest.$ac_objext conftest.beam conftest.$ac_ext
10206 fi
10207
10208 fi
10209 fi
10210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10211 $as_echo "$ac_cv_header_stdc" >&6; }
10212 if test $ac_cv_header_stdc = yes; then
10213
10214 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10215
10216 fi
10217
10218 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10219 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10220                   inttypes.h stdint.h unistd.h
10221 do :
10222   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10223 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10224 "
10225 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10226   cat >>confdefs.h <<_ACEOF
10227 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10228 _ACEOF
10229
10230 fi
10231
10232 done
10233
10234
10235 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10236    # then
10237
10238
10239
10240 ac_ext=c
10241 ac_cpp='$CPP $CPPFLAGS'
10242 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10243 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10244 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10245
10246 ax_pthread_ok=no
10247
10248 # We used to check for pthread.h first, but this fails if pthread.h
10249 # requires special compiler flags (e.g. on Tru64 or Sequent).
10250 # It gets checked for in the link test anyway.
10251
10252 # First of all, check if the user has set any of the PTHREAD_LIBS,
10253 # etcetera environment variables, and if threads linking works using
10254 # them:
10255 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
10256         save_CFLAGS="$CFLAGS"
10257         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10258         save_LIBS="$LIBS"
10259         LIBS="$PTHREAD_LIBS $LIBS"
10260         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10261 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10262         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10263 /* end confdefs.h.  */
10264
10265 /* Override any GCC internal prototype to avoid an error.
10266    Use char because int might match the return type of a GCC
10267    builtin and then its argument prototype would still apply.  */
10268 #ifdef __cplusplus
10269 extern "C"
10270 #endif
10271 char pthread_join ();
10272 int
10273 main ()
10274 {
10275 return pthread_join ();
10276   ;
10277   return 0;
10278 }
10279 _ACEOF
10280 if ac_fn_c_try_link "$LINENO"; then :
10281   ax_pthread_ok=yes
10282 fi
10283 rm -f core conftest.err conftest.$ac_objext \
10284     conftest$ac_exeext conftest.$ac_ext
10285         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10286 $as_echo "$ax_pthread_ok" >&6; }
10287         if test x"$ax_pthread_ok" = xno; then
10288                 PTHREAD_LIBS=""
10289                 PTHREAD_CFLAGS=""
10290         fi
10291         LIBS="$save_LIBS"
10292         CFLAGS="$save_CFLAGS"
10293 fi
10294
10295 # We must check for the threads library under a number of different
10296 # names; the ordering is very important because some systems
10297 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10298 # libraries is broken (non-POSIX).
10299
10300 # Create a list of thread flags to try.  Items starting with a "-" are
10301 # C compiler flags, and other items are library names, except for "none"
10302 # which indicates that we try without any flags at all, and "pthread-config"
10303 # which is a program returning the flags for the Pth emulation library.
10304
10305 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
10306
10307 # The ordering *is* (sometimes) important.  Some notes on the
10308 # individual items follow:
10309
10310 # pthreads: AIX (must check this before -lpthread)
10311 # none: in case threads are in libc; should be tried before -Kthread and
10312 #       other compiler flags to prevent continual compiler warnings
10313 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10314 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10315 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10316 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10317 # -pthreads: Solaris/gcc
10318 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10319 #      doesn't hurt to check since this sometimes defines pthreads and
10320 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10321 #      is present but should not be used directly)
10322 # -mthreads: Mingw32/gcc, Lynx/gcc
10323 # pthread: Linux, etcetera
10324 # --thread-safe: KAI C++
10325 # pthread-config: use pthread-config program (for GNU Pth library)
10326
10327 case $host_os in
10328
10329         hpux*)
10330
10331         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10332         # multi-threading and also sets -lpthread."
10333
10334         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10335         ;;
10336
10337         openedition*)
10338
10339         # IBM z/OS requires a feature-test macro to be defined in order to
10340         # enable POSIX threads at all, so give the user a hint if this is
10341         # not set. (We don't define these ourselves, as they can affect
10342         # other portions of the system API in unpredictable ways.)
10343
10344         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10345 /* end confdefs.h.  */
10346
10347 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10348              AX_PTHREAD_ZOS_MISSING
10349 #            endif
10350
10351 _ACEOF
10352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10353   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10354   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10355 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10356 fi
10357 rm -f conftest*
10358
10359         ;;
10360
10361         solaris*)
10362
10363         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
10364         # check that first.  On some older versions, libc contains stubbed
10365         # (non-functional) versions of the pthreads routines, so link-based
10366         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
10367         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
10368         # a function called by this macro, so we could check for that, but
10369         # who knows whether they'll stub that too in a future libc.)  So
10370         # we'll look for -pthreads and -lpthread shortly thereafter.
10371
10372         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
10373         ;;
10374 esac
10375
10376 # Older versions of Clang only give a warning instead of an error for an
10377 # unrecognized option, unless we specify -Werror. (We throw in some extra
10378 # Clang warning flags for good measure.)
10379
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
10381 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
10382 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
10383   $as_echo_n "(cached) " >&6
10384 else
10385   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
10386      save_CFLAGS="$CFLAGS"
10387      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
10388      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
10389      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10390 /* end confdefs.h.  */
10391 int foo(void);
10392 int
10393 main ()
10394 {
10395 foo()
10396   ;
10397   return 0;
10398 }
10399 _ACEOF
10400 if ac_fn_c_try_compile "$LINENO"; then :
10401   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
10402 else
10403   ax_cv_PTHREAD_REJECT_UNKNOWN=no
10404 fi
10405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10406      CFLAGS="$save_CFLAGS"
10407
10408 fi
10409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
10410 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
10411 ax_pthread_extra_flags=
10412 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
10413   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
10414 fi
10415
10416 if test x"$ax_pthread_ok" = xno; then
10417 for flag in $ax_pthread_flags; do
10418
10419         case $flag in
10420                 none)
10421                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10422 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10423                 ;;
10424
10425                 -mt,pthread)
10426                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10427 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10428                 PTHREAD_CFLAGS="-mt"
10429                 PTHREAD_LIBS="-lpthread"
10430                 ;;
10431
10432                 -*)
10433                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
10434 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
10435                 PTHREAD_CFLAGS="$flag"
10436                 ;;
10437
10438                 pthread-config)
10439                 # Extract the first word of "pthread-config", so it can be a program name with args.
10440 set dummy pthread-config; ac_word=$2
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10442 $as_echo_n "checking for $ac_word... " >&6; }
10443 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10444   $as_echo_n "(cached) " >&6
10445 else
10446   if test -n "$ax_pthread_config"; then
10447   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10448 else
10449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10450 for as_dir in $PATH
10451 do
10452   IFS=$as_save_IFS
10453   test -z "$as_dir" && as_dir=.
10454     for ac_exec_ext in '' $ac_executable_extensions; do
10455   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10456     ac_cv_prog_ax_pthread_config="yes"
10457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10458     break 2
10459   fi
10460 done
10461   done
10462 IFS=$as_save_IFS
10463
10464   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10465 fi
10466 fi
10467 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10468 if test -n "$ax_pthread_config"; then
10469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10470 $as_echo "$ax_pthread_config" >&6; }
10471 else
10472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10473 $as_echo "no" >&6; }
10474 fi
10475
10476
10477                 if test x"$ax_pthread_config" = xno; then continue; fi
10478                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10479                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10480                 ;;
10481
10482                 *)
10483                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
10484 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
10485                 PTHREAD_LIBS="-l$flag"
10486                 ;;
10487         esac
10488
10489         save_LIBS="$LIBS"
10490         save_CFLAGS="$CFLAGS"
10491         LIBS="$PTHREAD_LIBS $LIBS"
10492         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
10493
10494         # Check for various functions.  We must include pthread.h,
10495         # since some functions may be macros.  (On the Sequent, we
10496         # need a special flag -Kthread to make this header compile.)
10497         # We check for pthread_join because it is in -lpthread on IRIX
10498         # while pthread_create is in libc.  We check for pthread_attr_init
10499         # due to DEC craziness with -lpthreads.  We check for
10500         # pthread_cleanup_push because it is one of the few pthread
10501         # functions on Solaris that doesn't have a non-functional libc stub.
10502         # We try pthread_create on general principles.
10503         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10504 /* end confdefs.h.  */
10505 #include <pthread.h>
10506                         static void routine(void *a) { a = 0; }
10507                         static void *start_routine(void *a) { return a; }
10508 int
10509 main ()
10510 {
10511 pthread_t th; pthread_attr_t attr;
10512                         pthread_create(&th, 0, start_routine, 0);
10513                         pthread_join(th, 0);
10514                         pthread_attr_init(&attr);
10515                         pthread_cleanup_push(routine, 0);
10516                         pthread_cleanup_pop(0) /* ; */
10517   ;
10518   return 0;
10519 }
10520 _ACEOF
10521 if ac_fn_c_try_link "$LINENO"; then :
10522   ax_pthread_ok=yes
10523 fi
10524 rm -f core conftest.err conftest.$ac_objext \
10525     conftest$ac_exeext conftest.$ac_ext
10526
10527         LIBS="$save_LIBS"
10528         CFLAGS="$save_CFLAGS"
10529
10530         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10531 $as_echo "$ax_pthread_ok" >&6; }
10532         if test "x$ax_pthread_ok" = xyes; then
10533                 break;
10534         fi
10535
10536         PTHREAD_LIBS=""
10537         PTHREAD_CFLAGS=""
10538 done
10539 fi
10540
10541 # Various other checks:
10542 if test "x$ax_pthread_ok" = xyes; then
10543         save_LIBS="$LIBS"
10544         LIBS="$PTHREAD_LIBS $LIBS"
10545         save_CFLAGS="$CFLAGS"
10546         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10547
10548         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10549         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10550 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10551 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10552   $as_echo_n "(cached) " >&6
10553 else
10554   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10555              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10556                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10557 /* end confdefs.h.  */
10558 #include <pthread.h>
10559 int
10560 main ()
10561 {
10562 int attr = $attr; return attr /* ; */
10563   ;
10564   return 0;
10565 }
10566 _ACEOF
10567 if ac_fn_c_try_link "$LINENO"; then :
10568   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
10569 fi
10570 rm -f core conftest.err conftest.$ac_objext \
10571     conftest$ac_exeext conftest.$ac_ext
10572              done
10573
10574 fi
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10576 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10577         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
10578                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
10579
10580 cat >>confdefs.h <<_ACEOF
10581 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10582 _ACEOF
10583
10584 fi
10585
10586         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
10587 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
10588 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10589   $as_echo_n "(cached) " >&6
10590 else
10591   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10592              ax_pthread_special_flags_added=no
10593              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10594 /* end confdefs.h.  */
10595
10596 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
10597                   AX_PTHREAD_NEED_SPECIAL_FLAG
10598 #                 endif
10599
10600 _ACEOF
10601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10602   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
10603   case $host_os in
10604                   aix* | freebsd*)
10605                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
10606                   ;;
10607                   darwin* | hpux* | osf* | solaris*)
10608                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
10609                   ;;
10610                   esac
10611
10612 fi
10613 rm -f conftest*
10614
10615
10616 fi
10617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10618 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10619         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10620                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10621   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10622                ax_pthread_special_flags_added=yes
10623 fi
10624
10625         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10626 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10627 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10628   $as_echo_n "(cached) " >&6
10629 else
10630   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10631 /* end confdefs.h.  */
10632 #include <pthread.h>
10633 int
10634 main ()
10635 {
10636 int i = PTHREAD_PRIO_INHERIT;
10637   ;
10638   return 0;
10639 }
10640 _ACEOF
10641 if ac_fn_c_try_link "$LINENO"; then :
10642   ax_cv_PTHREAD_PRIO_INHERIT=yes
10643 else
10644   ax_cv_PTHREAD_PRIO_INHERIT=no
10645 fi
10646 rm -f core conftest.err conftest.$ac_objext \
10647     conftest$ac_exeext conftest.$ac_ext
10648
10649 fi
10650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10651 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10652         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
10653
10654 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10655
10656 fi
10657
10658         LIBS="$save_LIBS"
10659         CFLAGS="$save_CFLAGS"
10660
10661         # More AIX lossage: compile with *_r variant
10662         if test "x$GCC" != xyes; then
10663             case $host_os in
10664                 aix*)
10665                 case "x/$CC" in #(
10666   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10667     #handle absolute path differently from PATH based program lookup
10668                    case "x$CC" in #(
10669   x/*) :
10670     if as_fn_executable_p ${CC}_r; then :
10671   PTHREAD_CC="${CC}_r"
10672 fi ;; #(
10673   *) :
10674     for ac_prog in ${CC}_r
10675 do
10676   # Extract the first word of "$ac_prog", so it can be a program name with args.
10677 set dummy $ac_prog; ac_word=$2
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10679 $as_echo_n "checking for $ac_word... " >&6; }
10680 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10681   $as_echo_n "(cached) " >&6
10682 else
10683   if test -n "$PTHREAD_CC"; then
10684   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10685 else
10686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10687 for as_dir in $PATH
10688 do
10689   IFS=$as_save_IFS
10690   test -z "$as_dir" && as_dir=.
10691     for ac_exec_ext in '' $ac_executable_extensions; do
10692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10693     ac_cv_prog_PTHREAD_CC="$ac_prog"
10694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10695     break 2
10696   fi
10697 done
10698   done
10699 IFS=$as_save_IFS
10700
10701 fi
10702 fi
10703 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10704 if test -n "$PTHREAD_CC"; then
10705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10706 $as_echo "$PTHREAD_CC" >&6; }
10707 else
10708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709 $as_echo "no" >&6; }
10710 fi
10711
10712
10713   test -n "$PTHREAD_CC" && break
10714 done
10715 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10716  ;;
10717 esac ;; #(
10718   *) :
10719      ;;
10720 esac
10721                 ;;
10722             esac
10723         fi
10724 fi
10725
10726 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10727
10728
10729
10730
10731
10732 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10733 if test x"$ax_pthread_ok" = xyes; then
10734
10735 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10736
10737         :
10738 else
10739         ax_pthread_ok=no
10740
10741 fi
10742 ac_ext=c
10743 ac_cpp='$CPP $CPPFLAGS'
10744 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10745 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10746 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10747
10748         # set thread flags
10749
10750 # Some platforms use these, so just define them.  They can't hurt if they
10751 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10752 # enables 5-arg getpwuid_r, among other things.
10753 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10754
10755 # Check for *_r functions
10756 _CFLAGS="$CFLAGS"
10757 _LIBS="$LIBS"
10758 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10759 LIBS="$LIBS $PTHREAD_LIBS"
10760
10761 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10762 if test "x$ac_cv_header_pthread_h" = xyes; then :
10763
10764 else
10765   as_fn_error $? "
10766 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10767 fi
10768
10769
10770
10771 for ac_func in strerror_r getpwuid_r gethostbyname_r
10772 do :
10773   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10774 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10775 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10776   cat >>confdefs.h <<_ACEOF
10777 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10778 _ACEOF
10779
10780 fi
10781 done
10782
10783
10784 # Do test here with the proper thread flags
10785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10786 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10787 if ${pgac_cv_func_strerror_r_int+:} false; then :
10788   $as_echo_n "(cached) " >&6
10789 else
10790   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10791 /* end confdefs.h.  */
10792 #include <string.h>
10793 int
10794 main ()
10795 {
10796 char buf[100];
10797   switch (strerror_r(1, buf, sizeof(buf)))
10798   { case 0: break; default: break; }
10799
10800   ;
10801   return 0;
10802 }
10803 _ACEOF
10804 if ac_fn_c_try_compile "$LINENO"; then :
10805   pgac_cv_func_strerror_r_int=yes
10806 else
10807   pgac_cv_func_strerror_r_int=no
10808 fi
10809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10810 fi
10811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10812 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10813 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10814
10815 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10816
10817 fi
10818
10819
10820 CFLAGS="$_CFLAGS"
10821 LIBS="$_LIBS"
10822
10823
10824 else
10825    # else
10826 # do not use values from template file
10827 PTHREAD_CFLAGS=
10828 PTHREAD_LIBS=
10829
10830 fi # fi
10831
10832
10833
10834
10835
10836 ##
10837 ## Libraries
10838 ##
10839 ## Most libraries are included only if they demonstrably provide a function
10840 ## we need, but libm is an exception: always include it, because there are
10841 ## too many compilers that play cute optimization games that will break
10842 ## probes for standard functions such as pow().
10843 ##
10844
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10846 $as_echo_n "checking for main in -lm... " >&6; }
10847 if ${ac_cv_lib_m_main+:} false; then :
10848   $as_echo_n "(cached) " >&6
10849 else
10850   ac_check_lib_save_LIBS=$LIBS
10851 LIBS="-lm  $LIBS"
10852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10853 /* end confdefs.h.  */
10854
10855
10856 int
10857 main ()
10858 {
10859 return main ();
10860   ;
10861   return 0;
10862 }
10863 _ACEOF
10864 if ac_fn_c_try_link "$LINENO"; then :
10865   ac_cv_lib_m_main=yes
10866 else
10867   ac_cv_lib_m_main=no
10868 fi
10869 rm -f core conftest.err conftest.$ac_objext \
10870     conftest$ac_exeext conftest.$ac_ext
10871 LIBS=$ac_check_lib_save_LIBS
10872 fi
10873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10874 $as_echo "$ac_cv_lib_m_main" >&6; }
10875 if test "x$ac_cv_lib_m_main" = xyes; then :
10876   cat >>confdefs.h <<_ACEOF
10877 #define HAVE_LIBM 1
10878 _ACEOF
10879
10880   LIBS="-lm $LIBS"
10881
10882 fi
10883
10884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10885 $as_echo_n "checking for library containing setproctitle... " >&6; }
10886 if ${ac_cv_search_setproctitle+:} false; then :
10887   $as_echo_n "(cached) " >&6
10888 else
10889   ac_func_search_save_LIBS=$LIBS
10890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10891 /* end confdefs.h.  */
10892
10893 /* Override any GCC internal prototype to avoid an error.
10894    Use char because int might match the return type of a GCC
10895    builtin and then its argument prototype would still apply.  */
10896 #ifdef __cplusplus
10897 extern "C"
10898 #endif
10899 char setproctitle ();
10900 int
10901 main ()
10902 {
10903 return setproctitle ();
10904   ;
10905   return 0;
10906 }
10907 _ACEOF
10908 for ac_lib in '' util; do
10909   if test -z "$ac_lib"; then
10910     ac_res="none required"
10911   else
10912     ac_res=-l$ac_lib
10913     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10914   fi
10915   if ac_fn_c_try_link "$LINENO"; then :
10916   ac_cv_search_setproctitle=$ac_res
10917 fi
10918 rm -f core conftest.err conftest.$ac_objext \
10919     conftest$ac_exeext
10920   if ${ac_cv_search_setproctitle+:} false; then :
10921   break
10922 fi
10923 done
10924 if ${ac_cv_search_setproctitle+:} false; then :
10925
10926 else
10927   ac_cv_search_setproctitle=no
10928 fi
10929 rm conftest.$ac_ext
10930 LIBS=$ac_func_search_save_LIBS
10931 fi
10932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
10933 $as_echo "$ac_cv_search_setproctitle" >&6; }
10934 ac_res=$ac_cv_search_setproctitle
10935 if test "$ac_res" != no; then :
10936   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10937
10938 fi
10939
10940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10941 $as_echo_n "checking for library containing dlopen... " >&6; }
10942 if ${ac_cv_search_dlopen+:} false; then :
10943   $as_echo_n "(cached) " >&6
10944 else
10945   ac_func_search_save_LIBS=$LIBS
10946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10947 /* end confdefs.h.  */
10948
10949 /* Override any GCC internal prototype to avoid an error.
10950    Use char because int might match the return type of a GCC
10951    builtin and then its argument prototype would still apply.  */
10952 #ifdef __cplusplus
10953 extern "C"
10954 #endif
10955 char dlopen ();
10956 int
10957 main ()
10958 {
10959 return dlopen ();
10960   ;
10961   return 0;
10962 }
10963 _ACEOF
10964 for ac_lib in '' dl; do
10965   if test -z "$ac_lib"; then
10966     ac_res="none required"
10967   else
10968     ac_res=-l$ac_lib
10969     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10970   fi
10971   if ac_fn_c_try_link "$LINENO"; then :
10972   ac_cv_search_dlopen=$ac_res
10973 fi
10974 rm -f core conftest.err conftest.$ac_objext \
10975     conftest$ac_exeext
10976   if ${ac_cv_search_dlopen+:} false; then :
10977   break
10978 fi
10979 done
10980 if ${ac_cv_search_dlopen+:} false; then :
10981
10982 else
10983   ac_cv_search_dlopen=no
10984 fi
10985 rm conftest.$ac_ext
10986 LIBS=$ac_func_search_save_LIBS
10987 fi
10988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10989 $as_echo "$ac_cv_search_dlopen" >&6; }
10990 ac_res=$ac_cv_search_dlopen
10991 if test "$ac_res" != no; then :
10992   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10993
10994 fi
10995
10996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
10997 $as_echo_n "checking for library containing socket... " >&6; }
10998 if ${ac_cv_search_socket+:} false; then :
10999   $as_echo_n "(cached) " >&6
11000 else
11001   ac_func_search_save_LIBS=$LIBS
11002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11003 /* end confdefs.h.  */
11004
11005 /* Override any GCC internal prototype to avoid an error.
11006    Use char because int might match the return type of a GCC
11007    builtin and then its argument prototype would still apply.  */
11008 #ifdef __cplusplus
11009 extern "C"
11010 #endif
11011 char socket ();
11012 int
11013 main ()
11014 {
11015 return socket ();
11016   ;
11017   return 0;
11018 }
11019 _ACEOF
11020 for ac_lib in '' socket ws2_32; do
11021   if test -z "$ac_lib"; then
11022     ac_res="none required"
11023   else
11024     ac_res=-l$ac_lib
11025     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11026   fi
11027   if ac_fn_c_try_link "$LINENO"; then :
11028   ac_cv_search_socket=$ac_res
11029 fi
11030 rm -f core conftest.err conftest.$ac_objext \
11031     conftest$ac_exeext
11032   if ${ac_cv_search_socket+:} false; then :
11033   break
11034 fi
11035 done
11036 if ${ac_cv_search_socket+:} false; then :
11037
11038 else
11039   ac_cv_search_socket=no
11040 fi
11041 rm conftest.$ac_ext
11042 LIBS=$ac_func_search_save_LIBS
11043 fi
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11045 $as_echo "$ac_cv_search_socket" >&6; }
11046 ac_res=$ac_cv_search_socket
11047 if test "$ac_res" != no; then :
11048   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11049
11050 fi
11051
11052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11053 $as_echo_n "checking for library containing shl_load... " >&6; }
11054 if ${ac_cv_search_shl_load+:} false; then :
11055   $as_echo_n "(cached) " >&6
11056 else
11057   ac_func_search_save_LIBS=$LIBS
11058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11059 /* end confdefs.h.  */
11060
11061 /* Override any GCC internal prototype to avoid an error.
11062    Use char because int might match the return type of a GCC
11063    builtin and then its argument prototype would still apply.  */
11064 #ifdef __cplusplus
11065 extern "C"
11066 #endif
11067 char shl_load ();
11068 int
11069 main ()
11070 {
11071 return shl_load ();
11072   ;
11073   return 0;
11074 }
11075 _ACEOF
11076 for ac_lib in '' dld; do
11077   if test -z "$ac_lib"; then
11078     ac_res="none required"
11079   else
11080     ac_res=-l$ac_lib
11081     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11082   fi
11083   if ac_fn_c_try_link "$LINENO"; then :
11084   ac_cv_search_shl_load=$ac_res
11085 fi
11086 rm -f core conftest.err conftest.$ac_objext \
11087     conftest$ac_exeext
11088   if ${ac_cv_search_shl_load+:} false; then :
11089   break
11090 fi
11091 done
11092 if ${ac_cv_search_shl_load+:} false; then :
11093
11094 else
11095   ac_cv_search_shl_load=no
11096 fi
11097 rm conftest.$ac_ext
11098 LIBS=$ac_func_search_save_LIBS
11099 fi
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11101 $as_echo "$ac_cv_search_shl_load" >&6; }
11102 ac_res=$ac_cv_search_shl_load
11103 if test "$ac_res" != no; then :
11104   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11105
11106 fi
11107
11108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11109 $as_echo_n "checking for library containing getopt_long... " >&6; }
11110 if ${ac_cv_search_getopt_long+:} false; then :
11111   $as_echo_n "(cached) " >&6
11112 else
11113   ac_func_search_save_LIBS=$LIBS
11114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11115 /* end confdefs.h.  */
11116
11117 /* Override any GCC internal prototype to avoid an error.
11118    Use char because int might match the return type of a GCC
11119    builtin and then its argument prototype would still apply.  */
11120 #ifdef __cplusplus
11121 extern "C"
11122 #endif
11123 char getopt_long ();
11124 int
11125 main ()
11126 {
11127 return getopt_long ();
11128   ;
11129   return 0;
11130 }
11131 _ACEOF
11132 for ac_lib in '' getopt gnugetopt; do
11133   if test -z "$ac_lib"; then
11134     ac_res="none required"
11135   else
11136     ac_res=-l$ac_lib
11137     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11138   fi
11139   if ac_fn_c_try_link "$LINENO"; then :
11140   ac_cv_search_getopt_long=$ac_res
11141 fi
11142 rm -f core conftest.err conftest.$ac_objext \
11143     conftest$ac_exeext
11144   if ${ac_cv_search_getopt_long+:} false; then :
11145   break
11146 fi
11147 done
11148 if ${ac_cv_search_getopt_long+:} false; then :
11149
11150 else
11151   ac_cv_search_getopt_long=no
11152 fi
11153 rm conftest.$ac_ext
11154 LIBS=$ac_func_search_save_LIBS
11155 fi
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11157 $as_echo "$ac_cv_search_getopt_long" >&6; }
11158 ac_res=$ac_cv_search_getopt_long
11159 if test "$ac_res" != no; then :
11160   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11161
11162 fi
11163
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11165 $as_echo_n "checking for library containing crypt... " >&6; }
11166 if ${ac_cv_search_crypt+:} false; then :
11167   $as_echo_n "(cached) " >&6
11168 else
11169   ac_func_search_save_LIBS=$LIBS
11170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11171 /* end confdefs.h.  */
11172
11173 /* Override any GCC internal prototype to avoid an error.
11174    Use char because int might match the return type of a GCC
11175    builtin and then its argument prototype would still apply.  */
11176 #ifdef __cplusplus
11177 extern "C"
11178 #endif
11179 char crypt ();
11180 int
11181 main ()
11182 {
11183 return crypt ();
11184   ;
11185   return 0;
11186 }
11187 _ACEOF
11188 for ac_lib in '' crypt; do
11189   if test -z "$ac_lib"; then
11190     ac_res="none required"
11191   else
11192     ac_res=-l$ac_lib
11193     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11194   fi
11195   if ac_fn_c_try_link "$LINENO"; then :
11196   ac_cv_search_crypt=$ac_res
11197 fi
11198 rm -f core conftest.err conftest.$ac_objext \
11199     conftest$ac_exeext
11200   if ${ac_cv_search_crypt+:} false; then :
11201   break
11202 fi
11203 done
11204 if ${ac_cv_search_crypt+:} false; then :
11205
11206 else
11207   ac_cv_search_crypt=no
11208 fi
11209 rm conftest.$ac_ext
11210 LIBS=$ac_func_search_save_LIBS
11211 fi
11212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11213 $as_echo "$ac_cv_search_crypt" >&6; }
11214 ac_res=$ac_cv_search_crypt
11215 if test "$ac_res" != no; then :
11216   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11217
11218 fi
11219
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11221 $as_echo_n "checking for library containing shm_open... " >&6; }
11222 if ${ac_cv_search_shm_open+:} false; then :
11223   $as_echo_n "(cached) " >&6
11224 else
11225   ac_func_search_save_LIBS=$LIBS
11226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11227 /* end confdefs.h.  */
11228
11229 /* Override any GCC internal prototype to avoid an error.
11230    Use char because int might match the return type of a GCC
11231    builtin and then its argument prototype would still apply.  */
11232 #ifdef __cplusplus
11233 extern "C"
11234 #endif
11235 char shm_open ();
11236 int
11237 main ()
11238 {
11239 return shm_open ();
11240   ;
11241   return 0;
11242 }
11243 _ACEOF
11244 for ac_lib in '' rt; do
11245   if test -z "$ac_lib"; then
11246     ac_res="none required"
11247   else
11248     ac_res=-l$ac_lib
11249     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11250   fi
11251   if ac_fn_c_try_link "$LINENO"; then :
11252   ac_cv_search_shm_open=$ac_res
11253 fi
11254 rm -f core conftest.err conftest.$ac_objext \
11255     conftest$ac_exeext
11256   if ${ac_cv_search_shm_open+:} false; then :
11257   break
11258 fi
11259 done
11260 if ${ac_cv_search_shm_open+:} false; then :
11261
11262 else
11263   ac_cv_search_shm_open=no
11264 fi
11265 rm conftest.$ac_ext
11266 LIBS=$ac_func_search_save_LIBS
11267 fi
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11269 $as_echo "$ac_cv_search_shm_open" >&6; }
11270 ac_res=$ac_cv_search_shm_open
11271 if test "$ac_res" != no; then :
11272   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11273
11274 fi
11275
11276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11277 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11278 if ${ac_cv_search_shm_unlink+:} false; then :
11279   $as_echo_n "(cached) " >&6
11280 else
11281   ac_func_search_save_LIBS=$LIBS
11282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11283 /* end confdefs.h.  */
11284
11285 /* Override any GCC internal prototype to avoid an error.
11286    Use char because int might match the return type of a GCC
11287    builtin and then its argument prototype would still apply.  */
11288 #ifdef __cplusplus
11289 extern "C"
11290 #endif
11291 char shm_unlink ();
11292 int
11293 main ()
11294 {
11295 return shm_unlink ();
11296   ;
11297   return 0;
11298 }
11299 _ACEOF
11300 for ac_lib in '' rt; do
11301   if test -z "$ac_lib"; then
11302     ac_res="none required"
11303   else
11304     ac_res=-l$ac_lib
11305     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11306   fi
11307   if ac_fn_c_try_link "$LINENO"; then :
11308   ac_cv_search_shm_unlink=$ac_res
11309 fi
11310 rm -f core conftest.err conftest.$ac_objext \
11311     conftest$ac_exeext
11312   if ${ac_cv_search_shm_unlink+:} false; then :
11313   break
11314 fi
11315 done
11316 if ${ac_cv_search_shm_unlink+:} false; then :
11317
11318 else
11319   ac_cv_search_shm_unlink=no
11320 fi
11321 rm conftest.$ac_ext
11322 LIBS=$ac_func_search_save_LIBS
11323 fi
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11325 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11326 ac_res=$ac_cv_search_shm_unlink
11327 if test "$ac_res" != no; then :
11328   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11329
11330 fi
11331
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11333 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11334 if ${ac_cv_search_clock_gettime+:} false; then :
11335   $as_echo_n "(cached) " >&6
11336 else
11337   ac_func_search_save_LIBS=$LIBS
11338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11339 /* end confdefs.h.  */
11340
11341 /* Override any GCC internal prototype to avoid an error.
11342    Use char because int might match the return type of a GCC
11343    builtin and then its argument prototype would still apply.  */
11344 #ifdef __cplusplus
11345 extern "C"
11346 #endif
11347 char clock_gettime ();
11348 int
11349 main ()
11350 {
11351 return clock_gettime ();
11352   ;
11353   return 0;
11354 }
11355 _ACEOF
11356 for ac_lib in '' rt posix4; do
11357   if test -z "$ac_lib"; then
11358     ac_res="none required"
11359   else
11360     ac_res=-l$ac_lib
11361     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11362   fi
11363   if ac_fn_c_try_link "$LINENO"; then :
11364   ac_cv_search_clock_gettime=$ac_res
11365 fi
11366 rm -f core conftest.err conftest.$ac_objext \
11367     conftest$ac_exeext
11368   if ${ac_cv_search_clock_gettime+:} false; then :
11369   break
11370 fi
11371 done
11372 if ${ac_cv_search_clock_gettime+:} false; then :
11373
11374 else
11375   ac_cv_search_clock_gettime=no
11376 fi
11377 rm conftest.$ac_ext
11378 LIBS=$ac_func_search_save_LIBS
11379 fi
11380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11381 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11382 ac_res=$ac_cv_search_clock_gettime
11383 if test "$ac_res" != no; then :
11384   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11385
11386 fi
11387
11388 # Solaris:
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11390 $as_echo_n "checking for library containing fdatasync... " >&6; }
11391 if ${ac_cv_search_fdatasync+:} false; then :
11392   $as_echo_n "(cached) " >&6
11393 else
11394   ac_func_search_save_LIBS=$LIBS
11395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11396 /* end confdefs.h.  */
11397
11398 /* Override any GCC internal prototype to avoid an error.
11399    Use char because int might match the return type of a GCC
11400    builtin and then its argument prototype would still apply.  */
11401 #ifdef __cplusplus
11402 extern "C"
11403 #endif
11404 char fdatasync ();
11405 int
11406 main ()
11407 {
11408 return fdatasync ();
11409   ;
11410   return 0;
11411 }
11412 _ACEOF
11413 for ac_lib in '' rt posix4; do
11414   if test -z "$ac_lib"; then
11415     ac_res="none required"
11416   else
11417     ac_res=-l$ac_lib
11418     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11419   fi
11420   if ac_fn_c_try_link "$LINENO"; then :
11421   ac_cv_search_fdatasync=$ac_res
11422 fi
11423 rm -f core conftest.err conftest.$ac_objext \
11424     conftest$ac_exeext
11425   if ${ac_cv_search_fdatasync+:} false; then :
11426   break
11427 fi
11428 done
11429 if ${ac_cv_search_fdatasync+:} false; then :
11430
11431 else
11432   ac_cv_search_fdatasync=no
11433 fi
11434 rm conftest.$ac_ext
11435 LIBS=$ac_func_search_save_LIBS
11436 fi
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11438 $as_echo "$ac_cv_search_fdatasync" >&6; }
11439 ac_res=$ac_cv_search_fdatasync
11440 if test "$ac_res" != no; then :
11441   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11442
11443 fi
11444
11445 # Required for thread_test.c on Solaris
11446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11447 $as_echo_n "checking for library containing sched_yield... " >&6; }
11448 if ${ac_cv_search_sched_yield+:} false; then :
11449   $as_echo_n "(cached) " >&6
11450 else
11451   ac_func_search_save_LIBS=$LIBS
11452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11453 /* end confdefs.h.  */
11454
11455 /* Override any GCC internal prototype to avoid an error.
11456    Use char because int might match the return type of a GCC
11457    builtin and then its argument prototype would still apply.  */
11458 #ifdef __cplusplus
11459 extern "C"
11460 #endif
11461 char sched_yield ();
11462 int
11463 main ()
11464 {
11465 return sched_yield ();
11466   ;
11467   return 0;
11468 }
11469 _ACEOF
11470 for ac_lib in '' rt; do
11471   if test -z "$ac_lib"; then
11472     ac_res="none required"
11473   else
11474     ac_res=-l$ac_lib
11475     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11476   fi
11477   if ac_fn_c_try_link "$LINENO"; then :
11478   ac_cv_search_sched_yield=$ac_res
11479 fi
11480 rm -f core conftest.err conftest.$ac_objext \
11481     conftest$ac_exeext
11482   if ${ac_cv_search_sched_yield+:} false; then :
11483   break
11484 fi
11485 done
11486 if ${ac_cv_search_sched_yield+:} false; then :
11487
11488 else
11489   ac_cv_search_sched_yield=no
11490 fi
11491 rm conftest.$ac_ext
11492 LIBS=$ac_func_search_save_LIBS
11493 fi
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11495 $as_echo "$ac_cv_search_sched_yield" >&6; }
11496 ac_res=$ac_cv_search_sched_yield
11497 if test "$ac_res" != no; then :
11498   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11499
11500 fi
11501
11502 # Required for thread_test.c on Solaris 2.5:
11503 # Other ports use it too (HP-UX) so test unconditionally
11504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11505 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11506 if ${ac_cv_search_gethostbyname_r+:} false; then :
11507   $as_echo_n "(cached) " >&6
11508 else
11509   ac_func_search_save_LIBS=$LIBS
11510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11511 /* end confdefs.h.  */
11512
11513 /* Override any GCC internal prototype to avoid an error.
11514    Use char because int might match the return type of a GCC
11515    builtin and then its argument prototype would still apply.  */
11516 #ifdef __cplusplus
11517 extern "C"
11518 #endif
11519 char gethostbyname_r ();
11520 int
11521 main ()
11522 {
11523 return gethostbyname_r ();
11524   ;
11525   return 0;
11526 }
11527 _ACEOF
11528 for ac_lib in '' nsl; do
11529   if test -z "$ac_lib"; then
11530     ac_res="none required"
11531   else
11532     ac_res=-l$ac_lib
11533     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11534   fi
11535   if ac_fn_c_try_link "$LINENO"; then :
11536   ac_cv_search_gethostbyname_r=$ac_res
11537 fi
11538 rm -f core conftest.err conftest.$ac_objext \
11539     conftest$ac_exeext
11540   if ${ac_cv_search_gethostbyname_r+:} false; then :
11541   break
11542 fi
11543 done
11544 if ${ac_cv_search_gethostbyname_r+:} false; then :
11545
11546 else
11547   ac_cv_search_gethostbyname_r=no
11548 fi
11549 rm conftest.$ac_ext
11550 LIBS=$ac_func_search_save_LIBS
11551 fi
11552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11553 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11554 ac_res=$ac_cv_search_gethostbyname_r
11555 if test "$ac_res" != no; then :
11556   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11557
11558 fi
11559
11560 # Cygwin:
11561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11562 $as_echo_n "checking for library containing shmget... " >&6; }
11563 if ${ac_cv_search_shmget+:} false; then :
11564   $as_echo_n "(cached) " >&6
11565 else
11566   ac_func_search_save_LIBS=$LIBS
11567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11568 /* end confdefs.h.  */
11569
11570 /* Override any GCC internal prototype to avoid an error.
11571    Use char because int might match the return type of a GCC
11572    builtin and then its argument prototype would still apply.  */
11573 #ifdef __cplusplus
11574 extern "C"
11575 #endif
11576 char shmget ();
11577 int
11578 main ()
11579 {
11580 return shmget ();
11581   ;
11582   return 0;
11583 }
11584 _ACEOF
11585 for ac_lib in '' cygipc; do
11586   if test -z "$ac_lib"; then
11587     ac_res="none required"
11588   else
11589     ac_res=-l$ac_lib
11590     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11591   fi
11592   if ac_fn_c_try_link "$LINENO"; then :
11593   ac_cv_search_shmget=$ac_res
11594 fi
11595 rm -f core conftest.err conftest.$ac_objext \
11596     conftest$ac_exeext
11597   if ${ac_cv_search_shmget+:} false; then :
11598   break
11599 fi
11600 done
11601 if ${ac_cv_search_shmget+:} false; then :
11602
11603 else
11604   ac_cv_search_shmget=no
11605 fi
11606 rm conftest.$ac_ext
11607 LIBS=$ac_func_search_save_LIBS
11608 fi
11609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11610 $as_echo "$ac_cv_search_shmget" >&6; }
11611 ac_res=$ac_cv_search_shmget
11612 if test "$ac_res" != no; then :
11613   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11614
11615 fi
11616
11617
11618 if test "$with_readline" = yes; then
11619
11620
11621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11622 $as_echo_n "checking for library containing readline... " >&6; }
11623 if ${pgac_cv_check_readline+:} false; then :
11624   $as_echo_n "(cached) " >&6
11625 else
11626   pgac_cv_check_readline=no
11627 pgac_save_LIBS=$LIBS
11628 if test x"$with_libedit_preferred" != x"yes"
11629 then    READLINE_ORDER="-lreadline -ledit"
11630 else    READLINE_ORDER="-ledit -lreadline"
11631 fi
11632 for pgac_rllib in $READLINE_ORDER ; do
11633   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11634     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11635     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11636 /* end confdefs.h.  */
11637
11638 /* Override any GCC internal prototype to avoid an error.
11639    Use char because int might match the return type of a GCC
11640    builtin and then its argument prototype would still apply.  */
11641 #ifdef __cplusplus
11642 extern "C"
11643 #endif
11644 char readline ();
11645 int
11646 main ()
11647 {
11648 return readline ();
11649   ;
11650   return 0;
11651 }
11652 _ACEOF
11653 if ac_fn_c_try_link "$LINENO"; then :
11654
11655       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11656       # recognize dependent libraries; assume curses is needed if we didn't
11657       # find any dependency.
11658       case $host_os in
11659         netbsd* | openbsd* | irix*)
11660           if test x"$pgac_lib" = x"" ; then
11661             pgac_lib=" -lcurses"
11662           fi ;;
11663       esac
11664
11665       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11666       break
11667
11668 fi
11669 rm -f core conftest.err conftest.$ac_objext \
11670     conftest$ac_exeext conftest.$ac_ext
11671   done
11672   if test "$pgac_cv_check_readline" != no ; then
11673     break
11674   fi
11675 done
11676 LIBS=$pgac_save_LIBS
11677
11678 fi
11679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11680 $as_echo "$pgac_cv_check_readline" >&6; }
11681 if test "$pgac_cv_check_readline" != no ; then
11682   LIBS="$pgac_cv_check_readline $LIBS"
11683
11684 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11685
11686 fi
11687
11688
11689   if test x"$pgac_cv_check_readline" = x"no"; then
11690     as_fn_error $? "readline library not found
11691 If you have readline already installed, see config.log for details on the
11692 failure.  It is possible the compiler isn't looking in the proper directory.
11693 Use --without-readline to disable readline support." "$LINENO" 5
11694   fi
11695 fi
11696
11697 if test "$with_zlib" = yes; then
11698   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11699 $as_echo_n "checking for inflate in -lz... " >&6; }
11700 if ${ac_cv_lib_z_inflate+:} false; then :
11701   $as_echo_n "(cached) " >&6
11702 else
11703   ac_check_lib_save_LIBS=$LIBS
11704 LIBS="-lz  $LIBS"
11705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11706 /* end confdefs.h.  */
11707
11708 /* Override any GCC internal prototype to avoid an error.
11709    Use char because int might match the return type of a GCC
11710    builtin and then its argument prototype would still apply.  */
11711 #ifdef __cplusplus
11712 extern "C"
11713 #endif
11714 char inflate ();
11715 int
11716 main ()
11717 {
11718 return inflate ();
11719   ;
11720   return 0;
11721 }
11722 _ACEOF
11723 if ac_fn_c_try_link "$LINENO"; then :
11724   ac_cv_lib_z_inflate=yes
11725 else
11726   ac_cv_lib_z_inflate=no
11727 fi
11728 rm -f core conftest.err conftest.$ac_objext \
11729     conftest$ac_exeext conftest.$ac_ext
11730 LIBS=$ac_check_lib_save_LIBS
11731 fi
11732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11733 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11734 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11735   cat >>confdefs.h <<_ACEOF
11736 #define HAVE_LIBZ 1
11737 _ACEOF
11738
11739   LIBS="-lz $LIBS"
11740
11741 else
11742   as_fn_error $? "zlib library not found
11743 If you have zlib already installed, see config.log for details on the
11744 failure.  It is possible the compiler isn't looking in the proper directory.
11745 Use --without-zlib to disable zlib support." "$LINENO" 5
11746 fi
11747
11748 fi
11749
11750 if test "$enable_spinlocks" = yes; then
11751
11752 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11753
11754 else
11755   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11756 *** Not using spinlocks will cause poor performance." >&5
11757 $as_echo "$as_me: WARNING:
11758 *** Not using spinlocks will cause poor performance." >&2;}
11759 fi
11760
11761 if test "$enable_atomics" = yes; then
11762
11763 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11764
11765 else
11766   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11767 *** Not using atomic operations will cause poor performance." >&5
11768 $as_echo "$as_me: WARNING:
11769 *** Not using atomic operations will cause poor performance." >&2;}
11770 fi
11771
11772 if test "$with_gssapi" = yes ; then
11773   if test "$PORTNAME" != "win32"; then
11774     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11775 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11776 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11777   $as_echo_n "(cached) " >&6
11778 else
11779   ac_func_search_save_LIBS=$LIBS
11780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781 /* end confdefs.h.  */
11782
11783 /* Override any GCC internal prototype to avoid an error.
11784    Use char because int might match the return type of a GCC
11785    builtin and then its argument prototype would still apply.  */
11786 #ifdef __cplusplus
11787 extern "C"
11788 #endif
11789 char gss_init_sec_context ();
11790 int
11791 main ()
11792 {
11793 return gss_init_sec_context ();
11794   ;
11795   return 0;
11796 }
11797 _ACEOF
11798 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11799   if test -z "$ac_lib"; then
11800     ac_res="none required"
11801   else
11802     ac_res=-l$ac_lib
11803     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11804   fi
11805   if ac_fn_c_try_link "$LINENO"; then :
11806   ac_cv_search_gss_init_sec_context=$ac_res
11807 fi
11808 rm -f core conftest.err conftest.$ac_objext \
11809     conftest$ac_exeext
11810   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11811   break
11812 fi
11813 done
11814 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11815
11816 else
11817   ac_cv_search_gss_init_sec_context=no
11818 fi
11819 rm conftest.$ac_ext
11820 LIBS=$ac_func_search_save_LIBS
11821 fi
11822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11823 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11824 ac_res=$ac_cv_search_gss_init_sec_context
11825 if test "$ac_res" != no; then :
11826   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11827
11828 else
11829   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11830 fi
11831
11832   else
11833     LIBS="$LIBS -lgssapi32"
11834   fi
11835 fi
11836
11837 if test "$with_openssl" = yes ; then
11838     if test "$PORTNAME" != "win32"; then
11839      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11840 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11841 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11842   $as_echo_n "(cached) " >&6
11843 else
11844   ac_check_lib_save_LIBS=$LIBS
11845 LIBS="-lcrypto  $LIBS"
11846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11847 /* end confdefs.h.  */
11848
11849 /* Override any GCC internal prototype to avoid an error.
11850    Use char because int might match the return type of a GCC
11851    builtin and then its argument prototype would still apply.  */
11852 #ifdef __cplusplus
11853 extern "C"
11854 #endif
11855 char CRYPTO_new_ex_data ();
11856 int
11857 main ()
11858 {
11859 return CRYPTO_new_ex_data ();
11860   ;
11861   return 0;
11862 }
11863 _ACEOF
11864 if ac_fn_c_try_link "$LINENO"; then :
11865   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11866 else
11867   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11868 fi
11869 rm -f core conftest.err conftest.$ac_objext \
11870     conftest$ac_exeext conftest.$ac_ext
11871 LIBS=$ac_check_lib_save_LIBS
11872 fi
11873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11874 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11875 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11876   cat >>confdefs.h <<_ACEOF
11877 #define HAVE_LIBCRYPTO 1
11878 _ACEOF
11879
11880   LIBS="-lcrypto $LIBS"
11881
11882 else
11883   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11884 fi
11885
11886      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11887 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11888 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11889   $as_echo_n "(cached) " >&6
11890 else
11891   ac_check_lib_save_LIBS=$LIBS
11892 LIBS="-lssl  $LIBS"
11893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11894 /* end confdefs.h.  */
11895
11896 /* Override any GCC internal prototype to avoid an error.
11897    Use char because int might match the return type of a GCC
11898    builtin and then its argument prototype would still apply.  */
11899 #ifdef __cplusplus
11900 extern "C"
11901 #endif
11902 char SSL_new ();
11903 int
11904 main ()
11905 {
11906 return SSL_new ();
11907   ;
11908   return 0;
11909 }
11910 _ACEOF
11911 if ac_fn_c_try_link "$LINENO"; then :
11912   ac_cv_lib_ssl_SSL_new=yes
11913 else
11914   ac_cv_lib_ssl_SSL_new=no
11915 fi
11916 rm -f core conftest.err conftest.$ac_objext \
11917     conftest$ac_exeext conftest.$ac_ext
11918 LIBS=$ac_check_lib_save_LIBS
11919 fi
11920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
11921 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
11922 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
11923   cat >>confdefs.h <<_ACEOF
11924 #define HAVE_LIBSSL 1
11925 _ACEOF
11926
11927   LIBS="-lssl $LIBS"
11928
11929 else
11930   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
11931 fi
11932
11933   else
11934      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
11935 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
11936 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11937   $as_echo_n "(cached) " >&6
11938 else
11939   ac_func_search_save_LIBS=$LIBS
11940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11941 /* end confdefs.h.  */
11942
11943 /* Override any GCC internal prototype to avoid an error.
11944    Use char because int might match the return type of a GCC
11945    builtin and then its argument prototype would still apply.  */
11946 #ifdef __cplusplus
11947 extern "C"
11948 #endif
11949 char CRYPTO_new_ex_data ();
11950 int
11951 main ()
11952 {
11953 return CRYPTO_new_ex_data ();
11954   ;
11955   return 0;
11956 }
11957 _ACEOF
11958 for ac_lib in '' eay32 crypto; do
11959   if test -z "$ac_lib"; then
11960     ac_res="none required"
11961   else
11962     ac_res=-l$ac_lib
11963     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11964   fi
11965   if ac_fn_c_try_link "$LINENO"; then :
11966   ac_cv_search_CRYPTO_new_ex_data=$ac_res
11967 fi
11968 rm -f core conftest.err conftest.$ac_objext \
11969     conftest$ac_exeext
11970   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11971   break
11972 fi
11973 done
11974 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11975
11976 else
11977   ac_cv_search_CRYPTO_new_ex_data=no
11978 fi
11979 rm conftest.$ac_ext
11980 LIBS=$ac_func_search_save_LIBS
11981 fi
11982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
11983 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
11984 ac_res=$ac_cv_search_CRYPTO_new_ex_data
11985 if test "$ac_res" != no; then :
11986   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11987
11988 else
11989   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
11990 fi
11991
11992      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
11993 $as_echo_n "checking for library containing SSL_new... " >&6; }
11994 if ${ac_cv_search_SSL_new+:} false; then :
11995   $as_echo_n "(cached) " >&6
11996 else
11997   ac_func_search_save_LIBS=$LIBS
11998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11999 /* end confdefs.h.  */
12000
12001 /* Override any GCC internal prototype to avoid an error.
12002    Use char because int might match the return type of a GCC
12003    builtin and then its argument prototype would still apply.  */
12004 #ifdef __cplusplus
12005 extern "C"
12006 #endif
12007 char SSL_new ();
12008 int
12009 main ()
12010 {
12011 return SSL_new ();
12012   ;
12013   return 0;
12014 }
12015 _ACEOF
12016 for ac_lib in '' ssleay32 ssl; do
12017   if test -z "$ac_lib"; then
12018     ac_res="none required"
12019   else
12020     ac_res=-l$ac_lib
12021     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12022   fi
12023   if ac_fn_c_try_link "$LINENO"; then :
12024   ac_cv_search_SSL_new=$ac_res
12025 fi
12026 rm -f core conftest.err conftest.$ac_objext \
12027     conftest$ac_exeext
12028   if ${ac_cv_search_SSL_new+:} false; then :
12029   break
12030 fi
12031 done
12032 if ${ac_cv_search_SSL_new+:} false; then :
12033
12034 else
12035   ac_cv_search_SSL_new=no
12036 fi
12037 rm conftest.$ac_ext
12038 LIBS=$ac_func_search_save_LIBS
12039 fi
12040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12041 $as_echo "$ac_cv_search_SSL_new" >&6; }
12042 ac_res=$ac_cv_search_SSL_new
12043 if test "$ac_res" != no; then :
12044   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12045
12046 else
12047   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12048 fi
12049
12050   fi
12051   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
12052 do :
12053   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12054 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12055 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12056   cat >>confdefs.h <<_ACEOF
12057 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12058 _ACEOF
12059
12060 fi
12061 done
12062
12063   # Functions introduced in OpenSSL 1.1.0. We used to check for
12064   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12065   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12066   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12067   # functions.
12068   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
12069 do :
12070   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12071 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12072 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12073   cat >>confdefs.h <<_ACEOF
12074 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12075 _ACEOF
12076
12077 fi
12078 done
12079
12080   # OpenSSL versions before 1.1.0 required setting callback functions, for
12081   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12082   # function was removed.
12083   for ac_func in CRYPTO_lock
12084 do :
12085   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12086 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12087   cat >>confdefs.h <<_ACEOF
12088 #define HAVE_CRYPTO_LOCK 1
12089 _ACEOF
12090
12091 fi
12092 done
12093
12094 fi
12095
12096 if test "$with_pam" = yes ; then
12097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12098 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12099 if ${ac_cv_lib_pam_pam_start+:} false; then :
12100   $as_echo_n "(cached) " >&6
12101 else
12102   ac_check_lib_save_LIBS=$LIBS
12103 LIBS="-lpam  $LIBS"
12104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12105 /* end confdefs.h.  */
12106
12107 /* Override any GCC internal prototype to avoid an error.
12108    Use char because int might match the return type of a GCC
12109    builtin and then its argument prototype would still apply.  */
12110 #ifdef __cplusplus
12111 extern "C"
12112 #endif
12113 char pam_start ();
12114 int
12115 main ()
12116 {
12117 return pam_start ();
12118   ;
12119   return 0;
12120 }
12121 _ACEOF
12122 if ac_fn_c_try_link "$LINENO"; then :
12123   ac_cv_lib_pam_pam_start=yes
12124 else
12125   ac_cv_lib_pam_pam_start=no
12126 fi
12127 rm -f core conftest.err conftest.$ac_objext \
12128     conftest$ac_exeext conftest.$ac_ext
12129 LIBS=$ac_check_lib_save_LIBS
12130 fi
12131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12132 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12133 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12134   cat >>confdefs.h <<_ACEOF
12135 #define HAVE_LIBPAM 1
12136 _ACEOF
12137
12138   LIBS="-lpam $LIBS"
12139
12140 else
12141   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12142 fi
12143
12144 fi
12145
12146 if test "$with_libxml" = yes ; then
12147   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12148 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12149 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12150   $as_echo_n "(cached) " >&6
12151 else
12152   ac_check_lib_save_LIBS=$LIBS
12153 LIBS="-lxml2  $LIBS"
12154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12155 /* end confdefs.h.  */
12156
12157 /* Override any GCC internal prototype to avoid an error.
12158    Use char because int might match the return type of a GCC
12159    builtin and then its argument prototype would still apply.  */
12160 #ifdef __cplusplus
12161 extern "C"
12162 #endif
12163 char xmlSaveToBuffer ();
12164 int
12165 main ()
12166 {
12167 return xmlSaveToBuffer ();
12168   ;
12169   return 0;
12170 }
12171 _ACEOF
12172 if ac_fn_c_try_link "$LINENO"; then :
12173   ac_cv_lib_xml2_xmlSaveToBuffer=yes
12174 else
12175   ac_cv_lib_xml2_xmlSaveToBuffer=no
12176 fi
12177 rm -f core conftest.err conftest.$ac_objext \
12178     conftest$ac_exeext conftest.$ac_ext
12179 LIBS=$ac_check_lib_save_LIBS
12180 fi
12181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12182 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12183 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12184   cat >>confdefs.h <<_ACEOF
12185 #define HAVE_LIBXML2 1
12186 _ACEOF
12187
12188   LIBS="-lxml2 $LIBS"
12189
12190 else
12191   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12192 fi
12193
12194 fi
12195
12196 if test "$with_libxslt" = yes ; then
12197   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12198 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12199 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12200   $as_echo_n "(cached) " >&6
12201 else
12202   ac_check_lib_save_LIBS=$LIBS
12203 LIBS="-lxslt  $LIBS"
12204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12205 /* end confdefs.h.  */
12206
12207 /* Override any GCC internal prototype to avoid an error.
12208    Use char because int might match the return type of a GCC
12209    builtin and then its argument prototype would still apply.  */
12210 #ifdef __cplusplus
12211 extern "C"
12212 #endif
12213 char xsltCleanupGlobals ();
12214 int
12215 main ()
12216 {
12217 return xsltCleanupGlobals ();
12218   ;
12219   return 0;
12220 }
12221 _ACEOF
12222 if ac_fn_c_try_link "$LINENO"; then :
12223   ac_cv_lib_xslt_xsltCleanupGlobals=yes
12224 else
12225   ac_cv_lib_xslt_xsltCleanupGlobals=no
12226 fi
12227 rm -f core conftest.err conftest.$ac_objext \
12228     conftest$ac_exeext conftest.$ac_ext
12229 LIBS=$ac_check_lib_save_LIBS
12230 fi
12231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12232 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12233 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12234   cat >>confdefs.h <<_ACEOF
12235 #define HAVE_LIBXSLT 1
12236 _ACEOF
12237
12238   LIBS="-lxslt $LIBS"
12239
12240 else
12241   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12242 fi
12243
12244 fi
12245
12246 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12247 if test "$with_ldap" = yes ; then
12248   _LIBS="$LIBS"
12249   if test "$PORTNAME" != "win32"; then
12250     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12251 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12252 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12253   $as_echo_n "(cached) " >&6
12254 else
12255   ac_check_lib_save_LIBS=$LIBS
12256 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12258 /* end confdefs.h.  */
12259
12260 /* Override any GCC internal prototype to avoid an error.
12261    Use char because int might match the return type of a GCC
12262    builtin and then its argument prototype would still apply.  */
12263 #ifdef __cplusplus
12264 extern "C"
12265 #endif
12266 char ldap_bind ();
12267 int
12268 main ()
12269 {
12270 return ldap_bind ();
12271   ;
12272   return 0;
12273 }
12274 _ACEOF
12275 if ac_fn_c_try_link "$LINENO"; then :
12276   ac_cv_lib_ldap_ldap_bind=yes
12277 else
12278   ac_cv_lib_ldap_ldap_bind=no
12279 fi
12280 rm -f core conftest.err conftest.$ac_objext \
12281     conftest$ac_exeext conftest.$ac_ext
12282 LIBS=$ac_check_lib_save_LIBS
12283 fi
12284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12285 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12286 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12287   cat >>confdefs.h <<_ACEOF
12288 #define HAVE_LIBLDAP 1
12289 _ACEOF
12290
12291   LIBS="-lldap $LIBS"
12292
12293 else
12294   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12295 fi
12296
12297     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12298     if test "$enable_thread_safety" = yes; then
12299       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12300       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12301 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12302 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12303   $as_echo_n "(cached) " >&6
12304 else
12305   ac_check_lib_save_LIBS=$LIBS
12306 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12308 /* end confdefs.h.  */
12309
12310 /* Override any GCC internal prototype to avoid an error.
12311    Use char because int might match the return type of a GCC
12312    builtin and then its argument prototype would still apply.  */
12313 #ifdef __cplusplus
12314 extern "C"
12315 #endif
12316 char ldap_simple_bind ();
12317 int
12318 main ()
12319 {
12320 return ldap_simple_bind ();
12321   ;
12322   return 0;
12323 }
12324 _ACEOF
12325 if ac_fn_c_try_link "$LINENO"; then :
12326   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12327 else
12328   ac_cv_lib_ldap_r_ldap_simple_bind=no
12329 fi
12330 rm -f core conftest.err conftest.$ac_objext \
12331     conftest$ac_exeext conftest.$ac_ext
12332 LIBS=$ac_check_lib_save_LIBS
12333 fi
12334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12335 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12336 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12337   cat >>confdefs.h <<_ACEOF
12338 #define HAVE_LIBLDAP_R 1
12339 _ACEOF
12340
12341   LIBS="-lldap_r $LIBS"
12342
12343 else
12344   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12345 fi
12346
12347       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12348     else
12349       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12350     fi
12351     for ac_func in ldap_initialize
12352 do :
12353   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12354 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12355   cat >>confdefs.h <<_ACEOF
12356 #define HAVE_LDAP_INITIALIZE 1
12357 _ACEOF
12358
12359 fi
12360 done
12361
12362   else
12363     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12364 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12365 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12366   $as_echo_n "(cached) " >&6
12367 else
12368   ac_check_lib_save_LIBS=$LIBS
12369 LIBS="-lwldap32  $LIBS"
12370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12371 /* end confdefs.h.  */
12372
12373 /* Override any GCC internal prototype to avoid an error.
12374    Use char because int might match the return type of a GCC
12375    builtin and then its argument prototype would still apply.  */
12376 #ifdef __cplusplus
12377 extern "C"
12378 #endif
12379 char ldap_bind ();
12380 int
12381 main ()
12382 {
12383 return ldap_bind ();
12384   ;
12385   return 0;
12386 }
12387 _ACEOF
12388 if ac_fn_c_try_link "$LINENO"; then :
12389   ac_cv_lib_wldap32_ldap_bind=yes
12390 else
12391   ac_cv_lib_wldap32_ldap_bind=no
12392 fi
12393 rm -f core conftest.err conftest.$ac_objext \
12394     conftest$ac_exeext conftest.$ac_ext
12395 LIBS=$ac_check_lib_save_LIBS
12396 fi
12397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12398 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12399 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12400   cat >>confdefs.h <<_ACEOF
12401 #define HAVE_LIBWLDAP32 1
12402 _ACEOF
12403
12404   LIBS="-lwldap32 $LIBS"
12405
12406 else
12407   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12408 fi
12409
12410     LDAP_LIBS_FE="-lwldap32"
12411     LDAP_LIBS_BE="-lwldap32"
12412   fi
12413   LIBS="$_LIBS"
12414 fi
12415
12416
12417
12418 # for contrib/sepgsql
12419 if test "$with_selinux" = yes; then
12420   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12421 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12422 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12423   $as_echo_n "(cached) " >&6
12424 else
12425   ac_check_lib_save_LIBS=$LIBS
12426 LIBS="-lselinux  $LIBS"
12427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12428 /* end confdefs.h.  */
12429
12430 /* Override any GCC internal prototype to avoid an error.
12431    Use char because int might match the return type of a GCC
12432    builtin and then its argument prototype would still apply.  */
12433 #ifdef __cplusplus
12434 extern "C"
12435 #endif
12436 char security_compute_create_name ();
12437 int
12438 main ()
12439 {
12440 return security_compute_create_name ();
12441   ;
12442   return 0;
12443 }
12444 _ACEOF
12445 if ac_fn_c_try_link "$LINENO"; then :
12446   ac_cv_lib_selinux_security_compute_create_name=yes
12447 else
12448   ac_cv_lib_selinux_security_compute_create_name=no
12449 fi
12450 rm -f core conftest.err conftest.$ac_objext \
12451     conftest$ac_exeext conftest.$ac_ext
12452 LIBS=$ac_check_lib_save_LIBS
12453 fi
12454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12455 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12456 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12457   cat >>confdefs.h <<_ACEOF
12458 #define HAVE_LIBSELINUX 1
12459 _ACEOF
12460
12461   LIBS="-lselinux $LIBS"
12462
12463 else
12464   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12465 fi
12466
12467 fi
12468
12469 # for contrib/uuid-ossp
12470 if test "$with_uuid" = bsd ; then
12471   # On BSD, the UUID functions are in libc
12472   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12473 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12474   UUID_LIBS=""
12475 else
12476   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12477 fi
12478
12479 elif test "$with_uuid" = e2fs ; then
12480   # On macOS, the UUID functions are in libc
12481   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12482 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12483   UUID_LIBS=""
12484 else
12485   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12486 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12487 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12488   $as_echo_n "(cached) " >&6
12489 else
12490   ac_check_lib_save_LIBS=$LIBS
12491 LIBS="-luuid  $LIBS"
12492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12493 /* end confdefs.h.  */
12494
12495 /* Override any GCC internal prototype to avoid an error.
12496    Use char because int might match the return type of a GCC
12497    builtin and then its argument prototype would still apply.  */
12498 #ifdef __cplusplus
12499 extern "C"
12500 #endif
12501 char uuid_generate ();
12502 int
12503 main ()
12504 {
12505 return uuid_generate ();
12506   ;
12507   return 0;
12508 }
12509 _ACEOF
12510 if ac_fn_c_try_link "$LINENO"; then :
12511   ac_cv_lib_uuid_uuid_generate=yes
12512 else
12513   ac_cv_lib_uuid_uuid_generate=no
12514 fi
12515 rm -f core conftest.err conftest.$ac_objext \
12516     conftest$ac_exeext conftest.$ac_ext
12517 LIBS=$ac_check_lib_save_LIBS
12518 fi
12519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12520 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12521 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12522   UUID_LIBS="-luuid"
12523 else
12524   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12525 fi
12526
12527 fi
12528
12529 elif test "$with_uuid" = ossp ; then
12530   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12531 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12532 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12533   $as_echo_n "(cached) " >&6
12534 else
12535   ac_check_lib_save_LIBS=$LIBS
12536 LIBS="-lossp-uuid  $LIBS"
12537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12538 /* end confdefs.h.  */
12539
12540 /* Override any GCC internal prototype to avoid an error.
12541    Use char because int might match the return type of a GCC
12542    builtin and then its argument prototype would still apply.  */
12543 #ifdef __cplusplus
12544 extern "C"
12545 #endif
12546 char uuid_export ();
12547 int
12548 main ()
12549 {
12550 return uuid_export ();
12551   ;
12552   return 0;
12553 }
12554 _ACEOF
12555 if ac_fn_c_try_link "$LINENO"; then :
12556   ac_cv_lib_ossp_uuid_uuid_export=yes
12557 else
12558   ac_cv_lib_ossp_uuid_uuid_export=no
12559 fi
12560 rm -f core conftest.err conftest.$ac_objext \
12561     conftest$ac_exeext conftest.$ac_ext
12562 LIBS=$ac_check_lib_save_LIBS
12563 fi
12564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12565 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12566 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12567   UUID_LIBS="-lossp-uuid"
12568 else
12569   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12570 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12571 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12572   $as_echo_n "(cached) " >&6
12573 else
12574   ac_check_lib_save_LIBS=$LIBS
12575 LIBS="-luuid  $LIBS"
12576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12577 /* end confdefs.h.  */
12578
12579 /* Override any GCC internal prototype to avoid an error.
12580    Use char because int might match the return type of a GCC
12581    builtin and then its argument prototype would still apply.  */
12582 #ifdef __cplusplus
12583 extern "C"
12584 #endif
12585 char uuid_export ();
12586 int
12587 main ()
12588 {
12589 return uuid_export ();
12590   ;
12591   return 0;
12592 }
12593 _ACEOF
12594 if ac_fn_c_try_link "$LINENO"; then :
12595   ac_cv_lib_uuid_uuid_export=yes
12596 else
12597   ac_cv_lib_uuid_uuid_export=no
12598 fi
12599 rm -f core conftest.err conftest.$ac_objext \
12600     conftest$ac_exeext conftest.$ac_ext
12601 LIBS=$ac_check_lib_save_LIBS
12602 fi
12603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12604 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12605 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12606   UUID_LIBS="-luuid"
12607 else
12608   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12609 fi
12610
12611 fi
12612
12613 fi
12614
12615
12616
12617 ##
12618 ## Header files
12619 ##
12620
12621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12622 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12623 if ${ac_cv_header_stdbool_h+:} false; then :
12624   $as_echo_n "(cached) " >&6
12625 else
12626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12627 /* end confdefs.h.  */
12628
12629              #include <stdbool.h>
12630              #ifndef bool
12631               "error: bool is not defined"
12632              #endif
12633              #ifndef false
12634               "error: false is not defined"
12635              #endif
12636              #if false
12637               "error: false is not 0"
12638              #endif
12639              #ifndef true
12640               "error: true is not defined"
12641              #endif
12642              #if true != 1
12643               "error: true is not 1"
12644              #endif
12645              #ifndef __bool_true_false_are_defined
12646               "error: __bool_true_false_are_defined is not defined"
12647              #endif
12648
12649              struct s { _Bool s: 1; _Bool t; } s;
12650
12651              char a[true == 1 ? 1 : -1];
12652              char b[false == 0 ? 1 : -1];
12653              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12654              char d[(bool) 0.5 == true ? 1 : -1];
12655              /* See body of main program for 'e'.  */
12656              char f[(_Bool) 0.0 == false ? 1 : -1];
12657              char g[true];
12658              char h[sizeof (_Bool)];
12659              char i[sizeof s.t];
12660              enum { j = false, k = true, l = false * true, m = true * 256 };
12661              /* The following fails for
12662                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12663              _Bool n[m];
12664              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12665              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12666              /* Catch a bug in an HP-UX C compiler.  See
12667                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12668                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12669               */
12670              _Bool q = true;
12671              _Bool *pq = &q;
12672
12673 int
12674 main ()
12675 {
12676
12677              bool e = &s;
12678              *pq |= q;
12679              *pq |= ! q;
12680              /* Refer to every declared value, to avoid compiler optimizations.  */
12681              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12682                      + !m + !n + !o + !p + !q + !pq);
12683
12684   ;
12685   return 0;
12686 }
12687 _ACEOF
12688 if ac_fn_c_try_compile "$LINENO"; then :
12689   ac_cv_header_stdbool_h=yes
12690 else
12691   ac_cv_header_stdbool_h=no
12692 fi
12693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12694 fi
12695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12696 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12697    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12698 if test "x$ac_cv_type__Bool" = xyes; then :
12699
12700 cat >>confdefs.h <<_ACEOF
12701 #define HAVE__BOOL 1
12702 _ACEOF
12703
12704
12705 fi
12706
12707
12708 if test $ac_cv_header_stdbool_h = yes; then
12709
12710 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12711
12712 fi
12713
12714
12715 for ac_header in atomic.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
12716 do :
12717   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12718 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12719 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12720   cat >>confdefs.h <<_ACEOF
12721 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12722 _ACEOF
12723
12724 fi
12725
12726 done
12727
12728
12729 # On BSD, test for net/if.h will fail unless sys/socket.h
12730 # is included first.
12731 for ac_header in net/if.h
12732 do :
12733   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12734 #include <sys/socket.h>
12735
12736 "
12737 if test "x$ac_cv_header_net_if_h" = xyes; then :
12738   cat >>confdefs.h <<_ACEOF
12739 #define HAVE_NET_IF_H 1
12740 _ACEOF
12741
12742 fi
12743
12744 done
12745
12746
12747 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12748 # is included first.
12749 for ac_header in sys/ucred.h
12750 do :
12751   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12752 #include <sys/param.h>
12753
12754 "
12755 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12756   cat >>confdefs.h <<_ACEOF
12757 #define HAVE_SYS_UCRED_H 1
12758 _ACEOF
12759
12760 fi
12761
12762 done
12763
12764
12765 # At least on IRIX, test for netinet/tcp.h will fail unless
12766 # netinet/in.h is included first.
12767 for ac_header in netinet/tcp.h
12768 do :
12769   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12770 #include <netinet/in.h>
12771
12772 "
12773 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12774   cat >>confdefs.h <<_ACEOF
12775 #define HAVE_NETINET_TCP_H 1
12776 _ACEOF
12777
12778 fi
12779
12780 done
12781
12782
12783 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12784   for ac_header in readline/readline.h
12785 do :
12786   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12787 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12788   cat >>confdefs.h <<_ACEOF
12789 #define HAVE_READLINE_READLINE_H 1
12790 _ACEOF
12791
12792 else
12793   for ac_header in readline.h
12794 do :
12795   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12796 if test "x$ac_cv_header_readline_h" = xyes; then :
12797   cat >>confdefs.h <<_ACEOF
12798 #define HAVE_READLINE_H 1
12799 _ACEOF
12800
12801 else
12802   as_fn_error $? "readline header not found
12803 If you have readline already installed, see config.log for details on the
12804 failure.  It is possible the compiler isn't looking in the proper directory.
12805 Use --without-readline to disable readline support." "$LINENO" 5
12806 fi
12807
12808 done
12809
12810 fi
12811
12812 done
12813
12814   for ac_header in readline/history.h
12815 do :
12816   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12817 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12818   cat >>confdefs.h <<_ACEOF
12819 #define HAVE_READLINE_HISTORY_H 1
12820 _ACEOF
12821
12822 else
12823   for ac_header in history.h
12824 do :
12825   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12826 if test "x$ac_cv_header_history_h" = xyes; then :
12827   cat >>confdefs.h <<_ACEOF
12828 #define HAVE_HISTORY_H 1
12829 _ACEOF
12830
12831 else
12832   as_fn_error $? "history header not found
12833 If you have readline already installed, see config.log for details on the
12834 failure.  It is possible the compiler isn't looking in the proper directory.
12835 Use --without-readline to disable readline support." "$LINENO" 5
12836 fi
12837
12838 done
12839
12840 fi
12841
12842 done
12843
12844 fi
12845
12846 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12847 # Some installations of libedit usurp /usr/include/readline/, which seems
12848 # bad practice, since in combined installations readline will have its headers
12849 # there.  We might have to resort to AC_EGREP checks to make sure we found
12850 # the proper header...
12851   for ac_header in editline/readline.h
12852 do :
12853   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12854 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12855   cat >>confdefs.h <<_ACEOF
12856 #define HAVE_EDITLINE_READLINE_H 1
12857 _ACEOF
12858
12859 else
12860   for ac_header in readline.h
12861 do :
12862   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12863 if test "x$ac_cv_header_readline_h" = xyes; then :
12864   cat >>confdefs.h <<_ACEOF
12865 #define HAVE_READLINE_H 1
12866 _ACEOF
12867
12868 else
12869   for ac_header in readline/readline.h
12870 do :
12871   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12872 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12873   cat >>confdefs.h <<_ACEOF
12874 #define HAVE_READLINE_READLINE_H 1
12875 _ACEOF
12876
12877 else
12878   as_fn_error $? "readline header not found
12879 If you have libedit already installed, see config.log for details on the
12880 failure.  It is possible the compiler isn't looking in the proper directory.
12881 Use --without-readline to disable libedit support." "$LINENO" 5
12882 fi
12883
12884 done
12885
12886 fi
12887
12888 done
12889
12890 fi
12891
12892 done
12893
12894 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12895 # not be there at all.  Hence, don't complain if not found.  We must check
12896 # though, since in yet other versions it is an independent header.
12897   for ac_header in editline/history.h
12898 do :
12899   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12900 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12901   cat >>confdefs.h <<_ACEOF
12902 #define HAVE_EDITLINE_HISTORY_H 1
12903 _ACEOF
12904
12905 else
12906   for ac_header in history.h
12907 do :
12908   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12909 if test "x$ac_cv_header_history_h" = xyes; then :
12910   cat >>confdefs.h <<_ACEOF
12911 #define HAVE_HISTORY_H 1
12912 _ACEOF
12913
12914 else
12915   for ac_header in readline/history.h
12916 do :
12917   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12918 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12919   cat >>confdefs.h <<_ACEOF
12920 #define HAVE_READLINE_HISTORY_H 1
12921 _ACEOF
12922
12923 fi
12924
12925 done
12926
12927 fi
12928
12929 done
12930
12931 fi
12932
12933 done
12934
12935 fi
12936
12937 if test "$with_zlib" = yes; then
12938   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
12939 if test "x$ac_cv_header_zlib_h" = xyes; then :
12940
12941 else
12942   as_fn_error $? "zlib header not found
12943 If you have zlib already installed, see config.log for details on the
12944 failure.  It is possible the compiler isn't looking in the proper directory.
12945 Use --without-zlib to disable zlib support." "$LINENO" 5
12946 fi
12947
12948
12949 fi
12950
12951 if test "$with_gssapi" = yes ; then
12952   for ac_header in gssapi/gssapi.h
12953 do :
12954   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
12955 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
12956   cat >>confdefs.h <<_ACEOF
12957 #define HAVE_GSSAPI_GSSAPI_H 1
12958 _ACEOF
12959
12960 else
12961   for ac_header in gssapi.h
12962 do :
12963   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
12964 if test "x$ac_cv_header_gssapi_h" = xyes; then :
12965   cat >>confdefs.h <<_ACEOF
12966 #define HAVE_GSSAPI_H 1
12967 _ACEOF
12968
12969 else
12970   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
12971 fi
12972
12973 done
12974
12975 fi
12976
12977 done
12978
12979 fi
12980
12981 if test "$with_openssl" = yes ; then
12982   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
12983 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
12984
12985 else
12986   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
12987 fi
12988
12989
12990   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
12991 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
12992
12993 else
12994   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
12995 fi
12996
12997
12998 fi
12999
13000 if test "$with_pam" = yes ; then
13001   for ac_header in security/pam_appl.h
13002 do :
13003   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13004 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13005   cat >>confdefs.h <<_ACEOF
13006 #define HAVE_SECURITY_PAM_APPL_H 1
13007 _ACEOF
13008
13009 else
13010   for ac_header in pam/pam_appl.h
13011 do :
13012   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13013 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13014   cat >>confdefs.h <<_ACEOF
13015 #define HAVE_PAM_PAM_APPL_H 1
13016 _ACEOF
13017
13018 else
13019   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13020 fi
13021
13022 done
13023
13024 fi
13025
13026 done
13027
13028 fi
13029
13030 if test "$with_bsd_auth" = yes ; then
13031   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13032 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13033
13034 else
13035   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13036 fi
13037
13038
13039 fi
13040
13041 if test "$with_systemd" = yes ; then
13042   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13043 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13044
13045 else
13046   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13047 fi
13048
13049
13050 fi
13051
13052 if test "$with_libxml" = yes ; then
13053   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13054 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13055
13056 else
13057   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13058 fi
13059
13060
13061 fi
13062
13063 if test "$with_libxslt" = yes ; then
13064   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13065 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13066
13067 else
13068   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13069 fi
13070
13071
13072 fi
13073
13074 if test "$with_ldap" = yes ; then
13075   if test "$PORTNAME" != "win32"; then
13076      for ac_header in ldap.h
13077 do :
13078   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13079 if test "x$ac_cv_header_ldap_h" = xyes; then :
13080   cat >>confdefs.h <<_ACEOF
13081 #define HAVE_LDAP_H 1
13082 _ACEOF
13083
13084 else
13085   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13086 fi
13087
13088 done
13089
13090      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13091 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13092 if ${pgac_cv_ldap_safe+:} false; then :
13093   $as_echo_n "(cached) " >&6
13094 else
13095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13096 /* end confdefs.h.  */
13097 #include <ldap.h>
13098 #if !defined(LDAP_VENDOR_VERSION) || \
13099      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13100       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13101 choke me
13102 #endif
13103 int
13104 main ()
13105 {
13106
13107   ;
13108   return 0;
13109 }
13110 _ACEOF
13111 if ac_fn_c_try_compile "$LINENO"; then :
13112   pgac_cv_ldap_safe=yes
13113 else
13114   pgac_cv_ldap_safe=no
13115 fi
13116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13117 fi
13118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13119 $as_echo "$pgac_cv_ldap_safe" >&6; }
13120
13121 if test "$pgac_cv_ldap_safe" != yes; then
13122   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13123 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13124 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13125 *** also uses LDAP will crash on exit." >&5
13126 $as_echo "$as_me: WARNING:
13127 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13128 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13129 *** also uses LDAP will crash on exit." >&2;}
13130 fi
13131   else
13132      for ac_header in winldap.h
13133 do :
13134   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13135 #include <windows.h>
13136
13137 "
13138 if test "x$ac_cv_header_winldap_h" = xyes; then :
13139   cat >>confdefs.h <<_ACEOF
13140 #define HAVE_WINLDAP_H 1
13141 _ACEOF
13142
13143 else
13144   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13145 fi
13146
13147 done
13148
13149   fi
13150 fi
13151
13152 if test "$with_bonjour" = yes ; then
13153   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13154 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13155
13156 else
13157   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13158 fi
13159
13160
13161 fi
13162
13163 # for contrib/uuid-ossp
13164 if test "$with_uuid" = bsd ; then
13165   for ac_header in uuid.h
13166 do :
13167   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13168 if test "x$ac_cv_header_uuid_h" = xyes; then :
13169   cat >>confdefs.h <<_ACEOF
13170 #define HAVE_UUID_H 1
13171 _ACEOF
13172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13173 /* end confdefs.h.  */
13174 #include <uuid.h>
13175
13176 _ACEOF
13177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13178   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13179
13180 else
13181   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13182 fi
13183 rm -f conftest*
13184
13185 else
13186   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13187 fi
13188
13189 done
13190
13191 elif test "$with_uuid" = e2fs ; then
13192   for ac_header in uuid/uuid.h
13193 do :
13194   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13195 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13196   cat >>confdefs.h <<_ACEOF
13197 #define HAVE_UUID_UUID_H 1
13198 _ACEOF
13199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13200 /* end confdefs.h.  */
13201 #include <uuid/uuid.h>
13202
13203 _ACEOF
13204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13205   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13206
13207 else
13208   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13209 fi
13210 rm -f conftest*
13211
13212 else
13213   for ac_header in uuid.h
13214 do :
13215   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13216 if test "x$ac_cv_header_uuid_h" = xyes; then :
13217   cat >>confdefs.h <<_ACEOF
13218 #define HAVE_UUID_H 1
13219 _ACEOF
13220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13221 /* end confdefs.h.  */
13222 #include <uuid.h>
13223
13224 _ACEOF
13225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13226   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13227
13228 else
13229   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13230 fi
13231 rm -f conftest*
13232
13233 else
13234   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13235 fi
13236
13237 done
13238
13239 fi
13240
13241 done
13242
13243 elif test "$with_uuid" = ossp ; then
13244   for ac_header in ossp/uuid.h
13245 do :
13246   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13247 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13248   cat >>confdefs.h <<_ACEOF
13249 #define HAVE_OSSP_UUID_H 1
13250 _ACEOF
13251  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13252 /* end confdefs.h.  */
13253 #include <ossp/uuid.h>
13254
13255 _ACEOF
13256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13257   $EGREP "uuid_export" >/dev/null 2>&1; then :
13258
13259 else
13260   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13261 fi
13262 rm -f conftest*
13263
13264 else
13265   for ac_header in uuid.h
13266 do :
13267   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13268 if test "x$ac_cv_header_uuid_h" = xyes; then :
13269   cat >>confdefs.h <<_ACEOF
13270 #define HAVE_UUID_H 1
13271 _ACEOF
13272  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13273 /* end confdefs.h.  */
13274 #include <uuid.h>
13275
13276 _ACEOF
13277 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13278   $EGREP "uuid_export" >/dev/null 2>&1; then :
13279
13280 else
13281   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13282 fi
13283 rm -f conftest*
13284
13285 else
13286   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13287 fi
13288
13289 done
13290
13291 fi
13292
13293 done
13294
13295 fi
13296
13297 if test "$PORTNAME" = "win32" ; then
13298    for ac_header in crtdefs.h
13299 do :
13300   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13301 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13302   cat >>confdefs.h <<_ACEOF
13303 #define HAVE_CRTDEFS_H 1
13304 _ACEOF
13305
13306 fi
13307
13308 done
13309
13310 fi
13311
13312 ##
13313 ## Types, structures, compiler characteristics
13314 ##
13315
13316   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13317 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13318 if ${ac_cv_c_bigendian+:} false; then :
13319   $as_echo_n "(cached) " >&6
13320 else
13321   ac_cv_c_bigendian=unknown
13322     # See if we're dealing with a universal compiler.
13323     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13324 /* end confdefs.h.  */
13325 #ifndef __APPLE_CC__
13326                not a universal capable compiler
13327              #endif
13328              typedef int dummy;
13329
13330 _ACEOF
13331 if ac_fn_c_try_compile "$LINENO"; then :
13332
13333         # Check for potential -arch flags.  It is not universal unless
13334         # there are at least two -arch flags with different values.
13335         ac_arch=
13336         ac_prev=
13337         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13338          if test -n "$ac_prev"; then
13339            case $ac_word in
13340              i?86 | x86_64 | ppc | ppc64)
13341                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13342                  ac_arch=$ac_word
13343                else
13344                  ac_cv_c_bigendian=universal
13345                  break
13346                fi
13347                ;;
13348            esac
13349            ac_prev=
13350          elif test "x$ac_word" = "x-arch"; then
13351            ac_prev=arch
13352          fi
13353        done
13354 fi
13355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13356     if test $ac_cv_c_bigendian = unknown; then
13357       # See if sys/param.h defines the BYTE_ORDER macro.
13358       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13359 /* end confdefs.h.  */
13360 #include <sys/types.h>
13361              #include <sys/param.h>
13362
13363 int
13364 main ()
13365 {
13366 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13367                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13368                      && LITTLE_ENDIAN)
13369               bogus endian macros
13370              #endif
13371
13372   ;
13373   return 0;
13374 }
13375 _ACEOF
13376 if ac_fn_c_try_compile "$LINENO"; then :
13377   # It does; now see whether it defined to BIG_ENDIAN or not.
13378          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13379 /* end confdefs.h.  */
13380 #include <sys/types.h>
13381                 #include <sys/param.h>
13382
13383 int
13384 main ()
13385 {
13386 #if BYTE_ORDER != BIG_ENDIAN
13387                  not big endian
13388                 #endif
13389
13390   ;
13391   return 0;
13392 }
13393 _ACEOF
13394 if ac_fn_c_try_compile "$LINENO"; then :
13395   ac_cv_c_bigendian=yes
13396 else
13397   ac_cv_c_bigendian=no
13398 fi
13399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13400 fi
13401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13402     fi
13403     if test $ac_cv_c_bigendian = unknown; then
13404       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13405       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13406 /* end confdefs.h.  */
13407 #include <limits.h>
13408
13409 int
13410 main ()
13411 {
13412 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13413               bogus endian macros
13414              #endif
13415
13416   ;
13417   return 0;
13418 }
13419 _ACEOF
13420 if ac_fn_c_try_compile "$LINENO"; then :
13421   # It does; now see whether it defined to _BIG_ENDIAN or not.
13422          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13423 /* end confdefs.h.  */
13424 #include <limits.h>
13425
13426 int
13427 main ()
13428 {
13429 #ifndef _BIG_ENDIAN
13430                  not big endian
13431                 #endif
13432
13433   ;
13434   return 0;
13435 }
13436 _ACEOF
13437 if ac_fn_c_try_compile "$LINENO"; then :
13438   ac_cv_c_bigendian=yes
13439 else
13440   ac_cv_c_bigendian=no
13441 fi
13442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13443 fi
13444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13445     fi
13446     if test $ac_cv_c_bigendian = unknown; then
13447       # Compile a test program.
13448       if test "$cross_compiling" = yes; then :
13449   # Try to guess by grepping values from an object file.
13450          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13451 /* end confdefs.h.  */
13452 short int ascii_mm[] =
13453                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13454                 short int ascii_ii[] =
13455                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13456                 int use_ascii (int i) {
13457                   return ascii_mm[i] + ascii_ii[i];
13458                 }
13459                 short int ebcdic_ii[] =
13460                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13461                 short int ebcdic_mm[] =
13462                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13463                 int use_ebcdic (int i) {
13464                   return ebcdic_mm[i] + ebcdic_ii[i];
13465                 }
13466                 extern int foo;
13467
13468 int
13469 main ()
13470 {
13471 return use_ascii (foo) == use_ebcdic (foo);
13472   ;
13473   return 0;
13474 }
13475 _ACEOF
13476 if ac_fn_c_try_compile "$LINENO"; then :
13477   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13478               ac_cv_c_bigendian=yes
13479             fi
13480             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13481               if test "$ac_cv_c_bigendian" = unknown; then
13482                 ac_cv_c_bigendian=no
13483               else
13484                 # finding both strings is unlikely to happen, but who knows?
13485                 ac_cv_c_bigendian=unknown
13486               fi
13487             fi
13488 fi
13489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13490 else
13491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13492 /* end confdefs.h.  */
13493 $ac_includes_default
13494 int
13495 main ()
13496 {
13497
13498              /* Are we little or big endian?  From Harbison&Steele.  */
13499              union
13500              {
13501                long int l;
13502                char c[sizeof (long int)];
13503              } u;
13504              u.l = 1;
13505              return u.c[sizeof (long int) - 1] == 1;
13506
13507   ;
13508   return 0;
13509 }
13510 _ACEOF
13511 if ac_fn_c_try_run "$LINENO"; then :
13512   ac_cv_c_bigendian=no
13513 else
13514   ac_cv_c_bigendian=yes
13515 fi
13516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13517   conftest.$ac_objext conftest.beam conftest.$ac_ext
13518 fi
13519
13520     fi
13521 fi
13522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13523 $as_echo "$ac_cv_c_bigendian" >&6; }
13524  case $ac_cv_c_bigendian in #(
13525    yes)
13526      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13527 ;; #(
13528    no)
13529       ;; #(
13530    universal)
13531
13532 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13533
13534      ;; #(
13535    *)
13536      as_fn_error $? "unknown endianness
13537  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13538  esac
13539
13540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13541 $as_echo_n "checking for inline... " >&6; }
13542 if ${ac_cv_c_inline+:} false; then :
13543   $as_echo_n "(cached) " >&6
13544 else
13545   ac_cv_c_inline=no
13546 for ac_kw in inline __inline__ __inline; do
13547   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13548 /* end confdefs.h.  */
13549 #ifndef __cplusplus
13550 typedef int foo_t;
13551 static $ac_kw foo_t static_foo () {return 0; }
13552 $ac_kw foo_t foo () {return 0; }
13553 #endif
13554
13555 _ACEOF
13556 if ac_fn_c_try_compile "$LINENO"; then :
13557   ac_cv_c_inline=$ac_kw
13558 fi
13559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13560   test "$ac_cv_c_inline" != no && break
13561 done
13562
13563 fi
13564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13565 $as_echo "$ac_cv_c_inline" >&6; }
13566
13567 case $ac_cv_c_inline in
13568   inline | yes) ;;
13569   *)
13570     case $ac_cv_c_inline in
13571       no) ac_val=;;
13572       *) ac_val=$ac_cv_c_inline;;
13573     esac
13574     cat >>confdefs.h <<_ACEOF
13575 #ifndef __cplusplus
13576 #define inline $ac_val
13577 #endif
13578 _ACEOF
13579     ;;
13580 esac
13581
13582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13583 $as_echo_n "checking for printf format archetype... " >&6; }
13584 if ${pgac_cv_printf_archetype+:} false; then :
13585   $as_echo_n "(cached) " >&6
13586 else
13587   pgac_cv_printf_archetype=gnu_printf
13588 ac_save_c_werror_flag=$ac_c_werror_flag
13589 ac_c_werror_flag=yes
13590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13591 /* end confdefs.h.  */
13592 extern void pgac_write(int ignore, const char *fmt,...)
13593 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13594 int
13595 main ()
13596 {
13597 pgac_write(0, "error %s: %m", "foo");
13598   ;
13599   return 0;
13600 }
13601 _ACEOF
13602 if ac_fn_c_try_compile "$LINENO"; then :
13603   ac_archetype_ok=yes
13604 else
13605   ac_archetype_ok=no
13606 fi
13607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13608 ac_c_werror_flag=$ac_save_c_werror_flag
13609
13610 if [ "$ac_archetype_ok" = no ]; then
13611   pgac_cv_printf_archetype=__syslog__
13612   ac_save_c_werror_flag=$ac_c_werror_flag
13613 ac_c_werror_flag=yes
13614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13615 /* end confdefs.h.  */
13616 extern void pgac_write(int ignore, const char *fmt,...)
13617 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13618 int
13619 main ()
13620 {
13621 pgac_write(0, "error %s: %m", "foo");
13622   ;
13623   return 0;
13624 }
13625 _ACEOF
13626 if ac_fn_c_try_compile "$LINENO"; then :
13627   ac_archetype_ok=yes
13628 else
13629   ac_archetype_ok=no
13630 fi
13631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13632 ac_c_werror_flag=$ac_save_c_werror_flag
13633
13634   if [ "$ac_archetype_ok" = no ]; then
13635     pgac_cv_printf_archetype=printf
13636   fi
13637 fi
13638 fi
13639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13640 $as_echo "$pgac_cv_printf_archetype" >&6; }
13641
13642 cat >>confdefs.h <<_ACEOF
13643 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13644 _ACEOF
13645
13646
13647
13648   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13649 $as_echo_n "checking for flexible array members... " >&6; }
13650 if ${ac_cv_c_flexmember+:} false; then :
13651   $as_echo_n "(cached) " >&6
13652 else
13653   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13654 /* end confdefs.h.  */
13655 #include <stdlib.h>
13656             #include <stdio.h>
13657             #include <stddef.h>
13658             struct s { int n; double d[]; };
13659 int
13660 main ()
13661 {
13662 int m = getchar ();
13663             struct s *p = malloc (offsetof (struct s, d)
13664                                   + m * sizeof (double));
13665             p->d[0] = 0.0;
13666             return p->d != (double *) NULL;
13667   ;
13668   return 0;
13669 }
13670 _ACEOF
13671 if ac_fn_c_try_compile "$LINENO"; then :
13672   ac_cv_c_flexmember=yes
13673 else
13674   ac_cv_c_flexmember=no
13675 fi
13676 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13677 fi
13678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13679 $as_echo "$ac_cv_c_flexmember" >&6; }
13680   if test $ac_cv_c_flexmember = yes; then
13681
13682 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13683
13684   else
13685     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13686
13687   fi
13688
13689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13690 $as_echo_n "checking for signed types... " >&6; }
13691 if ${pgac_cv_c_signed+:} false; then :
13692   $as_echo_n "(cached) " >&6
13693 else
13694   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13695 /* end confdefs.h.  */
13696
13697 int
13698 main ()
13699 {
13700 signed char c; signed short s; signed int i;
13701   ;
13702   return 0;
13703 }
13704 _ACEOF
13705 if ac_fn_c_try_compile "$LINENO"; then :
13706   pgac_cv_c_signed=yes
13707 else
13708   pgac_cv_c_signed=no
13709 fi
13710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13711 fi
13712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13713 $as_echo "$pgac_cv_c_signed" >&6; }
13714 if test x"$pgac_cv_c_signed" = xno ; then
13715
13716 $as_echo "#define signed /**/" >>confdefs.h
13717
13718 fi
13719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13720 $as_echo_n "checking for __func__... " >&6; }
13721 if ${pgac_cv_funcname_func_support+:} false; then :
13722   $as_echo_n "(cached) " >&6
13723 else
13724   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13725 /* end confdefs.h.  */
13726 #include <stdio.h>
13727 int
13728 main ()
13729 {
13730 printf("%s\n", __func__);
13731   ;
13732   return 0;
13733 }
13734 _ACEOF
13735 if ac_fn_c_try_compile "$LINENO"; then :
13736   pgac_cv_funcname_func_support=yes
13737 else
13738   pgac_cv_funcname_func_support=no
13739 fi
13740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13741 fi
13742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13743 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13744 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13745
13746 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13747
13748 else
13749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13750 $as_echo_n "checking for __FUNCTION__... " >&6; }
13751 if ${pgac_cv_funcname_function_support+:} false; then :
13752   $as_echo_n "(cached) " >&6
13753 else
13754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13755 /* end confdefs.h.  */
13756 #include <stdio.h>
13757 int
13758 main ()
13759 {
13760 printf("%s\n", __FUNCTION__);
13761   ;
13762   return 0;
13763 }
13764 _ACEOF
13765 if ac_fn_c_try_compile "$LINENO"; then :
13766   pgac_cv_funcname_function_support=yes
13767 else
13768   pgac_cv_funcname_function_support=no
13769 fi
13770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13771 fi
13772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13773 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13774 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13775
13776 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13777
13778 fi
13779 fi
13780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13781 $as_echo_n "checking for _Static_assert... " >&6; }
13782 if ${pgac_cv__static_assert+:} false; then :
13783   $as_echo_n "(cached) " >&6
13784 else
13785   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13786 /* end confdefs.h.  */
13787
13788 int
13789 main ()
13790 {
13791 ({ _Static_assert(1, "foo"); })
13792   ;
13793   return 0;
13794 }
13795 _ACEOF
13796 if ac_fn_c_try_link "$LINENO"; then :
13797   pgac_cv__static_assert=yes
13798 else
13799   pgac_cv__static_assert=no
13800 fi
13801 rm -f core conftest.err conftest.$ac_objext \
13802     conftest$ac_exeext conftest.$ac_ext
13803 fi
13804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13805 $as_echo "$pgac_cv__static_assert" >&6; }
13806 if test x"$pgac_cv__static_assert" = xyes ; then
13807
13808 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13809
13810 fi
13811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13812 $as_echo_n "checking for typeof... " >&6; }
13813 if ${pgac_cv_c_typeof+:} false; then :
13814   $as_echo_n "(cached) " >&6
13815 else
13816   pgac_cv_c_typeof=no
13817 for pgac_kw in typeof __typeof__ decltype; do
13818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13819 /* end confdefs.h.  */
13820
13821 int
13822 main ()
13823 {
13824 int x = 0;
13825 $pgac_kw(x) y;
13826 y = x;
13827 return y;
13828   ;
13829   return 0;
13830 }
13831 _ACEOF
13832 if ac_fn_c_try_compile "$LINENO"; then :
13833   pgac_cv_c_typeof=$pgac_kw
13834 fi
13835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13836   test "$pgac_cv_c_typeof" != no && break
13837 done
13838 fi
13839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13840 $as_echo "$pgac_cv_c_typeof" >&6; }
13841 if test "$pgac_cv_c_typeof" != no; then
13842
13843 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13844
13845   if test "$pgac_cv_c_typeof" != typeof; then
13846
13847 cat >>confdefs.h <<_ACEOF
13848 #define typeof $pgac_cv_c_typeof
13849 _ACEOF
13850
13851   fi
13852 fi
13853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13854 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13855 if ${pgac_cv__types_compatible+:} false; then :
13856   $as_echo_n "(cached) " >&6
13857 else
13858   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13859 /* end confdefs.h.  */
13860
13861 int
13862 main ()
13863 {
13864  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13865   ;
13866   return 0;
13867 }
13868 _ACEOF
13869 if ac_fn_c_try_compile "$LINENO"; then :
13870   pgac_cv__types_compatible=yes
13871 else
13872   pgac_cv__types_compatible=no
13873 fi
13874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13875 fi
13876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13877 $as_echo "$pgac_cv__types_compatible" >&6; }
13878 if test x"$pgac_cv__types_compatible" = xyes ; then
13879
13880 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13881
13882 fi
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13884 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13885 if ${pgac_cv__builtin_bswap16+:} false; then :
13886   $as_echo_n "(cached) " >&6
13887 else
13888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13889 /* end confdefs.h.  */
13890 static unsigned long int x = __builtin_bswap16(0xaabb);
13891
13892 _ACEOF
13893 if ac_fn_c_try_compile "$LINENO"; then :
13894   pgac_cv__builtin_bswap16=yes
13895 else
13896   pgac_cv__builtin_bswap16=no
13897 fi
13898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13899 fi
13900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13901 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13902 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13903
13904 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13905
13906 fi
13907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13908 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13909 if ${pgac_cv__builtin_bswap32+:} false; then :
13910   $as_echo_n "(cached) " >&6
13911 else
13912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13913 /* end confdefs.h.  */
13914 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13915
13916 _ACEOF
13917 if ac_fn_c_try_compile "$LINENO"; then :
13918   pgac_cv__builtin_bswap32=yes
13919 else
13920   pgac_cv__builtin_bswap32=no
13921 fi
13922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13923 fi
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
13925 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
13926 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
13927
13928 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
13929
13930 fi
13931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
13932 $as_echo_n "checking for __builtin_bswap64... " >&6; }
13933 if ${pgac_cv__builtin_bswap64+:} false; then :
13934   $as_echo_n "(cached) " >&6
13935 else
13936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13937 /* end confdefs.h.  */
13938 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
13939
13940 _ACEOF
13941 if ac_fn_c_try_compile "$LINENO"; then :
13942   pgac_cv__builtin_bswap64=yes
13943 else
13944   pgac_cv__builtin_bswap64=no
13945 fi
13946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13947 fi
13948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
13949 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
13950 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
13951
13952 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
13953
13954 fi
13955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
13956 $as_echo_n "checking for __builtin_constant_p... " >&6; }
13957 if ${pgac_cv__builtin_constant_p+:} false; then :
13958   $as_echo_n "(cached) " >&6
13959 else
13960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13961 /* end confdefs.h.  */
13962 static int x;
13963   static int y[__builtin_constant_p(x) ? x : 1];
13964   static int z[__builtin_constant_p("string literal") ? 1 : x];
13965
13966
13967 _ACEOF
13968 if ac_fn_c_try_compile "$LINENO"; then :
13969   pgac_cv__builtin_constant_p=yes
13970 else
13971   pgac_cv__builtin_constant_p=no
13972 fi
13973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13974 fi
13975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
13976 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
13977 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
13978
13979 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
13980
13981 fi
13982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
13983 $as_echo_n "checking for __builtin_unreachable... " >&6; }
13984 if ${pgac_cv__builtin_unreachable+:} false; then :
13985   $as_echo_n "(cached) " >&6
13986 else
13987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13988 /* end confdefs.h.  */
13989
13990 int
13991 main ()
13992 {
13993 __builtin_unreachable();
13994   ;
13995   return 0;
13996 }
13997 _ACEOF
13998 if ac_fn_c_try_link "$LINENO"; then :
13999   pgac_cv__builtin_unreachable=yes
14000 else
14001   pgac_cv__builtin_unreachable=no
14002 fi
14003 rm -f core conftest.err conftest.$ac_objext \
14004     conftest$ac_exeext conftest.$ac_ext
14005 fi
14006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14007 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14008 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14009
14010 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14011
14012 fi
14013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14014 $as_echo_n "checking for computed goto support... " >&6; }
14015 if ${pgac_cv_computed_goto+:} false; then :
14016   $as_echo_n "(cached) " >&6
14017 else
14018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14019 /* end confdefs.h.  */
14020
14021 int
14022 main ()
14023 {
14024 void *labeladdrs[] = {&&my_label};
14025   goto *labeladdrs[0];
14026   my_label:
14027   return 1;
14028
14029   ;
14030   return 0;
14031 }
14032 _ACEOF
14033 if ac_fn_c_try_compile "$LINENO"; then :
14034   pgac_cv_computed_goto=yes
14035 else
14036   pgac_cv_computed_goto=no
14037 fi
14038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14039 fi
14040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14041 $as_echo "$pgac_cv_computed_goto" >&6; }
14042 if test x"$pgac_cv_computed_goto" = xyes ; then
14043
14044 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14045
14046 fi
14047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14048 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14049 if ${ac_cv_struct_tm+:} false; then :
14050   $as_echo_n "(cached) " >&6
14051 else
14052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14053 /* end confdefs.h.  */
14054 #include <sys/types.h>
14055 #include <time.h>
14056
14057 int
14058 main ()
14059 {
14060 struct tm tm;
14061                                      int *p = &tm.tm_sec;
14062                                      return !p;
14063   ;
14064   return 0;
14065 }
14066 _ACEOF
14067 if ac_fn_c_try_compile "$LINENO"; then :
14068   ac_cv_struct_tm=time.h
14069 else
14070   ac_cv_struct_tm=sys/time.h
14071 fi
14072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14073 fi
14074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14075 $as_echo "$ac_cv_struct_tm" >&6; }
14076 if test $ac_cv_struct_tm = sys/time.h; then
14077
14078 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14079
14080 fi
14081
14082 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14083 #include <$ac_cv_struct_tm>
14084
14085 "
14086 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14087
14088 cat >>confdefs.h <<_ACEOF
14089 #define HAVE_STRUCT_TM_TM_ZONE 1
14090 _ACEOF
14091
14092
14093 fi
14094
14095 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14096
14097 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14098
14099 fi
14100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14101 $as_echo_n "checking for tzname... " >&6; }
14102 if ${ac_cv_var_tzname+:} false; then :
14103   $as_echo_n "(cached) " >&6
14104 else
14105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14106 /* end confdefs.h.  */
14107 #include <stdlib.h>
14108 #include <time.h>
14109 #ifndef tzname /* For SGI.  */
14110 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
14111 #endif
14112
14113 int
14114 main ()
14115 {
14116 atoi(*tzname);
14117   ;
14118   return 0;
14119 }
14120 _ACEOF
14121 if ac_fn_c_try_link "$LINENO"; then :
14122   ac_cv_var_tzname=yes
14123 else
14124   ac_cv_var_tzname=no
14125 fi
14126 rm -f core conftest.err conftest.$ac_objext \
14127     conftest$ac_exeext conftest.$ac_ext
14128 fi
14129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14130 $as_echo "$ac_cv_var_tzname" >&6; }
14131 if test $ac_cv_var_tzname = yes; then
14132
14133 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14134
14135 fi
14136
14137 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14138 #ifdef HAVE_SYS_IPC_H
14139 #include <sys/ipc.h>
14140 #endif
14141 #ifdef HAVE_SYS_SEM_H
14142 #include <sys/sem.h>
14143 #endif
14144 "
14145 if test "x$ac_cv_type_union_semun" = xyes; then :
14146
14147 cat >>confdefs.h <<_ACEOF
14148 #define HAVE_UNION_SEMUN 1
14149 _ACEOF
14150
14151
14152 fi
14153
14154 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14155 #ifdef HAVE_SYS_UN_H
14156 #include <sys/un.h>
14157 #endif
14158
14159 "
14160 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14161
14162 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14163
14164 fi
14165
14166 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14167 #include <sys/socket.h>
14168
14169 "
14170 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14171
14172 cat >>confdefs.h <<_ACEOF
14173 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14174 _ACEOF
14175
14176
14177 fi
14178
14179 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14180 #include <sys/socket.h>
14181
14182 "
14183 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14184
14185 cat >>confdefs.h <<_ACEOF
14186 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14187 _ACEOF
14188
14189
14190 fi
14191 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14192 #include <sys/socket.h>
14193
14194 "
14195 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14196
14197 cat >>confdefs.h <<_ACEOF
14198 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14199 _ACEOF
14200
14201
14202 fi
14203 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14204 #include <sys/socket.h>
14205
14206 "
14207 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14208
14209 cat >>confdefs.h <<_ACEOF
14210 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14211 _ACEOF
14212
14213
14214 fi
14215 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14216 #include <sys/socket.h>
14217
14218 "
14219 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14220
14221 cat >>confdefs.h <<_ACEOF
14222 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14223 _ACEOF
14224
14225
14226 fi
14227 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14228 #include <sys/socket.h>
14229
14230 "
14231 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14232
14233 cat >>confdefs.h <<_ACEOF
14234 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14235 _ACEOF
14236
14237
14238 fi
14239
14240 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14241 #include <sys/socket.h>
14242 #include <netdb.h>
14243
14244 "
14245 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14246
14247 cat >>confdefs.h <<_ACEOF
14248 #define HAVE_STRUCT_ADDRINFO 1
14249 _ACEOF
14250
14251
14252 fi
14253
14254
14255   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14256 if test "x$ac_cv_type_intptr_t" = xyes; then :
14257
14258 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14259
14260 else
14261   for ac_type in 'int' 'long int' 'long long int'; do
14262        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14263 /* end confdefs.h.  */
14264 $ac_includes_default
14265 int
14266 main ()
14267 {
14268 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14269 test_array [0] = 0;
14270 return test_array [0];
14271
14272   ;
14273   return 0;
14274 }
14275 _ACEOF
14276 if ac_fn_c_try_compile "$LINENO"; then :
14277
14278 cat >>confdefs.h <<_ACEOF
14279 #define intptr_t $ac_type
14280 _ACEOF
14281
14282           ac_type=
14283 fi
14284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14285        test -z "$ac_type" && break
14286      done
14287 fi
14288
14289
14290
14291   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14292 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14293
14294 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14295
14296 else
14297   for ac_type in 'unsigned int' 'unsigned long int' \
14298         'unsigned long long int'; do
14299        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14300 /* end confdefs.h.  */
14301 $ac_includes_default
14302 int
14303 main ()
14304 {
14305 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14306 test_array [0] = 0;
14307 return test_array [0];
14308
14309   ;
14310   return 0;
14311 }
14312 _ACEOF
14313 if ac_fn_c_try_compile "$LINENO"; then :
14314
14315 cat >>confdefs.h <<_ACEOF
14316 #define uintptr_t $ac_type
14317 _ACEOF
14318
14319           ac_type=
14320 fi
14321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14322        test -z "$ac_type" && break
14323      done
14324 fi
14325
14326
14327
14328   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14329 $as_echo_n "checking for unsigned long long int... " >&6; }
14330 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14331   $as_echo_n "(cached) " >&6
14332 else
14333   ac_cv_type_unsigned_long_long_int=yes
14334      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14335        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14336 /* end confdefs.h.  */
14337
14338   /* For now, do not test the preprocessor; as of 2007 there are too many
14339          implementations with broken preprocessors.  Perhaps this can
14340          be revisited in 2012.  In the meantime, code should not expect
14341          #if to work with literals wider than 32 bits.  */
14342       /* Test literals.  */
14343       long long int ll = 9223372036854775807ll;
14344       long long int nll = -9223372036854775807LL;
14345       unsigned long long int ull = 18446744073709551615ULL;
14346       /* Test constant expressions.   */
14347       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14348                      ? 1 : -1)];
14349       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14350                      ? 1 : -1)];
14351       int i = 63;
14352 int
14353 main ()
14354 {
14355 /* Test availability of runtime routines for shift and division.  */
14356       long long int llmax = 9223372036854775807ll;
14357       unsigned long long int ullmax = 18446744073709551615ull;
14358       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14359               | (llmax / ll) | (llmax % ll)
14360               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14361               | (ullmax / ull) | (ullmax % ull));
14362   ;
14363   return 0;
14364 }
14365
14366 _ACEOF
14367 if ac_fn_c_try_link "$LINENO"; then :
14368
14369 else
14370   ac_cv_type_unsigned_long_long_int=no
14371 fi
14372 rm -f core conftest.err conftest.$ac_objext \
14373     conftest$ac_exeext conftest.$ac_ext
14374      fi
14375 fi
14376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14377 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14378   if test $ac_cv_type_unsigned_long_long_int = yes; then
14379
14380 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14381
14382   fi
14383
14384
14385
14386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14387 $as_echo_n "checking for long long int... " >&6; }
14388 if ${ac_cv_type_long_long_int+:} false; then :
14389   $as_echo_n "(cached) " >&6
14390 else
14391   ac_cv_type_long_long_int=yes
14392       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14393         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14394         if test $ac_cv_type_long_long_int = yes; then
14395                                   if test "$cross_compiling" = yes; then :
14396   :
14397 else
14398   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14399 /* end confdefs.h.  */
14400 #include <limits.h>
14401                  #ifndef LLONG_MAX
14402                  # define HALF \
14403                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14404                  # define LLONG_MAX (HALF - 1 + HALF)
14405                  #endif
14406 int
14407 main ()
14408 {
14409 long long int n = 1;
14410                  int i;
14411                  for (i = 0; ; i++)
14412                    {
14413                      long long int m = n << i;
14414                      if (m >> i != n)
14415                        return 1;
14416                      if (LLONG_MAX / 2 < m)
14417                        break;
14418                    }
14419                  return 0;
14420   ;
14421   return 0;
14422 }
14423 _ACEOF
14424 if ac_fn_c_try_run "$LINENO"; then :
14425
14426 else
14427   ac_cv_type_long_long_int=no
14428 fi
14429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14430   conftest.$ac_objext conftest.beam conftest.$ac_ext
14431 fi
14432
14433         fi
14434       fi
14435 fi
14436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14437 $as_echo "$ac_cv_type_long_long_int" >&6; }
14438   if test $ac_cv_type_long_long_int = yes; then
14439
14440 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14441
14442   fi
14443
14444
14445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14446 $as_echo_n "checking for locale_t... " >&6; }
14447 if ${pgac_cv_type_locale_t+:} false; then :
14448   $as_echo_n "(cached) " >&6
14449 else
14450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14451 /* end confdefs.h.  */
14452 #include <locale.h>
14453 locale_t x;
14454 int
14455 main ()
14456 {
14457
14458   ;
14459   return 0;
14460 }
14461 _ACEOF
14462 if ac_fn_c_try_compile "$LINENO"; then :
14463   pgac_cv_type_locale_t=yes
14464 else
14465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14466 /* end confdefs.h.  */
14467 #include <xlocale.h>
14468 locale_t x;
14469 int
14470 main ()
14471 {
14472
14473   ;
14474   return 0;
14475 }
14476 _ACEOF
14477 if ac_fn_c_try_compile "$LINENO"; then :
14478   pgac_cv_type_locale_t='yes (in xlocale.h)'
14479 else
14480   pgac_cv_type_locale_t=no
14481 fi
14482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14483 fi
14484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14485 fi
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14487 $as_echo "$pgac_cv_type_locale_t" >&6; }
14488 if test "$pgac_cv_type_locale_t" != no; then
14489
14490 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14491
14492 fi
14493 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14494
14495 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14496
14497 fi
14498
14499 # MSVC doesn't cope well with defining restrict to __restrict, the
14500 # spelling it understands, because it conflicts with
14501 # __declspec(restrict). Therefore we define pg_restrict to the
14502 # appropriate definition, which presumably won't conflict.
14503 #
14504 # Allow platforms with buggy compilers to force restrict to not be
14505 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14506 # template.
14507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14508 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14509 if ${ac_cv_c_restrict+:} false; then :
14510   $as_echo_n "(cached) " >&6
14511 else
14512   ac_cv_c_restrict=no
14513    # The order here caters to the fact that C++ does not require restrict.
14514    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14515      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14516 /* end confdefs.h.  */
14517 typedef int * int_ptr;
14518         int foo (int_ptr $ac_kw ip) {
14519         return ip[0];
14520        }
14521 int
14522 main ()
14523 {
14524 int s[1];
14525         int * $ac_kw t = s;
14526         t[0] = 0;
14527         return foo(t)
14528   ;
14529   return 0;
14530 }
14531 _ACEOF
14532 if ac_fn_c_try_compile "$LINENO"; then :
14533   ac_cv_c_restrict=$ac_kw
14534 fi
14535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14536      test "$ac_cv_c_restrict" != no && break
14537    done
14538
14539 fi
14540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14541 $as_echo "$ac_cv_c_restrict" >&6; }
14542
14543  case $ac_cv_c_restrict in
14544    restrict) ;;
14545    no) $as_echo "#define restrict /**/" >>confdefs.h
14546  ;;
14547    *)  cat >>confdefs.h <<_ACEOF
14548 #define restrict $ac_cv_c_restrict
14549 _ACEOF
14550  ;;
14551  esac
14552
14553 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14554   pg_restrict=""
14555 else
14556   pg_restrict="$ac_cv_c_restrict"
14557 fi
14558
14559 cat >>confdefs.h <<_ACEOF
14560 #define pg_restrict $pg_restrict
14561 _ACEOF
14562
14563
14564 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14565 #include <sys/param.h>
14566 #ifdef HAVE_SYS_UCRED_H
14567 #include <sys/ucred.h>
14568 #endif
14569 "
14570 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14571
14572 cat >>confdefs.h <<_ACEOF
14573 #define HAVE_STRUCT_CMSGCRED 1
14574 _ACEOF
14575
14576
14577 fi
14578
14579
14580 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14581 #include <getopt.h>
14582 #endif
14583 "
14584 if test "x$ac_cv_type_struct_option" = xyes; then :
14585
14586 cat >>confdefs.h <<_ACEOF
14587 #define HAVE_STRUCT_OPTION 1
14588 _ACEOF
14589
14590
14591 fi
14592
14593
14594 if test "$with_zlib" = yes; then
14595   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14596   # did not).  While we could work around the lack of z_streamp, it
14597   # seems unwise to encourage people to use such old zlib versions...
14598   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14599 "
14600 if test "x$ac_cv_type_z_streamp" = xyes; then :
14601
14602 else
14603   as_fn_error $? "zlib version is too old
14604 Use --without-zlib to disable zlib support." "$LINENO" 5
14605 fi
14606
14607 fi
14608
14609 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14610 case $host_cpu in
14611   ppc*|powerpc*)
14612     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14613 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14614     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14615 /* end confdefs.h.  */
14616
14617 int
14618 main ()
14619 {
14620 int a = 0; int *p = &a; int r;
14621          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14622   ;
14623   return 0;
14624 }
14625 _ACEOF
14626 if ac_fn_c_try_compile "$LINENO"; then :
14627   pgac_cv_have_ppc_mutex_hint=yes
14628 else
14629   pgac_cv_have_ppc_mutex_hint=no
14630 fi
14631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14632     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14633 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14634     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14635
14636 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14637
14638     fi
14639   ;;
14640 esac
14641
14642 # Check largefile support.  You might think this is a system service not a
14643 # compiler characteristic, but you'd be wrong.  We must check this before
14644 # probing existence of related functions such as fseeko, since the largefile
14645 # defines can affect what is generated for that.
14646 if test "$PORTNAME" != "win32"; then
14647    # Check whether --enable-largefile was given.
14648 if test "${enable_largefile+set}" = set; then :
14649   enableval=$enable_largefile;
14650 fi
14651
14652 if test "$enable_largefile" != no; then
14653
14654   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14655 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14656 if ${ac_cv_sys_largefile_CC+:} false; then :
14657   $as_echo_n "(cached) " >&6
14658 else
14659   ac_cv_sys_largefile_CC=no
14660      if test "$GCC" != yes; then
14661        ac_save_CC=$CC
14662        while :; do
14663          # IRIX 6.2 and later do not support large files by default,
14664          # so use the C compiler's -n32 option if that helps.
14665          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14666 /* end confdefs.h.  */
14667 #include <sys/types.h>
14668  /* Check that off_t can represent 2**63 - 1 correctly.
14669     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14670     since some C++ compilers masquerading as C compilers
14671     incorrectly reject 9223372036854775807.  */
14672 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14673   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14674                        && LARGE_OFF_T % 2147483647 == 1)
14675                       ? 1 : -1];
14676 int
14677 main ()
14678 {
14679
14680   ;
14681   return 0;
14682 }
14683 _ACEOF
14684          if ac_fn_c_try_compile "$LINENO"; then :
14685   break
14686 fi
14687 rm -f core conftest.err conftest.$ac_objext
14688          CC="$CC -n32"
14689          if ac_fn_c_try_compile "$LINENO"; then :
14690   ac_cv_sys_largefile_CC=' -n32'; break
14691 fi
14692 rm -f core conftest.err conftest.$ac_objext
14693          break
14694        done
14695        CC=$ac_save_CC
14696        rm -f conftest.$ac_ext
14697     fi
14698 fi
14699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14700 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14701   if test "$ac_cv_sys_largefile_CC" != no; then
14702     CC=$CC$ac_cv_sys_largefile_CC
14703   fi
14704
14705   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14706 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14707 if ${ac_cv_sys_file_offset_bits+:} false; then :
14708   $as_echo_n "(cached) " >&6
14709 else
14710   while :; do
14711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14712 /* end confdefs.h.  */
14713 #include <sys/types.h>
14714  /* Check that off_t can represent 2**63 - 1 correctly.
14715     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14716     since some C++ compilers masquerading as C compilers
14717     incorrectly reject 9223372036854775807.  */
14718 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14719   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14720                        && LARGE_OFF_T % 2147483647 == 1)
14721                       ? 1 : -1];
14722 int
14723 main ()
14724 {
14725
14726   ;
14727   return 0;
14728 }
14729 _ACEOF
14730 if ac_fn_c_try_compile "$LINENO"; then :
14731   ac_cv_sys_file_offset_bits=no; break
14732 fi
14733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14734   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14735 /* end confdefs.h.  */
14736 #define _FILE_OFFSET_BITS 64
14737 #include <sys/types.h>
14738  /* Check that off_t can represent 2**63 - 1 correctly.
14739     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14740     since some C++ compilers masquerading as C compilers
14741     incorrectly reject 9223372036854775807.  */
14742 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14743   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14744                        && LARGE_OFF_T % 2147483647 == 1)
14745                       ? 1 : -1];
14746 int
14747 main ()
14748 {
14749
14750   ;
14751   return 0;
14752 }
14753 _ACEOF
14754 if ac_fn_c_try_compile "$LINENO"; then :
14755   ac_cv_sys_file_offset_bits=64; break
14756 fi
14757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14758   ac_cv_sys_file_offset_bits=unknown
14759   break
14760 done
14761 fi
14762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14763 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14764 case $ac_cv_sys_file_offset_bits in #(
14765   no | unknown) ;;
14766   *)
14767 cat >>confdefs.h <<_ACEOF
14768 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14769 _ACEOF
14770 ;;
14771 esac
14772 rm -rf conftest*
14773   if test $ac_cv_sys_file_offset_bits = unknown; then
14774     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14775 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14776 if ${ac_cv_sys_large_files+:} false; then :
14777   $as_echo_n "(cached) " >&6
14778 else
14779   while :; do
14780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14781 /* end confdefs.h.  */
14782 #include <sys/types.h>
14783  /* Check that off_t can represent 2**63 - 1 correctly.
14784     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14785     since some C++ compilers masquerading as C compilers
14786     incorrectly reject 9223372036854775807.  */
14787 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14788   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14789                        && LARGE_OFF_T % 2147483647 == 1)
14790                       ? 1 : -1];
14791 int
14792 main ()
14793 {
14794
14795   ;
14796   return 0;
14797 }
14798 _ACEOF
14799 if ac_fn_c_try_compile "$LINENO"; then :
14800   ac_cv_sys_large_files=no; break
14801 fi
14802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14803   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14804 /* end confdefs.h.  */
14805 #define _LARGE_FILES 1
14806 #include <sys/types.h>
14807  /* Check that off_t can represent 2**63 - 1 correctly.
14808     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14809     since some C++ compilers masquerading as C compilers
14810     incorrectly reject 9223372036854775807.  */
14811 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14812   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14813                        && LARGE_OFF_T % 2147483647 == 1)
14814                       ? 1 : -1];
14815 int
14816 main ()
14817 {
14818
14819   ;
14820   return 0;
14821 }
14822 _ACEOF
14823 if ac_fn_c_try_compile "$LINENO"; then :
14824   ac_cv_sys_large_files=1; break
14825 fi
14826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14827   ac_cv_sys_large_files=unknown
14828   break
14829 done
14830 fi
14831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14832 $as_echo "$ac_cv_sys_large_files" >&6; }
14833 case $ac_cv_sys_large_files in #(
14834   no | unknown) ;;
14835   *)
14836 cat >>confdefs.h <<_ACEOF
14837 #define _LARGE_FILES $ac_cv_sys_large_files
14838 _ACEOF
14839 ;;
14840 esac
14841 rm -rf conftest*
14842   fi
14843
14844
14845 fi
14846
14847
14848 fi
14849
14850 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14851 # The cast to long int works around a bug in the HP C Compiler
14852 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14853 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14854 # This bug is HP SR number 8606223364.
14855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14856 $as_echo_n "checking size of off_t... " >&6; }
14857 if ${ac_cv_sizeof_off_t+:} false; then :
14858   $as_echo_n "(cached) " >&6
14859 else
14860   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14861
14862 else
14863   if test "$ac_cv_type_off_t" = yes; then
14864      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14865 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14866 as_fn_error 77 "cannot compute sizeof (off_t)
14867 See \`config.log' for more details" "$LINENO" 5; }
14868    else
14869      ac_cv_sizeof_off_t=0
14870    fi
14871 fi
14872
14873 fi
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14875 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14876
14877
14878
14879 cat >>confdefs.h <<_ACEOF
14880 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14881 _ACEOF
14882
14883
14884
14885 # If we don't have largefile support, can't handle segsize >= 2GB.
14886 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14887    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14888 fi
14889
14890 # The cast to long int works around a bug in the HP C Compiler
14891 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14892 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14893 # This bug is HP SR number 8606223364.
14894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14895 $as_echo_n "checking size of bool... " >&6; }
14896 if ${ac_cv_sizeof_bool+:} false; then :
14897   $as_echo_n "(cached) " >&6
14898 else
14899   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
14900 #include <stdbool.h>
14901 #endif
14902 "; then :
14903
14904 else
14905   if test "$ac_cv_type_bool" = yes; then
14906      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14907 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14908 as_fn_error 77 "cannot compute sizeof (bool)
14909 See \`config.log' for more details" "$LINENO" 5; }
14910    else
14911      ac_cv_sizeof_bool=0
14912    fi
14913 fi
14914
14915 fi
14916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14917 $as_echo "$ac_cv_sizeof_bool" >&6; }
14918
14919
14920
14921 cat >>confdefs.h <<_ACEOF
14922 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14923 _ACEOF
14924
14925
14926
14927
14928 ##
14929 ## Functions, global variables
14930 ##
14931
14932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14933 $as_echo_n "checking for int timezone... " >&6; }
14934 if ${pgac_cv_var_int_timezone+:} false; then :
14935   $as_echo_n "(cached) " >&6
14936 else
14937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14938 /* end confdefs.h.  */
14939 #include <time.h>
14940 int res;
14941 int
14942 main ()
14943 {
14944 #ifndef __CYGWIN__
14945 res = timezone / 60;
14946 #else
14947 res = _timezone / 60;
14948 #endif
14949   ;
14950   return 0;
14951 }
14952 _ACEOF
14953 if ac_fn_c_try_link "$LINENO"; then :
14954   pgac_cv_var_int_timezone=yes
14955 else
14956   pgac_cv_var_int_timezone=no
14957 fi
14958 rm -f core conftest.err conftest.$ac_objext \
14959     conftest$ac_exeext conftest.$ac_ext
14960 fi
14961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
14962 $as_echo "$pgac_cv_var_int_timezone" >&6; }
14963 if test x"$pgac_cv_var_int_timezone" = xyes ; then
14964
14965 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
14966
14967 fi
14968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
14969 $as_echo_n "checking types of arguments for accept()... " >&6; }
14970  if ${ac_cv_func_accept_return+:} false; then :
14971   $as_echo_n "(cached) " >&6
14972 else
14973    if ${ac_cv_func_accept_arg1+:} false; then :
14974   $as_echo_n "(cached) " >&6
14975 else
14976     if ${ac_cv_func_accept_arg2+:} false; then :
14977   $as_echo_n "(cached) " >&6
14978 else
14979      if ${ac_cv_func_accept_arg3+:} false; then :
14980   $as_echo_n "(cached) " >&6
14981 else
14982       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
14983       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
14984        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
14985         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
14986          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14987 /* end confdefs.h.  */
14988 #include <sys/types.h>
14989 #include <sys/socket.h>
14990 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
14991 _ACEOF
14992 if ac_fn_c_try_compile "$LINENO"; then :
14993   ac_not_found=no; break 4
14994 else
14995   ac_not_found=yes
14996 fi
14997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14998        done
14999       done
15000      done
15001     done
15002     if test "$ac_not_found" = yes; then
15003       as_fn_error $? "could not determine argument types" "$LINENO" 5
15004     fi
15005     if test "$ac_cv_func_accept_arg3" = "void"; then
15006       ac_cv_func_accept_arg3=int
15007     fi
15008
15009 fi
15010
15011 fi
15012
15013 fi
15014
15015 fi
15016  { $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
15017 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15018
15019 cat >>confdefs.h <<_ACEOF
15020 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15021 _ACEOF
15022
15023
15024 cat >>confdefs.h <<_ACEOF
15025 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15026 _ACEOF
15027
15028
15029 cat >>confdefs.h <<_ACEOF
15030 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15031 _ACEOF
15032
15033
15034 cat >>confdefs.h <<_ACEOF
15035 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15036 _ACEOF
15037
15038
15039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15040 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15041 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15042   $as_echo_n "(cached) " >&6
15043 else
15044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15045 /* end confdefs.h.  */
15046 #include <sys/time.h>
15047 int
15048 main ()
15049 {
15050 struct timeval *tp;
15051 struct timezone *tzp;
15052 gettimeofday(tp,tzp);
15053   ;
15054   return 0;
15055 }
15056 _ACEOF
15057 if ac_fn_c_try_compile "$LINENO"; then :
15058   pgac_cv_func_gettimeofday_1arg=no
15059 else
15060   pgac_cv_func_gettimeofday_1arg=yes
15061 fi
15062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15063 fi
15064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15065 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15066 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15067
15068 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15069
15070 fi
15071
15072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15073 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15074 if ${pgac_cv_func_wcstombs_l+:} false; then :
15075   $as_echo_n "(cached) " >&6
15076 else
15077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15078 /* end confdefs.h.  */
15079 #include <stdlib.h>
15080 #include <locale.h>
15081 int
15082 main ()
15083 {
15084 #ifndef wcstombs_l
15085 (void) wcstombs_l;
15086 #endif
15087   ;
15088   return 0;
15089 }
15090 _ACEOF
15091 if ac_fn_c_try_compile "$LINENO"; then :
15092   pgac_cv_func_wcstombs_l='yes'
15093 else
15094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15095 /* end confdefs.h.  */
15096 #include <stdlib.h>
15097 #include <locale.h>
15098 #include <xlocale.h>
15099 int
15100 main ()
15101 {
15102 #ifndef wcstombs_l
15103 (void) wcstombs_l;
15104 #endif
15105   ;
15106   return 0;
15107 }
15108 _ACEOF
15109 if ac_fn_c_try_compile "$LINENO"; then :
15110   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15111 else
15112   pgac_cv_func_wcstombs_l='no'
15113 fi
15114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15115 fi
15116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15117 fi
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15119 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15120 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15121
15122 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15123
15124 fi
15125
15126 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15127 # symbols that that library has no business exposing to the world.  Pending
15128 # acquisition of a clue by those developers, ignore libedit (including its
15129 # possible alias of libreadline) while checking for everything else.
15130 LIBS_including_readline="$LIBS"
15131 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15132
15133 for ac_func in cbrt clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul symlink sync_file_range utime utimes wcstombs_l
15134 do :
15135   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15136 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15137 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15138   cat >>confdefs.h <<_ACEOF
15139 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15140 _ACEOF
15141
15142 fi
15143 done
15144
15145
15146 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15147 if test "x$ac_cv_func_fseeko" = xyes; then :
15148   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15149
15150 else
15151   case " $LIBOBJS " in
15152   *" fseeko.$ac_objext "* ) ;;
15153   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15154  ;;
15155 esac
15156
15157 fi
15158
15159
15160 case $host_os in
15161         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15162         # Mingw uses macros to access Win32 API calls
15163         netbsd*|mingw*)
15164
15165 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15166
15167                 ac_cv_func_fseeko=yes;;
15168         *)
15169                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15170 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15171 if ${ac_cv_sys_largefile_source+:} false; then :
15172   $as_echo_n "(cached) " >&6
15173 else
15174   while :; do
15175   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15176 /* end confdefs.h.  */
15177 #include <sys/types.h> /* for off_t */
15178      #include <stdio.h>
15179 int
15180 main ()
15181 {
15182 int (*fp) (FILE *, off_t, int) = fseeko;
15183      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15184   ;
15185   return 0;
15186 }
15187 _ACEOF
15188 if ac_fn_c_try_link "$LINENO"; then :
15189   ac_cv_sys_largefile_source=no; break
15190 fi
15191 rm -f core conftest.err conftest.$ac_objext \
15192     conftest$ac_exeext conftest.$ac_ext
15193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15194 /* end confdefs.h.  */
15195 #define _LARGEFILE_SOURCE 1
15196 #include <sys/types.h> /* for off_t */
15197      #include <stdio.h>
15198 int
15199 main ()
15200 {
15201 int (*fp) (FILE *, off_t, int) = fseeko;
15202      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15203   ;
15204   return 0;
15205 }
15206 _ACEOF
15207 if ac_fn_c_try_link "$LINENO"; then :
15208   ac_cv_sys_largefile_source=1; break
15209 fi
15210 rm -f core conftest.err conftest.$ac_objext \
15211     conftest$ac_exeext conftest.$ac_ext
15212   ac_cv_sys_largefile_source=unknown
15213   break
15214 done
15215 fi
15216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15217 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15218 case $ac_cv_sys_largefile_source in #(
15219   no | unknown) ;;
15220   *)
15221 cat >>confdefs.h <<_ACEOF
15222 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15223 _ACEOF
15224 ;;
15225 esac
15226 rm -rf conftest*
15227
15228 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15229 # in glibc 2.1.3, but that breaks too many other things.
15230 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15231 if test $ac_cv_sys_largefile_source != unknown; then
15232
15233 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15234
15235 fi
15236 ;;
15237 esac
15238
15239 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15240 # by calling it, 2009-04-02
15241 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15242 if test "$PORTNAME" != "solaris"; then
15243 for ac_func in posix_fadvise
15244 do :
15245   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15246 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15247   cat >>confdefs.h <<_ACEOF
15248 #define HAVE_POSIX_FADVISE 1
15249 _ACEOF
15250
15251 fi
15252 done
15253
15254 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15255 "
15256 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15257   ac_have_decl=1
15258 else
15259   ac_have_decl=0
15260 fi
15261
15262 cat >>confdefs.h <<_ACEOF
15263 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15264 _ACEOF
15265
15266 fi
15267
15268 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15269 "
15270 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15271   ac_have_decl=1
15272 else
15273   ac_have_decl=0
15274 fi
15275
15276 cat >>confdefs.h <<_ACEOF
15277 #define HAVE_DECL_FDATASYNC $ac_have_decl
15278 _ACEOF
15279
15280 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15281 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15282   ac_have_decl=1
15283 else
15284   ac_have_decl=0
15285 fi
15286
15287 cat >>confdefs.h <<_ACEOF
15288 #define HAVE_DECL_STRLCAT $ac_have_decl
15289 _ACEOF
15290 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15291 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15292   ac_have_decl=1
15293 else
15294   ac_have_decl=0
15295 fi
15296
15297 cat >>confdefs.h <<_ACEOF
15298 #define HAVE_DECL_STRLCPY $ac_have_decl
15299 _ACEOF
15300 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15301 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15302   ac_have_decl=1
15303 else
15304   ac_have_decl=0
15305 fi
15306
15307 cat >>confdefs.h <<_ACEOF
15308 #define HAVE_DECL_STRNLEN $ac_have_decl
15309 _ACEOF
15310
15311 # This is probably only present on macOS, but may as well check always
15312 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15313 "
15314 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15315   ac_have_decl=1
15316 else
15317   ac_have_decl=0
15318 fi
15319
15320 cat >>confdefs.h <<_ACEOF
15321 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15322 _ACEOF
15323
15324
15325 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15326 "
15327 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15328   ac_have_decl=1
15329 else
15330   ac_have_decl=0
15331 fi
15332
15333 cat >>confdefs.h <<_ACEOF
15334 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15335 _ACEOF
15336 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15337 "
15338 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15339   ac_have_decl=1
15340 else
15341   ac_have_decl=0
15342 fi
15343
15344 cat >>confdefs.h <<_ACEOF
15345 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15346 _ACEOF
15347
15348
15349 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15350 #include <netinet/in.h>
15351 "
15352 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15353
15354 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15355
15356 fi
15357
15358
15359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15360 $as_echo_n "checking for PS_STRINGS... " >&6; }
15361 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15362   $as_echo_n "(cached) " >&6
15363 else
15364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15365 /* end confdefs.h.  */
15366 #include <machine/vmparam.h>
15367 #include <sys/exec.h>
15368
15369 int
15370 main ()
15371 {
15372 PS_STRINGS->ps_nargvstr = 1;
15373 PS_STRINGS->ps_argvstr = "foo";
15374   ;
15375   return 0;
15376 }
15377 _ACEOF
15378 if ac_fn_c_try_link "$LINENO"; then :
15379   pgac_cv_var_PS_STRINGS=yes
15380 else
15381   pgac_cv_var_PS_STRINGS=no
15382 fi
15383 rm -f core conftest.err conftest.$ac_objext \
15384     conftest$ac_exeext conftest.$ac_ext
15385 fi
15386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15387 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15388 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15389
15390 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15391
15392 fi
15393
15394
15395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15396 $as_echo_n "checking for isinf... " >&6; }
15397 if ${ac_cv_func_isinf+:} false; then :
15398   $as_echo_n "(cached) " >&6
15399 else
15400   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15401 /* end confdefs.h.  */
15402
15403 #include <math.h>
15404 double glob_double;
15405
15406 int
15407 main ()
15408 {
15409 return isinf(glob_double) ? 0 : 1;
15410   ;
15411   return 0;
15412 }
15413 _ACEOF
15414 if ac_fn_c_try_link "$LINENO"; then :
15415   ac_cv_func_isinf=yes
15416 else
15417   ac_cv_func_isinf=no
15418 fi
15419 rm -f core conftest.err conftest.$ac_objext \
15420     conftest$ac_exeext conftest.$ac_ext
15421 fi
15422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15423 $as_echo "$ac_cv_func_isinf" >&6; }
15424
15425 if test $ac_cv_func_isinf = yes ; then
15426
15427 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15428
15429 else
15430   case " $LIBOBJS " in
15431   *" isinf.$ac_objext "* ) ;;
15432   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15433  ;;
15434 esac
15435
15436   # Look for a way to implement a substitute for isinf()
15437   for ac_func in fpclass fp_class fp_class_d class
15438 do :
15439   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15440 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15441 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15442   cat >>confdefs.h <<_ACEOF
15443 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15444 _ACEOF
15445  break
15446 fi
15447 done
15448
15449 fi
15450
15451 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15452 if test "x$ac_cv_func_crypt" = xyes; then :
15453   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15454
15455 else
15456   case " $LIBOBJS " in
15457   *" crypt.$ac_objext "* ) ;;
15458   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15459  ;;
15460 esac
15461
15462 fi
15463
15464 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15465 if test "x$ac_cv_func_dlopen" = xyes; then :
15466   $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15467
15468 else
15469   case " $LIBOBJS " in
15470   *" dlopen.$ac_objext "* ) ;;
15471   *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15472  ;;
15473 esac
15474
15475 fi
15476
15477 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15478 if test "x$ac_cv_func_fls" = xyes; then :
15479   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15480
15481 else
15482   case " $LIBOBJS " in
15483   *" fls.$ac_objext "* ) ;;
15484   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15485  ;;
15486 esac
15487
15488 fi
15489
15490 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15491 if test "x$ac_cv_func_getopt" = xyes; then :
15492   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15493
15494 else
15495   case " $LIBOBJS " in
15496   *" getopt.$ac_objext "* ) ;;
15497   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15498  ;;
15499 esac
15500
15501 fi
15502
15503 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15504 if test "x$ac_cv_func_getrusage" = xyes; then :
15505   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15506
15507 else
15508   case " $LIBOBJS " in
15509   *" getrusage.$ac_objext "* ) ;;
15510   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15511  ;;
15512 esac
15513
15514 fi
15515
15516 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15517 if test "x$ac_cv_func_inet_aton" = xyes; then :
15518   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15519
15520 else
15521   case " $LIBOBJS " in
15522   *" inet_aton.$ac_objext "* ) ;;
15523   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15524  ;;
15525 esac
15526
15527 fi
15528
15529 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15530 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15531   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15532
15533 else
15534   case " $LIBOBJS " in
15535   *" mkdtemp.$ac_objext "* ) ;;
15536   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15537  ;;
15538 esac
15539
15540 fi
15541
15542 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
15543 if test "x$ac_cv_func_pread" = xyes; then :
15544   $as_echo "#define HAVE_PREAD 1" >>confdefs.h
15545
15546 else
15547   case " $LIBOBJS " in
15548   *" pread.$ac_objext "* ) ;;
15549   *) LIBOBJS="$LIBOBJS pread.$ac_objext"
15550  ;;
15551 esac
15552
15553 fi
15554
15555 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
15556 if test "x$ac_cv_func_pwrite" = xyes; then :
15557   $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
15558
15559 else
15560   case " $LIBOBJS " in
15561   *" pwrite.$ac_objext "* ) ;;
15562   *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
15563  ;;
15564 esac
15565
15566 fi
15567
15568 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15569 if test "x$ac_cv_func_random" = xyes; then :
15570   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15571
15572 else
15573   case " $LIBOBJS " in
15574   *" random.$ac_objext "* ) ;;
15575   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15576  ;;
15577 esac
15578
15579 fi
15580
15581 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15582 if test "x$ac_cv_func_rint" = xyes; then :
15583   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15584
15585 else
15586   case " $LIBOBJS " in
15587   *" rint.$ac_objext "* ) ;;
15588   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15589  ;;
15590 esac
15591
15592 fi
15593
15594 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15595 if test "x$ac_cv_func_srandom" = xyes; then :
15596   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15597
15598 else
15599   case " $LIBOBJS " in
15600   *" srandom.$ac_objext "* ) ;;
15601   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15602  ;;
15603 esac
15604
15605 fi
15606
15607 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15608 if test "x$ac_cv_func_strlcat" = xyes; then :
15609   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15610
15611 else
15612   case " $LIBOBJS " in
15613   *" strlcat.$ac_objext "* ) ;;
15614   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15615  ;;
15616 esac
15617
15618 fi
15619
15620 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15621 if test "x$ac_cv_func_strlcpy" = xyes; then :
15622   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15623
15624 else
15625   case " $LIBOBJS " in
15626   *" strlcpy.$ac_objext "* ) ;;
15627   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15628  ;;
15629 esac
15630
15631 fi
15632
15633 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15634 if test "x$ac_cv_func_strnlen" = xyes; then :
15635   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15636
15637 else
15638   case " $LIBOBJS " in
15639   *" strnlen.$ac_objext "* ) ;;
15640   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15641  ;;
15642 esac
15643
15644 fi
15645
15646
15647
15648 case $host_os in
15649
15650         # Windows uses a specialised env handler
15651         # and doesn't need a replacement getpeereid because it doesn't use
15652         # Unix sockets.
15653         mingw*)
15654
15655 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15656
15657
15658 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15659
15660                 ac_cv_func_unsetenv=yes
15661                 ac_cv_func_getpeereid=yes;;
15662         *)
15663                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15664 if test "x$ac_cv_func_unsetenv" = xyes; then :
15665   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15666
15667 else
15668   case " $LIBOBJS " in
15669   *" unsetenv.$ac_objext "* ) ;;
15670   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15671  ;;
15672 esac
15673
15674 fi
15675
15676 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15677 if test "x$ac_cv_func_getpeereid" = xyes; then :
15678   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15679
15680 else
15681   case " $LIBOBJS " in
15682   *" getpeereid.$ac_objext "* ) ;;
15683   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15684  ;;
15685 esac
15686
15687 fi
15688
15689
15690                 ;;
15691 esac
15692
15693 # System's version of getaddrinfo(), if any, may be used only if we found
15694 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15695 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15696 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15697    test "$PORTNAME" != "win32"; then
15698   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15699 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15700   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15701
15702 else
15703   case " $LIBOBJS " in
15704   *" getaddrinfo.$ac_objext "* ) ;;
15705   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15706  ;;
15707 esac
15708
15709 fi
15710
15711
15712 else
15713   case " $LIBOBJS " in
15714   *" getaddrinfo.$ac_objext "* ) ;;
15715   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15716  ;;
15717 esac
15718
15719 fi
15720
15721 # Similarly, use system's getopt_long() only if system provides struct option.
15722 if test x"$ac_cv_type_struct_option" = xyes ; then
15723   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15724 if test "x$ac_cv_func_getopt_long" = xyes; then :
15725   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15726
15727 else
15728   case " $LIBOBJS " in
15729   *" getopt_long.$ac_objext "* ) ;;
15730   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15731  ;;
15732 esac
15733
15734 fi
15735
15736
15737 else
15738   case " $LIBOBJS " in
15739   *" getopt_long.$ac_objext "* ) ;;
15740   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15741  ;;
15742 esac
15743
15744 fi
15745
15746 # Solaris' getopt() doesn't do what we want for long options, so always use
15747 # our version on that platform.
15748 if test "$PORTNAME" = "solaris"; then
15749   case " $LIBOBJS " in
15750   *" getopt.$ac_objext "* ) ;;
15751   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15752  ;;
15753 esac
15754
15755 fi
15756
15757 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15758 # so always use our version on Windows.
15759 if test "$PORTNAME" = "win32"; then
15760   case " $LIBOBJS " in
15761   *" getopt.$ac_objext "* ) ;;
15762   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15763  ;;
15764 esac
15765
15766   case " $LIBOBJS " in
15767   *" getopt_long.$ac_objext "* ) ;;
15768   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15769  ;;
15770 esac
15771
15772 fi
15773
15774 # Win32 (really MinGW) support
15775 if test "$PORTNAME" = "win32"; then
15776   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15777 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15778   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15779
15780 else
15781   case " $LIBOBJS " in
15782   *" gettimeofday.$ac_objext "* ) ;;
15783   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15784  ;;
15785 esac
15786
15787 fi
15788
15789
15790   case " $LIBOBJS " in
15791   *" dirmod.$ac_objext "* ) ;;
15792   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15793  ;;
15794 esac
15795
15796   case " $LIBOBJS " in
15797   *" kill.$ac_objext "* ) ;;
15798   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15799  ;;
15800 esac
15801
15802   case " $LIBOBJS " in
15803   *" open.$ac_objext "* ) ;;
15804   *) LIBOBJS="$LIBOBJS open.$ac_objext"
15805  ;;
15806 esac
15807
15808   case " $LIBOBJS " in
15809   *" system.$ac_objext "* ) ;;
15810   *) LIBOBJS="$LIBOBJS system.$ac_objext"
15811  ;;
15812 esac
15813
15814   case " $LIBOBJS " in
15815   *" win32env.$ac_objext "* ) ;;
15816   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15817  ;;
15818 esac
15819
15820   case " $LIBOBJS " in
15821   *" win32error.$ac_objext "* ) ;;
15822   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15823  ;;
15824 esac
15825
15826   case " $LIBOBJS " in
15827   *" win32security.$ac_objext "* ) ;;
15828   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15829  ;;
15830 esac
15831
15832   case " $LIBOBJS " in
15833   *" win32setlocale.$ac_objext "* ) ;;
15834   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15835  ;;
15836 esac
15837
15838
15839 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
15840
15841   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
15842 #define WIN32_LEAN_AND_MEAN
15843 #include <windows.h>
15844 #include <string.h>
15845 #include <dbghelp.h>
15846 "
15847 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
15848
15849 cat >>confdefs.h <<_ACEOF
15850 #define HAVE_MINIDUMP_TYPE 1
15851 _ACEOF
15852
15853 pgac_minidump_type=yes
15854 else
15855   pgac_minidump_type=no
15856 fi
15857
15858 fi
15859 if test x"$pgac_minidump_type" = x"yes" ; then
15860   have_win32_dbghelp=yes
15861
15862 else
15863   have_win32_dbghelp=no
15864
15865 fi
15866
15867 # Cygwin needs only a bit of that
15868 if test "$PORTNAME" = "cygwin"; then
15869   case " $LIBOBJS " in
15870   *" dirmod.$ac_objext "* ) ;;
15871   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15872  ;;
15873 esac
15874
15875 fi
15876
15877 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
15878 /* NetBSD declares sys_siglist in unistd.h.  */
15879 #ifdef HAVE_UNISTD_H
15880 # include <unistd.h>
15881 #endif
15882
15883 "
15884 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
15885   ac_have_decl=1
15886 else
15887   ac_have_decl=0
15888 fi
15889
15890 cat >>confdefs.h <<_ACEOF
15891 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
15892 _ACEOF
15893
15894
15895 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15896 if test "x$ac_cv_func_syslog" = xyes; then :
15897   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15898 if test "x$ac_cv_header_syslog_h" = xyes; then :
15899
15900 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15901
15902 fi
15903
15904
15905 fi
15906
15907
15908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15909 $as_echo_n "checking for opterr... " >&6; }
15910 if ${pgac_cv_var_int_opterr+:} false; then :
15911   $as_echo_n "(cached) " >&6
15912 else
15913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15914 /* end confdefs.h.  */
15915 #include <unistd.h>
15916 int
15917 main ()
15918 {
15919 extern int opterr; opterr = 1;
15920   ;
15921   return 0;
15922 }
15923 _ACEOF
15924 if ac_fn_c_try_link "$LINENO"; then :
15925   pgac_cv_var_int_opterr=yes
15926 else
15927   pgac_cv_var_int_opterr=no
15928 fi
15929 rm -f core conftest.err conftest.$ac_objext \
15930     conftest$ac_exeext conftest.$ac_ext
15931 fi
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15933 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15934 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15935
15936 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15937
15938 fi
15939
15940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15941 $as_echo_n "checking for optreset... " >&6; }
15942 if ${pgac_cv_var_int_optreset+:} false; then :
15943   $as_echo_n "(cached) " >&6
15944 else
15945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15946 /* end confdefs.h.  */
15947 #include <unistd.h>
15948 int
15949 main ()
15950 {
15951 extern int optreset; optreset = 1;
15952   ;
15953   return 0;
15954 }
15955 _ACEOF
15956 if ac_fn_c_try_link "$LINENO"; then :
15957   pgac_cv_var_int_optreset=yes
15958 else
15959   pgac_cv_var_int_optreset=no
15960 fi
15961 rm -f core conftest.err conftest.$ac_objext \
15962     conftest$ac_exeext conftest.$ac_ext
15963 fi
15964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
15965 $as_echo "$pgac_cv_var_int_optreset" >&6; }
15966 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15967
15968 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
15969
15970 fi
15971
15972 for ac_func in strtoll __strtoll strtoq
15973 do :
15974   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15975 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15976 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15977   cat >>confdefs.h <<_ACEOF
15978 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15979 _ACEOF
15980  break
15981 fi
15982 done
15983
15984 for ac_func in strtoull __strtoull strtouq
15985 do :
15986   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15987 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15988 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15989   cat >>confdefs.h <<_ACEOF
15990 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15991 _ACEOF
15992  break
15993 fi
15994 done
15995
15996 # strto[u]ll may exist but not be declared
15997 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
15998 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
15999   ac_have_decl=1
16000 else
16001   ac_have_decl=0
16002 fi
16003
16004 cat >>confdefs.h <<_ACEOF
16005 #define HAVE_DECL_STRTOLL $ac_have_decl
16006 _ACEOF
16007 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16008 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16009   ac_have_decl=1
16010 else
16011   ac_have_decl=0
16012 fi
16013
16014 cat >>confdefs.h <<_ACEOF
16015 #define HAVE_DECL_STRTOULL $ac_have_decl
16016 _ACEOF
16017
16018
16019 if test "$with_icu" = yes; then
16020   ac_save_CPPFLAGS=$CPPFLAGS
16021   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16022
16023   # Verify we have ICU's header files
16024   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16025 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16026
16027 else
16028   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16029 fi
16030
16031
16032
16033   CPPFLAGS=$ac_save_CPPFLAGS
16034 fi
16035
16036 # Lastly, restore full LIBS list and check for readline/libedit symbols
16037 LIBS="$LIBS_including_readline"
16038
16039 if test "$with_readline" = yes; then
16040   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16041 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16042 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16043   $as_echo_n "(cached) " >&6
16044 else
16045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16046 /* end confdefs.h.  */
16047 #include <stdio.h>
16048 #ifdef HAVE_READLINE_READLINE_H
16049 # include <readline/readline.h>
16050 #elif defined(HAVE_READLINE_H)
16051 # include <readline.h>
16052 #endif
16053
16054 int
16055 main ()
16056 {
16057 rl_completion_append_character = 'x';
16058   ;
16059   return 0;
16060 }
16061 _ACEOF
16062 if ac_fn_c_try_link "$LINENO"; then :
16063   pgac_cv_var_rl_completion_append_character=yes
16064 else
16065   pgac_cv_var_rl_completion_append_character=no
16066 fi
16067 rm -f core conftest.err conftest.$ac_objext \
16068     conftest$ac_exeext conftest.$ac_ext
16069 fi
16070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16071 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16072 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16073
16074 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16075
16076 fi
16077   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16078 do :
16079   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16080 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16081 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16082   cat >>confdefs.h <<_ACEOF
16083 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16084 _ACEOF
16085
16086 fi
16087 done
16088
16089   for ac_func in append_history history_truncate_file
16090 do :
16091   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16092 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16093 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16094   cat >>confdefs.h <<_ACEOF
16095 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16096 _ACEOF
16097
16098 fi
16099 done
16100
16101 fi
16102
16103
16104 # This test makes sure that run tests work at all.  Sometimes a shared
16105 # library is found by the linker, but the runtime linker can't find it.
16106 # This check should come after all modifications of compiler or linker
16107 # variables, and before any other run tests.
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16109 $as_echo_n "checking test program... " >&6; }
16110 if test "$cross_compiling" = yes; then :
16111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16112 $as_echo "cross-compiling" >&6; }
16113 else
16114   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16115 /* end confdefs.h.  */
16116 int main() { return 0; }
16117 _ACEOF
16118 if ac_fn_c_try_run "$LINENO"; then :
16119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16120 $as_echo "ok" >&6; }
16121 else
16122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16123 $as_echo "failed" >&6; }
16124 as_fn_error $? "
16125 Could not execute a simple test program.  This may be a problem
16126 related to locating shared libraries.  Check the file 'config.log'
16127 for the exact reason." "$LINENO" 5
16128 fi
16129 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16130   conftest.$ac_objext conftest.beam conftest.$ac_ext
16131 fi
16132
16133
16134 # --------------------
16135 # Run tests below here
16136 # --------------------
16137
16138
16139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16140 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16141 if ${pgac_cv_type_long_int_64+:} false; then :
16142   $as_echo_n "(cached) " >&6
16143 else
16144   if test "$cross_compiling" = yes; then :
16145   # If cross-compiling, check the size reported by the compiler and
16146 # trust that the arithmetic works.
16147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16148 /* end confdefs.h.  */
16149
16150 int
16151 main ()
16152 {
16153 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16154 test_array [0] = 0;
16155 return test_array [0];
16156
16157   ;
16158   return 0;
16159 }
16160 _ACEOF
16161 if ac_fn_c_try_compile "$LINENO"; then :
16162   pgac_cv_type_long_int_64=yes
16163 else
16164   pgac_cv_type_long_int_64=no
16165 fi
16166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16167 else
16168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16169 /* end confdefs.h.  */
16170 typedef long int ac_int64;
16171
16172 /*
16173  * These are globals to discourage the compiler from folding all the
16174  * arithmetic tests down to compile-time constants.
16175  */
16176 ac_int64 a = 20000001;
16177 ac_int64 b = 40000005;
16178
16179 int does_int64_work()
16180 {
16181   ac_int64 c,d;
16182
16183   if (sizeof(ac_int64) != 8)
16184     return 0;                   /* definitely not the right size */
16185
16186   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16187   c = a * b;
16188   d = (c + b) / b;
16189   if (d != a+1)
16190     return 0;
16191   return 1;
16192 }
16193
16194 int
16195 main() {
16196   return (! does_int64_work());
16197 }
16198 _ACEOF
16199 if ac_fn_c_try_run "$LINENO"; then :
16200   pgac_cv_type_long_int_64=yes
16201 else
16202   pgac_cv_type_long_int_64=no
16203 fi
16204 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16205   conftest.$ac_objext conftest.beam conftest.$ac_ext
16206 fi
16207
16208 fi
16209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16210 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16211
16212 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16213 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16214
16215 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16216
16217 fi
16218
16219
16220 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16221   pg_int64_type="long int"
16222 else
16223   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16224 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16225 if ${pgac_cv_type_long_long_int_64+:} false; then :
16226   $as_echo_n "(cached) " >&6
16227 else
16228   if test "$cross_compiling" = yes; then :
16229   # If cross-compiling, check the size reported by the compiler and
16230 # trust that the arithmetic works.
16231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16232 /* end confdefs.h.  */
16233
16234 int
16235 main ()
16236 {
16237 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16238 test_array [0] = 0;
16239 return test_array [0];
16240
16241   ;
16242   return 0;
16243 }
16244 _ACEOF
16245 if ac_fn_c_try_compile "$LINENO"; then :
16246   pgac_cv_type_long_long_int_64=yes
16247 else
16248   pgac_cv_type_long_long_int_64=no
16249 fi
16250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16251 else
16252   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16253 /* end confdefs.h.  */
16254 typedef long long int ac_int64;
16255
16256 /*
16257  * These are globals to discourage the compiler from folding all the
16258  * arithmetic tests down to compile-time constants.
16259  */
16260 ac_int64 a = 20000001;
16261 ac_int64 b = 40000005;
16262
16263 int does_int64_work()
16264 {
16265   ac_int64 c,d;
16266
16267   if (sizeof(ac_int64) != 8)
16268     return 0;                   /* definitely not the right size */
16269
16270   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16271   c = a * b;
16272   d = (c + b) / b;
16273   if (d != a+1)
16274     return 0;
16275   return 1;
16276 }
16277
16278 int
16279 main() {
16280   return (! does_int64_work());
16281 }
16282 _ACEOF
16283 if ac_fn_c_try_run "$LINENO"; then :
16284   pgac_cv_type_long_long_int_64=yes
16285 else
16286   pgac_cv_type_long_long_int_64=no
16287 fi
16288 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16289   conftest.$ac_objext conftest.beam conftest.$ac_ext
16290 fi
16291
16292 fi
16293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16294 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16295
16296 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16297 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16298
16299 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16300
16301 fi
16302
16303   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16304     pg_int64_type="long long int"
16305   else
16306     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16307   fi
16308 fi
16309
16310
16311 cat >>confdefs.h <<_ACEOF
16312 #define PG_INT64_TYPE $pg_int64_type
16313 _ACEOF
16314
16315
16316 # Select the printf length modifier that goes with that, too.
16317 if test x"$pg_int64_type" = x"long long int" ; then
16318   INT64_MODIFIER='"ll"'
16319 else
16320   INT64_MODIFIER='"l"'
16321 fi
16322
16323
16324 cat >>confdefs.h <<_ACEOF
16325 #define INT64_MODIFIER $INT64_MODIFIER
16326 _ACEOF
16327
16328
16329 # has to be down here, rather than with the other builtins, because
16330 # the test uses PG_INT64_TYPE.
16331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16332 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16333 if ${pgac_cv__builtin_op_overflow+:} false; then :
16334   $as_echo_n "(cached) " >&6
16335 else
16336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16337 /* end confdefs.h.  */
16338
16339 PG_INT64_TYPE a = 1;
16340 PG_INT64_TYPE b = 1;
16341 PG_INT64_TYPE result;
16342 int oflo;
16343
16344 int
16345 main ()
16346 {
16347 oflo = __builtin_mul_overflow(a, b, &result);
16348   ;
16349   return 0;
16350 }
16351 _ACEOF
16352 if ac_fn_c_try_link "$LINENO"; then :
16353   pgac_cv__builtin_op_overflow=yes
16354 else
16355   pgac_cv__builtin_op_overflow=no
16356 fi
16357 rm -f core conftest.err conftest.$ac_objext \
16358     conftest$ac_exeext conftest.$ac_ext
16359 fi
16360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16361 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16362 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16363
16364 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16365
16366 fi
16367
16368 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16369 # The cast to long int works around a bug in the HP C Compiler
16370 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16371 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16372 # This bug is HP SR number 8606223364.
16373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16374 $as_echo_n "checking size of void *... " >&6; }
16375 if ${ac_cv_sizeof_void_p+:} false; then :
16376   $as_echo_n "(cached) " >&6
16377 else
16378   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16379
16380 else
16381   if test "$ac_cv_type_void_p" = yes; then
16382      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16383 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16384 as_fn_error 77 "cannot compute sizeof (void *)
16385 See \`config.log' for more details" "$LINENO" 5; }
16386    else
16387      ac_cv_sizeof_void_p=0
16388    fi
16389 fi
16390
16391 fi
16392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16393 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16394
16395
16396
16397 cat >>confdefs.h <<_ACEOF
16398 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16399 _ACEOF
16400
16401
16402 # The cast to long int works around a bug in the HP C Compiler
16403 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16404 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16405 # This bug is HP SR number 8606223364.
16406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16407 $as_echo_n "checking size of size_t... " >&6; }
16408 if ${ac_cv_sizeof_size_t+:} false; then :
16409   $as_echo_n "(cached) " >&6
16410 else
16411   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16412
16413 else
16414   if test "$ac_cv_type_size_t" = yes; then
16415      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16416 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16417 as_fn_error 77 "cannot compute sizeof (size_t)
16418 See \`config.log' for more details" "$LINENO" 5; }
16419    else
16420      ac_cv_sizeof_size_t=0
16421    fi
16422 fi
16423
16424 fi
16425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16426 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16427
16428
16429
16430 cat >>confdefs.h <<_ACEOF
16431 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16432 _ACEOF
16433
16434
16435 # The cast to long int works around a bug in the HP C Compiler
16436 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16437 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16438 # This bug is HP SR number 8606223364.
16439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16440 $as_echo_n "checking size of long... " >&6; }
16441 if ${ac_cv_sizeof_long+:} false; then :
16442   $as_echo_n "(cached) " >&6
16443 else
16444   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16445
16446 else
16447   if test "$ac_cv_type_long" = yes; then
16448      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16449 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16450 as_fn_error 77 "cannot compute sizeof (long)
16451 See \`config.log' for more details" "$LINENO" 5; }
16452    else
16453      ac_cv_sizeof_long=0
16454    fi
16455 fi
16456
16457 fi
16458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16459 $as_echo "$ac_cv_sizeof_long" >&6; }
16460
16461
16462
16463 cat >>confdefs.h <<_ACEOF
16464 #define SIZEOF_LONG $ac_cv_sizeof_long
16465 _ACEOF
16466
16467
16468
16469 # Decide whether float4 is passed by value: user-selectable, enabled by default
16470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16471 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16472
16473
16474 # Check whether --enable-float4-byval was given.
16475 if test "${enable_float4_byval+set}" = set; then :
16476   enableval=$enable_float4_byval;
16477   case $enableval in
16478     yes)
16479
16480 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16481
16482                float4passbyval=true
16483       ;;
16484     no)
16485       float4passbyval=false
16486       ;;
16487     *)
16488       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16489       ;;
16490   esac
16491
16492 else
16493   enable_float4_byval=yes
16494
16495 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16496
16497                float4passbyval=true
16498 fi
16499
16500
16501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16502 $as_echo "$enable_float4_byval" >&6; }
16503
16504 cat >>confdefs.h <<_ACEOF
16505 #define FLOAT4PASSBYVAL $float4passbyval
16506 _ACEOF
16507
16508
16509 # Decide whether float8 is passed by value.
16510 # Note: this setting also controls int8 and related types such as timestamp.
16511 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16512 # If not, trying to select it is an error.
16513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16514 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16515 if test $ac_cv_sizeof_void_p -ge 8 ; then
16516
16517
16518 # Check whether --enable-float8-byval was given.
16519 if test "${enable_float8_byval+set}" = set; then :
16520   enableval=$enable_float8_byval;
16521   case $enableval in
16522     yes)
16523       :
16524       ;;
16525     no)
16526       :
16527       ;;
16528     *)
16529       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16530       ;;
16531   esac
16532
16533 else
16534   enable_float8_byval=yes
16535
16536 fi
16537
16538
16539 else
16540
16541
16542 # Check whether --enable-float8-byval was given.
16543 if test "${enable_float8_byval+set}" = set; then :
16544   enableval=$enable_float8_byval;
16545   case $enableval in
16546     yes)
16547       :
16548       ;;
16549     no)
16550       :
16551       ;;
16552     *)
16553       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16554       ;;
16555   esac
16556
16557 else
16558   enable_float8_byval=no
16559
16560 fi
16561
16562
16563   if test "$enable_float8_byval" = yes ; then
16564     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16565   fi
16566 fi
16567 if test "$enable_float8_byval" = yes ; then
16568
16569 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16570
16571   float8passbyval=true
16572 else
16573   float8passbyval=false
16574 fi
16575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16576 $as_echo "$enable_float8_byval" >&6; }
16577
16578 cat >>confdefs.h <<_ACEOF
16579 #define FLOAT8PASSBYVAL $float8passbyval
16580 _ACEOF
16581
16582
16583 # Determine memory alignment requirements for the basic C data types.
16584
16585 # The cast to long int works around a bug in the HP C Compiler,
16586 # see AC_CHECK_SIZEOF for more information.
16587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16588 $as_echo_n "checking alignment of short... " >&6; }
16589 if ${ac_cv_alignof_short+:} false; then :
16590   $as_echo_n "(cached) " >&6
16591 else
16592   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16593 #ifndef offsetof
16594 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16595 #endif
16596 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16597
16598 else
16599   if test "$ac_cv_type_short" = yes; then
16600      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16601 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16602 as_fn_error 77 "cannot compute alignment of short
16603 See \`config.log' for more details" "$LINENO" 5; }
16604    else
16605      ac_cv_alignof_short=0
16606    fi
16607 fi
16608
16609 fi
16610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16611 $as_echo "$ac_cv_alignof_short" >&6; }
16612
16613
16614
16615 cat >>confdefs.h <<_ACEOF
16616 #define ALIGNOF_SHORT $ac_cv_alignof_short
16617 _ACEOF
16618
16619
16620 # The cast to long int works around a bug in the HP C Compiler,
16621 # see AC_CHECK_SIZEOF for more information.
16622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16623 $as_echo_n "checking alignment of int... " >&6; }
16624 if ${ac_cv_alignof_int+:} false; then :
16625   $as_echo_n "(cached) " >&6
16626 else
16627   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16628 #ifndef offsetof
16629 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16630 #endif
16631 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16632
16633 else
16634   if test "$ac_cv_type_int" = yes; then
16635      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16636 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16637 as_fn_error 77 "cannot compute alignment of int
16638 See \`config.log' for more details" "$LINENO" 5; }
16639    else
16640      ac_cv_alignof_int=0
16641    fi
16642 fi
16643
16644 fi
16645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16646 $as_echo "$ac_cv_alignof_int" >&6; }
16647
16648
16649
16650 cat >>confdefs.h <<_ACEOF
16651 #define ALIGNOF_INT $ac_cv_alignof_int
16652 _ACEOF
16653
16654
16655 # The cast to long int works around a bug in the HP C Compiler,
16656 # see AC_CHECK_SIZEOF for more information.
16657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16658 $as_echo_n "checking alignment of long... " >&6; }
16659 if ${ac_cv_alignof_long+:} false; then :
16660   $as_echo_n "(cached) " >&6
16661 else
16662   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16663 #ifndef offsetof
16664 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16665 #endif
16666 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16667
16668 else
16669   if test "$ac_cv_type_long" = yes; then
16670      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16671 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16672 as_fn_error 77 "cannot compute alignment of long
16673 See \`config.log' for more details" "$LINENO" 5; }
16674    else
16675      ac_cv_alignof_long=0
16676    fi
16677 fi
16678
16679 fi
16680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16681 $as_echo "$ac_cv_alignof_long" >&6; }
16682
16683
16684
16685 cat >>confdefs.h <<_ACEOF
16686 #define ALIGNOF_LONG $ac_cv_alignof_long
16687 _ACEOF
16688
16689
16690 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16691   # The cast to long int works around a bug in the HP C Compiler,
16692 # see AC_CHECK_SIZEOF for more information.
16693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16694 $as_echo_n "checking alignment of long long int... " >&6; }
16695 if ${ac_cv_alignof_long_long_int+:} false; then :
16696   $as_echo_n "(cached) " >&6
16697 else
16698   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
16699 #ifndef offsetof
16700 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16701 #endif
16702 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16703
16704 else
16705   if test "$ac_cv_type_long_long_int" = yes; then
16706      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16707 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16708 as_fn_error 77 "cannot compute alignment of long long int
16709 See \`config.log' for more details" "$LINENO" 5; }
16710    else
16711      ac_cv_alignof_long_long_int=0
16712    fi
16713 fi
16714
16715 fi
16716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16717 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16718
16719
16720
16721 cat >>confdefs.h <<_ACEOF
16722 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16723 _ACEOF
16724
16725
16726 fi
16727 # The cast to long int works around a bug in the HP C Compiler,
16728 # see AC_CHECK_SIZEOF for more information.
16729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16730 $as_echo_n "checking alignment of double... " >&6; }
16731 if ${ac_cv_alignof_double+:} false; then :
16732   $as_echo_n "(cached) " >&6
16733 else
16734   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
16735 #ifndef offsetof
16736 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16737 #endif
16738 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16739
16740 else
16741   if test "$ac_cv_type_double" = yes; then
16742      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16743 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16744 as_fn_error 77 "cannot compute alignment of double
16745 See \`config.log' for more details" "$LINENO" 5; }
16746    else
16747      ac_cv_alignof_double=0
16748    fi
16749 fi
16750
16751 fi
16752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16753 $as_echo "$ac_cv_alignof_double" >&6; }
16754
16755
16756
16757 cat >>confdefs.h <<_ACEOF
16758 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16759 _ACEOF
16760
16761
16762
16763 # Compute maximum alignment of any basic type.
16764 # We assume long's alignment is at least as strong as char, short, or int;
16765 # but we must check long long (if it is being used for int64) and double.
16766 # Note that we intentionally do not consider any types wider than 64 bits,
16767 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
16768 # for disk and memory space.
16769
16770 MAX_ALIGNOF=$ac_cv_alignof_long
16771 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
16772   MAX_ALIGNOF=$ac_cv_alignof_double
16773 fi
16774 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
16775   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
16776 fi
16777
16778 cat >>confdefs.h <<_ACEOF
16779 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16780 _ACEOF
16781
16782
16783
16784 # Some platforms predefine the types int8, int16, etc.  Only check
16785 # a (hopefully) representative subset.
16786 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16787 "
16788 if test "x$ac_cv_type_int8" = xyes; then :
16789
16790 cat >>confdefs.h <<_ACEOF
16791 #define HAVE_INT8 1
16792 _ACEOF
16793
16794
16795 fi
16796 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16797 "
16798 if test "x$ac_cv_type_uint8" = xyes; then :
16799
16800 cat >>confdefs.h <<_ACEOF
16801 #define HAVE_UINT8 1
16802 _ACEOF
16803
16804
16805 fi
16806 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
16807 "
16808 if test "x$ac_cv_type_int64" = xyes; then :
16809
16810 cat >>confdefs.h <<_ACEOF
16811 #define HAVE_INT64 1
16812 _ACEOF
16813
16814
16815 fi
16816 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
16817 "
16818 if test "x$ac_cv_type_uint64" = xyes; then :
16819
16820 cat >>confdefs.h <<_ACEOF
16821 #define HAVE_UINT64 1
16822 _ACEOF
16823
16824
16825 fi
16826
16827
16828 # Some compilers offer a 128-bit integer scalar type.
16829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16830 $as_echo_n "checking for __int128... " >&6; }
16831 if ${pgac_cv__128bit_int+:} false; then :
16832   $as_echo_n "(cached) " >&6
16833 else
16834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16835 /* end confdefs.h.  */
16836
16837 /*
16838  * We don't actually run this test, just link it to verify that any support
16839  * functions needed for __int128 are present.
16840  *
16841  * These are globals to discourage the compiler from folding all the
16842  * arithmetic tests down to compile-time constants.  We do not have
16843  * convenient support for 128bit literals at this point...
16844  */
16845 __int128 a = 48828125;
16846 __int128 b = 97656250;
16847
16848 int
16849 main ()
16850 {
16851
16852 __int128 c,d;
16853 a = (a << 12) + 1; /* 200000000001 */
16854 b = (b << 12) + 5; /* 400000000005 */
16855 /* try the most relevant arithmetic ops */
16856 c = a * b;
16857 d = (c + b) / b;
16858 /* must use the results, else compiler may optimize arithmetic away */
16859 if (d != a+1)
16860   return 1;
16861
16862   ;
16863   return 0;
16864 }
16865 _ACEOF
16866 if ac_fn_c_try_link "$LINENO"; then :
16867   pgac_cv__128bit_int=yes
16868 else
16869   pgac_cv__128bit_int=no
16870 fi
16871 rm -f core conftest.err conftest.$ac_objext \
16872     conftest$ac_exeext conftest.$ac_ext
16873 fi
16874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
16875 $as_echo "$pgac_cv__128bit_int" >&6; }
16876 if test x"$pgac_cv__128bit_int" = xyes ; then
16877   # Use of non-default alignment with __int128 tickles bugs in some compilers.
16878   # If not cross-compiling, we can test for bugs and disable use of __int128
16879   # with buggy compilers.  If cross-compiling, hope for the best.
16880   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
16881   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
16882 $as_echo_n "checking for __int128 alignment bug... " >&6; }
16883 if ${pgac_cv__128bit_int_bug+:} false; then :
16884   $as_echo_n "(cached) " >&6
16885 else
16886   if test "$cross_compiling" = yes; then :
16887   pgac_cv__128bit_int_bug="assuming ok"
16888 else
16889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16890 /* end confdefs.h.  */
16891
16892 /* This must match the corresponding code in c.h: */
16893 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
16894 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
16895 #endif
16896 typedef __int128 int128a
16897 #if defined(pg_attribute_aligned)
16898 pg_attribute_aligned(8)
16899 #endif
16900 ;
16901 int128a holder;
16902 void pass_by_val(void *buffer, int128a par) { holder = par; }
16903
16904 int
16905 main ()
16906 {
16907
16908 long int i64 = 97656225L << 12;
16909 int128a q;
16910 pass_by_val(main, (int128a) i64);
16911 q = (int128a) i64;
16912 if (q != holder)
16913   return 1;
16914
16915   ;
16916   return 0;
16917 }
16918 _ACEOF
16919 if ac_fn_c_try_run "$LINENO"; then :
16920   pgac_cv__128bit_int_bug=ok
16921 else
16922   pgac_cv__128bit_int_bug=broken
16923 fi
16924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16925   conftest.$ac_objext conftest.beam conftest.$ac_ext
16926 fi
16927
16928 fi
16929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
16930 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
16931   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
16932
16933 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
16934
16935     # The cast to long int works around a bug in the HP C Compiler,
16936 # see AC_CHECK_SIZEOF for more information.
16937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
16938 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
16939 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
16940   $as_echo_n "(cached) " >&6
16941 else
16942   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
16943 #ifndef offsetof
16944 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16945 #endif
16946 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
16947
16948 else
16949   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
16950      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16951 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16952 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
16953 See \`config.log' for more details" "$LINENO" 5; }
16954    else
16955      ac_cv_alignof_PG_INT128_TYPE=0
16956    fi
16957 fi
16958
16959 fi
16960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
16961 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
16962
16963
16964
16965 cat >>confdefs.h <<_ACEOF
16966 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
16967 _ACEOF
16968
16969
16970   fi
16971 fi
16972
16973 # Check for various atomic operations now that we have checked how to declare
16974 # 64bit integers.
16975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
16976 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
16977 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
16978   $as_echo_n "(cached) " >&6
16979 else
16980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16981 /* end confdefs.h.  */
16982
16983 int
16984 main ()
16985 {
16986 char lock = 0;
16987    __sync_lock_test_and_set(&lock, 1);
16988    __sync_lock_release(&lock);
16989   ;
16990   return 0;
16991 }
16992 _ACEOF
16993 if ac_fn_c_try_link "$LINENO"; then :
16994   pgac_cv_gcc_sync_char_tas="yes"
16995 else
16996   pgac_cv_gcc_sync_char_tas="no"
16997 fi
16998 rm -f core conftest.err conftest.$ac_objext \
16999     conftest$ac_exeext conftest.$ac_ext
17000 fi
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17002 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17003 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17004
17005 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17006
17007 fi
17008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17009 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17010 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17011   $as_echo_n "(cached) " >&6
17012 else
17013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17014 /* end confdefs.h.  */
17015
17016 int
17017 main ()
17018 {
17019 int lock = 0;
17020    __sync_lock_test_and_set(&lock, 1);
17021    __sync_lock_release(&lock);
17022   ;
17023   return 0;
17024 }
17025 _ACEOF
17026 if ac_fn_c_try_link "$LINENO"; then :
17027   pgac_cv_gcc_sync_int32_tas="yes"
17028 else
17029   pgac_cv_gcc_sync_int32_tas="no"
17030 fi
17031 rm -f core conftest.err conftest.$ac_objext \
17032     conftest$ac_exeext conftest.$ac_ext
17033 fi
17034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17035 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17036 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17037
17038 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17039
17040 fi
17041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17042 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17043 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17044   $as_echo_n "(cached) " >&6
17045 else
17046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17047 /* end confdefs.h.  */
17048
17049 int
17050 main ()
17051 {
17052 int val = 0;
17053    __sync_val_compare_and_swap(&val, 0, 37);
17054   ;
17055   return 0;
17056 }
17057 _ACEOF
17058 if ac_fn_c_try_link "$LINENO"; then :
17059   pgac_cv_gcc_sync_int32_cas="yes"
17060 else
17061   pgac_cv_gcc_sync_int32_cas="no"
17062 fi
17063 rm -f core conftest.err conftest.$ac_objext \
17064     conftest$ac_exeext conftest.$ac_ext
17065 fi
17066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17067 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17068 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17069
17070 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17071
17072 fi
17073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17074 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17075 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17076   $as_echo_n "(cached) " >&6
17077 else
17078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17079 /* end confdefs.h.  */
17080
17081 int
17082 main ()
17083 {
17084 PG_INT64_TYPE lock = 0;
17085    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17086   ;
17087   return 0;
17088 }
17089 _ACEOF
17090 if ac_fn_c_try_link "$LINENO"; then :
17091   pgac_cv_gcc_sync_int64_cas="yes"
17092 else
17093   pgac_cv_gcc_sync_int64_cas="no"
17094 fi
17095 rm -f core conftest.err conftest.$ac_objext \
17096     conftest$ac_exeext conftest.$ac_ext
17097 fi
17098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17099 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17100 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17101
17102 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17103
17104 fi
17105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17106 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17107 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17108   $as_echo_n "(cached) " >&6
17109 else
17110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17111 /* end confdefs.h.  */
17112
17113 int
17114 main ()
17115 {
17116 int val = 0;
17117    int expect = 0;
17118    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17119   ;
17120   return 0;
17121 }
17122 _ACEOF
17123 if ac_fn_c_try_link "$LINENO"; then :
17124   pgac_cv_gcc_atomic_int32_cas="yes"
17125 else
17126   pgac_cv_gcc_atomic_int32_cas="no"
17127 fi
17128 rm -f core conftest.err conftest.$ac_objext \
17129     conftest$ac_exeext conftest.$ac_ext
17130 fi
17131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17132 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17133 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17134
17135 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17136
17137 fi
17138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17139 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17140 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17141   $as_echo_n "(cached) " >&6
17142 else
17143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17144 /* end confdefs.h.  */
17145
17146 int
17147 main ()
17148 {
17149 PG_INT64_TYPE val = 0;
17150    PG_INT64_TYPE expect = 0;
17151    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17152   ;
17153   return 0;
17154 }
17155 _ACEOF
17156 if ac_fn_c_try_link "$LINENO"; then :
17157   pgac_cv_gcc_atomic_int64_cas="yes"
17158 else
17159   pgac_cv_gcc_atomic_int64_cas="no"
17160 fi
17161 rm -f core conftest.err conftest.$ac_objext \
17162     conftest$ac_exeext conftest.$ac_ext
17163 fi
17164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17165 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17166 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17167
17168 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17169
17170 fi
17171
17172
17173 # Check for x86 cpuid instruction
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17175 $as_echo_n "checking for __get_cpuid... " >&6; }
17176 if ${pgac_cv__get_cpuid+:} false; then :
17177   $as_echo_n "(cached) " >&6
17178 else
17179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17180 /* end confdefs.h.  */
17181 #include <cpuid.h>
17182 int
17183 main ()
17184 {
17185 unsigned int exx[4] = {0, 0, 0, 0};
17186   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17187
17188   ;
17189   return 0;
17190 }
17191 _ACEOF
17192 if ac_fn_c_try_link "$LINENO"; then :
17193   pgac_cv__get_cpuid="yes"
17194 else
17195   pgac_cv__get_cpuid="no"
17196 fi
17197 rm -f core conftest.err conftest.$ac_objext \
17198     conftest$ac_exeext conftest.$ac_ext
17199 fi
17200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17201 $as_echo "$pgac_cv__get_cpuid" >&6; }
17202 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17203
17204 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17205
17206 fi
17207
17208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17209 $as_echo_n "checking for __cpuid... " >&6; }
17210 if ${pgac_cv__cpuid+:} false; then :
17211   $as_echo_n "(cached) " >&6
17212 else
17213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17214 /* end confdefs.h.  */
17215 #include <intrin.h>
17216 int
17217 main ()
17218 {
17219 unsigned int exx[4] = {0, 0, 0, 0};
17220   __get_cpuid(exx[0], 1);
17221
17222   ;
17223   return 0;
17224 }
17225 _ACEOF
17226 if ac_fn_c_try_link "$LINENO"; then :
17227   pgac_cv__cpuid="yes"
17228 else
17229   pgac_cv__cpuid="no"
17230 fi
17231 rm -f core conftest.err conftest.$ac_objext \
17232     conftest$ac_exeext conftest.$ac_ext
17233 fi
17234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17235 $as_echo "$pgac_cv__cpuid" >&6; }
17236 if test x"$pgac_cv__cpuid" = x"yes"; then
17237
17238 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17239
17240 fi
17241
17242 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17243 #
17244 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17245 # with the default compiler flags. If not, check if adding the -msse4.2
17246 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17248 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17249 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17250   $as_echo_n "(cached) " >&6
17251 else
17252   pgac_save_CFLAGS=$CFLAGS
17253 CFLAGS="$pgac_save_CFLAGS "
17254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17255 /* end confdefs.h.  */
17256 #include <nmmintrin.h>
17257 int
17258 main ()
17259 {
17260 unsigned int crc = 0;
17261    crc = _mm_crc32_u8(crc, 0);
17262    crc = _mm_crc32_u32(crc, 0);
17263    /* return computed value, to prevent the above being optimized away */
17264    return crc == 0;
17265   ;
17266   return 0;
17267 }
17268 _ACEOF
17269 if ac_fn_c_try_link "$LINENO"; then :
17270   pgac_cv_sse42_crc32_intrinsics_=yes
17271 else
17272   pgac_cv_sse42_crc32_intrinsics_=no
17273 fi
17274 rm -f core conftest.err conftest.$ac_objext \
17275     conftest$ac_exeext conftest.$ac_ext
17276 CFLAGS="$pgac_save_CFLAGS"
17277 fi
17278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17279 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17280 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17281   CFLAGS_SSE42=""
17282   pgac_sse42_crc32_intrinsics=yes
17283 fi
17284
17285 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17286   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17287 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17288 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17289   $as_echo_n "(cached) " >&6
17290 else
17291   pgac_save_CFLAGS=$CFLAGS
17292 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17294 /* end confdefs.h.  */
17295 #include <nmmintrin.h>
17296 int
17297 main ()
17298 {
17299 unsigned int crc = 0;
17300    crc = _mm_crc32_u8(crc, 0);
17301    crc = _mm_crc32_u32(crc, 0);
17302    /* return computed value, to prevent the above being optimized away */
17303    return crc == 0;
17304   ;
17305   return 0;
17306 }
17307 _ACEOF
17308 if ac_fn_c_try_link "$LINENO"; then :
17309   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17310 else
17311   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17312 fi
17313 rm -f core conftest.err conftest.$ac_objext \
17314     conftest$ac_exeext conftest.$ac_ext
17315 CFLAGS="$pgac_save_CFLAGS"
17316 fi
17317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17318 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17319 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17320   CFLAGS_SSE42="-msse4.2"
17321   pgac_sse42_crc32_intrinsics=yes
17322 fi
17323
17324 fi
17325
17326
17327 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17328 # define __SSE4_2__ in that case.
17329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17330 /* end confdefs.h.  */
17331
17332 int
17333 main ()
17334 {
17335
17336 #ifndef __SSE4_2__
17337 #error __SSE4_2__ not defined
17338 #endif
17339
17340   ;
17341   return 0;
17342 }
17343 _ACEOF
17344 if ac_fn_c_try_compile "$LINENO"; then :
17345   SSE4_2_TARGETED=1
17346 fi
17347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17348
17349 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17350 #
17351 # First check if __crc32c* intrinsics can be used with the default compiler
17352 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17353 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17355 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17356 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17357   $as_echo_n "(cached) " >&6
17358 else
17359   pgac_save_CFLAGS=$CFLAGS
17360 CFLAGS="$pgac_save_CFLAGS "
17361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17362 /* end confdefs.h.  */
17363 #include <arm_acle.h>
17364 int
17365 main ()
17366 {
17367 unsigned int crc = 0;
17368    crc = __crc32cb(crc, 0);
17369    crc = __crc32ch(crc, 0);
17370    crc = __crc32cw(crc, 0);
17371    crc = __crc32cd(crc, 0);
17372    /* return computed value, to prevent the above being optimized away */
17373    return crc == 0;
17374   ;
17375   return 0;
17376 }
17377 _ACEOF
17378 if ac_fn_c_try_link "$LINENO"; then :
17379   pgac_cv_armv8_crc32c_intrinsics_=yes
17380 else
17381   pgac_cv_armv8_crc32c_intrinsics_=no
17382 fi
17383 rm -f core conftest.err conftest.$ac_objext \
17384     conftest$ac_exeext conftest.$ac_ext
17385 CFLAGS="$pgac_save_CFLAGS"
17386 fi
17387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17388 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17389 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17390   CFLAGS_ARMV8_CRC32C=""
17391   pgac_armv8_crc32c_intrinsics=yes
17392 fi
17393
17394 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17395   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17396 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17397 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17398   $as_echo_n "(cached) " >&6
17399 else
17400   pgac_save_CFLAGS=$CFLAGS
17401 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17403 /* end confdefs.h.  */
17404 #include <arm_acle.h>
17405 int
17406 main ()
17407 {
17408 unsigned int crc = 0;
17409    crc = __crc32cb(crc, 0);
17410    crc = __crc32ch(crc, 0);
17411    crc = __crc32cw(crc, 0);
17412    crc = __crc32cd(crc, 0);
17413    /* return computed value, to prevent the above being optimized away */
17414    return crc == 0;
17415   ;
17416   return 0;
17417 }
17418 _ACEOF
17419 if ac_fn_c_try_link "$LINENO"; then :
17420   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17421 else
17422   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17423 fi
17424 rm -f core conftest.err conftest.$ac_objext \
17425     conftest$ac_exeext conftest.$ac_ext
17426 CFLAGS="$pgac_save_CFLAGS"
17427 fi
17428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17429 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17430 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17431   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17432   pgac_armv8_crc32c_intrinsics=yes
17433 fi
17434
17435 fi
17436
17437
17438 # Select CRC-32C implementation.
17439 #
17440 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17441 # use the special CRC instructions for calculating CRC-32C. If we're not
17442 # targeting such a processor, but we can nevertheless produce code that uses
17443 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17444 # implementations and select which one to use at runtime, depending on whether
17445 # SSE 4.2 is supported by the processor we're running on.
17446 #
17447 # Similarly, if we are targeting an ARM processor that has the CRC
17448 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17449 # we're not targeting such a processor, but can nevertheless produce code that
17450 # uses the CRC instructions, compile both, and select at runtime.
17451 #
17452 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17453 # in the template or configure command line.
17454 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
17455   # Use Intel SSE 4.2 if available.
17456   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17457     USE_SSE42_CRC32C=1
17458   else
17459     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17460     # the runtime check.
17461     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
17462       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17463     else
17464       # Use ARM CRC Extension if available.
17465       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17466         USE_ARMV8_CRC32C=1
17467       else
17468         # ARM CRC Extension, with runtime check?
17469         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17470           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17471         else
17472           # fall back to slicing-by-8 algorithm, which doesn't require any
17473           # special CPU support.
17474           USE_SLICING_BY_8_CRC32C=1
17475         fi
17476       fi
17477     fi
17478   fi
17479 fi
17480
17481 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17483 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17484 if test x"$USE_SSE42_CRC32C" = x"1"; then
17485
17486 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17487
17488   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17490 $as_echo "SSE 4.2" >&6; }
17491 else
17492   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17493
17494 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17495
17496     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17497     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17498 $as_echo "SSE 4.2 with runtime check" >&6; }
17499   else
17500     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17501
17502 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17503
17504       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17505       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17506 $as_echo "ARMv8 CRC instructions" >&6; }
17507     else
17508       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17509
17510 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17511
17512         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17513         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17514 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17515       else
17516
17517 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17518
17519         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17520         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17521 $as_echo "slicing-by-8" >&6; }
17522       fi
17523     fi
17524   fi
17525 fi
17526
17527
17528
17529 # Select semaphore implementation type.
17530 if test "$PORTNAME" != "win32"; then
17531   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17532     # Need sem_open for this
17533     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17534 $as_echo_n "checking for library containing sem_open... " >&6; }
17535 if ${ac_cv_search_sem_open+:} false; then :
17536   $as_echo_n "(cached) " >&6
17537 else
17538   ac_func_search_save_LIBS=$LIBS
17539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17540 /* end confdefs.h.  */
17541
17542 /* Override any GCC internal prototype to avoid an error.
17543    Use char because int might match the return type of a GCC
17544    builtin and then its argument prototype would still apply.  */
17545 #ifdef __cplusplus
17546 extern "C"
17547 #endif
17548 char sem_open ();
17549 int
17550 main ()
17551 {
17552 return sem_open ();
17553   ;
17554   return 0;
17555 }
17556 _ACEOF
17557 for ac_lib in '' rt pthread; do
17558   if test -z "$ac_lib"; then
17559     ac_res="none required"
17560   else
17561     ac_res=-l$ac_lib
17562     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17563   fi
17564   if ac_fn_c_try_link "$LINENO"; then :
17565   ac_cv_search_sem_open=$ac_res
17566 fi
17567 rm -f core conftest.err conftest.$ac_objext \
17568     conftest$ac_exeext
17569   if ${ac_cv_search_sem_open+:} false; then :
17570   break
17571 fi
17572 done
17573 if ${ac_cv_search_sem_open+:} false; then :
17574
17575 else
17576   ac_cv_search_sem_open=no
17577 fi
17578 rm conftest.$ac_ext
17579 LIBS=$ac_func_search_save_LIBS
17580 fi
17581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17582 $as_echo "$ac_cv_search_sem_open" >&6; }
17583 ac_res=$ac_cv_search_sem_open
17584 if test "$ac_res" != no; then :
17585   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17586   USE_NAMED_POSIX_SEMAPHORES=1
17587 fi
17588
17589   fi
17590   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17591     # Need sem_init for this
17592     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17593 $as_echo_n "checking for library containing sem_init... " >&6; }
17594 if ${ac_cv_search_sem_init+:} false; then :
17595   $as_echo_n "(cached) " >&6
17596 else
17597   ac_func_search_save_LIBS=$LIBS
17598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17599 /* end confdefs.h.  */
17600
17601 /* Override any GCC internal prototype to avoid an error.
17602    Use char because int might match the return type of a GCC
17603    builtin and then its argument prototype would still apply.  */
17604 #ifdef __cplusplus
17605 extern "C"
17606 #endif
17607 char sem_init ();
17608 int
17609 main ()
17610 {
17611 return sem_init ();
17612   ;
17613   return 0;
17614 }
17615 _ACEOF
17616 for ac_lib in '' rt pthread; do
17617   if test -z "$ac_lib"; then
17618     ac_res="none required"
17619   else
17620     ac_res=-l$ac_lib
17621     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17622   fi
17623   if ac_fn_c_try_link "$LINENO"; then :
17624   ac_cv_search_sem_init=$ac_res
17625 fi
17626 rm -f core conftest.err conftest.$ac_objext \
17627     conftest$ac_exeext
17628   if ${ac_cv_search_sem_init+:} false; then :
17629   break
17630 fi
17631 done
17632 if ${ac_cv_search_sem_init+:} false; then :
17633
17634 else
17635   ac_cv_search_sem_init=no
17636 fi
17637 rm conftest.$ac_ext
17638 LIBS=$ac_func_search_save_LIBS
17639 fi
17640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17641 $as_echo "$ac_cv_search_sem_init" >&6; }
17642 ac_res=$ac_cv_search_sem_init
17643 if test "$ac_res" != no; then :
17644   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17645   USE_UNNAMED_POSIX_SEMAPHORES=1
17646 fi
17647
17648   fi
17649   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17650 $as_echo_n "checking which semaphore API to use... " >&6; }
17651   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17652
17653 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17654
17655     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17656     sematype="named POSIX"
17657   else
17658     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17659
17660 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17661
17662       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17663       sematype="unnamed POSIX"
17664     else
17665
17666 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17667
17668       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17669       sematype="System V"
17670     fi
17671   fi
17672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17673 $as_echo "$sematype" >&6; }
17674 else
17675
17676 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17677
17678   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17679 fi
17680
17681
17682 # Select shared-memory implementation type.
17683 if test "$PORTNAME" != "win32"; then
17684
17685 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17686
17687   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17688 else
17689
17690 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17691
17692   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17693 fi
17694
17695 # Select random number source
17696 #
17697 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17698 # in the template or configure command line.
17699
17700 # If not selected manually, try to select a source automatically.
17701 if test "$enable_strong_random" = "yes" && test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
17702   if test x"$with_openssl" = x"yes" ; then
17703     USE_OPENSSL_RANDOM=1
17704   elif test "$PORTNAME" = "win32" ; then
17705     USE_WIN32_RANDOM=1
17706   else
17707     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17708 $as_echo_n "checking for /dev/urandom... " >&6; }
17709 if ${ac_cv_file__dev_urandom+:} false; then :
17710   $as_echo_n "(cached) " >&6
17711 else
17712   test "$cross_compiling" = yes &&
17713   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17714 if test -r "/dev/urandom"; then
17715   ac_cv_file__dev_urandom=yes
17716 else
17717   ac_cv_file__dev_urandom=no
17718 fi
17719 fi
17720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17721 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17722 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17723
17724 fi
17725
17726
17727     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17728       USE_DEV_URANDOM=1
17729     fi
17730   fi
17731 fi
17732
17733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17734 $as_echo_n "checking which random number source to use... " >&6; }
17735 if test "$enable_strong_random" = yes ; then
17736   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17737
17738 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17739
17740     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17741 $as_echo "OpenSSL" >&6; }
17742   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
17743
17744 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
17745
17746     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17747 $as_echo "Windows native" >&6; }
17748   elif test x"$USE_DEV_URANDOM" = x"1" ; then
17749
17750 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
17751
17752     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17753 $as_echo "/dev/urandom" >&6; }
17754   else
17755     as_fn_error $? "
17756 no source of strong random numbers was found
17757 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
17758 for authentication protocols. You can use --disable-strong-random to use a
17759 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
17760   fi
17761
17762 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
17763
17764 else
17765     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
17766 $as_echo "weak builtin PRNG" >&6; }
17767     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17768 *** Not using a strong random number source may be insecure." >&5
17769 $as_echo "$as_me: WARNING:
17770 *** Not using a strong random number source may be insecure." >&2;}
17771 fi
17772
17773 # If not set in template file, set bytes to use libc memset()
17774 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17775   MEMSET_LOOP_LIMIT=1024
17776 fi
17777
17778 cat >>confdefs.h <<_ACEOF
17779 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17780 _ACEOF
17781
17782
17783
17784 if test "$enable_nls" = yes ; then
17785
17786   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17787 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17788 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17789   $as_echo_n "(cached) " >&6
17790 else
17791   ac_func_search_save_LIBS=$LIBS
17792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17793 /* end confdefs.h.  */
17794
17795 /* Override any GCC internal prototype to avoid an error.
17796    Use char because int might match the return type of a GCC
17797    builtin and then its argument prototype would still apply.  */
17798 #ifdef __cplusplus
17799 extern "C"
17800 #endif
17801 char bind_textdomain_codeset ();
17802 int
17803 main ()
17804 {
17805 return bind_textdomain_codeset ();
17806   ;
17807   return 0;
17808 }
17809 _ACEOF
17810 for ac_lib in '' intl; do
17811   if test -z "$ac_lib"; then
17812     ac_res="none required"
17813   else
17814     ac_res=-l$ac_lib
17815     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17816   fi
17817   if ac_fn_c_try_link "$LINENO"; then :
17818   ac_cv_search_bind_textdomain_codeset=$ac_res
17819 fi
17820 rm -f core conftest.err conftest.$ac_objext \
17821     conftest$ac_exeext
17822   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17823   break
17824 fi
17825 done
17826 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17827
17828 else
17829   ac_cv_search_bind_textdomain_codeset=no
17830 fi
17831 rm conftest.$ac_ext
17832 LIBS=$ac_func_search_save_LIBS
17833 fi
17834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
17835 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
17836 ac_res=$ac_cv_search_bind_textdomain_codeset
17837 if test "$ac_res" != no; then :
17838   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17839
17840 else
17841   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
17842 fi
17843
17844   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
17845 if test "x$ac_cv_header_libintl_h" = xyes; then :
17846
17847 else
17848   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
17849 fi
17850
17851
17852   if test -z "$MSGFMT"; then
17853   for ac_prog in msgfmt
17854 do
17855   # Extract the first word of "$ac_prog", so it can be a program name with args.
17856 set dummy $ac_prog; ac_word=$2
17857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17858 $as_echo_n "checking for $ac_word... " >&6; }
17859 if ${ac_cv_path_MSGFMT+:} false; then :
17860   $as_echo_n "(cached) " >&6
17861 else
17862   case $MSGFMT in
17863   [\\/]* | ?:[\\/]*)
17864   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
17865   ;;
17866   *)
17867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17868 for as_dir in $PATH
17869 do
17870   IFS=$as_save_IFS
17871   test -z "$as_dir" && as_dir=.
17872     for ac_exec_ext in '' $ac_executable_extensions; do
17873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17874     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
17875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17876     break 2
17877   fi
17878 done
17879   done
17880 IFS=$as_save_IFS
17881
17882   ;;
17883 esac
17884 fi
17885 MSGFMT=$ac_cv_path_MSGFMT
17886 if test -n "$MSGFMT"; then
17887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17888 $as_echo "$MSGFMT" >&6; }
17889 else
17890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17891 $as_echo "no" >&6; }
17892 fi
17893
17894
17895   test -n "$MSGFMT" && break
17896 done
17897
17898 else
17899   # Report the value of MSGFMT in configure's output in all cases.
17900   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
17901 $as_echo_n "checking for MSGFMT... " >&6; }
17902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17903 $as_echo "$MSGFMT" >&6; }
17904 fi
17905
17906   if test -z "$MSGFMT"; then
17907     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
17908   fi
17909   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
17910 $as_echo_n "checking for msgfmt flags... " >&6; }
17911 if ${pgac_cv_msgfmt_flags+:} false; then :
17912   $as_echo_n "(cached) " >&6
17913 else
17914   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
17915     pgac_cv_msgfmt_flags=-c
17916 fi
17917 fi
17918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
17919 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
17920   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
17921
17922   if test -z "$MSGMERGE"; then
17923   for ac_prog in msgmerge
17924 do
17925   # Extract the first word of "$ac_prog", so it can be a program name with args.
17926 set dummy $ac_prog; ac_word=$2
17927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17928 $as_echo_n "checking for $ac_word... " >&6; }
17929 if ${ac_cv_path_MSGMERGE+:} false; then :
17930   $as_echo_n "(cached) " >&6
17931 else
17932   case $MSGMERGE in
17933   [\\/]* | ?:[\\/]*)
17934   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
17935   ;;
17936   *)
17937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17938 for as_dir in $PATH
17939 do
17940   IFS=$as_save_IFS
17941   test -z "$as_dir" && as_dir=.
17942     for ac_exec_ext in '' $ac_executable_extensions; do
17943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17944     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
17945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17946     break 2
17947   fi
17948 done
17949   done
17950 IFS=$as_save_IFS
17951
17952   ;;
17953 esac
17954 fi
17955 MSGMERGE=$ac_cv_path_MSGMERGE
17956 if test -n "$MSGMERGE"; then
17957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17958 $as_echo "$MSGMERGE" >&6; }
17959 else
17960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17961 $as_echo "no" >&6; }
17962 fi
17963
17964
17965   test -n "$MSGMERGE" && break
17966 done
17967
17968 else
17969   # Report the value of MSGMERGE in configure's output in all cases.
17970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
17971 $as_echo_n "checking for MSGMERGE... " >&6; }
17972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17973 $as_echo "$MSGMERGE" >&6; }
17974 fi
17975
17976   if test -z "$XGETTEXT"; then
17977   for ac_prog in xgettext
17978 do
17979   # Extract the first word of "$ac_prog", so it can be a program name with args.
17980 set dummy $ac_prog; ac_word=$2
17981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17982 $as_echo_n "checking for $ac_word... " >&6; }
17983 if ${ac_cv_path_XGETTEXT+:} false; then :
17984   $as_echo_n "(cached) " >&6
17985 else
17986   case $XGETTEXT in
17987   [\\/]* | ?:[\\/]*)
17988   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
17989   ;;
17990   *)
17991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17992 for as_dir in $PATH
17993 do
17994   IFS=$as_save_IFS
17995   test -z "$as_dir" && as_dir=.
17996     for ac_exec_ext in '' $ac_executable_extensions; do
17997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17998     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
17999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18000     break 2
18001   fi
18002 done
18003   done
18004 IFS=$as_save_IFS
18005
18006   ;;
18007 esac
18008 fi
18009 XGETTEXT=$ac_cv_path_XGETTEXT
18010 if test -n "$XGETTEXT"; then
18011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18012 $as_echo "$XGETTEXT" >&6; }
18013 else
18014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18015 $as_echo "no" >&6; }
18016 fi
18017
18018
18019   test -n "$XGETTEXT" && break
18020 done
18021
18022 else
18023   # Report the value of XGETTEXT in configure's output in all cases.
18024   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18025 $as_echo_n "checking for XGETTEXT... " >&6; }
18026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18027 $as_echo "$XGETTEXT" >&6; }
18028 fi
18029
18030
18031 fi
18032
18033 # Check for Tcl configuration script tclConfig.sh
18034 if test "$with_tcl" = yes; then
18035     if test -z "$TCLSH"; then
18036   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18037 do
18038   # Extract the first word of "$ac_prog", so it can be a program name with args.
18039 set dummy $ac_prog; ac_word=$2
18040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18041 $as_echo_n "checking for $ac_word... " >&6; }
18042 if ${ac_cv_path_TCLSH+:} false; then :
18043   $as_echo_n "(cached) " >&6
18044 else
18045   case $TCLSH in
18046   [\\/]* | ?:[\\/]*)
18047   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18048   ;;
18049   *)
18050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18051 for as_dir in $PATH
18052 do
18053   IFS=$as_save_IFS
18054   test -z "$as_dir" && as_dir=.
18055     for ac_exec_ext in '' $ac_executable_extensions; do
18056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18057     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18059     break 2
18060   fi
18061 done
18062   done
18063 IFS=$as_save_IFS
18064
18065   ;;
18066 esac
18067 fi
18068 TCLSH=$ac_cv_path_TCLSH
18069 if test -n "$TCLSH"; then
18070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18071 $as_echo "$TCLSH" >&6; }
18072 else
18073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18074 $as_echo "no" >&6; }
18075 fi
18076
18077
18078   test -n "$TCLSH" && break
18079 done
18080
18081 else
18082   # Report the value of TCLSH in configure's output in all cases.
18083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18084 $as_echo_n "checking for TCLSH... " >&6; }
18085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18086 $as_echo "$TCLSH" >&6; }
18087 fi
18088
18089 if test x"$TCLSH" = x""; then
18090   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18091 fi
18092
18093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18094 $as_echo_n "checking for tclConfig.sh... " >&6; }
18095 # Let user override test
18096 if test -z "$TCL_CONFIG_SH"; then
18097     pgac_test_dirs="$with_tclconfig"
18098
18099     set X $pgac_test_dirs; shift
18100     if test $# -eq 0; then
18101         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18102         pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18103         # On newer macOS, $auto_path frequently doesn't include the place
18104         # where tclConfig.sh actually lives.  Append that to the end, so as not
18105         # to break cases where a non-default Tcl installation is being used.
18106         if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18107             pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18108         fi
18109         set X $pgac_test_dirs; shift
18110     fi
18111
18112     for pgac_dir do
18113         if test -r "$pgac_dir/tclConfig.sh"; then
18114             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18115             break
18116         fi
18117     done
18118 fi
18119
18120 if test -z "$TCL_CONFIG_SH"; then
18121     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18122 $as_echo "no" >&6; }
18123     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18124 else
18125     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18126 $as_echo "$TCL_CONFIG_SH" >&6; }
18127 fi
18128
18129
18130
18131     . "$TCL_CONFIG_SH"
18132 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18133 eval TCL_LIBS=\"$TCL_LIBS\"
18134 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18135 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18136
18137         if test "$TCL_SHARED_BUILD" != 1; then
18138       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18139 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18140     fi
18141     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18142     ac_save_CPPFLAGS=$CPPFLAGS
18143     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18144     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18145 if test "x$ac_cv_header_tcl_h" = xyes; then :
18146
18147 else
18148   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18149 fi
18150
18151
18152     CPPFLAGS=$ac_save_CPPFLAGS
18153 fi
18154
18155 # check for <perl.h>
18156 if test "$with_perl" = yes; then
18157   ac_save_CPPFLAGS=$CPPFLAGS
18158   CPPFLAGS="$CPPFLAGS $perl_includespec"
18159   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18160 "
18161 if test "x$ac_cv_header_perl_h" = xyes; then :
18162
18163 else
18164   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18165 fi
18166
18167
18168   # While we're at it, check that we can link to libperl.
18169   # On most platforms, if perl.h is there then libperl.so will be too, but at
18170   # this writing Debian packages them separately.  There is no known reason to
18171   # waste cycles on separate probes for the Tcl or Python libraries, though.
18172   pgac_save_LIBS=$LIBS
18173   LIBS="$perl_embed_ldflags"
18174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18175 $as_echo_n "checking for libperl... " >&6; }
18176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18177 /* end confdefs.h.  */
18178
18179 #include <EXTERN.h>
18180 #include <perl.h>
18181
18182 int
18183 main ()
18184 {
18185 perl_alloc();
18186   ;
18187   return 0;
18188 }
18189 _ACEOF
18190 if ac_fn_c_try_link "$LINENO"; then :
18191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18192 $as_echo "yes" >&6; }
18193 else
18194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18195 $as_echo "no" >&6; }
18196      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18197 fi
18198 rm -f core conftest.err conftest.$ac_objext \
18199     conftest$ac_exeext conftest.$ac_ext
18200   LIBS=$pgac_save_LIBS
18201   CPPFLAGS=$ac_save_CPPFLAGS
18202 fi
18203
18204 # check for <Python.h>
18205 if test "$with_python" = yes; then
18206   ac_save_CPPFLAGS=$CPPFLAGS
18207   CPPFLAGS="$python_includespec $CPPFLAGS"
18208   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18209 if test "x$ac_cv_header_Python_h" = xyes; then :
18210
18211 else
18212   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18213 fi
18214
18215
18216   CPPFLAGS=$ac_save_CPPFLAGS
18217 fi
18218
18219 #
18220 # Check for DocBook and tools
18221 #
18222 if test -z "$XMLLINT"; then
18223   for ac_prog in xmllint
18224 do
18225   # Extract the first word of "$ac_prog", so it can be a program name with args.
18226 set dummy $ac_prog; ac_word=$2
18227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18228 $as_echo_n "checking for $ac_word... " >&6; }
18229 if ${ac_cv_path_XMLLINT+:} false; then :
18230   $as_echo_n "(cached) " >&6
18231 else
18232   case $XMLLINT in
18233   [\\/]* | ?:[\\/]*)
18234   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18235   ;;
18236   *)
18237   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18238 for as_dir in $PATH
18239 do
18240   IFS=$as_save_IFS
18241   test -z "$as_dir" && as_dir=.
18242     for ac_exec_ext in '' $ac_executable_extensions; do
18243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18244     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18246     break 2
18247   fi
18248 done
18249   done
18250 IFS=$as_save_IFS
18251
18252   ;;
18253 esac
18254 fi
18255 XMLLINT=$ac_cv_path_XMLLINT
18256 if test -n "$XMLLINT"; then
18257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18258 $as_echo "$XMLLINT" >&6; }
18259 else
18260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18261 $as_echo "no" >&6; }
18262 fi
18263
18264
18265   test -n "$XMLLINT" && break
18266 done
18267
18268 else
18269   # Report the value of XMLLINT in configure's output in all cases.
18270   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18271 $as_echo_n "checking for XMLLINT... " >&6; }
18272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18273 $as_echo "$XMLLINT" >&6; }
18274 fi
18275
18276
18277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18278 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18279 if ${pgac_cv_check_docbook+:} false; then :
18280   $as_echo_n "(cached) " >&6
18281 else
18282   cat >conftest.xml <<EOF
18283 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18284 <book>
18285  <title>test</title>
18286  <chapter>
18287   <title>random</title>
18288    <sect1>
18289     <title>testsect</title>
18290     <para>text</para>
18291   </sect1>
18292  </chapter>
18293 </book>
18294 EOF
18295
18296 pgac_cv_check_docbook=no
18297
18298 if test -n "$XMLLINT"; then
18299   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18300   if test $? -eq 0; then
18301     pgac_cv_check_docbook=yes
18302   fi
18303 fi
18304 rm -f conftest.xml
18305 fi
18306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18307 $as_echo "$pgac_cv_check_docbook" >&6; }
18308
18309 have_docbook=$pgac_cv_check_docbook
18310
18311
18312 if test -z "$DBTOEPUB"; then
18313   for ac_prog in dbtoepub
18314 do
18315   # Extract the first word of "$ac_prog", so it can be a program name with args.
18316 set dummy $ac_prog; ac_word=$2
18317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18318 $as_echo_n "checking for $ac_word... " >&6; }
18319 if ${ac_cv_path_DBTOEPUB+:} false; then :
18320   $as_echo_n "(cached) " >&6
18321 else
18322   case $DBTOEPUB in
18323   [\\/]* | ?:[\\/]*)
18324   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18325   ;;
18326   *)
18327   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18328 for as_dir in $PATH
18329 do
18330   IFS=$as_save_IFS
18331   test -z "$as_dir" && as_dir=.
18332     for ac_exec_ext in '' $ac_executable_extensions; do
18333   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18334     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18336     break 2
18337   fi
18338 done
18339   done
18340 IFS=$as_save_IFS
18341
18342   ;;
18343 esac
18344 fi
18345 DBTOEPUB=$ac_cv_path_DBTOEPUB
18346 if test -n "$DBTOEPUB"; then
18347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18348 $as_echo "$DBTOEPUB" >&6; }
18349 else
18350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18351 $as_echo "no" >&6; }
18352 fi
18353
18354
18355   test -n "$DBTOEPUB" && break
18356 done
18357
18358 else
18359   # Report the value of DBTOEPUB in configure's output in all cases.
18360   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18361 $as_echo_n "checking for DBTOEPUB... " >&6; }
18362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18363 $as_echo "$DBTOEPUB" >&6; }
18364 fi
18365
18366 if test -z "$XSLTPROC"; then
18367   for ac_prog in xsltproc
18368 do
18369   # Extract the first word of "$ac_prog", so it can be a program name with args.
18370 set dummy $ac_prog; ac_word=$2
18371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18372 $as_echo_n "checking for $ac_word... " >&6; }
18373 if ${ac_cv_path_XSLTPROC+:} false; then :
18374   $as_echo_n "(cached) " >&6
18375 else
18376   case $XSLTPROC in
18377   [\\/]* | ?:[\\/]*)
18378   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18379   ;;
18380   *)
18381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18382 for as_dir in $PATH
18383 do
18384   IFS=$as_save_IFS
18385   test -z "$as_dir" && as_dir=.
18386     for ac_exec_ext in '' $ac_executable_extensions; do
18387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18388     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18390     break 2
18391   fi
18392 done
18393   done
18394 IFS=$as_save_IFS
18395
18396   ;;
18397 esac
18398 fi
18399 XSLTPROC=$ac_cv_path_XSLTPROC
18400 if test -n "$XSLTPROC"; then
18401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18402 $as_echo "$XSLTPROC" >&6; }
18403 else
18404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18405 $as_echo "no" >&6; }
18406 fi
18407
18408
18409   test -n "$XSLTPROC" && break
18410 done
18411
18412 else
18413   # Report the value of XSLTPROC in configure's output in all cases.
18414   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18415 $as_echo_n "checking for XSLTPROC... " >&6; }
18416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18417 $as_echo "$XSLTPROC" >&6; }
18418 fi
18419
18420 if test -z "$FOP"; then
18421   for ac_prog in fop
18422 do
18423   # Extract the first word of "$ac_prog", so it can be a program name with args.
18424 set dummy $ac_prog; ac_word=$2
18425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18426 $as_echo_n "checking for $ac_word... " >&6; }
18427 if ${ac_cv_path_FOP+:} false; then :
18428   $as_echo_n "(cached) " >&6
18429 else
18430   case $FOP in
18431   [\\/]* | ?:[\\/]*)
18432   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18433   ;;
18434   *)
18435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18436 for as_dir in $PATH
18437 do
18438   IFS=$as_save_IFS
18439   test -z "$as_dir" && as_dir=.
18440     for ac_exec_ext in '' $ac_executable_extensions; do
18441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18442     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18444     break 2
18445   fi
18446 done
18447   done
18448 IFS=$as_save_IFS
18449
18450   ;;
18451 esac
18452 fi
18453 FOP=$ac_cv_path_FOP
18454 if test -n "$FOP"; then
18455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18456 $as_echo "$FOP" >&6; }
18457 else
18458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18459 $as_echo "no" >&6; }
18460 fi
18461
18462
18463   test -n "$FOP" && break
18464 done
18465
18466 else
18467   # Report the value of FOP in configure's output in all cases.
18468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18469 $as_echo_n "checking for FOP... " >&6; }
18470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18471 $as_echo "$FOP" >&6; }
18472 fi
18473
18474
18475 #
18476 # Check for test tools
18477 #
18478 if test "$enable_tap_tests" = yes; then
18479   # Check for necessary modules, unless user has specified the "prove" to use;
18480   # in that case it's her responsibility to have a working configuration.
18481   # (prove might be part of a different Perl installation than perl, eg on
18482   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18483   if test -z "$PROVE"; then
18484     # Test::More and Time::HiRes are supposed to be part of core Perl,
18485     # but some distros omit them in a minimal installation.
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496 # Make sure we have perl
18497 if test -z "$PERL"; then
18498 # Extract the first word of "perl", so it can be a program name with args.
18499 set dummy perl; ac_word=$2
18500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18501 $as_echo_n "checking for $ac_word... " >&6; }
18502 if ${ac_cv_prog_PERL+:} false; then :
18503   $as_echo_n "(cached) " >&6
18504 else
18505   if test -n "$PERL"; then
18506   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18507 else
18508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18509 for as_dir in $PATH
18510 do
18511   IFS=$as_save_IFS
18512   test -z "$as_dir" && as_dir=.
18513     for ac_exec_ext in '' $ac_executable_extensions; do
18514   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18515     ac_cv_prog_PERL="perl"
18516     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18517     break 2
18518   fi
18519 done
18520   done
18521 IFS=$as_save_IFS
18522
18523 fi
18524 fi
18525 PERL=$ac_cv_prog_PERL
18526 if test -n "$PERL"; then
18527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18528 $as_echo "$PERL" >&6; }
18529 else
18530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18531 $as_echo "no" >&6; }
18532 fi
18533
18534
18535 fi
18536
18537 if test "x$PERL" != x; then
18538   ax_perl_modules_failed=0
18539   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18540     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18541 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18542
18543     # Would be nice to log result here, but can't rely on autoconf internals
18544     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18545     if test $? -ne 0; then
18546       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18547 $as_echo "no" >&6; };
18548       ax_perl_modules_failed=1
18549    else
18550       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18551 $as_echo "ok" >&6; };
18552     fi
18553   done
18554
18555   # Run optional shell commands
18556   if test "$ax_perl_modules_failed" = 0; then
18557     :
18558
18559   else
18560     :
18561     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18562   fi
18563 else
18564   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18565 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18566 fi
18567   fi
18568   # Now make sure we know where prove is
18569   if test -z "$PROVE"; then
18570   for ac_prog in prove
18571 do
18572   # Extract the first word of "$ac_prog", so it can be a program name with args.
18573 set dummy $ac_prog; ac_word=$2
18574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18575 $as_echo_n "checking for $ac_word... " >&6; }
18576 if ${ac_cv_path_PROVE+:} false; then :
18577   $as_echo_n "(cached) " >&6
18578 else
18579   case $PROVE in
18580   [\\/]* | ?:[\\/]*)
18581   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18582   ;;
18583   *)
18584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18585 for as_dir in $PATH
18586 do
18587   IFS=$as_save_IFS
18588   test -z "$as_dir" && as_dir=.
18589     for ac_exec_ext in '' $ac_executable_extensions; do
18590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18591     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18593     break 2
18594   fi
18595 done
18596   done
18597 IFS=$as_save_IFS
18598
18599   ;;
18600 esac
18601 fi
18602 PROVE=$ac_cv_path_PROVE
18603 if test -n "$PROVE"; then
18604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18605 $as_echo "$PROVE" >&6; }
18606 else
18607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18608 $as_echo "no" >&6; }
18609 fi
18610
18611
18612   test -n "$PROVE" && break
18613 done
18614
18615 else
18616   # Report the value of PROVE in configure's output in all cases.
18617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18618 $as_echo_n "checking for PROVE... " >&6; }
18619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18620 $as_echo "$PROVE" >&6; }
18621 fi
18622
18623   if test -z "$PROVE"; then
18624     as_fn_error $? "prove not found" "$LINENO" 5
18625   fi
18626 fi
18627
18628 # Thread testing
18629
18630 # We have to run the thread test near the end so we have all our symbols
18631 # defined.  Cross compiling throws a warning.
18632 #
18633 if test "$enable_thread_safety" = yes; then
18634 if test "$PORTNAME" != "win32"
18635 then
18636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18637 $as_echo_n "checking thread safety of required library functions... " >&6; }
18638
18639 _CFLAGS="$CFLAGS"
18640 _LIBS="$LIBS"
18641 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18642 LIBS="$LIBS $PTHREAD_LIBS"
18643 if test "$cross_compiling" = yes; then :
18644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18645 $as_echo "maybe" >&6; }
18646   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18647 *** Skipping thread test program because of cross-compile build.
18648 *** Run the program in src/test/thread on the target machine.
18649 " >&5
18650 $as_echo "$as_me: WARNING:
18651 *** Skipping thread test program because of cross-compile build.
18652 *** Run the program in src/test/thread on the target machine.
18653 " >&2;}
18654 else
18655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18656 /* end confdefs.h.  */
18657 #include "$srcdir/src/test/thread/thread_test.c"
18658 _ACEOF
18659 if ac_fn_c_try_run "$LINENO"; then :
18660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18661 $as_echo "yes" >&6; }
18662 else
18663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18664 $as_echo "no" >&6; }
18665   as_fn_error $? "thread test program failed
18666 This platform is not thread-safe.  Check the file 'config.log' or compile
18667 and run src/test/thread/thread_test for the exact reason.
18668 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18669 fi
18670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18671   conftest.$ac_objext conftest.beam conftest.$ac_ext
18672 fi
18673
18674 CFLAGS="$_CFLAGS"
18675 LIBS="$_LIBS"
18676 else
18677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18678 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18679 fi
18680 fi
18681
18682 # If compiler will take -Wl,--as-needed (or various platform-specific
18683 # spellings thereof) then add that to LDFLAGS.  This is much easier than
18684 # trying to filter LIBS to the minimum for each executable.
18685 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18686 # libreadline; therefore we postpone testing it until we know what library
18687 # dependencies readline has.  The test code will try to link with $LIBS.
18688 if test "$with_readline" = yes; then
18689   link_test_func=readline
18690 else
18691   link_test_func=exit
18692 fi
18693
18694 if test "$PORTNAME" = "darwin"; then
18695   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18696 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18697 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18698   $as_echo_n "(cached) " >&6
18699 else
18700   pgac_save_LDFLAGS=$LDFLAGS
18701 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18702 if test "$cross_compiling" = yes; then :
18703   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18704 else
18705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18706 /* end confdefs.h.  */
18707 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18708 int
18709 main ()
18710 {
18711
18712   ;
18713   return 0;
18714 }
18715 _ACEOF
18716 if ac_fn_c_try_run "$LINENO"; then :
18717   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18718 else
18719   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18720 fi
18721 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18722   conftest.$ac_objext conftest.beam conftest.$ac_ext
18723 fi
18724
18725 LDFLAGS="$pgac_save_LDFLAGS"
18726 fi
18727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18728 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18729 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18730   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18731 fi
18732
18733 elif test "$PORTNAME" = "openbsd"; then
18734   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18735 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18736 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18737   $as_echo_n "(cached) " >&6
18738 else
18739   pgac_save_LDFLAGS=$LDFLAGS
18740 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18741 if test "$cross_compiling" = yes; then :
18742   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18743 else
18744   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18745 /* end confdefs.h.  */
18746 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18747 int
18748 main ()
18749 {
18750
18751   ;
18752   return 0;
18753 }
18754 _ACEOF
18755 if ac_fn_c_try_run "$LINENO"; then :
18756   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
18757 else
18758   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
18759 fi
18760 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18761   conftest.$ac_objext conftest.beam conftest.$ac_ext
18762 fi
18763
18764 LDFLAGS="$pgac_save_LDFLAGS"
18765 fi
18766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
18767 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
18768 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
18769   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
18770 fi
18771
18772 else
18773   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
18774 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
18775 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
18776   $as_echo_n "(cached) " >&6
18777 else
18778   pgac_save_LDFLAGS=$LDFLAGS
18779 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18780 if test "$cross_compiling" = yes; then :
18781   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
18782 else
18783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18784 /* end confdefs.h.  */
18785 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18786 int
18787 main ()
18788 {
18789
18790   ;
18791   return 0;
18792 }
18793 _ACEOF
18794 if ac_fn_c_try_run "$LINENO"; then :
18795   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
18796 else
18797   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
18798 fi
18799 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18800   conftest.$ac_objext conftest.beam conftest.$ac_ext
18801 fi
18802
18803 LDFLAGS="$pgac_save_LDFLAGS"
18804 fi
18805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
18806 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
18807 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
18808   LDFLAGS="$LDFLAGS -Wl,--as-needed"
18809 fi
18810
18811 fi
18812
18813 # Create compiler version string
18814 if test x"$GCC" = x"yes" ; then
18815   cc_string=`${CC} --version | sed q`
18816   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18817 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18818   cc_string=`${CC} -V 2>&1 | sed q`
18819 else
18820   cc_string=$CC
18821 fi
18822
18823
18824 cat >>confdefs.h <<_ACEOF
18825 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18826 _ACEOF
18827
18828
18829 # Supply a numeric version string for use by 3rd party add-ons
18830 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18831 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
18832 tr '.' '        ' |
18833 $AWK '{printf "%d%04d", $1, $2}'`"
18834
18835 cat >>confdefs.h <<_ACEOF
18836 #define PG_VERSION_NUM $PG_VERSION_NUM
18837 _ACEOF
18838
18839
18840
18841 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
18842 # literally, so that it's possible to override it at build time using
18843 # a command like "make ... PG_SYSROOT=path".  This has to be done after
18844 # we've finished all configure checks that depend on CPPFLAGS.
18845 if test x"$PG_SYSROOT" != x; then
18846   CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18847 fi
18848
18849
18850
18851 # Begin output steps
18852
18853 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
18854 $as_echo "$as_me: using compiler=$cc_string" >&6;}
18855 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
18856 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
18857 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
18858 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
18859 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
18860 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
18861 # Currently only used when LLVM is used
18862 if test "$with_llvm" = yes ; then
18863    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
18864 $as_echo "$as_me: using CXX=$CXX" >&6;}
18865    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
18866 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
18867    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
18868 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
18869    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
18870 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
18871    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
18872 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
18873 fi
18874
18875 # prepare build tree if outside source tree
18876 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18877 # Note 2: /bin/pwd might be better than shell's built-in at getting
18878 #         a symlink-free name.
18879 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18880   vpath_build=no
18881 else
18882   vpath_build=yes
18883   if test "$no_create" != yes; then
18884     $as_echo_n "preparing build tree... " >&6
18885     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
18886     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
18887       || as_fn_error $? "failed" "$LINENO" 5
18888     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
18889 $as_echo "done" >&6; }
18890   fi
18891 fi
18892
18893
18894
18895 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
18896
18897
18898 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}"
18899
18900
18901 if test "$PORTNAME" = "win32"; then
18902 ac_config_commands="$ac_config_commands check_win32_symlinks"
18903
18904 fi
18905
18906 ac_config_headers="$ac_config_headers src/include/pg_config.h"
18907
18908
18909 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
18910
18911
18912 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
18913
18914
18915 cat >confcache <<\_ACEOF
18916 # This file is a shell script that caches the results of configure
18917 # tests run on this system so they can be shared between configure
18918 # scripts and configure runs, see configure's option --config-cache.
18919 # It is not useful on other systems.  If it contains results you don't
18920 # want to keep, you may remove or edit it.
18921 #
18922 # config.status only pays attention to the cache file if you give it
18923 # the --recheck option to rerun configure.
18924 #
18925 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18926 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18927 # following values.
18928
18929 _ACEOF
18930
18931 # The following way of writing the cache mishandles newlines in values,
18932 # but we know of no workaround that is simple, portable, and efficient.
18933 # So, we kill variables containing newlines.
18934 # Ultrix sh set writes to stderr and can't be redirected directly,
18935 # and sets the high bit in the cache file unless we assign to the vars.
18936 (
18937   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18938     eval ac_val=\$$ac_var
18939     case $ac_val in #(
18940     *${as_nl}*)
18941       case $ac_var in #(
18942       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18943 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18944       esac
18945       case $ac_var in #(
18946       _ | IFS | as_nl) ;; #(
18947       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18948       *) { eval $ac_var=; unset $ac_var;} ;;
18949       esac ;;
18950     esac
18951   done
18952
18953   (set) 2>&1 |
18954     case $as_nl`(ac_space=' '; set) 2>&1` in #(
18955     *${as_nl}ac_space=\ *)
18956       # `set' does not quote correctly, so add quotes: double-quote
18957       # substitution turns \\\\ into \\, and sed turns \\ into \.
18958       sed -n \
18959         "s/'/'\\\\''/g;
18960           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18961       ;; #(
18962     *)
18963       # `set' quotes correctly as required by POSIX, so do not add quotes.
18964       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18965       ;;
18966     esac |
18967     sort
18968 ) |
18969   sed '
18970      /^ac_cv_env_/b end
18971      t clear
18972      :clear
18973      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18974      t end
18975      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18976      :end' >>confcache
18977 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18978   if test -w "$cache_file"; then
18979     if test "x$cache_file" != "x/dev/null"; then
18980       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18981 $as_echo "$as_me: updating cache $cache_file" >&6;}
18982       if test ! -f "$cache_file" || test -h "$cache_file"; then
18983         cat confcache >"$cache_file"
18984       else
18985         case $cache_file in #(
18986         */* | ?:*)
18987           mv -f confcache "$cache_file"$$ &&
18988           mv -f "$cache_file"$$ "$cache_file" ;; #(
18989         *)
18990           mv -f confcache "$cache_file" ;;
18991         esac
18992       fi
18993     fi
18994   else
18995     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18996 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18997   fi
18998 fi
18999 rm -f confcache
19000
19001 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19002 # Let make expand exec_prefix.
19003 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19004
19005 DEFS=-DHAVE_CONFIG_H
19006
19007 ac_libobjs=
19008 ac_ltlibobjs=
19009 U=
19010 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19011   # 1. Remove the extension, and $U if already installed.
19012   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19013   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19014   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19015   #    will be set to the directory where LIBOBJS objects are built.
19016   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19017   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19018 done
19019 LIBOBJS=$ac_libobjs
19020
19021 LTLIBOBJS=$ac_ltlibobjs
19022
19023
19024
19025
19026 : "${CONFIG_STATUS=./config.status}"
19027 ac_write_fail=0
19028 ac_clean_files_save=$ac_clean_files
19029 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19030 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19031 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19032 as_write_fail=0
19033 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19034 #! $SHELL
19035 # Generated by $as_me.
19036 # Run this file to recreate the current configuration.
19037 # Compiler output produced by configure, useful for debugging
19038 # configure, is in config.log if it exists.
19039
19040 debug=false
19041 ac_cs_recheck=false
19042 ac_cs_silent=false
19043
19044 SHELL=\${CONFIG_SHELL-$SHELL}
19045 export SHELL
19046 _ASEOF
19047 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19048 ## -------------------- ##
19049 ## M4sh Initialization. ##
19050 ## -------------------- ##
19051
19052 # Be more Bourne compatible
19053 DUALCASE=1; export DUALCASE # for MKS sh
19054 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19055   emulate sh
19056   NULLCMD=:
19057   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19058   # is contrary to our usage.  Disable this feature.
19059   alias -g '${1+"$@"}'='"$@"'
19060   setopt NO_GLOB_SUBST
19061 else
19062   case `(set -o) 2>/dev/null` in #(
19063   *posix*) :
19064     set -o posix ;; #(
19065   *) :
19066      ;;
19067 esac
19068 fi
19069
19070
19071 as_nl='
19072 '
19073 export as_nl
19074 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19075 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19076 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19077 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19078 # Prefer a ksh shell builtin over an external printf program on Solaris,
19079 # but without wasting forks for bash or zsh.
19080 if test -z "$BASH_VERSION$ZSH_VERSION" \
19081     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19082   as_echo='print -r --'
19083   as_echo_n='print -rn --'
19084 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19085   as_echo='printf %s\n'
19086   as_echo_n='printf %s'
19087 else
19088   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19089     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19090     as_echo_n='/usr/ucb/echo -n'
19091   else
19092     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19093     as_echo_n_body='eval
19094       arg=$1;
19095       case $arg in #(
19096       *"$as_nl"*)
19097         expr "X$arg" : "X\\(.*\\)$as_nl";
19098         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19099       esac;
19100       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19101     '
19102     export as_echo_n_body
19103     as_echo_n='sh -c $as_echo_n_body as_echo'
19104   fi
19105   export as_echo_body
19106   as_echo='sh -c $as_echo_body as_echo'
19107 fi
19108
19109 # The user is always right.
19110 if test "${PATH_SEPARATOR+set}" != set; then
19111   PATH_SEPARATOR=:
19112   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19113     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19114       PATH_SEPARATOR=';'
19115   }
19116 fi
19117
19118
19119 # IFS
19120 # We need space, tab and new line, in precisely that order.  Quoting is
19121 # there to prevent editors from complaining about space-tab.
19122 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19123 # splitting by setting IFS to empty value.)
19124 IFS=" ""        $as_nl"
19125
19126 # Find who we are.  Look in the path if we contain no directory separator.
19127 as_myself=
19128 case $0 in #((
19129   *[\\/]* ) as_myself=$0 ;;
19130   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19131 for as_dir in $PATH
19132 do
19133   IFS=$as_save_IFS
19134   test -z "$as_dir" && as_dir=.
19135     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19136   done
19137 IFS=$as_save_IFS
19138
19139      ;;
19140 esac
19141 # We did not find ourselves, most probably we were run as `sh COMMAND'
19142 # in which case we are not to be found in the path.
19143 if test "x$as_myself" = x; then
19144   as_myself=$0
19145 fi
19146 if test ! -f "$as_myself"; then
19147   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19148   exit 1
19149 fi
19150
19151 # Unset variables that we do not need and which cause bugs (e.g. in
19152 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19153 # suppresses any "Segmentation fault" message there.  '((' could
19154 # trigger a bug in pdksh 5.2.14.
19155 for as_var in BASH_ENV ENV MAIL MAILPATH
19156 do eval test x\${$as_var+set} = xset \
19157   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19158 done
19159 PS1='$ '
19160 PS2='> '
19161 PS4='+ '
19162
19163 # NLS nuisances.
19164 LC_ALL=C
19165 export LC_ALL
19166 LANGUAGE=C
19167 export LANGUAGE
19168
19169 # CDPATH.
19170 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19171
19172
19173 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19174 # ----------------------------------------
19175 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19176 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19177 # script with STATUS, using 1 if that was 0.
19178 as_fn_error ()
19179 {
19180   as_status=$1; test $as_status -eq 0 && as_status=1
19181   if test "$4"; then
19182     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19183     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19184   fi
19185   $as_echo "$as_me: error: $2" >&2
19186   as_fn_exit $as_status
19187 } # as_fn_error
19188
19189
19190 # as_fn_set_status STATUS
19191 # -----------------------
19192 # Set $? to STATUS, without forking.
19193 as_fn_set_status ()
19194 {
19195   return $1
19196 } # as_fn_set_status
19197
19198 # as_fn_exit STATUS
19199 # -----------------
19200 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19201 as_fn_exit ()
19202 {
19203   set +e
19204   as_fn_set_status $1
19205   exit $1
19206 } # as_fn_exit
19207
19208 # as_fn_unset VAR
19209 # ---------------
19210 # Portably unset VAR.
19211 as_fn_unset ()
19212 {
19213   { eval $1=; unset $1;}
19214 }
19215 as_unset=as_fn_unset
19216 # as_fn_append VAR VALUE
19217 # ----------------------
19218 # Append the text in VALUE to the end of the definition contained in VAR. Take
19219 # advantage of any shell optimizations that allow amortized linear growth over
19220 # repeated appends, instead of the typical quadratic growth present in naive
19221 # implementations.
19222 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19223   eval 'as_fn_append ()
19224   {
19225     eval $1+=\$2
19226   }'
19227 else
19228   as_fn_append ()
19229   {
19230     eval $1=\$$1\$2
19231   }
19232 fi # as_fn_append
19233
19234 # as_fn_arith ARG...
19235 # ------------------
19236 # Perform arithmetic evaluation on the ARGs, and store the result in the
19237 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19238 # must be portable across $(()) and expr.
19239 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19240   eval 'as_fn_arith ()
19241   {
19242     as_val=$(( $* ))
19243   }'
19244 else
19245   as_fn_arith ()
19246   {
19247     as_val=`expr "$@" || test $? -eq 1`
19248   }
19249 fi # as_fn_arith
19250
19251
19252 if expr a : '\(a\)' >/dev/null 2>&1 &&
19253    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19254   as_expr=expr
19255 else
19256   as_expr=false
19257 fi
19258
19259 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19260   as_basename=basename
19261 else
19262   as_basename=false
19263 fi
19264
19265 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19266   as_dirname=dirname
19267 else
19268   as_dirname=false
19269 fi
19270
19271 as_me=`$as_basename -- "$0" ||
19272 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19273          X"$0" : 'X\(//\)$' \| \
19274          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19275 $as_echo X/"$0" |
19276     sed '/^.*\/\([^/][^/]*\)\/*$/{
19277             s//\1/
19278             q
19279           }
19280           /^X\/\(\/\/\)$/{
19281             s//\1/
19282             q
19283           }
19284           /^X\/\(\/\).*/{
19285             s//\1/
19286             q
19287           }
19288           s/.*/./; q'`
19289
19290 # Avoid depending upon Character Ranges.
19291 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19292 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19293 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19294 as_cr_digits='0123456789'
19295 as_cr_alnum=$as_cr_Letters$as_cr_digits
19296
19297 ECHO_C= ECHO_N= ECHO_T=
19298 case `echo -n x` in #(((((
19299 -n*)
19300   case `echo 'xy\c'` in
19301   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19302   xy)  ECHO_C='\c';;
19303   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19304        ECHO_T=' ';;
19305   esac;;
19306 *)
19307   ECHO_N='-n';;
19308 esac
19309
19310 rm -f conf$$ conf$$.exe conf$$.file
19311 if test -d conf$$.dir; then
19312   rm -f conf$$.dir/conf$$.file
19313 else
19314   rm -f conf$$.dir
19315   mkdir conf$$.dir 2>/dev/null
19316 fi
19317 if (echo >conf$$.file) 2>/dev/null; then
19318   if ln -s conf$$.file conf$$ 2>/dev/null; then
19319     as_ln_s='ln -s'
19320     # ... but there are two gotchas:
19321     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19322     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19323     # In both cases, we have to default to `cp -pR'.
19324     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19325       as_ln_s='cp -pR'
19326   elif ln conf$$.file conf$$ 2>/dev/null; then
19327     as_ln_s=ln
19328   else
19329     as_ln_s='cp -pR'
19330   fi
19331 else
19332   as_ln_s='cp -pR'
19333 fi
19334 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19335 rmdir conf$$.dir 2>/dev/null
19336
19337
19338 # as_fn_mkdir_p
19339 # -------------
19340 # Create "$as_dir" as a directory, including parents if necessary.
19341 as_fn_mkdir_p ()
19342 {
19343
19344   case $as_dir in #(
19345   -*) as_dir=./$as_dir;;
19346   esac
19347   test -d "$as_dir" || eval $as_mkdir_p || {
19348     as_dirs=
19349     while :; do
19350       case $as_dir in #(
19351       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19352       *) as_qdir=$as_dir;;
19353       esac
19354       as_dirs="'$as_qdir' $as_dirs"
19355       as_dir=`$as_dirname -- "$as_dir" ||
19356 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19357          X"$as_dir" : 'X\(//\)[^/]' \| \
19358          X"$as_dir" : 'X\(//\)$' \| \
19359          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19360 $as_echo X"$as_dir" |
19361     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19362             s//\1/
19363             q
19364           }
19365           /^X\(\/\/\)[^/].*/{
19366             s//\1/
19367             q
19368           }
19369           /^X\(\/\/\)$/{
19370             s//\1/
19371             q
19372           }
19373           /^X\(\/\).*/{
19374             s//\1/
19375             q
19376           }
19377           s/.*/./; q'`
19378       test -d "$as_dir" && break
19379     done
19380     test -z "$as_dirs" || eval "mkdir $as_dirs"
19381   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19382
19383
19384 } # as_fn_mkdir_p
19385 if mkdir -p . 2>/dev/null; then
19386   as_mkdir_p='mkdir -p "$as_dir"'
19387 else
19388   test -d ./-p && rmdir ./-p
19389   as_mkdir_p=false
19390 fi
19391
19392
19393 # as_fn_executable_p FILE
19394 # -----------------------
19395 # Test if FILE is an executable regular file.
19396 as_fn_executable_p ()
19397 {
19398   test -f "$1" && test -x "$1"
19399 } # as_fn_executable_p
19400 as_test_x='test -x'
19401 as_executable_p=as_fn_executable_p
19402
19403 # Sed expression to map a string onto a valid CPP name.
19404 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19405
19406 # Sed expression to map a string onto a valid variable name.
19407 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19408
19409
19410 exec 6>&1
19411 ## ----------------------------------- ##
19412 ## Main body of $CONFIG_STATUS script. ##
19413 ## ----------------------------------- ##
19414 _ASEOF
19415 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19416
19417 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19418 # Save the log message, to keep $0 and so on meaningful, and to
19419 # report actual input values of CONFIG_FILES etc. instead of their
19420 # values after options handling.
19421 ac_log="
19422 This file was extended by PostgreSQL $as_me 12devel, which was
19423 generated by GNU Autoconf 2.69.  Invocation command line was
19424
19425   CONFIG_FILES    = $CONFIG_FILES
19426   CONFIG_HEADERS  = $CONFIG_HEADERS
19427   CONFIG_LINKS    = $CONFIG_LINKS
19428   CONFIG_COMMANDS = $CONFIG_COMMANDS
19429   $ $0 $@
19430
19431 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19432 "
19433
19434 _ACEOF
19435
19436 case $ac_config_files in *"
19437 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19438 esac
19439
19440 case $ac_config_headers in *"
19441 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19442 esac
19443
19444
19445 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19446 # Files that config.status was made for.
19447 config_files="$ac_config_files"
19448 config_headers="$ac_config_headers"
19449 config_links="$ac_config_links"
19450 config_commands="$ac_config_commands"
19451
19452 _ACEOF
19453
19454 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19455 ac_cs_usage="\
19456 \`$as_me' instantiates files and other configuration actions
19457 from templates according to the current configuration.  Unless the files
19458 and actions are specified as TAGs, all are instantiated by default.
19459
19460 Usage: $0 [OPTION]... [TAG]...
19461
19462   -h, --help       print this help, then exit
19463   -V, --version    print version number and configuration settings, then exit
19464       --config     print configuration, then exit
19465   -q, --quiet, --silent
19466                    do not print progress messages
19467   -d, --debug      don't remove temporary files
19468       --recheck    update $as_me by reconfiguring in the same conditions
19469       --file=FILE[:TEMPLATE]
19470                    instantiate the configuration file FILE
19471       --header=FILE[:TEMPLATE]
19472                    instantiate the configuration header FILE
19473
19474 Configuration files:
19475 $config_files
19476
19477 Configuration headers:
19478 $config_headers
19479
19480 Configuration links:
19481 $config_links
19482
19483 Configuration commands:
19484 $config_commands
19485
19486 Report bugs to <pgsql-bugs@postgresql.org>."
19487
19488 _ACEOF
19489 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19490 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19491 ac_cs_version="\\
19492 PostgreSQL config.status 12devel
19493 configured by $0, generated by GNU Autoconf 2.69,
19494   with options \\"\$ac_cs_config\\"
19495
19496 Copyright (C) 2012 Free Software Foundation, Inc.
19497 This config.status script is free software; the Free Software Foundation
19498 gives unlimited permission to copy, distribute and modify it."
19499
19500 ac_pwd='$ac_pwd'
19501 srcdir='$srcdir'
19502 INSTALL='$INSTALL'
19503 MKDIR_P='$MKDIR_P'
19504 AWK='$AWK'
19505 test -n "\$AWK" || AWK=awk
19506 _ACEOF
19507
19508 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19509 # The default lists apply if the user does not specify any file.
19510 ac_need_defaults=:
19511 while test $# != 0
19512 do
19513   case $1 in
19514   --*=?*)
19515     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19516     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19517     ac_shift=:
19518     ;;
19519   --*=)
19520     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19521     ac_optarg=
19522     ac_shift=:
19523     ;;
19524   *)
19525     ac_option=$1
19526     ac_optarg=$2
19527     ac_shift=shift
19528     ;;
19529   esac
19530
19531   case $ac_option in
19532   # Handling of the options.
19533   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19534     ac_cs_recheck=: ;;
19535   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19536     $as_echo "$ac_cs_version"; exit ;;
19537   --config | --confi | --conf | --con | --co | --c )
19538     $as_echo "$ac_cs_config"; exit ;;
19539   --debug | --debu | --deb | --de | --d | -d )
19540     debug=: ;;
19541   --file | --fil | --fi | --f )
19542     $ac_shift
19543     case $ac_optarg in
19544     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19545     '') as_fn_error $? "missing file argument" ;;
19546     esac
19547     as_fn_append CONFIG_FILES " '$ac_optarg'"
19548     ac_need_defaults=false;;
19549   --header | --heade | --head | --hea )
19550     $ac_shift
19551     case $ac_optarg in
19552     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19553     esac
19554     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19555     ac_need_defaults=false;;
19556   --he | --h)
19557     # Conflict between --help and --header
19558     as_fn_error $? "ambiguous option: \`$1'
19559 Try \`$0 --help' for more information.";;
19560   --help | --hel | -h )
19561     $as_echo "$ac_cs_usage"; exit ;;
19562   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19563   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19564     ac_cs_silent=: ;;
19565
19566   # This is an error.
19567   -*) as_fn_error $? "unrecognized option: \`$1'
19568 Try \`$0 --help' for more information." ;;
19569
19570   *) as_fn_append ac_config_targets " $1"
19571      ac_need_defaults=false ;;
19572
19573   esac
19574   shift
19575 done
19576
19577 ac_configure_extra_args=
19578
19579 if $ac_cs_silent; then
19580   exec 6>/dev/null
19581   ac_configure_extra_args="$ac_configure_extra_args --silent"
19582 fi
19583
19584 _ACEOF
19585 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19586 if \$ac_cs_recheck; then
19587   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19588   shift
19589   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19590   CONFIG_SHELL='$SHELL'
19591   export CONFIG_SHELL
19592   exec "\$@"
19593 fi
19594
19595 _ACEOF
19596 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19597 exec 5>>config.log
19598 {
19599   echo
19600   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19601 ## Running $as_me. ##
19602 _ASBOX
19603   $as_echo "$ac_log"
19604 } >&5
19605
19606 _ACEOF
19607 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19608 _ACEOF
19609
19610 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19611
19612 # Handling of arguments.
19613 for ac_config_target in $ac_config_targets
19614 do
19615   case $ac_config_target in
19616     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19617     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19618     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19619     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19620     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19621     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19622     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19623     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19624     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19625     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19626     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19627
19628   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19629   esac
19630 done
19631
19632
19633 # If the user did not use the arguments to specify the items to instantiate,
19634 # then the envvar interface is used.  Set only those that are not.
19635 # We use the long form for the default assignment because of an extremely
19636 # bizarre bug on SunOS 4.1.3.
19637 if $ac_need_defaults; then
19638   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19639   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19640   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19641   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19642 fi
19643
19644 # Have a temporary directory for convenience.  Make it in the build tree
19645 # simply because there is no reason against having it here, and in addition,
19646 # creating and moving files from /tmp can sometimes cause problems.
19647 # Hook for its removal unless debugging.
19648 # Note that there is a small window in which the directory will not be cleaned:
19649 # after its creation but before its name has been assigned to `$tmp'.
19650 $debug ||
19651 {
19652   tmp= ac_tmp=
19653   trap 'exit_status=$?
19654   : "${ac_tmp:=$tmp}"
19655   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19656 ' 0
19657   trap 'as_fn_exit 1' 1 2 13 15
19658 }
19659 # Create a (secure) tmp directory for tmp files.
19660
19661 {
19662   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19663   test -d "$tmp"
19664 }  ||
19665 {
19666   tmp=./conf$$-$RANDOM
19667   (umask 077 && mkdir "$tmp")
19668 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19669 ac_tmp=$tmp
19670
19671 # Set up the scripts for CONFIG_FILES section.
19672 # No need to generate them if there are no CONFIG_FILES.
19673 # This happens for instance with `./config.status config.h'.
19674 if test -n "$CONFIG_FILES"; then
19675
19676
19677 ac_cr=`echo X | tr X '\015'`
19678 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19679 # But we know of no other shell where ac_cr would be empty at this
19680 # point, so we can use a bashism as a fallback.
19681 if test "x$ac_cr" = x; then
19682   eval ac_cr=\$\'\\r\'
19683 fi
19684 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19685 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19686   ac_cs_awk_cr='\\r'
19687 else
19688   ac_cs_awk_cr=$ac_cr
19689 fi
19690
19691 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19692 _ACEOF
19693
19694
19695 {
19696   echo "cat >conf$$subs.awk <<_ACEOF" &&
19697   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19698   echo "_ACEOF"
19699 } >conf$$subs.sh ||
19700   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19701 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19702 ac_delim='%!_!# '
19703 for ac_last_try in false false false false false :; do
19704   . ./conf$$subs.sh ||
19705     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19706
19707   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19708   if test $ac_delim_n = $ac_delim_num; then
19709     break
19710   elif $ac_last_try; then
19711     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19712   else
19713     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19714   fi
19715 done
19716 rm -f conf$$subs.sh
19717
19718 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19719 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19720 _ACEOF
19721 sed -n '
19722 h
19723 s/^/S["/; s/!.*/"]=/
19724 p
19725 g
19726 s/^[^!]*!//
19727 :repl
19728 t repl
19729 s/'"$ac_delim"'$//
19730 t delim
19731 :nl
19732 h
19733 s/\(.\{148\}\)..*/\1/
19734 t more1
19735 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19736 p
19737 n
19738 b repl
19739 :more1
19740 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19741 p
19742 g
19743 s/.\{148\}//
19744 t nl
19745 :delim
19746 h
19747 s/\(.\{148\}\)..*/\1/
19748 t more2
19749 s/["\\]/\\&/g; s/^/"/; s/$/"/
19750 p
19751 b
19752 :more2
19753 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19754 p
19755 g
19756 s/.\{148\}//
19757 t delim
19758 ' <conf$$subs.awk | sed '
19759 /^[^""]/{
19760   N
19761   s/\n//
19762 }
19763 ' >>$CONFIG_STATUS || ac_write_fail=1
19764 rm -f conf$$subs.awk
19765 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19766 _ACAWK
19767 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19768   for (key in S) S_is_set[key] = 1
19769   FS = "\a"
19770
19771 }
19772 {
19773   line = $ 0
19774   nfields = split(line, field, "@")
19775   substed = 0
19776   len = length(field[1])
19777   for (i = 2; i < nfields; i++) {
19778     key = field[i]
19779     keylen = length(key)
19780     if (S_is_set[key]) {
19781       value = S[key]
19782       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19783       len += length(value) + length(field[++i])
19784       substed = 1
19785     } else
19786       len += 1 + keylen
19787   }
19788
19789   print line
19790 }
19791
19792 _ACAWK
19793 _ACEOF
19794 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19795 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19796   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19797 else
19798   cat
19799 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19800   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19801 _ACEOF
19802
19803 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19804 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19805 # trailing colons and then remove the whole line if VPATH becomes empty
19806 # (actually we leave an empty line to preserve line numbers).
19807 if test "x$srcdir" = x.; then
19808   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
19809 h
19810 s///
19811 s/^/:/
19812 s/[      ]*$/:/
19813 s/:\$(srcdir):/:/g
19814 s/:\${srcdir}:/:/g
19815 s/:@srcdir@:/:/g
19816 s/^:*//
19817 s/:*$//
19818 x
19819 s/\(=[   ]*\).*/\1/
19820 G
19821 s/\n//
19822 s/^[^=]*=[       ]*$//
19823 }'
19824 fi
19825
19826 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19827 fi # test -n "$CONFIG_FILES"
19828
19829 # Set up the scripts for CONFIG_HEADERS section.
19830 # No need to generate them if there are no CONFIG_HEADERS.
19831 # This happens for instance with `./config.status Makefile'.
19832 if test -n "$CONFIG_HEADERS"; then
19833 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19834 BEGIN {
19835 _ACEOF
19836
19837 # Transform confdefs.h into an awk script `defines.awk', embedded as
19838 # here-document in config.status, that substitutes the proper values into
19839 # config.h.in to produce config.h.
19840
19841 # Create a delimiter string that does not exist in confdefs.h, to ease
19842 # handling of long lines.
19843 ac_delim='%!_!# '
19844 for ac_last_try in false false :; do
19845   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19846   if test -z "$ac_tt"; then
19847     break
19848   elif $ac_last_try; then
19849     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19850   else
19851     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19852   fi
19853 done
19854
19855 # For the awk script, D is an array of macro values keyed by name,
19856 # likewise P contains macro parameters if any.  Preserve backslash
19857 # newline sequences.
19858
19859 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19860 sed -n '
19861 s/.\{148\}/&'"$ac_delim"'/g
19862 t rset
19863 :rset
19864 s/^[     ]*#[    ]*define[       ][      ]*/ /
19865 t def
19866 d
19867 :def
19868 s/\\$//
19869 t bsnl
19870 s/["\\]/\\&/g
19871 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19872 D["\1"]=" \3"/p
19873 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
19874 d
19875 :bsnl
19876 s/["\\]/\\&/g
19877 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19878 D["\1"]=" \3\\\\\\n"\\/p
19879 t cont
19880 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19881 t cont
19882 d
19883 :cont
19884 n
19885 s/.\{148\}/&'"$ac_delim"'/g
19886 t clear
19887 :clear
19888 s/\\$//
19889 t bsnlc
19890 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19891 d
19892 :bsnlc
19893 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19894 b cont
19895 ' <confdefs.h | sed '
19896 s/'"$ac_delim"'/"\\\
19897 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19898
19899 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19900   for (key in D) D_is_set[key] = 1
19901   FS = "\a"
19902 }
19903 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19904   line = \$ 0
19905   split(line, arg, " ")
19906   if (arg[1] == "#") {
19907     defundef = arg[2]
19908     mac1 = arg[3]
19909   } else {
19910     defundef = substr(arg[1], 2)
19911     mac1 = arg[2]
19912   }
19913   split(mac1, mac2, "(") #)
19914   macro = mac2[1]
19915   prefix = substr(line, 1, index(line, defundef) - 1)
19916   if (D_is_set[macro]) {
19917     # Preserve the white space surrounding the "#".
19918     print prefix "define", macro P[macro] D[macro]
19919     next
19920   } else {
19921     # Replace #undef with comments.  This is necessary, for example,
19922     # in the case of _POSIX_SOURCE, which is predefined and required
19923     # on some systems where configure will not decide to define it.
19924     if (defundef == "undef") {
19925       print "/*", prefix defundef, macro, "*/"
19926       next
19927     }
19928   }
19929 }
19930 { print }
19931 _ACAWK
19932 _ACEOF
19933 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19934   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
19935 fi # test -n "$CONFIG_HEADERS"
19936
19937
19938 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
19939 shift
19940 for ac_tag
19941 do
19942   case $ac_tag in
19943   :[FHLC]) ac_mode=$ac_tag; continue;;
19944   esac
19945   case $ac_mode$ac_tag in
19946   :[FHL]*:*);;
19947   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
19948   :[FH]-) ac_tag=-:-;;
19949   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19950   esac
19951   ac_save_IFS=$IFS
19952   IFS=:
19953   set x $ac_tag
19954   IFS=$ac_save_IFS
19955   shift
19956   ac_file=$1
19957   shift
19958
19959   case $ac_mode in
19960   :L) ac_source=$1;;
19961   :[FH])
19962     ac_file_inputs=
19963     for ac_f
19964     do
19965       case $ac_f in
19966       -) ac_f="$ac_tmp/stdin";;
19967       *) # Look for the file first in the build tree, then in the source tree
19968          # (if the path is not absolute).  The absolute path cannot be DOS-style,
19969          # because $ac_f cannot contain `:'.
19970          test -f "$ac_f" ||
19971            case $ac_f in
19972            [\\/$]*) false;;
19973            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19974            esac ||
19975            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
19976       esac
19977       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19978       as_fn_append ac_file_inputs " '$ac_f'"
19979     done
19980
19981     # Let's still pretend it is `configure' which instantiates (i.e., don't
19982     # use $as_me), people would be surprised to read:
19983     #    /* config.h.  Generated by config.status.  */
19984     configure_input='Generated from '`
19985           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19986         `' by configure.'
19987     if test x"$ac_file" != x-; then
19988       configure_input="$ac_file.  $configure_input"
19989       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19990 $as_echo "$as_me: creating $ac_file" >&6;}
19991     fi
19992     # Neutralize special characters interpreted by sed in replacement strings.
19993     case $configure_input in #(
19994     *\&* | *\|* | *\\* )
19995        ac_sed_conf_input=`$as_echo "$configure_input" |
19996        sed 's/[\\\\&|]/\\\\&/g'`;; #(
19997     *) ac_sed_conf_input=$configure_input;;
19998     esac
19999
20000     case $ac_tag in
20001     *:-:* | *:-) cat >"$ac_tmp/stdin" \
20002       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20003     esac
20004     ;;
20005   esac
20006
20007   ac_dir=`$as_dirname -- "$ac_file" ||
20008 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20009          X"$ac_file" : 'X\(//\)[^/]' \| \
20010          X"$ac_file" : 'X\(//\)$' \| \
20011          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20012 $as_echo X"$ac_file" |
20013     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20014             s//\1/
20015             q
20016           }
20017           /^X\(\/\/\)[^/].*/{
20018             s//\1/
20019             q
20020           }
20021           /^X\(\/\/\)$/{
20022             s//\1/
20023             q
20024           }
20025           /^X\(\/\).*/{
20026             s//\1/
20027             q
20028           }
20029           s/.*/./; q'`
20030   as_dir="$ac_dir"; as_fn_mkdir_p
20031   ac_builddir=.
20032
20033 case "$ac_dir" in
20034 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20035 *)
20036   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20037   # A ".." for each directory in $ac_dir_suffix.
20038   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20039   case $ac_top_builddir_sub in
20040   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20041   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20042   esac ;;
20043 esac
20044 ac_abs_top_builddir=$ac_pwd
20045 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20046 # for backward compatibility:
20047 ac_top_builddir=$ac_top_build_prefix
20048
20049 case $srcdir in
20050   .)  # We are building in place.
20051     ac_srcdir=.
20052     ac_top_srcdir=$ac_top_builddir_sub
20053     ac_abs_top_srcdir=$ac_pwd ;;
20054   [\\/]* | ?:[\\/]* )  # Absolute name.
20055     ac_srcdir=$srcdir$ac_dir_suffix;
20056     ac_top_srcdir=$srcdir
20057     ac_abs_top_srcdir=$srcdir ;;
20058   *) # Relative name.
20059     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20060     ac_top_srcdir=$ac_top_build_prefix$srcdir
20061     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20062 esac
20063 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20064
20065
20066   case $ac_mode in
20067   :F)
20068   #
20069   # CONFIG_FILE
20070   #
20071
20072   case $INSTALL in
20073   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20074   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20075   esac
20076   ac_MKDIR_P=$MKDIR_P
20077   case $MKDIR_P in
20078   [\\/$]* | ?:[\\/]* ) ;;
20079   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20080   esac
20081 _ACEOF
20082
20083 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20084 # If the template does not know about datarootdir, expand it.
20085 # FIXME: This hack should be removed a few years after 2.60.
20086 ac_datarootdir_hack=; ac_datarootdir_seen=
20087 ac_sed_dataroot='
20088 /datarootdir/ {
20089   p
20090   q
20091 }
20092 /@datadir@/p
20093 /@docdir@/p
20094 /@infodir@/p
20095 /@localedir@/p
20096 /@mandir@/p'
20097 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20098 *datarootdir*) ac_datarootdir_seen=yes;;
20099 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20100   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20101 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20102 _ACEOF
20103 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20104   ac_datarootdir_hack='
20105   s&@datadir@&$datadir&g
20106   s&@docdir@&$docdir&g
20107   s&@infodir@&$infodir&g
20108   s&@localedir@&$localedir&g
20109   s&@mandir@&$mandir&g
20110   s&\\\${datarootdir}&$datarootdir&g' ;;
20111 esac
20112 _ACEOF
20113
20114 # Neutralize VPATH when `$srcdir' = `.'.
20115 # Shell code in configure.ac might set extrasub.
20116 # FIXME: do we really want to maintain this feature?
20117 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20118 ac_sed_extra="$ac_vpsub
20119 $extrasub
20120 _ACEOF
20121 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20122 :t
20123 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20124 s|@configure_input@|$ac_sed_conf_input|;t t
20125 s&@top_builddir@&$ac_top_builddir_sub&;t t
20126 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20127 s&@srcdir@&$ac_srcdir&;t t
20128 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20129 s&@top_srcdir@&$ac_top_srcdir&;t t
20130 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20131 s&@builddir@&$ac_builddir&;t t
20132 s&@abs_builddir@&$ac_abs_builddir&;t t
20133 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20134 s&@INSTALL@&$ac_INSTALL&;t t
20135 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20136 $ac_datarootdir_hack
20137 "
20138 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20139   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20140
20141 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20142   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20143   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20144       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20145   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20146 which seems to be undefined.  Please make sure it is defined" >&5
20147 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20148 which seems to be undefined.  Please make sure it is defined" >&2;}
20149
20150   rm -f "$ac_tmp/stdin"
20151   case $ac_file in
20152   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20153   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20154   esac \
20155   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20156  ;;
20157   :H)
20158   #
20159   # CONFIG_HEADER
20160   #
20161   if test x"$ac_file" != x-; then
20162     {
20163       $as_echo "/* $configure_input  */" \
20164       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20165     } >"$ac_tmp/config.h" \
20166       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20167     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20168       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20169 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20170     else
20171       rm -f "$ac_file"
20172       mv "$ac_tmp/config.h" "$ac_file" \
20173         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20174     fi
20175   else
20176     $as_echo "/* $configure_input  */" \
20177       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20178       || as_fn_error $? "could not create -" "$LINENO" 5
20179   fi
20180  ;;
20181   :L)
20182   #
20183   # CONFIG_LINK
20184   #
20185
20186   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20187     :
20188   else
20189     # Prefer the file from the source tree if names are identical.
20190     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20191       ac_source=$srcdir/$ac_source
20192     fi
20193
20194     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20195 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20196
20197     if test ! -r "$ac_source"; then
20198       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20199     fi
20200     rm -f "$ac_file"
20201
20202     # Try a relative symlink, then a hard link, then a copy.
20203     case $ac_source in
20204     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20205         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20206     esac
20207     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20208       ln "$ac_source" "$ac_file" 2>/dev/null ||
20209       cp -p "$ac_source" "$ac_file" ||
20210       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20211   fi
20212  ;;
20213   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20214 $as_echo "$as_me: executing $ac_file commands" >&6;}
20215  ;;
20216   esac
20217
20218
20219   case $ac_file$ac_mode in
20220     "check_win32_symlinks":C)
20221 # Links sometimes fail undetected on Mingw -
20222 # so here we detect it and warn the user
20223 for FILE in $CONFIG_LINKS
20224  do
20225         # test -e works for symlinks in the MinGW console
20226         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20227 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20228  done
20229  ;;
20230     "src/include/pg_config.h":H)
20231 # Update timestamp for pg_config.h (see Makefile.global)
20232 echo >src/include/stamp-h
20233  ;;
20234     "src/include/pg_config_ext.h":H)
20235 # Update timestamp for pg_config_ext.h (see Makefile.global)
20236 echo >src/include/stamp-ext-h
20237  ;;
20238     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20239
20240   esac
20241 done # for ac_tag
20242
20243
20244 as_fn_exit 0
20245 _ACEOF
20246 ac_clean_files=$ac_clean_files_save
20247
20248 test $ac_write_fail = 0 ||
20249   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20250
20251
20252 # configure is writing to config.log, and then calls config.status.
20253 # config.status does its own redirection, appending to config.log.
20254 # Unfortunately, on DOS this fails, as config.log is still kept open
20255 # by configure, so config.status won't be able to write to it; its
20256 # output is simply discarded.  So we exec the FD to /dev/null,
20257 # effectively closing config.log, so it can be properly (re)opened and
20258 # appended to by config.status.  When coming back to configure, we
20259 # need to make the FD available again.
20260 if test "$no_create" != yes; then
20261   ac_cs_success=:
20262   ac_config_status_args=
20263   test "$silent" = yes &&
20264     ac_config_status_args="$ac_config_status_args --quiet"
20265   exec 5>/dev/null
20266   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20267   exec 5>>config.log
20268   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20269   # would make configure fail if this is the last instruction.
20270   $ac_cs_success || as_fn_exit 1
20271 fi
20272 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20273   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20274 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20275 fi
20276