]> granicus.if.org Git - postgresql/blob - configure
cecd96a14faadb3195422ffd6ee55c084fb238f5
[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_VERSION_NUM
631 PROVE
632 FOP
633 XSLTPROC
634 DBTOEPUB
635 have_docbook
636 XMLLINT
637 TCL_SHLIB_LD_LIBS
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_ARMV8_CRC32C
650 CFLAGS_SSE42
651 have_win32_dbghelp
652 HAVE_IPV6
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_useshrplib
672 perl_privlibexp
673 perl_archlibexp
674 PERL
675 FLEXFLAGS
676 FLEX
677 BISONFLAGS
678 BISON
679 MKDIR_P
680 LN_S
681 TAR
682 install_bin
683 INSTALL_DATA
684 INSTALL_SCRIPT
685 INSTALL_PROGRAM
686 WINDRES
687 DLLWRAP
688 DLLTOOL
689 AR
690 STRIP_SHARED_LIB
691 STRIP_STATIC_LIB
692 STRIP
693 RANLIB
694 with_gnu_ld
695 LD
696 LDFLAGS_SL
697 LDFLAGS_EX
698 ELF_SYS
699 EGREP
700 GREP
701 with_zlib
702 with_system_tzdata
703 with_libxslt
704 with_libxml
705 XML2_CONFIG
706 UUID_EXTRA_OBJS
707 with_uuid
708 with_systemd
709 with_selinux
710 with_openssl
711 with_ldap
712 with_krb_srvnam
713 krb_srvtab
714 with_gssapi
715 with_python
716 with_perl
717 with_tcl
718 ICU_LIBS
719 ICU_CFLAGS
720 PKG_CONFIG_LIBDIR
721 PKG_CONFIG_PATH
722 PKG_CONFIG
723 with_icu
724 enable_thread_safety
725 INCLUDES
726 autodepend
727 TAS
728 GCC
729 CPP
730 BITCODE_CXXFLAGS
731 BITCODE_CFLAGS
732 CFLAGS_VECTOR
733 LLVM_BINPATH
734 LLVM_CXXFLAGS
735 LLVM_CFLAGS
736 LLVM_CPPFLAGS
737 LLVM_LIBS
738 CLANG
739 LLVM_CONFIG
740 AWK
741 with_llvm
742 SUN_STUDIO_CC
743 ac_ct_CXX
744 CXXFLAGS
745 CXX
746 OBJEXT
747 EXEEXT
748 ac_ct_CC
749 CPPFLAGS
750 LDFLAGS
751 CFLAGS
752 CC
753 enable_tap_tests
754 enable_dtrace
755 DTRACEFLAGS
756 DTRACE
757 enable_coverage
758 GENHTML
759 LCOV
760 GCOV
761 enable_debug
762 enable_strong_random
763 enable_rpath
764 default_port
765 WANTED_LANGUAGES
766 enable_nls
767 PORTNAME
768 host_os
769 host_vendor
770 host_cpu
771 host
772 build_os
773 build_vendor
774 build_cpu
775 build
776 PG_MAJORVERSION
777 configure_args
778 target_alias
779 host_alias
780 build_alias
781 LIBS
782 ECHO_T
783 ECHO_N
784 ECHO_C
785 DEFS
786 mandir
787 localedir
788 libdir
789 psdir
790 pdfdir
791 dvidir
792 htmldir
793 infodir
794 docdir
795 oldincludedir
796 includedir
797 localstatedir
798 sharedstatedir
799 sysconfdir
800 datadir
801 datarootdir
802 libexecdir
803 sbindir
804 bindir
805 program_transform_name
806 prefix
807 exec_prefix
808 PACKAGE_URL
809 PACKAGE_BUGREPORT
810 PACKAGE_STRING
811 PACKAGE_VERSION
812 PACKAGE_TARNAME
813 PACKAGE_NAME
814 PATH_SEPARATOR
815 SHELL'
816 ac_subst_files=''
817 ac_user_opts='
818 enable_option_checking
819 with_extra_version
820 with_template
821 with_includes
822 with_libraries
823 with_libs
824 enable_integer_datetimes
825 enable_nls
826 with_pgport
827 enable_rpath
828 enable_spinlocks
829 enable_atomics
830 enable_strong_random
831 enable_debug
832 enable_profiling
833 enable_coverage
834 enable_dtrace
835 enable_tap_tests
836 with_blocksize
837 with_segsize
838 with_wal_blocksize
839 with_CC
840 with_llvm
841 enable_depend
842 enable_cassert
843 enable_thread_safety
844 with_icu
845 with_tcl
846 with_tclconfig
847 with_perl
848 with_python
849 with_gssapi
850 with_krb_srvnam
851 with_pam
852 with_bsd_auth
853 with_ldap
854 with_bonjour
855 with_openssl
856 with_selinux
857 with_systemd
858 with_readline
859 with_libedit_preferred
860 with_uuid
861 with_ossp_uuid
862 with_libxml
863 with_libxslt
864 with_system_tzdata
865 with_zlib
866 with_gnu_ld
867 enable_largefile
868 enable_float4_byval
869 enable_float8_byval
870 '
871       ac_precious_vars='build_alias
872 host_alias
873 target_alias
874 CC
875 CFLAGS
876 LDFLAGS
877 LIBS
878 CPPFLAGS
879 CXX
880 CXXFLAGS
881 CCC
882 LLVM_CONFIG
883 CLANG
884 CPP
885 PKG_CONFIG
886 PKG_CONFIG_PATH
887 PKG_CONFIG_LIBDIR
888 ICU_CFLAGS
889 ICU_LIBS
890 LDFLAGS_EX
891 LDFLAGS_SL'
892
893
894 # Initialize some variables set by options.
895 ac_init_help=
896 ac_init_version=false
897 ac_unrecognized_opts=
898 ac_unrecognized_sep=
899 # The variables have the same names as the options, with
900 # dashes changed to underlines.
901 cache_file=/dev/null
902 exec_prefix=NONE
903 no_create=
904 no_recursion=
905 prefix=NONE
906 program_prefix=NONE
907 program_suffix=NONE
908 program_transform_name=s,x,x,
909 silent=
910 site=
911 srcdir=
912 verbose=
913 x_includes=NONE
914 x_libraries=NONE
915
916 # Installation directory options.
917 # These are left unexpanded so users can "make install exec_prefix=/foo"
918 # and all the variables that are supposed to be based on exec_prefix
919 # by default will actually change.
920 # Use braces instead of parens because sh, perl, etc. also accept them.
921 # (The list follows the same order as the GNU Coding Standards.)
922 bindir='${exec_prefix}/bin'
923 sbindir='${exec_prefix}/sbin'
924 libexecdir='${exec_prefix}/libexec'
925 datarootdir='${prefix}/share'
926 datadir='${datarootdir}'
927 sysconfdir='${prefix}/etc'
928 sharedstatedir='${prefix}/com'
929 localstatedir='${prefix}/var'
930 includedir='${prefix}/include'
931 oldincludedir='/usr/include'
932 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
933 infodir='${datarootdir}/info'
934 htmldir='${docdir}'
935 dvidir='${docdir}'
936 pdfdir='${docdir}'
937 psdir='${docdir}'
938 libdir='${exec_prefix}/lib'
939 localedir='${datarootdir}/locale'
940 mandir='${datarootdir}/man'
941
942 ac_prev=
943 ac_dashdash=
944 for ac_option
945 do
946   # If the previous option needs an argument, assign it.
947   if test -n "$ac_prev"; then
948     eval $ac_prev=\$ac_option
949     ac_prev=
950     continue
951   fi
952
953   case $ac_option in
954   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
955   *=)   ac_optarg= ;;
956   *)    ac_optarg=yes ;;
957   esac
958
959   # Accept the important Cygnus configure options, so we can diagnose typos.
960
961   case $ac_dashdash$ac_option in
962   --)
963     ac_dashdash=yes ;;
964
965   -bindir | --bindir | --bindi | --bind | --bin | --bi)
966     ac_prev=bindir ;;
967   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
968     bindir=$ac_optarg ;;
969
970   -build | --build | --buil | --bui | --bu)
971     ac_prev=build_alias ;;
972   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
973     build_alias=$ac_optarg ;;
974
975   -cache-file | --cache-file | --cache-fil | --cache-fi \
976   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
977     ac_prev=cache_file ;;
978   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
979   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
980     cache_file=$ac_optarg ;;
981
982   --config-cache | -C)
983     cache_file=config.cache ;;
984
985   -datadir | --datadir | --datadi | --datad)
986     ac_prev=datadir ;;
987   -datadir=* | --datadir=* | --datadi=* | --datad=*)
988     datadir=$ac_optarg ;;
989
990   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
991   | --dataroo | --dataro | --datar)
992     ac_prev=datarootdir ;;
993   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
994   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
995     datarootdir=$ac_optarg ;;
996
997   -disable-* | --disable-*)
998     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
999     # Reject names that are not valid shell variable names.
1000     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1001       as_fn_error $? "invalid feature name: $ac_useropt"
1002     ac_useropt_orig=$ac_useropt
1003     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1004     case $ac_user_opts in
1005       *"
1006 "enable_$ac_useropt"
1007 "*) ;;
1008       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1009          ac_unrecognized_sep=', ';;
1010     esac
1011     eval enable_$ac_useropt=no ;;
1012
1013   -docdir | --docdir | --docdi | --doc | --do)
1014     ac_prev=docdir ;;
1015   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1016     docdir=$ac_optarg ;;
1017
1018   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1019     ac_prev=dvidir ;;
1020   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1021     dvidir=$ac_optarg ;;
1022
1023   -enable-* | --enable-*)
1024     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1025     # Reject names that are not valid shell variable names.
1026     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1027       as_fn_error $? "invalid feature name: $ac_useropt"
1028     ac_useropt_orig=$ac_useropt
1029     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1030     case $ac_user_opts in
1031       *"
1032 "enable_$ac_useropt"
1033 "*) ;;
1034       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1035          ac_unrecognized_sep=', ';;
1036     esac
1037     eval enable_$ac_useropt=\$ac_optarg ;;
1038
1039   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1040   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1041   | --exec | --exe | --ex)
1042     ac_prev=exec_prefix ;;
1043   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1044   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1045   | --exec=* | --exe=* | --ex=*)
1046     exec_prefix=$ac_optarg ;;
1047
1048   -gas | --gas | --ga | --g)
1049     # Obsolete; use --with-gas.
1050     with_gas=yes ;;
1051
1052   -help | --help | --hel | --he | -h)
1053     ac_init_help=long ;;
1054   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1055     ac_init_help=recursive ;;
1056   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1057     ac_init_help=short ;;
1058
1059   -host | --host | --hos | --ho)
1060     ac_prev=host_alias ;;
1061   -host=* | --host=* | --hos=* | --ho=*)
1062     host_alias=$ac_optarg ;;
1063
1064   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1065     ac_prev=htmldir ;;
1066   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1067   | --ht=*)
1068     htmldir=$ac_optarg ;;
1069
1070   -includedir | --includedir | --includedi | --included | --include \
1071   | --includ | --inclu | --incl | --inc)
1072     ac_prev=includedir ;;
1073   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1074   | --includ=* | --inclu=* | --incl=* | --inc=*)
1075     includedir=$ac_optarg ;;
1076
1077   -infodir | --infodir | --infodi | --infod | --info | --inf)
1078     ac_prev=infodir ;;
1079   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1080     infodir=$ac_optarg ;;
1081
1082   -libdir | --libdir | --libdi | --libd)
1083     ac_prev=libdir ;;
1084   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1085     libdir=$ac_optarg ;;
1086
1087   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1088   | --libexe | --libex | --libe)
1089     ac_prev=libexecdir ;;
1090   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1091   | --libexe=* | --libex=* | --libe=*)
1092     libexecdir=$ac_optarg ;;
1093
1094   -localedir | --localedir | --localedi | --localed | --locale)
1095     ac_prev=localedir ;;
1096   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1097     localedir=$ac_optarg ;;
1098
1099   -localstatedir | --localstatedir | --localstatedi | --localstated \
1100   | --localstate | --localstat | --localsta | --localst | --locals)
1101     ac_prev=localstatedir ;;
1102   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1103   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1104     localstatedir=$ac_optarg ;;
1105
1106   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1107     ac_prev=mandir ;;
1108   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1109     mandir=$ac_optarg ;;
1110
1111   -nfp | --nfp | --nf)
1112     # Obsolete; use --without-fp.
1113     with_fp=no ;;
1114
1115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1116   | --no-cr | --no-c | -n)
1117     no_create=yes ;;
1118
1119   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1120   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1121     no_recursion=yes ;;
1122
1123   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1124   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1125   | --oldin | --oldi | --old | --ol | --o)
1126     ac_prev=oldincludedir ;;
1127   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1128   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1129   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1130     oldincludedir=$ac_optarg ;;
1131
1132   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1133     ac_prev=prefix ;;
1134   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1135     prefix=$ac_optarg ;;
1136
1137   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1138   | --program-pre | --program-pr | --program-p)
1139     ac_prev=program_prefix ;;
1140   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1141   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1142     program_prefix=$ac_optarg ;;
1143
1144   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1145   | --program-suf | --program-su | --program-s)
1146     ac_prev=program_suffix ;;
1147   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1148   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1149     program_suffix=$ac_optarg ;;
1150
1151   -program-transform-name | --program-transform-name \
1152   | --program-transform-nam | --program-transform-na \
1153   | --program-transform-n | --program-transform- \
1154   | --program-transform | --program-transfor \
1155   | --program-transfo | --program-transf \
1156   | --program-trans | --program-tran \
1157   | --progr-tra | --program-tr | --program-t)
1158     ac_prev=program_transform_name ;;
1159   -program-transform-name=* | --program-transform-name=* \
1160   | --program-transform-nam=* | --program-transform-na=* \
1161   | --program-transform-n=* | --program-transform-=* \
1162   | --program-transform=* | --program-transfor=* \
1163   | --program-transfo=* | --program-transf=* \
1164   | --program-trans=* | --program-tran=* \
1165   | --progr-tra=* | --program-tr=* | --program-t=*)
1166     program_transform_name=$ac_optarg ;;
1167
1168   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1169     ac_prev=pdfdir ;;
1170   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1171     pdfdir=$ac_optarg ;;
1172
1173   -psdir | --psdir | --psdi | --psd | --ps)
1174     ac_prev=psdir ;;
1175   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1176     psdir=$ac_optarg ;;
1177
1178   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1179   | -silent | --silent | --silen | --sile | --sil)
1180     silent=yes ;;
1181
1182   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1183     ac_prev=sbindir ;;
1184   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1185   | --sbi=* | --sb=*)
1186     sbindir=$ac_optarg ;;
1187
1188   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1189   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1190   | --sharedst | --shareds | --shared | --share | --shar \
1191   | --sha | --sh)
1192     ac_prev=sharedstatedir ;;
1193   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1194   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1195   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1196   | --sha=* | --sh=*)
1197     sharedstatedir=$ac_optarg ;;
1198
1199   -site | --site | --sit)
1200     ac_prev=site ;;
1201   -site=* | --site=* | --sit=*)
1202     site=$ac_optarg ;;
1203
1204   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1205     ac_prev=srcdir ;;
1206   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1207     srcdir=$ac_optarg ;;
1208
1209   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1210   | --syscon | --sysco | --sysc | --sys | --sy)
1211     ac_prev=sysconfdir ;;
1212   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1213   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1214     sysconfdir=$ac_optarg ;;
1215
1216   -target | --target | --targe | --targ | --tar | --ta | --t)
1217     ac_prev=target_alias ;;
1218   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1219     target_alias=$ac_optarg ;;
1220
1221   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1222     verbose=yes ;;
1223
1224   -version | --version | --versio | --versi | --vers | -V)
1225     ac_init_version=: ;;
1226
1227   -with-* | --with-*)
1228     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1229     # Reject names that are not valid shell variable names.
1230     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1231       as_fn_error $? "invalid package name: $ac_useropt"
1232     ac_useropt_orig=$ac_useropt
1233     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1234     case $ac_user_opts in
1235       *"
1236 "with_$ac_useropt"
1237 "*) ;;
1238       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1239          ac_unrecognized_sep=', ';;
1240     esac
1241     eval with_$ac_useropt=\$ac_optarg ;;
1242
1243   -without-* | --without-*)
1244     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1245     # Reject names that are not valid shell variable names.
1246     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1247       as_fn_error $? "invalid package name: $ac_useropt"
1248     ac_useropt_orig=$ac_useropt
1249     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1250     case $ac_user_opts in
1251       *"
1252 "with_$ac_useropt"
1253 "*) ;;
1254       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1255          ac_unrecognized_sep=', ';;
1256     esac
1257     eval with_$ac_useropt=no ;;
1258
1259   --x)
1260     # Obsolete; use --with-x.
1261     with_x=yes ;;
1262
1263   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1264   | --x-incl | --x-inc | --x-in | --x-i)
1265     ac_prev=x_includes ;;
1266   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1267   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1268     x_includes=$ac_optarg ;;
1269
1270   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1271   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1272     ac_prev=x_libraries ;;
1273   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1274   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1275     x_libraries=$ac_optarg ;;
1276
1277   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1278 Try \`$0 --help' for more information"
1279     ;;
1280
1281   *=*)
1282     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1283     # Reject names that are not valid shell variable names.
1284     case $ac_envvar in #(
1285       '' | [0-9]* | *[!_$as_cr_alnum]* )
1286       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1287     esac
1288     eval $ac_envvar=\$ac_optarg
1289     export $ac_envvar ;;
1290
1291   *)
1292     # FIXME: should be removed in autoconf 3.0.
1293     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1294     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1295       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1296     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1297     ;;
1298
1299   esac
1300 done
1301
1302 if test -n "$ac_prev"; then
1303   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1304   as_fn_error $? "missing argument to $ac_option"
1305 fi
1306
1307 if test -n "$ac_unrecognized_opts"; then
1308   case $enable_option_checking in
1309     no) ;;
1310     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1311     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1312   esac
1313 fi
1314
1315 # Check all directory arguments for consistency.
1316 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1317                 datadir sysconfdir sharedstatedir localstatedir includedir \
1318                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1319                 libdir localedir mandir
1320 do
1321   eval ac_val=\$$ac_var
1322   # Remove trailing slashes.
1323   case $ac_val in
1324     */ )
1325       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1326       eval $ac_var=\$ac_val;;
1327   esac
1328   # Be sure to have absolute directory names.
1329   case $ac_val in
1330     [\\/$]* | ?:[\\/]* )  continue;;
1331     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1332   esac
1333   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1334 done
1335
1336 # There might be people who depend on the old broken behavior: `$host'
1337 # used to hold the argument of --host etc.
1338 # FIXME: To remove some day.
1339 build=$build_alias
1340 host=$host_alias
1341 target=$target_alias
1342
1343 # FIXME: To remove some day.
1344 if test "x$host_alias" != x; then
1345   if test "x$build_alias" = x; then
1346     cross_compiling=maybe
1347   elif test "x$build_alias" != "x$host_alias"; then
1348     cross_compiling=yes
1349   fi
1350 fi
1351
1352 ac_tool_prefix=
1353 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1354
1355 test "$silent" = yes && exec 6>/dev/null
1356
1357
1358 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1359 ac_ls_di=`ls -di .` &&
1360 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1361   as_fn_error $? "working directory cannot be determined"
1362 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1363   as_fn_error $? "pwd does not report name of working directory"
1364
1365
1366 # Find the source files, if location was not specified.
1367 if test -z "$srcdir"; then
1368   ac_srcdir_defaulted=yes
1369   # Try the directory containing this script, then the parent directory.
1370   ac_confdir=`$as_dirname -- "$as_myself" ||
1371 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1372          X"$as_myself" : 'X\(//\)[^/]' \| \
1373          X"$as_myself" : 'X\(//\)$' \| \
1374          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1375 $as_echo X"$as_myself" |
1376     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1377             s//\1/
1378             q
1379           }
1380           /^X\(\/\/\)[^/].*/{
1381             s//\1/
1382             q
1383           }
1384           /^X\(\/\/\)$/{
1385             s//\1/
1386             q
1387           }
1388           /^X\(\/\).*/{
1389             s//\1/
1390             q
1391           }
1392           s/.*/./; q'`
1393   srcdir=$ac_confdir
1394   if test ! -r "$srcdir/$ac_unique_file"; then
1395     srcdir=..
1396   fi
1397 else
1398   ac_srcdir_defaulted=no
1399 fi
1400 if test ! -r "$srcdir/$ac_unique_file"; then
1401   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1402   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1403 fi
1404 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1405 ac_abs_confdir=`(
1406         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1407         pwd)`
1408 # When building in place, set srcdir=.
1409 if test "$ac_abs_confdir" = "$ac_pwd"; then
1410   srcdir=.
1411 fi
1412 # Remove unnecessary trailing slashes from srcdir.
1413 # Double slashes in file names in object file debugging info
1414 # mess up M-x gdb in Emacs.
1415 case $srcdir in
1416 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1417 esac
1418 for ac_var in $ac_precious_vars; do
1419   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1420   eval ac_env_${ac_var}_value=\$${ac_var}
1421   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1422   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1423 done
1424
1425 #
1426 # Report the --help message.
1427 #
1428 if test "$ac_init_help" = "long"; then
1429   # Omit some internal or obsolete options to make the list less imposing.
1430   # This message is too long to be a string in the A/UX 3.1 sh.
1431   cat <<_ACEOF
1432 \`configure' configures PostgreSQL 12devel to adapt to many kinds of systems.
1433
1434 Usage: $0 [OPTION]... [VAR=VALUE]...
1435
1436 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1437 VAR=VALUE.  See below for descriptions of some of the useful variables.
1438
1439 Defaults for the options are specified in brackets.
1440
1441 Configuration:
1442   -h, --help              display this help and exit
1443       --help=short        display options specific to this package
1444       --help=recursive    display the short help of all the included packages
1445   -V, --version           display version information and exit
1446   -q, --quiet, --silent   do not print \`checking ...' messages
1447       --cache-file=FILE   cache test results in FILE [disabled]
1448   -C, --config-cache      alias for \`--cache-file=config.cache'
1449   -n, --no-create         do not create output files
1450       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1451
1452 Installation directories:
1453   --prefix=PREFIX         install architecture-independent files in PREFIX
1454                           [$ac_default_prefix]
1455   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1456                           [PREFIX]
1457
1458 By default, \`make install' will install all the files in
1459 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1460 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1461 for instance \`--prefix=\$HOME'.
1462
1463 For better control, use the options below.
1464
1465 Fine tuning of the installation directories:
1466   --bindir=DIR            user executables [EPREFIX/bin]
1467   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1468   --libexecdir=DIR        program executables [EPREFIX/libexec]
1469   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1470   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1471   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1472   --libdir=DIR            object code libraries [EPREFIX/lib]
1473   --includedir=DIR        C header files [PREFIX/include]
1474   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1475   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1476   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1477   --infodir=DIR           info documentation [DATAROOTDIR/info]
1478   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1479   --mandir=DIR            man documentation [DATAROOTDIR/man]
1480   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1481   --htmldir=DIR           html documentation [DOCDIR]
1482   --dvidir=DIR            dvi documentation [DOCDIR]
1483   --pdfdir=DIR            pdf documentation [DOCDIR]
1484   --psdir=DIR             ps documentation [DOCDIR]
1485 _ACEOF
1486
1487   cat <<\_ACEOF
1488
1489 System types:
1490   --build=BUILD     configure for building on BUILD [guessed]
1491   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1492 _ACEOF
1493 fi
1494
1495 if test -n "$ac_init_help"; then
1496   case $ac_init_help in
1497      short | recursive ) echo "Configuration of PostgreSQL 12devel:";;
1498    esac
1499   cat <<\_ACEOF
1500
1501 Optional Features:
1502   --disable-option-checking  ignore unrecognized --enable/--with options
1503   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1504   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1505   --disable-integer-datetimes
1506                           obsolete option, no longer supported
1507   --enable-nls[=LANGUAGES]
1508                           enable Native Language Support
1509   --disable-rpath         do not embed shared library search path in
1510                           executables
1511   --disable-spinlocks     do not use spinlocks
1512   --disable-atomics       do not use atomic operations
1513   --disable-strong-random do not use a strong random number source
1514   --enable-debug          build with debugging symbols (-g)
1515   --enable-profiling      build with profiling enabled
1516   --enable-coverage       build with coverage testing instrumentation
1517   --enable-dtrace         build with DTrace support
1518   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1519   --enable-depend         turn on automatic dependency tracking
1520   --enable-cassert        enable assertion checks (for debugging)
1521   --disable-thread-safety disable thread-safety in client libraries
1522   --disable-largefile     omit support for large files
1523   --disable-float4-byval  disable float4 passed by value
1524   --disable-float8-byval  disable float8 passed by value
1525
1526 Optional Packages:
1527   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1528   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1529   --with-extra-version=STRING
1530                           append STRING to version
1531   --with-template=NAME    override operating system template
1532   --with-includes=DIRS    look for additional header files in DIRS
1533   --with-libraries=DIRS   look for additional libraries in DIRS
1534   --with-libs=DIRS        alternative spelling of --with-libraries
1535   --with-pgport=PORTNUM   set default port number [5432]
1536   --with-blocksize=BLOCKSIZE
1537                           set table block size in kB [8]
1538   --with-segsize=SEGSIZE  set table segment size in GB [1]
1539   --with-wal-blocksize=BLOCKSIZE
1540                           set WAL block size in kB [8]
1541   --with-CC=CMD           set compiler (deprecated)
1542   --with-llvm             build with LLVM based JIT support
1543   --with-icu              build with ICU support
1544   --with-tcl              build Tcl modules (PL/Tcl)
1545   --with-tclconfig=DIR    tclConfig.sh is in DIR
1546   --with-perl             build Perl modules (PL/Perl)
1547   --with-python           build Python modules (PL/Python)
1548   --with-gssapi           build with GSSAPI support
1549   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1550                           [postgres]
1551   --with-pam              build with PAM support
1552   --with-bsd-auth         build with BSD Authentication support
1553   --with-ldap             build with LDAP support
1554   --with-bonjour          build with Bonjour support
1555   --with-openssl          build with OpenSSL support
1556   --with-selinux          build with SELinux support
1557   --with-systemd          build with systemd support
1558   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1559   --with-libedit-preferred
1560                           prefer BSD Libedit over GNU Readline
1561   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1562   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1563   --with-libxml           build with XML support
1564   --with-libxslt          use XSLT support when building contrib/xml2
1565   --with-system-tzdata=DIR
1566                           use system time zone data in DIR
1567   --without-zlib          do not use Zlib
1568   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1569
1570 Some influential environment variables:
1571   CC          C compiler command
1572   CFLAGS      C compiler flags
1573   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1574               nonstandard directory <lib dir>
1575   LIBS        libraries to pass to the linker, e.g. -l<library>
1576   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1577               you have headers in a nonstandard directory <include dir>
1578   CXX         C++ compiler command
1579   CXXFLAGS    C++ compiler flags
1580   LLVM_CONFIG path to llvm-config command
1581   CLANG       path to clang compiler to generate bitcode
1582   CPP         C preprocessor
1583   PKG_CONFIG  path to pkg-config utility
1584   PKG_CONFIG_PATH
1585               directories to add to pkg-config's search path
1586   PKG_CONFIG_LIBDIR
1587               path overriding pkg-config's built-in search path
1588   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1589   ICU_LIBS    linker flags for ICU, overriding pkg-config
1590   LDFLAGS_EX  extra linker flags for linking executables only
1591   LDFLAGS_SL  extra linker flags for linking shared libraries only
1592
1593 Use these variables to override the choices made by `configure' or to help
1594 it to find libraries and programs with nonstandard names/locations.
1595
1596 Report bugs to <pgsql-bugs@postgresql.org>.
1597 _ACEOF
1598 ac_status=$?
1599 fi
1600
1601 if test "$ac_init_help" = "recursive"; then
1602   # If there are subdirs, report their specific --help.
1603   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1604     test -d "$ac_dir" ||
1605       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1606       continue
1607     ac_builddir=.
1608
1609 case "$ac_dir" in
1610 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1611 *)
1612   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1613   # A ".." for each directory in $ac_dir_suffix.
1614   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1615   case $ac_top_builddir_sub in
1616   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1617   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1618   esac ;;
1619 esac
1620 ac_abs_top_builddir=$ac_pwd
1621 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1622 # for backward compatibility:
1623 ac_top_builddir=$ac_top_build_prefix
1624
1625 case $srcdir in
1626   .)  # We are building in place.
1627     ac_srcdir=.
1628     ac_top_srcdir=$ac_top_builddir_sub
1629     ac_abs_top_srcdir=$ac_pwd ;;
1630   [\\/]* | ?:[\\/]* )  # Absolute name.
1631     ac_srcdir=$srcdir$ac_dir_suffix;
1632     ac_top_srcdir=$srcdir
1633     ac_abs_top_srcdir=$srcdir ;;
1634   *) # Relative name.
1635     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1636     ac_top_srcdir=$ac_top_build_prefix$srcdir
1637     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1638 esac
1639 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1640
1641     cd "$ac_dir" || { ac_status=$?; continue; }
1642     # Check for guested configure.
1643     if test -f "$ac_srcdir/configure.gnu"; then
1644       echo &&
1645       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1646     elif test -f "$ac_srcdir/configure"; then
1647       echo &&
1648       $SHELL "$ac_srcdir/configure" --help=recursive
1649     else
1650       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1651     fi || ac_status=$?
1652     cd "$ac_pwd" || { ac_status=$?; break; }
1653   done
1654 fi
1655
1656 test -n "$ac_init_help" && exit $ac_status
1657 if $ac_init_version; then
1658   cat <<\_ACEOF
1659 PostgreSQL configure 12devel
1660 generated by GNU Autoconf 2.69
1661
1662 Copyright (C) 2012 Free Software Foundation, Inc.
1663 This configure script is free software; the Free Software Foundation
1664 gives unlimited permission to copy, distribute and modify it.
1665
1666 Copyright (c) 1996-2018, PostgreSQL Global Development Group
1667 _ACEOF
1668   exit
1669 fi
1670
1671 ## ------------------------ ##
1672 ## Autoconf initialization. ##
1673 ## ------------------------ ##
1674
1675 # ac_fn_c_try_compile LINENO
1676 # --------------------------
1677 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1678 ac_fn_c_try_compile ()
1679 {
1680   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1681   rm -f conftest.$ac_objext
1682   if { { ac_try="$ac_compile"
1683 case "(($ac_try" in
1684   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685   *) ac_try_echo=$ac_try;;
1686 esac
1687 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688 $as_echo "$ac_try_echo"; } >&5
1689   (eval "$ac_compile") 2>conftest.err
1690   ac_status=$?
1691   if test -s conftest.err; then
1692     grep -v '^ *+' conftest.err >conftest.er1
1693     cat conftest.er1 >&5
1694     mv -f conftest.er1 conftest.err
1695   fi
1696   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697   test $ac_status = 0; } && {
1698          test -z "$ac_c_werror_flag" ||
1699          test ! -s conftest.err
1700        } && test -s conftest.$ac_objext; then :
1701   ac_retval=0
1702 else
1703   $as_echo "$as_me: failed program was:" >&5
1704 sed 's/^/| /' conftest.$ac_ext >&5
1705
1706         ac_retval=1
1707 fi
1708   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709   as_fn_set_status $ac_retval
1710
1711 } # ac_fn_c_try_compile
1712
1713 # ac_fn_cxx_try_compile LINENO
1714 # ----------------------------
1715 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1716 ac_fn_cxx_try_compile ()
1717 {
1718   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719   rm -f conftest.$ac_objext
1720   if { { ac_try="$ac_compile"
1721 case "(($ac_try" in
1722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723   *) ac_try_echo=$ac_try;;
1724 esac
1725 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726 $as_echo "$ac_try_echo"; } >&5
1727   (eval "$ac_compile") 2>conftest.err
1728   ac_status=$?
1729   if test -s conftest.err; then
1730     grep -v '^ *+' conftest.err >conftest.er1
1731     cat conftest.er1 >&5
1732     mv -f conftest.er1 conftest.err
1733   fi
1734   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735   test $ac_status = 0; } && {
1736          test -z "$ac_cxx_werror_flag" ||
1737          test ! -s conftest.err
1738        } && test -s conftest.$ac_objext; then :
1739   ac_retval=0
1740 else
1741   $as_echo "$as_me: failed program was:" >&5
1742 sed 's/^/| /' conftest.$ac_ext >&5
1743
1744         ac_retval=1
1745 fi
1746   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1747   as_fn_set_status $ac_retval
1748
1749 } # ac_fn_cxx_try_compile
1750
1751 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1752 # ---------------------------------------------
1753 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1754 # accordingly.
1755 ac_fn_c_check_decl ()
1756 {
1757   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1758   as_decl_name=`echo $2|sed 's/ *(.*//'`
1759   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1761 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1762 if eval \${$3+:} false; then :
1763   $as_echo_n "(cached) " >&6
1764 else
1765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1766 /* end confdefs.h.  */
1767 $4
1768 int
1769 main ()
1770 {
1771 #ifndef $as_decl_name
1772 #ifdef __cplusplus
1773   (void) $as_decl_use;
1774 #else
1775   (void) $as_decl_name;
1776 #endif
1777 #endif
1778
1779   ;
1780   return 0;
1781 }
1782 _ACEOF
1783 if ac_fn_c_try_compile "$LINENO"; then :
1784   eval "$3=yes"
1785 else
1786   eval "$3=no"
1787 fi
1788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1789 fi
1790 eval ac_res=\$$3
1791                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1792 $as_echo "$ac_res" >&6; }
1793   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1794
1795 } # ac_fn_c_check_decl
1796
1797 # ac_fn_c_try_link LINENO
1798 # -----------------------
1799 # Try to link conftest.$ac_ext, and return whether this succeeded.
1800 ac_fn_c_try_link ()
1801 {
1802   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1803   rm -f conftest.$ac_objext conftest$ac_exeext
1804   if { { ac_try="$ac_link"
1805 case "(($ac_try" in
1806   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1807   *) ac_try_echo=$ac_try;;
1808 esac
1809 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1810 $as_echo "$ac_try_echo"; } >&5
1811   (eval "$ac_link") 2>conftest.err
1812   ac_status=$?
1813   if test -s conftest.err; then
1814     grep -v '^ *+' conftest.err >conftest.er1
1815     cat conftest.er1 >&5
1816     mv -f conftest.er1 conftest.err
1817   fi
1818   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1819   test $ac_status = 0; } && {
1820          test -z "$ac_c_werror_flag" ||
1821          test ! -s conftest.err
1822        } && test -s conftest$ac_exeext && {
1823          test "$cross_compiling" = yes ||
1824          test -x conftest$ac_exeext
1825        }; then :
1826   ac_retval=0
1827 else
1828   $as_echo "$as_me: failed program was:" >&5
1829 sed 's/^/| /' conftest.$ac_ext >&5
1830
1831         ac_retval=1
1832 fi
1833   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1834   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1835   # interfere with the next link command; also delete a directory that is
1836   # left behind by Apple's compiler.  We do this before executing the actions.
1837   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1838   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1839   as_fn_set_status $ac_retval
1840
1841 } # ac_fn_c_try_link
1842
1843 # ac_fn_c_try_cpp LINENO
1844 # ----------------------
1845 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1846 ac_fn_c_try_cpp ()
1847 {
1848   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1849   if { { ac_try="$ac_cpp conftest.$ac_ext"
1850 case "(($ac_try" in
1851   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1852   *) ac_try_echo=$ac_try;;
1853 esac
1854 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1855 $as_echo "$ac_try_echo"; } >&5
1856   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1857   ac_status=$?
1858   if test -s conftest.err; then
1859     grep -v '^ *+' conftest.err >conftest.er1
1860     cat conftest.er1 >&5
1861     mv -f conftest.er1 conftest.err
1862   fi
1863   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1864   test $ac_status = 0; } > conftest.i && {
1865          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1866          test ! -s conftest.err
1867        }; then :
1868   ac_retval=0
1869 else
1870   $as_echo "$as_me: failed program was:" >&5
1871 sed 's/^/| /' conftest.$ac_ext >&5
1872
1873     ac_retval=1
1874 fi
1875   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1876   as_fn_set_status $ac_retval
1877
1878 } # ac_fn_c_try_cpp
1879
1880 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1881 # -------------------------------------------------------
1882 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1883 # the include files in INCLUDES and setting the cache variable VAR
1884 # accordingly.
1885 ac_fn_c_check_header_mongrel ()
1886 {
1887   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1888   if eval \${$3+:} false; then :
1889   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1890 $as_echo_n "checking for $2... " >&6; }
1891 if eval \${$3+:} false; then :
1892   $as_echo_n "(cached) " >&6
1893 fi
1894 eval ac_res=\$$3
1895                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1896 $as_echo "$ac_res" >&6; }
1897 else
1898   # Is the header compilable?
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1900 $as_echo_n "checking $2 usability... " >&6; }
1901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1902 /* end confdefs.h.  */
1903 $4
1904 #include <$2>
1905 _ACEOF
1906 if ac_fn_c_try_compile "$LINENO"; then :
1907   ac_header_compiler=yes
1908 else
1909   ac_header_compiler=no
1910 fi
1911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1913 $as_echo "$ac_header_compiler" >&6; }
1914
1915 # Is the header present?
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1917 $as_echo_n "checking $2 presence... " >&6; }
1918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1919 /* end confdefs.h.  */
1920 #include <$2>
1921 _ACEOF
1922 if ac_fn_c_try_cpp "$LINENO"; then :
1923   ac_header_preproc=yes
1924 else
1925   ac_header_preproc=no
1926 fi
1927 rm -f conftest.err conftest.i conftest.$ac_ext
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1929 $as_echo "$ac_header_preproc" >&6; }
1930
1931 # So?  What about this header?
1932 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1933   yes:no: )
1934     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1935 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1936     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1937 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1938     ;;
1939   no:yes:* )
1940     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1941 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1942     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1943 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1944     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1945 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1946     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1947 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1948     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1949 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1950 ( $as_echo "## ---------------------------------------- ##
1951 ## Report this to pgsql-bugs@postgresql.org ##
1952 ## ---------------------------------------- ##"
1953      ) | sed "s/^/$as_me: WARNING:     /" >&2
1954     ;;
1955 esac
1956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1957 $as_echo_n "checking for $2... " >&6; }
1958 if eval \${$3+:} false; then :
1959   $as_echo_n "(cached) " >&6
1960 else
1961   eval "$3=\$ac_header_compiler"
1962 fi
1963 eval ac_res=\$$3
1964                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1965 $as_echo "$ac_res" >&6; }
1966 fi
1967   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1968
1969 } # ac_fn_c_check_header_mongrel
1970
1971 # ac_fn_c_try_run LINENO
1972 # ----------------------
1973 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1974 # that executables *can* be run.
1975 ac_fn_c_try_run ()
1976 {
1977   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1978   if { { ac_try="$ac_link"
1979 case "(($ac_try" in
1980   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1981   *) ac_try_echo=$ac_try;;
1982 esac
1983 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1984 $as_echo "$ac_try_echo"; } >&5
1985   (eval "$ac_link") 2>&5
1986   ac_status=$?
1987   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1988   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1989   { { case "(($ac_try" in
1990   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1991   *) ac_try_echo=$ac_try;;
1992 esac
1993 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1994 $as_echo "$ac_try_echo"; } >&5
1995   (eval "$ac_try") 2>&5
1996   ac_status=$?
1997   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1998   test $ac_status = 0; }; }; then :
1999   ac_retval=0
2000 else
2001   $as_echo "$as_me: program exited with status $ac_status" >&5
2002        $as_echo "$as_me: failed program was:" >&5
2003 sed 's/^/| /' conftest.$ac_ext >&5
2004
2005        ac_retval=$ac_status
2006 fi
2007   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2008   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2009   as_fn_set_status $ac_retval
2010
2011 } # ac_fn_c_try_run
2012
2013 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2014 # -------------------------------------------------------
2015 # Tests whether HEADER exists and can be compiled using the include files in
2016 # INCLUDES, setting the cache variable VAR accordingly.
2017 ac_fn_c_check_header_compile ()
2018 {
2019   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2020   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2021 $as_echo_n "checking for $2... " >&6; }
2022 if eval \${$3+:} false; then :
2023   $as_echo_n "(cached) " >&6
2024 else
2025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026 /* end confdefs.h.  */
2027 $4
2028 #include <$2>
2029 _ACEOF
2030 if ac_fn_c_try_compile "$LINENO"; then :
2031   eval "$3=yes"
2032 else
2033   eval "$3=no"
2034 fi
2035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036 fi
2037 eval ac_res=\$$3
2038                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2039 $as_echo "$ac_res" >&6; }
2040   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2041
2042 } # ac_fn_c_check_header_compile
2043
2044 # ac_fn_c_check_func LINENO FUNC VAR
2045 # ----------------------------------
2046 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2047 ac_fn_c_check_func ()
2048 {
2049   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2050   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2051 $as_echo_n "checking for $2... " >&6; }
2052 if eval \${$3+:} false; then :
2053   $as_echo_n "(cached) " >&6
2054 else
2055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056 /* end confdefs.h.  */
2057 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2058    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2059 #define $2 innocuous_$2
2060
2061 /* System header to define __stub macros and hopefully few prototypes,
2062     which can conflict with char $2 (); below.
2063     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2064     <limits.h> exists even on freestanding compilers.  */
2065
2066 #ifdef __STDC__
2067 # include <limits.h>
2068 #else
2069 # include <assert.h>
2070 #endif
2071
2072 #undef $2
2073
2074 /* Override any GCC internal prototype to avoid an error.
2075    Use char because int might match the return type of a GCC
2076    builtin and then its argument prototype would still apply.  */
2077 #ifdef __cplusplus
2078 extern "C"
2079 #endif
2080 char $2 ();
2081 /* The GNU C library defines this for functions which it implements
2082     to always fail with ENOSYS.  Some functions are actually named
2083     something starting with __ and the normal name is an alias.  */
2084 #if defined __stub_$2 || defined __stub___$2
2085 choke me
2086 #endif
2087
2088 int
2089 main ()
2090 {
2091 return $2 ();
2092   ;
2093   return 0;
2094 }
2095 _ACEOF
2096 if ac_fn_c_try_link "$LINENO"; then :
2097   eval "$3=yes"
2098 else
2099   eval "$3=no"
2100 fi
2101 rm -f core conftest.err conftest.$ac_objext \
2102     conftest$ac_exeext conftest.$ac_ext
2103 fi
2104 eval ac_res=\$$3
2105                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2106 $as_echo "$ac_res" >&6; }
2107   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2108
2109 } # ac_fn_c_check_func
2110
2111 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2112 # -------------------------------------------
2113 # Tests whether TYPE exists after having included INCLUDES, setting cache
2114 # variable VAR accordingly.
2115 ac_fn_c_check_type ()
2116 {
2117   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2118   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2119 $as_echo_n "checking for $2... " >&6; }
2120 if eval \${$3+:} false; then :
2121   $as_echo_n "(cached) " >&6
2122 else
2123   eval "$3=no"
2124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125 /* end confdefs.h.  */
2126 $4
2127 int
2128 main ()
2129 {
2130 if (sizeof ($2))
2131          return 0;
2132   ;
2133   return 0;
2134 }
2135 _ACEOF
2136 if ac_fn_c_try_compile "$LINENO"; then :
2137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138 /* end confdefs.h.  */
2139 $4
2140 int
2141 main ()
2142 {
2143 if (sizeof (($2)))
2144             return 0;
2145   ;
2146   return 0;
2147 }
2148 _ACEOF
2149 if ac_fn_c_try_compile "$LINENO"; then :
2150
2151 else
2152   eval "$3=yes"
2153 fi
2154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155 fi
2156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157 fi
2158 eval ac_res=\$$3
2159                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2160 $as_echo "$ac_res" >&6; }
2161   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2162
2163 } # ac_fn_c_check_type
2164
2165 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2166 # ----------------------------------------------------
2167 # Tries to find if the field MEMBER exists in type AGGR, after including
2168 # INCLUDES, setting cache variable VAR accordingly.
2169 ac_fn_c_check_member ()
2170 {
2171   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2173 $as_echo_n "checking for $2.$3... " >&6; }
2174 if eval \${$4+:} false; then :
2175   $as_echo_n "(cached) " >&6
2176 else
2177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178 /* end confdefs.h.  */
2179 $5
2180 int
2181 main ()
2182 {
2183 static $2 ac_aggr;
2184 if (ac_aggr.$3)
2185 return 0;
2186   ;
2187   return 0;
2188 }
2189 _ACEOF
2190 if ac_fn_c_try_compile "$LINENO"; then :
2191   eval "$4=yes"
2192 else
2193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194 /* end confdefs.h.  */
2195 $5
2196 int
2197 main ()
2198 {
2199 static $2 ac_aggr;
2200 if (sizeof ac_aggr.$3)
2201 return 0;
2202   ;
2203   return 0;
2204 }
2205 _ACEOF
2206 if ac_fn_c_try_compile "$LINENO"; then :
2207   eval "$4=yes"
2208 else
2209   eval "$4=no"
2210 fi
2211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2212 fi
2213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214 fi
2215 eval ac_res=\$$4
2216                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2217 $as_echo "$ac_res" >&6; }
2218   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2219
2220 } # ac_fn_c_check_member
2221
2222 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2223 # --------------------------------------------
2224 # Tries to find the compile-time value of EXPR in a program that includes
2225 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2226 # computed
2227 ac_fn_c_compute_int ()
2228 {
2229   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2230   if test "$cross_compiling" = yes; then
2231     # Depending upon the size, compute the lo and hi bounds.
2232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233 /* end confdefs.h.  */
2234 $4
2235 int
2236 main ()
2237 {
2238 static int test_array [1 - 2 * !(($2) >= 0)];
2239 test_array [0] = 0;
2240 return test_array [0];
2241
2242   ;
2243   return 0;
2244 }
2245 _ACEOF
2246 if ac_fn_c_try_compile "$LINENO"; then :
2247   ac_lo=0 ac_mid=0
2248   while :; do
2249     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250 /* end confdefs.h.  */
2251 $4
2252 int
2253 main ()
2254 {
2255 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2256 test_array [0] = 0;
2257 return test_array [0];
2258
2259   ;
2260   return 0;
2261 }
2262 _ACEOF
2263 if ac_fn_c_try_compile "$LINENO"; then :
2264   ac_hi=$ac_mid; break
2265 else
2266   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2267                         if test $ac_lo -le $ac_mid; then
2268                           ac_lo= ac_hi=
2269                           break
2270                         fi
2271                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2272 fi
2273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2274   done
2275 else
2276   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277 /* end confdefs.h.  */
2278 $4
2279 int
2280 main ()
2281 {
2282 static int test_array [1 - 2 * !(($2) < 0)];
2283 test_array [0] = 0;
2284 return test_array [0];
2285
2286   ;
2287   return 0;
2288 }
2289 _ACEOF
2290 if ac_fn_c_try_compile "$LINENO"; then :
2291   ac_hi=-1 ac_mid=-1
2292   while :; do
2293     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294 /* end confdefs.h.  */
2295 $4
2296 int
2297 main ()
2298 {
2299 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2300 test_array [0] = 0;
2301 return test_array [0];
2302
2303   ;
2304   return 0;
2305 }
2306 _ACEOF
2307 if ac_fn_c_try_compile "$LINENO"; then :
2308   ac_lo=$ac_mid; break
2309 else
2310   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2311                         if test $ac_mid -le $ac_hi; then
2312                           ac_lo= ac_hi=
2313                           break
2314                         fi
2315                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2316 fi
2317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318   done
2319 else
2320   ac_lo= ac_hi=
2321 fi
2322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323 fi
2324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325 # Binary search between lo and hi bounds.
2326 while test "x$ac_lo" != "x$ac_hi"; do
2327   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2328   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329 /* end confdefs.h.  */
2330 $4
2331 int
2332 main ()
2333 {
2334 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2335 test_array [0] = 0;
2336 return test_array [0];
2337
2338   ;
2339   return 0;
2340 }
2341 _ACEOF
2342 if ac_fn_c_try_compile "$LINENO"; then :
2343   ac_hi=$ac_mid
2344 else
2345   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2346 fi
2347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348 done
2349 case $ac_lo in #((
2350 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2351 '') ac_retval=1 ;;
2352 esac
2353   else
2354     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355 /* end confdefs.h.  */
2356 $4
2357 static long int longval () { return $2; }
2358 static unsigned long int ulongval () { return $2; }
2359 #include <stdio.h>
2360 #include <stdlib.h>
2361 int
2362 main ()
2363 {
2364
2365   FILE *f = fopen ("conftest.val", "w");
2366   if (! f)
2367     return 1;
2368   if (($2) < 0)
2369     {
2370       long int i = longval ();
2371       if (i != ($2))
2372         return 1;
2373       fprintf (f, "%ld", i);
2374     }
2375   else
2376     {
2377       unsigned long int i = ulongval ();
2378       if (i != ($2))
2379         return 1;
2380       fprintf (f, "%lu", i);
2381     }
2382   /* Do not output a trailing newline, as this causes \r\n confusion
2383      on some platforms.  */
2384   return ferror (f) || fclose (f) != 0;
2385
2386   ;
2387   return 0;
2388 }
2389 _ACEOF
2390 if ac_fn_c_try_run "$LINENO"; then :
2391   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2392 else
2393   ac_retval=1
2394 fi
2395 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2396   conftest.$ac_objext conftest.beam conftest.$ac_ext
2397 rm -f conftest.val
2398
2399   fi
2400   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2401   as_fn_set_status $ac_retval
2402
2403 } # ac_fn_c_compute_int
2404 cat >config.log <<_ACEOF
2405 This file contains any messages produced by compilers while
2406 running configure, to aid debugging if configure makes a mistake.
2407
2408 It was created by PostgreSQL $as_me 12devel, which was
2409 generated by GNU Autoconf 2.69.  Invocation command line was
2410
2411   $ $0 $@
2412
2413 _ACEOF
2414 exec 5>>config.log
2415 {
2416 cat <<_ASUNAME
2417 ## --------- ##
2418 ## Platform. ##
2419 ## --------- ##
2420
2421 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2422 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2423 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2424 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2425 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2426
2427 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2428 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2429
2430 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2431 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2432 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2433 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2434 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2435 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2436 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2437
2438 _ASUNAME
2439
2440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2441 for as_dir in $PATH
2442 do
2443   IFS=$as_save_IFS
2444   test -z "$as_dir" && as_dir=.
2445     $as_echo "PATH: $as_dir"
2446   done
2447 IFS=$as_save_IFS
2448
2449 } >&5
2450
2451 cat >&5 <<_ACEOF
2452
2453
2454 ## ----------- ##
2455 ## Core tests. ##
2456 ## ----------- ##
2457
2458 _ACEOF
2459
2460
2461 # Keep a trace of the command line.
2462 # Strip out --no-create and --no-recursion so they do not pile up.
2463 # Strip out --silent because we don't want to record it for future runs.
2464 # Also quote any args containing shell meta-characters.
2465 # Make two passes to allow for proper duplicate-argument suppression.
2466 ac_configure_args=
2467 ac_configure_args0=
2468 ac_configure_args1=
2469 ac_must_keep_next=false
2470 for ac_pass in 1 2
2471 do
2472   for ac_arg
2473   do
2474     case $ac_arg in
2475     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2476     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2477     | -silent | --silent | --silen | --sile | --sil)
2478       continue ;;
2479     *\'*)
2480       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2481     esac
2482     case $ac_pass in
2483     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2484     2)
2485       as_fn_append ac_configure_args1 " '$ac_arg'"
2486       if test $ac_must_keep_next = true; then
2487         ac_must_keep_next=false # Got value, back to normal.
2488       else
2489         case $ac_arg in
2490           *=* | --config-cache | -C | -disable-* | --disable-* \
2491           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2492           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2493           | -with-* | --with-* | -without-* | --without-* | --x)
2494             case "$ac_configure_args0 " in
2495               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2496             esac
2497             ;;
2498           -* ) ac_must_keep_next=true ;;
2499         esac
2500       fi
2501       as_fn_append ac_configure_args " '$ac_arg'"
2502       ;;
2503     esac
2504   done
2505 done
2506 { ac_configure_args0=; unset ac_configure_args0;}
2507 { ac_configure_args1=; unset ac_configure_args1;}
2508
2509 # When interrupted or exit'd, cleanup temporary files, and complete
2510 # config.log.  We remove comments because anyway the quotes in there
2511 # would cause problems or look ugly.
2512 # WARNING: Use '\'' to represent an apostrophe within the trap.
2513 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2514 trap 'exit_status=$?
2515   # Save into config.log some information that might help in debugging.
2516   {
2517     echo
2518
2519     $as_echo "## ---------------- ##
2520 ## Cache variables. ##
2521 ## ---------------- ##"
2522     echo
2523     # The following way of writing the cache mishandles newlines in values,
2524 (
2525   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2526     eval ac_val=\$$ac_var
2527     case $ac_val in #(
2528     *${as_nl}*)
2529       case $ac_var in #(
2530       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2531 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2532       esac
2533       case $ac_var in #(
2534       _ | IFS | as_nl) ;; #(
2535       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2536       *) { eval $ac_var=; unset $ac_var;} ;;
2537       esac ;;
2538     esac
2539   done
2540   (set) 2>&1 |
2541     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2542     *${as_nl}ac_space=\ *)
2543       sed -n \
2544         "s/'\''/'\''\\\\'\'''\''/g;
2545           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2546       ;; #(
2547     *)
2548       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2549       ;;
2550     esac |
2551     sort
2552 )
2553     echo
2554
2555     $as_echo "## ----------------- ##
2556 ## Output variables. ##
2557 ## ----------------- ##"
2558     echo
2559     for ac_var in $ac_subst_vars
2560     do
2561       eval ac_val=\$$ac_var
2562       case $ac_val in
2563       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2564       esac
2565       $as_echo "$ac_var='\''$ac_val'\''"
2566     done | sort
2567     echo
2568
2569     if test -n "$ac_subst_files"; then
2570       $as_echo "## ------------------- ##
2571 ## File substitutions. ##
2572 ## ------------------- ##"
2573       echo
2574       for ac_var in $ac_subst_files
2575       do
2576         eval ac_val=\$$ac_var
2577         case $ac_val in
2578         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2579         esac
2580         $as_echo "$ac_var='\''$ac_val'\''"
2581       done | sort
2582       echo
2583     fi
2584
2585     if test -s confdefs.h; then
2586       $as_echo "## ----------- ##
2587 ## confdefs.h. ##
2588 ## ----------- ##"
2589       echo
2590       cat confdefs.h
2591       echo
2592     fi
2593     test "$ac_signal" != 0 &&
2594       $as_echo "$as_me: caught signal $ac_signal"
2595     $as_echo "$as_me: exit $exit_status"
2596   } >&5
2597   rm -f core *.core core.conftest.* &&
2598     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2599     exit $exit_status
2600 ' 0
2601 for ac_signal in 1 2 13 15; do
2602   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2603 done
2604 ac_signal=0
2605
2606 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2607 rm -f -r conftest* confdefs.h
2608
2609 $as_echo "/* confdefs.h */" > confdefs.h
2610
2611 # Predefined preprocessor variables.
2612
2613 cat >>confdefs.h <<_ACEOF
2614 #define PACKAGE_NAME "$PACKAGE_NAME"
2615 _ACEOF
2616
2617 cat >>confdefs.h <<_ACEOF
2618 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2619 _ACEOF
2620
2621 cat >>confdefs.h <<_ACEOF
2622 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2623 _ACEOF
2624
2625 cat >>confdefs.h <<_ACEOF
2626 #define PACKAGE_STRING "$PACKAGE_STRING"
2627 _ACEOF
2628
2629 cat >>confdefs.h <<_ACEOF
2630 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2631 _ACEOF
2632
2633 cat >>confdefs.h <<_ACEOF
2634 #define PACKAGE_URL "$PACKAGE_URL"
2635 _ACEOF
2636
2637
2638 # Let the site file select an alternate cache file if it wants to.
2639 # Prefer an explicitly selected file to automatically selected ones.
2640 ac_site_file1=NONE
2641 ac_site_file2=NONE
2642 if test -n "$CONFIG_SITE"; then
2643   # We do not want a PATH search for config.site.
2644   case $CONFIG_SITE in #((
2645     -*)  ac_site_file1=./$CONFIG_SITE;;
2646     */*) ac_site_file1=$CONFIG_SITE;;
2647     *)   ac_site_file1=./$CONFIG_SITE;;
2648   esac
2649 elif test "x$prefix" != xNONE; then
2650   ac_site_file1=$prefix/share/config.site
2651   ac_site_file2=$prefix/etc/config.site
2652 else
2653   ac_site_file1=$ac_default_prefix/share/config.site
2654   ac_site_file2=$ac_default_prefix/etc/config.site
2655 fi
2656 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2657 do
2658   test "x$ac_site_file" = xNONE && continue
2659   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2660     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2661 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2662     sed 's/^/| /' "$ac_site_file" >&5
2663     . "$ac_site_file" \
2664       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 as_fn_error $? "failed to load site script $ac_site_file
2667 See \`config.log' for more details" "$LINENO" 5; }
2668   fi
2669 done
2670
2671 if test -r "$cache_file"; then
2672   # Some versions of bash will fail to source /dev/null (special files
2673   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2674   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2675     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2676 $as_echo "$as_me: loading cache $cache_file" >&6;}
2677     case $cache_file in
2678       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2679       *)                      . "./$cache_file";;
2680     esac
2681   fi
2682 else
2683   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2684 $as_echo "$as_me: creating cache $cache_file" >&6;}
2685   >$cache_file
2686 fi
2687
2688 # Check that the precious variables saved in the cache have kept the same
2689 # value.
2690 ac_cache_corrupted=false
2691 for ac_var in $ac_precious_vars; do
2692   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2693   eval ac_new_set=\$ac_env_${ac_var}_set
2694   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2695   eval ac_new_val=\$ac_env_${ac_var}_value
2696   case $ac_old_set,$ac_new_set in
2697     set,)
2698       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2699 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2700       ac_cache_corrupted=: ;;
2701     ,set)
2702       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2703 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2704       ac_cache_corrupted=: ;;
2705     ,);;
2706     *)
2707       if test "x$ac_old_val" != "x$ac_new_val"; then
2708         # differences in whitespace do not lead to failure.
2709         ac_old_val_w=`echo x $ac_old_val`
2710         ac_new_val_w=`echo x $ac_new_val`
2711         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2712           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2713 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2714           ac_cache_corrupted=:
2715         else
2716           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2717 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2718           eval $ac_var=\$ac_old_val
2719         fi
2720         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2721 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2722         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2723 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2724       fi;;
2725   esac
2726   # Pass precious variables to config.status.
2727   if test "$ac_new_set" = set; then
2728     case $ac_new_val in
2729     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2730     *) ac_arg=$ac_var=$ac_new_val ;;
2731     esac
2732     case " $ac_configure_args " in
2733       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2734       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2735     esac
2736   fi
2737 done
2738 if $ac_cache_corrupted; then
2739   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2740 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2741   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2742 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2743   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2744 fi
2745 ## -------------------- ##
2746 ## Main body of script. ##
2747 ## -------------------- ##
2748
2749 ac_ext=c
2750 ac_cpp='$CPP $CPPFLAGS'
2751 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2752 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2753 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2754
2755
2756
2757
2758
2759
2760 ac_aux_dir=
2761 for ac_dir in config "$srcdir"/config; do
2762   if test -f "$ac_dir/install-sh"; then
2763     ac_aux_dir=$ac_dir
2764     ac_install_sh="$ac_aux_dir/install-sh -c"
2765     break
2766   elif test -f "$ac_dir/install.sh"; then
2767     ac_aux_dir=$ac_dir
2768     ac_install_sh="$ac_aux_dir/install.sh -c"
2769     break
2770   elif test -f "$ac_dir/shtool"; then
2771     ac_aux_dir=$ac_dir
2772     ac_install_sh="$ac_aux_dir/shtool install -c"
2773     break
2774   fi
2775 done
2776 if test -z "$ac_aux_dir"; then
2777   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2778 fi
2779
2780 # These three variables are undocumented and unsupported,
2781 # and are intended to be withdrawn in a future Autoconf release.
2782 # They can cause serious problems if a builder's source tree is in a directory
2783 # whose full name contains unusual characters.
2784 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2785 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2786 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2787
2788
2789
2790 configure_args=$ac_configure_args
2791
2792
2793 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2794
2795
2796 cat >>confdefs.h <<_ACEOF
2797 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2798 _ACEOF
2799
2800
2801
2802
2803
2804 # Check whether --with-extra-version was given.
2805 if test "${with_extra_version+set}" = set; then :
2806   withval=$with_extra_version;
2807   case $withval in
2808     yes)
2809       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2810       ;;
2811     no)
2812       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2813       ;;
2814     *)
2815       PG_VERSION="$PACKAGE_VERSION$withval"
2816       ;;
2817   esac
2818
2819 else
2820   PG_VERSION="$PACKAGE_VERSION"
2821 fi
2822
2823
2824
2825 cat >>confdefs.h <<_ACEOF
2826 #define PG_VERSION "$PG_VERSION"
2827 _ACEOF
2828
2829
2830 # Make sure we can run config.sub.
2831 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2832   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2833
2834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2835 $as_echo_n "checking build system type... " >&6; }
2836 if ${ac_cv_build+:} false; then :
2837   $as_echo_n "(cached) " >&6
2838 else
2839   ac_build_alias=$build_alias
2840 test "x$ac_build_alias" = x &&
2841   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2842 test "x$ac_build_alias" = x &&
2843   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2844 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2845   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2846
2847 fi
2848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2849 $as_echo "$ac_cv_build" >&6; }
2850 case $ac_cv_build in
2851 *-*-*) ;;
2852 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2853 esac
2854 build=$ac_cv_build
2855 ac_save_IFS=$IFS; IFS='-'
2856 set x $ac_cv_build
2857 shift
2858 build_cpu=$1
2859 build_vendor=$2
2860 shift; shift
2861 # Remember, the first character of IFS is used to create $*,
2862 # except with old shells:
2863 build_os=$*
2864 IFS=$ac_save_IFS
2865 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2866
2867
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2869 $as_echo_n "checking host system type... " >&6; }
2870 if ${ac_cv_host+:} false; then :
2871   $as_echo_n "(cached) " >&6
2872 else
2873   if test "x$host_alias" = x; then
2874   ac_cv_host=$ac_cv_build
2875 else
2876   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2877     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2878 fi
2879
2880 fi
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2882 $as_echo "$ac_cv_host" >&6; }
2883 case $ac_cv_host in
2884 *-*-*) ;;
2885 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2886 esac
2887 host=$ac_cv_host
2888 ac_save_IFS=$IFS; IFS='-'
2889 set x $ac_cv_host
2890 shift
2891 host_cpu=$1
2892 host_vendor=$2
2893 shift; shift
2894 # Remember, the first character of IFS is used to create $*,
2895 # except with old shells:
2896 host_os=$*
2897 IFS=$ac_save_IFS
2898 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2899
2900
2901
2902 template=
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2904 $as_echo_n "checking which template to use... " >&6; }
2905
2906
2907
2908
2909 # Check whether --with-template was given.
2910 if test "${with_template+set}" = set; then :
2911   withval=$with_template;
2912   case $withval in
2913     yes)
2914       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2915       ;;
2916     no)
2917       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2918       ;;
2919     *)
2920
2921   case $withval in
2922     list)   echo; ls "$srcdir/src/template"; exit;;
2923     *)      if test -f "$srcdir/src/template/$with_template" ; then
2924               template=$withval
2925             else
2926               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2927             fi;;
2928   esac
2929
2930       ;;
2931   esac
2932
2933 else
2934
2935 # --with-template not given
2936
2937 case $host_os in
2938      aix*) template=aix ;;
2939   cygwin*) template=cygwin ;;
2940   darwin*) template=darwin ;;
2941 dragonfly*) template=netbsd ;;
2942  freebsd*) template=freebsd ;;
2943     hpux*) template=hpux ;;
2944  linux*|gnu*|k*bsd*-gnu)
2945            template=linux ;;
2946    mingw*) template=win32 ;;
2947   netbsd*) template=netbsd ;;
2948  openbsd*) template=openbsd ;;
2949  solaris*) template=solaris ;;
2950 esac
2951
2952   if test x"$template" = x"" ; then
2953     as_fn_error $? "
2954 *******************************************************************
2955 PostgreSQL has apparently not been ported to your platform yet.
2956 To try a manual configuration, look into the src/template directory
2957 for a similar platform and use the '--with-template=' option.
2958
2959 Please also contact <pgsql-bugs@postgresql.org> to see about
2960 rectifying this.  Include the above 'checking host system type...'
2961 line.
2962 *******************************************************************
2963 " "$LINENO" 5
2964   fi
2965
2966
2967 fi
2968
2969
2970
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2972 $as_echo "$template" >&6; }
2973
2974 PORTNAME=$template
2975
2976
2977 # Initialize default assumption that we do not need separate assembly code
2978 # for TAS (test-and-set).  This can be overridden by the template file
2979 # when it's executed.
2980 need_tas=no
2981 tas_file=dummy.s
2982
2983
2984
2985 ##
2986 ## Command line options
2987 ##
2988
2989 #
2990 # Add non-standard directories to the include path
2991 #
2992
2993
2994
2995 # Check whether --with-includes was given.
2996 if test "${with_includes+set}" = set; then :
2997   withval=$with_includes;
2998   case $withval in
2999     yes)
3000       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3001       ;;
3002     no)
3003       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3004       ;;
3005     *)
3006
3007       ;;
3008   esac
3009
3010 fi
3011
3012
3013
3014
3015 #
3016 # Add non-standard directories to the library search path
3017 #
3018
3019
3020
3021 # Check whether --with-libraries was given.
3022 if test "${with_libraries+set}" = set; then :
3023   withval=$with_libraries;
3024   case $withval in
3025     yes)
3026       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3027       ;;
3028     no)
3029       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3030       ;;
3031     *)
3032       LIBRARY_DIRS=$withval
3033       ;;
3034   esac
3035
3036 fi
3037
3038
3039
3040
3041
3042
3043 # Check whether --with-libs was given.
3044 if test "${with_libs+set}" = set; then :
3045   withval=$with_libs;
3046   case $withval in
3047     yes)
3048       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3049       ;;
3050     no)
3051       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3052       ;;
3053     *)
3054       LIBRARY_DIRS=$withval
3055       ;;
3056   esac
3057
3058 fi
3059
3060
3061
3062
3063 #
3064 # 64-bit integer date/time storage is now the only option, but to avoid
3065 # unnecessary breakage of build scripts, continue to accept an explicit
3066 # "--enable-integer-datetimes" switch.
3067 #
3068
3069
3070 # Check whether --enable-integer-datetimes was given.
3071 if test "${enable_integer_datetimes+set}" = set; then :
3072   enableval=$enable_integer_datetimes;
3073   case $enableval in
3074     yes)
3075       :
3076       ;;
3077     no)
3078       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3079       ;;
3080     *)
3081       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3082       ;;
3083   esac
3084
3085 else
3086   enable_integer_datetimes=yes
3087
3088 fi
3089
3090
3091
3092
3093 #
3094 # NLS
3095 #
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3097 $as_echo_n "checking whether NLS is wanted... " >&6; }
3098
3099
3100 # Check whether --enable-nls was given.
3101 if test "${enable_nls+set}" = set; then :
3102   enableval=$enable_nls;
3103   case $enableval in
3104     yes)
3105       :
3106       ;;
3107     no)
3108       :
3109       ;;
3110     *)
3111       enable_nls=yes
3112 WANTED_LANGUAGES=$enableval
3113       ;;
3114   esac
3115
3116 else
3117   enable_nls=no
3118 fi
3119
3120
3121
3122 if test "$enable_nls" = yes; then
3123
3124 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3125
3126 fi
3127
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3129 $as_echo "$enable_nls" >&6; }
3130
3131
3132
3133 #
3134 # Default port number (--with-pgport), default 5432
3135 #
3136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3137 $as_echo_n "checking for default port number... " >&6; }
3138
3139
3140
3141 # Check whether --with-pgport was given.
3142 if test "${with_pgport+set}" = set; then :
3143   withval=$with_pgport;
3144   case $withval in
3145     yes)
3146       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3147       ;;
3148     no)
3149       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3150       ;;
3151     *)
3152       default_port=$withval
3153       ;;
3154   esac
3155
3156 else
3157   default_port=5432
3158 fi
3159
3160
3161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3162 $as_echo "$default_port" >&6; }
3163 # Need both of these because some places want an integer and some a string
3164
3165 cat >>confdefs.h <<_ACEOF
3166 #define DEF_PGPORT ${default_port}
3167 _ACEOF
3168
3169
3170 cat >>confdefs.h <<_ACEOF
3171 #define DEF_PGPORT_STR "${default_port}"
3172 _ACEOF
3173
3174
3175
3176 # It's worth validating port; you can get very confusing errors otherwise
3177 if test x"$default_port" = x""; then
3178   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3179 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3180   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3181 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3182   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3183 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3184   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3185 fi
3186
3187 #
3188 # '-rpath'-like feature can be disabled
3189 #
3190
3191
3192 # Check whether --enable-rpath was given.
3193 if test "${enable_rpath+set}" = set; then :
3194   enableval=$enable_rpath;
3195   case $enableval in
3196     yes)
3197       :
3198       ;;
3199     no)
3200       :
3201       ;;
3202     *)
3203       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3204       ;;
3205   esac
3206
3207 else
3208   enable_rpath=yes
3209
3210 fi
3211
3212
3213
3214
3215 #
3216 # Spinlocks
3217 #
3218
3219
3220 # Check whether --enable-spinlocks was given.
3221 if test "${enable_spinlocks+set}" = set; then :
3222   enableval=$enable_spinlocks;
3223   case $enableval in
3224     yes)
3225       :
3226       ;;
3227     no)
3228       :
3229       ;;
3230     *)
3231       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3232       ;;
3233   esac
3234
3235 else
3236   enable_spinlocks=yes
3237
3238 fi
3239
3240
3241
3242 #
3243 # Atomic operations
3244 #
3245
3246
3247 # Check whether --enable-atomics was given.
3248 if test "${enable_atomics+set}" = set; then :
3249   enableval=$enable_atomics;
3250   case $enableval in
3251     yes)
3252       :
3253       ;;
3254     no)
3255       :
3256       ;;
3257     *)
3258       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3259       ;;
3260   esac
3261
3262 else
3263   enable_atomics=yes
3264
3265 fi
3266
3267
3268
3269 #
3270 # Random number generation
3271 #
3272
3273
3274 # Check whether --enable-strong-random was given.
3275 if test "${enable_strong_random+set}" = set; then :
3276   enableval=$enable_strong_random;
3277   case $enableval in
3278     yes)
3279       :
3280       ;;
3281     no)
3282       :
3283       ;;
3284     *)
3285       as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3286       ;;
3287   esac
3288
3289 else
3290   enable_strong_random=yes
3291
3292 fi
3293
3294
3295
3296
3297 #
3298 # --enable-debug adds -g to compiler flags
3299 #
3300
3301
3302 # Check whether --enable-debug was given.
3303 if test "${enable_debug+set}" = set; then :
3304   enableval=$enable_debug;
3305   case $enableval in
3306     yes)
3307       :
3308       ;;
3309     no)
3310       :
3311       ;;
3312     *)
3313       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3314       ;;
3315   esac
3316
3317 else
3318   enable_debug=no
3319
3320 fi
3321
3322
3323
3324
3325 #
3326 # --enable-profiling enables gcc profiling
3327 #
3328
3329
3330 # Check whether --enable-profiling was given.
3331 if test "${enable_profiling+set}" = set; then :
3332   enableval=$enable_profiling;
3333   case $enableval in
3334     yes)
3335       :
3336       ;;
3337     no)
3338       :
3339       ;;
3340     *)
3341       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3342       ;;
3343   esac
3344
3345 else
3346   enable_profiling=no
3347
3348 fi
3349
3350
3351
3352 #
3353 # --enable-coverage enables generation of code coverage metrics with gcov
3354 #
3355
3356
3357 # Check whether --enable-coverage was given.
3358 if test "${enable_coverage+set}" = set; then :
3359   enableval=$enable_coverage;
3360   case $enableval in
3361     yes)
3362       if test -z "$GCOV"; then
3363   for ac_prog in gcov
3364 do
3365   # Extract the first word of "$ac_prog", so it can be a program name with args.
3366 set dummy $ac_prog; ac_word=$2
3367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3368 $as_echo_n "checking for $ac_word... " >&6; }
3369 if ${ac_cv_path_GCOV+:} false; then :
3370   $as_echo_n "(cached) " >&6
3371 else
3372   case $GCOV in
3373   [\\/]* | ?:[\\/]*)
3374   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3375   ;;
3376   *)
3377   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3378 for as_dir in $PATH
3379 do
3380   IFS=$as_save_IFS
3381   test -z "$as_dir" && as_dir=.
3382     for ac_exec_ext in '' $ac_executable_extensions; do
3383   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3384     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3386     break 2
3387   fi
3388 done
3389   done
3390 IFS=$as_save_IFS
3391
3392   ;;
3393 esac
3394 fi
3395 GCOV=$ac_cv_path_GCOV
3396 if test -n "$GCOV"; then
3397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3398 $as_echo "$GCOV" >&6; }
3399 else
3400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3401 $as_echo "no" >&6; }
3402 fi
3403
3404
3405   test -n "$GCOV" && break
3406 done
3407
3408 else
3409   # Report the value of GCOV in configure's output in all cases.
3410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3411 $as_echo_n "checking for GCOV... " >&6; }
3412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3413 $as_echo "$GCOV" >&6; }
3414 fi
3415
3416 if test -z "$GCOV"; then
3417   as_fn_error $? "gcov not found" "$LINENO" 5
3418 fi
3419 if test -z "$LCOV"; then
3420   for ac_prog in lcov
3421 do
3422   # Extract the first word of "$ac_prog", so it can be a program name with args.
3423 set dummy $ac_prog; ac_word=$2
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3425 $as_echo_n "checking for $ac_word... " >&6; }
3426 if ${ac_cv_path_LCOV+:} false; then :
3427   $as_echo_n "(cached) " >&6
3428 else
3429   case $LCOV in
3430   [\\/]* | ?:[\\/]*)
3431   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3432   ;;
3433   *)
3434   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3435 for as_dir in $PATH
3436 do
3437   IFS=$as_save_IFS
3438   test -z "$as_dir" && as_dir=.
3439     for ac_exec_ext in '' $ac_executable_extensions; do
3440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3441     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3442     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3443     break 2
3444   fi
3445 done
3446   done
3447 IFS=$as_save_IFS
3448
3449   ;;
3450 esac
3451 fi
3452 LCOV=$ac_cv_path_LCOV
3453 if test -n "$LCOV"; then
3454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3455 $as_echo "$LCOV" >&6; }
3456 else
3457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3458 $as_echo "no" >&6; }
3459 fi
3460
3461
3462   test -n "$LCOV" && break
3463 done
3464
3465 else
3466   # Report the value of LCOV in configure's output in all cases.
3467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3468 $as_echo_n "checking for LCOV... " >&6; }
3469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3470 $as_echo "$LCOV" >&6; }
3471 fi
3472
3473 if test -z "$LCOV"; then
3474   as_fn_error $? "lcov not found" "$LINENO" 5
3475 fi
3476 if test -z "$GENHTML"; then
3477   for ac_prog in genhtml
3478 do
3479   # Extract the first word of "$ac_prog", so it can be a program name with args.
3480 set dummy $ac_prog; ac_word=$2
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3482 $as_echo_n "checking for $ac_word... " >&6; }
3483 if ${ac_cv_path_GENHTML+:} false; then :
3484   $as_echo_n "(cached) " >&6
3485 else
3486   case $GENHTML in
3487   [\\/]* | ?:[\\/]*)
3488   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3489   ;;
3490   *)
3491   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3492 for as_dir in $PATH
3493 do
3494   IFS=$as_save_IFS
3495   test -z "$as_dir" && as_dir=.
3496     for ac_exec_ext in '' $ac_executable_extensions; do
3497   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3498     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3500     break 2
3501   fi
3502 done
3503   done
3504 IFS=$as_save_IFS
3505
3506   ;;
3507 esac
3508 fi
3509 GENHTML=$ac_cv_path_GENHTML
3510 if test -n "$GENHTML"; then
3511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3512 $as_echo "$GENHTML" >&6; }
3513 else
3514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3515 $as_echo "no" >&6; }
3516 fi
3517
3518
3519   test -n "$GENHTML" && break
3520 done
3521
3522 else
3523   # Report the value of GENHTML in configure's output in all cases.
3524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3525 $as_echo_n "checking for GENHTML... " >&6; }
3526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3527 $as_echo "$GENHTML" >&6; }
3528 fi
3529
3530 if test -z "$GENHTML"; then
3531   as_fn_error $? "genhtml not found" "$LINENO" 5
3532 fi
3533       ;;
3534     no)
3535       :
3536       ;;
3537     *)
3538       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3539       ;;
3540   esac
3541
3542 else
3543   enable_coverage=no
3544
3545 fi
3546
3547
3548
3549
3550 #
3551 # DTrace
3552 #
3553
3554
3555 # Check whether --enable-dtrace was given.
3556 if test "${enable_dtrace+set}" = set; then :
3557   enableval=$enable_dtrace;
3558   case $enableval in
3559     yes)
3560       if test -z "$DTRACE"; then
3561   for ac_prog in dtrace
3562 do
3563   # Extract the first word of "$ac_prog", so it can be a program name with args.
3564 set dummy $ac_prog; ac_word=$2
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3566 $as_echo_n "checking for $ac_word... " >&6; }
3567 if ${ac_cv_path_DTRACE+:} false; then :
3568   $as_echo_n "(cached) " >&6
3569 else
3570   case $DTRACE in
3571   [\\/]* | ?:[\\/]*)
3572   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3573   ;;
3574   *)
3575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3576 for as_dir in $PATH
3577 do
3578   IFS=$as_save_IFS
3579   test -z "$as_dir" && as_dir=.
3580     for ac_exec_ext in '' $ac_executable_extensions; do
3581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3582     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3584     break 2
3585   fi
3586 done
3587   done
3588 IFS=$as_save_IFS
3589
3590   ;;
3591 esac
3592 fi
3593 DTRACE=$ac_cv_path_DTRACE
3594 if test -n "$DTRACE"; then
3595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3596 $as_echo "$DTRACE" >&6; }
3597 else
3598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3599 $as_echo "no" >&6; }
3600 fi
3601
3602
3603   test -n "$DTRACE" && break
3604 done
3605
3606 else
3607   # Report the value of DTRACE in configure's output in all cases.
3608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3609 $as_echo_n "checking for DTRACE... " >&6; }
3610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3611 $as_echo "$DTRACE" >&6; }
3612 fi
3613
3614 if test -z "$DTRACE"; then
3615   as_fn_error $? "dtrace not found" "$LINENO" 5
3616 fi
3617
3618       ;;
3619     no)
3620       :
3621       ;;
3622     *)
3623       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3624       ;;
3625   esac
3626
3627 else
3628   enable_dtrace=no
3629
3630 fi
3631
3632
3633
3634
3635 #
3636 # TAP tests
3637 #
3638
3639
3640 # Check whether --enable-tap-tests was given.
3641 if test "${enable_tap_tests+set}" = set; then :
3642   enableval=$enable_tap_tests;
3643   case $enableval in
3644     yes)
3645       :
3646       ;;
3647     no)
3648       :
3649       ;;
3650     *)
3651       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3652       ;;
3653   esac
3654
3655 else
3656   enable_tap_tests=no
3657
3658 fi
3659
3660
3661
3662
3663 #
3664 # Block size
3665 #
3666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3667 $as_echo_n "checking for block size... " >&6; }
3668
3669
3670
3671 # Check whether --with-blocksize was given.
3672 if test "${with_blocksize+set}" = set; then :
3673   withval=$with_blocksize;
3674   case $withval in
3675     yes)
3676       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3677       ;;
3678     no)
3679       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3680       ;;
3681     *)
3682       blocksize=$withval
3683       ;;
3684   esac
3685
3686 else
3687   blocksize=8
3688 fi
3689
3690
3691 case ${blocksize} in
3692   1) BLCKSZ=1024;;
3693   2) BLCKSZ=2048;;
3694   4) BLCKSZ=4096;;
3695   8) BLCKSZ=8192;;
3696  16) BLCKSZ=16384;;
3697  32) BLCKSZ=32768;;
3698   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3699 esac
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3701 $as_echo "${blocksize}kB" >&6; }
3702
3703
3704 cat >>confdefs.h <<_ACEOF
3705 #define BLCKSZ ${BLCKSZ}
3706 _ACEOF
3707
3708
3709 #
3710 # Relation segment size
3711 #
3712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3713 $as_echo_n "checking for segment size... " >&6; }
3714
3715
3716
3717 # Check whether --with-segsize was given.
3718 if test "${with_segsize+set}" = set; then :
3719   withval=$with_segsize;
3720   case $withval in
3721     yes)
3722       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3723       ;;
3724     no)
3725       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3726       ;;
3727     *)
3728       segsize=$withval
3729       ;;
3730   esac
3731
3732 else
3733   segsize=1
3734 fi
3735
3736
3737 # this expression is set up to avoid unnecessary integer overflow
3738 # blocksize is already guaranteed to be a factor of 1024
3739 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3740 test $? -eq 0 || exit 1
3741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3742 $as_echo "${segsize}GB" >&6; }
3743
3744
3745 cat >>confdefs.h <<_ACEOF
3746 #define RELSEG_SIZE ${RELSEG_SIZE}
3747 _ACEOF
3748
3749
3750 #
3751 # WAL block size
3752 #
3753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3754 $as_echo_n "checking for WAL block size... " >&6; }
3755
3756
3757
3758 # Check whether --with-wal-blocksize was given.
3759 if test "${with_wal_blocksize+set}" = set; then :
3760   withval=$with_wal_blocksize;
3761   case $withval in
3762     yes)
3763       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3764       ;;
3765     no)
3766       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3767       ;;
3768     *)
3769       wal_blocksize=$withval
3770       ;;
3771   esac
3772
3773 else
3774   wal_blocksize=8
3775 fi
3776
3777
3778 case ${wal_blocksize} in
3779   1) XLOG_BLCKSZ=1024;;
3780   2) XLOG_BLCKSZ=2048;;
3781   4) XLOG_BLCKSZ=4096;;
3782   8) XLOG_BLCKSZ=8192;;
3783  16) XLOG_BLCKSZ=16384;;
3784  32) XLOG_BLCKSZ=32768;;
3785  64) XLOG_BLCKSZ=65536;;
3786   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3787 esac
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3789 $as_echo "${wal_blocksize}kB" >&6; }
3790
3791
3792 cat >>confdefs.h <<_ACEOF
3793 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3794 _ACEOF
3795
3796
3797 #
3798 # C compiler
3799 #
3800
3801 # For historical reasons you can also use --with-CC to specify the C compiler
3802 # to use, although the standard way to do this is to set the CC environment
3803 # variable.
3804
3805
3806
3807 # Check whether --with-CC was given.
3808 if test "${with_CC+set}" = set; then :
3809   withval=$with_CC;
3810   case $withval in
3811     yes)
3812       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3813       ;;
3814     no)
3815       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3816       ;;
3817     *)
3818       CC=$with_CC
3819       ;;
3820   esac
3821
3822 fi
3823
3824
3825
3826 case $template in
3827   aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3828     *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3829 esac
3830
3831 ac_ext=c
3832 ac_cpp='$CPP $CPPFLAGS'
3833 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3834 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3835 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3836 if test -n "$ac_tool_prefix"; then
3837   for ac_prog in $pgac_cc_list
3838   do
3839     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3840 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3842 $as_echo_n "checking for $ac_word... " >&6; }
3843 if ${ac_cv_prog_CC+:} false; then :
3844   $as_echo_n "(cached) " >&6
3845 else
3846   if test -n "$CC"; then
3847   ac_cv_prog_CC="$CC" # Let the user override the test.
3848 else
3849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3850 for as_dir in $PATH
3851 do
3852   IFS=$as_save_IFS
3853   test -z "$as_dir" && as_dir=.
3854     for ac_exec_ext in '' $ac_executable_extensions; do
3855   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3856     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3857     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3858     break 2
3859   fi
3860 done
3861   done
3862 IFS=$as_save_IFS
3863
3864 fi
3865 fi
3866 CC=$ac_cv_prog_CC
3867 if test -n "$CC"; then
3868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3869 $as_echo "$CC" >&6; }
3870 else
3871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3872 $as_echo "no" >&6; }
3873 fi
3874
3875
3876     test -n "$CC" && break
3877   done
3878 fi
3879 if test -z "$CC"; then
3880   ac_ct_CC=$CC
3881   for ac_prog in $pgac_cc_list
3882 do
3883   # Extract the first word of "$ac_prog", so it can be a program name with args.
3884 set dummy $ac_prog; ac_word=$2
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3886 $as_echo_n "checking for $ac_word... " >&6; }
3887 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3888   $as_echo_n "(cached) " >&6
3889 else
3890   if test -n "$ac_ct_CC"; then
3891   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3892 else
3893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3894 for as_dir in $PATH
3895 do
3896   IFS=$as_save_IFS
3897   test -z "$as_dir" && as_dir=.
3898     for ac_exec_ext in '' $ac_executable_extensions; do
3899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3900     ac_cv_prog_ac_ct_CC="$ac_prog"
3901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3902     break 2
3903   fi
3904 done
3905   done
3906 IFS=$as_save_IFS
3907
3908 fi
3909 fi
3910 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3911 if test -n "$ac_ct_CC"; then
3912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3913 $as_echo "$ac_ct_CC" >&6; }
3914 else
3915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3916 $as_echo "no" >&6; }
3917 fi
3918
3919
3920   test -n "$ac_ct_CC" && break
3921 done
3922
3923   if test "x$ac_ct_CC" = x; then
3924     CC=""
3925   else
3926     case $cross_compiling:$ac_tool_warned in
3927 yes:)
3928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3929 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3930 ac_tool_warned=yes ;;
3931 esac
3932     CC=$ac_ct_CC
3933   fi
3934 fi
3935
3936
3937 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3938 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3939 as_fn_error $? "no acceptable C compiler found in \$PATH
3940 See \`config.log' for more details" "$LINENO" 5; }
3941
3942 # Provide some information about the compiler.
3943 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3944 set X $ac_compile
3945 ac_compiler=$2
3946 for ac_option in --version -v -V -qversion; do
3947   { { ac_try="$ac_compiler $ac_option >&5"
3948 case "(($ac_try" in
3949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3950   *) ac_try_echo=$ac_try;;
3951 esac
3952 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3953 $as_echo "$ac_try_echo"; } >&5
3954   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3955   ac_status=$?
3956   if test -s conftest.err; then
3957     sed '10a\
3958 ... rest of stderr output deleted ...
3959          10q' conftest.err >conftest.er1
3960     cat conftest.er1 >&5
3961   fi
3962   rm -f conftest.er1 conftest.err
3963   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3964   test $ac_status = 0; }
3965 done
3966
3967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3968 /* end confdefs.h.  */
3969
3970 int
3971 main ()
3972 {
3973
3974   ;
3975   return 0;
3976 }
3977 _ACEOF
3978 ac_clean_files_save=$ac_clean_files
3979 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3980 # Try to create an executable without -o first, disregard a.out.
3981 # It will help us diagnose broken compilers, and finding out an intuition
3982 # of exeext.
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3984 $as_echo_n "checking whether the C compiler works... " >&6; }
3985 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3986
3987 # The possible output files:
3988 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3989
3990 ac_rmfiles=
3991 for ac_file in $ac_files
3992 do
3993   case $ac_file in
3994     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3995     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3996   esac
3997 done
3998 rm -f $ac_rmfiles
3999
4000 if { { ac_try="$ac_link_default"
4001 case "(($ac_try" in
4002   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003   *) ac_try_echo=$ac_try;;
4004 esac
4005 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4006 $as_echo "$ac_try_echo"; } >&5
4007   (eval "$ac_link_default") 2>&5
4008   ac_status=$?
4009   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4010   test $ac_status = 0; }; then :
4011   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4012 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4013 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4014 # so that the user can short-circuit this test for compilers unknown to
4015 # Autoconf.
4016 for ac_file in $ac_files ''
4017 do
4018   test -f "$ac_file" || continue
4019   case $ac_file in
4020     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4021         ;;
4022     [ab].out )
4023         # We found the default executable, but exeext='' is most
4024         # certainly right.
4025         break;;
4026     *.* )
4027         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4028         then :; else
4029            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4030         fi
4031         # We set ac_cv_exeext here because the later test for it is not
4032         # safe: cross compilers may not add the suffix if given an `-o'
4033         # argument, so we may need to know it at that point already.
4034         # Even if this section looks crufty: it has the advantage of
4035         # actually working.
4036         break;;
4037     * )
4038         break;;
4039   esac
4040 done
4041 test "$ac_cv_exeext" = no && ac_cv_exeext=
4042
4043 else
4044   ac_file=''
4045 fi
4046 if test -z "$ac_file"; then :
4047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4048 $as_echo "no" >&6; }
4049 $as_echo "$as_me: failed program was:" >&5
4050 sed 's/^/| /' conftest.$ac_ext >&5
4051
4052 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4053 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4054 as_fn_error 77 "C compiler cannot create executables
4055 See \`config.log' for more details" "$LINENO" 5; }
4056 else
4057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4058 $as_echo "yes" >&6; }
4059 fi
4060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4061 $as_echo_n "checking for C compiler default output file name... " >&6; }
4062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4063 $as_echo "$ac_file" >&6; }
4064 ac_exeext=$ac_cv_exeext
4065
4066 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4067 ac_clean_files=$ac_clean_files_save
4068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4069 $as_echo_n "checking for suffix of executables... " >&6; }
4070 if { { ac_try="$ac_link"
4071 case "(($ac_try" in
4072   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073   *) ac_try_echo=$ac_try;;
4074 esac
4075 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076 $as_echo "$ac_try_echo"; } >&5
4077   (eval "$ac_link") 2>&5
4078   ac_status=$?
4079   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080   test $ac_status = 0; }; then :
4081   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4082 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4083 # work properly (i.e., refer to `conftest.exe'), while it won't with
4084 # `rm'.
4085 for ac_file in conftest.exe conftest conftest.*; do
4086   test -f "$ac_file" || continue
4087   case $ac_file in
4088     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4089     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4090           break;;
4091     * ) break;;
4092   esac
4093 done
4094 else
4095   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4096 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4097 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4098 See \`config.log' for more details" "$LINENO" 5; }
4099 fi
4100 rm -f conftest conftest$ac_cv_exeext
4101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4102 $as_echo "$ac_cv_exeext" >&6; }
4103
4104 rm -f conftest.$ac_ext
4105 EXEEXT=$ac_cv_exeext
4106 ac_exeext=$EXEEXT
4107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4108 /* end confdefs.h.  */
4109 #include <stdio.h>
4110 int
4111 main ()
4112 {
4113 FILE *f = fopen ("conftest.out", "w");
4114  return ferror (f) || fclose (f) != 0;
4115
4116   ;
4117   return 0;
4118 }
4119 _ACEOF
4120 ac_clean_files="$ac_clean_files conftest.out"
4121 # Check that the compiler produces executables we can run.  If not, either
4122 # the compiler is broken, or we cross compile.
4123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4124 $as_echo_n "checking whether we are cross compiling... " >&6; }
4125 if test "$cross_compiling" != yes; then
4126   { { ac_try="$ac_link"
4127 case "(($ac_try" in
4128   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4129   *) ac_try_echo=$ac_try;;
4130 esac
4131 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4132 $as_echo "$ac_try_echo"; } >&5
4133   (eval "$ac_link") 2>&5
4134   ac_status=$?
4135   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4136   test $ac_status = 0; }
4137   if { ac_try='./conftest$ac_cv_exeext'
4138   { { case "(($ac_try" in
4139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4140   *) ac_try_echo=$ac_try;;
4141 esac
4142 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4143 $as_echo "$ac_try_echo"; } >&5
4144   (eval "$ac_try") 2>&5
4145   ac_status=$?
4146   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4147   test $ac_status = 0; }; }; then
4148     cross_compiling=no
4149   else
4150     if test "$cross_compiling" = maybe; then
4151         cross_compiling=yes
4152     else
4153         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4154 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4155 as_fn_error $? "cannot run C compiled programs.
4156 If you meant to cross compile, use \`--host'.
4157 See \`config.log' for more details" "$LINENO" 5; }
4158     fi
4159   fi
4160 fi
4161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4162 $as_echo "$cross_compiling" >&6; }
4163
4164 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4165 ac_clean_files=$ac_clean_files_save
4166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4167 $as_echo_n "checking for suffix of object files... " >&6; }
4168 if ${ac_cv_objext+:} false; then :
4169   $as_echo_n "(cached) " >&6
4170 else
4171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4172 /* end confdefs.h.  */
4173
4174 int
4175 main ()
4176 {
4177
4178   ;
4179   return 0;
4180 }
4181 _ACEOF
4182 rm -f conftest.o conftest.obj
4183 if { { ac_try="$ac_compile"
4184 case "(($ac_try" in
4185   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4186   *) ac_try_echo=$ac_try;;
4187 esac
4188 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4189 $as_echo "$ac_try_echo"; } >&5
4190   (eval "$ac_compile") 2>&5
4191   ac_status=$?
4192   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4193   test $ac_status = 0; }; then :
4194   for ac_file in conftest.o conftest.obj conftest.*; do
4195   test -f "$ac_file" || continue;
4196   case $ac_file in
4197     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4198     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4199        break;;
4200   esac
4201 done
4202 else
4203   $as_echo "$as_me: failed program was:" >&5
4204 sed 's/^/| /' conftest.$ac_ext >&5
4205
4206 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4207 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4208 as_fn_error $? "cannot compute suffix of object files: cannot compile
4209 See \`config.log' for more details" "$LINENO" 5; }
4210 fi
4211 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4212 fi
4213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4214 $as_echo "$ac_cv_objext" >&6; }
4215 OBJEXT=$ac_cv_objext
4216 ac_objext=$OBJEXT
4217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4218 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4219 if ${ac_cv_c_compiler_gnu+:} false; then :
4220   $as_echo_n "(cached) " >&6
4221 else
4222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4223 /* end confdefs.h.  */
4224
4225 int
4226 main ()
4227 {
4228 #ifndef __GNUC__
4229        choke me
4230 #endif
4231
4232   ;
4233   return 0;
4234 }
4235 _ACEOF
4236 if ac_fn_c_try_compile "$LINENO"; then :
4237   ac_compiler_gnu=yes
4238 else
4239   ac_compiler_gnu=no
4240 fi
4241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4242 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4243
4244 fi
4245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4246 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4247 if test $ac_compiler_gnu = yes; then
4248   GCC=yes
4249 else
4250   GCC=
4251 fi
4252 ac_test_CFLAGS=${CFLAGS+set}
4253 ac_save_CFLAGS=$CFLAGS
4254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4255 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4256 if ${ac_cv_prog_cc_g+:} false; then :
4257   $as_echo_n "(cached) " >&6
4258 else
4259   ac_save_c_werror_flag=$ac_c_werror_flag
4260    ac_c_werror_flag=yes
4261    ac_cv_prog_cc_g=no
4262    CFLAGS="-g"
4263    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4264 /* end confdefs.h.  */
4265
4266 int
4267 main ()
4268 {
4269
4270   ;
4271   return 0;
4272 }
4273 _ACEOF
4274 if ac_fn_c_try_compile "$LINENO"; then :
4275   ac_cv_prog_cc_g=yes
4276 else
4277   CFLAGS=""
4278       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4279 /* end confdefs.h.  */
4280
4281 int
4282 main ()
4283 {
4284
4285   ;
4286   return 0;
4287 }
4288 _ACEOF
4289 if ac_fn_c_try_compile "$LINENO"; then :
4290
4291 else
4292   ac_c_werror_flag=$ac_save_c_werror_flag
4293          CFLAGS="-g"
4294          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4295 /* end confdefs.h.  */
4296
4297 int
4298 main ()
4299 {
4300
4301   ;
4302   return 0;
4303 }
4304 _ACEOF
4305 if ac_fn_c_try_compile "$LINENO"; then :
4306   ac_cv_prog_cc_g=yes
4307 fi
4308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4309 fi
4310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4311 fi
4312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4313    ac_c_werror_flag=$ac_save_c_werror_flag
4314 fi
4315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4316 $as_echo "$ac_cv_prog_cc_g" >&6; }
4317 if test "$ac_test_CFLAGS" = set; then
4318   CFLAGS=$ac_save_CFLAGS
4319 elif test $ac_cv_prog_cc_g = yes; then
4320   if test "$GCC" = yes; then
4321     CFLAGS="-g -O2"
4322   else
4323     CFLAGS="-g"
4324   fi
4325 else
4326   if test "$GCC" = yes; then
4327     CFLAGS="-O2"
4328   else
4329     CFLAGS=
4330   fi
4331 fi
4332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4333 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4334 if ${ac_cv_prog_cc_c89+:} false; then :
4335   $as_echo_n "(cached) " >&6
4336 else
4337   ac_cv_prog_cc_c89=no
4338 ac_save_CC=$CC
4339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4340 /* end confdefs.h.  */
4341 #include <stdarg.h>
4342 #include <stdio.h>
4343 struct stat;
4344 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4345 struct buf { int x; };
4346 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4347 static char *e (p, i)
4348      char **p;
4349      int i;
4350 {
4351   return p[i];
4352 }
4353 static char *f (char * (*g) (char **, int), char **p, ...)
4354 {
4355   char *s;
4356   va_list v;
4357   va_start (v,p);
4358   s = g (p, va_arg (v,int));
4359   va_end (v);
4360   return s;
4361 }
4362
4363 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4364    function prototypes and stuff, but not '\xHH' hex character constants.
4365    These don't provoke an error unfortunately, instead are silently treated
4366    as 'x'.  The following induces an error, until -std is added to get
4367    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4368    array size at least.  It's necessary to write '\x00'==0 to get something
4369    that's true only with -std.  */
4370 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4371
4372 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4373    inside strings and character constants.  */
4374 #define FOO(x) 'x'
4375 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4376
4377 int test (int i, double x);
4378 struct s1 {int (*f) (int a);};
4379 struct s2 {int (*f) (double a);};
4380 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4381 int argc;
4382 char **argv;
4383 int
4384 main ()
4385 {
4386 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4387   ;
4388   return 0;
4389 }
4390 _ACEOF
4391 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4392         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4393 do
4394   CC="$ac_save_CC $ac_arg"
4395   if ac_fn_c_try_compile "$LINENO"; then :
4396   ac_cv_prog_cc_c89=$ac_arg
4397 fi
4398 rm -f core conftest.err conftest.$ac_objext
4399   test "x$ac_cv_prog_cc_c89" != "xno" && break
4400 done
4401 rm -f conftest.$ac_ext
4402 CC=$ac_save_CC
4403
4404 fi
4405 # AC_CACHE_VAL
4406 case "x$ac_cv_prog_cc_c89" in
4407   x)
4408     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4409 $as_echo "none needed" >&6; } ;;
4410   xno)
4411     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4412 $as_echo "unsupported" >&6; } ;;
4413   *)
4414     CC="$CC $ac_cv_prog_cc_c89"
4415     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4416 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4417 esac
4418 if test "x$ac_cv_prog_cc_c89" != xno; then :
4419
4420 fi
4421
4422 ac_ext=c
4423 ac_cpp='$CPP $CPPFLAGS'
4424 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4425 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4426 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4427
4428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4429 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4430 if ${ac_cv_prog_cc_c99+:} false; then :
4431   $as_echo_n "(cached) " >&6
4432 else
4433   ac_cv_prog_cc_c99=no
4434 ac_save_CC=$CC
4435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4436 /* end confdefs.h.  */
4437 #include <stdarg.h>
4438 #include <stdbool.h>
4439 #include <stdlib.h>
4440 #include <wchar.h>
4441 #include <stdio.h>
4442
4443 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4444 #define debug(...) fprintf (stderr, __VA_ARGS__)
4445 #define showlist(...) puts (#__VA_ARGS__)
4446 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4447 static void
4448 test_varargs_macros (void)
4449 {
4450   int x = 1234;
4451   int y = 5678;
4452   debug ("Flag");
4453   debug ("X = %d\n", x);
4454   showlist (The first, second, and third items.);
4455   report (x>y, "x is %d but y is %d", x, y);
4456 }
4457
4458 // Check long long types.
4459 #define BIG64 18446744073709551615ull
4460 #define BIG32 4294967295ul
4461 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4462 #if !BIG_OK
4463   your preprocessor is broken;
4464 #endif
4465 #if BIG_OK
4466 #else
4467   your preprocessor is broken;
4468 #endif
4469 static long long int bignum = -9223372036854775807LL;
4470 static unsigned long long int ubignum = BIG64;
4471
4472 struct incomplete_array
4473 {
4474   int datasize;
4475   double data[];
4476 };
4477
4478 struct named_init {
4479   int number;
4480   const wchar_t *name;
4481   double average;
4482 };
4483
4484 typedef const char *ccp;
4485
4486 static inline int
4487 test_restrict (ccp restrict text)
4488 {
4489   // See if C++-style comments work.
4490   // Iterate through items via the restricted pointer.
4491   // Also check for declarations in for loops.
4492   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4493     continue;
4494   return 0;
4495 }
4496
4497 // Check varargs and va_copy.
4498 static void
4499 test_varargs (const char *format, ...)
4500 {
4501   va_list args;
4502   va_start (args, format);
4503   va_list args_copy;
4504   va_copy (args_copy, args);
4505
4506   const char *str;
4507   int number;
4508   float fnumber;
4509
4510   while (*format)
4511     {
4512       switch (*format++)
4513         {
4514         case 's': // string
4515           str = va_arg (args_copy, const char *);
4516           break;
4517         case 'd': // int
4518           number = va_arg (args_copy, int);
4519           break;
4520         case 'f': // float
4521           fnumber = va_arg (args_copy, double);
4522           break;
4523         default:
4524           break;
4525         }
4526     }
4527   va_end (args_copy);
4528   va_end (args);
4529 }
4530
4531 int
4532 main ()
4533 {
4534
4535   // Check bool.
4536   _Bool success = false;
4537
4538   // Check restrict.
4539   if (test_restrict ("String literal") == 0)
4540     success = true;
4541   char *restrict newvar = "Another string";
4542
4543   // Check varargs.
4544   test_varargs ("s, d' f .", "string", 65, 34.234);
4545   test_varargs_macros ();
4546
4547   // Check flexible array members.
4548   struct incomplete_array *ia =
4549     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4550   ia->datasize = 10;
4551   for (int i = 0; i < ia->datasize; ++i)
4552     ia->data[i] = i * 1.234;
4553
4554   // Check named initializers.
4555   struct named_init ni = {
4556     .number = 34,
4557     .name = L"Test wide string",
4558     .average = 543.34343,
4559   };
4560
4561   ni.number = 58;
4562
4563   int dynamic_array[ni.number];
4564   dynamic_array[ni.number - 1] = 543;
4565
4566   // work around unused variable warnings
4567   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4568           || dynamic_array[ni.number - 1] != 543);
4569
4570   ;
4571   return 0;
4572 }
4573 _ACEOF
4574 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4575 do
4576   CC="$ac_save_CC $ac_arg"
4577   if ac_fn_c_try_compile "$LINENO"; then :
4578   ac_cv_prog_cc_c99=$ac_arg
4579 fi
4580 rm -f core conftest.err conftest.$ac_objext
4581   test "x$ac_cv_prog_cc_c99" != "xno" && break
4582 done
4583 rm -f conftest.$ac_ext
4584 CC=$ac_save_CC
4585
4586 fi
4587 # AC_CACHE_VAL
4588 case "x$ac_cv_prog_cc_c99" in
4589   x)
4590     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4591 $as_echo "none needed" >&6; } ;;
4592   xno)
4593     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4594 $as_echo "unsupported" >&6; } ;;
4595   *)
4596     CC="$CC $ac_cv_prog_cc_c99"
4597     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4598 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4599 esac
4600 if test "x$ac_cv_prog_cc_c99" != xno; then :
4601
4602 fi
4603
4604
4605 ac_ext=cpp
4606 ac_cpp='$CXXCPP $CPPFLAGS'
4607 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4608 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4609 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4610 if test -z "$CXX"; then
4611   if test -n "$CCC"; then
4612     CXX=$CCC
4613   else
4614     if test -n "$ac_tool_prefix"; then
4615   for ac_prog in $pgac_cxx_list
4616   do
4617     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4618 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4620 $as_echo_n "checking for $ac_word... " >&6; }
4621 if ${ac_cv_prog_CXX+:} false; then :
4622   $as_echo_n "(cached) " >&6
4623 else
4624   if test -n "$CXX"; then
4625   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4626 else
4627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4628 for as_dir in $PATH
4629 do
4630   IFS=$as_save_IFS
4631   test -z "$as_dir" && as_dir=.
4632     for ac_exec_ext in '' $ac_executable_extensions; do
4633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4634     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4636     break 2
4637   fi
4638 done
4639   done
4640 IFS=$as_save_IFS
4641
4642 fi
4643 fi
4644 CXX=$ac_cv_prog_CXX
4645 if test -n "$CXX"; then
4646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4647 $as_echo "$CXX" >&6; }
4648 else
4649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4650 $as_echo "no" >&6; }
4651 fi
4652
4653
4654     test -n "$CXX" && break
4655   done
4656 fi
4657 if test -z "$CXX"; then
4658   ac_ct_CXX=$CXX
4659   for ac_prog in $pgac_cxx_list
4660 do
4661   # Extract the first word of "$ac_prog", so it can be a program name with args.
4662 set dummy $ac_prog; ac_word=$2
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4664 $as_echo_n "checking for $ac_word... " >&6; }
4665 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4666   $as_echo_n "(cached) " >&6
4667 else
4668   if test -n "$ac_ct_CXX"; then
4669   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4670 else
4671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4672 for as_dir in $PATH
4673 do
4674   IFS=$as_save_IFS
4675   test -z "$as_dir" && as_dir=.
4676     for ac_exec_ext in '' $ac_executable_extensions; do
4677   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4678     ac_cv_prog_ac_ct_CXX="$ac_prog"
4679     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4680     break 2
4681   fi
4682 done
4683   done
4684 IFS=$as_save_IFS
4685
4686 fi
4687 fi
4688 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4689 if test -n "$ac_ct_CXX"; then
4690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4691 $as_echo "$ac_ct_CXX" >&6; }
4692 else
4693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4694 $as_echo "no" >&6; }
4695 fi
4696
4697
4698   test -n "$ac_ct_CXX" && break
4699 done
4700
4701   if test "x$ac_ct_CXX" = x; then
4702     CXX="g++"
4703   else
4704     case $cross_compiling:$ac_tool_warned in
4705 yes:)
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4707 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4708 ac_tool_warned=yes ;;
4709 esac
4710     CXX=$ac_ct_CXX
4711   fi
4712 fi
4713
4714   fi
4715 fi
4716 # Provide some information about the compiler.
4717 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4718 set X $ac_compile
4719 ac_compiler=$2
4720 for ac_option in --version -v -V -qversion; do
4721   { { ac_try="$ac_compiler $ac_option >&5"
4722 case "(($ac_try" in
4723   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4724   *) ac_try_echo=$ac_try;;
4725 esac
4726 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4727 $as_echo "$ac_try_echo"; } >&5
4728   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4729   ac_status=$?
4730   if test -s conftest.err; then
4731     sed '10a\
4732 ... rest of stderr output deleted ...
4733          10q' conftest.err >conftest.er1
4734     cat conftest.er1 >&5
4735   fi
4736   rm -f conftest.er1 conftest.err
4737   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4738   test $ac_status = 0; }
4739 done
4740
4741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4742 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4743 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4744   $as_echo_n "(cached) " >&6
4745 else
4746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4747 /* end confdefs.h.  */
4748
4749 int
4750 main ()
4751 {
4752 #ifndef __GNUC__
4753        choke me
4754 #endif
4755
4756   ;
4757   return 0;
4758 }
4759 _ACEOF
4760 if ac_fn_cxx_try_compile "$LINENO"; then :
4761   ac_compiler_gnu=yes
4762 else
4763   ac_compiler_gnu=no
4764 fi
4765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4766 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4767
4768 fi
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4770 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4771 if test $ac_compiler_gnu = yes; then
4772   GXX=yes
4773 else
4774   GXX=
4775 fi
4776 ac_test_CXXFLAGS=${CXXFLAGS+set}
4777 ac_save_CXXFLAGS=$CXXFLAGS
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4779 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4780 if ${ac_cv_prog_cxx_g+:} false; then :
4781   $as_echo_n "(cached) " >&6
4782 else
4783   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4784    ac_cxx_werror_flag=yes
4785    ac_cv_prog_cxx_g=no
4786    CXXFLAGS="-g"
4787    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4788 /* end confdefs.h.  */
4789
4790 int
4791 main ()
4792 {
4793
4794   ;
4795   return 0;
4796 }
4797 _ACEOF
4798 if ac_fn_cxx_try_compile "$LINENO"; then :
4799   ac_cv_prog_cxx_g=yes
4800 else
4801   CXXFLAGS=""
4802       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4803 /* end confdefs.h.  */
4804
4805 int
4806 main ()
4807 {
4808
4809   ;
4810   return 0;
4811 }
4812 _ACEOF
4813 if ac_fn_cxx_try_compile "$LINENO"; then :
4814
4815 else
4816   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4817          CXXFLAGS="-g"
4818          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4819 /* end confdefs.h.  */
4820
4821 int
4822 main ()
4823 {
4824
4825   ;
4826   return 0;
4827 }
4828 _ACEOF
4829 if ac_fn_cxx_try_compile "$LINENO"; then :
4830   ac_cv_prog_cxx_g=yes
4831 fi
4832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4833 fi
4834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4835 fi
4836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4837    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4838 fi
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4840 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4841 if test "$ac_test_CXXFLAGS" = set; then
4842   CXXFLAGS=$ac_save_CXXFLAGS
4843 elif test $ac_cv_prog_cxx_g = yes; then
4844   if test "$GXX" = yes; then
4845     CXXFLAGS="-g -O2"
4846   else
4847     CXXFLAGS="-g"
4848   fi
4849 else
4850   if test "$GXX" = yes; then
4851     CXXFLAGS="-O2"
4852   else
4853     CXXFLAGS=
4854   fi
4855 fi
4856 ac_ext=c
4857 ac_cpp='$CPP $CPPFLAGS'
4858 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4859 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4860 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4861
4862
4863 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4864 # but has idiosyncrasies of its own.  We assume icc will define
4865 # __INTEL_COMPILER regardless of CFLAGS.
4866
4867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4868 /* end confdefs.h.  */
4869
4870 int
4871 main ()
4872 {
4873 #ifndef __INTEL_COMPILER
4874 choke me
4875 #endif
4876   ;
4877   return 0;
4878 }
4879 _ACEOF
4880 if ac_fn_c_try_compile "$LINENO"; then :
4881   ICC=yes
4882 else
4883   ICC=no
4884 fi
4885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4886
4887 # Check if it's Sun Studio compiler. We assume that
4888 # __SUNPRO_C will be defined for Sun Studio compilers
4889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4890 /* end confdefs.h.  */
4891
4892 int
4893 main ()
4894 {
4895 #ifndef __SUNPRO_C
4896 choke me
4897 #endif
4898   ;
4899   return 0;
4900 }
4901 _ACEOF
4902 if ac_fn_c_try_compile "$LINENO"; then :
4903   SUN_STUDIO_CC=yes
4904 else
4905   SUN_STUDIO_CC=no
4906 fi
4907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4908
4909
4910
4911
4912 #
4913 # LLVM
4914 #
4915 # Checked early because subsequent tests depend on it.
4916
4917
4918
4919 # Check whether --with-llvm was given.
4920 if test "${with_llvm+set}" = set; then :
4921   withval=$with_llvm;
4922   case $withval in
4923     yes)
4924
4925 $as_echo "#define USE_LLVM 1" >>confdefs.h
4926
4927       ;;
4928     no)
4929       :
4930       ;;
4931     *)
4932       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4933       ;;
4934   esac
4935
4936 else
4937   with_llvm=no
4938
4939 fi
4940
4941
4942
4943 if test "$with_llvm" = yes ; then
4944    for ac_prog in gawk mawk nawk awk
4945 do
4946   # Extract the first word of "$ac_prog", so it can be a program name with args.
4947 set dummy $ac_prog; ac_word=$2
4948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4949 $as_echo_n "checking for $ac_word... " >&6; }
4950 if ${ac_cv_prog_AWK+:} false; then :
4951   $as_echo_n "(cached) " >&6
4952 else
4953   if test -n "$AWK"; then
4954   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4955 else
4956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4957 for as_dir in $PATH
4958 do
4959   IFS=$as_save_IFS
4960   test -z "$as_dir" && as_dir=.
4961     for ac_exec_ext in '' $ac_executable_extensions; do
4962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4963     ac_cv_prog_AWK="$ac_prog"
4964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4965     break 2
4966   fi
4967 done
4968   done
4969 IFS=$as_save_IFS
4970
4971 fi
4972 fi
4973 AWK=$ac_cv_prog_AWK
4974 if test -n "$AWK"; then
4975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4976 $as_echo "$AWK" >&6; }
4977 else
4978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4979 $as_echo "no" >&6; }
4980 fi
4981
4982
4983   test -n "$AWK" && break
4984 done
4985
4986
4987
4988
4989
4990   if test -z "$LLVM_CONFIG"; then
4991   for ac_prog in llvm-config llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
4992 do
4993   # Extract the first word of "$ac_prog", so it can be a program name with args.
4994 set dummy $ac_prog; ac_word=$2
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996 $as_echo_n "checking for $ac_word... " >&6; }
4997 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4998   $as_echo_n "(cached) " >&6
4999 else
5000   case $LLVM_CONFIG in
5001   [\\/]* | ?:[\\/]*)
5002   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5003   ;;
5004   *)
5005   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5006 for as_dir in $PATH
5007 do
5008   IFS=$as_save_IFS
5009   test -z "$as_dir" && as_dir=.
5010     for ac_exec_ext in '' $ac_executable_extensions; do
5011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5012     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5014     break 2
5015   fi
5016 done
5017   done
5018 IFS=$as_save_IFS
5019
5020   ;;
5021 esac
5022 fi
5023 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5024 if test -n "$LLVM_CONFIG"; then
5025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5026 $as_echo "$LLVM_CONFIG" >&6; }
5027 else
5028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029 $as_echo "no" >&6; }
5030 fi
5031
5032
5033   test -n "$LLVM_CONFIG" && break
5034 done
5035
5036 else
5037   # Report the value of LLVM_CONFIG in configure's output in all cases.
5038   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5039 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5041 $as_echo "$LLVM_CONFIG" >&6; }
5042 fi
5043
5044
5045   # no point continuing if llvm wasn't found
5046   if test -z "$LLVM_CONFIG"; then
5047     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5048   fi
5049   # check if detected $LLVM_CONFIG is executable
5050   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5051   if test "x$pgac_llvm_version" = "xno"; then
5052     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5053   fi
5054   # and whether the version is supported
5055   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5056     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5057   fi
5058
5059   # need clang to create some bitcode files
5060
5061   if test -z "$CLANG"; then
5062   for ac_prog in clang clang-6.0 clang-5.0 clang-4.0 clang-3.9
5063 do
5064   # Extract the first word of "$ac_prog", so it can be a program name with args.
5065 set dummy $ac_prog; ac_word=$2
5066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067 $as_echo_n "checking for $ac_word... " >&6; }
5068 if ${ac_cv_path_CLANG+:} false; then :
5069   $as_echo_n "(cached) " >&6
5070 else
5071   case $CLANG in
5072   [\\/]* | ?:[\\/]*)
5073   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5074   ;;
5075   *)
5076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077 for as_dir in $PATH
5078 do
5079   IFS=$as_save_IFS
5080   test -z "$as_dir" && as_dir=.
5081     for ac_exec_ext in '' $ac_executable_extensions; do
5082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5083     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5085     break 2
5086   fi
5087 done
5088   done
5089 IFS=$as_save_IFS
5090
5091   ;;
5092 esac
5093 fi
5094 CLANG=$ac_cv_path_CLANG
5095 if test -n "$CLANG"; then
5096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5097 $as_echo "$CLANG" >&6; }
5098 else
5099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100 $as_echo "no" >&6; }
5101 fi
5102
5103
5104   test -n "$CLANG" && break
5105 done
5106
5107 else
5108   # Report the value of CLANG in configure's output in all cases.
5109   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5110 $as_echo_n "checking for CLANG... " >&6; }
5111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5112 $as_echo "$CLANG" >&6; }
5113 fi
5114
5115   if test -z "$CLANG"; then
5116     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5117   fi
5118   # make sure clang is executable
5119   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5120     as_fn_error $? "$CLANG does not work" "$LINENO" 5
5121   fi
5122   # Could check clang version, but it doesn't seem that
5123   # important. Systems with a new enough LLVM version are usually
5124   # going to have a decent clang version too. It's also not entirely
5125   # clear what the minimum version is.
5126
5127   # Collect compiler flags necessary to build the LLVM dependent
5128   # shared library.
5129   for pgac_option in `$LLVM_CONFIG --cppflags`; do
5130     case $pgac_option in
5131       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5132     esac
5133   done
5134
5135   for pgac_option in `$LLVM_CONFIG --ldflags`; do
5136     case $pgac_option in
5137       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5138     esac
5139   done
5140
5141   # ABI influencing options, standard influencing options
5142   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5143     case $pgac_option in
5144       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5145       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5146     esac
5147   done
5148
5149   # Look for components we're interested in, collect necessary
5150   # libs. As some components are optional, we can't just list all of
5151   # them as it'd raise an error.
5152   pgac_components='';
5153   for pgac_component in `$LLVM_CONFIG --components`; do
5154     case $pgac_component in
5155       engine) pgac_components="$pgac_components $pgac_component";;
5156       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5157       orcjit) pgac_components="$pgac_components $pgac_component";;
5158       passes) pgac_components="$pgac_components $pgac_component";;
5159       perfjitevents) pgac_components="$pgac_components $pgac_component";;
5160     esac
5161   done;
5162
5163   # And then get the libraries that need to be linked in for the
5164   # selected components.  They're large libraries, we only want to
5165   # link them into the LLVM using shared library.
5166   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5167     case $pgac_option in
5168       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5169     esac
5170   done
5171
5172   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5173
5174   # Check which functionality is present
5175   SAVE_CPPFLAGS="$CPPFLAGS"
5176   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
5177   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
5178 "
5179 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
5180   ac_have_decl=1
5181 else
5182   ac_have_decl=0
5183 fi
5184
5185 cat >>confdefs.h <<_ACEOF
5186 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
5187 _ACEOF
5188
5189   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
5190 "
5191 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
5192   ac_have_decl=1
5193 else
5194   ac_have_decl=0
5195 fi
5196
5197 cat >>confdefs.h <<_ACEOF
5198 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
5199 _ACEOF
5200
5201   ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
5202 "
5203 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
5204   ac_have_decl=1
5205 else
5206   ac_have_decl=0
5207 fi
5208
5209 cat >>confdefs.h <<_ACEOF
5210 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
5211 _ACEOF
5212 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
5213 "
5214 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
5215   ac_have_decl=1
5216 else
5217   ac_have_decl=0
5218 fi
5219
5220 cat >>confdefs.h <<_ACEOF
5221 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
5222 _ACEOF
5223
5224   CPPFLAGS="$SAVE_CPPFLAGS"
5225
5226   # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5227
5228
5229
5230
5231
5232
5233
5234 fi
5235
5236
5237 unset CFLAGS
5238 unset CXXFLAGS
5239
5240 #
5241 # Read the template
5242 #
5243 . "$srcdir/src/template/$template" || exit
5244
5245 # C[XX]FLAGS are selected so:
5246 # If the user specifies something in the environment, that is used.
5247 # else:  If the template file set something, that is used.
5248 # else:  If coverage was enabled, don't set anything.
5249 # else:  If the compiler is GCC, then we use -O2.
5250 # else:  If the compiler is something else, then we use -O, unless debugging.
5251
5252 if test "$ac_env_CFLAGS_set" = set; then
5253   CFLAGS=$ac_env_CFLAGS_value
5254 elif test "${CFLAGS+set}" = set; then
5255   : # (keep what template set)
5256 elif test "$enable_coverage" = yes; then
5257   : # no optimization by default
5258 elif test "$GCC" = yes; then
5259   CFLAGS="-O2"
5260 else
5261   # if the user selected debug mode, don't use -O
5262   if test "$enable_debug" != yes; then
5263     CFLAGS="-O"
5264   fi
5265 fi
5266
5267 if test "$ac_env_CXXFLAGS_set" = set; then
5268   CXXFLAGS=$ac_env_CXXFLAGS_value
5269 elif test "${CXXFLAGS+set}" = set; then
5270   : # (keep what template set)
5271 elif test "$enable_coverage" = yes; then
5272   : # no optimization by default
5273 elif test "$GCC" = yes; then
5274   CXXFLAGS="-O2"
5275 else
5276   # if the user selected debug mode, don't use -O
5277   if test "$enable_debug" != yes; then
5278     CXXFLAGS="-O"
5279   fi
5280 fi
5281
5282 # When generating bitcode (for inlining) we always want to use -O2
5283 # even when --enable-debug is specified. The bitcode it's not going to
5284 # be used for line-by-line debugging, and JIT inlining doesn't work
5285 # without at least -O1 (otherwise clang will emit 'noinline'
5286 # attributes everywhere), which is bad for testing.  Still allow the
5287 # environment to override if done explicitly.
5288 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5289   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5290 else
5291   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5292 fi
5293 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5294   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5295 else
5296   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5297 fi
5298
5299 # C[XX]FLAGS we determined above will be added back at the end
5300 user_CFLAGS=$CFLAGS
5301 CFLAGS=""
5302 user_CXXFLAGS=$CXXFLAGS
5303 CXXFLAGS=""
5304 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5305 BITCODE_CFLAGS=""
5306 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5307 BITCODE_CXXFLAGS=""
5308
5309 # set CFLAGS_VECTOR from the environment, if available
5310 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5311   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5312 fi
5313
5314 # Some versions of GCC support some additional useful warning flags.
5315 # Check whether they are supported, and add them to CFLAGS if so.
5316 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5317 # but has its own.  Also check other compiler-specific flags here.
5318
5319 if test "$GCC" = yes -a "$ICC" = no; then
5320   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5321   CXXFLAGS="-Wall -Wpointer-arith"
5322   # These work in some but not all gcc versions
5323
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5325 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5326 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5327   $as_echo_n "(cached) " >&6
5328 else
5329   pgac_save_CFLAGS=$CFLAGS
5330 pgac_save_CC=$CC
5331 CC=${CC}
5332 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5333 ac_save_c_werror_flag=$ac_c_werror_flag
5334 ac_c_werror_flag=yes
5335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5336 /* end confdefs.h.  */
5337
5338 int
5339 main ()
5340 {
5341
5342   ;
5343   return 0;
5344 }
5345 _ACEOF
5346 if ac_fn_c_try_compile "$LINENO"; then :
5347   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5348 else
5349   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5350 fi
5351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5352 ac_c_werror_flag=$ac_save_c_werror_flag
5353 CFLAGS="$pgac_save_CFLAGS"
5354 CC="$pgac_save_CC"
5355 fi
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5357 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5358 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5359   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5360 fi
5361
5362
5363   # -Wdeclaration-after-statement isn't applicable for C++
5364
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5366 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5367 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5368   $as_echo_n "(cached) " >&6
5369 else
5370   pgac_save_CFLAGS=$CFLAGS
5371 pgac_save_CC=$CC
5372 CC=${CC}
5373 CFLAGS="${CFLAGS} -Wendif-labels"
5374 ac_save_c_werror_flag=$ac_c_werror_flag
5375 ac_c_werror_flag=yes
5376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5377 /* end confdefs.h.  */
5378
5379 int
5380 main ()
5381 {
5382
5383   ;
5384   return 0;
5385 }
5386 _ACEOF
5387 if ac_fn_c_try_compile "$LINENO"; then :
5388   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5389 else
5390   pgac_cv_prog_CC_cflags__Wendif_labels=no
5391 fi
5392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5393 ac_c_werror_flag=$ac_save_c_werror_flag
5394 CFLAGS="$pgac_save_CFLAGS"
5395 CC="$pgac_save_CC"
5396 fi
5397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5398 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5399 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5400   CFLAGS="${CFLAGS} -Wendif-labels"
5401 fi
5402
5403
5404   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5405 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5406 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5407   $as_echo_n "(cached) " >&6
5408 else
5409   pgac_save_CXXFLAGS=$CXXFLAGS
5410 pgac_save_CXX=$CXX
5411 CXX=${CXX}
5412 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5413 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5414 ac_cxx_werror_flag=yes
5415 ac_ext=cpp
5416 ac_cpp='$CXXCPP $CPPFLAGS'
5417 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5418 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5419 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5420
5421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5422 /* end confdefs.h.  */
5423
5424 int
5425 main ()
5426 {
5427
5428   ;
5429   return 0;
5430 }
5431 _ACEOF
5432 if ac_fn_cxx_try_compile "$LINENO"; then :
5433   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5434 else
5435   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5436 fi
5437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5438 ac_ext=c
5439 ac_cpp='$CPP $CPPFLAGS'
5440 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5441 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5442 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5443
5444 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5445 CXXFLAGS="$pgac_save_CXXFLAGS"
5446 CXX="$pgac_save_CXX"
5447 fi
5448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5449 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5450 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5451   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5452 fi
5453
5454
5455
5456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5457 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5458 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5459   $as_echo_n "(cached) " >&6
5460 else
5461   pgac_save_CFLAGS=$CFLAGS
5462 pgac_save_CC=$CC
5463 CC=${CC}
5464 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5465 ac_save_c_werror_flag=$ac_c_werror_flag
5466 ac_c_werror_flag=yes
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5468 /* end confdefs.h.  */
5469
5470 int
5471 main ()
5472 {
5473
5474   ;
5475   return 0;
5476 }
5477 _ACEOF
5478 if ac_fn_c_try_compile "$LINENO"; then :
5479   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5480 else
5481   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5482 fi
5483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5484 ac_c_werror_flag=$ac_save_c_werror_flag
5485 CFLAGS="$pgac_save_CFLAGS"
5486 CC="$pgac_save_CC"
5487 fi
5488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5489 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5490 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5491   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5492 fi
5493
5494
5495   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5496 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5497 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5498   $as_echo_n "(cached) " >&6
5499 else
5500   pgac_save_CXXFLAGS=$CXXFLAGS
5501 pgac_save_CXX=$CXX
5502 CXX=${CXX}
5503 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5504 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5505 ac_cxx_werror_flag=yes
5506 ac_ext=cpp
5507 ac_cpp='$CXXCPP $CPPFLAGS'
5508 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5509 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5510 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5511
5512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5513 /* end confdefs.h.  */
5514
5515 int
5516 main ()
5517 {
5518
5519   ;
5520   return 0;
5521 }
5522 _ACEOF
5523 if ac_fn_cxx_try_compile "$LINENO"; then :
5524   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5525 else
5526   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5527 fi
5528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5529 ac_ext=c
5530 ac_cpp='$CPP $CPPFLAGS'
5531 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5532 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5533 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5534
5535 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5536 CXXFLAGS="$pgac_save_CXXFLAGS"
5537 CXX="$pgac_save_CXX"
5538 fi
5539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5540 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5541 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5542   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5543 fi
5544
5545
5546   # This was included in -Wall/-Wformat in older GCC versions
5547
5548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5549 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5550 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5551   $as_echo_n "(cached) " >&6
5552 else
5553   pgac_save_CFLAGS=$CFLAGS
5554 pgac_save_CC=$CC
5555 CC=${CC}
5556 CFLAGS="${CFLAGS} -Wformat-security"
5557 ac_save_c_werror_flag=$ac_c_werror_flag
5558 ac_c_werror_flag=yes
5559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5560 /* end confdefs.h.  */
5561
5562 int
5563 main ()
5564 {
5565
5566   ;
5567   return 0;
5568 }
5569 _ACEOF
5570 if ac_fn_c_try_compile "$LINENO"; then :
5571   pgac_cv_prog_CC_cflags__Wformat_security=yes
5572 else
5573   pgac_cv_prog_CC_cflags__Wformat_security=no
5574 fi
5575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5576 ac_c_werror_flag=$ac_save_c_werror_flag
5577 CFLAGS="$pgac_save_CFLAGS"
5578 CC="$pgac_save_CC"
5579 fi
5580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5581 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5582 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5583   CFLAGS="${CFLAGS} -Wformat-security"
5584 fi
5585
5586
5587   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5588 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5589 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5590   $as_echo_n "(cached) " >&6
5591 else
5592   pgac_save_CXXFLAGS=$CXXFLAGS
5593 pgac_save_CXX=$CXX
5594 CXX=${CXX}
5595 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5596 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5597 ac_cxx_werror_flag=yes
5598 ac_ext=cpp
5599 ac_cpp='$CXXCPP $CPPFLAGS'
5600 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5601 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5602 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5603
5604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5605 /* end confdefs.h.  */
5606
5607 int
5608 main ()
5609 {
5610
5611   ;
5612   return 0;
5613 }
5614 _ACEOF
5615 if ac_fn_cxx_try_compile "$LINENO"; then :
5616   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5617 else
5618   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5619 fi
5620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5621 ac_ext=c
5622 ac_cpp='$CPP $CPPFLAGS'
5623 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5624 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5625 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5626
5627 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5628 CXXFLAGS="$pgac_save_CXXFLAGS"
5629 CXX="$pgac_save_CXX"
5630 fi
5631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5632 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5633 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5634   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5635 fi
5636
5637
5638   # Disable strict-aliasing rules; needed for gcc 3.3+
5639
5640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5641 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5642 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5643   $as_echo_n "(cached) " >&6
5644 else
5645   pgac_save_CFLAGS=$CFLAGS
5646 pgac_save_CC=$CC
5647 CC=${CC}
5648 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5649 ac_save_c_werror_flag=$ac_c_werror_flag
5650 ac_c_werror_flag=yes
5651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5652 /* end confdefs.h.  */
5653
5654 int
5655 main ()
5656 {
5657
5658   ;
5659   return 0;
5660 }
5661 _ACEOF
5662 if ac_fn_c_try_compile "$LINENO"; then :
5663   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5664 else
5665   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5666 fi
5667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5668 ac_c_werror_flag=$ac_save_c_werror_flag
5669 CFLAGS="$pgac_save_CFLAGS"
5670 CC="$pgac_save_CC"
5671 fi
5672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5673 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5674 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5675   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5676 fi
5677
5678
5679   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5680 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5681 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5682   $as_echo_n "(cached) " >&6
5683 else
5684   pgac_save_CXXFLAGS=$CXXFLAGS
5685 pgac_save_CXX=$CXX
5686 CXX=${CXX}
5687 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5688 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5689 ac_cxx_werror_flag=yes
5690 ac_ext=cpp
5691 ac_cpp='$CXXCPP $CPPFLAGS'
5692 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5693 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5694 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5695
5696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5697 /* end confdefs.h.  */
5698
5699 int
5700 main ()
5701 {
5702
5703   ;
5704   return 0;
5705 }
5706 _ACEOF
5707 if ac_fn_cxx_try_compile "$LINENO"; then :
5708   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5709 else
5710   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5711 fi
5712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5713 ac_ext=c
5714 ac_cpp='$CPP $CPPFLAGS'
5715 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5716 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5717 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5718
5719 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5720 CXXFLAGS="$pgac_save_CXXFLAGS"
5721 CXX="$pgac_save_CXX"
5722 fi
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5724 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5725 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5726   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5727 fi
5728
5729
5730   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5731
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5733 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5734 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5735   $as_echo_n "(cached) " >&6
5736 else
5737   pgac_save_CFLAGS=$CFLAGS
5738 pgac_save_CC=$CC
5739 CC=${CC}
5740 CFLAGS="${CFLAGS} -fwrapv"
5741 ac_save_c_werror_flag=$ac_c_werror_flag
5742 ac_c_werror_flag=yes
5743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5744 /* end confdefs.h.  */
5745
5746 int
5747 main ()
5748 {
5749
5750   ;
5751   return 0;
5752 }
5753 _ACEOF
5754 if ac_fn_c_try_compile "$LINENO"; then :
5755   pgac_cv_prog_CC_cflags__fwrapv=yes
5756 else
5757   pgac_cv_prog_CC_cflags__fwrapv=no
5758 fi
5759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5760 ac_c_werror_flag=$ac_save_c_werror_flag
5761 CFLAGS="$pgac_save_CFLAGS"
5762 CC="$pgac_save_CC"
5763 fi
5764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5765 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5766 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5767   CFLAGS="${CFLAGS} -fwrapv"
5768 fi
5769
5770
5771   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5772 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5773 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5774   $as_echo_n "(cached) " >&6
5775 else
5776   pgac_save_CXXFLAGS=$CXXFLAGS
5777 pgac_save_CXX=$CXX
5778 CXX=${CXX}
5779 CXXFLAGS="${CXXFLAGS} -fwrapv"
5780 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5781 ac_cxx_werror_flag=yes
5782 ac_ext=cpp
5783 ac_cpp='$CXXCPP $CPPFLAGS'
5784 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5785 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5786 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5787
5788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5789 /* end confdefs.h.  */
5790
5791 int
5792 main ()
5793 {
5794
5795   ;
5796   return 0;
5797 }
5798 _ACEOF
5799 if ac_fn_cxx_try_compile "$LINENO"; then :
5800   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5801 else
5802   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5803 fi
5804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5805 ac_ext=c
5806 ac_cpp='$CPP $CPPFLAGS'
5807 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5808 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5809 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5810
5811 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5812 CXXFLAGS="$pgac_save_CXXFLAGS"
5813 CXX="$pgac_save_CXX"
5814 fi
5815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5816 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5817 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5818   CXXFLAGS="${CXXFLAGS} -fwrapv"
5819 fi
5820
5821
5822   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5823
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5825 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5826 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5827   $as_echo_n "(cached) " >&6
5828 else
5829   pgac_save_CFLAGS=$CFLAGS
5830 pgac_save_CC=$CC
5831 CC=${CC}
5832 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5833 ac_save_c_werror_flag=$ac_c_werror_flag
5834 ac_c_werror_flag=yes
5835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5836 /* end confdefs.h.  */
5837
5838 int
5839 main ()
5840 {
5841
5842   ;
5843   return 0;
5844 }
5845 _ACEOF
5846 if ac_fn_c_try_compile "$LINENO"; then :
5847   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5848 else
5849   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5850 fi
5851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5852 ac_c_werror_flag=$ac_save_c_werror_flag
5853 CFLAGS="$pgac_save_CFLAGS"
5854 CC="$pgac_save_CC"
5855 fi
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5857 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5858 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5859   CFLAGS="${CFLAGS} -fexcess-precision=standard"
5860 fi
5861
5862
5863   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5864 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5865 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5866   $as_echo_n "(cached) " >&6
5867 else
5868   pgac_save_CXXFLAGS=$CXXFLAGS
5869 pgac_save_CXX=$CXX
5870 CXX=${CXX}
5871 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5872 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5873 ac_cxx_werror_flag=yes
5874 ac_ext=cpp
5875 ac_cpp='$CXXCPP $CPPFLAGS'
5876 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5877 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5878 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5879
5880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5881 /* end confdefs.h.  */
5882
5883 int
5884 main ()
5885 {
5886
5887   ;
5888   return 0;
5889 }
5890 _ACEOF
5891 if ac_fn_cxx_try_compile "$LINENO"; then :
5892   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5893 else
5894   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5895 fi
5896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5897 ac_ext=c
5898 ac_cpp='$CPP $CPPFLAGS'
5899 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5900 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5901 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5902
5903 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5904 CXXFLAGS="$pgac_save_CXXFLAGS"
5905 CXX="$pgac_save_CXX"
5906 fi
5907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5908 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5909 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5910   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5911 fi
5912
5913
5914   # Optimization flags for specific files that benefit from vectorization
5915   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5916 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5917 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5918   $as_echo_n "(cached) " >&6
5919 else
5920   pgac_save_CFLAGS=$CFLAGS
5921 pgac_save_CC=$CC
5922 CC=${CC}
5923 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5924 ac_save_c_werror_flag=$ac_c_werror_flag
5925 ac_c_werror_flag=yes
5926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5927 /* end confdefs.h.  */
5928
5929 int
5930 main ()
5931 {
5932
5933   ;
5934   return 0;
5935 }
5936 _ACEOF
5937 if ac_fn_c_try_compile "$LINENO"; then :
5938   pgac_cv_prog_CC_cflags__funroll_loops=yes
5939 else
5940   pgac_cv_prog_CC_cflags__funroll_loops=no
5941 fi
5942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5943 ac_c_werror_flag=$ac_save_c_werror_flag
5944 CFLAGS="$pgac_save_CFLAGS"
5945 CC="$pgac_save_CC"
5946 fi
5947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5948 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5949 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5950   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5951 fi
5952
5953
5954   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5955 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5956 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5957   $as_echo_n "(cached) " >&6
5958 else
5959   pgac_save_CFLAGS=$CFLAGS
5960 pgac_save_CC=$CC
5961 CC=${CC}
5962 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5963 ac_save_c_werror_flag=$ac_c_werror_flag
5964 ac_c_werror_flag=yes
5965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5966 /* end confdefs.h.  */
5967
5968 int
5969 main ()
5970 {
5971
5972   ;
5973   return 0;
5974 }
5975 _ACEOF
5976 if ac_fn_c_try_compile "$LINENO"; then :
5977   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5978 else
5979   pgac_cv_prog_CC_cflags__ftree_vectorize=no
5980 fi
5981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5982 ac_c_werror_flag=$ac_save_c_werror_flag
5983 CFLAGS="$pgac_save_CFLAGS"
5984 CC="$pgac_save_CC"
5985 fi
5986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5987 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5988 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5989   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5990 fi
5991
5992
5993   # We want to suppress clang's unhelpful unused-command-line-argument warnings
5994   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5995   # test for the positive form and if that works, add the negative form
5996   NOT_THE_CFLAGS=""
5997   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5998 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5999 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6000   $as_echo_n "(cached) " >&6
6001 else
6002   pgac_save_CFLAGS=$CFLAGS
6003 pgac_save_CC=$CC
6004 CC=${CC}
6005 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6006 ac_save_c_werror_flag=$ac_c_werror_flag
6007 ac_c_werror_flag=yes
6008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6009 /* end confdefs.h.  */
6010
6011 int
6012 main ()
6013 {
6014
6015   ;
6016   return 0;
6017 }
6018 _ACEOF
6019 if ac_fn_c_try_compile "$LINENO"; then :
6020   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6021 else
6022   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6023 fi
6024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6025 ac_c_werror_flag=$ac_save_c_werror_flag
6026 CFLAGS="$pgac_save_CFLAGS"
6027 CC="$pgac_save_CC"
6028 fi
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6030 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6031 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6032   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6033 fi
6034
6035
6036   if test -n "$NOT_THE_CFLAGS"; then
6037     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6038   fi
6039   # Similarly disable useless truncation warnings from gcc 8+
6040   NOT_THE_CFLAGS=""
6041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6042 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6043 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6044   $as_echo_n "(cached) " >&6
6045 else
6046   pgac_save_CFLAGS=$CFLAGS
6047 pgac_save_CC=$CC
6048 CC=${CC}
6049 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6050 ac_save_c_werror_flag=$ac_c_werror_flag
6051 ac_c_werror_flag=yes
6052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6053 /* end confdefs.h.  */
6054
6055 int
6056 main ()
6057 {
6058
6059   ;
6060   return 0;
6061 }
6062 _ACEOF
6063 if ac_fn_c_try_compile "$LINENO"; then :
6064   pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6065 else
6066   pgac_cv_prog_CC_cflags__Wformat_truncation=no
6067 fi
6068 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6069 ac_c_werror_flag=$ac_save_c_werror_flag
6070 CFLAGS="$pgac_save_CFLAGS"
6071 CC="$pgac_save_CC"
6072 fi
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6074 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6075 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6076   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6077 fi
6078
6079
6080   if test -n "$NOT_THE_CFLAGS"; then
6081     CFLAGS="$CFLAGS -Wno-format-truncation"
6082   fi
6083   NOT_THE_CFLAGS=""
6084   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6085 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6086 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6087   $as_echo_n "(cached) " >&6
6088 else
6089   pgac_save_CFLAGS=$CFLAGS
6090 pgac_save_CC=$CC
6091 CC=${CC}
6092 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6093 ac_save_c_werror_flag=$ac_c_werror_flag
6094 ac_c_werror_flag=yes
6095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6096 /* end confdefs.h.  */
6097
6098 int
6099 main ()
6100 {
6101
6102   ;
6103   return 0;
6104 }
6105 _ACEOF
6106 if ac_fn_c_try_compile "$LINENO"; then :
6107   pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6108 else
6109   pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6110 fi
6111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6112 ac_c_werror_flag=$ac_save_c_werror_flag
6113 CFLAGS="$pgac_save_CFLAGS"
6114 CC="$pgac_save_CC"
6115 fi
6116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6117 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6118 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6119   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6120 fi
6121
6122
6123   if test -n "$NOT_THE_CFLAGS"; then
6124     CFLAGS="$CFLAGS -Wno-stringop-truncation"
6125   fi
6126 elif test "$ICC" = yes; then
6127   # Intel's compiler has a bug/misoptimization in checking for
6128   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6129
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6131 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6132 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6133   $as_echo_n "(cached) " >&6
6134 else
6135   pgac_save_CFLAGS=$CFLAGS
6136 pgac_save_CC=$CC
6137 CC=${CC}
6138 CFLAGS="${CFLAGS} -mp1"
6139 ac_save_c_werror_flag=$ac_c_werror_flag
6140 ac_c_werror_flag=yes
6141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6142 /* end confdefs.h.  */
6143
6144 int
6145 main ()
6146 {
6147
6148   ;
6149   return 0;
6150 }
6151 _ACEOF
6152 if ac_fn_c_try_compile "$LINENO"; then :
6153   pgac_cv_prog_CC_cflags__mp1=yes
6154 else
6155   pgac_cv_prog_CC_cflags__mp1=no
6156 fi
6157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6158 ac_c_werror_flag=$ac_save_c_werror_flag
6159 CFLAGS="$pgac_save_CFLAGS"
6160 CC="$pgac_save_CC"
6161 fi
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6163 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6164 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6165   CFLAGS="${CFLAGS} -mp1"
6166 fi
6167
6168
6169   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6170 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6171 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6172   $as_echo_n "(cached) " >&6
6173 else
6174   pgac_save_CXXFLAGS=$CXXFLAGS
6175 pgac_save_CXX=$CXX
6176 CXX=${CXX}
6177 CXXFLAGS="${CXXFLAGS} -mp1"
6178 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6179 ac_cxx_werror_flag=yes
6180 ac_ext=cpp
6181 ac_cpp='$CXXCPP $CPPFLAGS'
6182 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6183 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6184 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6185
6186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6187 /* end confdefs.h.  */
6188
6189 int
6190 main ()
6191 {
6192
6193   ;
6194   return 0;
6195 }
6196 _ACEOF
6197 if ac_fn_cxx_try_compile "$LINENO"; then :
6198   pgac_cv_prog_CXX_cxxflags__mp1=yes
6199 else
6200   pgac_cv_prog_CXX_cxxflags__mp1=no
6201 fi
6202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6203 ac_ext=c
6204 ac_cpp='$CPP $CPPFLAGS'
6205 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6206 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6207 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6208
6209 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6210 CXXFLAGS="$pgac_save_CXXFLAGS"
6211 CXX="$pgac_save_CXX"
6212 fi
6213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6214 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6215 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6216   CXXFLAGS="${CXXFLAGS} -mp1"
6217 fi
6218
6219
6220   # Make sure strict aliasing is off (though this is said to be the default)
6221
6222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6223 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6224 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6225   $as_echo_n "(cached) " >&6
6226 else
6227   pgac_save_CFLAGS=$CFLAGS
6228 pgac_save_CC=$CC
6229 CC=${CC}
6230 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6231 ac_save_c_werror_flag=$ac_c_werror_flag
6232 ac_c_werror_flag=yes
6233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6234 /* end confdefs.h.  */
6235
6236 int
6237 main ()
6238 {
6239
6240   ;
6241   return 0;
6242 }
6243 _ACEOF
6244 if ac_fn_c_try_compile "$LINENO"; then :
6245   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6246 else
6247   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6248 fi
6249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6250 ac_c_werror_flag=$ac_save_c_werror_flag
6251 CFLAGS="$pgac_save_CFLAGS"
6252 CC="$pgac_save_CC"
6253 fi
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6255 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6256 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6257   CFLAGS="${CFLAGS} -fno-strict-aliasing"
6258 fi
6259
6260
6261   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6262 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6263 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6264   $as_echo_n "(cached) " >&6
6265 else
6266   pgac_save_CXXFLAGS=$CXXFLAGS
6267 pgac_save_CXX=$CXX
6268 CXX=${CXX}
6269 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6270 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6271 ac_cxx_werror_flag=yes
6272 ac_ext=cpp
6273 ac_cpp='$CXXCPP $CPPFLAGS'
6274 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6275 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6276 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6277
6278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6279 /* end confdefs.h.  */
6280
6281 int
6282 main ()
6283 {
6284
6285   ;
6286   return 0;
6287 }
6288 _ACEOF
6289 if ac_fn_cxx_try_compile "$LINENO"; then :
6290   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6291 else
6292   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6293 fi
6294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6295 ac_ext=c
6296 ac_cpp='$CPP $CPPFLAGS'
6297 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6298 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6299 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6300
6301 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6302 CXXFLAGS="$pgac_save_CXXFLAGS"
6303 CXX="$pgac_save_CXX"
6304 fi
6305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6306 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6307 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6308   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6309 fi
6310
6311
6312 elif test "$PORTNAME" = "aix"; then
6313   # AIX's xlc has to have strict aliasing turned off too
6314
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6316 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6317 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6318   $as_echo_n "(cached) " >&6
6319 else
6320   pgac_save_CFLAGS=$CFLAGS
6321 pgac_save_CC=$CC
6322 CC=${CC}
6323 CFLAGS="${CFLAGS} -qnoansialias"
6324 ac_save_c_werror_flag=$ac_c_werror_flag
6325 ac_c_werror_flag=yes
6326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6327 /* end confdefs.h.  */
6328
6329 int
6330 main ()
6331 {
6332
6333   ;
6334   return 0;
6335 }
6336 _ACEOF
6337 if ac_fn_c_try_compile "$LINENO"; then :
6338   pgac_cv_prog_CC_cflags__qnoansialias=yes
6339 else
6340   pgac_cv_prog_CC_cflags__qnoansialias=no
6341 fi
6342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6343 ac_c_werror_flag=$ac_save_c_werror_flag
6344 CFLAGS="$pgac_save_CFLAGS"
6345 CC="$pgac_save_CC"
6346 fi
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6348 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6349 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6350   CFLAGS="${CFLAGS} -qnoansialias"
6351 fi
6352
6353
6354   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6355 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6356 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6357   $as_echo_n "(cached) " >&6
6358 else
6359   pgac_save_CXXFLAGS=$CXXFLAGS
6360 pgac_save_CXX=$CXX
6361 CXX=${CXX}
6362 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6363 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6364 ac_cxx_werror_flag=yes
6365 ac_ext=cpp
6366 ac_cpp='$CXXCPP $CPPFLAGS'
6367 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6368 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6369 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6370
6371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6372 /* end confdefs.h.  */
6373
6374 int
6375 main ()
6376 {
6377
6378   ;
6379   return 0;
6380 }
6381 _ACEOF
6382 if ac_fn_cxx_try_compile "$LINENO"; then :
6383   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6384 else
6385   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6386 fi
6387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6388 ac_ext=c
6389 ac_cpp='$CPP $CPPFLAGS'
6390 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6391 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6392 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6393
6394 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6395 CXXFLAGS="$pgac_save_CXXFLAGS"
6396 CXX="$pgac_save_CXX"
6397 fi
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6399 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6400 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6401   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6402 fi
6403
6404
6405
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6407 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6408 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6409   $as_echo_n "(cached) " >&6
6410 else
6411   pgac_save_CFLAGS=$CFLAGS
6412 pgac_save_CC=$CC
6413 CC=${CC}
6414 CFLAGS="${CFLAGS} -qlonglong"
6415 ac_save_c_werror_flag=$ac_c_werror_flag
6416 ac_c_werror_flag=yes
6417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6418 /* end confdefs.h.  */
6419
6420 int
6421 main ()
6422 {
6423
6424   ;
6425   return 0;
6426 }
6427 _ACEOF
6428 if ac_fn_c_try_compile "$LINENO"; then :
6429   pgac_cv_prog_CC_cflags__qlonglong=yes
6430 else
6431   pgac_cv_prog_CC_cflags__qlonglong=no
6432 fi
6433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6434 ac_c_werror_flag=$ac_save_c_werror_flag
6435 CFLAGS="$pgac_save_CFLAGS"
6436 CC="$pgac_save_CC"
6437 fi
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6439 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6440 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6441   CFLAGS="${CFLAGS} -qlonglong"
6442 fi
6443
6444
6445   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6446 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6447 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6448   $as_echo_n "(cached) " >&6
6449 else
6450   pgac_save_CXXFLAGS=$CXXFLAGS
6451 pgac_save_CXX=$CXX
6452 CXX=${CXX}
6453 CXXFLAGS="${CXXFLAGS} -qlonglong"
6454 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6455 ac_cxx_werror_flag=yes
6456 ac_ext=cpp
6457 ac_cpp='$CXXCPP $CPPFLAGS'
6458 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6459 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6460 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6461
6462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6463 /* end confdefs.h.  */
6464
6465 int
6466 main ()
6467 {
6468
6469   ;
6470   return 0;
6471 }
6472 _ACEOF
6473 if ac_fn_cxx_try_compile "$LINENO"; then :
6474   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6475 else
6476   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6477 fi
6478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6479 ac_ext=c
6480 ac_cpp='$CPP $CPPFLAGS'
6481 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6482 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6483 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6484
6485 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6486 CXXFLAGS="$pgac_save_CXXFLAGS"
6487 CXX="$pgac_save_CXX"
6488 fi
6489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6490 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6491 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6492   CXXFLAGS="${CXXFLAGS} -qlonglong"
6493 fi
6494
6495
6496 elif test "$PORTNAME" = "hpux"; then
6497   # On some versions of HP-UX, libm functions do not set errno by default.
6498   # Fix that by using +Olibmerrno if the compiler recognizes it.
6499
6500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6501 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6502 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6503   $as_echo_n "(cached) " >&6
6504 else
6505   pgac_save_CFLAGS=$CFLAGS
6506 pgac_save_CC=$CC
6507 CC=${CC}
6508 CFLAGS="${CFLAGS} +Olibmerrno"
6509 ac_save_c_werror_flag=$ac_c_werror_flag
6510 ac_c_werror_flag=yes
6511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6512 /* end confdefs.h.  */
6513
6514 int
6515 main ()
6516 {
6517
6518   ;
6519   return 0;
6520 }
6521 _ACEOF
6522 if ac_fn_c_try_compile "$LINENO"; then :
6523   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6524 else
6525   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6526 fi
6527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6528 ac_c_werror_flag=$ac_save_c_werror_flag
6529 CFLAGS="$pgac_save_CFLAGS"
6530 CC="$pgac_save_CC"
6531 fi
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6533 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6534 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6535   CFLAGS="${CFLAGS} +Olibmerrno"
6536 fi
6537
6538
6539   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6540 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6541 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6542   $as_echo_n "(cached) " >&6
6543 else
6544   pgac_save_CXXFLAGS=$CXXFLAGS
6545 pgac_save_CXX=$CXX
6546 CXX=${CXX}
6547 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6548 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6549 ac_cxx_werror_flag=yes
6550 ac_ext=cpp
6551 ac_cpp='$CXXCPP $CPPFLAGS'
6552 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6553 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6554 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6555
6556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6557 /* end confdefs.h.  */
6558
6559 int
6560 main ()
6561 {
6562
6563   ;
6564   return 0;
6565 }
6566 _ACEOF
6567 if ac_fn_cxx_try_compile "$LINENO"; then :
6568   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6569 else
6570   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6571 fi
6572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6573 ac_ext=c
6574 ac_cpp='$CPP $CPPFLAGS'
6575 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6576 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6577 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6578
6579 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6580 CXXFLAGS="$pgac_save_CXXFLAGS"
6581 CXX="$pgac_save_CXX"
6582 fi
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6584 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6585 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6586   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6587 fi
6588
6589
6590 fi
6591
6592 CFLAGS_VECTOR=$CFLAGS_VECTOR
6593
6594
6595 # Determine flags used to emit bitcode for JIT inlining. Need to test
6596 # for behaviour changing compiler flags, to keep compatibility with
6597 # compiler used for normal postgres code.
6598 if test "$with_llvm" = yes ; then
6599   CLANGXX="$CLANG -xc++"
6600
6601   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6602 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6603 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6604   $as_echo_n "(cached) " >&6
6605 else
6606   pgac_save_CFLAGS=$CFLAGS
6607 pgac_save_CC=$CC
6608 CC=${CLANG}
6609 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6610 ac_save_c_werror_flag=$ac_c_werror_flag
6611 ac_c_werror_flag=yes
6612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6613 /* end confdefs.h.  */
6614
6615 int
6616 main ()
6617 {
6618
6619   ;
6620   return 0;
6621 }
6622 _ACEOF
6623 if ac_fn_c_try_compile "$LINENO"; then :
6624   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6625 else
6626   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6627 fi
6628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6629 ac_c_werror_flag=$ac_save_c_werror_flag
6630 CFLAGS="$pgac_save_CFLAGS"
6631 CC="$pgac_save_CC"
6632 fi
6633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6634 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6635 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6636   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6637 fi
6638
6639   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6640 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6641 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6642   $as_echo_n "(cached) " >&6
6643 else
6644   pgac_save_CXXFLAGS=$CXXFLAGS
6645 pgac_save_CXX=$CXX
6646 CXX=${CLANGXX}
6647 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6648 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6649 ac_cxx_werror_flag=yes
6650 ac_ext=cpp
6651 ac_cpp='$CXXCPP $CPPFLAGS'
6652 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6653 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6654 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6655
6656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6657 /* end confdefs.h.  */
6658
6659 int
6660 main ()
6661 {
6662
6663   ;
6664   return 0;
6665 }
6666 _ACEOF
6667 if ac_fn_cxx_try_compile "$LINENO"; then :
6668   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6669 else
6670   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6671 fi
6672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6673 ac_ext=c
6674 ac_cpp='$CPP $CPPFLAGS'
6675 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6676 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6677 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6678
6679 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6680 CXXFLAGS="$pgac_save_CXXFLAGS"
6681 CXX="$pgac_save_CXX"
6682 fi
6683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6684 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6685 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6686   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6687 fi
6688
6689   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6690 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6691 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6692   $as_echo_n "(cached) " >&6
6693 else
6694   pgac_save_CFLAGS=$CFLAGS
6695 pgac_save_CC=$CC
6696 CC=${CLANG}
6697 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6698 ac_save_c_werror_flag=$ac_c_werror_flag
6699 ac_c_werror_flag=yes
6700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6701 /* end confdefs.h.  */
6702
6703 int
6704 main ()
6705 {
6706
6707   ;
6708   return 0;
6709 }
6710 _ACEOF
6711 if ac_fn_c_try_compile "$LINENO"; then :
6712   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6713 else
6714   pgac_cv_prog_CLANG_cflags__fwrapv=no
6715 fi
6716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6717 ac_c_werror_flag=$ac_save_c_werror_flag
6718 CFLAGS="$pgac_save_CFLAGS"
6719 CC="$pgac_save_CC"
6720 fi
6721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6722 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6723 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6724   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6725 fi
6726
6727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6728 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6729 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6730   $as_echo_n "(cached) " >&6
6731 else
6732   pgac_save_CXXFLAGS=$CXXFLAGS
6733 pgac_save_CXX=$CXX
6734 CXX=${CLANGXX}
6735 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6736 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6737 ac_cxx_werror_flag=yes
6738 ac_ext=cpp
6739 ac_cpp='$CXXCPP $CPPFLAGS'
6740 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6741 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6742 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6743
6744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6745 /* end confdefs.h.  */
6746
6747 int
6748 main ()
6749 {
6750
6751   ;
6752   return 0;
6753 }
6754 _ACEOF
6755 if ac_fn_cxx_try_compile "$LINENO"; then :
6756   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6757 else
6758   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6759 fi
6760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6761 ac_ext=c
6762 ac_cpp='$CPP $CPPFLAGS'
6763 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6764 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6765 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6766
6767 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6768 CXXFLAGS="$pgac_save_CXXFLAGS"
6769 CXX="$pgac_save_CXX"
6770 fi
6771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6772 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6773 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6774   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6775 fi
6776
6777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6778 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6779 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6780   $as_echo_n "(cached) " >&6
6781 else
6782   pgac_save_CFLAGS=$CFLAGS
6783 pgac_save_CC=$CC
6784 CC=${CLANG}
6785 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6786 ac_save_c_werror_flag=$ac_c_werror_flag
6787 ac_c_werror_flag=yes
6788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6789 /* end confdefs.h.  */
6790
6791 int
6792 main ()
6793 {
6794
6795   ;
6796   return 0;
6797 }
6798 _ACEOF
6799 if ac_fn_c_try_compile "$LINENO"; then :
6800   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6801 else
6802   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6803 fi
6804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6805 ac_c_werror_flag=$ac_save_c_werror_flag
6806 CFLAGS="$pgac_save_CFLAGS"
6807 CC="$pgac_save_CC"
6808 fi
6809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6810 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6811 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6812   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6813 fi
6814
6815   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6816 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6817 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6818   $as_echo_n "(cached) " >&6
6819 else
6820   pgac_save_CXXFLAGS=$CXXFLAGS
6821 pgac_save_CXX=$CXX
6822 CXX=${CLANGXX}
6823 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6824 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6825 ac_cxx_werror_flag=yes
6826 ac_ext=cpp
6827 ac_cpp='$CXXCPP $CPPFLAGS'
6828 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6829 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6830 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6831
6832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6833 /* end confdefs.h.  */
6834
6835 int
6836 main ()
6837 {
6838
6839   ;
6840   return 0;
6841 }
6842 _ACEOF
6843 if ac_fn_cxx_try_compile "$LINENO"; then :
6844   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6845 else
6846   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6847 fi
6848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6849 ac_ext=c
6850 ac_cpp='$CPP $CPPFLAGS'
6851 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6852 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6853 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6854
6855 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6856 CXXFLAGS="$pgac_save_CXXFLAGS"
6857 CXX="$pgac_save_CXX"
6858 fi
6859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6860 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6861 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6862   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6863 fi
6864
6865 fi
6866
6867 # supply -g if --enable-debug
6868 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6869   CFLAGS="$CFLAGS -g"
6870 fi
6871
6872 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6873   CXXFLAGS="$CXXFLAGS -g"
6874 fi
6875
6876 # enable code coverage if --enable-coverage
6877 if test "$enable_coverage" = yes; then
6878   if test "$GCC" = yes; then
6879     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6880     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6881   else
6882     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6883   fi
6884 fi
6885
6886 # enable profiling if --enable-profiling
6887 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6888   if test "$GCC" = yes; then
6889
6890 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6891
6892     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6893     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6894   else
6895     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6896   fi
6897 fi
6898
6899 # We already have this in Makefile.win32, but configure needs it too
6900 if test "$PORTNAME" = "win32"; then
6901   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6902 fi
6903
6904 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6905 # user-specified flags (if any) at the end.  This lets users override
6906 # the automatic additions.
6907 CFLAGS="$CFLAGS $user_CFLAGS"
6908 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6909 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6910 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6911
6912 BITCODE_CFLAGS=$BITCODE_CFLAGS
6913
6914 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6915
6916
6917 # Check if the compiler still works with the final flag settings
6918 # (note, we're not checking that for CXX, which is optional)
6919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6920 $as_echo_n "checking whether the C compiler still works... " >&6; }
6921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6922 /* end confdefs.h.  */
6923
6924 int
6925 main ()
6926 {
6927 return 0;
6928   ;
6929   return 0;
6930 }
6931 _ACEOF
6932 if ac_fn_c_try_link "$LINENO"; then :
6933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6934 $as_echo "yes" >&6; }
6935 else
6936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6937 $as_echo "no" >&6; }
6938    as_fn_error $? "cannot proceed" "$LINENO" 5
6939 fi
6940 rm -f core conftest.err conftest.$ac_objext \
6941     conftest$ac_exeext conftest.$ac_ext
6942
6943 # Defend against gcc -ffast-math
6944 if test "$GCC" = yes; then
6945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6946 /* end confdefs.h.  */
6947
6948 int
6949 main ()
6950 {
6951 #ifdef __FAST_MATH__
6952 choke me
6953 #endif
6954   ;
6955   return 0;
6956 }
6957 _ACEOF
6958 if ac_fn_c_try_compile "$LINENO"; then :
6959
6960 else
6961   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6962 fi
6963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6964 fi
6965
6966 ac_ext=c
6967 ac_cpp='$CPP $CPPFLAGS'
6968 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6969 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6970 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6972 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6973 # On Suns, sometimes $CPP names a directory.
6974 if test -n "$CPP" && test -d "$CPP"; then
6975   CPP=
6976 fi
6977 if test -z "$CPP"; then
6978   if ${ac_cv_prog_CPP+:} false; then :
6979   $as_echo_n "(cached) " >&6
6980 else
6981       # Double quotes because CPP needs to be expanded
6982     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6983     do
6984       ac_preproc_ok=false
6985 for ac_c_preproc_warn_flag in '' yes
6986 do
6987   # Use a header file that comes with gcc, so configuring glibc
6988   # with a fresh cross-compiler works.
6989   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6990   # <limits.h> exists even on freestanding compilers.
6991   # On the NeXT, cc -E runs the code through the compiler's parser,
6992   # not just through cpp. "Syntax error" is here to catch this case.
6993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6994 /* end confdefs.h.  */
6995 #ifdef __STDC__
6996 # include <limits.h>
6997 #else
6998 # include <assert.h>
6999 #endif
7000                      Syntax error
7001 _ACEOF
7002 if ac_fn_c_try_cpp "$LINENO"; then :
7003
7004 else
7005   # Broken: fails on valid input.
7006 continue
7007 fi
7008 rm -f conftest.err conftest.i conftest.$ac_ext
7009
7010   # OK, works on sane cases.  Now check whether nonexistent headers
7011   # can be detected and how.
7012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7013 /* end confdefs.h.  */
7014 #include <ac_nonexistent.h>
7015 _ACEOF
7016 if ac_fn_c_try_cpp "$LINENO"; then :
7017   # Broken: success on invalid input.
7018 continue
7019 else
7020   # Passes both tests.
7021 ac_preproc_ok=:
7022 break
7023 fi
7024 rm -f conftest.err conftest.i conftest.$ac_ext
7025
7026 done
7027 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7028 rm -f conftest.i conftest.err conftest.$ac_ext
7029 if $ac_preproc_ok; then :
7030   break
7031 fi
7032
7033     done
7034     ac_cv_prog_CPP=$CPP
7035
7036 fi
7037   CPP=$ac_cv_prog_CPP
7038 else
7039   ac_cv_prog_CPP=$CPP
7040 fi
7041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7042 $as_echo "$CPP" >&6; }
7043 ac_preproc_ok=false
7044 for ac_c_preproc_warn_flag in '' yes
7045 do
7046   # Use a header file that comes with gcc, so configuring glibc
7047   # with a fresh cross-compiler works.
7048   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7049   # <limits.h> exists even on freestanding compilers.
7050   # On the NeXT, cc -E runs the code through the compiler's parser,
7051   # not just through cpp. "Syntax error" is here to catch this case.
7052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7053 /* end confdefs.h.  */
7054 #ifdef __STDC__
7055 # include <limits.h>
7056 #else
7057 # include <assert.h>
7058 #endif
7059                      Syntax error
7060 _ACEOF
7061 if ac_fn_c_try_cpp "$LINENO"; then :
7062
7063 else
7064   # Broken: fails on valid input.
7065 continue
7066 fi
7067 rm -f conftest.err conftest.i conftest.$ac_ext
7068
7069   # OK, works on sane cases.  Now check whether nonexistent headers
7070   # can be detected and how.
7071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7072 /* end confdefs.h.  */
7073 #include <ac_nonexistent.h>
7074 _ACEOF
7075 if ac_fn_c_try_cpp "$LINENO"; then :
7076   # Broken: success on invalid input.
7077 continue
7078 else
7079   # Passes both tests.
7080 ac_preproc_ok=:
7081 break
7082 fi
7083 rm -f conftest.err conftest.i conftest.$ac_ext
7084
7085 done
7086 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7087 rm -f conftest.i conftest.err conftest.$ac_ext
7088 if $ac_preproc_ok; then :
7089
7090 else
7091   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7092 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7093 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7094 See \`config.log' for more details" "$LINENO" 5; }
7095 fi
7096
7097 ac_ext=c
7098 ac_cpp='$CPP $CPPFLAGS'
7099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7102
7103
7104
7105
7106 #
7107 # Set up TAS assembly code if needed; the template file has now had its
7108 # chance to request this.
7109 #
7110 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7111
7112
7113 if test "$need_tas" = yes ; then
7114   TAS=tas.o
7115 else
7116   TAS=""
7117 fi
7118
7119
7120
7121 #
7122 # Automatic dependency tracking
7123 #
7124
7125
7126 # Check whether --enable-depend was given.
7127 if test "${enable_depend+set}" = set; then :
7128   enableval=$enable_depend;
7129   case $enableval in
7130     yes)
7131       autodepend=yes
7132       ;;
7133     no)
7134       :
7135       ;;
7136     *)
7137       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7138       ;;
7139   esac
7140
7141 else
7142   enable_depend=no
7143
7144 fi
7145
7146
7147
7148
7149
7150 #
7151 # Enable assert checks
7152 #
7153
7154
7155 # Check whether --enable-cassert was given.
7156 if test "${enable_cassert+set}" = set; then :
7157   enableval=$enable_cassert;
7158   case $enableval in
7159     yes)
7160
7161 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7162
7163       ;;
7164     no)
7165       :
7166       ;;
7167     *)
7168       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7169       ;;
7170   esac
7171
7172 else
7173   enable_cassert=no
7174
7175 fi
7176
7177
7178
7179
7180 #
7181 # Include directories
7182 #
7183 ac_save_IFS=$IFS
7184 IFS="${IFS}${PATH_SEPARATOR}"
7185 # SRCH_INC comes from the template file
7186 for dir in $with_includes $SRCH_INC; do
7187   if test -d "$dir"; then
7188     INCLUDES="$INCLUDES -I$dir"
7189   else
7190     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7191 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7192   fi
7193 done
7194 IFS=$ac_save_IFS
7195
7196
7197
7198 #
7199 # Library directories
7200 #
7201 ac_save_IFS=$IFS
7202 IFS="${IFS}${PATH_SEPARATOR}"
7203 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7204 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7205   if test -d "$dir"; then
7206     LIBDIRS="$LIBDIRS -L$dir"
7207   else
7208     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7209 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7210   fi
7211 done
7212 IFS=$ac_save_IFS
7213
7214 #
7215 # Enable thread-safe client libraries
7216 #
7217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7218 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7219
7220
7221 # Check whether --enable-thread-safety was given.
7222 if test "${enable_thread_safety+set}" = set; then :
7223   enableval=$enable_thread_safety;
7224   case $enableval in
7225     yes)
7226       :
7227       ;;
7228     no)
7229       :
7230       ;;
7231     *)
7232       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7233       ;;
7234   esac
7235
7236 else
7237   enable_thread_safety=yes
7238
7239 fi
7240
7241
7242 if test "$enable_thread_safety" = yes; then
7243
7244 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7245
7246 fi
7247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7248 $as_echo "$enable_thread_safety" >&6; }
7249
7250
7251 #
7252 # ICU
7253 #
7254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7255 $as_echo_n "checking whether to build with ICU support... " >&6; }
7256
7257
7258
7259 # Check whether --with-icu was given.
7260 if test "${with_icu+set}" = set; then :
7261   withval=$with_icu;
7262   case $withval in
7263     yes)
7264
7265 $as_echo "#define USE_ICU 1" >>confdefs.h
7266
7267       ;;
7268     no)
7269       :
7270       ;;
7271     *)
7272       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7273       ;;
7274   esac
7275
7276 else
7277   with_icu=no
7278
7279 fi
7280
7281
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7283 $as_echo "$with_icu" >&6; }
7284
7285
7286 if test "$with_icu" = yes; then
7287
7288
7289
7290
7291
7292
7293
7294 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7295         if test -n "$ac_tool_prefix"; then
7296   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7297 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7299 $as_echo_n "checking for $ac_word... " >&6; }
7300 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7301   $as_echo_n "(cached) " >&6
7302 else
7303   case $PKG_CONFIG in
7304   [\\/]* | ?:[\\/]*)
7305   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7306   ;;
7307   *)
7308   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7309 for as_dir in $PATH
7310 do
7311   IFS=$as_save_IFS
7312   test -z "$as_dir" && as_dir=.
7313     for ac_exec_ext in '' $ac_executable_extensions; do
7314   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7315     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7316     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7317     break 2
7318   fi
7319 done
7320   done
7321 IFS=$as_save_IFS
7322
7323   ;;
7324 esac
7325 fi
7326 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7327 if test -n "$PKG_CONFIG"; then
7328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7329 $as_echo "$PKG_CONFIG" >&6; }
7330 else
7331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7332 $as_echo "no" >&6; }
7333 fi
7334
7335
7336 fi
7337 if test -z "$ac_cv_path_PKG_CONFIG"; then
7338   ac_pt_PKG_CONFIG=$PKG_CONFIG
7339   # Extract the first word of "pkg-config", so it can be a program name with args.
7340 set dummy pkg-config; ac_word=$2
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7342 $as_echo_n "checking for $ac_word... " >&6; }
7343 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7344   $as_echo_n "(cached) " >&6
7345 else
7346   case $ac_pt_PKG_CONFIG in
7347   [\\/]* | ?:[\\/]*)
7348   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7349   ;;
7350   *)
7351   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7352 for as_dir in $PATH
7353 do
7354   IFS=$as_save_IFS
7355   test -z "$as_dir" && as_dir=.
7356     for ac_exec_ext in '' $ac_executable_extensions; do
7357   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7358     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7360     break 2
7361   fi
7362 done
7363   done
7364 IFS=$as_save_IFS
7365
7366   ;;
7367 esac
7368 fi
7369 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7370 if test -n "$ac_pt_PKG_CONFIG"; then
7371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7372 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7373 else
7374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7375 $as_echo "no" >&6; }
7376 fi
7377
7378   if test "x$ac_pt_PKG_CONFIG" = x; then
7379     PKG_CONFIG=""
7380   else
7381     case $cross_compiling:$ac_tool_warned in
7382 yes:)
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7384 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7385 ac_tool_warned=yes ;;
7386 esac
7387     PKG_CONFIG=$ac_pt_PKG_CONFIG
7388   fi
7389 else
7390   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7391 fi
7392
7393 fi
7394 if test -n "$PKG_CONFIG"; then
7395         _pkg_min_version=0.9.0
7396         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7397 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7398         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7399                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7400 $as_echo "yes" >&6; }
7401         else
7402                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7403 $as_echo "no" >&6; }
7404                 PKG_CONFIG=""
7405         fi
7406 fi
7407
7408 pkg_failed=no
7409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7410 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7411
7412 if test -n "$ICU_CFLAGS"; then
7413     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7414  elif test -n "$PKG_CONFIG"; then
7415     if test -n "$PKG_CONFIG" && \
7416     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7417   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7418   ac_status=$?
7419   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7420   test $ac_status = 0; }; then
7421   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7422                       test "x$?" != "x0" && pkg_failed=yes
7423 else
7424   pkg_failed=yes
7425 fi
7426  else
7427     pkg_failed=untried
7428 fi
7429 if test -n "$ICU_LIBS"; then
7430     pkg_cv_ICU_LIBS="$ICU_LIBS"
7431  elif test -n "$PKG_CONFIG"; then
7432     if test -n "$PKG_CONFIG" && \
7433     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7434   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7435   ac_status=$?
7436   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7437   test $ac_status = 0; }; then
7438   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7439                       test "x$?" != "x0" && pkg_failed=yes
7440 else
7441   pkg_failed=yes
7442 fi
7443  else
7444     pkg_failed=untried
7445 fi
7446
7447
7448
7449 if test $pkg_failed = yes; then
7450         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7451 $as_echo "no" >&6; }
7452
7453 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7454         _pkg_short_errors_supported=yes
7455 else
7456         _pkg_short_errors_supported=no
7457 fi
7458         if test $_pkg_short_errors_supported = yes; then
7459                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7460         else
7461                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7462         fi
7463         # Put the nasty error message in config.log where it belongs
7464         echo "$ICU_PKG_ERRORS" >&5
7465
7466         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7467
7468 $ICU_PKG_ERRORS
7469
7470 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7471 installed software in a non-standard prefix.
7472
7473 Alternatively, you may set the environment variables ICU_CFLAGS
7474 and ICU_LIBS to avoid the need to call pkg-config.
7475 See the pkg-config man page for more details." "$LINENO" 5
7476 elif test $pkg_failed = untried; then
7477         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7478 $as_echo "no" >&6; }
7479         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7480 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7481 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7482 is in your PATH or set the PKG_CONFIG environment variable to the full
7483 path to pkg-config.
7484
7485 Alternatively, you may set the environment variables ICU_CFLAGS
7486 and ICU_LIBS to avoid the need to call pkg-config.
7487 See the pkg-config man page for more details.
7488
7489 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7490 See \`config.log' for more details" "$LINENO" 5; }
7491 else
7492         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7493         ICU_LIBS=$pkg_cv_ICU_LIBS
7494         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7495 $as_echo "yes" >&6; }
7496
7497 fi
7498 fi
7499
7500 #
7501 # Optionally build Tcl modules (PL/Tcl)
7502 #
7503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7504 $as_echo_n "checking whether to build with Tcl... " >&6; }
7505
7506
7507
7508 # Check whether --with-tcl was given.
7509 if test "${with_tcl+set}" = set; then :
7510   withval=$with_tcl;
7511   case $withval in
7512     yes)
7513       :
7514       ;;
7515     no)
7516       :
7517       ;;
7518     *)
7519       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7520       ;;
7521   esac
7522
7523 else
7524   with_tcl=no
7525
7526 fi
7527
7528
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7530 $as_echo "$with_tcl" >&6; }
7531
7532
7533 # We see if the path to the Tcl/Tk configuration scripts is specified.
7534 # This will override the use of tclsh to find the paths to search.
7535
7536
7537
7538
7539 # Check whether --with-tclconfig was given.
7540 if test "${with_tclconfig+set}" = set; then :
7541   withval=$with_tclconfig;
7542   case $withval in
7543     yes)
7544       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7545       ;;
7546     no)
7547       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7548       ;;
7549     *)
7550
7551       ;;
7552   esac
7553
7554 fi
7555
7556
7557
7558 #
7559 # Optionally build Perl modules (PL/Perl)
7560 #
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7562 $as_echo_n "checking whether to build Perl modules... " >&6; }
7563
7564
7565
7566 # Check whether --with-perl was given.
7567 if test "${with_perl+set}" = set; then :
7568   withval=$with_perl;
7569   case $withval in
7570     yes)
7571       :
7572       ;;
7573     no)
7574       :
7575       ;;
7576     *)
7577       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7578       ;;
7579   esac
7580
7581 else
7582   with_perl=no
7583
7584 fi
7585
7586
7587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7588 $as_echo "$with_perl" >&6; }
7589
7590
7591 #
7592 # Optionally build Python modules (PL/Python)
7593 #
7594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7595 $as_echo_n "checking whether to build Python modules... " >&6; }
7596
7597
7598
7599 # Check whether --with-python was given.
7600 if test "${with_python+set}" = set; then :
7601   withval=$with_python;
7602   case $withval in
7603     yes)
7604       :
7605       ;;
7606     no)
7607       :
7608       ;;
7609     *)
7610       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7611       ;;
7612   esac
7613
7614 else
7615   with_python=no
7616
7617 fi
7618
7619
7620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7621 $as_echo "$with_python" >&6; }
7622
7623
7624 #
7625 # GSSAPI
7626 #
7627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7628 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7629
7630
7631
7632 # Check whether --with-gssapi was given.
7633 if test "${with_gssapi+set}" = set; then :
7634   withval=$with_gssapi;
7635   case $withval in
7636     yes)
7637
7638
7639 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7640
7641   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7642
7643       ;;
7644     no)
7645       :
7646       ;;
7647     *)
7648       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7649       ;;
7650   esac
7651
7652 else
7653   with_gssapi=no
7654
7655 fi
7656
7657
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7659 $as_echo "$with_gssapi" >&6; }
7660
7661
7662
7663
7664
7665
7666 #
7667 # Kerberos configuration parameters
7668 #
7669
7670
7671
7672 # Check whether --with-krb-srvnam was given.
7673 if test "${with_krb_srvnam+set}" = set; then :
7674   withval=$with_krb_srvnam;
7675   case $withval in
7676     yes)
7677       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7678       ;;
7679     no)
7680       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7681       ;;
7682     *)
7683
7684       ;;
7685   esac
7686
7687 else
7688   with_krb_srvnam="postgres"
7689 fi
7690
7691
7692
7693
7694 cat >>confdefs.h <<_ACEOF
7695 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7696 _ACEOF
7697
7698
7699
7700 #
7701 # PAM
7702 #
7703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7704 $as_echo_n "checking whether to build with PAM support... " >&6; }
7705
7706
7707
7708 # Check whether --with-pam was given.
7709 if test "${with_pam+set}" = set; then :
7710   withval=$with_pam;
7711   case $withval in
7712     yes)
7713
7714 $as_echo "#define USE_PAM 1" >>confdefs.h
7715
7716       ;;
7717     no)
7718       :
7719       ;;
7720     *)
7721       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7722       ;;
7723   esac
7724
7725 else
7726   with_pam=no
7727
7728 fi
7729
7730
7731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7732 $as_echo "$with_pam" >&6; }
7733
7734
7735 #
7736 # BSD AUTH
7737 #
7738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7739 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7740
7741
7742
7743 # Check whether --with-bsd-auth was given.
7744 if test "${with_bsd_auth+set}" = set; then :
7745   withval=$with_bsd_auth;
7746   case $withval in
7747     yes)
7748
7749 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7750
7751       ;;
7752     no)
7753       :
7754       ;;
7755     *)
7756       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7757       ;;
7758   esac
7759
7760 else
7761   with_bsd_auth=no
7762
7763 fi
7764
7765
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7767 $as_echo "$with_bsd_auth" >&6; }
7768
7769
7770 #
7771 # LDAP
7772 #
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7774 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7775
7776
7777
7778 # Check whether --with-ldap was given.
7779 if test "${with_ldap+set}" = set; then :
7780   withval=$with_ldap;
7781   case $withval in
7782     yes)
7783
7784 $as_echo "#define USE_LDAP 1" >>confdefs.h
7785
7786       ;;
7787     no)
7788       :
7789       ;;
7790     *)
7791       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7792       ;;
7793   esac
7794
7795 else
7796   with_ldap=no
7797
7798 fi
7799
7800
7801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7802 $as_echo "$with_ldap" >&6; }
7803
7804
7805
7806 #
7807 # Bonjour
7808 #
7809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7810 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7811
7812
7813
7814 # Check whether --with-bonjour was given.
7815 if test "${with_bonjour+set}" = set; then :
7816   withval=$with_bonjour;
7817   case $withval in
7818     yes)
7819
7820 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7821
7822       ;;
7823     no)
7824       :
7825       ;;
7826     *)
7827       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7828       ;;
7829   esac
7830
7831 else
7832   with_bonjour=no
7833
7834 fi
7835
7836
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7838 $as_echo "$with_bonjour" >&6; }
7839
7840
7841 #
7842 # OpenSSL
7843 #
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7845 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7846
7847
7848
7849 # Check whether --with-openssl was given.
7850 if test "${with_openssl+set}" = set; then :
7851   withval=$with_openssl;
7852   case $withval in
7853     yes)
7854
7855 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7856
7857       ;;
7858     no)
7859       :
7860       ;;
7861     *)
7862       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7863       ;;
7864   esac
7865
7866 else
7867   with_openssl=no
7868
7869 fi
7870
7871
7872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7873 $as_echo "$with_openssl" >&6; }
7874
7875
7876 #
7877 # SELinux
7878 #
7879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7880 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7881
7882
7883
7884 # Check whether --with-selinux was given.
7885 if test "${with_selinux+set}" = set; then :
7886   withval=$with_selinux;
7887   case $withval in
7888     yes)
7889       :
7890       ;;
7891     no)
7892       :
7893       ;;
7894     *)
7895       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7896       ;;
7897   esac
7898
7899 else
7900   with_selinux=no
7901
7902 fi
7903
7904
7905
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7907 $as_echo "$with_selinux" >&6; }
7908
7909 #
7910 # Systemd
7911 #
7912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7913 $as_echo_n "checking whether to build with systemd support... " >&6; }
7914
7915
7916
7917 # Check whether --with-systemd was given.
7918 if test "${with_systemd+set}" = set; then :
7919   withval=$with_systemd;
7920   case $withval in
7921     yes)
7922
7923 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7924
7925       ;;
7926     no)
7927       :
7928       ;;
7929     *)
7930       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7931       ;;
7932   esac
7933
7934 else
7935   with_systemd=no
7936
7937 fi
7938
7939
7940
7941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7942 $as_echo "$with_systemd" >&6; }
7943
7944 #
7945 # Readline
7946 #
7947
7948
7949
7950 # Check whether --with-readline was given.
7951 if test "${with_readline+set}" = set; then :
7952   withval=$with_readline;
7953   case $withval in
7954     yes)
7955       :
7956       ;;
7957     no)
7958       :
7959       ;;
7960     *)
7961       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7962       ;;
7963   esac
7964
7965 else
7966   with_readline=yes
7967
7968 fi
7969
7970
7971 # readline on MinGW has problems with backslashes in psql and other bugs.
7972 # This is particularly a problem with non-US code pages.
7973 # Therefore disable its use until we understand the cause. 2004-07-20
7974 if test "$PORTNAME" = "win32"; then
7975   if test "$with_readline" = yes; then
7976     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
7977 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
7978     with_readline=no
7979   fi
7980 fi
7981
7982
7983 #
7984 # Prefer libedit
7985 #
7986
7987
7988
7989 # Check whether --with-libedit-preferred was given.
7990 if test "${with_libedit_preferred+set}" = set; then :
7991   withval=$with_libedit_preferred;
7992   case $withval in
7993     yes)
7994       :
7995       ;;
7996     no)
7997       :
7998       ;;
7999     *)
8000       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8001       ;;
8002   esac
8003
8004 else
8005   with_libedit_preferred=no
8006
8007 fi
8008
8009
8010
8011
8012 #
8013 # UUID library
8014 #
8015 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8016 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8017 # UUID library.  More than one of these might be present on a given platform,
8018 # so we make the user say which one she wants.
8019 #
8020
8021
8022
8023 # Check whether --with-uuid was given.
8024 if test "${with_uuid+set}" = set; then :
8025   withval=$with_uuid;
8026   case $withval in
8027     yes)
8028       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8029       ;;
8030     no)
8031       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8032       ;;
8033     *)
8034
8035       ;;
8036   esac
8037
8038 fi
8039
8040
8041 if test x"$with_uuid" = x"" ; then
8042   with_uuid=no
8043 fi
8044
8045
8046
8047 # Check whether --with-ossp-uuid was given.
8048 if test "${with_ossp_uuid+set}" = set; then :
8049   withval=$with_ossp_uuid;
8050   case $withval in
8051     yes)
8052       :
8053       ;;
8054     no)
8055       :
8056       ;;
8057     *)
8058       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8059       ;;
8060   esac
8061
8062 else
8063   with_ossp_uuid=no
8064
8065 fi
8066
8067
8068 if test "$with_ossp_uuid" = yes ; then
8069   with_uuid=ossp
8070 fi
8071
8072 if test "$with_uuid" = bsd ; then
8073
8074 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8075
8076   UUID_EXTRA_OBJS="md5.o sha1.o"
8077 elif test "$with_uuid" = e2fs ; then
8078
8079 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8080
8081   UUID_EXTRA_OBJS="md5.o sha1.o"
8082 elif test "$with_uuid" = ossp ; then
8083
8084 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8085
8086   UUID_EXTRA_OBJS=""
8087 elif test "$with_uuid" = no ; then
8088   UUID_EXTRA_OBJS=""
8089 else
8090   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8091 fi
8092
8093
8094
8095
8096 #
8097 # XML
8098 #
8099
8100
8101
8102 # Check whether --with-libxml was given.
8103 if test "${with_libxml+set}" = set; then :
8104   withval=$with_libxml;
8105   case $withval in
8106     yes)
8107
8108 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8109
8110       ;;
8111     no)
8112       :
8113       ;;
8114     *)
8115       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8116       ;;
8117   esac
8118
8119 else
8120   with_libxml=no
8121
8122 fi
8123
8124
8125
8126 if test "$with_libxml" = yes ; then
8127   if test -z "$XML2_CONFIG"; then
8128   for ac_prog in xml2-config
8129 do
8130   # Extract the first word of "$ac_prog", so it can be a program name with args.
8131 set dummy $ac_prog; ac_word=$2
8132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8133 $as_echo_n "checking for $ac_word... " >&6; }
8134 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8135   $as_echo_n "(cached) " >&6
8136 else
8137   case $XML2_CONFIG in
8138   [\\/]* | ?:[\\/]*)
8139   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8140   ;;
8141   *)
8142   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8143 for as_dir in $PATH
8144 do
8145   IFS=$as_save_IFS
8146   test -z "$as_dir" && as_dir=.
8147     for ac_exec_ext in '' $ac_executable_extensions; do
8148   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8149     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8150     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8151     break 2
8152   fi
8153 done
8154   done
8155 IFS=$as_save_IFS
8156
8157   ;;
8158 esac
8159 fi
8160 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8161 if test -n "$XML2_CONFIG"; then
8162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8163 $as_echo "$XML2_CONFIG" >&6; }
8164 else
8165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8166 $as_echo "no" >&6; }
8167 fi
8168
8169
8170   test -n "$XML2_CONFIG" && break
8171 done
8172
8173 else
8174   # Report the value of XML2_CONFIG in configure's output in all cases.
8175   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8176 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8178 $as_echo "$XML2_CONFIG" >&6; }
8179 fi
8180
8181   if test -n "$XML2_CONFIG"; then
8182     for pgac_option in `$XML2_CONFIG --cflags`; do
8183       case $pgac_option in
8184         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8185       esac
8186     done
8187     for pgac_option in `$XML2_CONFIG --libs`; do
8188       case $pgac_option in
8189         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8190       esac
8191     done
8192   fi
8193 fi
8194
8195
8196
8197 #
8198 # XSLT
8199 #
8200
8201
8202
8203 # Check whether --with-libxslt was given.
8204 if test "${with_libxslt+set}" = set; then :
8205   withval=$with_libxslt;
8206   case $withval in
8207     yes)
8208
8209 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8210
8211       ;;
8212     no)
8213       :
8214       ;;
8215     *)
8216       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8217       ;;
8218   esac
8219
8220 else
8221   with_libxslt=no
8222
8223 fi
8224
8225
8226
8227
8228
8229
8230 #
8231 # tzdata
8232 #
8233
8234
8235
8236 # Check whether --with-system-tzdata was given.
8237 if test "${with_system_tzdata+set}" = set; then :
8238   withval=$with_system_tzdata;
8239   case $withval in
8240     yes)
8241       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8242       ;;
8243     no)
8244       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8245       ;;
8246     *)
8247
8248       ;;
8249   esac
8250
8251 fi
8252
8253
8254
8255
8256 #
8257 # Zlib
8258 #
8259
8260
8261
8262 # Check whether --with-zlib was given.
8263 if test "${with_zlib+set}" = set; then :
8264   withval=$with_zlib;
8265   case $withval in
8266     yes)
8267       :
8268       ;;
8269     no)
8270       :
8271       ;;
8272     *)
8273       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8274       ;;
8275   esac
8276
8277 else
8278   with_zlib=yes
8279
8280 fi
8281
8282
8283
8284
8285 #
8286 # Elf
8287 #
8288
8289 # Assume system is ELF if it predefines __ELF__ as 1,
8290 # otherwise believe host_os based default.
8291 case $host_os in
8292     freebsd1*|freebsd2*) elf=no;;
8293     freebsd3*|freebsd4*) elf=yes;;
8294 esac
8295
8296
8297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8298 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8299 if ${ac_cv_path_GREP+:} false; then :
8300   $as_echo_n "(cached) " >&6
8301 else
8302   if test -z "$GREP"; then
8303   ac_path_GREP_found=false
8304   # Loop through the user's path and test for each of PROGNAME-LIST
8305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8306 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8307 do
8308   IFS=$as_save_IFS
8309   test -z "$as_dir" && as_dir=.
8310     for ac_prog in grep ggrep; do
8311     for ac_exec_ext in '' $ac_executable_extensions; do
8312       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8313       as_fn_executable_p "$ac_path_GREP" || continue
8314 # Check for GNU ac_path_GREP and select it if it is found.
8315   # Check for GNU $ac_path_GREP
8316 case `"$ac_path_GREP" --version 2>&1` in
8317 *GNU*)
8318   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8319 *)
8320   ac_count=0
8321   $as_echo_n 0123456789 >"conftest.in"
8322   while :
8323   do
8324     cat "conftest.in" "conftest.in" >"conftest.tmp"
8325     mv "conftest.tmp" "conftest.in"
8326     cp "conftest.in" "conftest.nl"
8327     $as_echo 'GREP' >> "conftest.nl"
8328     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8329     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8330     as_fn_arith $ac_count + 1 && ac_count=$as_val
8331     if test $ac_count -gt ${ac_path_GREP_max-0}; then
8332       # Best one so far, save it but keep looking for a better one
8333       ac_cv_path_GREP="$ac_path_GREP"
8334       ac_path_GREP_max=$ac_count
8335     fi
8336     # 10*(2^10) chars as input seems more than enough
8337     test $ac_count -gt 10 && break
8338   done
8339   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8340 esac
8341
8342       $ac_path_GREP_found && break 3
8343     done
8344   done
8345   done
8346 IFS=$as_save_IFS
8347   if test -z "$ac_cv_path_GREP"; then
8348     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8349   fi
8350 else
8351   ac_cv_path_GREP=$GREP
8352 fi
8353
8354 fi
8355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8356 $as_echo "$ac_cv_path_GREP" >&6; }
8357  GREP="$ac_cv_path_GREP"
8358
8359
8360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8361 $as_echo_n "checking for egrep... " >&6; }
8362 if ${ac_cv_path_EGREP+:} false; then :
8363   $as_echo_n "(cached) " >&6
8364 else
8365   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8366    then ac_cv_path_EGREP="$GREP -E"
8367    else
8368      if test -z "$EGREP"; then
8369   ac_path_EGREP_found=false
8370   # Loop through the user's path and test for each of PROGNAME-LIST
8371   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8372 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8373 do
8374   IFS=$as_save_IFS
8375   test -z "$as_dir" && as_dir=.
8376     for ac_prog in egrep; do
8377     for ac_exec_ext in '' $ac_executable_extensions; do
8378       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8379       as_fn_executable_p "$ac_path_EGREP" || continue
8380 # Check for GNU ac_path_EGREP and select it if it is found.
8381   # Check for GNU $ac_path_EGREP
8382 case `"$ac_path_EGREP" --version 2>&1` in
8383 *GNU*)
8384   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8385 *)
8386   ac_count=0
8387   $as_echo_n 0123456789 >"conftest.in"
8388   while :
8389   do
8390     cat "conftest.in" "conftest.in" >"conftest.tmp"
8391     mv "conftest.tmp" "conftest.in"
8392     cp "conftest.in" "conftest.nl"
8393     $as_echo 'EGREP' >> "conftest.nl"
8394     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8395     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8396     as_fn_arith $ac_count + 1 && ac_count=$as_val
8397     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8398       # Best one so far, save it but keep looking for a better one
8399       ac_cv_path_EGREP="$ac_path_EGREP"
8400       ac_path_EGREP_max=$ac_count
8401     fi
8402     # 10*(2^10) chars as input seems more than enough
8403     test $ac_count -gt 10 && break
8404   done
8405   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8406 esac
8407
8408       $ac_path_EGREP_found && break 3
8409     done
8410   done
8411   done
8412 IFS=$as_save_IFS
8413   if test -z "$ac_cv_path_EGREP"; then
8414     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8415   fi
8416 else
8417   ac_cv_path_EGREP=$EGREP
8418 fi
8419
8420    fi
8421 fi
8422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8423 $as_echo "$ac_cv_path_EGREP" >&6; }
8424  EGREP="$ac_cv_path_EGREP"
8425
8426
8427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8428 /* end confdefs.h.  */
8429 #if __ELF__
8430   yes
8431 #endif
8432
8433 _ACEOF
8434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8435   $EGREP "yes" >/dev/null 2>&1; then :
8436   ELF_SYS=true
8437 else
8438   if test "X$elf" = "Xyes" ; then
8439   ELF_SYS=true
8440 else
8441   ELF_SYS=
8442 fi
8443 fi
8444 rm -f conftest*
8445
8446
8447
8448 #
8449 # Assignments
8450 #
8451
8452 CPPFLAGS="$CPPFLAGS $INCLUDES"
8453 LDFLAGS="$LDFLAGS $LIBDIRS"
8454
8455
8456
8457
8458
8459 # Check whether --with-gnu-ld was given.
8460 if test "${with_gnu_ld+set}" = set; then :
8461   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8462 else
8463   with_gnu_ld=no
8464 fi
8465
8466 ac_prog=ld
8467 if test "$GCC" = yes; then
8468   # Check if gcc -print-prog-name=ld gives a path.
8469   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8470 $as_echo_n "checking for ld used by GCC... " >&6; }
8471   case $host in
8472   *-*-mingw*)
8473     # gcc leaves a trailing carriage return which upsets mingw
8474     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8475   *)
8476     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8477   esac
8478   case "$ac_prog" in
8479     # Accept absolute paths.
8480     [\\/]* | [A-Za-z]:[\\/]*)
8481       re_direlt='/[^/][^/]*/\.\./'
8482       # Canonicalize the path of ld
8483       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8484       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8485         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8486       done
8487       test -z "$LD" && LD="$ac_prog"
8488       ;;
8489   "")
8490     # If it fails, then pretend we aren't using GCC.
8491     ac_prog=ld
8492     ;;
8493   *)
8494     # If it is relative, then search for the first ld in PATH.
8495     with_gnu_ld=unknown
8496     ;;
8497   esac
8498 elif test "$with_gnu_ld" = yes; then
8499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8500 $as_echo_n "checking for GNU ld... " >&6; }
8501 else
8502   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8503 $as_echo_n "checking for non-GNU ld... " >&6; }
8504 fi
8505 if ${ac_cv_path_LD+:} false; then :
8506   $as_echo_n "(cached) " >&6
8507 else
8508   if test -z "$LD"; then
8509   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8510   for ac_dir in $PATH; do
8511     test -z "$ac_dir" && ac_dir=.
8512     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8513       ac_cv_path_LD="$ac_dir/$ac_prog"
8514       # Check to see if the program is GNU ld.  I'd rather use --version,
8515       # but apparently some GNU ld's only accept -v.
8516       # Break only if it was the GNU/non-GNU ld that we prefer.
8517       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8518         test "$with_gnu_ld" != no && break
8519       else
8520         test "$with_gnu_ld" != yes && break
8521       fi
8522     fi
8523   done
8524   IFS="$ac_save_ifs"
8525 else
8526   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8527 fi
8528 fi
8529
8530 LD="$ac_cv_path_LD"
8531 if test -n "$LD"; then
8532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8533 $as_echo "$LD" >&6; }
8534 else
8535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8536 $as_echo "no" >&6; }
8537 fi
8538 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8540 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8541 if ${ac_cv_prog_gnu_ld+:} false; then :
8542   $as_echo_n "(cached) " >&6
8543 else
8544   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8545 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8546   ac_cv_prog_gnu_ld=yes
8547 else
8548   ac_cv_prog_gnu_ld=no
8549 fi
8550 fi
8551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8552 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8553 with_gnu_ld=$ac_cv_prog_gnu_ld
8554
8555
8556
8557
8558 if test -n "$ac_tool_prefix"; then
8559   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8560 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8562 $as_echo_n "checking for $ac_word... " >&6; }
8563 if ${ac_cv_prog_RANLIB+:} false; then :
8564   $as_echo_n "(cached) " >&6
8565 else
8566   if test -n "$RANLIB"; then
8567   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8568 else
8569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8570 for as_dir in $PATH
8571 do
8572   IFS=$as_save_IFS
8573   test -z "$as_dir" && as_dir=.
8574     for ac_exec_ext in '' $ac_executable_extensions; do
8575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8576     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8578     break 2
8579   fi
8580 done
8581   done
8582 IFS=$as_save_IFS
8583
8584 fi
8585 fi
8586 RANLIB=$ac_cv_prog_RANLIB
8587 if test -n "$RANLIB"; then
8588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8589 $as_echo "$RANLIB" >&6; }
8590 else
8591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8592 $as_echo "no" >&6; }
8593 fi
8594
8595
8596 fi
8597 if test -z "$ac_cv_prog_RANLIB"; then
8598   ac_ct_RANLIB=$RANLIB
8599   # Extract the first word of "ranlib", so it can be a program name with args.
8600 set dummy ranlib; ac_word=$2
8601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8602 $as_echo_n "checking for $ac_word... " >&6; }
8603 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8604   $as_echo_n "(cached) " >&6
8605 else
8606   if test -n "$ac_ct_RANLIB"; then
8607   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8608 else
8609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8610 for as_dir in $PATH
8611 do
8612   IFS=$as_save_IFS
8613   test -z "$as_dir" && as_dir=.
8614     for ac_exec_ext in '' $ac_executable_extensions; do
8615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8616     ac_cv_prog_ac_ct_RANLIB="ranlib"
8617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8618     break 2
8619   fi
8620 done
8621   done
8622 IFS=$as_save_IFS
8623
8624 fi
8625 fi
8626 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8627 if test -n "$ac_ct_RANLIB"; then
8628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8629 $as_echo "$ac_ct_RANLIB" >&6; }
8630 else
8631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8632 $as_echo "no" >&6; }
8633 fi
8634
8635   if test "x$ac_ct_RANLIB" = x; then
8636     RANLIB=":"
8637   else
8638     case $cross_compiling:$ac_tool_warned in
8639 yes:)
8640 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8641 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8642 ac_tool_warned=yes ;;
8643 esac
8644     RANLIB=$ac_ct_RANLIB
8645   fi
8646 else
8647   RANLIB="$ac_cv_prog_RANLIB"
8648 fi
8649
8650
8651   if test -n "$ac_tool_prefix"; then
8652   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8653 set dummy ${ac_tool_prefix}strip; ac_word=$2
8654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8655 $as_echo_n "checking for $ac_word... " >&6; }
8656 if ${ac_cv_prog_STRIP+:} false; then :
8657   $as_echo_n "(cached) " >&6
8658 else
8659   if test -n "$STRIP"; then
8660   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8661 else
8662 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8663 for as_dir in $PATH
8664 do
8665   IFS=$as_save_IFS
8666   test -z "$as_dir" && as_dir=.
8667     for ac_exec_ext in '' $ac_executable_extensions; do
8668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8669     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8671     break 2
8672   fi
8673 done
8674   done
8675 IFS=$as_save_IFS
8676
8677 fi
8678 fi
8679 STRIP=$ac_cv_prog_STRIP
8680 if test -n "$STRIP"; then
8681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8682 $as_echo "$STRIP" >&6; }
8683 else
8684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8685 $as_echo "no" >&6; }
8686 fi
8687
8688
8689 fi
8690 if test -z "$ac_cv_prog_STRIP"; then
8691   ac_ct_STRIP=$STRIP
8692   # Extract the first word of "strip", so it can be a program name with args.
8693 set dummy strip; ac_word=$2
8694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8695 $as_echo_n "checking for $ac_word... " >&6; }
8696 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8697   $as_echo_n "(cached) " >&6
8698 else
8699   if test -n "$ac_ct_STRIP"; then
8700   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8701 else
8702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703 for as_dir in $PATH
8704 do
8705   IFS=$as_save_IFS
8706   test -z "$as_dir" && as_dir=.
8707     for ac_exec_ext in '' $ac_executable_extensions; do
8708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8709     ac_cv_prog_ac_ct_STRIP="strip"
8710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8711     break 2
8712   fi
8713 done
8714   done
8715 IFS=$as_save_IFS
8716
8717 fi
8718 fi
8719 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8720 if test -n "$ac_ct_STRIP"; then
8721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8722 $as_echo "$ac_ct_STRIP" >&6; }
8723 else
8724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8725 $as_echo "no" >&6; }
8726 fi
8727
8728   if test "x$ac_ct_STRIP" = x; then
8729     STRIP=":"
8730   else
8731     case $cross_compiling:$ac_tool_warned in
8732 yes:)
8733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8734 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8735 ac_tool_warned=yes ;;
8736 esac
8737     STRIP=$ac_ct_STRIP
8738   fi
8739 else
8740   STRIP="$ac_cv_prog_STRIP"
8741 fi
8742
8743
8744   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8745 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8746   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8747     STRIP_STATIC_LIB="$STRIP -x"
8748     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8749     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8750 $as_echo "yes" >&6; }
8751   else
8752     case $host_os in
8753       darwin*)
8754         STRIP="$STRIP -x"
8755         STRIP_STATIC_LIB=$STRIP
8756         STRIP_SHARED_LIB=$STRIP
8757         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8758 $as_echo "yes" >&6; }
8759         ;;
8760       *)
8761         STRIP_STATIC_LIB=:
8762         STRIP_SHARED_LIB=:
8763         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8764 $as_echo "no" >&6; }
8765         ;;
8766     esac
8767   fi
8768
8769
8770
8771 if test -n "$ac_tool_prefix"; then
8772   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8773 set dummy ${ac_tool_prefix}ar; ac_word=$2
8774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8775 $as_echo_n "checking for $ac_word... " >&6; }
8776 if ${ac_cv_prog_AR+:} false; then :
8777   $as_echo_n "(cached) " >&6
8778 else
8779   if test -n "$AR"; then
8780   ac_cv_prog_AR="$AR" # Let the user override the test.
8781 else
8782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8783 for as_dir in $PATH
8784 do
8785   IFS=$as_save_IFS
8786   test -z "$as_dir" && as_dir=.
8787     for ac_exec_ext in '' $ac_executable_extensions; do
8788   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8789     ac_cv_prog_AR="${ac_tool_prefix}ar"
8790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8791     break 2
8792   fi
8793 done
8794   done
8795 IFS=$as_save_IFS
8796
8797 fi
8798 fi
8799 AR=$ac_cv_prog_AR
8800 if test -n "$AR"; then
8801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8802 $as_echo "$AR" >&6; }
8803 else
8804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8805 $as_echo "no" >&6; }
8806 fi
8807
8808
8809 fi
8810 if test -z "$ac_cv_prog_AR"; then
8811   ac_ct_AR=$AR
8812   # Extract the first word of "ar", so it can be a program name with args.
8813 set dummy ar; ac_word=$2
8814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8815 $as_echo_n "checking for $ac_word... " >&6; }
8816 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8817   $as_echo_n "(cached) " >&6
8818 else
8819   if test -n "$ac_ct_AR"; then
8820   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8821 else
8822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8823 for as_dir in $PATH
8824 do
8825   IFS=$as_save_IFS
8826   test -z "$as_dir" && as_dir=.
8827     for ac_exec_ext in '' $ac_executable_extensions; do
8828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8829     ac_cv_prog_ac_ct_AR="ar"
8830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8831     break 2
8832   fi
8833 done
8834   done
8835 IFS=$as_save_IFS
8836
8837 fi
8838 fi
8839 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8840 if test -n "$ac_ct_AR"; then
8841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8842 $as_echo "$ac_ct_AR" >&6; }
8843 else
8844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8845 $as_echo "no" >&6; }
8846 fi
8847
8848   if test "x$ac_ct_AR" = x; then
8849     AR="ar"
8850   else
8851     case $cross_compiling:$ac_tool_warned in
8852 yes:)
8853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8854 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8855 ac_tool_warned=yes ;;
8856 esac
8857     AR=$ac_ct_AR
8858   fi
8859 else
8860   AR="$ac_cv_prog_AR"
8861 fi
8862
8863 if test "$PORTNAME" = "win32"; then
8864   if test -n "$ac_tool_prefix"; then
8865   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8866 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8868 $as_echo_n "checking for $ac_word... " >&6; }
8869 if ${ac_cv_prog_DLLTOOL+:} false; then :
8870   $as_echo_n "(cached) " >&6
8871 else
8872   if test -n "$DLLTOOL"; then
8873   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8874 else
8875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8876 for as_dir in $PATH
8877 do
8878   IFS=$as_save_IFS
8879   test -z "$as_dir" && as_dir=.
8880     for ac_exec_ext in '' $ac_executable_extensions; do
8881   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8882     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8883     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8884     break 2
8885   fi
8886 done
8887   done
8888 IFS=$as_save_IFS
8889
8890 fi
8891 fi
8892 DLLTOOL=$ac_cv_prog_DLLTOOL
8893 if test -n "$DLLTOOL"; then
8894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8895 $as_echo "$DLLTOOL" >&6; }
8896 else
8897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8898 $as_echo "no" >&6; }
8899 fi
8900
8901
8902 fi
8903 if test -z "$ac_cv_prog_DLLTOOL"; then
8904   ac_ct_DLLTOOL=$DLLTOOL
8905   # Extract the first word of "dlltool", so it can be a program name with args.
8906 set dummy dlltool; ac_word=$2
8907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8908 $as_echo_n "checking for $ac_word... " >&6; }
8909 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8910   $as_echo_n "(cached) " >&6
8911 else
8912   if test -n "$ac_ct_DLLTOOL"; then
8913   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8914 else
8915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8916 for as_dir in $PATH
8917 do
8918   IFS=$as_save_IFS
8919   test -z "$as_dir" && as_dir=.
8920     for ac_exec_ext in '' $ac_executable_extensions; do
8921   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8922     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8924     break 2
8925   fi
8926 done
8927   done
8928 IFS=$as_save_IFS
8929
8930 fi
8931 fi
8932 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8933 if test -n "$ac_ct_DLLTOOL"; then
8934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8935 $as_echo "$ac_ct_DLLTOOL" >&6; }
8936 else
8937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8938 $as_echo "no" >&6; }
8939 fi
8940
8941   if test "x$ac_ct_DLLTOOL" = x; then
8942     DLLTOOL="dlltool"
8943   else
8944     case $cross_compiling:$ac_tool_warned in
8945 yes:)
8946 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8947 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8948 ac_tool_warned=yes ;;
8949 esac
8950     DLLTOOL=$ac_ct_DLLTOOL
8951   fi
8952 else
8953   DLLTOOL="$ac_cv_prog_DLLTOOL"
8954 fi
8955
8956   if test -n "$ac_tool_prefix"; then
8957   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8958 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8960 $as_echo_n "checking for $ac_word... " >&6; }
8961 if ${ac_cv_prog_DLLWRAP+:} false; then :
8962   $as_echo_n "(cached) " >&6
8963 else
8964   if test -n "$DLLWRAP"; then
8965   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
8966 else
8967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8968 for as_dir in $PATH
8969 do
8970   IFS=$as_save_IFS
8971   test -z "$as_dir" && as_dir=.
8972     for ac_exec_ext in '' $ac_executable_extensions; do
8973   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8974     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
8975     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8976     break 2
8977   fi
8978 done
8979   done
8980 IFS=$as_save_IFS
8981
8982 fi
8983 fi
8984 DLLWRAP=$ac_cv_prog_DLLWRAP
8985 if test -n "$DLLWRAP"; then
8986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
8987 $as_echo "$DLLWRAP" >&6; }
8988 else
8989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8990 $as_echo "no" >&6; }
8991 fi
8992
8993
8994 fi
8995 if test -z "$ac_cv_prog_DLLWRAP"; then
8996   ac_ct_DLLWRAP=$DLLWRAP
8997   # Extract the first word of "dllwrap", so it can be a program name with args.
8998 set dummy dllwrap; ac_word=$2
8999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9000 $as_echo_n "checking for $ac_word... " >&6; }
9001 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9002   $as_echo_n "(cached) " >&6
9003 else
9004   if test -n "$ac_ct_DLLWRAP"; then
9005   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9006 else
9007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9008 for as_dir in $PATH
9009 do
9010   IFS=$as_save_IFS
9011   test -z "$as_dir" && as_dir=.
9012     for ac_exec_ext in '' $ac_executable_extensions; do
9013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9014     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9016     break 2
9017   fi
9018 done
9019   done
9020 IFS=$as_save_IFS
9021
9022 fi
9023 fi
9024 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9025 if test -n "$ac_ct_DLLWRAP"; then
9026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9027 $as_echo "$ac_ct_DLLWRAP" >&6; }
9028 else
9029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9030 $as_echo "no" >&6; }
9031 fi
9032
9033   if test "x$ac_ct_DLLWRAP" = x; then
9034     DLLWRAP="dllwrap"
9035   else
9036     case $cross_compiling:$ac_tool_warned in
9037 yes:)
9038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9039 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9040 ac_tool_warned=yes ;;
9041 esac
9042     DLLWRAP=$ac_ct_DLLWRAP
9043   fi
9044 else
9045   DLLWRAP="$ac_cv_prog_DLLWRAP"
9046 fi
9047
9048   if test -n "$ac_tool_prefix"; then
9049   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9050 set dummy ${ac_tool_prefix}windres; ac_word=$2
9051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9052 $as_echo_n "checking for $ac_word... " >&6; }
9053 if ${ac_cv_prog_WINDRES+:} false; then :
9054   $as_echo_n "(cached) " >&6
9055 else
9056   if test -n "$WINDRES"; then
9057   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9058 else
9059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9060 for as_dir in $PATH
9061 do
9062   IFS=$as_save_IFS
9063   test -z "$as_dir" && as_dir=.
9064     for ac_exec_ext in '' $ac_executable_extensions; do
9065   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9066     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9067     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9068     break 2
9069   fi
9070 done
9071   done
9072 IFS=$as_save_IFS
9073
9074 fi
9075 fi
9076 WINDRES=$ac_cv_prog_WINDRES
9077 if test -n "$WINDRES"; then
9078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9079 $as_echo "$WINDRES" >&6; }
9080 else
9081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9082 $as_echo "no" >&6; }
9083 fi
9084
9085
9086 fi
9087 if test -z "$ac_cv_prog_WINDRES"; then
9088   ac_ct_WINDRES=$WINDRES
9089   # Extract the first word of "windres", so it can be a program name with args.
9090 set dummy windres; ac_word=$2
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9092 $as_echo_n "checking for $ac_word... " >&6; }
9093 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9094   $as_echo_n "(cached) " >&6
9095 else
9096   if test -n "$ac_ct_WINDRES"; then
9097   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9098 else
9099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9100 for as_dir in $PATH
9101 do
9102   IFS=$as_save_IFS
9103   test -z "$as_dir" && as_dir=.
9104     for ac_exec_ext in '' $ac_executable_extensions; do
9105   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9106     ac_cv_prog_ac_ct_WINDRES="windres"
9107     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9108     break 2
9109   fi
9110 done
9111   done
9112 IFS=$as_save_IFS
9113
9114 fi
9115 fi
9116 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9117 if test -n "$ac_ct_WINDRES"; then
9118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9119 $as_echo "$ac_ct_WINDRES" >&6; }
9120 else
9121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9122 $as_echo "no" >&6; }
9123 fi
9124
9125   if test "x$ac_ct_WINDRES" = x; then
9126     WINDRES="windres"
9127   else
9128     case $cross_compiling:$ac_tool_warned in
9129 yes:)
9130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9131 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9132 ac_tool_warned=yes ;;
9133 esac
9134     WINDRES=$ac_ct_WINDRES
9135   fi
9136 else
9137   WINDRES="$ac_cv_prog_WINDRES"
9138 fi
9139
9140 fi
9141
9142 # Find a good install program.  We prefer a C program (faster),
9143 # so one script is as good as another.  But avoid the broken or
9144 # incompatible versions:
9145 # SysV /etc/install, /usr/sbin/install
9146 # SunOS /usr/etc/install
9147 # IRIX /sbin/install
9148 # AIX /bin/install
9149 # AmigaOS /C/install, which installs bootblocks on floppy discs
9150 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9151 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9152 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9153 # OS/2's system install, which has a completely different semantic
9154 # ./install, which can be erroneously created by make from ./install.sh.
9155 # Reject install programs that cannot install multiple files.
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9157 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9158 if test -z "$INSTALL"; then
9159 if ${ac_cv_path_install+:} false; then :
9160   $as_echo_n "(cached) " >&6
9161 else
9162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9163 for as_dir in $PATH
9164 do
9165   IFS=$as_save_IFS
9166   test -z "$as_dir" && as_dir=.
9167     # Account for people who put trailing slashes in PATH elements.
9168 case $as_dir/ in #((
9169   ./ | .// | /[cC]/* | \
9170   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9171   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9172   /usr/ucb/* ) ;;
9173   *)
9174     # OSF1 and SCO ODT 3.0 have their own names for install.
9175     # Don't use installbsd from OSF since it installs stuff as root
9176     # by default.
9177     for ac_prog in ginstall scoinst install; do
9178       for ac_exec_ext in '' $ac_executable_extensions; do
9179         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9180           if test $ac_prog = install &&
9181             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9182             # AIX install.  It has an incompatible calling convention.
9183             :
9184           elif test $ac_prog = install &&
9185             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9186             # program-specific install script used by HP pwplus--don't use.
9187             :
9188           else
9189             rm -rf conftest.one conftest.two conftest.dir
9190             echo one > conftest.one
9191             echo two > conftest.two
9192             mkdir conftest.dir
9193             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9194               test -s conftest.one && test -s conftest.two &&
9195               test -s conftest.dir/conftest.one &&
9196               test -s conftest.dir/conftest.two
9197             then
9198               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9199               break 3
9200             fi
9201           fi
9202         fi
9203       done
9204     done
9205     ;;
9206 esac
9207
9208   done
9209 IFS=$as_save_IFS
9210
9211 rm -rf conftest.one conftest.two conftest.dir
9212
9213 fi
9214   if test "${ac_cv_path_install+set}" = set; then
9215     INSTALL=$ac_cv_path_install
9216   else
9217     # As a last resort, use the slow shell script.  Don't cache a
9218     # value for INSTALL within a source directory, because that will
9219     # break other packages using the cache if that directory is
9220     # removed, or if the value is a relative name.
9221     INSTALL=$ac_install_sh
9222   fi
9223 fi
9224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9225 $as_echo "$INSTALL" >&6; }
9226
9227 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9228 # It thinks the first close brace ends the variable substitution.
9229 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9230
9231 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9232
9233 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9234
9235 # When Autoconf chooses install-sh as install program it tries to generate
9236 # a relative path to it in each makefile where it substitutes it. This clashes
9237 # with our Makefile.global concept. This workaround helps.
9238 case $INSTALL in
9239   *install-sh*) install_bin='';;
9240   *) install_bin=$INSTALL;;
9241 esac
9242
9243
9244 if test -z "$TAR"; then
9245   for ac_prog in tar
9246 do
9247   # Extract the first word of "$ac_prog", so it can be a program name with args.
9248 set dummy $ac_prog; ac_word=$2
9249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9250 $as_echo_n "checking for $ac_word... " >&6; }
9251 if ${ac_cv_path_TAR+:} false; then :
9252   $as_echo_n "(cached) " >&6
9253 else
9254   case $TAR in
9255   [\\/]* | ?:[\\/]*)
9256   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9257   ;;
9258   *)
9259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9260 for as_dir in $PATH
9261 do
9262   IFS=$as_save_IFS
9263   test -z "$as_dir" && as_dir=.
9264     for ac_exec_ext in '' $ac_executable_extensions; do
9265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9266     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9268     break 2
9269   fi
9270 done
9271   done
9272 IFS=$as_save_IFS
9273
9274   ;;
9275 esac
9276 fi
9277 TAR=$ac_cv_path_TAR
9278 if test -n "$TAR"; then
9279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9280 $as_echo "$TAR" >&6; }
9281 else
9282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9283 $as_echo "no" >&6; }
9284 fi
9285
9286
9287   test -n "$TAR" && break
9288 done
9289
9290 else
9291   # Report the value of TAR in configure's output in all cases.
9292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9293 $as_echo_n "checking for TAR... " >&6; }
9294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9295 $as_echo "$TAR" >&6; }
9296 fi
9297
9298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9299 $as_echo_n "checking whether ln -s works... " >&6; }
9300 LN_S=$as_ln_s
9301 if test "$LN_S" = "ln -s"; then
9302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9303 $as_echo "yes" >&6; }
9304 else
9305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9306 $as_echo "no, using $LN_S" >&6; }
9307 fi
9308
9309 for ac_prog in gawk mawk nawk awk
9310 do
9311   # Extract the first word of "$ac_prog", so it can be a program name with args.
9312 set dummy $ac_prog; ac_word=$2
9313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9314 $as_echo_n "checking for $ac_word... " >&6; }
9315 if ${ac_cv_prog_AWK+:} false; then :
9316   $as_echo_n "(cached) " >&6
9317 else
9318   if test -n "$AWK"; then
9319   ac_cv_prog_AWK="$AWK" # Let the user override the test.
9320 else
9321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9322 for as_dir in $PATH
9323 do
9324   IFS=$as_save_IFS
9325   test -z "$as_dir" && as_dir=.
9326     for ac_exec_ext in '' $ac_executable_extensions; do
9327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9328     ac_cv_prog_AWK="$ac_prog"
9329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9330     break 2
9331   fi
9332 done
9333   done
9334 IFS=$as_save_IFS
9335
9336 fi
9337 fi
9338 AWK=$ac_cv_prog_AWK
9339 if test -n "$AWK"; then
9340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9341 $as_echo "$AWK" >&6; }
9342 else
9343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9344 $as_echo "no" >&6; }
9345 fi
9346
9347
9348   test -n "$AWK" && break
9349 done
9350
9351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9352 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9353 if test -z "$MKDIR_P"; then
9354   if ${ac_cv_path_mkdir+:} false; then :
9355   $as_echo_n "(cached) " >&6
9356 else
9357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9358 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9359 do
9360   IFS=$as_save_IFS
9361   test -z "$as_dir" && as_dir=.
9362     for ac_prog in mkdir gmkdir; do
9363          for ac_exec_ext in '' $ac_executable_extensions; do
9364            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9365            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9366              'mkdir (GNU coreutils) '* | \
9367              'mkdir (coreutils) '* | \
9368              'mkdir (fileutils) '4.1*)
9369                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9370                break 3;;
9371            esac
9372          done
9373        done
9374   done
9375 IFS=$as_save_IFS
9376
9377 fi
9378
9379   test -d ./--version && rmdir ./--version
9380   if test "${ac_cv_path_mkdir+set}" = set; then
9381     MKDIR_P="$ac_cv_path_mkdir -p"
9382   else
9383     # As a last resort, use the slow shell script.  Don't cache a
9384     # value for MKDIR_P within a source directory, because that will
9385     # break other packages using the cache if that directory is
9386     # removed, or if the value is a relative name.
9387     MKDIR_P="$ac_install_sh -d"
9388   fi
9389 fi
9390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9391 $as_echo "$MKDIR_P" >&6; }
9392
9393 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9394 # a relative path to it in each makefile where it substitutes it. This clashes
9395 # with our Makefile.global concept. This workaround helps.
9396 case $MKDIR_P in
9397   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9398 esac
9399
9400 if test -z "$BISON"; then
9401   for ac_prog in bison
9402 do
9403   # Extract the first word of "$ac_prog", so it can be a program name with args.
9404 set dummy $ac_prog; ac_word=$2
9405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9406 $as_echo_n "checking for $ac_word... " >&6; }
9407 if ${ac_cv_path_BISON+:} false; then :
9408   $as_echo_n "(cached) " >&6
9409 else
9410   case $BISON in
9411   [\\/]* | ?:[\\/]*)
9412   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9413   ;;
9414   *)
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_path_BISON="$as_dir/$ac_word$ac_exec_ext"
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   ;;
9431 esac
9432 fi
9433 BISON=$ac_cv_path_BISON
9434 if test -n "$BISON"; then
9435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9436 $as_echo "$BISON" >&6; }
9437 else
9438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9439 $as_echo "no" >&6; }
9440 fi
9441
9442
9443   test -n "$BISON" && break
9444 done
9445
9446 else
9447   # Report the value of BISON in configure's output in all cases.
9448   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9449 $as_echo_n "checking for BISON... " >&6; }
9450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9451 $as_echo "$BISON" >&6; }
9452 fi
9453
9454
9455 if test "$BISON"; then
9456   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9457   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9458 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9459   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9460   then
9461     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9462 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9463 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9464 $as_echo "$as_me: WARNING:
9465 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9466 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9467     BISON=""
9468   fi
9469   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9470   # of the now preferred %name-prefix "base_yy", but the latter
9471   # doesn't work with Bison 2.3 or less.  So for now we silence the
9472   # deprecation warnings.
9473   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9474   then
9475     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9476   fi
9477 fi
9478
9479 if test -z "$BISON"; then
9480   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9481 *** Without Bison you will not be able to build PostgreSQL from Git nor
9482 *** change any of the parser definition files.  You can obtain Bison from
9483 *** a GNU mirror site.  (If you are using the official distribution of
9484 *** PostgreSQL then you do not need to worry about this, because the Bison
9485 *** output is pre-generated.)" >&5
9486 $as_echo "$as_me: WARNING:
9487 *** Without Bison you will not be able to build PostgreSQL from Git nor
9488 *** change any of the parser definition files.  You can obtain Bison from
9489 *** a GNU mirror site.  (If you are using the official distribution of
9490 *** PostgreSQL then you do not need to worry about this, because the Bison
9491 *** output is pre-generated.)" >&2;}
9492 fi
9493 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9494
9495
9496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9497 $as_echo_n "checking for flex... " >&6; }
9498 if ${pgac_cv_path_flex+:} false; then :
9499   $as_echo_n "(cached) " >&6
9500 else
9501   # Let the user override the test
9502 if test -n "$FLEX"; then
9503   pgac_cv_path_flex=$FLEX
9504 else
9505   pgac_save_IFS=$IFS
9506   IFS=$PATH_SEPARATOR
9507   for pgac_dir in $PATH; do
9508     IFS=$pgac_save_IFS
9509     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9510       pgac_dir=`pwd`
9511     fi
9512     for pgac_prog in flex lex; do
9513       pgac_candidate="$pgac_dir/$pgac_prog"
9514       if test -f "$pgac_candidate" \
9515         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9516       then
9517         echo '%%'  > conftest.l
9518         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9519           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9520           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;}'
9521           then
9522             pgac_cv_path_flex=$pgac_candidate
9523             break 2
9524           else
9525             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9526 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9527 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9528 $as_echo "$as_me: WARNING:
9529 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9530 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9531           fi
9532         fi
9533       fi
9534     done
9535   done
9536   rm -f conftest.l lex.yy.c
9537   : ${pgac_cv_path_flex=no}
9538 fi
9539
9540 fi
9541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9542 $as_echo "$pgac_cv_path_flex" >&6; }
9543 if test x"$pgac_cv_path_flex" = x"no"; then
9544   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9545 *** Without Flex you will not be able to build PostgreSQL from Git nor
9546 *** change any of the scanner definition files.  You can obtain Flex from
9547 *** a GNU mirror site.  (If you are using the official distribution of
9548 *** PostgreSQL then you do not need to worry about this because the Flex
9549 *** output is pre-generated.)" >&5
9550 $as_echo "$as_me: WARNING:
9551 *** Without Flex you will not be able to build PostgreSQL from Git nor
9552 *** change any of the scanner definition files.  You can obtain Flex from
9553 *** a GNU mirror site.  (If you are using the official distribution of
9554 *** PostgreSQL then you do not need to worry about this because the Flex
9555 *** output is pre-generated.)" >&2;}
9556
9557   FLEX=
9558 else
9559   FLEX=$pgac_cv_path_flex
9560   pgac_flex_version=`$FLEX --version 2>/dev/null`
9561   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9562 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9563 fi
9564
9565
9566
9567
9568
9569 if test -z "$PERL"; then
9570   for ac_prog in perl
9571 do
9572   # Extract the first word of "$ac_prog", so it can be a program name with args.
9573 set dummy $ac_prog; ac_word=$2
9574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9575 $as_echo_n "checking for $ac_word... " >&6; }
9576 if ${ac_cv_path_PERL+:} false; then :
9577   $as_echo_n "(cached) " >&6
9578 else
9579   case $PERL in
9580   [\\/]* | ?:[\\/]*)
9581   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9582   ;;
9583   *)
9584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9585 for as_dir in $PATH
9586 do
9587   IFS=$as_save_IFS
9588   test -z "$as_dir" && as_dir=.
9589     for ac_exec_ext in '' $ac_executable_extensions; do
9590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9591     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9593     break 2
9594   fi
9595 done
9596   done
9597 IFS=$as_save_IFS
9598
9599   ;;
9600 esac
9601 fi
9602 PERL=$ac_cv_path_PERL
9603 if test -n "$PERL"; then
9604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9605 $as_echo "$PERL" >&6; }
9606 else
9607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9608 $as_echo "no" >&6; }
9609 fi
9610
9611
9612   test -n "$PERL" && break
9613 done
9614
9615 else
9616   # Report the value of PERL in configure's output in all cases.
9617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9618 $as_echo_n "checking for PERL... " >&6; }
9619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9620 $as_echo "$PERL" >&6; }
9621 fi
9622
9623
9624 if test "$PERL"; then
9625   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'`
9626   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9627 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9628   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9629     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9630   then
9631     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9632 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9633 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9634 $as_echo "$as_me: WARNING:
9635 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9636 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9637     PERL=""
9638   fi
9639 fi
9640
9641 if test -z "$PERL"; then
9642   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9643 *** Without Perl you will not be able to build PostgreSQL from Git.
9644 *** You can obtain Perl from any CPAN mirror site.
9645 *** (If you are using the official distribution of PostgreSQL then you do not
9646 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9647 $as_echo "$as_me: WARNING:
9648 *** Without Perl you will not be able to build PostgreSQL from Git.
9649 *** You can obtain Perl from any CPAN mirror site.
9650 *** (If you are using the official distribution of PostgreSQL then you do not
9651 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9652 fi
9653
9654 if test "$with_perl" = yes; then
9655   if test -z "$PERL"; then
9656     as_fn_error $? "Perl not found" "$LINENO" 5
9657   fi
9658
9659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9660 $as_echo_n "checking for Perl archlibexp... " >&6; }
9661 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9662 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9664 $as_echo "$perl_archlibexp" >&6; }
9665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9666 $as_echo_n "checking for Perl privlibexp... " >&6; }
9667 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9668 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9670 $as_echo "$perl_privlibexp" >&6; }
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9672 $as_echo_n "checking for Perl useshrplib... " >&6; }
9673 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9674 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9676 $as_echo "$perl_useshrplib" >&6; }
9677   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9678     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9679 You might have to rebuild your Perl installation.  Refer to the
9680 documentation for details.  Use --without-perl to disable building
9681 PL/Perl." "$LINENO" 5
9682   fi
9683
9684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9685 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9686 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9688 $as_echo "$perl_ccflags" >&6; }
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9690 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9691 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9693 $as_echo "$perl_embed_ccflags" >&6; }
9694
9695
9696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9697 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9698 if test "$PORTNAME" = "win32" ; then
9699         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9700         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9701                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9702         else
9703                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9704                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9705                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9706                 fi
9707         fi
9708 else
9709         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9710         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9711         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9712 fi
9713 if test -z "$perl_embed_ldflags" ; then
9714         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9715 $as_echo "no" >&6; }
9716         as_fn_error $? "could not determine flags for linking embedded Perl.
9717 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9718 installed." "$LINENO" 5
9719 else
9720         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9721 $as_echo "$perl_embed_ldflags" >&6; }
9722 fi
9723
9724 fi
9725
9726 if test "$with_python" = yes; then
9727   if test -z "$PYTHON"; then
9728   for ac_prog in python
9729 do
9730   # Extract the first word of "$ac_prog", so it can be a program name with args.
9731 set dummy $ac_prog; ac_word=$2
9732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9733 $as_echo_n "checking for $ac_word... " >&6; }
9734 if ${ac_cv_path_PYTHON+:} false; then :
9735   $as_echo_n "(cached) " >&6
9736 else
9737   case $PYTHON in
9738   [\\/]* | ?:[\\/]*)
9739   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9740   ;;
9741   *)
9742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9743 for as_dir in $PATH
9744 do
9745   IFS=$as_save_IFS
9746   test -z "$as_dir" && as_dir=.
9747     for ac_exec_ext in '' $ac_executable_extensions; do
9748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9749     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9751     break 2
9752   fi
9753 done
9754   done
9755 IFS=$as_save_IFS
9756
9757   ;;
9758 esac
9759 fi
9760 PYTHON=$ac_cv_path_PYTHON
9761 if test -n "$PYTHON"; then
9762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9763 $as_echo "$PYTHON" >&6; }
9764 else
9765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9766 $as_echo "no" >&6; }
9767 fi
9768
9769
9770   test -n "$PYTHON" && break
9771 done
9772
9773 else
9774   # Report the value of PYTHON in configure's output in all cases.
9775   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9776 $as_echo_n "checking for PYTHON... " >&6; }
9777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9778 $as_echo "$PYTHON" >&6; }
9779 fi
9780
9781 if test x"$PYTHON" = x""; then
9782   as_fn_error $? "Python not found" "$LINENO" 5
9783 fi
9784
9785
9786 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9787 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9788 $as_echo "$as_me: using python $python_fullversion" >&6;}
9789 # python_fullversion is typically n.n.n plus some trailing junk
9790 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9791 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9792 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9793 # Reject unsupported Python versions as soon as practical.
9794 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9795   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9796 fi
9797
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9799 $as_echo_n "checking for Python distutils module... " >&6; }
9800 if "${PYTHON}" -c 'import distutils' 2>&5
9801 then
9802     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9803 $as_echo "yes" >&6; }
9804 else
9805     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806 $as_echo "no" >&6; }
9807     as_fn_error $? "distutils module not found" "$LINENO" 5
9808 fi
9809
9810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9811 $as_echo_n "checking Python configuration directory... " >&6; }
9812 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9814 $as_echo "$python_configdir" >&6; }
9815
9816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9817 $as_echo_n "checking Python include directories... " >&6; }
9818 python_includespec=`${PYTHON} -c "
9819 import distutils.sysconfig
9820 a = '-I' + distutils.sysconfig.get_python_inc(False)
9821 b = '-I' + distutils.sysconfig.get_python_inc(True)
9822 if a == b:
9823     print(a)
9824 else:
9825     print(a + ' ' + b)"`
9826 if test "$PORTNAME" = win32 ; then
9827     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9828 fi
9829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9830 $as_echo "$python_includespec" >&6; }
9831
9832
9833
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9835 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9836
9837 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9838 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9839
9840 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9841 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9842 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9843 then
9844         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9845         found_shlib=1
9846 else
9847         # Otherwise, guess the base name of the shlib.
9848         # LDVERSION was added in Python 3.2, before that use VERSION,
9849         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9850         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9851         if test x"${python_ldversion}" != x""; then
9852                 ldlibrary="python${python_ldversion}"
9853         else
9854                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9855                 if test x"${python_version_var}" != x""; then
9856                         ldlibrary="python${python_version_var}"
9857                 else
9858                         ldlibrary="python${python_version}"
9859                 fi
9860         fi
9861         # Search for a likely-looking file.
9862         found_shlib=0
9863         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9864         do
9865                 # We don't know the platform DLSUFFIX here, so check 'em all.
9866                 for e in .so .dll .dylib .sl; do
9867                         if test -e "$d/lib${ldlibrary}$e"; then
9868                                 python_libdir="$d"
9869                                 found_shlib=1
9870                                 break 2
9871                         fi
9872                 done
9873         done
9874         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9875         # (".so.n.n") as well. However, check this only after failing to find
9876         # ".so" anywhere, because yet other platforms (Debian) put the .so
9877         # symlink in a different directory from the underlying versioned shlib.
9878         if test "$found_shlib" != 1; then
9879                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9880                 do
9881                         for f in "$d/lib${ldlibrary}.so."* ; do
9882                                 if test -e "$f"; then
9883                                         python_libdir="$d"
9884                                         found_shlib=1
9885                                         break 2
9886                                 fi
9887                         done
9888                 done
9889         fi
9890         # As usual, Windows has its own ideas.  Possible default library
9891         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9892         # and the "lib" prefix might not be there.
9893         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9894                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9895                 do
9896                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9897                                 if test -e "$f"; then
9898                                         python_libdir="$d"
9899                                         found_shlib=1
9900                                         break 2
9901                                 fi
9902                         done
9903                 done
9904         fi
9905 fi
9906 if test "$found_shlib" != 1; then
9907         as_fn_error $? "could not find shared library for Python
9908 You might have to rebuild your Python installation.  Refer to the
9909 documentation for details.  Use --without-python to disable building
9910 PL/Python." "$LINENO" 5
9911 fi
9912 python_libspec="-L${python_libdir} -l${ldlibrary}"
9913
9914 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9915
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9917 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9918
9919
9920
9921 fi
9922
9923 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9924   if test -z "$ZIC"; then
9925   for ac_prog in zic
9926 do
9927   # Extract the first word of "$ac_prog", so it can be a program name with args.
9928 set dummy $ac_prog; ac_word=$2
9929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9930 $as_echo_n "checking for $ac_word... " >&6; }
9931 if ${ac_cv_path_ZIC+:} false; then :
9932   $as_echo_n "(cached) " >&6
9933 else
9934   case $ZIC in
9935   [\\/]* | ?:[\\/]*)
9936   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9937   ;;
9938   *)
9939   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9940 for as_dir in $PATH
9941 do
9942   IFS=$as_save_IFS
9943   test -z "$as_dir" && as_dir=.
9944     for ac_exec_ext in '' $ac_executable_extensions; do
9945   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9946     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9947     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9948     break 2
9949   fi
9950 done
9951   done
9952 IFS=$as_save_IFS
9953
9954   ;;
9955 esac
9956 fi
9957 ZIC=$ac_cv_path_ZIC
9958 if test -n "$ZIC"; then
9959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9960 $as_echo "$ZIC" >&6; }
9961 else
9962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9963 $as_echo "no" >&6; }
9964 fi
9965
9966
9967   test -n "$ZIC" && break
9968 done
9969
9970 else
9971   # Report the value of ZIC in configure's output in all cases.
9972   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9973 $as_echo_n "checking for ZIC... " >&6; }
9974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9975 $as_echo "$ZIC" >&6; }
9976 fi
9977
9978   if test -z "$ZIC"; then
9979     as_fn_error $? "
9980 When cross-compiling, either use the option --with-system-tzdata to use
9981 existing time-zone data, or set the environment variable ZIC to a zic
9982 program to use during the build." "$LINENO" 5
9983   fi
9984 fi
9985
9986 #
9987 # Pthreads
9988 #
9989 # For each platform, we need to know about any special compile and link
9990 # libraries, and whether the normal C function names are thread-safe.
9991 # See the comment at the top of src/port/thread.c for more information.
9992 # WIN32 doesn't need the pthread tests;  it always uses threads
9993 #
9994 # These tests are run before the library-tests, because linking with the
9995 # other libraries can pull in the pthread functions as a side-effect.  We
9996 # want to use the -pthread or similar flags directly, and not rely on
9997 # the side-effects of linking with some other library.
9998 #
9999 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
10000 # invocation below is the first one in the script, and autoconf generates
10001 # additional code for that, which must not be inside the if-block. AS_IF
10002 # knows how to do that.
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10004 $as_echo_n "checking for ANSI C header files... " >&6; }
10005 if ${ac_cv_header_stdc+:} false; then :
10006   $as_echo_n "(cached) " >&6
10007 else
10008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10009 /* end confdefs.h.  */
10010 #include <stdlib.h>
10011 #include <stdarg.h>
10012 #include <string.h>
10013 #include <float.h>
10014
10015 int
10016 main ()
10017 {
10018
10019   ;
10020   return 0;
10021 }
10022 _ACEOF
10023 if ac_fn_c_try_compile "$LINENO"; then :
10024   ac_cv_header_stdc=yes
10025 else
10026   ac_cv_header_stdc=no
10027 fi
10028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10029
10030 if test $ac_cv_header_stdc = yes; then
10031   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10032   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10033 /* end confdefs.h.  */
10034 #include <string.h>
10035
10036 _ACEOF
10037 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10038   $EGREP "memchr" >/dev/null 2>&1; then :
10039
10040 else
10041   ac_cv_header_stdc=no
10042 fi
10043 rm -f conftest*
10044
10045 fi
10046
10047 if test $ac_cv_header_stdc = yes; then
10048   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10049   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10050 /* end confdefs.h.  */
10051 #include <stdlib.h>
10052
10053 _ACEOF
10054 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10055   $EGREP "free" >/dev/null 2>&1; then :
10056
10057 else
10058   ac_cv_header_stdc=no
10059 fi
10060 rm -f conftest*
10061
10062 fi
10063
10064 if test $ac_cv_header_stdc = yes; then
10065   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10066   if test "$cross_compiling" = yes; then :
10067   :
10068 else
10069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10070 /* end confdefs.h.  */
10071 #include <ctype.h>
10072 #include <stdlib.h>
10073 #if ((' ' & 0x0FF) == 0x020)
10074 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10075 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10076 #else
10077 # define ISLOWER(c) \
10078                    (('a' <= (c) && (c) <= 'i') \
10079                      || ('j' <= (c) && (c) <= 'r') \
10080                      || ('s' <= (c) && (c) <= 'z'))
10081 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10082 #endif
10083
10084 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10085 int
10086 main ()
10087 {
10088   int i;
10089   for (i = 0; i < 256; i++)
10090     if (XOR (islower (i), ISLOWER (i))
10091         || toupper (i) != TOUPPER (i))
10092       return 2;
10093   return 0;
10094 }
10095 _ACEOF
10096 if ac_fn_c_try_run "$LINENO"; then :
10097
10098 else
10099   ac_cv_header_stdc=no
10100 fi
10101 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10102   conftest.$ac_objext conftest.beam conftest.$ac_ext
10103 fi
10104
10105 fi
10106 fi
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10108 $as_echo "$ac_cv_header_stdc" >&6; }
10109 if test $ac_cv_header_stdc = yes; then
10110
10111 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10112
10113 fi
10114
10115 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10116 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10117                   inttypes.h stdint.h unistd.h
10118 do :
10119   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10120 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10121 "
10122 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10123   cat >>confdefs.h <<_ACEOF
10124 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10125 _ACEOF
10126
10127 fi
10128
10129 done
10130
10131
10132 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10133    # then
10134
10135
10136
10137 ac_ext=c
10138 ac_cpp='$CPP $CPPFLAGS'
10139 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10140 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10141 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10142
10143 ax_pthread_ok=no
10144
10145 # We used to check for pthread.h first, but this fails if pthread.h
10146 # requires special compiler flags (e.g. on Tru64 or Sequent).
10147 # It gets checked for in the link test anyway.
10148
10149 # First of all, check if the user has set any of the PTHREAD_LIBS,
10150 # etcetera environment variables, and if threads linking works using
10151 # them:
10152 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
10153         save_CFLAGS="$CFLAGS"
10154         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10155         save_LIBS="$LIBS"
10156         LIBS="$PTHREAD_LIBS $LIBS"
10157         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10158 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10159         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10160 /* end confdefs.h.  */
10161
10162 /* Override any GCC internal prototype to avoid an error.
10163    Use char because int might match the return type of a GCC
10164    builtin and then its argument prototype would still apply.  */
10165 #ifdef __cplusplus
10166 extern "C"
10167 #endif
10168 char pthread_join ();
10169 int
10170 main ()
10171 {
10172 return pthread_join ();
10173   ;
10174   return 0;
10175 }
10176 _ACEOF
10177 if ac_fn_c_try_link "$LINENO"; then :
10178   ax_pthread_ok=yes
10179 fi
10180 rm -f core conftest.err conftest.$ac_objext \
10181     conftest$ac_exeext conftest.$ac_ext
10182         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10183 $as_echo "$ax_pthread_ok" >&6; }
10184         if test x"$ax_pthread_ok" = xno; then
10185                 PTHREAD_LIBS=""
10186                 PTHREAD_CFLAGS=""
10187         fi
10188         LIBS="$save_LIBS"
10189         CFLAGS="$save_CFLAGS"
10190 fi
10191
10192 # We must check for the threads library under a number of different
10193 # names; the ordering is very important because some systems
10194 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10195 # libraries is broken (non-POSIX).
10196
10197 # Create a list of thread flags to try.  Items starting with a "-" are
10198 # C compiler flags, and other items are library names, except for "none"
10199 # which indicates that we try without any flags at all, and "pthread-config"
10200 # which is a program returning the flags for the Pth emulation library.
10201
10202 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
10203
10204 # The ordering *is* (sometimes) important.  Some notes on the
10205 # individual items follow:
10206
10207 # pthreads: AIX (must check this before -lpthread)
10208 # none: in case threads are in libc; should be tried before -Kthread and
10209 #       other compiler flags to prevent continual compiler warnings
10210 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10211 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10212 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10213 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10214 # -pthreads: Solaris/gcc
10215 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10216 #      doesn't hurt to check since this sometimes defines pthreads and
10217 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10218 #      is present but should not be used directly)
10219 # -mthreads: Mingw32/gcc, Lynx/gcc
10220 # pthread: Linux, etcetera
10221 # --thread-safe: KAI C++
10222 # pthread-config: use pthread-config program (for GNU Pth library)
10223
10224 case $host_os in
10225
10226         hpux*)
10227
10228         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10229         # multi-threading and also sets -lpthread."
10230
10231         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10232         ;;
10233
10234         openedition*)
10235
10236         # IBM z/OS requires a feature-test macro to be defined in order to
10237         # enable POSIX threads at all, so give the user a hint if this is
10238         # not set. (We don't define these ourselves, as they can affect
10239         # other portions of the system API in unpredictable ways.)
10240
10241         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10242 /* end confdefs.h.  */
10243
10244 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10245              AX_PTHREAD_ZOS_MISSING
10246 #            endif
10247
10248 _ACEOF
10249 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10250   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10251   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10252 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10253 fi
10254 rm -f conftest*
10255
10256         ;;
10257
10258         solaris*)
10259
10260         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
10261         # check that first.  On some older versions, libc contains stubbed
10262         # (non-functional) versions of the pthreads routines, so link-based
10263         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
10264         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
10265         # a function called by this macro, so we could check for that, but
10266         # who knows whether they'll stub that too in a future libc.)  So
10267         # we'll look for -pthreads and -lpthread shortly thereafter.
10268
10269         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
10270         ;;
10271 esac
10272
10273 # Older versions of Clang only give a warning instead of an error for an
10274 # unrecognized option, unless we specify -Werror. (We throw in some extra
10275 # Clang warning flags for good measure.)
10276
10277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
10278 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
10279 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
10280   $as_echo_n "(cached) " >&6
10281 else
10282   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
10283      save_CFLAGS="$CFLAGS"
10284      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
10285      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
10286      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10287 /* end confdefs.h.  */
10288 int foo(void);
10289 int
10290 main ()
10291 {
10292 foo()
10293   ;
10294   return 0;
10295 }
10296 _ACEOF
10297 if ac_fn_c_try_compile "$LINENO"; then :
10298   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
10299 else
10300   ax_cv_PTHREAD_REJECT_UNKNOWN=no
10301 fi
10302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10303      CFLAGS="$save_CFLAGS"
10304
10305 fi
10306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
10307 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
10308 ax_pthread_extra_flags=
10309 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
10310   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
10311 fi
10312
10313 if test x"$ax_pthread_ok" = xno; then
10314 for flag in $ax_pthread_flags; do
10315
10316         case $flag in
10317                 none)
10318                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10319 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10320                 ;;
10321
10322                 -mt,pthread)
10323                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10324 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10325                 PTHREAD_CFLAGS="-mt"
10326                 PTHREAD_LIBS="-lpthread"
10327                 ;;
10328
10329                 -*)
10330                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
10331 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
10332                 PTHREAD_CFLAGS="$flag"
10333                 ;;
10334
10335                 pthread-config)
10336                 # Extract the first word of "pthread-config", so it can be a program name with args.
10337 set dummy pthread-config; ac_word=$2
10338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10339 $as_echo_n "checking for $ac_word... " >&6; }
10340 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10341   $as_echo_n "(cached) " >&6
10342 else
10343   if test -n "$ax_pthread_config"; then
10344   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10345 else
10346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10347 for as_dir in $PATH
10348 do
10349   IFS=$as_save_IFS
10350   test -z "$as_dir" && as_dir=.
10351     for ac_exec_ext in '' $ac_executable_extensions; do
10352   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10353     ac_cv_prog_ax_pthread_config="yes"
10354     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10355     break 2
10356   fi
10357 done
10358   done
10359 IFS=$as_save_IFS
10360
10361   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10362 fi
10363 fi
10364 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10365 if test -n "$ax_pthread_config"; then
10366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10367 $as_echo "$ax_pthread_config" >&6; }
10368 else
10369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10370 $as_echo "no" >&6; }
10371 fi
10372
10373
10374                 if test x"$ax_pthread_config" = xno; then continue; fi
10375                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10376                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10377                 ;;
10378
10379                 *)
10380                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
10381 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
10382                 PTHREAD_LIBS="-l$flag"
10383                 ;;
10384         esac
10385
10386         save_LIBS="$LIBS"
10387         save_CFLAGS="$CFLAGS"
10388         LIBS="$PTHREAD_LIBS $LIBS"
10389         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
10390
10391         # Check for various functions.  We must include pthread.h,
10392         # since some functions may be macros.  (On the Sequent, we
10393         # need a special flag -Kthread to make this header compile.)
10394         # We check for pthread_join because it is in -lpthread on IRIX
10395         # while pthread_create is in libc.  We check for pthread_attr_init
10396         # due to DEC craziness with -lpthreads.  We check for
10397         # pthread_cleanup_push because it is one of the few pthread
10398         # functions on Solaris that doesn't have a non-functional libc stub.
10399         # We try pthread_create on general principles.
10400         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10401 /* end confdefs.h.  */
10402 #include <pthread.h>
10403                         static void routine(void *a) { a = 0; }
10404                         static void *start_routine(void *a) { return a; }
10405 int
10406 main ()
10407 {
10408 pthread_t th; pthread_attr_t attr;
10409                         pthread_create(&th, 0, start_routine, 0);
10410                         pthread_join(th, 0);
10411                         pthread_attr_init(&attr);
10412                         pthread_cleanup_push(routine, 0);
10413                         pthread_cleanup_pop(0) /* ; */
10414   ;
10415   return 0;
10416 }
10417 _ACEOF
10418 if ac_fn_c_try_link "$LINENO"; then :
10419   ax_pthread_ok=yes
10420 fi
10421 rm -f core conftest.err conftest.$ac_objext \
10422     conftest$ac_exeext conftest.$ac_ext
10423
10424         LIBS="$save_LIBS"
10425         CFLAGS="$save_CFLAGS"
10426
10427         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10428 $as_echo "$ax_pthread_ok" >&6; }
10429         if test "x$ax_pthread_ok" = xyes; then
10430                 break;
10431         fi
10432
10433         PTHREAD_LIBS=""
10434         PTHREAD_CFLAGS=""
10435 done
10436 fi
10437
10438 # Various other checks:
10439 if test "x$ax_pthread_ok" = xyes; then
10440         save_LIBS="$LIBS"
10441         LIBS="$PTHREAD_LIBS $LIBS"
10442         save_CFLAGS="$CFLAGS"
10443         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10444
10445         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10446         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10447 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10448 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10449   $as_echo_n "(cached) " >&6
10450 else
10451   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10452              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10453                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10454 /* end confdefs.h.  */
10455 #include <pthread.h>
10456 int
10457 main ()
10458 {
10459 int attr = $attr; return attr /* ; */
10460   ;
10461   return 0;
10462 }
10463 _ACEOF
10464 if ac_fn_c_try_link "$LINENO"; then :
10465   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
10466 fi
10467 rm -f core conftest.err conftest.$ac_objext \
10468     conftest$ac_exeext conftest.$ac_ext
10469              done
10470
10471 fi
10472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10473 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10474         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
10475                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
10476
10477 cat >>confdefs.h <<_ACEOF
10478 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10479 _ACEOF
10480
10481 fi
10482
10483         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
10484 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
10485 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10486   $as_echo_n "(cached) " >&6
10487 else
10488   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10489              ax_pthread_special_flags_added=no
10490              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10491 /* end confdefs.h.  */
10492
10493 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
10494                   AX_PTHREAD_NEED_SPECIAL_FLAG
10495 #                 endif
10496
10497 _ACEOF
10498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10499   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
10500   case $host_os in
10501                   aix* | freebsd*)
10502                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
10503                   ;;
10504                   darwin* | hpux* | osf* | solaris*)
10505                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
10506                   ;;
10507                   esac
10508
10509 fi
10510 rm -f conftest*
10511
10512
10513 fi
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10515 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10516         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10517                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10518   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10519                ax_pthread_special_flags_added=yes
10520 fi
10521
10522         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10523 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10524 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10525   $as_echo_n "(cached) " >&6
10526 else
10527   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10528 /* end confdefs.h.  */
10529 #include <pthread.h>
10530 int
10531 main ()
10532 {
10533 int i = PTHREAD_PRIO_INHERIT;
10534   ;
10535   return 0;
10536 }
10537 _ACEOF
10538 if ac_fn_c_try_link "$LINENO"; then :
10539   ax_cv_PTHREAD_PRIO_INHERIT=yes
10540 else
10541   ax_cv_PTHREAD_PRIO_INHERIT=no
10542 fi
10543 rm -f core conftest.err conftest.$ac_objext \
10544     conftest$ac_exeext conftest.$ac_ext
10545
10546 fi
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10548 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10549         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
10550
10551 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10552
10553 fi
10554
10555         LIBS="$save_LIBS"
10556         CFLAGS="$save_CFLAGS"
10557
10558         # More AIX lossage: compile with *_r variant
10559         if test "x$GCC" != xyes; then
10560             case $host_os in
10561                 aix*)
10562                 case "x/$CC" in #(
10563   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10564     #handle absolute path differently from PATH based program lookup
10565                    case "x$CC" in #(
10566   x/*) :
10567     if as_fn_executable_p ${CC}_r; then :
10568   PTHREAD_CC="${CC}_r"
10569 fi ;; #(
10570   *) :
10571     for ac_prog in ${CC}_r
10572 do
10573   # Extract the first word of "$ac_prog", so it can be a program name with args.
10574 set dummy $ac_prog; ac_word=$2
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10576 $as_echo_n "checking for $ac_word... " >&6; }
10577 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10578   $as_echo_n "(cached) " >&6
10579 else
10580   if test -n "$PTHREAD_CC"; then
10581   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10582 else
10583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10584 for as_dir in $PATH
10585 do
10586   IFS=$as_save_IFS
10587   test -z "$as_dir" && as_dir=.
10588     for ac_exec_ext in '' $ac_executable_extensions; do
10589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10590     ac_cv_prog_PTHREAD_CC="$ac_prog"
10591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10592     break 2
10593   fi
10594 done
10595   done
10596 IFS=$as_save_IFS
10597
10598 fi
10599 fi
10600 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10601 if test -n "$PTHREAD_CC"; then
10602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10603 $as_echo "$PTHREAD_CC" >&6; }
10604 else
10605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10606 $as_echo "no" >&6; }
10607 fi
10608
10609
10610   test -n "$PTHREAD_CC" && break
10611 done
10612 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10613  ;;
10614 esac ;; #(
10615   *) :
10616      ;;
10617 esac
10618                 ;;
10619             esac
10620         fi
10621 fi
10622
10623 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10624
10625
10626
10627
10628
10629 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10630 if test x"$ax_pthread_ok" = xyes; then
10631
10632 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10633
10634         :
10635 else
10636         ax_pthread_ok=no
10637
10638 fi
10639 ac_ext=c
10640 ac_cpp='$CPP $CPPFLAGS'
10641 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10642 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10643 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10644
10645         # set thread flags
10646
10647 # Some platforms use these, so just define them.  They can't hurt if they
10648 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10649 # enables 5-arg getpwuid_r, among other things.
10650 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10651
10652 # Check for *_r functions
10653 _CFLAGS="$CFLAGS"
10654 _LIBS="$LIBS"
10655 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10656 LIBS="$LIBS $PTHREAD_LIBS"
10657
10658 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10659 if test "x$ac_cv_header_pthread_h" = xyes; then :
10660
10661 else
10662   as_fn_error $? "
10663 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10664 fi
10665
10666
10667
10668 for ac_func in strerror_r getpwuid_r gethostbyname_r
10669 do :
10670   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10671 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10672 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10673   cat >>confdefs.h <<_ACEOF
10674 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10675 _ACEOF
10676
10677 fi
10678 done
10679
10680
10681 # Do test here with the proper thread flags
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10683 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10684 if ${pgac_cv_func_strerror_r_int+:} false; then :
10685   $as_echo_n "(cached) " >&6
10686 else
10687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10688 /* end confdefs.h.  */
10689 #include <string.h>
10690 int
10691 main ()
10692 {
10693 #ifndef _AIX
10694 int strerror_r(int, char *, size_t);
10695 #else
10696 /* Older AIX has 'int' for the third argument so we don't test the args. */
10697 int strerror_r();
10698 #endif
10699   ;
10700   return 0;
10701 }
10702 _ACEOF
10703 if ac_fn_c_try_compile "$LINENO"; then :
10704   pgac_cv_func_strerror_r_int=yes
10705 else
10706   pgac_cv_func_strerror_r_int=no
10707 fi
10708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10709 fi
10710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10711 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10712 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10713
10714 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10715
10716 fi
10717
10718
10719 CFLAGS="$_CFLAGS"
10720 LIBS="$_LIBS"
10721
10722
10723 else
10724    # else
10725 # do not use values from template file
10726 PTHREAD_CFLAGS=
10727 PTHREAD_LIBS=
10728
10729 fi # fi
10730
10731
10732
10733
10734
10735 ##
10736 ## Libraries
10737 ##
10738 ## Most libraries are included only if they demonstrably provide a function
10739 ## we need, but libm is an exception: always include it, because there are
10740 ## too many compilers that play cute optimization games that will break
10741 ## probes for standard functions such as pow().
10742 ##
10743
10744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10745 $as_echo_n "checking for main in -lm... " >&6; }
10746 if ${ac_cv_lib_m_main+:} false; then :
10747   $as_echo_n "(cached) " >&6
10748 else
10749   ac_check_lib_save_LIBS=$LIBS
10750 LIBS="-lm  $LIBS"
10751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10752 /* end confdefs.h.  */
10753
10754
10755 int
10756 main ()
10757 {
10758 return main ();
10759   ;
10760   return 0;
10761 }
10762 _ACEOF
10763 if ac_fn_c_try_link "$LINENO"; then :
10764   ac_cv_lib_m_main=yes
10765 else
10766   ac_cv_lib_m_main=no
10767 fi
10768 rm -f core conftest.err conftest.$ac_objext \
10769     conftest$ac_exeext conftest.$ac_ext
10770 LIBS=$ac_check_lib_save_LIBS
10771 fi
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10773 $as_echo "$ac_cv_lib_m_main" >&6; }
10774 if test "x$ac_cv_lib_m_main" = xyes; then :
10775   cat >>confdefs.h <<_ACEOF
10776 #define HAVE_LIBM 1
10777 _ACEOF
10778
10779   LIBS="-lm $LIBS"
10780
10781 fi
10782
10783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10784 $as_echo_n "checking for library containing setproctitle... " >&6; }
10785 if ${ac_cv_search_setproctitle+:} false; then :
10786   $as_echo_n "(cached) " >&6
10787 else
10788   ac_func_search_save_LIBS=$LIBS
10789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10790 /* end confdefs.h.  */
10791
10792 /* Override any GCC internal prototype to avoid an error.
10793    Use char because int might match the return type of a GCC
10794    builtin and then its argument prototype would still apply.  */
10795 #ifdef __cplusplus
10796 extern "C"
10797 #endif
10798 char setproctitle ();
10799 int
10800 main ()
10801 {
10802 return setproctitle ();
10803   ;
10804   return 0;
10805 }
10806 _ACEOF
10807 for ac_lib in '' util; do
10808   if test -z "$ac_lib"; then
10809     ac_res="none required"
10810   else
10811     ac_res=-l$ac_lib
10812     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10813   fi
10814   if ac_fn_c_try_link "$LINENO"; then :
10815   ac_cv_search_setproctitle=$ac_res
10816 fi
10817 rm -f core conftest.err conftest.$ac_objext \
10818     conftest$ac_exeext
10819   if ${ac_cv_search_setproctitle+:} false; then :
10820   break
10821 fi
10822 done
10823 if ${ac_cv_search_setproctitle+:} false; then :
10824
10825 else
10826   ac_cv_search_setproctitle=no
10827 fi
10828 rm conftest.$ac_ext
10829 LIBS=$ac_func_search_save_LIBS
10830 fi
10831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
10832 $as_echo "$ac_cv_search_setproctitle" >&6; }
10833 ac_res=$ac_cv_search_setproctitle
10834 if test "$ac_res" != no; then :
10835   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10836
10837 fi
10838
10839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10840 $as_echo_n "checking for library containing dlopen... " >&6; }
10841 if ${ac_cv_search_dlopen+:} false; then :
10842   $as_echo_n "(cached) " >&6
10843 else
10844   ac_func_search_save_LIBS=$LIBS
10845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10846 /* end confdefs.h.  */
10847
10848 /* Override any GCC internal prototype to avoid an error.
10849    Use char because int might match the return type of a GCC
10850    builtin and then its argument prototype would still apply.  */
10851 #ifdef __cplusplus
10852 extern "C"
10853 #endif
10854 char dlopen ();
10855 int
10856 main ()
10857 {
10858 return dlopen ();
10859   ;
10860   return 0;
10861 }
10862 _ACEOF
10863 for ac_lib in '' dl; do
10864   if test -z "$ac_lib"; then
10865     ac_res="none required"
10866   else
10867     ac_res=-l$ac_lib
10868     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10869   fi
10870   if ac_fn_c_try_link "$LINENO"; then :
10871   ac_cv_search_dlopen=$ac_res
10872 fi
10873 rm -f core conftest.err conftest.$ac_objext \
10874     conftest$ac_exeext
10875   if ${ac_cv_search_dlopen+:} false; then :
10876   break
10877 fi
10878 done
10879 if ${ac_cv_search_dlopen+:} false; then :
10880
10881 else
10882   ac_cv_search_dlopen=no
10883 fi
10884 rm conftest.$ac_ext
10885 LIBS=$ac_func_search_save_LIBS
10886 fi
10887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10888 $as_echo "$ac_cv_search_dlopen" >&6; }
10889 ac_res=$ac_cv_search_dlopen
10890 if test "$ac_res" != no; then :
10891   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10892
10893 fi
10894
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
10896 $as_echo_n "checking for library containing socket... " >&6; }
10897 if ${ac_cv_search_socket+:} false; then :
10898   $as_echo_n "(cached) " >&6
10899 else
10900   ac_func_search_save_LIBS=$LIBS
10901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10902 /* end confdefs.h.  */
10903
10904 /* Override any GCC internal prototype to avoid an error.
10905    Use char because int might match the return type of a GCC
10906    builtin and then its argument prototype would still apply.  */
10907 #ifdef __cplusplus
10908 extern "C"
10909 #endif
10910 char socket ();
10911 int
10912 main ()
10913 {
10914 return socket ();
10915   ;
10916   return 0;
10917 }
10918 _ACEOF
10919 for ac_lib in '' socket ws2_32; do
10920   if test -z "$ac_lib"; then
10921     ac_res="none required"
10922   else
10923     ac_res=-l$ac_lib
10924     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10925   fi
10926   if ac_fn_c_try_link "$LINENO"; then :
10927   ac_cv_search_socket=$ac_res
10928 fi
10929 rm -f core conftest.err conftest.$ac_objext \
10930     conftest$ac_exeext
10931   if ${ac_cv_search_socket+:} false; then :
10932   break
10933 fi
10934 done
10935 if ${ac_cv_search_socket+:} false; then :
10936
10937 else
10938   ac_cv_search_socket=no
10939 fi
10940 rm conftest.$ac_ext
10941 LIBS=$ac_func_search_save_LIBS
10942 fi
10943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
10944 $as_echo "$ac_cv_search_socket" >&6; }
10945 ac_res=$ac_cv_search_socket
10946 if test "$ac_res" != no; then :
10947   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10948
10949 fi
10950
10951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
10952 $as_echo_n "checking for library containing shl_load... " >&6; }
10953 if ${ac_cv_search_shl_load+:} false; then :
10954   $as_echo_n "(cached) " >&6
10955 else
10956   ac_func_search_save_LIBS=$LIBS
10957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10958 /* end confdefs.h.  */
10959
10960 /* Override any GCC internal prototype to avoid an error.
10961    Use char because int might match the return type of a GCC
10962    builtin and then its argument prototype would still apply.  */
10963 #ifdef __cplusplus
10964 extern "C"
10965 #endif
10966 char shl_load ();
10967 int
10968 main ()
10969 {
10970 return shl_load ();
10971   ;
10972   return 0;
10973 }
10974 _ACEOF
10975 for ac_lib in '' dld; do
10976   if test -z "$ac_lib"; then
10977     ac_res="none required"
10978   else
10979     ac_res=-l$ac_lib
10980     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10981   fi
10982   if ac_fn_c_try_link "$LINENO"; then :
10983   ac_cv_search_shl_load=$ac_res
10984 fi
10985 rm -f core conftest.err conftest.$ac_objext \
10986     conftest$ac_exeext
10987   if ${ac_cv_search_shl_load+:} false; then :
10988   break
10989 fi
10990 done
10991 if ${ac_cv_search_shl_load+:} false; then :
10992
10993 else
10994   ac_cv_search_shl_load=no
10995 fi
10996 rm conftest.$ac_ext
10997 LIBS=$ac_func_search_save_LIBS
10998 fi
10999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11000 $as_echo "$ac_cv_search_shl_load" >&6; }
11001 ac_res=$ac_cv_search_shl_load
11002 if test "$ac_res" != no; then :
11003   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11004
11005 fi
11006
11007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11008 $as_echo_n "checking for library containing getopt_long... " >&6; }
11009 if ${ac_cv_search_getopt_long+:} false; then :
11010   $as_echo_n "(cached) " >&6
11011 else
11012   ac_func_search_save_LIBS=$LIBS
11013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11014 /* end confdefs.h.  */
11015
11016 /* Override any GCC internal prototype to avoid an error.
11017    Use char because int might match the return type of a GCC
11018    builtin and then its argument prototype would still apply.  */
11019 #ifdef __cplusplus
11020 extern "C"
11021 #endif
11022 char getopt_long ();
11023 int
11024 main ()
11025 {
11026 return getopt_long ();
11027   ;
11028   return 0;
11029 }
11030 _ACEOF
11031 for ac_lib in '' getopt gnugetopt; do
11032   if test -z "$ac_lib"; then
11033     ac_res="none required"
11034   else
11035     ac_res=-l$ac_lib
11036     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11037   fi
11038   if ac_fn_c_try_link "$LINENO"; then :
11039   ac_cv_search_getopt_long=$ac_res
11040 fi
11041 rm -f core conftest.err conftest.$ac_objext \
11042     conftest$ac_exeext
11043   if ${ac_cv_search_getopt_long+:} false; then :
11044   break
11045 fi
11046 done
11047 if ${ac_cv_search_getopt_long+:} false; then :
11048
11049 else
11050   ac_cv_search_getopt_long=no
11051 fi
11052 rm conftest.$ac_ext
11053 LIBS=$ac_func_search_save_LIBS
11054 fi
11055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11056 $as_echo "$ac_cv_search_getopt_long" >&6; }
11057 ac_res=$ac_cv_search_getopt_long
11058 if test "$ac_res" != no; then :
11059   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11060
11061 fi
11062
11063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11064 $as_echo_n "checking for library containing crypt... " >&6; }
11065 if ${ac_cv_search_crypt+:} false; then :
11066   $as_echo_n "(cached) " >&6
11067 else
11068   ac_func_search_save_LIBS=$LIBS
11069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11070 /* end confdefs.h.  */
11071
11072 /* Override any GCC internal prototype to avoid an error.
11073    Use char because int might match the return type of a GCC
11074    builtin and then its argument prototype would still apply.  */
11075 #ifdef __cplusplus
11076 extern "C"
11077 #endif
11078 char crypt ();
11079 int
11080 main ()
11081 {
11082 return crypt ();
11083   ;
11084   return 0;
11085 }
11086 _ACEOF
11087 for ac_lib in '' crypt; do
11088   if test -z "$ac_lib"; then
11089     ac_res="none required"
11090   else
11091     ac_res=-l$ac_lib
11092     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11093   fi
11094   if ac_fn_c_try_link "$LINENO"; then :
11095   ac_cv_search_crypt=$ac_res
11096 fi
11097 rm -f core conftest.err conftest.$ac_objext \
11098     conftest$ac_exeext
11099   if ${ac_cv_search_crypt+:} false; then :
11100   break
11101 fi
11102 done
11103 if ${ac_cv_search_crypt+:} false; then :
11104
11105 else
11106   ac_cv_search_crypt=no
11107 fi
11108 rm conftest.$ac_ext
11109 LIBS=$ac_func_search_save_LIBS
11110 fi
11111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11112 $as_echo "$ac_cv_search_crypt" >&6; }
11113 ac_res=$ac_cv_search_crypt
11114 if test "$ac_res" != no; then :
11115   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11116
11117 fi
11118
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11120 $as_echo_n "checking for library containing shm_open... " >&6; }
11121 if ${ac_cv_search_shm_open+:} false; then :
11122   $as_echo_n "(cached) " >&6
11123 else
11124   ac_func_search_save_LIBS=$LIBS
11125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11126 /* end confdefs.h.  */
11127
11128 /* Override any GCC internal prototype to avoid an error.
11129    Use char because int might match the return type of a GCC
11130    builtin and then its argument prototype would still apply.  */
11131 #ifdef __cplusplus
11132 extern "C"
11133 #endif
11134 char shm_open ();
11135 int
11136 main ()
11137 {
11138 return shm_open ();
11139   ;
11140   return 0;
11141 }
11142 _ACEOF
11143 for ac_lib in '' rt; do
11144   if test -z "$ac_lib"; then
11145     ac_res="none required"
11146   else
11147     ac_res=-l$ac_lib
11148     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11149   fi
11150   if ac_fn_c_try_link "$LINENO"; then :
11151   ac_cv_search_shm_open=$ac_res
11152 fi
11153 rm -f core conftest.err conftest.$ac_objext \
11154     conftest$ac_exeext
11155   if ${ac_cv_search_shm_open+:} false; then :
11156   break
11157 fi
11158 done
11159 if ${ac_cv_search_shm_open+:} false; then :
11160
11161 else
11162   ac_cv_search_shm_open=no
11163 fi
11164 rm conftest.$ac_ext
11165 LIBS=$ac_func_search_save_LIBS
11166 fi
11167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11168 $as_echo "$ac_cv_search_shm_open" >&6; }
11169 ac_res=$ac_cv_search_shm_open
11170 if test "$ac_res" != no; then :
11171   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11172
11173 fi
11174
11175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11176 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11177 if ${ac_cv_search_shm_unlink+:} false; then :
11178   $as_echo_n "(cached) " >&6
11179 else
11180   ac_func_search_save_LIBS=$LIBS
11181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11182 /* end confdefs.h.  */
11183
11184 /* Override any GCC internal prototype to avoid an error.
11185    Use char because int might match the return type of a GCC
11186    builtin and then its argument prototype would still apply.  */
11187 #ifdef __cplusplus
11188 extern "C"
11189 #endif
11190 char shm_unlink ();
11191 int
11192 main ()
11193 {
11194 return shm_unlink ();
11195   ;
11196   return 0;
11197 }
11198 _ACEOF
11199 for ac_lib in '' rt; do
11200   if test -z "$ac_lib"; then
11201     ac_res="none required"
11202   else
11203     ac_res=-l$ac_lib
11204     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11205   fi
11206   if ac_fn_c_try_link "$LINENO"; then :
11207   ac_cv_search_shm_unlink=$ac_res
11208 fi
11209 rm -f core conftest.err conftest.$ac_objext \
11210     conftest$ac_exeext
11211   if ${ac_cv_search_shm_unlink+:} false; then :
11212   break
11213 fi
11214 done
11215 if ${ac_cv_search_shm_unlink+:} false; then :
11216
11217 else
11218   ac_cv_search_shm_unlink=no
11219 fi
11220 rm conftest.$ac_ext
11221 LIBS=$ac_func_search_save_LIBS
11222 fi
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11224 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11225 ac_res=$ac_cv_search_shm_unlink
11226 if test "$ac_res" != no; then :
11227   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11228
11229 fi
11230
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11232 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11233 if ${ac_cv_search_clock_gettime+:} false; then :
11234   $as_echo_n "(cached) " >&6
11235 else
11236   ac_func_search_save_LIBS=$LIBS
11237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11238 /* end confdefs.h.  */
11239
11240 /* Override any GCC internal prototype to avoid an error.
11241    Use char because int might match the return type of a GCC
11242    builtin and then its argument prototype would still apply.  */
11243 #ifdef __cplusplus
11244 extern "C"
11245 #endif
11246 char clock_gettime ();
11247 int
11248 main ()
11249 {
11250 return clock_gettime ();
11251   ;
11252   return 0;
11253 }
11254 _ACEOF
11255 for ac_lib in '' rt posix4; do
11256   if test -z "$ac_lib"; then
11257     ac_res="none required"
11258   else
11259     ac_res=-l$ac_lib
11260     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11261   fi
11262   if ac_fn_c_try_link "$LINENO"; then :
11263   ac_cv_search_clock_gettime=$ac_res
11264 fi
11265 rm -f core conftest.err conftest.$ac_objext \
11266     conftest$ac_exeext
11267   if ${ac_cv_search_clock_gettime+:} false; then :
11268   break
11269 fi
11270 done
11271 if ${ac_cv_search_clock_gettime+:} false; then :
11272
11273 else
11274   ac_cv_search_clock_gettime=no
11275 fi
11276 rm conftest.$ac_ext
11277 LIBS=$ac_func_search_save_LIBS
11278 fi
11279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11280 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11281 ac_res=$ac_cv_search_clock_gettime
11282 if test "$ac_res" != no; then :
11283   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11284
11285 fi
11286
11287 # Solaris:
11288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11289 $as_echo_n "checking for library containing fdatasync... " >&6; }
11290 if ${ac_cv_search_fdatasync+:} false; then :
11291   $as_echo_n "(cached) " >&6
11292 else
11293   ac_func_search_save_LIBS=$LIBS
11294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11295 /* end confdefs.h.  */
11296
11297 /* Override any GCC internal prototype to avoid an error.
11298    Use char because int might match the return type of a GCC
11299    builtin and then its argument prototype would still apply.  */
11300 #ifdef __cplusplus
11301 extern "C"
11302 #endif
11303 char fdatasync ();
11304 int
11305 main ()
11306 {
11307 return fdatasync ();
11308   ;
11309   return 0;
11310 }
11311 _ACEOF
11312 for ac_lib in '' rt posix4; do
11313   if test -z "$ac_lib"; then
11314     ac_res="none required"
11315   else
11316     ac_res=-l$ac_lib
11317     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11318   fi
11319   if ac_fn_c_try_link "$LINENO"; then :
11320   ac_cv_search_fdatasync=$ac_res
11321 fi
11322 rm -f core conftest.err conftest.$ac_objext \
11323     conftest$ac_exeext
11324   if ${ac_cv_search_fdatasync+:} false; then :
11325   break
11326 fi
11327 done
11328 if ${ac_cv_search_fdatasync+:} false; then :
11329
11330 else
11331   ac_cv_search_fdatasync=no
11332 fi
11333 rm conftest.$ac_ext
11334 LIBS=$ac_func_search_save_LIBS
11335 fi
11336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11337 $as_echo "$ac_cv_search_fdatasync" >&6; }
11338 ac_res=$ac_cv_search_fdatasync
11339 if test "$ac_res" != no; then :
11340   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11341
11342 fi
11343
11344 # Required for thread_test.c on Solaris
11345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11346 $as_echo_n "checking for library containing sched_yield... " >&6; }
11347 if ${ac_cv_search_sched_yield+:} false; then :
11348   $as_echo_n "(cached) " >&6
11349 else
11350   ac_func_search_save_LIBS=$LIBS
11351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11352 /* end confdefs.h.  */
11353
11354 /* Override any GCC internal prototype to avoid an error.
11355    Use char because int might match the return type of a GCC
11356    builtin and then its argument prototype would still apply.  */
11357 #ifdef __cplusplus
11358 extern "C"
11359 #endif
11360 char sched_yield ();
11361 int
11362 main ()
11363 {
11364 return sched_yield ();
11365   ;
11366   return 0;
11367 }
11368 _ACEOF
11369 for ac_lib in '' rt; do
11370   if test -z "$ac_lib"; then
11371     ac_res="none required"
11372   else
11373     ac_res=-l$ac_lib
11374     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11375   fi
11376   if ac_fn_c_try_link "$LINENO"; then :
11377   ac_cv_search_sched_yield=$ac_res
11378 fi
11379 rm -f core conftest.err conftest.$ac_objext \
11380     conftest$ac_exeext
11381   if ${ac_cv_search_sched_yield+:} false; then :
11382   break
11383 fi
11384 done
11385 if ${ac_cv_search_sched_yield+:} false; then :
11386
11387 else
11388   ac_cv_search_sched_yield=no
11389 fi
11390 rm conftest.$ac_ext
11391 LIBS=$ac_func_search_save_LIBS
11392 fi
11393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11394 $as_echo "$ac_cv_search_sched_yield" >&6; }
11395 ac_res=$ac_cv_search_sched_yield
11396 if test "$ac_res" != no; then :
11397   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11398
11399 fi
11400
11401 # Required for thread_test.c on Solaris 2.5:
11402 # Other ports use it too (HP-UX) so test unconditionally
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11404 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11405 if ${ac_cv_search_gethostbyname_r+:} false; then :
11406   $as_echo_n "(cached) " >&6
11407 else
11408   ac_func_search_save_LIBS=$LIBS
11409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11410 /* end confdefs.h.  */
11411
11412 /* Override any GCC internal prototype to avoid an error.
11413    Use char because int might match the return type of a GCC
11414    builtin and then its argument prototype would still apply.  */
11415 #ifdef __cplusplus
11416 extern "C"
11417 #endif
11418 char gethostbyname_r ();
11419 int
11420 main ()
11421 {
11422 return gethostbyname_r ();
11423   ;
11424   return 0;
11425 }
11426 _ACEOF
11427 for ac_lib in '' nsl; do
11428   if test -z "$ac_lib"; then
11429     ac_res="none required"
11430   else
11431     ac_res=-l$ac_lib
11432     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11433   fi
11434   if ac_fn_c_try_link "$LINENO"; then :
11435   ac_cv_search_gethostbyname_r=$ac_res
11436 fi
11437 rm -f core conftest.err conftest.$ac_objext \
11438     conftest$ac_exeext
11439   if ${ac_cv_search_gethostbyname_r+:} false; then :
11440   break
11441 fi
11442 done
11443 if ${ac_cv_search_gethostbyname_r+:} false; then :
11444
11445 else
11446   ac_cv_search_gethostbyname_r=no
11447 fi
11448 rm conftest.$ac_ext
11449 LIBS=$ac_func_search_save_LIBS
11450 fi
11451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11452 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11453 ac_res=$ac_cv_search_gethostbyname_r
11454 if test "$ac_res" != no; then :
11455   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11456
11457 fi
11458
11459 # Cygwin:
11460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11461 $as_echo_n "checking for library containing shmget... " >&6; }
11462 if ${ac_cv_search_shmget+:} false; then :
11463   $as_echo_n "(cached) " >&6
11464 else
11465   ac_func_search_save_LIBS=$LIBS
11466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11467 /* end confdefs.h.  */
11468
11469 /* Override any GCC internal prototype to avoid an error.
11470    Use char because int might match the return type of a GCC
11471    builtin and then its argument prototype would still apply.  */
11472 #ifdef __cplusplus
11473 extern "C"
11474 #endif
11475 char shmget ();
11476 int
11477 main ()
11478 {
11479 return shmget ();
11480   ;
11481   return 0;
11482 }
11483 _ACEOF
11484 for ac_lib in '' cygipc; do
11485   if test -z "$ac_lib"; then
11486     ac_res="none required"
11487   else
11488     ac_res=-l$ac_lib
11489     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11490   fi
11491   if ac_fn_c_try_link "$LINENO"; then :
11492   ac_cv_search_shmget=$ac_res
11493 fi
11494 rm -f core conftest.err conftest.$ac_objext \
11495     conftest$ac_exeext
11496   if ${ac_cv_search_shmget+:} false; then :
11497   break
11498 fi
11499 done
11500 if ${ac_cv_search_shmget+:} false; then :
11501
11502 else
11503   ac_cv_search_shmget=no
11504 fi
11505 rm conftest.$ac_ext
11506 LIBS=$ac_func_search_save_LIBS
11507 fi
11508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11509 $as_echo "$ac_cv_search_shmget" >&6; }
11510 ac_res=$ac_cv_search_shmget
11511 if test "$ac_res" != no; then :
11512   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11513
11514 fi
11515
11516
11517 if test "$with_readline" = yes; then
11518
11519
11520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11521 $as_echo_n "checking for library containing readline... " >&6; }
11522 if ${pgac_cv_check_readline+:} false; then :
11523   $as_echo_n "(cached) " >&6
11524 else
11525   pgac_cv_check_readline=no
11526 pgac_save_LIBS=$LIBS
11527 if test x"$with_libedit_preferred" != x"yes"
11528 then    READLINE_ORDER="-lreadline -ledit"
11529 else    READLINE_ORDER="-ledit -lreadline"
11530 fi
11531 for pgac_rllib in $READLINE_ORDER ; do
11532   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11533     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11534     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11535 /* end confdefs.h.  */
11536
11537 /* Override any GCC internal prototype to avoid an error.
11538    Use char because int might match the return type of a GCC
11539    builtin and then its argument prototype would still apply.  */
11540 #ifdef __cplusplus
11541 extern "C"
11542 #endif
11543 char readline ();
11544 int
11545 main ()
11546 {
11547 return readline ();
11548   ;
11549   return 0;
11550 }
11551 _ACEOF
11552 if ac_fn_c_try_link "$LINENO"; then :
11553
11554       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11555       # recognize dependent libraries; assume curses is needed if we didn't
11556       # find any dependency.
11557       case $host_os in
11558         netbsd* | openbsd* | irix*)
11559           if test x"$pgac_lib" = x"" ; then
11560             pgac_lib=" -lcurses"
11561           fi ;;
11562       esac
11563
11564       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11565       break
11566
11567 fi
11568 rm -f core conftest.err conftest.$ac_objext \
11569     conftest$ac_exeext conftest.$ac_ext
11570   done
11571   if test "$pgac_cv_check_readline" != no ; then
11572     break
11573   fi
11574 done
11575 LIBS=$pgac_save_LIBS
11576
11577 fi
11578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11579 $as_echo "$pgac_cv_check_readline" >&6; }
11580 if test "$pgac_cv_check_readline" != no ; then
11581   LIBS="$pgac_cv_check_readline $LIBS"
11582
11583 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11584
11585 fi
11586
11587
11588   if test x"$pgac_cv_check_readline" = x"no"; then
11589     as_fn_error $? "readline library not found
11590 If you have readline already installed, see config.log for details on the
11591 failure.  It is possible the compiler isn't looking in the proper directory.
11592 Use --without-readline to disable readline support." "$LINENO" 5
11593   fi
11594 fi
11595
11596 if test "$with_zlib" = yes; then
11597   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11598 $as_echo_n "checking for inflate in -lz... " >&6; }
11599 if ${ac_cv_lib_z_inflate+:} false; then :
11600   $as_echo_n "(cached) " >&6
11601 else
11602   ac_check_lib_save_LIBS=$LIBS
11603 LIBS="-lz  $LIBS"
11604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11605 /* end confdefs.h.  */
11606
11607 /* Override any GCC internal prototype to avoid an error.
11608    Use char because int might match the return type of a GCC
11609    builtin and then its argument prototype would still apply.  */
11610 #ifdef __cplusplus
11611 extern "C"
11612 #endif
11613 char inflate ();
11614 int
11615 main ()
11616 {
11617 return inflate ();
11618   ;
11619   return 0;
11620 }
11621 _ACEOF
11622 if ac_fn_c_try_link "$LINENO"; then :
11623   ac_cv_lib_z_inflate=yes
11624 else
11625   ac_cv_lib_z_inflate=no
11626 fi
11627 rm -f core conftest.err conftest.$ac_objext \
11628     conftest$ac_exeext conftest.$ac_ext
11629 LIBS=$ac_check_lib_save_LIBS
11630 fi
11631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11632 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11633 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11634   cat >>confdefs.h <<_ACEOF
11635 #define HAVE_LIBZ 1
11636 _ACEOF
11637
11638   LIBS="-lz $LIBS"
11639
11640 else
11641   as_fn_error $? "zlib library not found
11642 If you have zlib already installed, see config.log for details on the
11643 failure.  It is possible the compiler isn't looking in the proper directory.
11644 Use --without-zlib to disable zlib support." "$LINENO" 5
11645 fi
11646
11647 fi
11648
11649 if test "$enable_spinlocks" = yes; then
11650
11651 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11652
11653 else
11654   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11655 *** Not using spinlocks will cause poor performance." >&5
11656 $as_echo "$as_me: WARNING:
11657 *** Not using spinlocks will cause poor performance." >&2;}
11658 fi
11659
11660 if test "$enable_atomics" = yes; then
11661
11662 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11663
11664 else
11665   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11666 *** Not using atomic operations will cause poor performance." >&5
11667 $as_echo "$as_me: WARNING:
11668 *** Not using atomic operations will cause poor performance." >&2;}
11669 fi
11670
11671 if test "$with_gssapi" = yes ; then
11672   if test "$PORTNAME" != "win32"; then
11673     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11674 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11675 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11676   $as_echo_n "(cached) " >&6
11677 else
11678   ac_func_search_save_LIBS=$LIBS
11679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11680 /* end confdefs.h.  */
11681
11682 /* Override any GCC internal prototype to avoid an error.
11683    Use char because int might match the return type of a GCC
11684    builtin and then its argument prototype would still apply.  */
11685 #ifdef __cplusplus
11686 extern "C"
11687 #endif
11688 char gss_init_sec_context ();
11689 int
11690 main ()
11691 {
11692 return gss_init_sec_context ();
11693   ;
11694   return 0;
11695 }
11696 _ACEOF
11697 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11698   if test -z "$ac_lib"; then
11699     ac_res="none required"
11700   else
11701     ac_res=-l$ac_lib
11702     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11703   fi
11704   if ac_fn_c_try_link "$LINENO"; then :
11705   ac_cv_search_gss_init_sec_context=$ac_res
11706 fi
11707 rm -f core conftest.err conftest.$ac_objext \
11708     conftest$ac_exeext
11709   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11710   break
11711 fi
11712 done
11713 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11714
11715 else
11716   ac_cv_search_gss_init_sec_context=no
11717 fi
11718 rm conftest.$ac_ext
11719 LIBS=$ac_func_search_save_LIBS
11720 fi
11721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11722 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11723 ac_res=$ac_cv_search_gss_init_sec_context
11724 if test "$ac_res" != no; then :
11725   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11726
11727 else
11728   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11729 fi
11730
11731   else
11732     LIBS="$LIBS -lgssapi32"
11733   fi
11734 fi
11735
11736 if test "$with_openssl" = yes ; then
11737     if test "$PORTNAME" != "win32"; then
11738      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11739 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11740 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11741   $as_echo_n "(cached) " >&6
11742 else
11743   ac_check_lib_save_LIBS=$LIBS
11744 LIBS="-lcrypto  $LIBS"
11745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11746 /* end confdefs.h.  */
11747
11748 /* Override any GCC internal prototype to avoid an error.
11749    Use char because int might match the return type of a GCC
11750    builtin and then its argument prototype would still apply.  */
11751 #ifdef __cplusplus
11752 extern "C"
11753 #endif
11754 char CRYPTO_new_ex_data ();
11755 int
11756 main ()
11757 {
11758 return CRYPTO_new_ex_data ();
11759   ;
11760   return 0;
11761 }
11762 _ACEOF
11763 if ac_fn_c_try_link "$LINENO"; then :
11764   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11765 else
11766   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11767 fi
11768 rm -f core conftest.err conftest.$ac_objext \
11769     conftest$ac_exeext conftest.$ac_ext
11770 LIBS=$ac_check_lib_save_LIBS
11771 fi
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11773 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11774 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11775   cat >>confdefs.h <<_ACEOF
11776 #define HAVE_LIBCRYPTO 1
11777 _ACEOF
11778
11779   LIBS="-lcrypto $LIBS"
11780
11781 else
11782   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11783 fi
11784
11785      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11786 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11787 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11788   $as_echo_n "(cached) " >&6
11789 else
11790   ac_check_lib_save_LIBS=$LIBS
11791 LIBS="-lssl  $LIBS"
11792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11793 /* end confdefs.h.  */
11794
11795 /* Override any GCC internal prototype to avoid an error.
11796    Use char because int might match the return type of a GCC
11797    builtin and then its argument prototype would still apply.  */
11798 #ifdef __cplusplus
11799 extern "C"
11800 #endif
11801 char SSL_new ();
11802 int
11803 main ()
11804 {
11805 return SSL_new ();
11806   ;
11807   return 0;
11808 }
11809 _ACEOF
11810 if ac_fn_c_try_link "$LINENO"; then :
11811   ac_cv_lib_ssl_SSL_new=yes
11812 else
11813   ac_cv_lib_ssl_SSL_new=no
11814 fi
11815 rm -f core conftest.err conftest.$ac_objext \
11816     conftest$ac_exeext conftest.$ac_ext
11817 LIBS=$ac_check_lib_save_LIBS
11818 fi
11819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
11820 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
11821 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
11822   cat >>confdefs.h <<_ACEOF
11823 #define HAVE_LIBSSL 1
11824 _ACEOF
11825
11826   LIBS="-lssl $LIBS"
11827
11828 else
11829   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
11830 fi
11831
11832   else
11833      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
11834 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
11835 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11836   $as_echo_n "(cached) " >&6
11837 else
11838   ac_func_search_save_LIBS=$LIBS
11839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11840 /* end confdefs.h.  */
11841
11842 /* Override any GCC internal prototype to avoid an error.
11843    Use char because int might match the return type of a GCC
11844    builtin and then its argument prototype would still apply.  */
11845 #ifdef __cplusplus
11846 extern "C"
11847 #endif
11848 char CRYPTO_new_ex_data ();
11849 int
11850 main ()
11851 {
11852 return CRYPTO_new_ex_data ();
11853   ;
11854   return 0;
11855 }
11856 _ACEOF
11857 for ac_lib in '' eay32 crypto; do
11858   if test -z "$ac_lib"; then
11859     ac_res="none required"
11860   else
11861     ac_res=-l$ac_lib
11862     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11863   fi
11864   if ac_fn_c_try_link "$LINENO"; then :
11865   ac_cv_search_CRYPTO_new_ex_data=$ac_res
11866 fi
11867 rm -f core conftest.err conftest.$ac_objext \
11868     conftest$ac_exeext
11869   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11870   break
11871 fi
11872 done
11873 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11874
11875 else
11876   ac_cv_search_CRYPTO_new_ex_data=no
11877 fi
11878 rm conftest.$ac_ext
11879 LIBS=$ac_func_search_save_LIBS
11880 fi
11881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
11882 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
11883 ac_res=$ac_cv_search_CRYPTO_new_ex_data
11884 if test "$ac_res" != no; then :
11885   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11886
11887 else
11888   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
11889 fi
11890
11891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
11892 $as_echo_n "checking for library containing SSL_new... " >&6; }
11893 if ${ac_cv_search_SSL_new+:} false; then :
11894   $as_echo_n "(cached) " >&6
11895 else
11896   ac_func_search_save_LIBS=$LIBS
11897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11898 /* end confdefs.h.  */
11899
11900 /* Override any GCC internal prototype to avoid an error.
11901    Use char because int might match the return type of a GCC
11902    builtin and then its argument prototype would still apply.  */
11903 #ifdef __cplusplus
11904 extern "C"
11905 #endif
11906 char SSL_new ();
11907 int
11908 main ()
11909 {
11910 return SSL_new ();
11911   ;
11912   return 0;
11913 }
11914 _ACEOF
11915 for ac_lib in '' ssleay32 ssl; do
11916   if test -z "$ac_lib"; then
11917     ac_res="none required"
11918   else
11919     ac_res=-l$ac_lib
11920     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11921   fi
11922   if ac_fn_c_try_link "$LINENO"; then :
11923   ac_cv_search_SSL_new=$ac_res
11924 fi
11925 rm -f core conftest.err conftest.$ac_objext \
11926     conftest$ac_exeext
11927   if ${ac_cv_search_SSL_new+:} false; then :
11928   break
11929 fi
11930 done
11931 if ${ac_cv_search_SSL_new+:} false; then :
11932
11933 else
11934   ac_cv_search_SSL_new=no
11935 fi
11936 rm conftest.$ac_ext
11937 LIBS=$ac_func_search_save_LIBS
11938 fi
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
11940 $as_echo "$ac_cv_search_SSL_new" >&6; }
11941 ac_res=$ac_cv_search_SSL_new
11942 if test "$ac_res" != no; then :
11943   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11944
11945 else
11946   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
11947 fi
11948
11949   fi
11950   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
11951 do :
11952   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11953 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11954 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11955   cat >>confdefs.h <<_ACEOF
11956 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11957 _ACEOF
11958
11959 fi
11960 done
11961
11962   # Functions introduced in OpenSSL 1.1.0. We used to check for
11963   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
11964   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
11965   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
11966   # functions.
11967   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
11968 do :
11969   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11970 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11971 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11972   cat >>confdefs.h <<_ACEOF
11973 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11974 _ACEOF
11975
11976 fi
11977 done
11978
11979   # OpenSSL versions before 1.1.0 required setting callback functions, for
11980   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
11981   # function was removed.
11982   for ac_func in CRYPTO_lock
11983 do :
11984   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
11985 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
11986   cat >>confdefs.h <<_ACEOF
11987 #define HAVE_CRYPTO_LOCK 1
11988 _ACEOF
11989
11990 fi
11991 done
11992
11993 fi
11994
11995 if test "$with_pam" = yes ; then
11996   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
11997 $as_echo_n "checking for pam_start in -lpam... " >&6; }
11998 if ${ac_cv_lib_pam_pam_start+:} false; then :
11999   $as_echo_n "(cached) " >&6
12000 else
12001   ac_check_lib_save_LIBS=$LIBS
12002 LIBS="-lpam  $LIBS"
12003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12004 /* end confdefs.h.  */
12005
12006 /* Override any GCC internal prototype to avoid an error.
12007    Use char because int might match the return type of a GCC
12008    builtin and then its argument prototype would still apply.  */
12009 #ifdef __cplusplus
12010 extern "C"
12011 #endif
12012 char pam_start ();
12013 int
12014 main ()
12015 {
12016 return pam_start ();
12017   ;
12018   return 0;
12019 }
12020 _ACEOF
12021 if ac_fn_c_try_link "$LINENO"; then :
12022   ac_cv_lib_pam_pam_start=yes
12023 else
12024   ac_cv_lib_pam_pam_start=no
12025 fi
12026 rm -f core conftest.err conftest.$ac_objext \
12027     conftest$ac_exeext conftest.$ac_ext
12028 LIBS=$ac_check_lib_save_LIBS
12029 fi
12030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12031 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12032 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12033   cat >>confdefs.h <<_ACEOF
12034 #define HAVE_LIBPAM 1
12035 _ACEOF
12036
12037   LIBS="-lpam $LIBS"
12038
12039 else
12040   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12041 fi
12042
12043 fi
12044
12045 if test "$with_libxml" = yes ; then
12046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12047 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12048 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12049   $as_echo_n "(cached) " >&6
12050 else
12051   ac_check_lib_save_LIBS=$LIBS
12052 LIBS="-lxml2  $LIBS"
12053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12054 /* end confdefs.h.  */
12055
12056 /* Override any GCC internal prototype to avoid an error.
12057    Use char because int might match the return type of a GCC
12058    builtin and then its argument prototype would still apply.  */
12059 #ifdef __cplusplus
12060 extern "C"
12061 #endif
12062 char xmlSaveToBuffer ();
12063 int
12064 main ()
12065 {
12066 return xmlSaveToBuffer ();
12067   ;
12068   return 0;
12069 }
12070 _ACEOF
12071 if ac_fn_c_try_link "$LINENO"; then :
12072   ac_cv_lib_xml2_xmlSaveToBuffer=yes
12073 else
12074   ac_cv_lib_xml2_xmlSaveToBuffer=no
12075 fi
12076 rm -f core conftest.err conftest.$ac_objext \
12077     conftest$ac_exeext conftest.$ac_ext
12078 LIBS=$ac_check_lib_save_LIBS
12079 fi
12080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12081 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12082 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12083   cat >>confdefs.h <<_ACEOF
12084 #define HAVE_LIBXML2 1
12085 _ACEOF
12086
12087   LIBS="-lxml2 $LIBS"
12088
12089 else
12090   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12091 fi
12092
12093 fi
12094
12095 if test "$with_libxslt" = yes ; then
12096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12097 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12098 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12099   $as_echo_n "(cached) " >&6
12100 else
12101   ac_check_lib_save_LIBS=$LIBS
12102 LIBS="-lxslt  $LIBS"
12103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12104 /* end confdefs.h.  */
12105
12106 /* Override any GCC internal prototype to avoid an error.
12107    Use char because int might match the return type of a GCC
12108    builtin and then its argument prototype would still apply.  */
12109 #ifdef __cplusplus
12110 extern "C"
12111 #endif
12112 char xsltCleanupGlobals ();
12113 int
12114 main ()
12115 {
12116 return xsltCleanupGlobals ();
12117   ;
12118   return 0;
12119 }
12120 _ACEOF
12121 if ac_fn_c_try_link "$LINENO"; then :
12122   ac_cv_lib_xslt_xsltCleanupGlobals=yes
12123 else
12124   ac_cv_lib_xslt_xsltCleanupGlobals=no
12125 fi
12126 rm -f core conftest.err conftest.$ac_objext \
12127     conftest$ac_exeext conftest.$ac_ext
12128 LIBS=$ac_check_lib_save_LIBS
12129 fi
12130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12131 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12132 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12133   cat >>confdefs.h <<_ACEOF
12134 #define HAVE_LIBXSLT 1
12135 _ACEOF
12136
12137   LIBS="-lxslt $LIBS"
12138
12139 else
12140   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12141 fi
12142
12143 fi
12144
12145 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12146 if test "$with_ldap" = yes ; then
12147   _LIBS="$LIBS"
12148   if test "$PORTNAME" != "win32"; then
12149     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12150 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12151 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12152   $as_echo_n "(cached) " >&6
12153 else
12154   ac_check_lib_save_LIBS=$LIBS
12155 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12157 /* end confdefs.h.  */
12158
12159 /* Override any GCC internal prototype to avoid an error.
12160    Use char because int might match the return type of a GCC
12161    builtin and then its argument prototype would still apply.  */
12162 #ifdef __cplusplus
12163 extern "C"
12164 #endif
12165 char ldap_bind ();
12166 int
12167 main ()
12168 {
12169 return ldap_bind ();
12170   ;
12171   return 0;
12172 }
12173 _ACEOF
12174 if ac_fn_c_try_link "$LINENO"; then :
12175   ac_cv_lib_ldap_ldap_bind=yes
12176 else
12177   ac_cv_lib_ldap_ldap_bind=no
12178 fi
12179 rm -f core conftest.err conftest.$ac_objext \
12180     conftest$ac_exeext conftest.$ac_ext
12181 LIBS=$ac_check_lib_save_LIBS
12182 fi
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12184 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12185 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12186   cat >>confdefs.h <<_ACEOF
12187 #define HAVE_LIBLDAP 1
12188 _ACEOF
12189
12190   LIBS="-lldap $LIBS"
12191
12192 else
12193   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12194 fi
12195
12196     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12197     if test "$enable_thread_safety" = yes; then
12198       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12199       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12200 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12201 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12202   $as_echo_n "(cached) " >&6
12203 else
12204   ac_check_lib_save_LIBS=$LIBS
12205 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12207 /* end confdefs.h.  */
12208
12209 /* Override any GCC internal prototype to avoid an error.
12210    Use char because int might match the return type of a GCC
12211    builtin and then its argument prototype would still apply.  */
12212 #ifdef __cplusplus
12213 extern "C"
12214 #endif
12215 char ldap_simple_bind ();
12216 int
12217 main ()
12218 {
12219 return ldap_simple_bind ();
12220   ;
12221   return 0;
12222 }
12223 _ACEOF
12224 if ac_fn_c_try_link "$LINENO"; then :
12225   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12226 else
12227   ac_cv_lib_ldap_r_ldap_simple_bind=no
12228 fi
12229 rm -f core conftest.err conftest.$ac_objext \
12230     conftest$ac_exeext conftest.$ac_ext
12231 LIBS=$ac_check_lib_save_LIBS
12232 fi
12233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12234 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12235 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12236   cat >>confdefs.h <<_ACEOF
12237 #define HAVE_LIBLDAP_R 1
12238 _ACEOF
12239
12240   LIBS="-lldap_r $LIBS"
12241
12242 else
12243   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12244 fi
12245
12246       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12247     else
12248       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12249     fi
12250     for ac_func in ldap_initialize
12251 do :
12252   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12253 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12254   cat >>confdefs.h <<_ACEOF
12255 #define HAVE_LDAP_INITIALIZE 1
12256 _ACEOF
12257
12258 fi
12259 done
12260
12261   else
12262     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12263 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12264 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12265   $as_echo_n "(cached) " >&6
12266 else
12267   ac_check_lib_save_LIBS=$LIBS
12268 LIBS="-lwldap32  $LIBS"
12269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12270 /* end confdefs.h.  */
12271
12272 /* Override any GCC internal prototype to avoid an error.
12273    Use char because int might match the return type of a GCC
12274    builtin and then its argument prototype would still apply.  */
12275 #ifdef __cplusplus
12276 extern "C"
12277 #endif
12278 char ldap_bind ();
12279 int
12280 main ()
12281 {
12282 return ldap_bind ();
12283   ;
12284   return 0;
12285 }
12286 _ACEOF
12287 if ac_fn_c_try_link "$LINENO"; then :
12288   ac_cv_lib_wldap32_ldap_bind=yes
12289 else
12290   ac_cv_lib_wldap32_ldap_bind=no
12291 fi
12292 rm -f core conftest.err conftest.$ac_objext \
12293     conftest$ac_exeext conftest.$ac_ext
12294 LIBS=$ac_check_lib_save_LIBS
12295 fi
12296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12297 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12298 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12299   cat >>confdefs.h <<_ACEOF
12300 #define HAVE_LIBWLDAP32 1
12301 _ACEOF
12302
12303   LIBS="-lwldap32 $LIBS"
12304
12305 else
12306   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12307 fi
12308
12309     LDAP_LIBS_FE="-lwldap32"
12310     LDAP_LIBS_BE="-lwldap32"
12311   fi
12312   LIBS="$_LIBS"
12313 fi
12314
12315
12316
12317 # for contrib/sepgsql
12318 if test "$with_selinux" = yes; then
12319   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12320 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12321 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12322   $as_echo_n "(cached) " >&6
12323 else
12324   ac_check_lib_save_LIBS=$LIBS
12325 LIBS="-lselinux  $LIBS"
12326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12327 /* end confdefs.h.  */
12328
12329 /* Override any GCC internal prototype to avoid an error.
12330    Use char because int might match the return type of a GCC
12331    builtin and then its argument prototype would still apply.  */
12332 #ifdef __cplusplus
12333 extern "C"
12334 #endif
12335 char security_compute_create_name ();
12336 int
12337 main ()
12338 {
12339 return security_compute_create_name ();
12340   ;
12341   return 0;
12342 }
12343 _ACEOF
12344 if ac_fn_c_try_link "$LINENO"; then :
12345   ac_cv_lib_selinux_security_compute_create_name=yes
12346 else
12347   ac_cv_lib_selinux_security_compute_create_name=no
12348 fi
12349 rm -f core conftest.err conftest.$ac_objext \
12350     conftest$ac_exeext conftest.$ac_ext
12351 LIBS=$ac_check_lib_save_LIBS
12352 fi
12353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12354 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12355 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12356   cat >>confdefs.h <<_ACEOF
12357 #define HAVE_LIBSELINUX 1
12358 _ACEOF
12359
12360   LIBS="-lselinux $LIBS"
12361
12362 else
12363   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12364 fi
12365
12366 fi
12367
12368 # for contrib/uuid-ossp
12369 if test "$with_uuid" = bsd ; then
12370   # On BSD, the UUID functions are in libc
12371   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12372 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12373   UUID_LIBS=""
12374 else
12375   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12376 fi
12377
12378 elif test "$with_uuid" = e2fs ; then
12379   # On macOS, the UUID functions are in libc
12380   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12381 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12382   UUID_LIBS=""
12383 else
12384   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12385 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12386 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12387   $as_echo_n "(cached) " >&6
12388 else
12389   ac_check_lib_save_LIBS=$LIBS
12390 LIBS="-luuid  $LIBS"
12391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12392 /* end confdefs.h.  */
12393
12394 /* Override any GCC internal prototype to avoid an error.
12395    Use char because int might match the return type of a GCC
12396    builtin and then its argument prototype would still apply.  */
12397 #ifdef __cplusplus
12398 extern "C"
12399 #endif
12400 char uuid_generate ();
12401 int
12402 main ()
12403 {
12404 return uuid_generate ();
12405   ;
12406   return 0;
12407 }
12408 _ACEOF
12409 if ac_fn_c_try_link "$LINENO"; then :
12410   ac_cv_lib_uuid_uuid_generate=yes
12411 else
12412   ac_cv_lib_uuid_uuid_generate=no
12413 fi
12414 rm -f core conftest.err conftest.$ac_objext \
12415     conftest$ac_exeext conftest.$ac_ext
12416 LIBS=$ac_check_lib_save_LIBS
12417 fi
12418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12419 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12420 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12421   UUID_LIBS="-luuid"
12422 else
12423   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12424 fi
12425
12426 fi
12427
12428 elif test "$with_uuid" = ossp ; then
12429   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12430 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12431 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12432   $as_echo_n "(cached) " >&6
12433 else
12434   ac_check_lib_save_LIBS=$LIBS
12435 LIBS="-lossp-uuid  $LIBS"
12436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12437 /* end confdefs.h.  */
12438
12439 /* Override any GCC internal prototype to avoid an error.
12440    Use char because int might match the return type of a GCC
12441    builtin and then its argument prototype would still apply.  */
12442 #ifdef __cplusplus
12443 extern "C"
12444 #endif
12445 char uuid_export ();
12446 int
12447 main ()
12448 {
12449 return uuid_export ();
12450   ;
12451   return 0;
12452 }
12453 _ACEOF
12454 if ac_fn_c_try_link "$LINENO"; then :
12455   ac_cv_lib_ossp_uuid_uuid_export=yes
12456 else
12457   ac_cv_lib_ossp_uuid_uuid_export=no
12458 fi
12459 rm -f core conftest.err conftest.$ac_objext \
12460     conftest$ac_exeext conftest.$ac_ext
12461 LIBS=$ac_check_lib_save_LIBS
12462 fi
12463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12464 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12465 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12466   UUID_LIBS="-lossp-uuid"
12467 else
12468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12469 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12470 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12471   $as_echo_n "(cached) " >&6
12472 else
12473   ac_check_lib_save_LIBS=$LIBS
12474 LIBS="-luuid  $LIBS"
12475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12476 /* end confdefs.h.  */
12477
12478 /* Override any GCC internal prototype to avoid an error.
12479    Use char because int might match the return type of a GCC
12480    builtin and then its argument prototype would still apply.  */
12481 #ifdef __cplusplus
12482 extern "C"
12483 #endif
12484 char uuid_export ();
12485 int
12486 main ()
12487 {
12488 return uuid_export ();
12489   ;
12490   return 0;
12491 }
12492 _ACEOF
12493 if ac_fn_c_try_link "$LINENO"; then :
12494   ac_cv_lib_uuid_uuid_export=yes
12495 else
12496   ac_cv_lib_uuid_uuid_export=no
12497 fi
12498 rm -f core conftest.err conftest.$ac_objext \
12499     conftest$ac_exeext conftest.$ac_ext
12500 LIBS=$ac_check_lib_save_LIBS
12501 fi
12502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12503 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12504 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12505   UUID_LIBS="-luuid"
12506 else
12507   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12508 fi
12509
12510 fi
12511
12512 fi
12513
12514
12515
12516 ##
12517 ## Header files
12518 ##
12519
12520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12521 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12522 if ${ac_cv_header_stdbool_h+:} false; then :
12523   $as_echo_n "(cached) " >&6
12524 else
12525   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12526 /* end confdefs.h.  */
12527
12528              #include <stdbool.h>
12529              #ifndef bool
12530               "error: bool is not defined"
12531              #endif
12532              #ifndef false
12533               "error: false is not defined"
12534              #endif
12535              #if false
12536               "error: false is not 0"
12537              #endif
12538              #ifndef true
12539               "error: true is not defined"
12540              #endif
12541              #if true != 1
12542               "error: true is not 1"
12543              #endif
12544              #ifndef __bool_true_false_are_defined
12545               "error: __bool_true_false_are_defined is not defined"
12546              #endif
12547
12548              struct s { _Bool s: 1; _Bool t; } s;
12549
12550              char a[true == 1 ? 1 : -1];
12551              char b[false == 0 ? 1 : -1];
12552              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12553              char d[(bool) 0.5 == true ? 1 : -1];
12554              /* See body of main program for 'e'.  */
12555              char f[(_Bool) 0.0 == false ? 1 : -1];
12556              char g[true];
12557              char h[sizeof (_Bool)];
12558              char i[sizeof s.t];
12559              enum { j = false, k = true, l = false * true, m = true * 256 };
12560              /* The following fails for
12561                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12562              _Bool n[m];
12563              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12564              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12565              /* Catch a bug in an HP-UX C compiler.  See
12566                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12567                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12568               */
12569              _Bool q = true;
12570              _Bool *pq = &q;
12571
12572 int
12573 main ()
12574 {
12575
12576              bool e = &s;
12577              *pq |= q;
12578              *pq |= ! q;
12579              /* Refer to every declared value, to avoid compiler optimizations.  */
12580              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12581                      + !m + !n + !o + !p + !q + !pq);
12582
12583   ;
12584   return 0;
12585 }
12586 _ACEOF
12587 if ac_fn_c_try_compile "$LINENO"; then :
12588   ac_cv_header_stdbool_h=yes
12589 else
12590   ac_cv_header_stdbool_h=no
12591 fi
12592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12593 fi
12594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12595 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12596    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12597 if test "x$ac_cv_type__Bool" = xyes; then :
12598
12599 cat >>confdefs.h <<_ACEOF
12600 #define HAVE__BOOL 1
12601 _ACEOF
12602
12603
12604 fi
12605
12606
12607 if test $ac_cv_header_stdbool_h = yes; then
12608
12609 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12610
12611 fi
12612
12613
12614 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
12615 do :
12616   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12617 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12618 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12619   cat >>confdefs.h <<_ACEOF
12620 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12621 _ACEOF
12622
12623 fi
12624
12625 done
12626
12627
12628 # On BSD, test for net/if.h will fail unless sys/socket.h
12629 # is included first.
12630 for ac_header in net/if.h
12631 do :
12632   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12633 #include <sys/socket.h>
12634
12635 "
12636 if test "x$ac_cv_header_net_if_h" = xyes; then :
12637   cat >>confdefs.h <<_ACEOF
12638 #define HAVE_NET_IF_H 1
12639 _ACEOF
12640
12641 fi
12642
12643 done
12644
12645
12646 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12647 # is included first.
12648 for ac_header in sys/ucred.h
12649 do :
12650   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12651 #include <sys/param.h>
12652
12653 "
12654 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12655   cat >>confdefs.h <<_ACEOF
12656 #define HAVE_SYS_UCRED_H 1
12657 _ACEOF
12658
12659 fi
12660
12661 done
12662
12663
12664 # At least on IRIX, test for netinet/tcp.h will fail unless
12665 # netinet/in.h is included first.
12666 for ac_header in netinet/tcp.h
12667 do :
12668   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12669 #include <netinet/in.h>
12670
12671 "
12672 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12673   cat >>confdefs.h <<_ACEOF
12674 #define HAVE_NETINET_TCP_H 1
12675 _ACEOF
12676
12677 fi
12678
12679 done
12680
12681
12682 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12683   for ac_header in readline/readline.h
12684 do :
12685   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12686 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12687   cat >>confdefs.h <<_ACEOF
12688 #define HAVE_READLINE_READLINE_H 1
12689 _ACEOF
12690
12691 else
12692   for ac_header in readline.h
12693 do :
12694   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12695 if test "x$ac_cv_header_readline_h" = xyes; then :
12696   cat >>confdefs.h <<_ACEOF
12697 #define HAVE_READLINE_H 1
12698 _ACEOF
12699
12700 else
12701   as_fn_error $? "readline header not found
12702 If you have readline already installed, see config.log for details on the
12703 failure.  It is possible the compiler isn't looking in the proper directory.
12704 Use --without-readline to disable readline support." "$LINENO" 5
12705 fi
12706
12707 done
12708
12709 fi
12710
12711 done
12712
12713   for ac_header in readline/history.h
12714 do :
12715   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12716 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12717   cat >>confdefs.h <<_ACEOF
12718 #define HAVE_READLINE_HISTORY_H 1
12719 _ACEOF
12720
12721 else
12722   for ac_header in history.h
12723 do :
12724   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12725 if test "x$ac_cv_header_history_h" = xyes; then :
12726   cat >>confdefs.h <<_ACEOF
12727 #define HAVE_HISTORY_H 1
12728 _ACEOF
12729
12730 else
12731   as_fn_error $? "history header not found
12732 If you have readline already installed, see config.log for details on the
12733 failure.  It is possible the compiler isn't looking in the proper directory.
12734 Use --without-readline to disable readline support." "$LINENO" 5
12735 fi
12736
12737 done
12738
12739 fi
12740
12741 done
12742
12743 fi
12744
12745 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12746 # Some installations of libedit usurp /usr/include/readline/, which seems
12747 # bad practice, since in combined installations readline will have its headers
12748 # there.  We might have to resort to AC_EGREP checks to make sure we found
12749 # the proper header...
12750   for ac_header in editline/readline.h
12751 do :
12752   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12753 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12754   cat >>confdefs.h <<_ACEOF
12755 #define HAVE_EDITLINE_READLINE_H 1
12756 _ACEOF
12757
12758 else
12759   for ac_header in readline.h
12760 do :
12761   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12762 if test "x$ac_cv_header_readline_h" = xyes; then :
12763   cat >>confdefs.h <<_ACEOF
12764 #define HAVE_READLINE_H 1
12765 _ACEOF
12766
12767 else
12768   for ac_header in readline/readline.h
12769 do :
12770   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12771 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12772   cat >>confdefs.h <<_ACEOF
12773 #define HAVE_READLINE_READLINE_H 1
12774 _ACEOF
12775
12776 else
12777   as_fn_error $? "readline header not found
12778 If you have libedit already installed, see config.log for details on the
12779 failure.  It is possible the compiler isn't looking in the proper directory.
12780 Use --without-readline to disable libedit support." "$LINENO" 5
12781 fi
12782
12783 done
12784
12785 fi
12786
12787 done
12788
12789 fi
12790
12791 done
12792
12793 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12794 # not be there at all.  Hence, don't complain if not found.  We must check
12795 # though, since in yet other versions it is an independent header.
12796   for ac_header in editline/history.h
12797 do :
12798   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12799 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12800   cat >>confdefs.h <<_ACEOF
12801 #define HAVE_EDITLINE_HISTORY_H 1
12802 _ACEOF
12803
12804 else
12805   for ac_header in history.h
12806 do :
12807   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12808 if test "x$ac_cv_header_history_h" = xyes; then :
12809   cat >>confdefs.h <<_ACEOF
12810 #define HAVE_HISTORY_H 1
12811 _ACEOF
12812
12813 else
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 fi
12823
12824 done
12825
12826 fi
12827
12828 done
12829
12830 fi
12831
12832 done
12833
12834 fi
12835
12836 if test "$with_zlib" = yes; then
12837   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
12838 if test "x$ac_cv_header_zlib_h" = xyes; then :
12839
12840 else
12841   as_fn_error $? "zlib header not found
12842 If you have zlib already installed, see config.log for details on the
12843 failure.  It is possible the compiler isn't looking in the proper directory.
12844 Use --without-zlib to disable zlib support." "$LINENO" 5
12845 fi
12846
12847
12848 fi
12849
12850 if test "$with_gssapi" = yes ; then
12851   for ac_header in gssapi/gssapi.h
12852 do :
12853   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
12854 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
12855   cat >>confdefs.h <<_ACEOF
12856 #define HAVE_GSSAPI_GSSAPI_H 1
12857 _ACEOF
12858
12859 else
12860   for ac_header in gssapi.h
12861 do :
12862   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
12863 if test "x$ac_cv_header_gssapi_h" = xyes; then :
12864   cat >>confdefs.h <<_ACEOF
12865 #define HAVE_GSSAPI_H 1
12866 _ACEOF
12867
12868 else
12869   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
12870 fi
12871
12872 done
12873
12874 fi
12875
12876 done
12877
12878 fi
12879
12880 if test "$with_openssl" = yes ; then
12881   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
12882 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
12883
12884 else
12885   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
12886 fi
12887
12888
12889   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
12890 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
12891
12892 else
12893   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
12894 fi
12895
12896
12897 fi
12898
12899 if test "$with_pam" = yes ; then
12900   for ac_header in security/pam_appl.h
12901 do :
12902   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
12903 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
12904   cat >>confdefs.h <<_ACEOF
12905 #define HAVE_SECURITY_PAM_APPL_H 1
12906 _ACEOF
12907
12908 else
12909   for ac_header in pam/pam_appl.h
12910 do :
12911   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
12912 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
12913   cat >>confdefs.h <<_ACEOF
12914 #define HAVE_PAM_PAM_APPL_H 1
12915 _ACEOF
12916
12917 else
12918   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
12919 fi
12920
12921 done
12922
12923 fi
12924
12925 done
12926
12927 fi
12928
12929 if test "$with_bsd_auth" = yes ; then
12930   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
12931 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
12932
12933 else
12934   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
12935 fi
12936
12937
12938 fi
12939
12940 if test "$with_systemd" = yes ; then
12941   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
12942 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
12943
12944 else
12945   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
12946 fi
12947
12948
12949 fi
12950
12951 if test "$with_libxml" = yes ; then
12952   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
12953 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
12954
12955 else
12956   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
12957 fi
12958
12959
12960 fi
12961
12962 if test "$with_libxslt" = yes ; then
12963   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
12964 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
12965
12966 else
12967   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
12968 fi
12969
12970
12971 fi
12972
12973 if test "$with_ldap" = yes ; then
12974   if test "$PORTNAME" != "win32"; then
12975      for ac_header in ldap.h
12976 do :
12977   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
12978 if test "x$ac_cv_header_ldap_h" = xyes; then :
12979   cat >>confdefs.h <<_ACEOF
12980 #define HAVE_LDAP_H 1
12981 _ACEOF
12982
12983 else
12984   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
12985 fi
12986
12987 done
12988
12989      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
12990 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
12991 if ${pgac_cv_ldap_safe+:} false; then :
12992   $as_echo_n "(cached) " >&6
12993 else
12994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12995 /* end confdefs.h.  */
12996 #include <ldap.h>
12997 #if !defined(LDAP_VENDOR_VERSION) || \
12998      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
12999       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13000 choke me
13001 #endif
13002 int
13003 main ()
13004 {
13005
13006   ;
13007   return 0;
13008 }
13009 _ACEOF
13010 if ac_fn_c_try_compile "$LINENO"; then :
13011   pgac_cv_ldap_safe=yes
13012 else
13013   pgac_cv_ldap_safe=no
13014 fi
13015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13016 fi
13017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13018 $as_echo "$pgac_cv_ldap_safe" >&6; }
13019
13020 if test "$pgac_cv_ldap_safe" != yes; then
13021   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13022 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13023 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13024 *** also uses LDAP will crash on exit." >&5
13025 $as_echo "$as_me: WARNING:
13026 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13027 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13028 *** also uses LDAP will crash on exit." >&2;}
13029 fi
13030   else
13031      for ac_header in winldap.h
13032 do :
13033   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13034 #include <windows.h>
13035
13036 "
13037 if test "x$ac_cv_header_winldap_h" = xyes; then :
13038   cat >>confdefs.h <<_ACEOF
13039 #define HAVE_WINLDAP_H 1
13040 _ACEOF
13041
13042 else
13043   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13044 fi
13045
13046 done
13047
13048   fi
13049 fi
13050
13051 if test "$with_bonjour" = yes ; then
13052   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13053 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13054
13055 else
13056   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13057 fi
13058
13059
13060 fi
13061
13062 # for contrib/uuid-ossp
13063 if test "$with_uuid" = bsd ; then
13064   for ac_header in uuid.h
13065 do :
13066   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13067 if test "x$ac_cv_header_uuid_h" = xyes; then :
13068   cat >>confdefs.h <<_ACEOF
13069 #define HAVE_UUID_H 1
13070 _ACEOF
13071  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13072 /* end confdefs.h.  */
13073 #include <uuid.h>
13074
13075 _ACEOF
13076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13077   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13078
13079 else
13080   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13081 fi
13082 rm -f conftest*
13083
13084 else
13085   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13086 fi
13087
13088 done
13089
13090 elif test "$with_uuid" = e2fs ; then
13091   for ac_header in uuid/uuid.h
13092 do :
13093   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13094 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13095   cat >>confdefs.h <<_ACEOF
13096 #define HAVE_UUID_UUID_H 1
13097 _ACEOF
13098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13099 /* end confdefs.h.  */
13100 #include <uuid/uuid.h>
13101
13102 _ACEOF
13103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13104   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13105
13106 else
13107   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13108 fi
13109 rm -f conftest*
13110
13111 else
13112   for ac_header in uuid.h
13113 do :
13114   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13115 if test "x$ac_cv_header_uuid_h" = xyes; then :
13116   cat >>confdefs.h <<_ACEOF
13117 #define HAVE_UUID_H 1
13118 _ACEOF
13119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13120 /* end confdefs.h.  */
13121 #include <uuid.h>
13122
13123 _ACEOF
13124 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13125   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13126
13127 else
13128   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13129 fi
13130 rm -f conftest*
13131
13132 else
13133   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13134 fi
13135
13136 done
13137
13138 fi
13139
13140 done
13141
13142 elif test "$with_uuid" = ossp ; then
13143   for ac_header in ossp/uuid.h
13144 do :
13145   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13146 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13147   cat >>confdefs.h <<_ACEOF
13148 #define HAVE_OSSP_UUID_H 1
13149 _ACEOF
13150  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13151 /* end confdefs.h.  */
13152 #include <ossp/uuid.h>
13153
13154 _ACEOF
13155 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13156   $EGREP "uuid_export" >/dev/null 2>&1; then :
13157
13158 else
13159   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13160 fi
13161 rm -f conftest*
13162
13163 else
13164   for ac_header in uuid.h
13165 do :
13166   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13167 if test "x$ac_cv_header_uuid_h" = xyes; then :
13168   cat >>confdefs.h <<_ACEOF
13169 #define HAVE_UUID_H 1
13170 _ACEOF
13171  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13172 /* end confdefs.h.  */
13173 #include <uuid.h>
13174
13175 _ACEOF
13176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13177   $EGREP "uuid_export" >/dev/null 2>&1; then :
13178
13179 else
13180   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13181 fi
13182 rm -f conftest*
13183
13184 else
13185   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13186 fi
13187
13188 done
13189
13190 fi
13191
13192 done
13193
13194 fi
13195
13196 if test "$PORTNAME" = "win32" ; then
13197    for ac_header in crtdefs.h
13198 do :
13199   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13200 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13201   cat >>confdefs.h <<_ACEOF
13202 #define HAVE_CRTDEFS_H 1
13203 _ACEOF
13204
13205 fi
13206
13207 done
13208
13209 fi
13210
13211 ##
13212 ## Types, structures, compiler characteristics
13213 ##
13214
13215   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13216 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13217 if ${ac_cv_c_bigendian+:} false; then :
13218   $as_echo_n "(cached) " >&6
13219 else
13220   ac_cv_c_bigendian=unknown
13221     # See if we're dealing with a universal compiler.
13222     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13223 /* end confdefs.h.  */
13224 #ifndef __APPLE_CC__
13225                not a universal capable compiler
13226              #endif
13227              typedef int dummy;
13228
13229 _ACEOF
13230 if ac_fn_c_try_compile "$LINENO"; then :
13231
13232         # Check for potential -arch flags.  It is not universal unless
13233         # there are at least two -arch flags with different values.
13234         ac_arch=
13235         ac_prev=
13236         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13237          if test -n "$ac_prev"; then
13238            case $ac_word in
13239              i?86 | x86_64 | ppc | ppc64)
13240                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13241                  ac_arch=$ac_word
13242                else
13243                  ac_cv_c_bigendian=universal
13244                  break
13245                fi
13246                ;;
13247            esac
13248            ac_prev=
13249          elif test "x$ac_word" = "x-arch"; then
13250            ac_prev=arch
13251          fi
13252        done
13253 fi
13254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13255     if test $ac_cv_c_bigendian = unknown; then
13256       # See if sys/param.h defines the BYTE_ORDER macro.
13257       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13258 /* end confdefs.h.  */
13259 #include <sys/types.h>
13260              #include <sys/param.h>
13261
13262 int
13263 main ()
13264 {
13265 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13266                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13267                      && LITTLE_ENDIAN)
13268               bogus endian macros
13269              #endif
13270
13271   ;
13272   return 0;
13273 }
13274 _ACEOF
13275 if ac_fn_c_try_compile "$LINENO"; then :
13276   # It does; now see whether it defined to BIG_ENDIAN or not.
13277          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13278 /* end confdefs.h.  */
13279 #include <sys/types.h>
13280                 #include <sys/param.h>
13281
13282 int
13283 main ()
13284 {
13285 #if BYTE_ORDER != BIG_ENDIAN
13286                  not big endian
13287                 #endif
13288
13289   ;
13290   return 0;
13291 }
13292 _ACEOF
13293 if ac_fn_c_try_compile "$LINENO"; then :
13294   ac_cv_c_bigendian=yes
13295 else
13296   ac_cv_c_bigendian=no
13297 fi
13298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13299 fi
13300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13301     fi
13302     if test $ac_cv_c_bigendian = unknown; then
13303       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13304       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13305 /* end confdefs.h.  */
13306 #include <limits.h>
13307
13308 int
13309 main ()
13310 {
13311 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13312               bogus endian macros
13313              #endif
13314
13315   ;
13316   return 0;
13317 }
13318 _ACEOF
13319 if ac_fn_c_try_compile "$LINENO"; then :
13320   # It does; now see whether it defined to _BIG_ENDIAN or not.
13321          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13322 /* end confdefs.h.  */
13323 #include <limits.h>
13324
13325 int
13326 main ()
13327 {
13328 #ifndef _BIG_ENDIAN
13329                  not big endian
13330                 #endif
13331
13332   ;
13333   return 0;
13334 }
13335 _ACEOF
13336 if ac_fn_c_try_compile "$LINENO"; then :
13337   ac_cv_c_bigendian=yes
13338 else
13339   ac_cv_c_bigendian=no
13340 fi
13341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13342 fi
13343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13344     fi
13345     if test $ac_cv_c_bigendian = unknown; then
13346       # Compile a test program.
13347       if test "$cross_compiling" = yes; then :
13348   # Try to guess by grepping values from an object file.
13349          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13350 /* end confdefs.h.  */
13351 short int ascii_mm[] =
13352                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13353                 short int ascii_ii[] =
13354                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13355                 int use_ascii (int i) {
13356                   return ascii_mm[i] + ascii_ii[i];
13357                 }
13358                 short int ebcdic_ii[] =
13359                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13360                 short int ebcdic_mm[] =
13361                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13362                 int use_ebcdic (int i) {
13363                   return ebcdic_mm[i] + ebcdic_ii[i];
13364                 }
13365                 extern int foo;
13366
13367 int
13368 main ()
13369 {
13370 return use_ascii (foo) == use_ebcdic (foo);
13371   ;
13372   return 0;
13373 }
13374 _ACEOF
13375 if ac_fn_c_try_compile "$LINENO"; then :
13376   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13377               ac_cv_c_bigendian=yes
13378             fi
13379             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13380               if test "$ac_cv_c_bigendian" = unknown; then
13381                 ac_cv_c_bigendian=no
13382               else
13383                 # finding both strings is unlikely to happen, but who knows?
13384                 ac_cv_c_bigendian=unknown
13385               fi
13386             fi
13387 fi
13388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13389 else
13390   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13391 /* end confdefs.h.  */
13392 $ac_includes_default
13393 int
13394 main ()
13395 {
13396
13397              /* Are we little or big endian?  From Harbison&Steele.  */
13398              union
13399              {
13400                long int l;
13401                char c[sizeof (long int)];
13402              } u;
13403              u.l = 1;
13404              return u.c[sizeof (long int) - 1] == 1;
13405
13406   ;
13407   return 0;
13408 }
13409 _ACEOF
13410 if ac_fn_c_try_run "$LINENO"; then :
13411   ac_cv_c_bigendian=no
13412 else
13413   ac_cv_c_bigendian=yes
13414 fi
13415 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13416   conftest.$ac_objext conftest.beam conftest.$ac_ext
13417 fi
13418
13419     fi
13420 fi
13421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13422 $as_echo "$ac_cv_c_bigendian" >&6; }
13423  case $ac_cv_c_bigendian in #(
13424    yes)
13425      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13426 ;; #(
13427    no)
13428       ;; #(
13429    universal)
13430
13431 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13432
13433      ;; #(
13434    *)
13435      as_fn_error $? "unknown endianness
13436  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13437  esac
13438
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13440 $as_echo_n "checking for inline... " >&6; }
13441 if ${ac_cv_c_inline+:} false; then :
13442   $as_echo_n "(cached) " >&6
13443 else
13444   ac_cv_c_inline=no
13445 for ac_kw in inline __inline__ __inline; do
13446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13447 /* end confdefs.h.  */
13448 #ifndef __cplusplus
13449 typedef int foo_t;
13450 static $ac_kw foo_t static_foo () {return 0; }
13451 $ac_kw foo_t foo () {return 0; }
13452 #endif
13453
13454 _ACEOF
13455 if ac_fn_c_try_compile "$LINENO"; then :
13456   ac_cv_c_inline=$ac_kw
13457 fi
13458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13459   test "$ac_cv_c_inline" != no && break
13460 done
13461
13462 fi
13463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13464 $as_echo "$ac_cv_c_inline" >&6; }
13465
13466 case $ac_cv_c_inline in
13467   inline | yes) ;;
13468   *)
13469     case $ac_cv_c_inline in
13470       no) ac_val=;;
13471       *) ac_val=$ac_cv_c_inline;;
13472     esac
13473     cat >>confdefs.h <<_ACEOF
13474 #ifndef __cplusplus
13475 #define inline $ac_val
13476 #endif
13477 _ACEOF
13478     ;;
13479 esac
13480
13481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13482 $as_echo_n "checking for printf format archetype... " >&6; }
13483 if ${pgac_cv_printf_archetype+:} false; then :
13484   $as_echo_n "(cached) " >&6
13485 else
13486   ac_save_c_werror_flag=$ac_c_werror_flag
13487 ac_c_werror_flag=yes
13488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13489 /* end confdefs.h.  */
13490 extern int
13491 pgac_write(int ignore, const char *fmt,...)
13492 __attribute__((format(gnu_printf, 2, 3)));
13493 int
13494 main ()
13495 {
13496
13497   ;
13498   return 0;
13499 }
13500 _ACEOF
13501 if ac_fn_c_try_compile "$LINENO"; then :
13502   pgac_cv_printf_archetype=gnu_printf
13503 else
13504   pgac_cv_printf_archetype=printf
13505 fi
13506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13507 ac_c_werror_flag=$ac_save_c_werror_flag
13508 fi
13509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13510 $as_echo "$pgac_cv_printf_archetype" >&6; }
13511
13512 cat >>confdefs.h <<_ACEOF
13513 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13514 _ACEOF
13515
13516
13517
13518   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13519 $as_echo_n "checking for flexible array members... " >&6; }
13520 if ${ac_cv_c_flexmember+:} false; then :
13521   $as_echo_n "(cached) " >&6
13522 else
13523   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13524 /* end confdefs.h.  */
13525 #include <stdlib.h>
13526             #include <stdio.h>
13527             #include <stddef.h>
13528             struct s { int n; double d[]; };
13529 int
13530 main ()
13531 {
13532 int m = getchar ();
13533             struct s *p = malloc (offsetof (struct s, d)
13534                                   + m * sizeof (double));
13535             p->d[0] = 0.0;
13536             return p->d != (double *) NULL;
13537   ;
13538   return 0;
13539 }
13540 _ACEOF
13541 if ac_fn_c_try_compile "$LINENO"; then :
13542   ac_cv_c_flexmember=yes
13543 else
13544   ac_cv_c_flexmember=no
13545 fi
13546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13547 fi
13548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13549 $as_echo "$ac_cv_c_flexmember" >&6; }
13550   if test $ac_cv_c_flexmember = yes; then
13551
13552 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13553
13554   else
13555     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13556
13557   fi
13558
13559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13560 $as_echo_n "checking for signed types... " >&6; }
13561 if ${pgac_cv_c_signed+:} false; then :
13562   $as_echo_n "(cached) " >&6
13563 else
13564   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13565 /* end confdefs.h.  */
13566
13567 int
13568 main ()
13569 {
13570 signed char c; signed short s; signed int i;
13571   ;
13572   return 0;
13573 }
13574 _ACEOF
13575 if ac_fn_c_try_compile "$LINENO"; then :
13576   pgac_cv_c_signed=yes
13577 else
13578   pgac_cv_c_signed=no
13579 fi
13580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13581 fi
13582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13583 $as_echo "$pgac_cv_c_signed" >&6; }
13584 if test x"$pgac_cv_c_signed" = xno ; then
13585
13586 $as_echo "#define signed /**/" >>confdefs.h
13587
13588 fi
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13590 $as_echo_n "checking for __func__... " >&6; }
13591 if ${pgac_cv_funcname_func_support+:} false; then :
13592   $as_echo_n "(cached) " >&6
13593 else
13594   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13595 /* end confdefs.h.  */
13596 #include <stdio.h>
13597 int
13598 main ()
13599 {
13600 printf("%s\n", __func__);
13601   ;
13602   return 0;
13603 }
13604 _ACEOF
13605 if ac_fn_c_try_compile "$LINENO"; then :
13606   pgac_cv_funcname_func_support=yes
13607 else
13608   pgac_cv_funcname_func_support=no
13609 fi
13610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13611 fi
13612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13613 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13614 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13615
13616 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13617
13618 else
13619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13620 $as_echo_n "checking for __FUNCTION__... " >&6; }
13621 if ${pgac_cv_funcname_function_support+:} false; then :
13622   $as_echo_n "(cached) " >&6
13623 else
13624   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13625 /* end confdefs.h.  */
13626 #include <stdio.h>
13627 int
13628 main ()
13629 {
13630 printf("%s\n", __FUNCTION__);
13631   ;
13632   return 0;
13633 }
13634 _ACEOF
13635 if ac_fn_c_try_compile "$LINENO"; then :
13636   pgac_cv_funcname_function_support=yes
13637 else
13638   pgac_cv_funcname_function_support=no
13639 fi
13640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13641 fi
13642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13643 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13644 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13645
13646 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13647
13648 fi
13649 fi
13650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13651 $as_echo_n "checking for _Static_assert... " >&6; }
13652 if ${pgac_cv__static_assert+:} false; then :
13653   $as_echo_n "(cached) " >&6
13654 else
13655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13656 /* end confdefs.h.  */
13657
13658 int
13659 main ()
13660 {
13661 ({ _Static_assert(1, "foo"); })
13662   ;
13663   return 0;
13664 }
13665 _ACEOF
13666 if ac_fn_c_try_link "$LINENO"; then :
13667   pgac_cv__static_assert=yes
13668 else
13669   pgac_cv__static_assert=no
13670 fi
13671 rm -f core conftest.err conftest.$ac_objext \
13672     conftest$ac_exeext conftest.$ac_ext
13673 fi
13674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13675 $as_echo "$pgac_cv__static_assert" >&6; }
13676 if test x"$pgac_cv__static_assert" = xyes ; then
13677
13678 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13679
13680 fi
13681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13682 $as_echo_n "checking for typeof... " >&6; }
13683 if ${pgac_cv_c_typeof+:} false; then :
13684   $as_echo_n "(cached) " >&6
13685 else
13686   pgac_cv_c_typeof=no
13687 for pgac_kw in typeof __typeof__ decltype; do
13688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13689 /* end confdefs.h.  */
13690
13691 int
13692 main ()
13693 {
13694 int x = 0;
13695 $pgac_kw(x) y;
13696 y = x;
13697 return y;
13698   ;
13699   return 0;
13700 }
13701 _ACEOF
13702 if ac_fn_c_try_compile "$LINENO"; then :
13703   pgac_cv_c_typeof=$pgac_kw
13704 fi
13705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13706   test "$pgac_cv_c_typeof" != no && break
13707 done
13708 fi
13709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13710 $as_echo "$pgac_cv_c_typeof" >&6; }
13711 if test "$pgac_cv_c_typeof" != no; then
13712
13713 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13714
13715   if test "$pgac_cv_c_typeof" != typeof; then
13716
13717 cat >>confdefs.h <<_ACEOF
13718 #define typeof $pgac_cv_c_typeof
13719 _ACEOF
13720
13721   fi
13722 fi
13723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13724 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13725 if ${pgac_cv__types_compatible+:} false; then :
13726   $as_echo_n "(cached) " >&6
13727 else
13728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13729 /* end confdefs.h.  */
13730
13731 int
13732 main ()
13733 {
13734  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13735   ;
13736   return 0;
13737 }
13738 _ACEOF
13739 if ac_fn_c_try_compile "$LINENO"; then :
13740   pgac_cv__types_compatible=yes
13741 else
13742   pgac_cv__types_compatible=no
13743 fi
13744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13745 fi
13746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13747 $as_echo "$pgac_cv__types_compatible" >&6; }
13748 if test x"$pgac_cv__types_compatible" = xyes ; then
13749
13750 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13751
13752 fi
13753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13754 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13755 if ${pgac_cv__builtin_bswap16+:} false; then :
13756   $as_echo_n "(cached) " >&6
13757 else
13758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13759 /* end confdefs.h.  */
13760 static unsigned long int x = __builtin_bswap16(0xaabb);
13761
13762 _ACEOF
13763 if ac_fn_c_try_compile "$LINENO"; then :
13764   pgac_cv__builtin_bswap16=yes
13765 else
13766   pgac_cv__builtin_bswap16=no
13767 fi
13768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13769 fi
13770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13771 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13772 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13773
13774 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13775
13776 fi
13777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13778 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13779 if ${pgac_cv__builtin_bswap32+:} false; then :
13780   $as_echo_n "(cached) " >&6
13781 else
13782   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13783 /* end confdefs.h.  */
13784 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13785
13786 _ACEOF
13787 if ac_fn_c_try_compile "$LINENO"; then :
13788   pgac_cv__builtin_bswap32=yes
13789 else
13790   pgac_cv__builtin_bswap32=no
13791 fi
13792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13793 fi
13794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
13795 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
13796 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
13797
13798 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
13799
13800 fi
13801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
13802 $as_echo_n "checking for __builtin_bswap64... " >&6; }
13803 if ${pgac_cv__builtin_bswap64+:} false; then :
13804   $as_echo_n "(cached) " >&6
13805 else
13806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13807 /* end confdefs.h.  */
13808 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
13809
13810 _ACEOF
13811 if ac_fn_c_try_compile "$LINENO"; then :
13812   pgac_cv__builtin_bswap64=yes
13813 else
13814   pgac_cv__builtin_bswap64=no
13815 fi
13816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13817 fi
13818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
13819 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
13820 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
13821
13822 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
13823
13824 fi
13825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
13826 $as_echo_n "checking for __builtin_constant_p... " >&6; }
13827 if ${pgac_cv__builtin_constant_p+:} false; then :
13828   $as_echo_n "(cached) " >&6
13829 else
13830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13831 /* end confdefs.h.  */
13832 static int x;
13833   static int y[__builtin_constant_p(x) ? x : 1];
13834   static int z[__builtin_constant_p("string literal") ? 1 : x];
13835
13836
13837 _ACEOF
13838 if ac_fn_c_try_compile "$LINENO"; then :
13839   pgac_cv__builtin_constant_p=yes
13840 else
13841   pgac_cv__builtin_constant_p=no
13842 fi
13843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13844 fi
13845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
13846 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
13847 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
13848
13849 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
13850
13851 fi
13852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
13853 $as_echo_n "checking for __builtin_unreachable... " >&6; }
13854 if ${pgac_cv__builtin_unreachable+:} false; then :
13855   $as_echo_n "(cached) " >&6
13856 else
13857   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13858 /* end confdefs.h.  */
13859
13860 int
13861 main ()
13862 {
13863 __builtin_unreachable();
13864   ;
13865   return 0;
13866 }
13867 _ACEOF
13868 if ac_fn_c_try_link "$LINENO"; then :
13869   pgac_cv__builtin_unreachable=yes
13870 else
13871   pgac_cv__builtin_unreachable=no
13872 fi
13873 rm -f core conftest.err conftest.$ac_objext \
13874     conftest$ac_exeext conftest.$ac_ext
13875 fi
13876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
13877 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
13878 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
13879
13880 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
13881
13882 fi
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
13884 $as_echo_n "checking for computed goto support... " >&6; }
13885 if ${pgac_cv_computed_goto+:} false; then :
13886   $as_echo_n "(cached) " >&6
13887 else
13888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13889 /* end confdefs.h.  */
13890
13891 int
13892 main ()
13893 {
13894 void *labeladdrs[] = {&&my_label};
13895   goto *labeladdrs[0];
13896   my_label:
13897   return 1;
13898
13899   ;
13900   return 0;
13901 }
13902 _ACEOF
13903 if ac_fn_c_try_compile "$LINENO"; then :
13904   pgac_cv_computed_goto=yes
13905 else
13906   pgac_cv_computed_goto=no
13907 fi
13908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13909 fi
13910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
13911 $as_echo "$pgac_cv_computed_goto" >&6; }
13912 if test x"$pgac_cv_computed_goto" = xyes ; then
13913
13914 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
13915
13916 fi
13917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
13918 $as_echo_n "checking for __VA_ARGS__... " >&6; }
13919 if ${pgac_cv__va_args+:} false; then :
13920   $as_echo_n "(cached) " >&6
13921 else
13922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13923 /* end confdefs.h.  */
13924 #include <stdio.h>
13925 int
13926 main ()
13927 {
13928 #define debug(...) fprintf(stderr, __VA_ARGS__)
13929 debug("%s", "blarg");
13930
13931   ;
13932   return 0;
13933 }
13934 _ACEOF
13935 if ac_fn_c_try_compile "$LINENO"; then :
13936   pgac_cv__va_args=yes
13937 else
13938   pgac_cv__va_args=no
13939 fi
13940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13941 fi
13942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
13943 $as_echo "$pgac_cv__va_args" >&6; }
13944 if test x"$pgac_cv__va_args" = xyes ; then
13945
13946 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
13947
13948 fi
13949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13950 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13951 if ${ac_cv_struct_tm+:} false; then :
13952   $as_echo_n "(cached) " >&6
13953 else
13954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13955 /* end confdefs.h.  */
13956 #include <sys/types.h>
13957 #include <time.h>
13958
13959 int
13960 main ()
13961 {
13962 struct tm tm;
13963                                      int *p = &tm.tm_sec;
13964                                      return !p;
13965   ;
13966   return 0;
13967 }
13968 _ACEOF
13969 if ac_fn_c_try_compile "$LINENO"; then :
13970   ac_cv_struct_tm=time.h
13971 else
13972   ac_cv_struct_tm=sys/time.h
13973 fi
13974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13975 fi
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13977 $as_echo "$ac_cv_struct_tm" >&6; }
13978 if test $ac_cv_struct_tm = sys/time.h; then
13979
13980 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
13981
13982 fi
13983
13984 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
13985 #include <$ac_cv_struct_tm>
13986
13987 "
13988 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
13989
13990 cat >>confdefs.h <<_ACEOF
13991 #define HAVE_STRUCT_TM_TM_ZONE 1
13992 _ACEOF
13993
13994
13995 fi
13996
13997 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13998
13999 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14000
14001 fi
14002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14003 $as_echo_n "checking for tzname... " >&6; }
14004 if ${ac_cv_var_tzname+:} false; then :
14005   $as_echo_n "(cached) " >&6
14006 else
14007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14008 /* end confdefs.h.  */
14009 #include <stdlib.h>
14010 #include <time.h>
14011 #ifndef tzname /* For SGI.  */
14012 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
14013 #endif
14014
14015 int
14016 main ()
14017 {
14018 atoi(*tzname);
14019   ;
14020   return 0;
14021 }
14022 _ACEOF
14023 if ac_fn_c_try_link "$LINENO"; then :
14024   ac_cv_var_tzname=yes
14025 else
14026   ac_cv_var_tzname=no
14027 fi
14028 rm -f core conftest.err conftest.$ac_objext \
14029     conftest$ac_exeext conftest.$ac_ext
14030 fi
14031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14032 $as_echo "$ac_cv_var_tzname" >&6; }
14033 if test $ac_cv_var_tzname = yes; then
14034
14035 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14036
14037 fi
14038
14039 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14040 #ifdef HAVE_SYS_IPC_H
14041 #include <sys/ipc.h>
14042 #endif
14043 #ifdef HAVE_SYS_SEM_H
14044 #include <sys/sem.h>
14045 #endif
14046 "
14047 if test "x$ac_cv_type_union_semun" = xyes; then :
14048
14049 cat >>confdefs.h <<_ACEOF
14050 #define HAVE_UNION_SEMUN 1
14051 _ACEOF
14052
14053
14054 fi
14055
14056 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14057 #ifdef HAVE_SYS_UN_H
14058 #include <sys/un.h>
14059 #endif
14060
14061 "
14062 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14063
14064 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14065
14066 fi
14067
14068 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14069 #include <sys/socket.h>
14070
14071 "
14072 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14073
14074 cat >>confdefs.h <<_ACEOF
14075 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14076 _ACEOF
14077
14078
14079 fi
14080
14081 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14082 #include <sys/socket.h>
14083
14084 "
14085 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14086
14087 cat >>confdefs.h <<_ACEOF
14088 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14089 _ACEOF
14090
14091
14092 fi
14093 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14094 #include <sys/socket.h>
14095
14096 "
14097 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14098
14099 cat >>confdefs.h <<_ACEOF
14100 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14101 _ACEOF
14102
14103
14104 fi
14105 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14106 #include <sys/socket.h>
14107
14108 "
14109 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14110
14111 cat >>confdefs.h <<_ACEOF
14112 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14113 _ACEOF
14114
14115
14116 fi
14117 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14118 #include <sys/socket.h>
14119
14120 "
14121 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14122
14123 cat >>confdefs.h <<_ACEOF
14124 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14125 _ACEOF
14126
14127
14128 fi
14129 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14130 #include <sys/socket.h>
14131
14132 "
14133 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14134
14135 cat >>confdefs.h <<_ACEOF
14136 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14137 _ACEOF
14138
14139
14140 fi
14141
14142 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14143 #include <sys/socket.h>
14144 #include <netdb.h>
14145
14146 "
14147 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14148
14149 cat >>confdefs.h <<_ACEOF
14150 #define HAVE_STRUCT_ADDRINFO 1
14151 _ACEOF
14152
14153
14154 fi
14155
14156
14157   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14158 if test "x$ac_cv_type_intptr_t" = xyes; then :
14159
14160 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14161
14162 else
14163   for ac_type in 'int' 'long int' 'long long int'; do
14164        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14165 /* end confdefs.h.  */
14166 $ac_includes_default
14167 int
14168 main ()
14169 {
14170 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14171 test_array [0] = 0;
14172 return test_array [0];
14173
14174   ;
14175   return 0;
14176 }
14177 _ACEOF
14178 if ac_fn_c_try_compile "$LINENO"; then :
14179
14180 cat >>confdefs.h <<_ACEOF
14181 #define intptr_t $ac_type
14182 _ACEOF
14183
14184           ac_type=
14185 fi
14186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14187        test -z "$ac_type" && break
14188      done
14189 fi
14190
14191
14192
14193   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14194 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14195
14196 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14197
14198 else
14199   for ac_type in 'unsigned int' 'unsigned long int' \
14200         'unsigned long long int'; do
14201        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14202 /* end confdefs.h.  */
14203 $ac_includes_default
14204 int
14205 main ()
14206 {
14207 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14208 test_array [0] = 0;
14209 return test_array [0];
14210
14211   ;
14212   return 0;
14213 }
14214 _ACEOF
14215 if ac_fn_c_try_compile "$LINENO"; then :
14216
14217 cat >>confdefs.h <<_ACEOF
14218 #define uintptr_t $ac_type
14219 _ACEOF
14220
14221           ac_type=
14222 fi
14223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14224        test -z "$ac_type" && break
14225      done
14226 fi
14227
14228
14229
14230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14231 $as_echo_n "checking for unsigned long long int... " >&6; }
14232 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14233   $as_echo_n "(cached) " >&6
14234 else
14235   ac_cv_type_unsigned_long_long_int=yes
14236      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14237        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14238 /* end confdefs.h.  */
14239
14240   /* For now, do not test the preprocessor; as of 2007 there are too many
14241          implementations with broken preprocessors.  Perhaps this can
14242          be revisited in 2012.  In the meantime, code should not expect
14243          #if to work with literals wider than 32 bits.  */
14244       /* Test literals.  */
14245       long long int ll = 9223372036854775807ll;
14246       long long int nll = -9223372036854775807LL;
14247       unsigned long long int ull = 18446744073709551615ULL;
14248       /* Test constant expressions.   */
14249       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14250                      ? 1 : -1)];
14251       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14252                      ? 1 : -1)];
14253       int i = 63;
14254 int
14255 main ()
14256 {
14257 /* Test availability of runtime routines for shift and division.  */
14258       long long int llmax = 9223372036854775807ll;
14259       unsigned long long int ullmax = 18446744073709551615ull;
14260       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14261               | (llmax / ll) | (llmax % ll)
14262               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14263               | (ullmax / ull) | (ullmax % ull));
14264   ;
14265   return 0;
14266 }
14267
14268 _ACEOF
14269 if ac_fn_c_try_link "$LINENO"; then :
14270
14271 else
14272   ac_cv_type_unsigned_long_long_int=no
14273 fi
14274 rm -f core conftest.err conftest.$ac_objext \
14275     conftest$ac_exeext conftest.$ac_ext
14276      fi
14277 fi
14278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14279 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14280   if test $ac_cv_type_unsigned_long_long_int = yes; then
14281
14282 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14283
14284   fi
14285
14286
14287
14288   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14289 $as_echo_n "checking for long long int... " >&6; }
14290 if ${ac_cv_type_long_long_int+:} false; then :
14291   $as_echo_n "(cached) " >&6
14292 else
14293   ac_cv_type_long_long_int=yes
14294       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14295         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14296         if test $ac_cv_type_long_long_int = yes; then
14297                                   if test "$cross_compiling" = yes; then :
14298   :
14299 else
14300   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14301 /* end confdefs.h.  */
14302 #include <limits.h>
14303                  #ifndef LLONG_MAX
14304                  # define HALF \
14305                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14306                  # define LLONG_MAX (HALF - 1 + HALF)
14307                  #endif
14308 int
14309 main ()
14310 {
14311 long long int n = 1;
14312                  int i;
14313                  for (i = 0; ; i++)
14314                    {
14315                      long long int m = n << i;
14316                      if (m >> i != n)
14317                        return 1;
14318                      if (LLONG_MAX / 2 < m)
14319                        break;
14320                    }
14321                  return 0;
14322   ;
14323   return 0;
14324 }
14325 _ACEOF
14326 if ac_fn_c_try_run "$LINENO"; then :
14327
14328 else
14329   ac_cv_type_long_long_int=no
14330 fi
14331 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14332   conftest.$ac_objext conftest.beam conftest.$ac_ext
14333 fi
14334
14335         fi
14336       fi
14337 fi
14338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14339 $as_echo "$ac_cv_type_long_long_int" >&6; }
14340   if test $ac_cv_type_long_long_int = yes; then
14341
14342 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14343
14344   fi
14345
14346
14347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14348 $as_echo_n "checking for locale_t... " >&6; }
14349 if ${pgac_cv_type_locale_t+:} false; then :
14350   $as_echo_n "(cached) " >&6
14351 else
14352   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14353 /* end confdefs.h.  */
14354 #include <locale.h>
14355 locale_t x;
14356 int
14357 main ()
14358 {
14359
14360   ;
14361   return 0;
14362 }
14363 _ACEOF
14364 if ac_fn_c_try_compile "$LINENO"; then :
14365   pgac_cv_type_locale_t=yes
14366 else
14367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14368 /* end confdefs.h.  */
14369 #include <xlocale.h>
14370 locale_t x;
14371 int
14372 main ()
14373 {
14374
14375   ;
14376   return 0;
14377 }
14378 _ACEOF
14379 if ac_fn_c_try_compile "$LINENO"; then :
14380   pgac_cv_type_locale_t='yes (in xlocale.h)'
14381 else
14382   pgac_cv_type_locale_t=no
14383 fi
14384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14385 fi
14386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14387 fi
14388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14389 $as_echo "$pgac_cv_type_locale_t" >&6; }
14390 if test "$pgac_cv_type_locale_t" != no; then
14391
14392 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14393
14394 fi
14395 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14396
14397 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14398
14399 fi
14400
14401 # MSVC doesn't cope well with defining restrict to __restrict, the
14402 # spelling it understands, because it conflicts with
14403 # __declspec(restrict). Therefore we define pg_restrict to the
14404 # appropriate definition, which presumably won't conflict.
14405 #
14406 # Allow platforms with buggy compilers to force restrict to not be
14407 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14408 # template.
14409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14410 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14411 if ${ac_cv_c_restrict+:} false; then :
14412   $as_echo_n "(cached) " >&6
14413 else
14414   ac_cv_c_restrict=no
14415    # The order here caters to the fact that C++ does not require restrict.
14416    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14417      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14418 /* end confdefs.h.  */
14419 typedef int * int_ptr;
14420         int foo (int_ptr $ac_kw ip) {
14421         return ip[0];
14422        }
14423 int
14424 main ()
14425 {
14426 int s[1];
14427         int * $ac_kw t = s;
14428         t[0] = 0;
14429         return foo(t)
14430   ;
14431   return 0;
14432 }
14433 _ACEOF
14434 if ac_fn_c_try_compile "$LINENO"; then :
14435   ac_cv_c_restrict=$ac_kw
14436 fi
14437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14438      test "$ac_cv_c_restrict" != no && break
14439    done
14440
14441 fi
14442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14443 $as_echo "$ac_cv_c_restrict" >&6; }
14444
14445  case $ac_cv_c_restrict in
14446    restrict) ;;
14447    no) $as_echo "#define restrict /**/" >>confdefs.h
14448  ;;
14449    *)  cat >>confdefs.h <<_ACEOF
14450 #define restrict $ac_cv_c_restrict
14451 _ACEOF
14452  ;;
14453  esac
14454
14455 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14456   pg_restrict=""
14457 else
14458   pg_restrict="$ac_cv_c_restrict"
14459 fi
14460
14461 cat >>confdefs.h <<_ACEOF
14462 #define pg_restrict $pg_restrict
14463 _ACEOF
14464
14465
14466 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14467 #include <sys/param.h>
14468 #ifdef HAVE_SYS_UCRED_H
14469 #include <sys/ucred.h>
14470 #endif
14471 "
14472 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14473
14474 cat >>confdefs.h <<_ACEOF
14475 #define HAVE_STRUCT_CMSGCRED 1
14476 _ACEOF
14477
14478
14479 fi
14480
14481
14482 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14483 #include <getopt.h>
14484 #endif
14485 "
14486 if test "x$ac_cv_type_struct_option" = xyes; then :
14487
14488 cat >>confdefs.h <<_ACEOF
14489 #define HAVE_STRUCT_OPTION 1
14490 _ACEOF
14491
14492
14493 fi
14494
14495
14496 if test "$with_zlib" = yes; then
14497   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14498   # did not).  While we could work around the lack of z_streamp, it
14499   # seems unwise to encourage people to use such old zlib versions...
14500   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14501 "
14502 if test "x$ac_cv_type_z_streamp" = xyes; then :
14503
14504 else
14505   as_fn_error $? "zlib version is too old
14506 Use --without-zlib to disable zlib support." "$LINENO" 5
14507 fi
14508
14509 fi
14510
14511 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14512 case $host_cpu in
14513   ppc*|powerpc*)
14514     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14515 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14516     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14517 /* end confdefs.h.  */
14518
14519 int
14520 main ()
14521 {
14522 int a = 0; int *p = &a; int r;
14523          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14524   ;
14525   return 0;
14526 }
14527 _ACEOF
14528 if ac_fn_c_try_compile "$LINENO"; then :
14529   pgac_cv_have_ppc_mutex_hint=yes
14530 else
14531   pgac_cv_have_ppc_mutex_hint=no
14532 fi
14533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14534     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14535 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14536     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14537
14538 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14539
14540     fi
14541   ;;
14542 esac
14543
14544 # Check largefile support.  You might think this is a system service not a
14545 # compiler characteristic, but you'd be wrong.  We must check this before
14546 # probing existence of related functions such as fseeko, since the largefile
14547 # defines can affect what is generated for that.
14548 if test "$PORTNAME" != "win32"; then
14549    # Check whether --enable-largefile was given.
14550 if test "${enable_largefile+set}" = set; then :
14551   enableval=$enable_largefile;
14552 fi
14553
14554 if test "$enable_largefile" != no; then
14555
14556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14557 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14558 if ${ac_cv_sys_largefile_CC+:} false; then :
14559   $as_echo_n "(cached) " >&6
14560 else
14561   ac_cv_sys_largefile_CC=no
14562      if test "$GCC" != yes; then
14563        ac_save_CC=$CC
14564        while :; do
14565          # IRIX 6.2 and later do not support large files by default,
14566          # so use the C compiler's -n32 option if that helps.
14567          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14568 /* end confdefs.h.  */
14569 #include <sys/types.h>
14570  /* Check that off_t can represent 2**63 - 1 correctly.
14571     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14572     since some C++ compilers masquerading as C compilers
14573     incorrectly reject 9223372036854775807.  */
14574 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14575   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14576                        && LARGE_OFF_T % 2147483647 == 1)
14577                       ? 1 : -1];
14578 int
14579 main ()
14580 {
14581
14582   ;
14583   return 0;
14584 }
14585 _ACEOF
14586          if ac_fn_c_try_compile "$LINENO"; then :
14587   break
14588 fi
14589 rm -f core conftest.err conftest.$ac_objext
14590          CC="$CC -n32"
14591          if ac_fn_c_try_compile "$LINENO"; then :
14592   ac_cv_sys_largefile_CC=' -n32'; break
14593 fi
14594 rm -f core conftest.err conftest.$ac_objext
14595          break
14596        done
14597        CC=$ac_save_CC
14598        rm -f conftest.$ac_ext
14599     fi
14600 fi
14601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14602 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14603   if test "$ac_cv_sys_largefile_CC" != no; then
14604     CC=$CC$ac_cv_sys_largefile_CC
14605   fi
14606
14607   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14608 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14609 if ${ac_cv_sys_file_offset_bits+:} false; then :
14610   $as_echo_n "(cached) " >&6
14611 else
14612   while :; do
14613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14614 /* end confdefs.h.  */
14615 #include <sys/types.h>
14616  /* Check that off_t can represent 2**63 - 1 correctly.
14617     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14618     since some C++ compilers masquerading as C compilers
14619     incorrectly reject 9223372036854775807.  */
14620 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14621   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14622                        && LARGE_OFF_T % 2147483647 == 1)
14623                       ? 1 : -1];
14624 int
14625 main ()
14626 {
14627
14628   ;
14629   return 0;
14630 }
14631 _ACEOF
14632 if ac_fn_c_try_compile "$LINENO"; then :
14633   ac_cv_sys_file_offset_bits=no; break
14634 fi
14635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14636   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14637 /* end confdefs.h.  */
14638 #define _FILE_OFFSET_BITS 64
14639 #include <sys/types.h>
14640  /* Check that off_t can represent 2**63 - 1 correctly.
14641     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14642     since some C++ compilers masquerading as C compilers
14643     incorrectly reject 9223372036854775807.  */
14644 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14645   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14646                        && LARGE_OFF_T % 2147483647 == 1)
14647                       ? 1 : -1];
14648 int
14649 main ()
14650 {
14651
14652   ;
14653   return 0;
14654 }
14655 _ACEOF
14656 if ac_fn_c_try_compile "$LINENO"; then :
14657   ac_cv_sys_file_offset_bits=64; break
14658 fi
14659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14660   ac_cv_sys_file_offset_bits=unknown
14661   break
14662 done
14663 fi
14664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14665 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14666 case $ac_cv_sys_file_offset_bits in #(
14667   no | unknown) ;;
14668   *)
14669 cat >>confdefs.h <<_ACEOF
14670 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14671 _ACEOF
14672 ;;
14673 esac
14674 rm -rf conftest*
14675   if test $ac_cv_sys_file_offset_bits = unknown; then
14676     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14677 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14678 if ${ac_cv_sys_large_files+:} false; then :
14679   $as_echo_n "(cached) " >&6
14680 else
14681   while :; do
14682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14683 /* end confdefs.h.  */
14684 #include <sys/types.h>
14685  /* Check that off_t can represent 2**63 - 1 correctly.
14686     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14687     since some C++ compilers masquerading as C compilers
14688     incorrectly reject 9223372036854775807.  */
14689 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14690   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14691                        && LARGE_OFF_T % 2147483647 == 1)
14692                       ? 1 : -1];
14693 int
14694 main ()
14695 {
14696
14697   ;
14698   return 0;
14699 }
14700 _ACEOF
14701 if ac_fn_c_try_compile "$LINENO"; then :
14702   ac_cv_sys_large_files=no; break
14703 fi
14704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14706 /* end confdefs.h.  */
14707 #define _LARGE_FILES 1
14708 #include <sys/types.h>
14709  /* Check that off_t can represent 2**63 - 1 correctly.
14710     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14711     since some C++ compilers masquerading as C compilers
14712     incorrectly reject 9223372036854775807.  */
14713 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14714   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14715                        && LARGE_OFF_T % 2147483647 == 1)
14716                       ? 1 : -1];
14717 int
14718 main ()
14719 {
14720
14721   ;
14722   return 0;
14723 }
14724 _ACEOF
14725 if ac_fn_c_try_compile "$LINENO"; then :
14726   ac_cv_sys_large_files=1; break
14727 fi
14728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14729   ac_cv_sys_large_files=unknown
14730   break
14731 done
14732 fi
14733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14734 $as_echo "$ac_cv_sys_large_files" >&6; }
14735 case $ac_cv_sys_large_files in #(
14736   no | unknown) ;;
14737   *)
14738 cat >>confdefs.h <<_ACEOF
14739 #define _LARGE_FILES $ac_cv_sys_large_files
14740 _ACEOF
14741 ;;
14742 esac
14743 rm -rf conftest*
14744   fi
14745
14746
14747 fi
14748
14749
14750 fi
14751
14752 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14753 # The cast to long int works around a bug in the HP C Compiler
14754 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14755 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14756 # This bug is HP SR number 8606223364.
14757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14758 $as_echo_n "checking size of off_t... " >&6; }
14759 if ${ac_cv_sizeof_off_t+:} false; then :
14760   $as_echo_n "(cached) " >&6
14761 else
14762   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14763
14764 else
14765   if test "$ac_cv_type_off_t" = yes; then
14766      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14767 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14768 as_fn_error 77 "cannot compute sizeof (off_t)
14769 See \`config.log' for more details" "$LINENO" 5; }
14770    else
14771      ac_cv_sizeof_off_t=0
14772    fi
14773 fi
14774
14775 fi
14776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14777 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14778
14779
14780
14781 cat >>confdefs.h <<_ACEOF
14782 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14783 _ACEOF
14784
14785
14786
14787 # If we don't have largefile support, can't handle segsize >= 2GB.
14788 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14789    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14790 fi
14791
14792 # The cast to long int works around a bug in the HP C Compiler
14793 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14794 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14795 # This bug is HP SR number 8606223364.
14796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14797 $as_echo_n "checking size of bool... " >&6; }
14798 if ${ac_cv_sizeof_bool+:} false; then :
14799   $as_echo_n "(cached) " >&6
14800 else
14801   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
14802 #include <stdbool.h>
14803 #endif
14804 "; then :
14805
14806 else
14807   if test "$ac_cv_type_bool" = yes; then
14808      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14809 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14810 as_fn_error 77 "cannot compute sizeof (bool)
14811 See \`config.log' for more details" "$LINENO" 5; }
14812    else
14813      ac_cv_sizeof_bool=0
14814    fi
14815 fi
14816
14817 fi
14818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14819 $as_echo "$ac_cv_sizeof_bool" >&6; }
14820
14821
14822
14823 cat >>confdefs.h <<_ACEOF
14824 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14825 _ACEOF
14826
14827
14828
14829
14830 ##
14831 ## Functions, global variables
14832 ##
14833
14834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14835 $as_echo_n "checking for int timezone... " >&6; }
14836 if ${pgac_cv_var_int_timezone+:} false; then :
14837   $as_echo_n "(cached) " >&6
14838 else
14839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14840 /* end confdefs.h.  */
14841 #include <time.h>
14842 int res;
14843 int
14844 main ()
14845 {
14846 #ifndef __CYGWIN__
14847 res = timezone / 60;
14848 #else
14849 res = _timezone / 60;
14850 #endif
14851   ;
14852   return 0;
14853 }
14854 _ACEOF
14855 if ac_fn_c_try_link "$LINENO"; then :
14856   pgac_cv_var_int_timezone=yes
14857 else
14858   pgac_cv_var_int_timezone=no
14859 fi
14860 rm -f core conftest.err conftest.$ac_objext \
14861     conftest$ac_exeext conftest.$ac_ext
14862 fi
14863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
14864 $as_echo "$pgac_cv_var_int_timezone" >&6; }
14865 if test x"$pgac_cv_var_int_timezone" = xyes ; then
14866
14867 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
14868
14869 fi
14870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
14871 $as_echo_n "checking types of arguments for accept()... " >&6; }
14872  if ${ac_cv_func_accept_return+:} false; then :
14873   $as_echo_n "(cached) " >&6
14874 else
14875    if ${ac_cv_func_accept_arg1+:} false; then :
14876   $as_echo_n "(cached) " >&6
14877 else
14878     if ${ac_cv_func_accept_arg2+:} false; then :
14879   $as_echo_n "(cached) " >&6
14880 else
14881      if ${ac_cv_func_accept_arg3+:} false; then :
14882   $as_echo_n "(cached) " >&6
14883 else
14884       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
14885       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
14886        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
14887         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
14888          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14889 /* end confdefs.h.  */
14890 #include <sys/types.h>
14891 #include <sys/socket.h>
14892 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
14893 _ACEOF
14894 if ac_fn_c_try_compile "$LINENO"; then :
14895   ac_not_found=no; break 4
14896 else
14897   ac_not_found=yes
14898 fi
14899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14900        done
14901       done
14902      done
14903     done
14904     if test "$ac_not_found" = yes; then
14905       as_fn_error $? "could not determine argument types" "$LINENO" 5
14906     fi
14907     if test "$ac_cv_func_accept_arg3" = "void"; then
14908       ac_cv_func_accept_arg3=int
14909     fi
14910
14911 fi
14912
14913 fi
14914
14915 fi
14916
14917 fi
14918  { $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
14919 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
14920
14921 cat >>confdefs.h <<_ACEOF
14922 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
14923 _ACEOF
14924
14925
14926 cat >>confdefs.h <<_ACEOF
14927 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
14928 _ACEOF
14929
14930
14931 cat >>confdefs.h <<_ACEOF
14932 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
14933 _ACEOF
14934
14935
14936 cat >>confdefs.h <<_ACEOF
14937 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
14938 _ACEOF
14939
14940
14941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
14942 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
14943 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
14944   $as_echo_n "(cached) " >&6
14945 else
14946   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14947 /* end confdefs.h.  */
14948 #include <sys/time.h>
14949 int
14950 main ()
14951 {
14952 struct timeval *tp;
14953 struct timezone *tzp;
14954 gettimeofday(tp,tzp);
14955   ;
14956   return 0;
14957 }
14958 _ACEOF
14959 if ac_fn_c_try_compile "$LINENO"; then :
14960   pgac_cv_func_gettimeofday_1arg=no
14961 else
14962   pgac_cv_func_gettimeofday_1arg=yes
14963 fi
14964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14965 fi
14966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
14967 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
14968 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
14969
14970 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
14971
14972 fi
14973
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
14975 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
14976 if ${pgac_cv_func_wcstombs_l+:} false; then :
14977   $as_echo_n "(cached) " >&6
14978 else
14979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14980 /* end confdefs.h.  */
14981 #include <stdlib.h>
14982 #include <locale.h>
14983 int
14984 main ()
14985 {
14986 #ifndef wcstombs_l
14987 (void) wcstombs_l;
14988 #endif
14989   ;
14990   return 0;
14991 }
14992 _ACEOF
14993 if ac_fn_c_try_compile "$LINENO"; then :
14994   pgac_cv_func_wcstombs_l='yes'
14995 else
14996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14997 /* end confdefs.h.  */
14998 #include <stdlib.h>
14999 #include <locale.h>
15000 #include <xlocale.h>
15001 int
15002 main ()
15003 {
15004 #ifndef wcstombs_l
15005 (void) wcstombs_l;
15006 #endif
15007   ;
15008   return 0;
15009 }
15010 _ACEOF
15011 if ac_fn_c_try_compile "$LINENO"; then :
15012   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15013 else
15014   pgac_cv_func_wcstombs_l='no'
15015 fi
15016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15017 fi
15018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15019 fi
15020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15021 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15022 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15023
15024 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15025
15026 fi
15027
15028 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15029 # symbols that that library has no business exposing to the world.  Pending
15030 # acquisition of a clue by those developers, ignore libedit (including its
15031 # possible alias of libreadline) while checking for everything else.
15032 LIBS_including_readline="$LIBS"
15033 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15034
15035 for ac_func in cbrt clock_gettime dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open symlink sync_file_range utime utimes wcstombs_l
15036 do :
15037   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15038 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15039 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15040   cat >>confdefs.h <<_ACEOF
15041 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15042 _ACEOF
15043
15044 fi
15045 done
15046
15047
15048 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15049 if test "x$ac_cv_func_fseeko" = xyes; then :
15050   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15051
15052 else
15053   case " $LIBOBJS " in
15054   *" fseeko.$ac_objext "* ) ;;
15055   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15056  ;;
15057 esac
15058
15059 fi
15060
15061
15062 case $host_os in
15063         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15064         # Mingw uses macros to access Win32 API calls
15065         netbsd*|mingw*)
15066
15067 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15068
15069                 ac_cv_func_fseeko=yes;;
15070         *)
15071                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15072 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15073 if ${ac_cv_sys_largefile_source+:} false; then :
15074   $as_echo_n "(cached) " >&6
15075 else
15076   while :; do
15077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15078 /* end confdefs.h.  */
15079 #include <sys/types.h> /* for off_t */
15080      #include <stdio.h>
15081 int
15082 main ()
15083 {
15084 int (*fp) (FILE *, off_t, int) = fseeko;
15085      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15086   ;
15087   return 0;
15088 }
15089 _ACEOF
15090 if ac_fn_c_try_link "$LINENO"; then :
15091   ac_cv_sys_largefile_source=no; break
15092 fi
15093 rm -f core conftest.err conftest.$ac_objext \
15094     conftest$ac_exeext conftest.$ac_ext
15095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15096 /* end confdefs.h.  */
15097 #define _LARGEFILE_SOURCE 1
15098 #include <sys/types.h> /* for off_t */
15099      #include <stdio.h>
15100 int
15101 main ()
15102 {
15103 int (*fp) (FILE *, off_t, int) = fseeko;
15104      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15105   ;
15106   return 0;
15107 }
15108 _ACEOF
15109 if ac_fn_c_try_link "$LINENO"; then :
15110   ac_cv_sys_largefile_source=1; break
15111 fi
15112 rm -f core conftest.err conftest.$ac_objext \
15113     conftest$ac_exeext conftest.$ac_ext
15114   ac_cv_sys_largefile_source=unknown
15115   break
15116 done
15117 fi
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15119 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15120 case $ac_cv_sys_largefile_source in #(
15121   no | unknown) ;;
15122   *)
15123 cat >>confdefs.h <<_ACEOF
15124 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15125 _ACEOF
15126 ;;
15127 esac
15128 rm -rf conftest*
15129
15130 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15131 # in glibc 2.1.3, but that breaks too many other things.
15132 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15133 if test $ac_cv_sys_largefile_source != unknown; then
15134
15135 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15136
15137 fi
15138 ;;
15139 esac
15140
15141 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15142 # by calling it, 2009-04-02
15143 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15144 if test "$PORTNAME" != "solaris"; then
15145 for ac_func in posix_fadvise
15146 do :
15147   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15148 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15149   cat >>confdefs.h <<_ACEOF
15150 #define HAVE_POSIX_FADVISE 1
15151 _ACEOF
15152
15153 fi
15154 done
15155
15156 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15157 "
15158 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15159   ac_have_decl=1
15160 else
15161   ac_have_decl=0
15162 fi
15163
15164 cat >>confdefs.h <<_ACEOF
15165 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15166 _ACEOF
15167
15168 fi
15169
15170 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15171 "
15172 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15173   ac_have_decl=1
15174 else
15175   ac_have_decl=0
15176 fi
15177
15178 cat >>confdefs.h <<_ACEOF
15179 #define HAVE_DECL_FDATASYNC $ac_have_decl
15180 _ACEOF
15181
15182 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15183 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15184   ac_have_decl=1
15185 else
15186   ac_have_decl=0
15187 fi
15188
15189 cat >>confdefs.h <<_ACEOF
15190 #define HAVE_DECL_STRLCAT $ac_have_decl
15191 _ACEOF
15192 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15193 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15194   ac_have_decl=1
15195 else
15196   ac_have_decl=0
15197 fi
15198
15199 cat >>confdefs.h <<_ACEOF
15200 #define HAVE_DECL_STRLCPY $ac_have_decl
15201 _ACEOF
15202 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15203 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15204   ac_have_decl=1
15205 else
15206   ac_have_decl=0
15207 fi
15208
15209 cat >>confdefs.h <<_ACEOF
15210 #define HAVE_DECL_STRNLEN $ac_have_decl
15211 _ACEOF
15212
15213 # This is probably only present on macOS, but may as well check always
15214 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15215 "
15216 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15217   ac_have_decl=1
15218 else
15219   ac_have_decl=0
15220 fi
15221
15222 cat >>confdefs.h <<_ACEOF
15223 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15224 _ACEOF
15225
15226
15227 HAVE_IPV6=no
15228 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15229 #include <netinet/in.h>
15230 "
15231 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15232
15233 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15234
15235          HAVE_IPV6=yes
15236 fi
15237
15238
15239
15240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15241 $as_echo_n "checking for PS_STRINGS... " >&6; }
15242 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15243   $as_echo_n "(cached) " >&6
15244 else
15245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15246 /* end confdefs.h.  */
15247 #include <machine/vmparam.h>
15248 #include <sys/exec.h>
15249
15250 int
15251 main ()
15252 {
15253 PS_STRINGS->ps_nargvstr = 1;
15254 PS_STRINGS->ps_argvstr = "foo";
15255   ;
15256   return 0;
15257 }
15258 _ACEOF
15259 if ac_fn_c_try_link "$LINENO"; then :
15260   pgac_cv_var_PS_STRINGS=yes
15261 else
15262   pgac_cv_var_PS_STRINGS=no
15263 fi
15264 rm -f core conftest.err conftest.$ac_objext \
15265     conftest$ac_exeext conftest.$ac_ext
15266 fi
15267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15268 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15269 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15270
15271 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15272
15273 fi
15274
15275
15276 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
15277 # is missing.  Yes, there are machines that have only one.  We may
15278 # also decide to use snprintf.c if snprintf() is present but does not
15279 # have all the features we need --- see below.
15280
15281 if test "$PORTNAME" = "win32"; then
15282   # Win32 gets snprintf.c built unconditionally.
15283   #
15284   # To properly translate all NLS languages strings, we must support the
15285   # *printf() %$ format, which allows *printf() arguments to be selected
15286   # by position in the translated string.
15287   #
15288   # libintl versions < 0.13 use the native *printf() functions, and Win32
15289   # *printf() doesn't understand %$, so we must use our /port versions,
15290   # which do understand %$. libintl versions >= 0.13 include their own
15291   # *printf versions on Win32.  The libintl 0.13 release note text is:
15292   #
15293   #   C format strings with positions, as they arise when a translator
15294   #   needs to reorder a sentence, are now supported on all platforms.
15295   #   On those few platforms (NetBSD and Woe32) for which the native
15296   #   printf()/fprintf()/... functions don't support such format
15297   #   strings, replacements are provided through <libintl.h>.
15298   #
15299   # We could use libintl >= 0.13's *printf() if we were sure that we had
15300   # a libintl >= 0.13 at runtime, but seeing that there is no clean way
15301   # to guarantee that, it is best to just use our own, so we are sure to
15302   # get %$ support. In include/port.h we disable the *printf() macros
15303   # that might have been defined by libintl.
15304   #
15305   # We do this unconditionally whether NLS is used or not so we are sure
15306   # that all Win32 libraries and binaries behave the same.
15307   pgac_need_repl_snprintf=yes
15308 else
15309   pgac_need_repl_snprintf=no
15310   for ac_func in snprintf
15311 do :
15312   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15313 if test "x$ac_cv_func_snprintf" = xyes; then :
15314   cat >>confdefs.h <<_ACEOF
15315 #define HAVE_SNPRINTF 1
15316 _ACEOF
15317
15318 else
15319   pgac_need_repl_snprintf=yes
15320 fi
15321 done
15322
15323   for ac_func in vsnprintf
15324 do :
15325   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
15326 if test "x$ac_cv_func_vsnprintf" = xyes; then :
15327   cat >>confdefs.h <<_ACEOF
15328 #define HAVE_VSNPRINTF 1
15329 _ACEOF
15330
15331 else
15332   pgac_need_repl_snprintf=yes
15333 fi
15334 done
15335
15336 fi
15337
15338
15339 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
15340 # include/c.h will provide declarations.  Note this is a separate test
15341 # from whether the functions exist in the C library --- there are
15342 # systems that have the functions but don't bother to declare them :-(
15343
15344 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15345 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15346   ac_have_decl=1
15347 else
15348   ac_have_decl=0
15349 fi
15350
15351 cat >>confdefs.h <<_ACEOF
15352 #define HAVE_DECL_SNPRINTF $ac_have_decl
15353 _ACEOF
15354 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
15355 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
15356   ac_have_decl=1
15357 else
15358   ac_have_decl=0
15359 fi
15360
15361 cat >>confdefs.h <<_ACEOF
15362 #define HAVE_DECL_VSNPRINTF $ac_have_decl
15363 _ACEOF
15364
15365
15366
15367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15368 $as_echo_n "checking for isinf... " >&6; }
15369 if ${ac_cv_func_isinf+:} false; then :
15370   $as_echo_n "(cached) " >&6
15371 else
15372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15373 /* end confdefs.h.  */
15374
15375 #include <math.h>
15376 double glob_double;
15377
15378 int
15379 main ()
15380 {
15381 return isinf(glob_double) ? 0 : 1;
15382   ;
15383   return 0;
15384 }
15385 _ACEOF
15386 if ac_fn_c_try_link "$LINENO"; then :
15387   ac_cv_func_isinf=yes
15388 else
15389   ac_cv_func_isinf=no
15390 fi
15391 rm -f core conftest.err conftest.$ac_objext \
15392     conftest$ac_exeext conftest.$ac_ext
15393 fi
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15395 $as_echo "$ac_cv_func_isinf" >&6; }
15396
15397 if test $ac_cv_func_isinf = yes ; then
15398
15399 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15400
15401 else
15402   case " $LIBOBJS " in
15403   *" isinf.$ac_objext "* ) ;;
15404   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15405  ;;
15406 esac
15407
15408   # Look for a way to implement a substitute for isinf()
15409   for ac_func in fpclass fp_class fp_class_d class
15410 do :
15411   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15412 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15413 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15414   cat >>confdefs.h <<_ACEOF
15415 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15416 _ACEOF
15417  break
15418 fi
15419 done
15420
15421 fi
15422
15423 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15424 if test "x$ac_cv_func_crypt" = xyes; then :
15425   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15426
15427 else
15428   case " $LIBOBJS " in
15429   *" crypt.$ac_objext "* ) ;;
15430   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15431  ;;
15432 esac
15433
15434 fi
15435
15436 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15437 if test "x$ac_cv_func_fls" = xyes; then :
15438   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15439
15440 else
15441   case " $LIBOBJS " in
15442   *" fls.$ac_objext "* ) ;;
15443   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15444  ;;
15445 esac
15446
15447 fi
15448
15449 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15450 if test "x$ac_cv_func_getopt" = xyes; then :
15451   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15452
15453 else
15454   case " $LIBOBJS " in
15455   *" getopt.$ac_objext "* ) ;;
15456   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15457  ;;
15458 esac
15459
15460 fi
15461
15462 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15463 if test "x$ac_cv_func_getrusage" = xyes; then :
15464   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15465
15466 else
15467   case " $LIBOBJS " in
15468   *" getrusage.$ac_objext "* ) ;;
15469   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15470  ;;
15471 esac
15472
15473 fi
15474
15475 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15476 if test "x$ac_cv_func_inet_aton" = xyes; then :
15477   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15478
15479 else
15480   case " $LIBOBJS " in
15481   *" inet_aton.$ac_objext "* ) ;;
15482   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15483  ;;
15484 esac
15485
15486 fi
15487
15488 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15489 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15490   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15491
15492 else
15493   case " $LIBOBJS " in
15494   *" mkdtemp.$ac_objext "* ) ;;
15495   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15496  ;;
15497 esac
15498
15499 fi
15500
15501 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15502 if test "x$ac_cv_func_random" = xyes; then :
15503   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15504
15505 else
15506   case " $LIBOBJS " in
15507   *" random.$ac_objext "* ) ;;
15508   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15509  ;;
15510 esac
15511
15512 fi
15513
15514 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15515 if test "x$ac_cv_func_rint" = xyes; then :
15516   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15517
15518 else
15519   case " $LIBOBJS " in
15520   *" rint.$ac_objext "* ) ;;
15521   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15522  ;;
15523 esac
15524
15525 fi
15526
15527 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15528 if test "x$ac_cv_func_srandom" = xyes; then :
15529   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15530
15531 else
15532   case " $LIBOBJS " in
15533   *" srandom.$ac_objext "* ) ;;
15534   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15535  ;;
15536 esac
15537
15538 fi
15539
15540 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
15541 if test "x$ac_cv_func_strerror" = xyes; then :
15542   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
15543
15544 else
15545   case " $LIBOBJS " in
15546   *" strerror.$ac_objext "* ) ;;
15547   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
15548  ;;
15549 esac
15550
15551 fi
15552
15553 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15554 if test "x$ac_cv_func_strlcat" = xyes; then :
15555   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15556
15557 else
15558   case " $LIBOBJS " in
15559   *" strlcat.$ac_objext "* ) ;;
15560   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15561  ;;
15562 esac
15563
15564 fi
15565
15566 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15567 if test "x$ac_cv_func_strlcpy" = xyes; then :
15568   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15569
15570 else
15571   case " $LIBOBJS " in
15572   *" strlcpy.$ac_objext "* ) ;;
15573   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15574  ;;
15575 esac
15576
15577 fi
15578
15579 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15580 if test "x$ac_cv_func_strnlen" = xyes; then :
15581   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15582
15583 else
15584   case " $LIBOBJS " in
15585   *" strnlen.$ac_objext "* ) ;;
15586   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15587  ;;
15588 esac
15589
15590 fi
15591
15592
15593
15594 case $host_os in
15595
15596         # Windows uses a specialised env handler
15597         # and doesn't need a replacement getpeereid because it doesn't use
15598         # Unix sockets.
15599         mingw*)
15600
15601 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15602
15603
15604 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15605
15606                 ac_cv_func_unsetenv=yes
15607                 ac_cv_func_getpeereid=yes;;
15608         *)
15609                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15610 if test "x$ac_cv_func_unsetenv" = xyes; then :
15611   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15612
15613 else
15614   case " $LIBOBJS " in
15615   *" unsetenv.$ac_objext "* ) ;;
15616   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15617  ;;
15618 esac
15619
15620 fi
15621
15622 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15623 if test "x$ac_cv_func_getpeereid" = xyes; then :
15624   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15625
15626 else
15627   case " $LIBOBJS " in
15628   *" getpeereid.$ac_objext "* ) ;;
15629   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15630  ;;
15631 esac
15632
15633 fi
15634
15635
15636                 ;;
15637 esac
15638
15639 # System's version of getaddrinfo(), if any, may be used only if we found
15640 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15641 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15642 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15643    test "$PORTNAME" != "win32"; then
15644   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15645 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15646   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15647
15648 else
15649   case " $LIBOBJS " in
15650   *" getaddrinfo.$ac_objext "* ) ;;
15651   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15652  ;;
15653 esac
15654
15655 fi
15656
15657
15658 else
15659   case " $LIBOBJS " in
15660   *" getaddrinfo.$ac_objext "* ) ;;
15661   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15662  ;;
15663 esac
15664
15665 fi
15666
15667 # Similarly, use system's getopt_long() only if system provides struct option.
15668 if test x"$ac_cv_type_struct_option" = xyes ; then
15669   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15670 if test "x$ac_cv_func_getopt_long" = xyes; then :
15671   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15672
15673 else
15674   case " $LIBOBJS " in
15675   *" getopt_long.$ac_objext "* ) ;;
15676   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15677  ;;
15678 esac
15679
15680 fi
15681
15682
15683 else
15684   case " $LIBOBJS " in
15685   *" getopt_long.$ac_objext "* ) ;;
15686   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15687  ;;
15688 esac
15689
15690 fi
15691
15692 # Solaris' getopt() doesn't do what we want for long options, so always use
15693 # our version on that platform.
15694 if test "$PORTNAME" = "solaris"; then
15695   case " $LIBOBJS " in
15696   *" getopt.$ac_objext "* ) ;;
15697   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15698  ;;
15699 esac
15700
15701 fi
15702
15703 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15704 # so always use our version on Windows.
15705 if test "$PORTNAME" = "win32"; then
15706   case " $LIBOBJS " in
15707   *" getopt.$ac_objext "* ) ;;
15708   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15709  ;;
15710 esac
15711
15712   case " $LIBOBJS " in
15713   *" getopt_long.$ac_objext "* ) ;;
15714   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15715  ;;
15716 esac
15717
15718 fi
15719
15720 # Win32 (really MinGW) support
15721 if test "$PORTNAME" = "win32"; then
15722   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15723 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15724   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15725
15726 else
15727   case " $LIBOBJS " in
15728   *" gettimeofday.$ac_objext "* ) ;;
15729   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15730  ;;
15731 esac
15732
15733 fi
15734
15735
15736   case " $LIBOBJS " in
15737   *" dirmod.$ac_objext "* ) ;;
15738   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15739  ;;
15740 esac
15741
15742   case " $LIBOBJS " in
15743   *" kill.$ac_objext "* ) ;;
15744   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15745  ;;
15746 esac
15747
15748   case " $LIBOBJS " in
15749   *" open.$ac_objext "* ) ;;
15750   *) LIBOBJS="$LIBOBJS open.$ac_objext"
15751  ;;
15752 esac
15753
15754   case " $LIBOBJS " in
15755   *" system.$ac_objext "* ) ;;
15756   *) LIBOBJS="$LIBOBJS system.$ac_objext"
15757  ;;
15758 esac
15759
15760   case " $LIBOBJS " in
15761   *" win32env.$ac_objext "* ) ;;
15762   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15763  ;;
15764 esac
15765
15766   case " $LIBOBJS " in
15767   *" win32error.$ac_objext "* ) ;;
15768   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15769  ;;
15770 esac
15771
15772   case " $LIBOBJS " in
15773   *" win32security.$ac_objext "* ) ;;
15774   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15775  ;;
15776 esac
15777
15778   case " $LIBOBJS " in
15779   *" win32setlocale.$ac_objext "* ) ;;
15780   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15781  ;;
15782 esac
15783
15784
15785 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
15786
15787   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
15788 #define WIN32_LEAN_AND_MEAN
15789 #include <windows.h>
15790 #include <string.h>
15791 #include <dbghelp.h>
15792 "
15793 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
15794
15795 cat >>confdefs.h <<_ACEOF
15796 #define HAVE_MINIDUMP_TYPE 1
15797 _ACEOF
15798
15799 pgac_minidump_type=yes
15800 else
15801   pgac_minidump_type=no
15802 fi
15803
15804 fi
15805 if test x"$pgac_minidump_type" = x"yes" ; then
15806   have_win32_dbghelp=yes
15807
15808 else
15809   have_win32_dbghelp=no
15810
15811 fi
15812
15813 # Cygwin needs only a bit of that
15814 if test "$PORTNAME" = "cygwin"; then
15815   case " $LIBOBJS " in
15816   *" dirmod.$ac_objext "* ) ;;
15817   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15818  ;;
15819 esac
15820
15821 fi
15822
15823 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
15824 /* NetBSD declares sys_siglist in unistd.h.  */
15825 #ifdef HAVE_UNISTD_H
15826 # include <unistd.h>
15827 #endif
15828
15829 "
15830 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
15831   ac_have_decl=1
15832 else
15833   ac_have_decl=0
15834 fi
15835
15836 cat >>confdefs.h <<_ACEOF
15837 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
15838 _ACEOF
15839
15840
15841 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15842 if test "x$ac_cv_func_syslog" = xyes; then :
15843   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15844 if test "x$ac_cv_header_syslog_h" = xyes; then :
15845
15846 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15847
15848 fi
15849
15850
15851 fi
15852
15853
15854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15855 $as_echo_n "checking for opterr... " >&6; }
15856 if ${pgac_cv_var_int_opterr+:} false; then :
15857   $as_echo_n "(cached) " >&6
15858 else
15859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15860 /* end confdefs.h.  */
15861 #include <unistd.h>
15862 int
15863 main ()
15864 {
15865 extern int opterr; opterr = 1;
15866   ;
15867   return 0;
15868 }
15869 _ACEOF
15870 if ac_fn_c_try_link "$LINENO"; then :
15871   pgac_cv_var_int_opterr=yes
15872 else
15873   pgac_cv_var_int_opterr=no
15874 fi
15875 rm -f core conftest.err conftest.$ac_objext \
15876     conftest$ac_exeext conftest.$ac_ext
15877 fi
15878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15879 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15880 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15881
15882 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15883
15884 fi
15885
15886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15887 $as_echo_n "checking for optreset... " >&6; }
15888 if ${pgac_cv_var_int_optreset+:} false; then :
15889   $as_echo_n "(cached) " >&6
15890 else
15891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15892 /* end confdefs.h.  */
15893 #include <unistd.h>
15894 int
15895 main ()
15896 {
15897 extern int optreset; optreset = 1;
15898   ;
15899   return 0;
15900 }
15901 _ACEOF
15902 if ac_fn_c_try_link "$LINENO"; then :
15903   pgac_cv_var_int_optreset=yes
15904 else
15905   pgac_cv_var_int_optreset=no
15906 fi
15907 rm -f core conftest.err conftest.$ac_objext \
15908     conftest$ac_exeext conftest.$ac_ext
15909 fi
15910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
15911 $as_echo "$pgac_cv_var_int_optreset" >&6; }
15912 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15913
15914 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
15915
15916 fi
15917
15918 for ac_func in strtoll __strtoll strtoq
15919 do :
15920   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15921 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15922 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15923   cat >>confdefs.h <<_ACEOF
15924 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15925 _ACEOF
15926  break
15927 fi
15928 done
15929
15930 for ac_func in strtoull __strtoull strtouq
15931 do :
15932   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15933 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15934 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15935   cat >>confdefs.h <<_ACEOF
15936 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15937 _ACEOF
15938  break
15939 fi
15940 done
15941
15942 # strto[u]ll may exist but not be declared
15943 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
15944 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
15945   ac_have_decl=1
15946 else
15947   ac_have_decl=0
15948 fi
15949
15950 cat >>confdefs.h <<_ACEOF
15951 #define HAVE_DECL_STRTOLL $ac_have_decl
15952 _ACEOF
15953 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
15954 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
15955   ac_have_decl=1
15956 else
15957   ac_have_decl=0
15958 fi
15959
15960 cat >>confdefs.h <<_ACEOF
15961 #define HAVE_DECL_STRTOULL $ac_have_decl
15962 _ACEOF
15963
15964
15965 if test "$with_icu" = yes; then
15966   ac_save_CPPFLAGS=$CPPFLAGS
15967   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
15968
15969   # Verify we have ICU's header files
15970   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
15971 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
15972
15973 else
15974   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
15975 fi
15976
15977
15978
15979   CPPFLAGS=$ac_save_CPPFLAGS
15980 fi
15981
15982 # Lastly, restore full LIBS list and check for readline/libedit symbols
15983 LIBS="$LIBS_including_readline"
15984
15985 if test "$with_readline" = yes; then
15986   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
15987 $as_echo_n "checking for rl_completion_append_character... " >&6; }
15988 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
15989   $as_echo_n "(cached) " >&6
15990 else
15991   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15992 /* end confdefs.h.  */
15993 #include <stdio.h>
15994 #ifdef HAVE_READLINE_READLINE_H
15995 # include <readline/readline.h>
15996 #elif defined(HAVE_READLINE_H)
15997 # include <readline.h>
15998 #endif
15999
16000 int
16001 main ()
16002 {
16003 rl_completion_append_character = 'x';
16004   ;
16005   return 0;
16006 }
16007 _ACEOF
16008 if ac_fn_c_try_link "$LINENO"; then :
16009   pgac_cv_var_rl_completion_append_character=yes
16010 else
16011   pgac_cv_var_rl_completion_append_character=no
16012 fi
16013 rm -f core conftest.err conftest.$ac_objext \
16014     conftest$ac_exeext conftest.$ac_ext
16015 fi
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16017 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16018 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16019
16020 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16021
16022 fi
16023   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16024 do :
16025   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16026 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16027 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16028   cat >>confdefs.h <<_ACEOF
16029 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16030 _ACEOF
16031
16032 fi
16033 done
16034
16035   for ac_func in append_history history_truncate_file
16036 do :
16037   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16038 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16039 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16040   cat >>confdefs.h <<_ACEOF
16041 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16042 _ACEOF
16043
16044 fi
16045 done
16046
16047 fi
16048
16049
16050 # This test makes sure that run tests work at all.  Sometimes a shared
16051 # library is found by the linker, but the runtime linker can't find it.
16052 # This check should come after all modifications of compiler or linker
16053 # variables, and before any other run tests.
16054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16055 $as_echo_n "checking test program... " >&6; }
16056 if test "$cross_compiling" = yes; then :
16057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16058 $as_echo "cross-compiling" >&6; }
16059 else
16060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16061 /* end confdefs.h.  */
16062 int main() { return 0; }
16063 _ACEOF
16064 if ac_fn_c_try_run "$LINENO"; then :
16065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16066 $as_echo "ok" >&6; }
16067 else
16068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16069 $as_echo "failed" >&6; }
16070 as_fn_error $? "
16071 Could not execute a simple test program.  This may be a problem
16072 related to locating shared libraries.  Check the file 'config.log'
16073 for the exact reason." "$LINENO" 5
16074 fi
16075 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16076   conftest.$ac_objext conftest.beam conftest.$ac_ext
16077 fi
16078
16079
16080 # --------------------
16081 # Run tests below here
16082 # --------------------
16083
16084 # For NLS, force use of our snprintf if system's doesn't do arg control.
16085 # See comment above at snprintf test for details.
16086 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
16087   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
16088 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
16089 if ${pgac_cv_snprintf_arg_control+:} false; then :
16090   $as_echo_n "(cached) " >&6
16091 else
16092   if test "$cross_compiling" = yes; then :
16093   pgac_cv_snprintf_arg_control=cross
16094 else
16095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16096 /* end confdefs.h.  */
16097 #include <stdio.h>
16098 #include <string.h>
16099
16100 int main()
16101 {
16102   char buf[100];
16103
16104   /* can it swap arguments? */
16105   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
16106   if (strcmp(buf, "4 3") != 0)
16107     return 1;
16108   return 0;
16109 }
16110 _ACEOF
16111 if ac_fn_c_try_run "$LINENO"; then :
16112   pgac_cv_snprintf_arg_control=yes
16113 else
16114   pgac_cv_snprintf_arg_control=no
16115 fi
16116 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16117   conftest.$ac_objext conftest.beam conftest.$ac_ext
16118 fi
16119
16120
16121 fi
16122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
16123 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
16124
16125   if test $pgac_cv_snprintf_arg_control != yes ; then
16126     pgac_need_repl_snprintf=yes
16127   fi
16128 fi
16129
16130
16131
16132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16133 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16134 if ${pgac_cv_type_long_int_64+:} false; then :
16135   $as_echo_n "(cached) " >&6
16136 else
16137   if test "$cross_compiling" = yes; then :
16138   # If cross-compiling, check the size reported by the compiler and
16139 # trust that the arithmetic works.
16140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16141 /* end confdefs.h.  */
16142
16143 int
16144 main ()
16145 {
16146 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16147 test_array [0] = 0;
16148 return test_array [0];
16149
16150   ;
16151   return 0;
16152 }
16153 _ACEOF
16154 if ac_fn_c_try_compile "$LINENO"; then :
16155   pgac_cv_type_long_int_64=yes
16156 else
16157   pgac_cv_type_long_int_64=no
16158 fi
16159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16160 else
16161   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16162 /* end confdefs.h.  */
16163 typedef long int ac_int64;
16164
16165 /*
16166  * These are globals to discourage the compiler from folding all the
16167  * arithmetic tests down to compile-time constants.
16168  */
16169 ac_int64 a = 20000001;
16170 ac_int64 b = 40000005;
16171
16172 int does_int64_work()
16173 {
16174   ac_int64 c,d;
16175
16176   if (sizeof(ac_int64) != 8)
16177     return 0;                   /* definitely not the right size */
16178
16179   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16180   c = a * b;
16181   d = (c + b) / b;
16182   if (d != a+1)
16183     return 0;
16184   return 1;
16185 }
16186
16187 int
16188 main() {
16189   return (! does_int64_work());
16190 }
16191 _ACEOF
16192 if ac_fn_c_try_run "$LINENO"; then :
16193   pgac_cv_type_long_int_64=yes
16194 else
16195   pgac_cv_type_long_int_64=no
16196 fi
16197 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16198   conftest.$ac_objext conftest.beam conftest.$ac_ext
16199 fi
16200
16201 fi
16202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16203 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16204
16205 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16206 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16207
16208 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16209
16210 fi
16211
16212
16213 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16214   pg_int64_type="long int"
16215 else
16216   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16217 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16218 if ${pgac_cv_type_long_long_int_64+:} false; then :
16219   $as_echo_n "(cached) " >&6
16220 else
16221   if test "$cross_compiling" = yes; then :
16222   # If cross-compiling, check the size reported by the compiler and
16223 # trust that the arithmetic works.
16224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16225 /* end confdefs.h.  */
16226
16227 int
16228 main ()
16229 {
16230 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16231 test_array [0] = 0;
16232 return test_array [0];
16233
16234   ;
16235   return 0;
16236 }
16237 _ACEOF
16238 if ac_fn_c_try_compile "$LINENO"; then :
16239   pgac_cv_type_long_long_int_64=yes
16240 else
16241   pgac_cv_type_long_long_int_64=no
16242 fi
16243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16244 else
16245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16246 /* end confdefs.h.  */
16247 typedef long long int ac_int64;
16248
16249 /*
16250  * These are globals to discourage the compiler from folding all the
16251  * arithmetic tests down to compile-time constants.
16252  */
16253 ac_int64 a = 20000001;
16254 ac_int64 b = 40000005;
16255
16256 int does_int64_work()
16257 {
16258   ac_int64 c,d;
16259
16260   if (sizeof(ac_int64) != 8)
16261     return 0;                   /* definitely not the right size */
16262
16263   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16264   c = a * b;
16265   d = (c + b) / b;
16266   if (d != a+1)
16267     return 0;
16268   return 1;
16269 }
16270
16271 int
16272 main() {
16273   return (! does_int64_work());
16274 }
16275 _ACEOF
16276 if ac_fn_c_try_run "$LINENO"; then :
16277   pgac_cv_type_long_long_int_64=yes
16278 else
16279   pgac_cv_type_long_long_int_64=no
16280 fi
16281 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16282   conftest.$ac_objext conftest.beam conftest.$ac_ext
16283 fi
16284
16285 fi
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16287 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16288
16289 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16290 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16291
16292 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16293
16294 fi
16295
16296   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16297     pg_int64_type="long long int"
16298   else
16299     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16300   fi
16301 fi
16302
16303
16304 cat >>confdefs.h <<_ACEOF
16305 #define PG_INT64_TYPE $pg_int64_type
16306 _ACEOF
16307
16308
16309 # Select the printf length modifier that goes with that, too.
16310 # (This used to be bound up with replacement-snprintf selection, but now
16311 # we assume that the native *printf functions use standard length modifiers.)
16312 if test x"$pg_int64_type" = x"long long int" ; then
16313   INT64_MODIFIER='"ll"'
16314 else
16315   INT64_MODIFIER='"l"'
16316 fi
16317
16318
16319 cat >>confdefs.h <<_ACEOF
16320 #define INT64_MODIFIER $INT64_MODIFIER
16321 _ACEOF
16322
16323
16324 # Force use of our snprintf if the system's doesn't support the %z flag.
16325 # (Note this test uses PG_INT64_TYPE and INT64_MODIFIER.)
16326 if test "$pgac_need_repl_snprintf" = no; then
16327   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
16328 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
16329 if ${pgac_cv_snprintf_size_t_support+:} false; then :
16330   $as_echo_n "(cached) " >&6
16331 else
16332   if test "$cross_compiling" = yes; then :
16333   pgac_cv_snprintf_size_t_support=cross
16334 else
16335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16336 /* end confdefs.h.  */
16337 #include <stdio.h>
16338 #include <string.h>
16339
16340 int main()
16341 {
16342   char bufz[100];
16343   char buf64[100];
16344
16345   /*
16346    * Print the largest unsigned number fitting in a size_t using both %zu
16347    * and the previously-determined format for 64-bit integers.  Note that
16348    * we don't run this code unless we know snprintf handles 64-bit ints.
16349    */
16350   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
16351   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
16352   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
16353     (unsigned PG_INT64_TYPE) ~((size_t) 0));
16354   if (strcmp(bufz, buf64) != 0)
16355     return 1;
16356   return 0;
16357 }
16358 _ACEOF
16359 if ac_fn_c_try_run "$LINENO"; then :
16360   pgac_cv_snprintf_size_t_support=yes
16361 else
16362   pgac_cv_snprintf_size_t_support=no
16363 fi
16364 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16365   conftest.$ac_objext conftest.beam conftest.$ac_ext
16366 fi
16367
16368
16369 fi
16370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
16371 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
16372
16373   if test "$pgac_cv_snprintf_size_t_support" != yes; then
16374     pgac_need_repl_snprintf=yes
16375   fi
16376 fi
16377
16378 # Force use of our snprintf if the system's doesn't handle buffer overrun
16379 # as specified by C99.
16380 if test "$pgac_need_repl_snprintf" = no; then
16381   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf reports buffer overrun per C99" >&5
16382 $as_echo_n "checking whether snprintf reports buffer overrun per C99... " >&6; }
16383 if ${pgac_cv_snprintf_c99_result+:} false; then :
16384   $as_echo_n "(cached) " >&6
16385 else
16386   if test "$cross_compiling" = yes; then :
16387   pgac_cv_snprintf_c99_result=cross
16388 else
16389   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16390 /* end confdefs.h.  */
16391 #include <stdio.h>
16392 #include <string.h>
16393
16394 int main()
16395 {
16396   char buf[10];
16397
16398   if (snprintf(buf, sizeof(buf), "12345678901234567890") != 20)
16399     return 1;
16400   return 0;
16401 }
16402 _ACEOF
16403 if ac_fn_c_try_run "$LINENO"; then :
16404   pgac_cv_snprintf_c99_result=yes
16405 else
16406   pgac_cv_snprintf_c99_result=no
16407 fi
16408 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16409   conftest.$ac_objext conftest.beam conftest.$ac_ext
16410 fi
16411
16412
16413 fi
16414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_c99_result" >&5
16415 $as_echo "$pgac_cv_snprintf_c99_result" >&6; }
16416
16417   if test "$pgac_cv_snprintf_c99_result" != yes; then
16418     pgac_need_repl_snprintf=yes
16419   fi
16420 fi
16421
16422 # Now we have checked all the reasons to replace snprintf
16423 if test $pgac_need_repl_snprintf = yes; then
16424
16425 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
16426
16427   case " $LIBOBJS " in
16428   *" snprintf.$ac_objext "* ) ;;
16429   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
16430  ;;
16431 esac
16432
16433 fi
16434
16435 # has to be down here, rather than with the other builtins, because
16436 # the test uses PG_INT64_TYPE.
16437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16438 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16439 if ${pgac_cv__builtin_op_overflow+:} false; then :
16440   $as_echo_n "(cached) " >&6
16441 else
16442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16443 /* end confdefs.h.  */
16444
16445 PG_INT64_TYPE a = 1;
16446 PG_INT64_TYPE b = 1;
16447 PG_INT64_TYPE result;
16448 int oflo;
16449
16450 int
16451 main ()
16452 {
16453 oflo = __builtin_mul_overflow(a, b, &result);
16454   ;
16455   return 0;
16456 }
16457 _ACEOF
16458 if ac_fn_c_try_link "$LINENO"; then :
16459   pgac_cv__builtin_op_overflow=yes
16460 else
16461   pgac_cv__builtin_op_overflow=no
16462 fi
16463 rm -f core conftest.err conftest.$ac_objext \
16464     conftest$ac_exeext conftest.$ac_ext
16465 fi
16466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16467 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16468 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16469
16470 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16471
16472 fi
16473
16474 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16475 # The cast to long int works around a bug in the HP C Compiler
16476 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16477 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16478 # This bug is HP SR number 8606223364.
16479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16480 $as_echo_n "checking size of void *... " >&6; }
16481 if ${ac_cv_sizeof_void_p+:} false; then :
16482   $as_echo_n "(cached) " >&6
16483 else
16484   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16485
16486 else
16487   if test "$ac_cv_type_void_p" = yes; then
16488      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16489 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16490 as_fn_error 77 "cannot compute sizeof (void *)
16491 See \`config.log' for more details" "$LINENO" 5; }
16492    else
16493      ac_cv_sizeof_void_p=0
16494    fi
16495 fi
16496
16497 fi
16498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16499 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16500
16501
16502
16503 cat >>confdefs.h <<_ACEOF
16504 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16505 _ACEOF
16506
16507
16508 # The cast to long int works around a bug in the HP C Compiler
16509 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16510 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16511 # This bug is HP SR number 8606223364.
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16513 $as_echo_n "checking size of size_t... " >&6; }
16514 if ${ac_cv_sizeof_size_t+:} false; then :
16515   $as_echo_n "(cached) " >&6
16516 else
16517   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16518
16519 else
16520   if test "$ac_cv_type_size_t" = yes; then
16521      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16522 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16523 as_fn_error 77 "cannot compute sizeof (size_t)
16524 See \`config.log' for more details" "$LINENO" 5; }
16525    else
16526      ac_cv_sizeof_size_t=0
16527    fi
16528 fi
16529
16530 fi
16531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16532 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16533
16534
16535
16536 cat >>confdefs.h <<_ACEOF
16537 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16538 _ACEOF
16539
16540
16541 # The cast to long int works around a bug in the HP C Compiler
16542 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16543 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16544 # This bug is HP SR number 8606223364.
16545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16546 $as_echo_n "checking size of long... " >&6; }
16547 if ${ac_cv_sizeof_long+:} false; then :
16548   $as_echo_n "(cached) " >&6
16549 else
16550   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16551
16552 else
16553   if test "$ac_cv_type_long" = yes; then
16554      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16555 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16556 as_fn_error 77 "cannot compute sizeof (long)
16557 See \`config.log' for more details" "$LINENO" 5; }
16558    else
16559      ac_cv_sizeof_long=0
16560    fi
16561 fi
16562
16563 fi
16564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16565 $as_echo "$ac_cv_sizeof_long" >&6; }
16566
16567
16568
16569 cat >>confdefs.h <<_ACEOF
16570 #define SIZEOF_LONG $ac_cv_sizeof_long
16571 _ACEOF
16572
16573
16574
16575 # Decide whether float4 is passed by value: user-selectable, enabled by default
16576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16577 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16578
16579
16580 # Check whether --enable-float4-byval was given.
16581 if test "${enable_float4_byval+set}" = set; then :
16582   enableval=$enable_float4_byval;
16583   case $enableval in
16584     yes)
16585
16586 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16587
16588                float4passbyval=true
16589       ;;
16590     no)
16591       float4passbyval=false
16592       ;;
16593     *)
16594       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16595       ;;
16596   esac
16597
16598 else
16599   enable_float4_byval=yes
16600
16601 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16602
16603                float4passbyval=true
16604 fi
16605
16606
16607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16608 $as_echo "$enable_float4_byval" >&6; }
16609
16610 cat >>confdefs.h <<_ACEOF
16611 #define FLOAT4PASSBYVAL $float4passbyval
16612 _ACEOF
16613
16614
16615 # Decide whether float8 is passed by value.
16616 # Note: this setting also controls int8 and related types such as timestamp.
16617 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16618 # If not, trying to select it is an error.
16619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16620 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16621 if test $ac_cv_sizeof_void_p -ge 8 ; then
16622
16623
16624 # Check whether --enable-float8-byval was given.
16625 if test "${enable_float8_byval+set}" = set; then :
16626   enableval=$enable_float8_byval;
16627   case $enableval in
16628     yes)
16629       :
16630       ;;
16631     no)
16632       :
16633       ;;
16634     *)
16635       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16636       ;;
16637   esac
16638
16639 else
16640   enable_float8_byval=yes
16641
16642 fi
16643
16644
16645 else
16646
16647
16648 # Check whether --enable-float8-byval was given.
16649 if test "${enable_float8_byval+set}" = set; then :
16650   enableval=$enable_float8_byval;
16651   case $enableval in
16652     yes)
16653       :
16654       ;;
16655     no)
16656       :
16657       ;;
16658     *)
16659       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16660       ;;
16661   esac
16662
16663 else
16664   enable_float8_byval=no
16665
16666 fi
16667
16668
16669   if test "$enable_float8_byval" = yes ; then
16670     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16671   fi
16672 fi
16673 if test "$enable_float8_byval" = yes ; then
16674
16675 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16676
16677   float8passbyval=true
16678 else
16679   float8passbyval=false
16680 fi
16681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16682 $as_echo "$enable_float8_byval" >&6; }
16683
16684 cat >>confdefs.h <<_ACEOF
16685 #define FLOAT8PASSBYVAL $float8passbyval
16686 _ACEOF
16687
16688
16689 # Determine memory alignment requirements for the basic C data types.
16690
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 short" >&5
16694 $as_echo_n "checking alignment of short... " >&6; }
16695 if ${ac_cv_alignof_short+:} 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_short"        "$ac_includes_default
16699 #ifndef offsetof
16700 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16701 #endif
16702 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16703
16704 else
16705   if test "$ac_cv_type_short" = 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 short
16709 See \`config.log' for more details" "$LINENO" 5; }
16710    else
16711      ac_cv_alignof_short=0
16712    fi
16713 fi
16714
16715 fi
16716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16717 $as_echo "$ac_cv_alignof_short" >&6; }
16718
16719
16720
16721 cat >>confdefs.h <<_ACEOF
16722 #define ALIGNOF_SHORT $ac_cv_alignof_short
16723 _ACEOF
16724
16725
16726 # The cast to long int works around a bug in the HP C Compiler,
16727 # see AC_CHECK_SIZEOF for more information.
16728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16729 $as_echo_n "checking alignment of int... " >&6; }
16730 if ${ac_cv_alignof_int+:} false; then :
16731   $as_echo_n "(cached) " >&6
16732 else
16733   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16734 #ifndef offsetof
16735 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16736 #endif
16737 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16738
16739 else
16740   if test "$ac_cv_type_int" = yes; then
16741      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16742 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16743 as_fn_error 77 "cannot compute alignment of int
16744 See \`config.log' for more details" "$LINENO" 5; }
16745    else
16746      ac_cv_alignof_int=0
16747    fi
16748 fi
16749
16750 fi
16751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16752 $as_echo "$ac_cv_alignof_int" >&6; }
16753
16754
16755
16756 cat >>confdefs.h <<_ACEOF
16757 #define ALIGNOF_INT $ac_cv_alignof_int
16758 _ACEOF
16759
16760
16761 # The cast to long int works around a bug in the HP C Compiler,
16762 # see AC_CHECK_SIZEOF for more information.
16763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16764 $as_echo_n "checking alignment of long... " >&6; }
16765 if ${ac_cv_alignof_long+:} false; then :
16766   $as_echo_n "(cached) " >&6
16767 else
16768   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16769 #ifndef offsetof
16770 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16771 #endif
16772 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16773
16774 else
16775   if test "$ac_cv_type_long" = yes; then
16776      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16777 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16778 as_fn_error 77 "cannot compute alignment of long
16779 See \`config.log' for more details" "$LINENO" 5; }
16780    else
16781      ac_cv_alignof_long=0
16782    fi
16783 fi
16784
16785 fi
16786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16787 $as_echo "$ac_cv_alignof_long" >&6; }
16788
16789
16790
16791 cat >>confdefs.h <<_ACEOF
16792 #define ALIGNOF_LONG $ac_cv_alignof_long
16793 _ACEOF
16794
16795
16796 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16797   # The cast to long int works around a bug in the HP C Compiler,
16798 # see AC_CHECK_SIZEOF for more information.
16799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16800 $as_echo_n "checking alignment of long long int... " >&6; }
16801 if ${ac_cv_alignof_long_long_int+:} false; then :
16802   $as_echo_n "(cached) " >&6
16803 else
16804   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
16805 #ifndef offsetof
16806 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16807 #endif
16808 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16809
16810 else
16811   if test "$ac_cv_type_long_long_int" = yes; then
16812      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16813 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16814 as_fn_error 77 "cannot compute alignment of long long int
16815 See \`config.log' for more details" "$LINENO" 5; }
16816    else
16817      ac_cv_alignof_long_long_int=0
16818    fi
16819 fi
16820
16821 fi
16822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16823 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16824
16825
16826
16827 cat >>confdefs.h <<_ACEOF
16828 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16829 _ACEOF
16830
16831
16832 fi
16833 # The cast to long int works around a bug in the HP C Compiler,
16834 # see AC_CHECK_SIZEOF for more information.
16835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16836 $as_echo_n "checking alignment of double... " >&6; }
16837 if ${ac_cv_alignof_double+:} false; then :
16838   $as_echo_n "(cached) " >&6
16839 else
16840   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
16841 #ifndef offsetof
16842 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16843 #endif
16844 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16845
16846 else
16847   if test "$ac_cv_type_double" = yes; then
16848      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16849 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16850 as_fn_error 77 "cannot compute alignment of double
16851 See \`config.log' for more details" "$LINENO" 5; }
16852    else
16853      ac_cv_alignof_double=0
16854    fi
16855 fi
16856
16857 fi
16858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16859 $as_echo "$ac_cv_alignof_double" >&6; }
16860
16861
16862
16863 cat >>confdefs.h <<_ACEOF
16864 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16865 _ACEOF
16866
16867
16868
16869 # Compute maximum alignment of any basic type.
16870 # We assume long's alignment is at least as strong as char, short, or int;
16871 # but we must check long long (if it is being used for int64) and double.
16872 # Note that we intentionally do not consider any types wider than 64 bits,
16873 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
16874 # for disk and memory space.
16875
16876 MAX_ALIGNOF=$ac_cv_alignof_long
16877 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
16878   MAX_ALIGNOF=$ac_cv_alignof_double
16879 fi
16880 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
16881   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
16882 fi
16883
16884 cat >>confdefs.h <<_ACEOF
16885 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16886 _ACEOF
16887
16888
16889
16890 # Some platforms predefine the types int8, int16, etc.  Only check
16891 # a (hopefully) representative subset.
16892 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16893 "
16894 if test "x$ac_cv_type_int8" = xyes; then :
16895
16896 cat >>confdefs.h <<_ACEOF
16897 #define HAVE_INT8 1
16898 _ACEOF
16899
16900
16901 fi
16902 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16903 "
16904 if test "x$ac_cv_type_uint8" = xyes; then :
16905
16906 cat >>confdefs.h <<_ACEOF
16907 #define HAVE_UINT8 1
16908 _ACEOF
16909
16910
16911 fi
16912 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
16913 "
16914 if test "x$ac_cv_type_int64" = xyes; then :
16915
16916 cat >>confdefs.h <<_ACEOF
16917 #define HAVE_INT64 1
16918 _ACEOF
16919
16920
16921 fi
16922 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
16923 "
16924 if test "x$ac_cv_type_uint64" = xyes; then :
16925
16926 cat >>confdefs.h <<_ACEOF
16927 #define HAVE_UINT64 1
16928 _ACEOF
16929
16930
16931 fi
16932
16933
16934 # Some compilers offer a 128-bit integer scalar type.
16935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16936 $as_echo_n "checking for __int128... " >&6; }
16937 if ${pgac_cv__128bit_int+:} false; then :
16938   $as_echo_n "(cached) " >&6
16939 else
16940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16941 /* end confdefs.h.  */
16942
16943 /*
16944  * We don't actually run this test, just link it to verify that any support
16945  * functions needed for __int128 are present.
16946  *
16947  * These are globals to discourage the compiler from folding all the
16948  * arithmetic tests down to compile-time constants.  We do not have
16949  * convenient support for 128bit literals at this point...
16950  */
16951 __int128 a = 48828125;
16952 __int128 b = 97656250;
16953
16954 int
16955 main ()
16956 {
16957
16958 __int128 c,d;
16959 a = (a << 12) + 1; /* 200000000001 */
16960 b = (b << 12) + 5; /* 400000000005 */
16961 /* try the most relevant arithmetic ops */
16962 c = a * b;
16963 d = (c + b) / b;
16964 /* must use the results, else compiler may optimize arithmetic away */
16965 if (d != a+1)
16966   return 1;
16967
16968   ;
16969   return 0;
16970 }
16971 _ACEOF
16972 if ac_fn_c_try_link "$LINENO"; then :
16973   pgac_cv__128bit_int=yes
16974 else
16975   pgac_cv__128bit_int=no
16976 fi
16977 rm -f core conftest.err conftest.$ac_objext \
16978     conftest$ac_exeext conftest.$ac_ext
16979 fi
16980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
16981 $as_echo "$pgac_cv__128bit_int" >&6; }
16982 if test x"$pgac_cv__128bit_int" = xyes ; then
16983   # Use of non-default alignment with __int128 tickles bugs in some compilers.
16984   # If not cross-compiling, we can test for bugs and disable use of __int128
16985   # with buggy compilers.  If cross-compiling, hope for the best.
16986   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
16987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
16988 $as_echo_n "checking for __int128 alignment bug... " >&6; }
16989 if ${pgac_cv__128bit_int_bug+:} false; then :
16990   $as_echo_n "(cached) " >&6
16991 else
16992   if test "$cross_compiling" = yes; then :
16993   pgac_cv__128bit_int_bug="assuming ok"
16994 else
16995   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16996 /* end confdefs.h.  */
16997
16998 /* This must match the corresponding code in c.h: */
16999 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17000 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17001 #endif
17002 typedef __int128 int128a
17003 #if defined(pg_attribute_aligned)
17004 pg_attribute_aligned(8)
17005 #endif
17006 ;
17007 int128a holder;
17008 void pass_by_val(void *buffer, int128a par) { holder = par; }
17009
17010 int
17011 main ()
17012 {
17013
17014 long int i64 = 97656225L << 12;
17015 int128a q;
17016 pass_by_val(main, (int128a) i64);
17017 q = (int128a) i64;
17018 if (q != holder)
17019   return 1;
17020
17021   ;
17022   return 0;
17023 }
17024 _ACEOF
17025 if ac_fn_c_try_run "$LINENO"; then :
17026   pgac_cv__128bit_int_bug=ok
17027 else
17028   pgac_cv__128bit_int_bug=broken
17029 fi
17030 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17031   conftest.$ac_objext conftest.beam conftest.$ac_ext
17032 fi
17033
17034 fi
17035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17036 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17037   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17038
17039 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17040
17041     # The cast to long int works around a bug in the HP C Compiler,
17042 # see AC_CHECK_SIZEOF for more information.
17043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17044 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17045 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17046   $as_echo_n "(cached) " >&6
17047 else
17048   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
17049 #ifndef offsetof
17050 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17051 #endif
17052 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17053
17054 else
17055   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17056      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17057 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17058 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17059 See \`config.log' for more details" "$LINENO" 5; }
17060    else
17061      ac_cv_alignof_PG_INT128_TYPE=0
17062    fi
17063 fi
17064
17065 fi
17066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17067 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17068
17069
17070
17071 cat >>confdefs.h <<_ACEOF
17072 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17073 _ACEOF
17074
17075
17076   fi
17077 fi
17078
17079 # Check for various atomic operations now that we have checked how to declare
17080 # 64bit integers.
17081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17082 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17083 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17084   $as_echo_n "(cached) " >&6
17085 else
17086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17087 /* end confdefs.h.  */
17088
17089 int
17090 main ()
17091 {
17092 char lock = 0;
17093    __sync_lock_test_and_set(&lock, 1);
17094    __sync_lock_release(&lock);
17095   ;
17096   return 0;
17097 }
17098 _ACEOF
17099 if ac_fn_c_try_link "$LINENO"; then :
17100   pgac_cv_gcc_sync_char_tas="yes"
17101 else
17102   pgac_cv_gcc_sync_char_tas="no"
17103 fi
17104 rm -f core conftest.err conftest.$ac_objext \
17105     conftest$ac_exeext conftest.$ac_ext
17106 fi
17107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17108 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17109 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17110
17111 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17112
17113 fi
17114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17115 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17116 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17117   $as_echo_n "(cached) " >&6
17118 else
17119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17120 /* end confdefs.h.  */
17121
17122 int
17123 main ()
17124 {
17125 int lock = 0;
17126    __sync_lock_test_and_set(&lock, 1);
17127    __sync_lock_release(&lock);
17128   ;
17129   return 0;
17130 }
17131 _ACEOF
17132 if ac_fn_c_try_link "$LINENO"; then :
17133   pgac_cv_gcc_sync_int32_tas="yes"
17134 else
17135   pgac_cv_gcc_sync_int32_tas="no"
17136 fi
17137 rm -f core conftest.err conftest.$ac_objext \
17138     conftest$ac_exeext conftest.$ac_ext
17139 fi
17140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17141 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17142 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17143
17144 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17145
17146 fi
17147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17148 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17149 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17150   $as_echo_n "(cached) " >&6
17151 else
17152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17153 /* end confdefs.h.  */
17154
17155 int
17156 main ()
17157 {
17158 int val = 0;
17159    __sync_val_compare_and_swap(&val, 0, 37);
17160   ;
17161   return 0;
17162 }
17163 _ACEOF
17164 if ac_fn_c_try_link "$LINENO"; then :
17165   pgac_cv_gcc_sync_int32_cas="yes"
17166 else
17167   pgac_cv_gcc_sync_int32_cas="no"
17168 fi
17169 rm -f core conftest.err conftest.$ac_objext \
17170     conftest$ac_exeext conftest.$ac_ext
17171 fi
17172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17173 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17174 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17175
17176 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17177
17178 fi
17179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17180 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17181 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17182   $as_echo_n "(cached) " >&6
17183 else
17184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17185 /* end confdefs.h.  */
17186
17187 int
17188 main ()
17189 {
17190 PG_INT64_TYPE lock = 0;
17191    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17192   ;
17193   return 0;
17194 }
17195 _ACEOF
17196 if ac_fn_c_try_link "$LINENO"; then :
17197   pgac_cv_gcc_sync_int64_cas="yes"
17198 else
17199   pgac_cv_gcc_sync_int64_cas="no"
17200 fi
17201 rm -f core conftest.err conftest.$ac_objext \
17202     conftest$ac_exeext conftest.$ac_ext
17203 fi
17204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17205 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17206 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17207
17208 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17209
17210 fi
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17212 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17213 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17214   $as_echo_n "(cached) " >&6
17215 else
17216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17217 /* end confdefs.h.  */
17218
17219 int
17220 main ()
17221 {
17222 int val = 0;
17223    int expect = 0;
17224    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17225   ;
17226   return 0;
17227 }
17228 _ACEOF
17229 if ac_fn_c_try_link "$LINENO"; then :
17230   pgac_cv_gcc_atomic_int32_cas="yes"
17231 else
17232   pgac_cv_gcc_atomic_int32_cas="no"
17233 fi
17234 rm -f core conftest.err conftest.$ac_objext \
17235     conftest$ac_exeext conftest.$ac_ext
17236 fi
17237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17238 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17239 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17240
17241 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17242
17243 fi
17244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17245 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17246 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17247   $as_echo_n "(cached) " >&6
17248 else
17249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17250 /* end confdefs.h.  */
17251
17252 int
17253 main ()
17254 {
17255 PG_INT64_TYPE val = 0;
17256    PG_INT64_TYPE expect = 0;
17257    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17258   ;
17259   return 0;
17260 }
17261 _ACEOF
17262 if ac_fn_c_try_link "$LINENO"; then :
17263   pgac_cv_gcc_atomic_int64_cas="yes"
17264 else
17265   pgac_cv_gcc_atomic_int64_cas="no"
17266 fi
17267 rm -f core conftest.err conftest.$ac_objext \
17268     conftest$ac_exeext conftest.$ac_ext
17269 fi
17270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17271 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17272 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17273
17274 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17275
17276 fi
17277
17278
17279 # Check for x86 cpuid instruction
17280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17281 $as_echo_n "checking for __get_cpuid... " >&6; }
17282 if ${pgac_cv__get_cpuid+:} false; then :
17283   $as_echo_n "(cached) " >&6
17284 else
17285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17286 /* end confdefs.h.  */
17287 #include <cpuid.h>
17288 int
17289 main ()
17290 {
17291 unsigned int exx[4] = {0, 0, 0, 0};
17292   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17293
17294   ;
17295   return 0;
17296 }
17297 _ACEOF
17298 if ac_fn_c_try_link "$LINENO"; then :
17299   pgac_cv__get_cpuid="yes"
17300 else
17301   pgac_cv__get_cpuid="no"
17302 fi
17303 rm -f core conftest.err conftest.$ac_objext \
17304     conftest$ac_exeext conftest.$ac_ext
17305 fi
17306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17307 $as_echo "$pgac_cv__get_cpuid" >&6; }
17308 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17309
17310 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17311
17312 fi
17313
17314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17315 $as_echo_n "checking for __cpuid... " >&6; }
17316 if ${pgac_cv__cpuid+:} false; then :
17317   $as_echo_n "(cached) " >&6
17318 else
17319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17320 /* end confdefs.h.  */
17321 #include <intrin.h>
17322 int
17323 main ()
17324 {
17325 unsigned int exx[4] = {0, 0, 0, 0};
17326   __get_cpuid(exx[0], 1);
17327
17328   ;
17329   return 0;
17330 }
17331 _ACEOF
17332 if ac_fn_c_try_link "$LINENO"; then :
17333   pgac_cv__cpuid="yes"
17334 else
17335   pgac_cv__cpuid="no"
17336 fi
17337 rm -f core conftest.err conftest.$ac_objext \
17338     conftest$ac_exeext conftest.$ac_ext
17339 fi
17340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17341 $as_echo "$pgac_cv__cpuid" >&6; }
17342 if test x"$pgac_cv__cpuid" = x"yes"; then
17343
17344 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17345
17346 fi
17347
17348 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17349 #
17350 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17351 # with the default compiler flags. If not, check if adding the -msse4.2
17352 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17354 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17355 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17356   $as_echo_n "(cached) " >&6
17357 else
17358   pgac_save_CFLAGS=$CFLAGS
17359 CFLAGS="$pgac_save_CFLAGS "
17360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17361 /* end confdefs.h.  */
17362 #include <nmmintrin.h>
17363 int
17364 main ()
17365 {
17366 unsigned int crc = 0;
17367    crc = _mm_crc32_u8(crc, 0);
17368    crc = _mm_crc32_u32(crc, 0);
17369    /* return computed value, to prevent the above being optimized away */
17370    return crc == 0;
17371   ;
17372   return 0;
17373 }
17374 _ACEOF
17375 if ac_fn_c_try_link "$LINENO"; then :
17376   pgac_cv_sse42_crc32_intrinsics_=yes
17377 else
17378   pgac_cv_sse42_crc32_intrinsics_=no
17379 fi
17380 rm -f core conftest.err conftest.$ac_objext \
17381     conftest$ac_exeext conftest.$ac_ext
17382 CFLAGS="$pgac_save_CFLAGS"
17383 fi
17384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17385 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17386 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17387   CFLAGS_SSE42=""
17388   pgac_sse42_crc32_intrinsics=yes
17389 fi
17390
17391 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17392   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17393 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17394 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17395   $as_echo_n "(cached) " >&6
17396 else
17397   pgac_save_CFLAGS=$CFLAGS
17398 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17400 /* end confdefs.h.  */
17401 #include <nmmintrin.h>
17402 int
17403 main ()
17404 {
17405 unsigned int crc = 0;
17406    crc = _mm_crc32_u8(crc, 0);
17407    crc = _mm_crc32_u32(crc, 0);
17408    /* return computed value, to prevent the above being optimized away */
17409    return crc == 0;
17410   ;
17411   return 0;
17412 }
17413 _ACEOF
17414 if ac_fn_c_try_link "$LINENO"; then :
17415   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17416 else
17417   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17418 fi
17419 rm -f core conftest.err conftest.$ac_objext \
17420     conftest$ac_exeext conftest.$ac_ext
17421 CFLAGS="$pgac_save_CFLAGS"
17422 fi
17423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17424 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17425 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17426   CFLAGS_SSE42="-msse4.2"
17427   pgac_sse42_crc32_intrinsics=yes
17428 fi
17429
17430 fi
17431
17432
17433 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17434 # define __SSE4_2__ in that case.
17435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17436 /* end confdefs.h.  */
17437
17438 int
17439 main ()
17440 {
17441
17442 #ifndef __SSE4_2__
17443 #error __SSE4_2__ not defined
17444 #endif
17445
17446   ;
17447   return 0;
17448 }
17449 _ACEOF
17450 if ac_fn_c_try_compile "$LINENO"; then :
17451   SSE4_2_TARGETED=1
17452 fi
17453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17454
17455 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17456 #
17457 # First check if __crc32c* intrinsics can be used with the default compiler
17458 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17459 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17461 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17462 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17463   $as_echo_n "(cached) " >&6
17464 else
17465   pgac_save_CFLAGS=$CFLAGS
17466 CFLAGS="$pgac_save_CFLAGS "
17467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17468 /* end confdefs.h.  */
17469 #include <arm_acle.h>
17470 int
17471 main ()
17472 {
17473 unsigned int crc = 0;
17474    crc = __crc32cb(crc, 0);
17475    crc = __crc32ch(crc, 0);
17476    crc = __crc32cw(crc, 0);
17477    crc = __crc32cd(crc, 0);
17478    /* return computed value, to prevent the above being optimized away */
17479    return crc == 0;
17480   ;
17481   return 0;
17482 }
17483 _ACEOF
17484 if ac_fn_c_try_link "$LINENO"; then :
17485   pgac_cv_armv8_crc32c_intrinsics_=yes
17486 else
17487   pgac_cv_armv8_crc32c_intrinsics_=no
17488 fi
17489 rm -f core conftest.err conftest.$ac_objext \
17490     conftest$ac_exeext conftest.$ac_ext
17491 CFLAGS="$pgac_save_CFLAGS"
17492 fi
17493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17494 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17495 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17496   CFLAGS_ARMV8_CRC32C=""
17497   pgac_armv8_crc32c_intrinsics=yes
17498 fi
17499
17500 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17501   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17502 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17503 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17504   $as_echo_n "(cached) " >&6
17505 else
17506   pgac_save_CFLAGS=$CFLAGS
17507 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17509 /* end confdefs.h.  */
17510 #include <arm_acle.h>
17511 int
17512 main ()
17513 {
17514 unsigned int crc = 0;
17515    crc = __crc32cb(crc, 0);
17516    crc = __crc32ch(crc, 0);
17517    crc = __crc32cw(crc, 0);
17518    crc = __crc32cd(crc, 0);
17519    /* return computed value, to prevent the above being optimized away */
17520    return crc == 0;
17521   ;
17522   return 0;
17523 }
17524 _ACEOF
17525 if ac_fn_c_try_link "$LINENO"; then :
17526   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17527 else
17528   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17529 fi
17530 rm -f core conftest.err conftest.$ac_objext \
17531     conftest$ac_exeext conftest.$ac_ext
17532 CFLAGS="$pgac_save_CFLAGS"
17533 fi
17534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17535 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17536 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17537   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17538   pgac_armv8_crc32c_intrinsics=yes
17539 fi
17540
17541 fi
17542
17543
17544 # Select CRC-32C implementation.
17545 #
17546 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17547 # use the special CRC instructions for calculating CRC-32C. If we're not
17548 # targeting such a processor, but we can nevertheless produce code that uses
17549 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17550 # implementations and select which one to use at runtime, depending on whether
17551 # SSE 4.2 is supported by the processor we're running on.
17552 #
17553 # Similarly, if we are targeting an ARM processor that has the CRC
17554 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17555 # we're not targeting such a processor, but can nevertheless produce code that
17556 # uses the CRC instructions, compile both, and select at runtime.
17557 #
17558 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17559 # in the template or configure command line.
17560 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
17561   # Use Intel SSE 4.2 if available.
17562   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17563     USE_SSE42_CRC32C=1
17564   else
17565     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17566     # the runtime check.
17567     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
17568       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17569     else
17570       # Use ARM CRC Extension if available.
17571       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17572         USE_ARMV8_CRC32C=1
17573       else
17574         # ARM CRC Extension, with runtime check?
17575         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17576           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17577         else
17578           # fall back to slicing-by-8 algorithm, which doesn't require any
17579           # special CPU support.
17580           USE_SLICING_BY_8_CRC32C=1
17581         fi
17582       fi
17583     fi
17584   fi
17585 fi
17586
17587 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17589 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17590 if test x"$USE_SSE42_CRC32C" = x"1"; then
17591
17592 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17593
17594   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17596 $as_echo "SSE 4.2" >&6; }
17597 else
17598   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17599
17600 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17601
17602     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17603     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17604 $as_echo "SSE 4.2 with runtime check" >&6; }
17605   else
17606     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17607
17608 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17609
17610       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17611       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17612 $as_echo "ARMv8 CRC instructions" >&6; }
17613     else
17614       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17615
17616 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17617
17618         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17619         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17620 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17621       else
17622
17623 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17624
17625         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17626         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17627 $as_echo "slicing-by-8" >&6; }
17628       fi
17629     fi
17630   fi
17631 fi
17632
17633
17634
17635 # Select semaphore implementation type.
17636 if test "$PORTNAME" != "win32"; then
17637   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17638     # Need sem_open for this
17639     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17640 $as_echo_n "checking for library containing sem_open... " >&6; }
17641 if ${ac_cv_search_sem_open+:} false; then :
17642   $as_echo_n "(cached) " >&6
17643 else
17644   ac_func_search_save_LIBS=$LIBS
17645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17646 /* end confdefs.h.  */
17647
17648 /* Override any GCC internal prototype to avoid an error.
17649    Use char because int might match the return type of a GCC
17650    builtin and then its argument prototype would still apply.  */
17651 #ifdef __cplusplus
17652 extern "C"
17653 #endif
17654 char sem_open ();
17655 int
17656 main ()
17657 {
17658 return sem_open ();
17659   ;
17660   return 0;
17661 }
17662 _ACEOF
17663 for ac_lib in '' rt pthread; do
17664   if test -z "$ac_lib"; then
17665     ac_res="none required"
17666   else
17667     ac_res=-l$ac_lib
17668     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17669   fi
17670   if ac_fn_c_try_link "$LINENO"; then :
17671   ac_cv_search_sem_open=$ac_res
17672 fi
17673 rm -f core conftest.err conftest.$ac_objext \
17674     conftest$ac_exeext
17675   if ${ac_cv_search_sem_open+:} false; then :
17676   break
17677 fi
17678 done
17679 if ${ac_cv_search_sem_open+:} false; then :
17680
17681 else
17682   ac_cv_search_sem_open=no
17683 fi
17684 rm conftest.$ac_ext
17685 LIBS=$ac_func_search_save_LIBS
17686 fi
17687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17688 $as_echo "$ac_cv_search_sem_open" >&6; }
17689 ac_res=$ac_cv_search_sem_open
17690 if test "$ac_res" != no; then :
17691   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17692   USE_NAMED_POSIX_SEMAPHORES=1
17693 fi
17694
17695   fi
17696   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17697     # Need sem_init for this
17698     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17699 $as_echo_n "checking for library containing sem_init... " >&6; }
17700 if ${ac_cv_search_sem_init+:} false; then :
17701   $as_echo_n "(cached) " >&6
17702 else
17703   ac_func_search_save_LIBS=$LIBS
17704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17705 /* end confdefs.h.  */
17706
17707 /* Override any GCC internal prototype to avoid an error.
17708    Use char because int might match the return type of a GCC
17709    builtin and then its argument prototype would still apply.  */
17710 #ifdef __cplusplus
17711 extern "C"
17712 #endif
17713 char sem_init ();
17714 int
17715 main ()
17716 {
17717 return sem_init ();
17718   ;
17719   return 0;
17720 }
17721 _ACEOF
17722 for ac_lib in '' rt pthread; do
17723   if test -z "$ac_lib"; then
17724     ac_res="none required"
17725   else
17726     ac_res=-l$ac_lib
17727     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17728   fi
17729   if ac_fn_c_try_link "$LINENO"; then :
17730   ac_cv_search_sem_init=$ac_res
17731 fi
17732 rm -f core conftest.err conftest.$ac_objext \
17733     conftest$ac_exeext
17734   if ${ac_cv_search_sem_init+:} false; then :
17735   break
17736 fi
17737 done
17738 if ${ac_cv_search_sem_init+:} false; then :
17739
17740 else
17741   ac_cv_search_sem_init=no
17742 fi
17743 rm conftest.$ac_ext
17744 LIBS=$ac_func_search_save_LIBS
17745 fi
17746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17747 $as_echo "$ac_cv_search_sem_init" >&6; }
17748 ac_res=$ac_cv_search_sem_init
17749 if test "$ac_res" != no; then :
17750   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17751   USE_UNNAMED_POSIX_SEMAPHORES=1
17752 fi
17753
17754   fi
17755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17756 $as_echo_n "checking which semaphore API to use... " >&6; }
17757   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17758
17759 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17760
17761     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17762     sematype="named POSIX"
17763   else
17764     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17765
17766 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17767
17768       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17769       sematype="unnamed POSIX"
17770     else
17771
17772 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17773
17774       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17775       sematype="System V"
17776     fi
17777   fi
17778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17779 $as_echo "$sematype" >&6; }
17780 else
17781
17782 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17783
17784   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17785 fi
17786
17787
17788 # Select shared-memory implementation type.
17789 if test "$PORTNAME" != "win32"; then
17790
17791 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17792
17793   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17794 else
17795
17796 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17797
17798   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17799 fi
17800
17801 # Select random number source
17802 #
17803 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17804 # in the template or configure command line.
17805
17806 # If not selected manually, try to select a source automatically.
17807 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
17808   if test x"$with_openssl" = x"yes" ; then
17809     USE_OPENSSL_RANDOM=1
17810   elif test "$PORTNAME" = "win32" ; then
17811     USE_WIN32_RANDOM=1
17812   else
17813     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17814 $as_echo_n "checking for /dev/urandom... " >&6; }
17815 if ${ac_cv_file__dev_urandom+:} false; then :
17816   $as_echo_n "(cached) " >&6
17817 else
17818   test "$cross_compiling" = yes &&
17819   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17820 if test -r "/dev/urandom"; then
17821   ac_cv_file__dev_urandom=yes
17822 else
17823   ac_cv_file__dev_urandom=no
17824 fi
17825 fi
17826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17827 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17828 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17829
17830 fi
17831
17832
17833     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17834       USE_DEV_URANDOM=1
17835     fi
17836   fi
17837 fi
17838
17839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17840 $as_echo_n "checking which random number source to use... " >&6; }
17841 if test "$enable_strong_random" = yes ; then
17842   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17843
17844 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17845
17846     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17847 $as_echo "OpenSSL" >&6; }
17848   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
17849
17850 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
17851
17852     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17853 $as_echo "Windows native" >&6; }
17854   elif test x"$USE_DEV_URANDOM" = x"1" ; then
17855
17856 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
17857
17858     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17859 $as_echo "/dev/urandom" >&6; }
17860   else
17861     as_fn_error $? "
17862 no source of strong random numbers was found
17863 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
17864 for authentication protocols. You can use --disable-strong-random to use a
17865 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
17866   fi
17867
17868 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
17869
17870 else
17871     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
17872 $as_echo "weak builtin PRNG" >&6; }
17873     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17874 *** Not using a strong random number source may be insecure." >&5
17875 $as_echo "$as_me: WARNING:
17876 *** Not using a strong random number source may be insecure." >&2;}
17877 fi
17878
17879 # If not set in template file, set bytes to use libc memset()
17880 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17881   MEMSET_LOOP_LIMIT=1024
17882 fi
17883
17884 cat >>confdefs.h <<_ACEOF
17885 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17886 _ACEOF
17887
17888
17889
17890 if test "$enable_nls" = yes ; then
17891
17892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17893 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17894 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17895   $as_echo_n "(cached) " >&6
17896 else
17897   ac_func_search_save_LIBS=$LIBS
17898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17899 /* end confdefs.h.  */
17900
17901 /* Override any GCC internal prototype to avoid an error.
17902    Use char because int might match the return type of a GCC
17903    builtin and then its argument prototype would still apply.  */
17904 #ifdef __cplusplus
17905 extern "C"
17906 #endif
17907 char bind_textdomain_codeset ();
17908 int
17909 main ()
17910 {
17911 return bind_textdomain_codeset ();
17912   ;
17913   return 0;
17914 }
17915 _ACEOF
17916 for ac_lib in '' intl; do
17917   if test -z "$ac_lib"; then
17918     ac_res="none required"
17919   else
17920     ac_res=-l$ac_lib
17921     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17922   fi
17923   if ac_fn_c_try_link "$LINENO"; then :
17924   ac_cv_search_bind_textdomain_codeset=$ac_res
17925 fi
17926 rm -f core conftest.err conftest.$ac_objext \
17927     conftest$ac_exeext
17928   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17929   break
17930 fi
17931 done
17932 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17933
17934 else
17935   ac_cv_search_bind_textdomain_codeset=no
17936 fi
17937 rm conftest.$ac_ext
17938 LIBS=$ac_func_search_save_LIBS
17939 fi
17940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
17941 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
17942 ac_res=$ac_cv_search_bind_textdomain_codeset
17943 if test "$ac_res" != no; then :
17944   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17945
17946 else
17947   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
17948 fi
17949
17950   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
17951 if test "x$ac_cv_header_libintl_h" = xyes; then :
17952
17953 else
17954   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
17955 fi
17956
17957
17958   if test -z "$MSGFMT"; then
17959   for ac_prog in msgfmt
17960 do
17961   # Extract the first word of "$ac_prog", so it can be a program name with args.
17962 set dummy $ac_prog; ac_word=$2
17963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17964 $as_echo_n "checking for $ac_word... " >&6; }
17965 if ${ac_cv_path_MSGFMT+:} false; then :
17966   $as_echo_n "(cached) " >&6
17967 else
17968   case $MSGFMT in
17969   [\\/]* | ?:[\\/]*)
17970   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
17971   ;;
17972   *)
17973   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17974 for as_dir in $PATH
17975 do
17976   IFS=$as_save_IFS
17977   test -z "$as_dir" && as_dir=.
17978     for ac_exec_ext in '' $ac_executable_extensions; do
17979   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17980     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
17981     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17982     break 2
17983   fi
17984 done
17985   done
17986 IFS=$as_save_IFS
17987
17988   ;;
17989 esac
17990 fi
17991 MSGFMT=$ac_cv_path_MSGFMT
17992 if test -n "$MSGFMT"; then
17993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17994 $as_echo "$MSGFMT" >&6; }
17995 else
17996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17997 $as_echo "no" >&6; }
17998 fi
17999
18000
18001   test -n "$MSGFMT" && break
18002 done
18003
18004 else
18005   # Report the value of MSGFMT in configure's output in all cases.
18006   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18007 $as_echo_n "checking for MSGFMT... " >&6; }
18008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18009 $as_echo "$MSGFMT" >&6; }
18010 fi
18011
18012   if test -z "$MSGFMT"; then
18013     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18014   fi
18015   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18016 $as_echo_n "checking for msgfmt flags... " >&6; }
18017 if ${pgac_cv_msgfmt_flags+:} false; then :
18018   $as_echo_n "(cached) " >&6
18019 else
18020   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18021     pgac_cv_msgfmt_flags=-c
18022 fi
18023 fi
18024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18025 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18026   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18027
18028   if test -z "$MSGMERGE"; then
18029   for ac_prog in msgmerge
18030 do
18031   # Extract the first word of "$ac_prog", so it can be a program name with args.
18032 set dummy $ac_prog; ac_word=$2
18033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18034 $as_echo_n "checking for $ac_word... " >&6; }
18035 if ${ac_cv_path_MSGMERGE+:} false; then :
18036   $as_echo_n "(cached) " >&6
18037 else
18038   case $MSGMERGE in
18039   [\\/]* | ?:[\\/]*)
18040   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18041   ;;
18042   *)
18043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18044 for as_dir in $PATH
18045 do
18046   IFS=$as_save_IFS
18047   test -z "$as_dir" && as_dir=.
18048     for ac_exec_ext in '' $ac_executable_extensions; do
18049   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18050     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18052     break 2
18053   fi
18054 done
18055   done
18056 IFS=$as_save_IFS
18057
18058   ;;
18059 esac
18060 fi
18061 MSGMERGE=$ac_cv_path_MSGMERGE
18062 if test -n "$MSGMERGE"; then
18063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18064 $as_echo "$MSGMERGE" >&6; }
18065 else
18066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18067 $as_echo "no" >&6; }
18068 fi
18069
18070
18071   test -n "$MSGMERGE" && break
18072 done
18073
18074 else
18075   # Report the value of MSGMERGE in configure's output in all cases.
18076   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18077 $as_echo_n "checking for MSGMERGE... " >&6; }
18078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18079 $as_echo "$MSGMERGE" >&6; }
18080 fi
18081
18082   if test -z "$XGETTEXT"; then
18083   for ac_prog in xgettext
18084 do
18085   # Extract the first word of "$ac_prog", so it can be a program name with args.
18086 set dummy $ac_prog; ac_word=$2
18087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18088 $as_echo_n "checking for $ac_word... " >&6; }
18089 if ${ac_cv_path_XGETTEXT+:} false; then :
18090   $as_echo_n "(cached) " >&6
18091 else
18092   case $XGETTEXT in
18093   [\\/]* | ?:[\\/]*)
18094   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18095   ;;
18096   *)
18097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18098 for as_dir in $PATH
18099 do
18100   IFS=$as_save_IFS
18101   test -z "$as_dir" && as_dir=.
18102     for ac_exec_ext in '' $ac_executable_extensions; do
18103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18104     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18106     break 2
18107   fi
18108 done
18109   done
18110 IFS=$as_save_IFS
18111
18112   ;;
18113 esac
18114 fi
18115 XGETTEXT=$ac_cv_path_XGETTEXT
18116 if test -n "$XGETTEXT"; then
18117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18118 $as_echo "$XGETTEXT" >&6; }
18119 else
18120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18121 $as_echo "no" >&6; }
18122 fi
18123
18124
18125   test -n "$XGETTEXT" && break
18126 done
18127
18128 else
18129   # Report the value of XGETTEXT in configure's output in all cases.
18130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18131 $as_echo_n "checking for XGETTEXT... " >&6; }
18132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18133 $as_echo "$XGETTEXT" >&6; }
18134 fi
18135
18136
18137 fi
18138
18139 # Check for Tcl configuration script tclConfig.sh
18140 if test "$with_tcl" = yes; then
18141     if test -z "$TCLSH"; then
18142   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18143 do
18144   # Extract the first word of "$ac_prog", so it can be a program name with args.
18145 set dummy $ac_prog; ac_word=$2
18146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18147 $as_echo_n "checking for $ac_word... " >&6; }
18148 if ${ac_cv_path_TCLSH+:} false; then :
18149   $as_echo_n "(cached) " >&6
18150 else
18151   case $TCLSH in
18152   [\\/]* | ?:[\\/]*)
18153   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18154   ;;
18155   *)
18156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18157 for as_dir in $PATH
18158 do
18159   IFS=$as_save_IFS
18160   test -z "$as_dir" && as_dir=.
18161     for ac_exec_ext in '' $ac_executable_extensions; do
18162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18163     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18165     break 2
18166   fi
18167 done
18168   done
18169 IFS=$as_save_IFS
18170
18171   ;;
18172 esac
18173 fi
18174 TCLSH=$ac_cv_path_TCLSH
18175 if test -n "$TCLSH"; then
18176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18177 $as_echo "$TCLSH" >&6; }
18178 else
18179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18180 $as_echo "no" >&6; }
18181 fi
18182
18183
18184   test -n "$TCLSH" && break
18185 done
18186
18187 else
18188   # Report the value of TCLSH in configure's output in all cases.
18189   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18190 $as_echo_n "checking for TCLSH... " >&6; }
18191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18192 $as_echo "$TCLSH" >&6; }
18193 fi
18194
18195 if test x"$TCLSH" = x""; then
18196   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18197 fi
18198
18199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18200 $as_echo_n "checking for tclConfig.sh... " >&6; }
18201 # Let user override test
18202 if test -z "$TCL_CONFIG_SH"; then
18203     pgac_test_dirs="$with_tclconfig"
18204
18205     set X $pgac_test_dirs; shift
18206     if test $# -eq 0; then
18207         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18208         set X `echo 'puts $auto_path' | $TCLSH`; shift
18209     fi
18210
18211     for pgac_dir do
18212         if test -r "$pgac_dir/tclConfig.sh"; then
18213             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18214             break
18215         fi
18216     done
18217 fi
18218
18219 if test -z "$TCL_CONFIG_SH"; then
18220     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18221 $as_echo "no" >&6; }
18222     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18223 else
18224     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18225 $as_echo "$TCL_CONFIG_SH" >&6; }
18226 fi
18227
18228
18229
18230     . "$TCL_CONFIG_SH"
18231 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18232 eval TCL_LIBS=\"$TCL_LIBS\"
18233 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18234 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18235
18236         if test "$TCL_SHARED_BUILD" != 1; then
18237       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18238 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18239     fi
18240     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18241     ac_save_CPPFLAGS=$CPPFLAGS
18242     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18243     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18244 if test "x$ac_cv_header_tcl_h" = xyes; then :
18245
18246 else
18247   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18248 fi
18249
18250
18251     CPPFLAGS=$ac_save_CPPFLAGS
18252 fi
18253
18254 # check for <perl.h>
18255 if test "$with_perl" = yes; then
18256   ac_save_CPPFLAGS=$CPPFLAGS
18257   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
18258   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18259 "
18260 if test "x$ac_cv_header_perl_h" = xyes; then :
18261
18262 else
18263   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18264 fi
18265
18266
18267   # While we're at it, check that we can link to libperl.
18268   # On most platforms, if perl.h is there then libperl.so will be too, but at
18269   # this writing Debian packages them separately.  There is no known reason to
18270   # waste cycles on separate probes for the Tcl or Python libraries, though.
18271   pgac_save_LIBS=$LIBS
18272   LIBS="$perl_embed_ldflags"
18273   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18274 $as_echo_n "checking for libperl... " >&6; }
18275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18276 /* end confdefs.h.  */
18277
18278 #include <EXTERN.h>
18279 #include <perl.h>
18280
18281 int
18282 main ()
18283 {
18284 perl_alloc();
18285   ;
18286   return 0;
18287 }
18288 _ACEOF
18289 if ac_fn_c_try_link "$LINENO"; then :
18290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18291 $as_echo "yes" >&6; }
18292 else
18293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18294 $as_echo "no" >&6; }
18295      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18296 fi
18297 rm -f core conftest.err conftest.$ac_objext \
18298     conftest$ac_exeext conftest.$ac_ext
18299   LIBS=$pgac_save_LIBS
18300   CPPFLAGS=$ac_save_CPPFLAGS
18301 fi
18302
18303 # check for <Python.h>
18304 if test "$with_python" = yes; then
18305   ac_save_CPPFLAGS=$CPPFLAGS
18306   CPPFLAGS="$python_includespec $CPPFLAGS"
18307   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18308 if test "x$ac_cv_header_Python_h" = xyes; then :
18309
18310 else
18311   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18312 fi
18313
18314
18315   CPPFLAGS=$ac_save_CPPFLAGS
18316 fi
18317
18318 #
18319 # Check for DocBook and tools
18320 #
18321 if test -z "$XMLLINT"; then
18322   for ac_prog in xmllint
18323 do
18324   # Extract the first word of "$ac_prog", so it can be a program name with args.
18325 set dummy $ac_prog; ac_word=$2
18326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18327 $as_echo_n "checking for $ac_word... " >&6; }
18328 if ${ac_cv_path_XMLLINT+:} false; then :
18329   $as_echo_n "(cached) " >&6
18330 else
18331   case $XMLLINT in
18332   [\\/]* | ?:[\\/]*)
18333   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18334   ;;
18335   *)
18336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18337 for as_dir in $PATH
18338 do
18339   IFS=$as_save_IFS
18340   test -z "$as_dir" && as_dir=.
18341     for ac_exec_ext in '' $ac_executable_extensions; do
18342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18343     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18345     break 2
18346   fi
18347 done
18348   done
18349 IFS=$as_save_IFS
18350
18351   ;;
18352 esac
18353 fi
18354 XMLLINT=$ac_cv_path_XMLLINT
18355 if test -n "$XMLLINT"; then
18356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18357 $as_echo "$XMLLINT" >&6; }
18358 else
18359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18360 $as_echo "no" >&6; }
18361 fi
18362
18363
18364   test -n "$XMLLINT" && break
18365 done
18366
18367 else
18368   # Report the value of XMLLINT in configure's output in all cases.
18369   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18370 $as_echo_n "checking for XMLLINT... " >&6; }
18371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18372 $as_echo "$XMLLINT" >&6; }
18373 fi
18374
18375
18376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18377 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18378 if ${pgac_cv_check_docbook+:} false; then :
18379   $as_echo_n "(cached) " >&6
18380 else
18381   cat >conftest.xml <<EOF
18382 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18383 <book>
18384  <title>test</title>
18385  <chapter>
18386   <title>random</title>
18387    <sect1>
18388     <title>testsect</title>
18389     <para>text</para>
18390   </sect1>
18391  </chapter>
18392 </book>
18393 EOF
18394
18395 pgac_cv_check_docbook=no
18396
18397 if test -n "$XMLLINT"; then
18398   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18399   if test $? -eq 0; then
18400     pgac_cv_check_docbook=yes
18401   fi
18402 fi
18403 rm -f conftest.xml
18404 fi
18405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18406 $as_echo "$pgac_cv_check_docbook" >&6; }
18407
18408 have_docbook=$pgac_cv_check_docbook
18409
18410
18411 if test -z "$DBTOEPUB"; then
18412   for ac_prog in dbtoepub
18413 do
18414   # Extract the first word of "$ac_prog", so it can be a program name with args.
18415 set dummy $ac_prog; ac_word=$2
18416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18417 $as_echo_n "checking for $ac_word... " >&6; }
18418 if ${ac_cv_path_DBTOEPUB+:} false; then :
18419   $as_echo_n "(cached) " >&6
18420 else
18421   case $DBTOEPUB in
18422   [\\/]* | ?:[\\/]*)
18423   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18424   ;;
18425   *)
18426   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18427 for as_dir in $PATH
18428 do
18429   IFS=$as_save_IFS
18430   test -z "$as_dir" && as_dir=.
18431     for ac_exec_ext in '' $ac_executable_extensions; do
18432   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18433     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18434     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18435     break 2
18436   fi
18437 done
18438   done
18439 IFS=$as_save_IFS
18440
18441   ;;
18442 esac
18443 fi
18444 DBTOEPUB=$ac_cv_path_DBTOEPUB
18445 if test -n "$DBTOEPUB"; then
18446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18447 $as_echo "$DBTOEPUB" >&6; }
18448 else
18449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18450 $as_echo "no" >&6; }
18451 fi
18452
18453
18454   test -n "$DBTOEPUB" && break
18455 done
18456
18457 else
18458   # Report the value of DBTOEPUB in configure's output in all cases.
18459   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18460 $as_echo_n "checking for DBTOEPUB... " >&6; }
18461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18462 $as_echo "$DBTOEPUB" >&6; }
18463 fi
18464
18465 if test -z "$XSLTPROC"; then
18466   for ac_prog in xsltproc
18467 do
18468   # Extract the first word of "$ac_prog", so it can be a program name with args.
18469 set dummy $ac_prog; ac_word=$2
18470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18471 $as_echo_n "checking for $ac_word... " >&6; }
18472 if ${ac_cv_path_XSLTPROC+:} false; then :
18473   $as_echo_n "(cached) " >&6
18474 else
18475   case $XSLTPROC in
18476   [\\/]* | ?:[\\/]*)
18477   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18478   ;;
18479   *)
18480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18481 for as_dir in $PATH
18482 do
18483   IFS=$as_save_IFS
18484   test -z "$as_dir" && as_dir=.
18485     for ac_exec_ext in '' $ac_executable_extensions; do
18486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18487     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18489     break 2
18490   fi
18491 done
18492   done
18493 IFS=$as_save_IFS
18494
18495   ;;
18496 esac
18497 fi
18498 XSLTPROC=$ac_cv_path_XSLTPROC
18499 if test -n "$XSLTPROC"; then
18500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18501 $as_echo "$XSLTPROC" >&6; }
18502 else
18503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18504 $as_echo "no" >&6; }
18505 fi
18506
18507
18508   test -n "$XSLTPROC" && break
18509 done
18510
18511 else
18512   # Report the value of XSLTPROC in configure's output in all cases.
18513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18514 $as_echo_n "checking for XSLTPROC... " >&6; }
18515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18516 $as_echo "$XSLTPROC" >&6; }
18517 fi
18518
18519 if test -z "$FOP"; then
18520   for ac_prog in fop
18521 do
18522   # Extract the first word of "$ac_prog", so it can be a program name with args.
18523 set dummy $ac_prog; ac_word=$2
18524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18525 $as_echo_n "checking for $ac_word... " >&6; }
18526 if ${ac_cv_path_FOP+:} false; then :
18527   $as_echo_n "(cached) " >&6
18528 else
18529   case $FOP in
18530   [\\/]* | ?:[\\/]*)
18531   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18532   ;;
18533   *)
18534   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18535 for as_dir in $PATH
18536 do
18537   IFS=$as_save_IFS
18538   test -z "$as_dir" && as_dir=.
18539     for ac_exec_ext in '' $ac_executable_extensions; do
18540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18541     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18543     break 2
18544   fi
18545 done
18546   done
18547 IFS=$as_save_IFS
18548
18549   ;;
18550 esac
18551 fi
18552 FOP=$ac_cv_path_FOP
18553 if test -n "$FOP"; then
18554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18555 $as_echo "$FOP" >&6; }
18556 else
18557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18558 $as_echo "no" >&6; }
18559 fi
18560
18561
18562   test -n "$FOP" && break
18563 done
18564
18565 else
18566   # Report the value of FOP in configure's output in all cases.
18567   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18568 $as_echo_n "checking for FOP... " >&6; }
18569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18570 $as_echo "$FOP" >&6; }
18571 fi
18572
18573
18574 #
18575 # Check for test tools
18576 #
18577 if test "$enable_tap_tests" = yes; then
18578   # Check for necessary modules, unless user has specified the "prove" to use;
18579   # in that case it's her responsibility to have a working configuration.
18580   # (prove might be part of a different Perl installation than perl, eg on
18581   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18582   if test -z "$PROVE"; then
18583     # Test::More and Time::HiRes are supposed to be part of core Perl,
18584     # but some distros omit them in a minimal installation.
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595 # Make sure we have perl
18596 if test -z "$PERL"; then
18597 # Extract the first word of "perl", so it can be a program name with args.
18598 set dummy perl; ac_word=$2
18599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18600 $as_echo_n "checking for $ac_word... " >&6; }
18601 if ${ac_cv_prog_PERL+:} false; then :
18602   $as_echo_n "(cached) " >&6
18603 else
18604   if test -n "$PERL"; then
18605   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18606 else
18607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18608 for as_dir in $PATH
18609 do
18610   IFS=$as_save_IFS
18611   test -z "$as_dir" && as_dir=.
18612     for ac_exec_ext in '' $ac_executable_extensions; do
18613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18614     ac_cv_prog_PERL="perl"
18615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18616     break 2
18617   fi
18618 done
18619   done
18620 IFS=$as_save_IFS
18621
18622 fi
18623 fi
18624 PERL=$ac_cv_prog_PERL
18625 if test -n "$PERL"; then
18626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18627 $as_echo "$PERL" >&6; }
18628 else
18629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18630 $as_echo "no" >&6; }
18631 fi
18632
18633
18634 fi
18635
18636 if test "x$PERL" != x; then
18637   ax_perl_modules_failed=0
18638   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18639     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18640 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18641
18642     # Would be nice to log result here, but can't rely on autoconf internals
18643     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18644     if test $? -ne 0; then
18645       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18646 $as_echo "no" >&6; };
18647       ax_perl_modules_failed=1
18648    else
18649       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18650 $as_echo "ok" >&6; };
18651     fi
18652   done
18653
18654   # Run optional shell commands
18655   if test "$ax_perl_modules_failed" = 0; then
18656     :
18657
18658   else
18659     :
18660     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18661   fi
18662 else
18663   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18664 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18665 fi
18666   fi
18667   # Now make sure we know where prove is
18668   if test -z "$PROVE"; then
18669   for ac_prog in prove
18670 do
18671   # Extract the first word of "$ac_prog", so it can be a program name with args.
18672 set dummy $ac_prog; ac_word=$2
18673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18674 $as_echo_n "checking for $ac_word... " >&6; }
18675 if ${ac_cv_path_PROVE+:} false; then :
18676   $as_echo_n "(cached) " >&6
18677 else
18678   case $PROVE in
18679   [\\/]* | ?:[\\/]*)
18680   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18681   ;;
18682   *)
18683   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18684 for as_dir in $PATH
18685 do
18686   IFS=$as_save_IFS
18687   test -z "$as_dir" && as_dir=.
18688     for ac_exec_ext in '' $ac_executable_extensions; do
18689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18690     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18692     break 2
18693   fi
18694 done
18695   done
18696 IFS=$as_save_IFS
18697
18698   ;;
18699 esac
18700 fi
18701 PROVE=$ac_cv_path_PROVE
18702 if test -n "$PROVE"; then
18703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18704 $as_echo "$PROVE" >&6; }
18705 else
18706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18707 $as_echo "no" >&6; }
18708 fi
18709
18710
18711   test -n "$PROVE" && break
18712 done
18713
18714 else
18715   # Report the value of PROVE in configure's output in all cases.
18716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18717 $as_echo_n "checking for PROVE... " >&6; }
18718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18719 $as_echo "$PROVE" >&6; }
18720 fi
18721
18722   if test -z "$PROVE"; then
18723     as_fn_error $? "prove not found" "$LINENO" 5
18724   fi
18725 fi
18726
18727 # Thread testing
18728
18729 # We have to run the thread test near the end so we have all our symbols
18730 # defined.  Cross compiling throws a warning.
18731 #
18732 if test "$enable_thread_safety" = yes; then
18733 if test "$PORTNAME" != "win32"
18734 then
18735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18736 $as_echo_n "checking thread safety of required library functions... " >&6; }
18737
18738 _CFLAGS="$CFLAGS"
18739 _LIBS="$LIBS"
18740 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18741 LIBS="$LIBS $PTHREAD_LIBS"
18742 if test "$cross_compiling" = yes; then :
18743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18744 $as_echo "maybe" >&6; }
18745   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18746 *** Skipping thread test program because of cross-compile build.
18747 *** Run the program in src/test/thread on the target machine.
18748 " >&5
18749 $as_echo "$as_me: WARNING:
18750 *** Skipping thread test program because of cross-compile build.
18751 *** Run the program in src/test/thread on the target machine.
18752 " >&2;}
18753 else
18754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18755 /* end confdefs.h.  */
18756 #include "$srcdir/src/test/thread/thread_test.c"
18757 _ACEOF
18758 if ac_fn_c_try_run "$LINENO"; then :
18759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18760 $as_echo "yes" >&6; }
18761 else
18762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18763 $as_echo "no" >&6; }
18764   as_fn_error $? "thread test program failed
18765 This platform is not thread-safe.  Check the file 'config.log' or compile
18766 and run src/test/thread/thread_test for the exact reason.
18767 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18768 fi
18769 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18770   conftest.$ac_objext conftest.beam conftest.$ac_ext
18771 fi
18772
18773 CFLAGS="$_CFLAGS"
18774 LIBS="$_LIBS"
18775 else
18776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18777 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18778 fi
18779 fi
18780
18781 # If compiler will take -Wl,--as-needed (or various platform-specific
18782 # spellings thereof) then add that to LDFLAGS.  This is much easier than
18783 # trying to filter LIBS to the minimum for each executable.
18784 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18785 # libreadline; therefore we postpone testing it until we know what library
18786 # dependencies readline has.  The test code will try to link with $LIBS.
18787 if test "$with_readline" = yes; then
18788   link_test_func=readline
18789 else
18790   link_test_func=exit
18791 fi
18792
18793 if test "$PORTNAME" = "darwin"; then
18794   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18795 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18796 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18797   $as_echo_n "(cached) " >&6
18798 else
18799   pgac_save_LDFLAGS=$LDFLAGS
18800 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18801 if test "$cross_compiling" = yes; then :
18802   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18803 else
18804   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18805 /* end confdefs.h.  */
18806 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18807 int
18808 main ()
18809 {
18810
18811   ;
18812   return 0;
18813 }
18814 _ACEOF
18815 if ac_fn_c_try_run "$LINENO"; then :
18816   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18817 else
18818   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18819 fi
18820 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18821   conftest.$ac_objext conftest.beam conftest.$ac_ext
18822 fi
18823
18824 LDFLAGS="$pgac_save_LDFLAGS"
18825 fi
18826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18827 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18828 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18829   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18830 fi
18831
18832 elif test "$PORTNAME" = "openbsd"; then
18833   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18834 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18835 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18836   $as_echo_n "(cached) " >&6
18837 else
18838   pgac_save_LDFLAGS=$LDFLAGS
18839 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18840 if test "$cross_compiling" = yes; then :
18841   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18842 else
18843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18844 /* end confdefs.h.  */
18845 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18846 int
18847 main ()
18848 {
18849
18850   ;
18851   return 0;
18852 }
18853 _ACEOF
18854 if ac_fn_c_try_run "$LINENO"; then :
18855   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
18856 else
18857   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
18858 fi
18859 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18860   conftest.$ac_objext conftest.beam conftest.$ac_ext
18861 fi
18862
18863 LDFLAGS="$pgac_save_LDFLAGS"
18864 fi
18865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
18866 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
18867 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
18868   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
18869 fi
18870
18871 else
18872   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
18873 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
18874 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
18875   $as_echo_n "(cached) " >&6
18876 else
18877   pgac_save_LDFLAGS=$LDFLAGS
18878 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18879 if test "$cross_compiling" = yes; then :
18880   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
18881 else
18882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18883 /* end confdefs.h.  */
18884 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18885 int
18886 main ()
18887 {
18888
18889   ;
18890   return 0;
18891 }
18892 _ACEOF
18893 if ac_fn_c_try_run "$LINENO"; then :
18894   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
18895 else
18896   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
18897 fi
18898 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18899   conftest.$ac_objext conftest.beam conftest.$ac_ext
18900 fi
18901
18902 LDFLAGS="$pgac_save_LDFLAGS"
18903 fi
18904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
18905 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
18906 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
18907   LDFLAGS="$LDFLAGS -Wl,--as-needed"
18908 fi
18909
18910 fi
18911
18912 # Create compiler version string
18913 if test x"$GCC" = x"yes" ; then
18914   cc_string=`${CC} --version | sed q`
18915   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18916 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18917   cc_string=`${CC} -V 2>&1 | sed q`
18918 else
18919   cc_string=$CC
18920 fi
18921
18922
18923 cat >>confdefs.h <<_ACEOF
18924 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18925 _ACEOF
18926
18927
18928 # Supply a numeric version string for use by 3rd party add-ons
18929 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18930 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
18931 tr '.' '        ' |
18932 $AWK '{printf "%d%04d", $1, $2}'`"
18933
18934 cat >>confdefs.h <<_ACEOF
18935 #define PG_VERSION_NUM $PG_VERSION_NUM
18936 _ACEOF
18937
18938
18939
18940
18941 # Begin output steps
18942
18943 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
18944 $as_echo "$as_me: using compiler=$cc_string" >&6;}
18945 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
18946 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
18947 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
18948 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
18949 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
18950 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
18951 # Currently only used when LLVM is used
18952 if test "$with_llvm" = yes ; then
18953    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
18954 $as_echo "$as_me: using CXX=$CXX" >&6;}
18955    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
18956 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
18957    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
18958 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
18959    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
18960 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
18961    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
18962 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
18963 fi
18964
18965 # prepare build tree if outside source tree
18966 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18967 # Note 2: /bin/pwd might be better than shell's built-in at getting
18968 #         a symlink-free name.
18969 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18970   vpath_build=no
18971 else
18972   vpath_build=yes
18973   if test "$no_create" != yes; then
18974     $as_echo_n "preparing build tree... " >&6
18975     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
18976     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
18977       || as_fn_error $? "failed" "$LINENO" 5
18978     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
18979 $as_echo "done" >&6; }
18980   fi
18981 fi
18982
18983
18984
18985 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
18986
18987
18988 ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
18989
18990
18991 if test "$PORTNAME" = "win32"; then
18992 ac_config_commands="$ac_config_commands check_win32_symlinks"
18993
18994 fi
18995
18996 ac_config_headers="$ac_config_headers src/include/pg_config.h"
18997
18998
18999 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19000
19001
19002 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19003
19004
19005 cat >confcache <<\_ACEOF
19006 # This file is a shell script that caches the results of configure
19007 # tests run on this system so they can be shared between configure
19008 # scripts and configure runs, see configure's option --config-cache.
19009 # It is not useful on other systems.  If it contains results you don't
19010 # want to keep, you may remove or edit it.
19011 #
19012 # config.status only pays attention to the cache file if you give it
19013 # the --recheck option to rerun configure.
19014 #
19015 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19016 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19017 # following values.
19018
19019 _ACEOF
19020
19021 # The following way of writing the cache mishandles newlines in values,
19022 # but we know of no workaround that is simple, portable, and efficient.
19023 # So, we kill variables containing newlines.
19024 # Ultrix sh set writes to stderr and can't be redirected directly,
19025 # and sets the high bit in the cache file unless we assign to the vars.
19026 (
19027   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19028     eval ac_val=\$$ac_var
19029     case $ac_val in #(
19030     *${as_nl}*)
19031       case $ac_var in #(
19032       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19033 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19034       esac
19035       case $ac_var in #(
19036       _ | IFS | as_nl) ;; #(
19037       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19038       *) { eval $ac_var=; unset $ac_var;} ;;
19039       esac ;;
19040     esac
19041   done
19042
19043   (set) 2>&1 |
19044     case $as_nl`(ac_space=' '; set) 2>&1` in #(
19045     *${as_nl}ac_space=\ *)
19046       # `set' does not quote correctly, so add quotes: double-quote
19047       # substitution turns \\\\ into \\, and sed turns \\ into \.
19048       sed -n \
19049         "s/'/'\\\\''/g;
19050           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19051       ;; #(
19052     *)
19053       # `set' quotes correctly as required by POSIX, so do not add quotes.
19054       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19055       ;;
19056     esac |
19057     sort
19058 ) |
19059   sed '
19060      /^ac_cv_env_/b end
19061      t clear
19062      :clear
19063      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19064      t end
19065      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19066      :end' >>confcache
19067 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19068   if test -w "$cache_file"; then
19069     if test "x$cache_file" != "x/dev/null"; then
19070       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19071 $as_echo "$as_me: updating cache $cache_file" >&6;}
19072       if test ! -f "$cache_file" || test -h "$cache_file"; then
19073         cat confcache >"$cache_file"
19074       else
19075         case $cache_file in #(
19076         */* | ?:*)
19077           mv -f confcache "$cache_file"$$ &&
19078           mv -f "$cache_file"$$ "$cache_file" ;; #(
19079         *)
19080           mv -f confcache "$cache_file" ;;
19081         esac
19082       fi
19083     fi
19084   else
19085     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19086 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19087   fi
19088 fi
19089 rm -f confcache
19090
19091 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19092 # Let make expand exec_prefix.
19093 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19094
19095 DEFS=-DHAVE_CONFIG_H
19096
19097 ac_libobjs=
19098 ac_ltlibobjs=
19099 U=
19100 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19101   # 1. Remove the extension, and $U if already installed.
19102   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19103   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19104   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19105   #    will be set to the directory where LIBOBJS objects are built.
19106   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19107   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19108 done
19109 LIBOBJS=$ac_libobjs
19110
19111 LTLIBOBJS=$ac_ltlibobjs
19112
19113
19114
19115
19116 : "${CONFIG_STATUS=./config.status}"
19117 ac_write_fail=0
19118 ac_clean_files_save=$ac_clean_files
19119 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19120 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19121 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19122 as_write_fail=0
19123 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19124 #! $SHELL
19125 # Generated by $as_me.
19126 # Run this file to recreate the current configuration.
19127 # Compiler output produced by configure, useful for debugging
19128 # configure, is in config.log if it exists.
19129
19130 debug=false
19131 ac_cs_recheck=false
19132 ac_cs_silent=false
19133
19134 SHELL=\${CONFIG_SHELL-$SHELL}
19135 export SHELL
19136 _ASEOF
19137 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19138 ## -------------------- ##
19139 ## M4sh Initialization. ##
19140 ## -------------------- ##
19141
19142 # Be more Bourne compatible
19143 DUALCASE=1; export DUALCASE # for MKS sh
19144 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19145   emulate sh
19146   NULLCMD=:
19147   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19148   # is contrary to our usage.  Disable this feature.
19149   alias -g '${1+"$@"}'='"$@"'
19150   setopt NO_GLOB_SUBST
19151 else
19152   case `(set -o) 2>/dev/null` in #(
19153   *posix*) :
19154     set -o posix ;; #(
19155   *) :
19156      ;;
19157 esac
19158 fi
19159
19160
19161 as_nl='
19162 '
19163 export as_nl
19164 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19165 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19166 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19167 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19168 # Prefer a ksh shell builtin over an external printf program on Solaris,
19169 # but without wasting forks for bash or zsh.
19170 if test -z "$BASH_VERSION$ZSH_VERSION" \
19171     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19172   as_echo='print -r --'
19173   as_echo_n='print -rn --'
19174 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19175   as_echo='printf %s\n'
19176   as_echo_n='printf %s'
19177 else
19178   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19179     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19180     as_echo_n='/usr/ucb/echo -n'
19181   else
19182     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19183     as_echo_n_body='eval
19184       arg=$1;
19185       case $arg in #(
19186       *"$as_nl"*)
19187         expr "X$arg" : "X\\(.*\\)$as_nl";
19188         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19189       esac;
19190       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19191     '
19192     export as_echo_n_body
19193     as_echo_n='sh -c $as_echo_n_body as_echo'
19194   fi
19195   export as_echo_body
19196   as_echo='sh -c $as_echo_body as_echo'
19197 fi
19198
19199 # The user is always right.
19200 if test "${PATH_SEPARATOR+set}" != set; then
19201   PATH_SEPARATOR=:
19202   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19203     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19204       PATH_SEPARATOR=';'
19205   }
19206 fi
19207
19208
19209 # IFS
19210 # We need space, tab and new line, in precisely that order.  Quoting is
19211 # there to prevent editors from complaining about space-tab.
19212 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19213 # splitting by setting IFS to empty value.)
19214 IFS=" ""        $as_nl"
19215
19216 # Find who we are.  Look in the path if we contain no directory separator.
19217 as_myself=
19218 case $0 in #((
19219   *[\\/]* ) as_myself=$0 ;;
19220   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19221 for as_dir in $PATH
19222 do
19223   IFS=$as_save_IFS
19224   test -z "$as_dir" && as_dir=.
19225     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19226   done
19227 IFS=$as_save_IFS
19228
19229      ;;
19230 esac
19231 # We did not find ourselves, most probably we were run as `sh COMMAND'
19232 # in which case we are not to be found in the path.
19233 if test "x$as_myself" = x; then
19234   as_myself=$0
19235 fi
19236 if test ! -f "$as_myself"; then
19237   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19238   exit 1
19239 fi
19240
19241 # Unset variables that we do not need and which cause bugs (e.g. in
19242 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19243 # suppresses any "Segmentation fault" message there.  '((' could
19244 # trigger a bug in pdksh 5.2.14.
19245 for as_var in BASH_ENV ENV MAIL MAILPATH
19246 do eval test x\${$as_var+set} = xset \
19247   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19248 done
19249 PS1='$ '
19250 PS2='> '
19251 PS4='+ '
19252
19253 # NLS nuisances.
19254 LC_ALL=C
19255 export LC_ALL
19256 LANGUAGE=C
19257 export LANGUAGE
19258
19259 # CDPATH.
19260 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19261
19262
19263 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19264 # ----------------------------------------
19265 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19266 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19267 # script with STATUS, using 1 if that was 0.
19268 as_fn_error ()
19269 {
19270   as_status=$1; test $as_status -eq 0 && as_status=1
19271   if test "$4"; then
19272     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19273     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19274   fi
19275   $as_echo "$as_me: error: $2" >&2
19276   as_fn_exit $as_status
19277 } # as_fn_error
19278
19279
19280 # as_fn_set_status STATUS
19281 # -----------------------
19282 # Set $? to STATUS, without forking.
19283 as_fn_set_status ()
19284 {
19285   return $1
19286 } # as_fn_set_status
19287
19288 # as_fn_exit STATUS
19289 # -----------------
19290 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19291 as_fn_exit ()
19292 {
19293   set +e
19294   as_fn_set_status $1
19295   exit $1
19296 } # as_fn_exit
19297
19298 # as_fn_unset VAR
19299 # ---------------
19300 # Portably unset VAR.
19301 as_fn_unset ()
19302 {
19303   { eval $1=; unset $1;}
19304 }
19305 as_unset=as_fn_unset
19306 # as_fn_append VAR VALUE
19307 # ----------------------
19308 # Append the text in VALUE to the end of the definition contained in VAR. Take
19309 # advantage of any shell optimizations that allow amortized linear growth over
19310 # repeated appends, instead of the typical quadratic growth present in naive
19311 # implementations.
19312 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19313   eval 'as_fn_append ()
19314   {
19315     eval $1+=\$2
19316   }'
19317 else
19318   as_fn_append ()
19319   {
19320     eval $1=\$$1\$2
19321   }
19322 fi # as_fn_append
19323
19324 # as_fn_arith ARG...
19325 # ------------------
19326 # Perform arithmetic evaluation on the ARGs, and store the result in the
19327 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19328 # must be portable across $(()) and expr.
19329 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19330   eval 'as_fn_arith ()
19331   {
19332     as_val=$(( $* ))
19333   }'
19334 else
19335   as_fn_arith ()
19336   {
19337     as_val=`expr "$@" || test $? -eq 1`
19338   }
19339 fi # as_fn_arith
19340
19341
19342 if expr a : '\(a\)' >/dev/null 2>&1 &&
19343    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19344   as_expr=expr
19345 else
19346   as_expr=false
19347 fi
19348
19349 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19350   as_basename=basename
19351 else
19352   as_basename=false
19353 fi
19354
19355 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19356   as_dirname=dirname
19357 else
19358   as_dirname=false
19359 fi
19360
19361 as_me=`$as_basename -- "$0" ||
19362 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19363          X"$0" : 'X\(//\)$' \| \
19364          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19365 $as_echo X/"$0" |
19366     sed '/^.*\/\([^/][^/]*\)\/*$/{
19367             s//\1/
19368             q
19369           }
19370           /^X\/\(\/\/\)$/{
19371             s//\1/
19372             q
19373           }
19374           /^X\/\(\/\).*/{
19375             s//\1/
19376             q
19377           }
19378           s/.*/./; q'`
19379
19380 # Avoid depending upon Character Ranges.
19381 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19382 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19383 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19384 as_cr_digits='0123456789'
19385 as_cr_alnum=$as_cr_Letters$as_cr_digits
19386
19387 ECHO_C= ECHO_N= ECHO_T=
19388 case `echo -n x` in #(((((
19389 -n*)
19390   case `echo 'xy\c'` in
19391   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19392   xy)  ECHO_C='\c';;
19393   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19394        ECHO_T=' ';;
19395   esac;;
19396 *)
19397   ECHO_N='-n';;
19398 esac
19399
19400 rm -f conf$$ conf$$.exe conf$$.file
19401 if test -d conf$$.dir; then
19402   rm -f conf$$.dir/conf$$.file
19403 else
19404   rm -f conf$$.dir
19405   mkdir conf$$.dir 2>/dev/null
19406 fi
19407 if (echo >conf$$.file) 2>/dev/null; then
19408   if ln -s conf$$.file conf$$ 2>/dev/null; then
19409     as_ln_s='ln -s'
19410     # ... but there are two gotchas:
19411     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19412     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19413     # In both cases, we have to default to `cp -pR'.
19414     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19415       as_ln_s='cp -pR'
19416   elif ln conf$$.file conf$$ 2>/dev/null; then
19417     as_ln_s=ln
19418   else
19419     as_ln_s='cp -pR'
19420   fi
19421 else
19422   as_ln_s='cp -pR'
19423 fi
19424 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19425 rmdir conf$$.dir 2>/dev/null
19426
19427
19428 # as_fn_mkdir_p
19429 # -------------
19430 # Create "$as_dir" as a directory, including parents if necessary.
19431 as_fn_mkdir_p ()
19432 {
19433
19434   case $as_dir in #(
19435   -*) as_dir=./$as_dir;;
19436   esac
19437   test -d "$as_dir" || eval $as_mkdir_p || {
19438     as_dirs=
19439     while :; do
19440       case $as_dir in #(
19441       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19442       *) as_qdir=$as_dir;;
19443       esac
19444       as_dirs="'$as_qdir' $as_dirs"
19445       as_dir=`$as_dirname -- "$as_dir" ||
19446 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19447          X"$as_dir" : 'X\(//\)[^/]' \| \
19448          X"$as_dir" : 'X\(//\)$' \| \
19449          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19450 $as_echo X"$as_dir" |
19451     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19452             s//\1/
19453             q
19454           }
19455           /^X\(\/\/\)[^/].*/{
19456             s//\1/
19457             q
19458           }
19459           /^X\(\/\/\)$/{
19460             s//\1/
19461             q
19462           }
19463           /^X\(\/\).*/{
19464             s//\1/
19465             q
19466           }
19467           s/.*/./; q'`
19468       test -d "$as_dir" && break
19469     done
19470     test -z "$as_dirs" || eval "mkdir $as_dirs"
19471   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19472
19473
19474 } # as_fn_mkdir_p
19475 if mkdir -p . 2>/dev/null; then
19476   as_mkdir_p='mkdir -p "$as_dir"'
19477 else
19478   test -d ./-p && rmdir ./-p
19479   as_mkdir_p=false
19480 fi
19481
19482
19483 # as_fn_executable_p FILE
19484 # -----------------------
19485 # Test if FILE is an executable regular file.
19486 as_fn_executable_p ()
19487 {
19488   test -f "$1" && test -x "$1"
19489 } # as_fn_executable_p
19490 as_test_x='test -x'
19491 as_executable_p=as_fn_executable_p
19492
19493 # Sed expression to map a string onto a valid CPP name.
19494 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19495
19496 # Sed expression to map a string onto a valid variable name.
19497 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19498
19499
19500 exec 6>&1
19501 ## ----------------------------------- ##
19502 ## Main body of $CONFIG_STATUS script. ##
19503 ## ----------------------------------- ##
19504 _ASEOF
19505 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19506
19507 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19508 # Save the log message, to keep $0 and so on meaningful, and to
19509 # report actual input values of CONFIG_FILES etc. instead of their
19510 # values after options handling.
19511 ac_log="
19512 This file was extended by PostgreSQL $as_me 12devel, which was
19513 generated by GNU Autoconf 2.69.  Invocation command line was
19514
19515   CONFIG_FILES    = $CONFIG_FILES
19516   CONFIG_HEADERS  = $CONFIG_HEADERS
19517   CONFIG_LINKS    = $CONFIG_LINKS
19518   CONFIG_COMMANDS = $CONFIG_COMMANDS
19519   $ $0 $@
19520
19521 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19522 "
19523
19524 _ACEOF
19525
19526 case $ac_config_files in *"
19527 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19528 esac
19529
19530 case $ac_config_headers in *"
19531 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19532 esac
19533
19534
19535 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19536 # Files that config.status was made for.
19537 config_files="$ac_config_files"
19538 config_headers="$ac_config_headers"
19539 config_links="$ac_config_links"
19540 config_commands="$ac_config_commands"
19541
19542 _ACEOF
19543
19544 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19545 ac_cs_usage="\
19546 \`$as_me' instantiates files and other configuration actions
19547 from templates according to the current configuration.  Unless the files
19548 and actions are specified as TAGs, all are instantiated by default.
19549
19550 Usage: $0 [OPTION]... [TAG]...
19551
19552   -h, --help       print this help, then exit
19553   -V, --version    print version number and configuration settings, then exit
19554       --config     print configuration, then exit
19555   -q, --quiet, --silent
19556                    do not print progress messages
19557   -d, --debug      don't remove temporary files
19558       --recheck    update $as_me by reconfiguring in the same conditions
19559       --file=FILE[:TEMPLATE]
19560                    instantiate the configuration file FILE
19561       --header=FILE[:TEMPLATE]
19562                    instantiate the configuration header FILE
19563
19564 Configuration files:
19565 $config_files
19566
19567 Configuration headers:
19568 $config_headers
19569
19570 Configuration links:
19571 $config_links
19572
19573 Configuration commands:
19574 $config_commands
19575
19576 Report bugs to <pgsql-bugs@postgresql.org>."
19577
19578 _ACEOF
19579 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19580 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19581 ac_cs_version="\\
19582 PostgreSQL config.status 12devel
19583 configured by $0, generated by GNU Autoconf 2.69,
19584   with options \\"\$ac_cs_config\\"
19585
19586 Copyright (C) 2012 Free Software Foundation, Inc.
19587 This config.status script is free software; the Free Software Foundation
19588 gives unlimited permission to copy, distribute and modify it."
19589
19590 ac_pwd='$ac_pwd'
19591 srcdir='$srcdir'
19592 INSTALL='$INSTALL'
19593 MKDIR_P='$MKDIR_P'
19594 AWK='$AWK'
19595 test -n "\$AWK" || AWK=awk
19596 _ACEOF
19597
19598 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19599 # The default lists apply if the user does not specify any file.
19600 ac_need_defaults=:
19601 while test $# != 0
19602 do
19603   case $1 in
19604   --*=?*)
19605     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19606     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19607     ac_shift=:
19608     ;;
19609   --*=)
19610     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19611     ac_optarg=
19612     ac_shift=:
19613     ;;
19614   *)
19615     ac_option=$1
19616     ac_optarg=$2
19617     ac_shift=shift
19618     ;;
19619   esac
19620
19621   case $ac_option in
19622   # Handling of the options.
19623   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19624     ac_cs_recheck=: ;;
19625   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19626     $as_echo "$ac_cs_version"; exit ;;
19627   --config | --confi | --conf | --con | --co | --c )
19628     $as_echo "$ac_cs_config"; exit ;;
19629   --debug | --debu | --deb | --de | --d | -d )
19630     debug=: ;;
19631   --file | --fil | --fi | --f )
19632     $ac_shift
19633     case $ac_optarg in
19634     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19635     '') as_fn_error $? "missing file argument" ;;
19636     esac
19637     as_fn_append CONFIG_FILES " '$ac_optarg'"
19638     ac_need_defaults=false;;
19639   --header | --heade | --head | --hea )
19640     $ac_shift
19641     case $ac_optarg in
19642     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19643     esac
19644     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19645     ac_need_defaults=false;;
19646   --he | --h)
19647     # Conflict between --help and --header
19648     as_fn_error $? "ambiguous option: \`$1'
19649 Try \`$0 --help' for more information.";;
19650   --help | --hel | -h )
19651     $as_echo "$ac_cs_usage"; exit ;;
19652   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19653   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19654     ac_cs_silent=: ;;
19655
19656   # This is an error.
19657   -*) as_fn_error $? "unrecognized option: \`$1'
19658 Try \`$0 --help' for more information." ;;
19659
19660   *) as_fn_append ac_config_targets " $1"
19661      ac_need_defaults=false ;;
19662
19663   esac
19664   shift
19665 done
19666
19667 ac_configure_extra_args=
19668
19669 if $ac_cs_silent; then
19670   exec 6>/dev/null
19671   ac_configure_extra_args="$ac_configure_extra_args --silent"
19672 fi
19673
19674 _ACEOF
19675 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19676 if \$ac_cs_recheck; then
19677   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19678   shift
19679   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19680   CONFIG_SHELL='$SHELL'
19681   export CONFIG_SHELL
19682   exec "\$@"
19683 fi
19684
19685 _ACEOF
19686 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19687 exec 5>>config.log
19688 {
19689   echo
19690   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19691 ## Running $as_me. ##
19692 _ASBOX
19693   $as_echo "$ac_log"
19694 } >&5
19695
19696 _ACEOF
19697 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19698 _ACEOF
19699
19700 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19701
19702 # Handling of arguments.
19703 for ac_config_target in $ac_config_targets
19704 do
19705   case $ac_config_target in
19706     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19707     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19708     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19709     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
19710     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19711     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19712     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
19713     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19714     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19715     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19716     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19717     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19718     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19719
19720   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19721   esac
19722 done
19723
19724
19725 # If the user did not use the arguments to specify the items to instantiate,
19726 # then the envvar interface is used.  Set only those that are not.
19727 # We use the long form for the default assignment because of an extremely
19728 # bizarre bug on SunOS 4.1.3.
19729 if $ac_need_defaults; then
19730   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19731   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19732   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19733   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19734 fi
19735
19736 # Have a temporary directory for convenience.  Make it in the build tree
19737 # simply because there is no reason against having it here, and in addition,
19738 # creating and moving files from /tmp can sometimes cause problems.
19739 # Hook for its removal unless debugging.
19740 # Note that there is a small window in which the directory will not be cleaned:
19741 # after its creation but before its name has been assigned to `$tmp'.
19742 $debug ||
19743 {
19744   tmp= ac_tmp=
19745   trap 'exit_status=$?
19746   : "${ac_tmp:=$tmp}"
19747   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19748 ' 0
19749   trap 'as_fn_exit 1' 1 2 13 15
19750 }
19751 # Create a (secure) tmp directory for tmp files.
19752
19753 {
19754   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19755   test -d "$tmp"
19756 }  ||
19757 {
19758   tmp=./conf$$-$RANDOM
19759   (umask 077 && mkdir "$tmp")
19760 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19761 ac_tmp=$tmp
19762
19763 # Set up the scripts for CONFIG_FILES section.
19764 # No need to generate them if there are no CONFIG_FILES.
19765 # This happens for instance with `./config.status config.h'.
19766 if test -n "$CONFIG_FILES"; then
19767
19768
19769 ac_cr=`echo X | tr X '\015'`
19770 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19771 # But we know of no other shell where ac_cr would be empty at this
19772 # point, so we can use a bashism as a fallback.
19773 if test "x$ac_cr" = x; then
19774   eval ac_cr=\$\'\\r\'
19775 fi
19776 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19777 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19778   ac_cs_awk_cr='\\r'
19779 else
19780   ac_cs_awk_cr=$ac_cr
19781 fi
19782
19783 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19784 _ACEOF
19785
19786
19787 {
19788   echo "cat >conf$$subs.awk <<_ACEOF" &&
19789   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19790   echo "_ACEOF"
19791 } >conf$$subs.sh ||
19792   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19793 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19794 ac_delim='%!_!# '
19795 for ac_last_try in false false false false false :; do
19796   . ./conf$$subs.sh ||
19797     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19798
19799   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19800   if test $ac_delim_n = $ac_delim_num; then
19801     break
19802   elif $ac_last_try; then
19803     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19804   else
19805     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19806   fi
19807 done
19808 rm -f conf$$subs.sh
19809
19810 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19811 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19812 _ACEOF
19813 sed -n '
19814 h
19815 s/^/S["/; s/!.*/"]=/
19816 p
19817 g
19818 s/^[^!]*!//
19819 :repl
19820 t repl
19821 s/'"$ac_delim"'$//
19822 t delim
19823 :nl
19824 h
19825 s/\(.\{148\}\)..*/\1/
19826 t more1
19827 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19828 p
19829 n
19830 b repl
19831 :more1
19832 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19833 p
19834 g
19835 s/.\{148\}//
19836 t nl
19837 :delim
19838 h
19839 s/\(.\{148\}\)..*/\1/
19840 t more2
19841 s/["\\]/\\&/g; s/^/"/; s/$/"/
19842 p
19843 b
19844 :more2
19845 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19846 p
19847 g
19848 s/.\{148\}//
19849 t delim
19850 ' <conf$$subs.awk | sed '
19851 /^[^""]/{
19852   N
19853   s/\n//
19854 }
19855 ' >>$CONFIG_STATUS || ac_write_fail=1
19856 rm -f conf$$subs.awk
19857 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19858 _ACAWK
19859 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19860   for (key in S) S_is_set[key] = 1
19861   FS = "\a"
19862
19863 }
19864 {
19865   line = $ 0
19866   nfields = split(line, field, "@")
19867   substed = 0
19868   len = length(field[1])
19869   for (i = 2; i < nfields; i++) {
19870     key = field[i]
19871     keylen = length(key)
19872     if (S_is_set[key]) {
19873       value = S[key]
19874       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19875       len += length(value) + length(field[++i])
19876       substed = 1
19877     } else
19878       len += 1 + keylen
19879   }
19880
19881   print line
19882 }
19883
19884 _ACAWK
19885 _ACEOF
19886 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19887 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19888   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19889 else
19890   cat
19891 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19892   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19893 _ACEOF
19894
19895 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19896 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19897 # trailing colons and then remove the whole line if VPATH becomes empty
19898 # (actually we leave an empty line to preserve line numbers).
19899 if test "x$srcdir" = x.; then
19900   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
19901 h
19902 s///
19903 s/^/:/
19904 s/[      ]*$/:/
19905 s/:\$(srcdir):/:/g
19906 s/:\${srcdir}:/:/g
19907 s/:@srcdir@:/:/g
19908 s/^:*//
19909 s/:*$//
19910 x
19911 s/\(=[   ]*\).*/\1/
19912 G
19913 s/\n//
19914 s/^[^=]*=[       ]*$//
19915 }'
19916 fi
19917
19918 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19919 fi # test -n "$CONFIG_FILES"
19920
19921 # Set up the scripts for CONFIG_HEADERS section.
19922 # No need to generate them if there are no CONFIG_HEADERS.
19923 # This happens for instance with `./config.status Makefile'.
19924 if test -n "$CONFIG_HEADERS"; then
19925 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19926 BEGIN {
19927 _ACEOF
19928
19929 # Transform confdefs.h into an awk script `defines.awk', embedded as
19930 # here-document in config.status, that substitutes the proper values into
19931 # config.h.in to produce config.h.
19932
19933 # Create a delimiter string that does not exist in confdefs.h, to ease
19934 # handling of long lines.
19935 ac_delim='%!_!# '
19936 for ac_last_try in false false :; do
19937   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19938   if test -z "$ac_tt"; then
19939     break
19940   elif $ac_last_try; then
19941     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19942   else
19943     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19944   fi
19945 done
19946
19947 # For the awk script, D is an array of macro values keyed by name,
19948 # likewise P contains macro parameters if any.  Preserve backslash
19949 # newline sequences.
19950
19951 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19952 sed -n '
19953 s/.\{148\}/&'"$ac_delim"'/g
19954 t rset
19955 :rset
19956 s/^[     ]*#[    ]*define[       ][      ]*/ /
19957 t def
19958 d
19959 :def
19960 s/\\$//
19961 t bsnl
19962 s/["\\]/\\&/g
19963 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19964 D["\1"]=" \3"/p
19965 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
19966 d
19967 :bsnl
19968 s/["\\]/\\&/g
19969 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19970 D["\1"]=" \3\\\\\\n"\\/p
19971 t cont
19972 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19973 t cont
19974 d
19975 :cont
19976 n
19977 s/.\{148\}/&'"$ac_delim"'/g
19978 t clear
19979 :clear
19980 s/\\$//
19981 t bsnlc
19982 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19983 d
19984 :bsnlc
19985 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19986 b cont
19987 ' <confdefs.h | sed '
19988 s/'"$ac_delim"'/"\\\
19989 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19990
19991 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19992   for (key in D) D_is_set[key] = 1
19993   FS = "\a"
19994 }
19995 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19996   line = \$ 0
19997   split(line, arg, " ")
19998   if (arg[1] == "#") {
19999     defundef = arg[2]
20000     mac1 = arg[3]
20001   } else {
20002     defundef = substr(arg[1], 2)
20003     mac1 = arg[2]
20004   }
20005   split(mac1, mac2, "(") #)
20006   macro = mac2[1]
20007   prefix = substr(line, 1, index(line, defundef) - 1)
20008   if (D_is_set[macro]) {
20009     # Preserve the white space surrounding the "#".
20010     print prefix "define", macro P[macro] D[macro]
20011     next
20012   } else {
20013     # Replace #undef with comments.  This is necessary, for example,
20014     # in the case of _POSIX_SOURCE, which is predefined and required
20015     # on some systems where configure will not decide to define it.
20016     if (defundef == "undef") {
20017       print "/*", prefix defundef, macro, "*/"
20018       next
20019     }
20020   }
20021 }
20022 { print }
20023 _ACAWK
20024 _ACEOF
20025 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20026   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20027 fi # test -n "$CONFIG_HEADERS"
20028
20029
20030 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
20031 shift
20032 for ac_tag
20033 do
20034   case $ac_tag in
20035   :[FHLC]) ac_mode=$ac_tag; continue;;
20036   esac
20037   case $ac_mode$ac_tag in
20038   :[FHL]*:*);;
20039   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20040   :[FH]-) ac_tag=-:-;;
20041   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20042   esac
20043   ac_save_IFS=$IFS
20044   IFS=:
20045   set x $ac_tag
20046   IFS=$ac_save_IFS
20047   shift
20048   ac_file=$1
20049   shift
20050
20051   case $ac_mode in
20052   :L) ac_source=$1;;
20053   :[FH])
20054     ac_file_inputs=
20055     for ac_f
20056     do
20057       case $ac_f in
20058       -) ac_f="$ac_tmp/stdin";;
20059       *) # Look for the file first in the build tree, then in the source tree
20060          # (if the path is not absolute).  The absolute path cannot be DOS-style,
20061          # because $ac_f cannot contain `:'.
20062          test -f "$ac_f" ||
20063            case $ac_f in
20064            [\\/$]*) false;;
20065            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20066            esac ||
20067            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20068       esac
20069       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20070       as_fn_append ac_file_inputs " '$ac_f'"
20071     done
20072
20073     # Let's still pretend it is `configure' which instantiates (i.e., don't
20074     # use $as_me), people would be surprised to read:
20075     #    /* config.h.  Generated by config.status.  */
20076     configure_input='Generated from '`
20077           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20078         `' by configure.'
20079     if test x"$ac_file" != x-; then
20080       configure_input="$ac_file.  $configure_input"
20081       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20082 $as_echo "$as_me: creating $ac_file" >&6;}
20083     fi
20084     # Neutralize special characters interpreted by sed in replacement strings.
20085     case $configure_input in #(
20086     *\&* | *\|* | *\\* )
20087        ac_sed_conf_input=`$as_echo "$configure_input" |
20088        sed 's/[\\\\&|]/\\\\&/g'`;; #(
20089     *) ac_sed_conf_input=$configure_input;;
20090     esac
20091
20092     case $ac_tag in
20093     *:-:* | *:-) cat >"$ac_tmp/stdin" \
20094       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20095     esac
20096     ;;
20097   esac
20098
20099   ac_dir=`$as_dirname -- "$ac_file" ||
20100 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20101          X"$ac_file" : 'X\(//\)[^/]' \| \
20102          X"$ac_file" : 'X\(//\)$' \| \
20103          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20104 $as_echo X"$ac_file" |
20105     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20106             s//\1/
20107             q
20108           }
20109           /^X\(\/\/\)[^/].*/{
20110             s//\1/
20111             q
20112           }
20113           /^X\(\/\/\)$/{
20114             s//\1/
20115             q
20116           }
20117           /^X\(\/\).*/{
20118             s//\1/
20119             q
20120           }
20121           s/.*/./; q'`
20122   as_dir="$ac_dir"; as_fn_mkdir_p
20123   ac_builddir=.
20124
20125 case "$ac_dir" in
20126 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20127 *)
20128   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20129   # A ".." for each directory in $ac_dir_suffix.
20130   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20131   case $ac_top_builddir_sub in
20132   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20133   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20134   esac ;;
20135 esac
20136 ac_abs_top_builddir=$ac_pwd
20137 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20138 # for backward compatibility:
20139 ac_top_builddir=$ac_top_build_prefix
20140
20141 case $srcdir in
20142   .)  # We are building in place.
20143     ac_srcdir=.
20144     ac_top_srcdir=$ac_top_builddir_sub
20145     ac_abs_top_srcdir=$ac_pwd ;;
20146   [\\/]* | ?:[\\/]* )  # Absolute name.
20147     ac_srcdir=$srcdir$ac_dir_suffix;
20148     ac_top_srcdir=$srcdir
20149     ac_abs_top_srcdir=$srcdir ;;
20150   *) # Relative name.
20151     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20152     ac_top_srcdir=$ac_top_build_prefix$srcdir
20153     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20154 esac
20155 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20156
20157
20158   case $ac_mode in
20159   :F)
20160   #
20161   # CONFIG_FILE
20162   #
20163
20164   case $INSTALL in
20165   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20166   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20167   esac
20168   ac_MKDIR_P=$MKDIR_P
20169   case $MKDIR_P in
20170   [\\/$]* | ?:[\\/]* ) ;;
20171   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20172   esac
20173 _ACEOF
20174
20175 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20176 # If the template does not know about datarootdir, expand it.
20177 # FIXME: This hack should be removed a few years after 2.60.
20178 ac_datarootdir_hack=; ac_datarootdir_seen=
20179 ac_sed_dataroot='
20180 /datarootdir/ {
20181   p
20182   q
20183 }
20184 /@datadir@/p
20185 /@docdir@/p
20186 /@infodir@/p
20187 /@localedir@/p
20188 /@mandir@/p'
20189 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20190 *datarootdir*) ac_datarootdir_seen=yes;;
20191 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20192   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20193 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20194 _ACEOF
20195 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20196   ac_datarootdir_hack='
20197   s&@datadir@&$datadir&g
20198   s&@docdir@&$docdir&g
20199   s&@infodir@&$infodir&g
20200   s&@localedir@&$localedir&g
20201   s&@mandir@&$mandir&g
20202   s&\\\${datarootdir}&$datarootdir&g' ;;
20203 esac
20204 _ACEOF
20205
20206 # Neutralize VPATH when `$srcdir' = `.'.
20207 # Shell code in configure.ac might set extrasub.
20208 # FIXME: do we really want to maintain this feature?
20209 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20210 ac_sed_extra="$ac_vpsub
20211 $extrasub
20212 _ACEOF
20213 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20214 :t
20215 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20216 s|@configure_input@|$ac_sed_conf_input|;t t
20217 s&@top_builddir@&$ac_top_builddir_sub&;t t
20218 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20219 s&@srcdir@&$ac_srcdir&;t t
20220 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20221 s&@top_srcdir@&$ac_top_srcdir&;t t
20222 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20223 s&@builddir@&$ac_builddir&;t t
20224 s&@abs_builddir@&$ac_abs_builddir&;t t
20225 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20226 s&@INSTALL@&$ac_INSTALL&;t t
20227 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20228 $ac_datarootdir_hack
20229 "
20230 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20231   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20232
20233 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20234   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20235   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20236       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20237   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20238 which seems to be undefined.  Please make sure it is defined" >&5
20239 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20240 which seems to be undefined.  Please make sure it is defined" >&2;}
20241
20242   rm -f "$ac_tmp/stdin"
20243   case $ac_file in
20244   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20245   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20246   esac \
20247   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20248  ;;
20249   :H)
20250   #
20251   # CONFIG_HEADER
20252   #
20253   if test x"$ac_file" != x-; then
20254     {
20255       $as_echo "/* $configure_input  */" \
20256       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20257     } >"$ac_tmp/config.h" \
20258       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20259     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20260       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20261 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20262     else
20263       rm -f "$ac_file"
20264       mv "$ac_tmp/config.h" "$ac_file" \
20265         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20266     fi
20267   else
20268     $as_echo "/* $configure_input  */" \
20269       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20270       || as_fn_error $? "could not create -" "$LINENO" 5
20271   fi
20272  ;;
20273   :L)
20274   #
20275   # CONFIG_LINK
20276   #
20277
20278   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20279     :
20280   else
20281     # Prefer the file from the source tree if names are identical.
20282     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20283       ac_source=$srcdir/$ac_source
20284     fi
20285
20286     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20287 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20288
20289     if test ! -r "$ac_source"; then
20290       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20291     fi
20292     rm -f "$ac_file"
20293
20294     # Try a relative symlink, then a hard link, then a copy.
20295     case $ac_source in
20296     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20297         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20298     esac
20299     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20300       ln "$ac_source" "$ac_file" 2>/dev/null ||
20301       cp -p "$ac_source" "$ac_file" ||
20302       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20303   fi
20304  ;;
20305   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20306 $as_echo "$as_me: executing $ac_file commands" >&6;}
20307  ;;
20308   esac
20309
20310
20311   case $ac_file$ac_mode in
20312     "check_win32_symlinks":C)
20313 # Links sometimes fail undetected on Mingw -
20314 # so here we detect it and warn the user
20315 for FILE in $CONFIG_LINKS
20316  do
20317         # test -e works for symlinks in the MinGW console
20318         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20319 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20320  done
20321  ;;
20322     "src/include/pg_config.h":H)
20323 # Update timestamp for pg_config.h (see Makefile.global)
20324 echo >src/include/stamp-h
20325  ;;
20326     "src/include/pg_config_ext.h":H)
20327 # Update timestamp for pg_config_ext.h (see Makefile.global)
20328 echo >src/include/stamp-ext-h
20329  ;;
20330     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20331
20332   esac
20333 done # for ac_tag
20334
20335
20336 as_fn_exit 0
20337 _ACEOF
20338 ac_clean_files=$ac_clean_files_save
20339
20340 test $ac_write_fail = 0 ||
20341   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20342
20343
20344 # configure is writing to config.log, and then calls config.status.
20345 # config.status does its own redirection, appending to config.log.
20346 # Unfortunately, on DOS this fails, as config.log is still kept open
20347 # by configure, so config.status won't be able to write to it; its
20348 # output is simply discarded.  So we exec the FD to /dev/null,
20349 # effectively closing config.log, so it can be properly (re)opened and
20350 # appended to by config.status.  When coming back to configure, we
20351 # need to make the FD available again.
20352 if test "$no_create" != yes; then
20353   ac_cs_success=:
20354   ac_config_status_args=
20355   test "$silent" = yes &&
20356     ac_config_status_args="$ac_config_status_args --quiet"
20357   exec 5>/dev/null
20358   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20359   exec 5>>config.log
20360   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20361   # would make configure fail if this is the last instruction.
20362   $ac_cs_success || as_fn_exit 1
20363 fi
20364 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20365   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20366 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20367 fi
20368