]> granicus.if.org Git - postgresql/blob - configure
LLVMJIT: LLVMGetHostCPUFeatures now is upstream, use LLMV version if available.
[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
4606 # Error out if the compiler does not support C99, as the codebase
4607 # relies on that.
4608 if test "$ac_cv_prog_cc_c99" = no; then
4609     as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4610 fi
4611
4612 ac_ext=cpp
4613 ac_cpp='$CXXCPP $CPPFLAGS'
4614 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4615 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4616 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4617 if test -z "$CXX"; then
4618   if test -n "$CCC"; then
4619     CXX=$CCC
4620   else
4621     if test -n "$ac_tool_prefix"; then
4622   for ac_prog in $pgac_cxx_list
4623   do
4624     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4625 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4627 $as_echo_n "checking for $ac_word... " >&6; }
4628 if ${ac_cv_prog_CXX+:} false; then :
4629   $as_echo_n "(cached) " >&6
4630 else
4631   if test -n "$CXX"; then
4632   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4633 else
4634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635 for as_dir in $PATH
4636 do
4637   IFS=$as_save_IFS
4638   test -z "$as_dir" && as_dir=.
4639     for ac_exec_ext in '' $ac_executable_extensions; do
4640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4641     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643     break 2
4644   fi
4645 done
4646   done
4647 IFS=$as_save_IFS
4648
4649 fi
4650 fi
4651 CXX=$ac_cv_prog_CXX
4652 if test -n "$CXX"; then
4653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4654 $as_echo "$CXX" >&6; }
4655 else
4656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657 $as_echo "no" >&6; }
4658 fi
4659
4660
4661     test -n "$CXX" && break
4662   done
4663 fi
4664 if test -z "$CXX"; then
4665   ac_ct_CXX=$CXX
4666   for ac_prog in $pgac_cxx_list
4667 do
4668   # Extract the first word of "$ac_prog", so it can be a program name with args.
4669 set dummy $ac_prog; ac_word=$2
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671 $as_echo_n "checking for $ac_word... " >&6; }
4672 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4673   $as_echo_n "(cached) " >&6
4674 else
4675   if test -n "$ac_ct_CXX"; then
4676   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4677 else
4678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4679 for as_dir in $PATH
4680 do
4681   IFS=$as_save_IFS
4682   test -z "$as_dir" && as_dir=.
4683     for ac_exec_ext in '' $ac_executable_extensions; do
4684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4685     ac_cv_prog_ac_ct_CXX="$ac_prog"
4686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4687     break 2
4688   fi
4689 done
4690   done
4691 IFS=$as_save_IFS
4692
4693 fi
4694 fi
4695 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4696 if test -n "$ac_ct_CXX"; then
4697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4698 $as_echo "$ac_ct_CXX" >&6; }
4699 else
4700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701 $as_echo "no" >&6; }
4702 fi
4703
4704
4705   test -n "$ac_ct_CXX" && break
4706 done
4707
4708   if test "x$ac_ct_CXX" = x; then
4709     CXX="g++"
4710   else
4711     case $cross_compiling:$ac_tool_warned in
4712 yes:)
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4714 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4715 ac_tool_warned=yes ;;
4716 esac
4717     CXX=$ac_ct_CXX
4718   fi
4719 fi
4720
4721   fi
4722 fi
4723 # Provide some information about the compiler.
4724 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4725 set X $ac_compile
4726 ac_compiler=$2
4727 for ac_option in --version -v -V -qversion; do
4728   { { ac_try="$ac_compiler $ac_option >&5"
4729 case "(($ac_try" in
4730   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4731   *) ac_try_echo=$ac_try;;
4732 esac
4733 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4734 $as_echo "$ac_try_echo"; } >&5
4735   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4736   ac_status=$?
4737   if test -s conftest.err; then
4738     sed '10a\
4739 ... rest of stderr output deleted ...
4740          10q' conftest.err >conftest.er1
4741     cat conftest.er1 >&5
4742   fi
4743   rm -f conftest.er1 conftest.err
4744   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4745   test $ac_status = 0; }
4746 done
4747
4748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4749 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4750 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4751   $as_echo_n "(cached) " >&6
4752 else
4753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4754 /* end confdefs.h.  */
4755
4756 int
4757 main ()
4758 {
4759 #ifndef __GNUC__
4760        choke me
4761 #endif
4762
4763   ;
4764   return 0;
4765 }
4766 _ACEOF
4767 if ac_fn_cxx_try_compile "$LINENO"; then :
4768   ac_compiler_gnu=yes
4769 else
4770   ac_compiler_gnu=no
4771 fi
4772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4773 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4774
4775 fi
4776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4777 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4778 if test $ac_compiler_gnu = yes; then
4779   GXX=yes
4780 else
4781   GXX=
4782 fi
4783 ac_test_CXXFLAGS=${CXXFLAGS+set}
4784 ac_save_CXXFLAGS=$CXXFLAGS
4785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4786 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4787 if ${ac_cv_prog_cxx_g+:} false; then :
4788   $as_echo_n "(cached) " >&6
4789 else
4790   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4791    ac_cxx_werror_flag=yes
4792    ac_cv_prog_cxx_g=no
4793    CXXFLAGS="-g"
4794    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4795 /* end confdefs.h.  */
4796
4797 int
4798 main ()
4799 {
4800
4801   ;
4802   return 0;
4803 }
4804 _ACEOF
4805 if ac_fn_cxx_try_compile "$LINENO"; then :
4806   ac_cv_prog_cxx_g=yes
4807 else
4808   CXXFLAGS=""
4809       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4810 /* end confdefs.h.  */
4811
4812 int
4813 main ()
4814 {
4815
4816   ;
4817   return 0;
4818 }
4819 _ACEOF
4820 if ac_fn_cxx_try_compile "$LINENO"; then :
4821
4822 else
4823   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4824          CXXFLAGS="-g"
4825          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4826 /* end confdefs.h.  */
4827
4828 int
4829 main ()
4830 {
4831
4832   ;
4833   return 0;
4834 }
4835 _ACEOF
4836 if ac_fn_cxx_try_compile "$LINENO"; then :
4837   ac_cv_prog_cxx_g=yes
4838 fi
4839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4840 fi
4841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4842 fi
4843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4844    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4845 fi
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4847 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4848 if test "$ac_test_CXXFLAGS" = set; then
4849   CXXFLAGS=$ac_save_CXXFLAGS
4850 elif test $ac_cv_prog_cxx_g = yes; then
4851   if test "$GXX" = yes; then
4852     CXXFLAGS="-g -O2"
4853   else
4854     CXXFLAGS="-g"
4855   fi
4856 else
4857   if test "$GXX" = yes; then
4858     CXXFLAGS="-O2"
4859   else
4860     CXXFLAGS=
4861   fi
4862 fi
4863 ac_ext=c
4864 ac_cpp='$CPP $CPPFLAGS'
4865 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4866 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4867 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4868
4869
4870 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4871 # but has idiosyncrasies of its own.  We assume icc will define
4872 # __INTEL_COMPILER regardless of CFLAGS.
4873
4874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4875 /* end confdefs.h.  */
4876
4877 int
4878 main ()
4879 {
4880 #ifndef __INTEL_COMPILER
4881 choke me
4882 #endif
4883   ;
4884   return 0;
4885 }
4886 _ACEOF
4887 if ac_fn_c_try_compile "$LINENO"; then :
4888   ICC=yes
4889 else
4890   ICC=no
4891 fi
4892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4893
4894 # Check if it's Sun Studio compiler. We assume that
4895 # __SUNPRO_C will be defined for Sun Studio compilers
4896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4897 /* end confdefs.h.  */
4898
4899 int
4900 main ()
4901 {
4902 #ifndef __SUNPRO_C
4903 choke me
4904 #endif
4905   ;
4906   return 0;
4907 }
4908 _ACEOF
4909 if ac_fn_c_try_compile "$LINENO"; then :
4910   SUN_STUDIO_CC=yes
4911 else
4912   SUN_STUDIO_CC=no
4913 fi
4914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4915
4916
4917
4918
4919 #
4920 # LLVM
4921 #
4922 # Checked early because subsequent tests depend on it.
4923
4924
4925
4926 # Check whether --with-llvm was given.
4927 if test "${with_llvm+set}" = set; then :
4928   withval=$with_llvm;
4929   case $withval in
4930     yes)
4931
4932 $as_echo "#define USE_LLVM 1" >>confdefs.h
4933
4934       ;;
4935     no)
4936       :
4937       ;;
4938     *)
4939       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4940       ;;
4941   esac
4942
4943 else
4944   with_llvm=no
4945
4946 fi
4947
4948
4949
4950 if test "$with_llvm" = yes ; then
4951    for ac_prog in gawk mawk nawk awk
4952 do
4953   # Extract the first word of "$ac_prog", so it can be a program name with args.
4954 set dummy $ac_prog; ac_word=$2
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4956 $as_echo_n "checking for $ac_word... " >&6; }
4957 if ${ac_cv_prog_AWK+:} false; then :
4958   $as_echo_n "(cached) " >&6
4959 else
4960   if test -n "$AWK"; then
4961   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4962 else
4963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4964 for as_dir in $PATH
4965 do
4966   IFS=$as_save_IFS
4967   test -z "$as_dir" && as_dir=.
4968     for ac_exec_ext in '' $ac_executable_extensions; do
4969   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4970     ac_cv_prog_AWK="$ac_prog"
4971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4972     break 2
4973   fi
4974 done
4975   done
4976 IFS=$as_save_IFS
4977
4978 fi
4979 fi
4980 AWK=$ac_cv_prog_AWK
4981 if test -n "$AWK"; then
4982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4983 $as_echo "$AWK" >&6; }
4984 else
4985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4986 $as_echo "no" >&6; }
4987 fi
4988
4989
4990   test -n "$AWK" && break
4991 done
4992
4993
4994
4995
4996
4997   if test -z "$LLVM_CONFIG"; then
4998   for ac_prog in llvm-config llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
4999 do
5000   # Extract the first word of "$ac_prog", so it can be a program name with args.
5001 set dummy $ac_prog; ac_word=$2
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003 $as_echo_n "checking for $ac_word... " >&6; }
5004 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5005   $as_echo_n "(cached) " >&6
5006 else
5007   case $LLVM_CONFIG in
5008   [\\/]* | ?:[\\/]*)
5009   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5010   ;;
5011   *)
5012   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013 for as_dir in $PATH
5014 do
5015   IFS=$as_save_IFS
5016   test -z "$as_dir" && as_dir=.
5017     for ac_exec_ext in '' $ac_executable_extensions; do
5018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5019     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5020     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021     break 2
5022   fi
5023 done
5024   done
5025 IFS=$as_save_IFS
5026
5027   ;;
5028 esac
5029 fi
5030 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5031 if test -n "$LLVM_CONFIG"; then
5032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5033 $as_echo "$LLVM_CONFIG" >&6; }
5034 else
5035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036 $as_echo "no" >&6; }
5037 fi
5038
5039
5040   test -n "$LLVM_CONFIG" && break
5041 done
5042
5043 else
5044   # Report the value of LLVM_CONFIG in configure's output in all cases.
5045   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5046 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5048 $as_echo "$LLVM_CONFIG" >&6; }
5049 fi
5050
5051
5052   # no point continuing if llvm wasn't found
5053   if test -z "$LLVM_CONFIG"; then
5054     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5055   fi
5056   # check if detected $LLVM_CONFIG is executable
5057   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5058   if test "x$pgac_llvm_version" = "xno"; then
5059     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5060   fi
5061   # and whether the version is supported
5062   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5063     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5064   fi
5065
5066   # need clang to create some bitcode files
5067
5068   if test -z "$CLANG"; then
5069   for ac_prog in clang clang-6.0 clang-5.0 clang-4.0 clang-3.9
5070 do
5071   # Extract the first word of "$ac_prog", so it can be a program name with args.
5072 set dummy $ac_prog; ac_word=$2
5073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5074 $as_echo_n "checking for $ac_word... " >&6; }
5075 if ${ac_cv_path_CLANG+:} false; then :
5076   $as_echo_n "(cached) " >&6
5077 else
5078   case $CLANG in
5079   [\\/]* | ?:[\\/]*)
5080   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5081   ;;
5082   *)
5083   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5084 for as_dir in $PATH
5085 do
5086   IFS=$as_save_IFS
5087   test -z "$as_dir" && as_dir=.
5088     for ac_exec_ext in '' $ac_executable_extensions; do
5089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5090     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5091     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5092     break 2
5093   fi
5094 done
5095   done
5096 IFS=$as_save_IFS
5097
5098   ;;
5099 esac
5100 fi
5101 CLANG=$ac_cv_path_CLANG
5102 if test -n "$CLANG"; then
5103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5104 $as_echo "$CLANG" >&6; }
5105 else
5106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107 $as_echo "no" >&6; }
5108 fi
5109
5110
5111   test -n "$CLANG" && break
5112 done
5113
5114 else
5115   # Report the value of CLANG in configure's output in all cases.
5116   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5117 $as_echo_n "checking for CLANG... " >&6; }
5118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5119 $as_echo "$CLANG" >&6; }
5120 fi
5121
5122   if test -z "$CLANG"; then
5123     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5124   fi
5125   # make sure clang is executable
5126   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5127     as_fn_error $? "$CLANG does not work" "$LINENO" 5
5128   fi
5129   # Could check clang version, but it doesn't seem that
5130   # important. Systems with a new enough LLVM version are usually
5131   # going to have a decent clang version too. It's also not entirely
5132   # clear what the minimum version is.
5133
5134   # Collect compiler flags necessary to build the LLVM dependent
5135   # shared library.
5136   for pgac_option in `$LLVM_CONFIG --cppflags`; do
5137     case $pgac_option in
5138       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5139     esac
5140   done
5141
5142   for pgac_option in `$LLVM_CONFIG --ldflags`; do
5143     case $pgac_option in
5144       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5145     esac
5146   done
5147
5148   # ABI influencing options, standard influencing options
5149   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5150     case $pgac_option in
5151       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5152       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5153     esac
5154   done
5155
5156   # Look for components we're interested in, collect necessary
5157   # libs. As some components are optional, we can't just list all of
5158   # them as it'd raise an error.
5159   pgac_components='';
5160   for pgac_component in `$LLVM_CONFIG --components`; do
5161     case $pgac_component in
5162       engine) pgac_components="$pgac_components $pgac_component";;
5163       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5164       orcjit) pgac_components="$pgac_components $pgac_component";;
5165       passes) pgac_components="$pgac_components $pgac_component";;
5166       perfjitevents) pgac_components="$pgac_components $pgac_component";;
5167     esac
5168   done;
5169
5170   # And then get the libraries that need to be linked in for the
5171   # selected components.  They're large libraries, we only want to
5172   # link them into the LLVM using shared library.
5173   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5174     case $pgac_option in
5175       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5176     esac
5177   done
5178
5179   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5180
5181   # Check which functionality is present
5182   SAVE_CPPFLAGS="$CPPFLAGS"
5183   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
5184   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
5185 "
5186 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
5187   ac_have_decl=1
5188 else
5189   ac_have_decl=0
5190 fi
5191
5192 cat >>confdefs.h <<_ACEOF
5193 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
5194 _ACEOF
5195
5196   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
5197 "
5198 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
5199   ac_have_decl=1
5200 else
5201   ac_have_decl=0
5202 fi
5203
5204 cat >>confdefs.h <<_ACEOF
5205 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
5206 _ACEOF
5207 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
5208 "
5209 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
5210   ac_have_decl=1
5211 else
5212   ac_have_decl=0
5213 fi
5214
5215 cat >>confdefs.h <<_ACEOF
5216 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
5217 _ACEOF
5218
5219   ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
5220 "
5221 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
5222   ac_have_decl=1
5223 else
5224   ac_have_decl=0
5225 fi
5226
5227 cat >>confdefs.h <<_ACEOF
5228 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
5229 _ACEOF
5230 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
5231 "
5232 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
5233   ac_have_decl=1
5234 else
5235   ac_have_decl=0
5236 fi
5237
5238 cat >>confdefs.h <<_ACEOF
5239 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
5240 _ACEOF
5241
5242   CPPFLAGS="$SAVE_CPPFLAGS"
5243
5244   # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5245
5246
5247
5248
5249
5250
5251
5252 fi
5253
5254
5255 unset CFLAGS
5256 unset CXXFLAGS
5257
5258 #
5259 # Read the template
5260 #
5261 . "$srcdir/src/template/$template" || exit
5262
5263 # C[XX]FLAGS are selected so:
5264 # If the user specifies something in the environment, that is used.
5265 # else:  If the template file set something, that is used.
5266 # else:  If coverage was enabled, don't set anything.
5267 # else:  If the compiler is GCC, then we use -O2.
5268 # else:  If the compiler is something else, then we use -O, unless debugging.
5269
5270 if test "$ac_env_CFLAGS_set" = set; then
5271   CFLAGS=$ac_env_CFLAGS_value
5272 elif test "${CFLAGS+set}" = set; then
5273   : # (keep what template set)
5274 elif test "$enable_coverage" = yes; then
5275   : # no optimization by default
5276 elif test "$GCC" = yes; then
5277   CFLAGS="-O2"
5278 else
5279   # if the user selected debug mode, don't use -O
5280   if test "$enable_debug" != yes; then
5281     CFLAGS="-O"
5282   fi
5283 fi
5284
5285 if test "$ac_env_CXXFLAGS_set" = set; then
5286   CXXFLAGS=$ac_env_CXXFLAGS_value
5287 elif test "${CXXFLAGS+set}" = set; then
5288   : # (keep what template set)
5289 elif test "$enable_coverage" = yes; then
5290   : # no optimization by default
5291 elif test "$GCC" = yes; then
5292   CXXFLAGS="-O2"
5293 else
5294   # if the user selected debug mode, don't use -O
5295   if test "$enable_debug" != yes; then
5296     CXXFLAGS="-O"
5297   fi
5298 fi
5299
5300 # When generating bitcode (for inlining) we always want to use -O2
5301 # even when --enable-debug is specified. The bitcode it's not going to
5302 # be used for line-by-line debugging, and JIT inlining doesn't work
5303 # without at least -O1 (otherwise clang will emit 'noinline'
5304 # attributes everywhere), which is bad for testing.  Still allow the
5305 # environment to override if done explicitly.
5306 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5307   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5308 else
5309   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5310 fi
5311 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5312   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5313 else
5314   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5315 fi
5316
5317 # C[XX]FLAGS we determined above will be added back at the end
5318 user_CFLAGS=$CFLAGS
5319 CFLAGS=""
5320 user_CXXFLAGS=$CXXFLAGS
5321 CXXFLAGS=""
5322 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5323 BITCODE_CFLAGS=""
5324 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5325 BITCODE_CXXFLAGS=""
5326
5327 # set CFLAGS_VECTOR from the environment, if available
5328 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5329   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5330 fi
5331
5332 # Some versions of GCC support some additional useful warning flags.
5333 # Check whether they are supported, and add them to CFLAGS if so.
5334 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5335 # but has its own.  Also check other compiler-specific flags here.
5336
5337 if test "$GCC" = yes -a "$ICC" = no; then
5338   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5339   CXXFLAGS="-Wall -Wpointer-arith"
5340   # These work in some but not all gcc versions
5341
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5343 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5344 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5345   $as_echo_n "(cached) " >&6
5346 else
5347   pgac_save_CFLAGS=$CFLAGS
5348 pgac_save_CC=$CC
5349 CC=${CC}
5350 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5351 ac_save_c_werror_flag=$ac_c_werror_flag
5352 ac_c_werror_flag=yes
5353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5354 /* end confdefs.h.  */
5355
5356 int
5357 main ()
5358 {
5359
5360   ;
5361   return 0;
5362 }
5363 _ACEOF
5364 if ac_fn_c_try_compile "$LINENO"; then :
5365   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5366 else
5367   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5368 fi
5369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5370 ac_c_werror_flag=$ac_save_c_werror_flag
5371 CFLAGS="$pgac_save_CFLAGS"
5372 CC="$pgac_save_CC"
5373 fi
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5375 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5376 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5377   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5378 fi
5379
5380
5381   # -Wdeclaration-after-statement isn't applicable for C++
5382   # Really don't want VLAs to be used in our dialect of C
5383
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5385 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5386 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5387   $as_echo_n "(cached) " >&6
5388 else
5389   pgac_save_CFLAGS=$CFLAGS
5390 pgac_save_CC=$CC
5391 CC=${CC}
5392 CFLAGS="${CFLAGS} -Werror=vla"
5393 ac_save_c_werror_flag=$ac_c_werror_flag
5394 ac_c_werror_flag=yes
5395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5396 /* end confdefs.h.  */
5397
5398 int
5399 main ()
5400 {
5401
5402   ;
5403   return 0;
5404 }
5405 _ACEOF
5406 if ac_fn_c_try_compile "$LINENO"; then :
5407   pgac_cv_prog_CC_cflags__Werror_vla=yes
5408 else
5409   pgac_cv_prog_CC_cflags__Werror_vla=no
5410 fi
5411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5412 ac_c_werror_flag=$ac_save_c_werror_flag
5413 CFLAGS="$pgac_save_CFLAGS"
5414 CC="$pgac_save_CC"
5415 fi
5416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5417 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5418 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5419   CFLAGS="${CFLAGS} -Werror=vla"
5420 fi
5421
5422
5423   # -Wvla is not applicable for C++
5424
5425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5426 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5427 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5428   $as_echo_n "(cached) " >&6
5429 else
5430   pgac_save_CFLAGS=$CFLAGS
5431 pgac_save_CC=$CC
5432 CC=${CC}
5433 CFLAGS="${CFLAGS} -Wendif-labels"
5434 ac_save_c_werror_flag=$ac_c_werror_flag
5435 ac_c_werror_flag=yes
5436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5437 /* end confdefs.h.  */
5438
5439 int
5440 main ()
5441 {
5442
5443   ;
5444   return 0;
5445 }
5446 _ACEOF
5447 if ac_fn_c_try_compile "$LINENO"; then :
5448   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5449 else
5450   pgac_cv_prog_CC_cflags__Wendif_labels=no
5451 fi
5452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5453 ac_c_werror_flag=$ac_save_c_werror_flag
5454 CFLAGS="$pgac_save_CFLAGS"
5455 CC="$pgac_save_CC"
5456 fi
5457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5458 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5459 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5460   CFLAGS="${CFLAGS} -Wendif-labels"
5461 fi
5462
5463
5464   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5465 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5466 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5467   $as_echo_n "(cached) " >&6
5468 else
5469   pgac_save_CXXFLAGS=$CXXFLAGS
5470 pgac_save_CXX=$CXX
5471 CXX=${CXX}
5472 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5473 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5474 ac_cxx_werror_flag=yes
5475 ac_ext=cpp
5476 ac_cpp='$CXXCPP $CPPFLAGS'
5477 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5478 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5479 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5480
5481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5482 /* end confdefs.h.  */
5483
5484 int
5485 main ()
5486 {
5487
5488   ;
5489   return 0;
5490 }
5491 _ACEOF
5492 if ac_fn_cxx_try_compile "$LINENO"; then :
5493   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5494 else
5495   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5496 fi
5497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5498 ac_ext=c
5499 ac_cpp='$CPP $CPPFLAGS'
5500 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5501 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5502 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5503
5504 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5505 CXXFLAGS="$pgac_save_CXXFLAGS"
5506 CXX="$pgac_save_CXX"
5507 fi
5508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5509 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5510 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5511   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5512 fi
5513
5514
5515
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5517 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5518 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5519   $as_echo_n "(cached) " >&6
5520 else
5521   pgac_save_CFLAGS=$CFLAGS
5522 pgac_save_CC=$CC
5523 CC=${CC}
5524 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5525 ac_save_c_werror_flag=$ac_c_werror_flag
5526 ac_c_werror_flag=yes
5527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5528 /* end confdefs.h.  */
5529
5530 int
5531 main ()
5532 {
5533
5534   ;
5535   return 0;
5536 }
5537 _ACEOF
5538 if ac_fn_c_try_compile "$LINENO"; then :
5539   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5540 else
5541   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5542 fi
5543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5544 ac_c_werror_flag=$ac_save_c_werror_flag
5545 CFLAGS="$pgac_save_CFLAGS"
5546 CC="$pgac_save_CC"
5547 fi
5548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5549 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5550 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5551   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5552 fi
5553
5554
5555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5556 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5557 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5558   $as_echo_n "(cached) " >&6
5559 else
5560   pgac_save_CXXFLAGS=$CXXFLAGS
5561 pgac_save_CXX=$CXX
5562 CXX=${CXX}
5563 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5564 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5565 ac_cxx_werror_flag=yes
5566 ac_ext=cpp
5567 ac_cpp='$CXXCPP $CPPFLAGS'
5568 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5569 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5570 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5571
5572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5573 /* end confdefs.h.  */
5574
5575 int
5576 main ()
5577 {
5578
5579   ;
5580   return 0;
5581 }
5582 _ACEOF
5583 if ac_fn_cxx_try_compile "$LINENO"; then :
5584   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5585 else
5586   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5587 fi
5588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5589 ac_ext=c
5590 ac_cpp='$CPP $CPPFLAGS'
5591 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5592 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5593 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5594
5595 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5596 CXXFLAGS="$pgac_save_CXXFLAGS"
5597 CXX="$pgac_save_CXX"
5598 fi
5599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5600 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5601 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5602   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5603 fi
5604
5605
5606   # This was included in -Wall/-Wformat in older GCC versions
5607
5608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5609 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5610 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5611   $as_echo_n "(cached) " >&6
5612 else
5613   pgac_save_CFLAGS=$CFLAGS
5614 pgac_save_CC=$CC
5615 CC=${CC}
5616 CFLAGS="${CFLAGS} -Wformat-security"
5617 ac_save_c_werror_flag=$ac_c_werror_flag
5618 ac_c_werror_flag=yes
5619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5620 /* end confdefs.h.  */
5621
5622 int
5623 main ()
5624 {
5625
5626   ;
5627   return 0;
5628 }
5629 _ACEOF
5630 if ac_fn_c_try_compile "$LINENO"; then :
5631   pgac_cv_prog_CC_cflags__Wformat_security=yes
5632 else
5633   pgac_cv_prog_CC_cflags__Wformat_security=no
5634 fi
5635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5636 ac_c_werror_flag=$ac_save_c_werror_flag
5637 CFLAGS="$pgac_save_CFLAGS"
5638 CC="$pgac_save_CC"
5639 fi
5640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5641 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5642 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5643   CFLAGS="${CFLAGS} -Wformat-security"
5644 fi
5645
5646
5647   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5648 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5649 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5650   $as_echo_n "(cached) " >&6
5651 else
5652   pgac_save_CXXFLAGS=$CXXFLAGS
5653 pgac_save_CXX=$CXX
5654 CXX=${CXX}
5655 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5656 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5657 ac_cxx_werror_flag=yes
5658 ac_ext=cpp
5659 ac_cpp='$CXXCPP $CPPFLAGS'
5660 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5661 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5662 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5663
5664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5665 /* end confdefs.h.  */
5666
5667 int
5668 main ()
5669 {
5670
5671   ;
5672   return 0;
5673 }
5674 _ACEOF
5675 if ac_fn_cxx_try_compile "$LINENO"; then :
5676   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5677 else
5678   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5679 fi
5680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5681 ac_ext=c
5682 ac_cpp='$CPP $CPPFLAGS'
5683 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5684 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5685 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5686
5687 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5688 CXXFLAGS="$pgac_save_CXXFLAGS"
5689 CXX="$pgac_save_CXX"
5690 fi
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5692 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5693 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5694   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5695 fi
5696
5697
5698   # Disable strict-aliasing rules; needed for gcc 3.3+
5699
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5701 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5702 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5703   $as_echo_n "(cached) " >&6
5704 else
5705   pgac_save_CFLAGS=$CFLAGS
5706 pgac_save_CC=$CC
5707 CC=${CC}
5708 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5709 ac_save_c_werror_flag=$ac_c_werror_flag
5710 ac_c_werror_flag=yes
5711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5712 /* end confdefs.h.  */
5713
5714 int
5715 main ()
5716 {
5717
5718   ;
5719   return 0;
5720 }
5721 _ACEOF
5722 if ac_fn_c_try_compile "$LINENO"; then :
5723   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5724 else
5725   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5726 fi
5727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5728 ac_c_werror_flag=$ac_save_c_werror_flag
5729 CFLAGS="$pgac_save_CFLAGS"
5730 CC="$pgac_save_CC"
5731 fi
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5733 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5734 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5735   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5736 fi
5737
5738
5739   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5740 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5741 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5742   $as_echo_n "(cached) " >&6
5743 else
5744   pgac_save_CXXFLAGS=$CXXFLAGS
5745 pgac_save_CXX=$CXX
5746 CXX=${CXX}
5747 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5748 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5749 ac_cxx_werror_flag=yes
5750 ac_ext=cpp
5751 ac_cpp='$CXXCPP $CPPFLAGS'
5752 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5753 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5754 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5755
5756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5757 /* end confdefs.h.  */
5758
5759 int
5760 main ()
5761 {
5762
5763   ;
5764   return 0;
5765 }
5766 _ACEOF
5767 if ac_fn_cxx_try_compile "$LINENO"; then :
5768   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5769 else
5770   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5771 fi
5772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5773 ac_ext=c
5774 ac_cpp='$CPP $CPPFLAGS'
5775 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5776 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5777 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5778
5779 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5780 CXXFLAGS="$pgac_save_CXXFLAGS"
5781 CXX="$pgac_save_CXX"
5782 fi
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5784 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5785 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5786   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5787 fi
5788
5789
5790   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5791
5792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5793 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5794 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5795   $as_echo_n "(cached) " >&6
5796 else
5797   pgac_save_CFLAGS=$CFLAGS
5798 pgac_save_CC=$CC
5799 CC=${CC}
5800 CFLAGS="${CFLAGS} -fwrapv"
5801 ac_save_c_werror_flag=$ac_c_werror_flag
5802 ac_c_werror_flag=yes
5803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5804 /* end confdefs.h.  */
5805
5806 int
5807 main ()
5808 {
5809
5810   ;
5811   return 0;
5812 }
5813 _ACEOF
5814 if ac_fn_c_try_compile "$LINENO"; then :
5815   pgac_cv_prog_CC_cflags__fwrapv=yes
5816 else
5817   pgac_cv_prog_CC_cflags__fwrapv=no
5818 fi
5819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5820 ac_c_werror_flag=$ac_save_c_werror_flag
5821 CFLAGS="$pgac_save_CFLAGS"
5822 CC="$pgac_save_CC"
5823 fi
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5825 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5826 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5827   CFLAGS="${CFLAGS} -fwrapv"
5828 fi
5829
5830
5831   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5832 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5833 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5834   $as_echo_n "(cached) " >&6
5835 else
5836   pgac_save_CXXFLAGS=$CXXFLAGS
5837 pgac_save_CXX=$CXX
5838 CXX=${CXX}
5839 CXXFLAGS="${CXXFLAGS} -fwrapv"
5840 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5841 ac_cxx_werror_flag=yes
5842 ac_ext=cpp
5843 ac_cpp='$CXXCPP $CPPFLAGS'
5844 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5845 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5846 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5847
5848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5849 /* end confdefs.h.  */
5850
5851 int
5852 main ()
5853 {
5854
5855   ;
5856   return 0;
5857 }
5858 _ACEOF
5859 if ac_fn_cxx_try_compile "$LINENO"; then :
5860   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5861 else
5862   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5863 fi
5864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5865 ac_ext=c
5866 ac_cpp='$CPP $CPPFLAGS'
5867 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5868 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5870
5871 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5872 CXXFLAGS="$pgac_save_CXXFLAGS"
5873 CXX="$pgac_save_CXX"
5874 fi
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5876 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5877 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5878   CXXFLAGS="${CXXFLAGS} -fwrapv"
5879 fi
5880
5881
5882   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5883
5884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5885 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5886 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5887   $as_echo_n "(cached) " >&6
5888 else
5889   pgac_save_CFLAGS=$CFLAGS
5890 pgac_save_CC=$CC
5891 CC=${CC}
5892 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5893 ac_save_c_werror_flag=$ac_c_werror_flag
5894 ac_c_werror_flag=yes
5895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5896 /* end confdefs.h.  */
5897
5898 int
5899 main ()
5900 {
5901
5902   ;
5903   return 0;
5904 }
5905 _ACEOF
5906 if ac_fn_c_try_compile "$LINENO"; then :
5907   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5908 else
5909   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5910 fi
5911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5912 ac_c_werror_flag=$ac_save_c_werror_flag
5913 CFLAGS="$pgac_save_CFLAGS"
5914 CC="$pgac_save_CC"
5915 fi
5916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5917 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5918 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5919   CFLAGS="${CFLAGS} -fexcess-precision=standard"
5920 fi
5921
5922
5923   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5924 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5925 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5926   $as_echo_n "(cached) " >&6
5927 else
5928   pgac_save_CXXFLAGS=$CXXFLAGS
5929 pgac_save_CXX=$CXX
5930 CXX=${CXX}
5931 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5932 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5933 ac_cxx_werror_flag=yes
5934 ac_ext=cpp
5935 ac_cpp='$CXXCPP $CPPFLAGS'
5936 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5937 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5938 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5939
5940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5941 /* end confdefs.h.  */
5942
5943 int
5944 main ()
5945 {
5946
5947   ;
5948   return 0;
5949 }
5950 _ACEOF
5951 if ac_fn_cxx_try_compile "$LINENO"; then :
5952   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5953 else
5954   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5955 fi
5956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5957 ac_ext=c
5958 ac_cpp='$CPP $CPPFLAGS'
5959 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5960 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5961 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5962
5963 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5964 CXXFLAGS="$pgac_save_CXXFLAGS"
5965 CXX="$pgac_save_CXX"
5966 fi
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5968 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5969 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5970   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5971 fi
5972
5973
5974   # Optimization flags for specific files that benefit from vectorization
5975   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5976 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5977 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5978   $as_echo_n "(cached) " >&6
5979 else
5980   pgac_save_CFLAGS=$CFLAGS
5981 pgac_save_CC=$CC
5982 CC=${CC}
5983 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5984 ac_save_c_werror_flag=$ac_c_werror_flag
5985 ac_c_werror_flag=yes
5986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5987 /* end confdefs.h.  */
5988
5989 int
5990 main ()
5991 {
5992
5993   ;
5994   return 0;
5995 }
5996 _ACEOF
5997 if ac_fn_c_try_compile "$LINENO"; then :
5998   pgac_cv_prog_CC_cflags__funroll_loops=yes
5999 else
6000   pgac_cv_prog_CC_cflags__funroll_loops=no
6001 fi
6002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6003 ac_c_werror_flag=$ac_save_c_werror_flag
6004 CFLAGS="$pgac_save_CFLAGS"
6005 CC="$pgac_save_CC"
6006 fi
6007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6008 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6009 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6010   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
6011 fi
6012
6013
6014   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
6015 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
6016 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6017   $as_echo_n "(cached) " >&6
6018 else
6019   pgac_save_CFLAGS=$CFLAGS
6020 pgac_save_CC=$CC
6021 CC=${CC}
6022 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
6023 ac_save_c_werror_flag=$ac_c_werror_flag
6024 ac_c_werror_flag=yes
6025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6026 /* end confdefs.h.  */
6027
6028 int
6029 main ()
6030 {
6031
6032   ;
6033   return 0;
6034 }
6035 _ACEOF
6036 if ac_fn_c_try_compile "$LINENO"; then :
6037   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6038 else
6039   pgac_cv_prog_CC_cflags__ftree_vectorize=no
6040 fi
6041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6042 ac_c_werror_flag=$ac_save_c_werror_flag
6043 CFLAGS="$pgac_save_CFLAGS"
6044 CC="$pgac_save_CC"
6045 fi
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6047 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6048 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6049   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
6050 fi
6051
6052
6053   # We want to suppress clang's unhelpful unused-command-line-argument warnings
6054   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
6055   # test for the positive form and if that works, add the negative form
6056   NOT_THE_CFLAGS=""
6057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6058 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6059 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6060   $as_echo_n "(cached) " >&6
6061 else
6062   pgac_save_CFLAGS=$CFLAGS
6063 pgac_save_CC=$CC
6064 CC=${CC}
6065 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6066 ac_save_c_werror_flag=$ac_c_werror_flag
6067 ac_c_werror_flag=yes
6068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6069 /* end confdefs.h.  */
6070
6071 int
6072 main ()
6073 {
6074
6075   ;
6076   return 0;
6077 }
6078 _ACEOF
6079 if ac_fn_c_try_compile "$LINENO"; then :
6080   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6081 else
6082   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6083 fi
6084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6085 ac_c_werror_flag=$ac_save_c_werror_flag
6086 CFLAGS="$pgac_save_CFLAGS"
6087 CC="$pgac_save_CC"
6088 fi
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6090 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6091 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6092   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6093 fi
6094
6095
6096   if test -n "$NOT_THE_CFLAGS"; then
6097     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6098   fi
6099   # Similarly disable useless truncation warnings from gcc 8+
6100   NOT_THE_CFLAGS=""
6101   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6102 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6103 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6104   $as_echo_n "(cached) " >&6
6105 else
6106   pgac_save_CFLAGS=$CFLAGS
6107 pgac_save_CC=$CC
6108 CC=${CC}
6109 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6110 ac_save_c_werror_flag=$ac_c_werror_flag
6111 ac_c_werror_flag=yes
6112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6113 /* end confdefs.h.  */
6114
6115 int
6116 main ()
6117 {
6118
6119   ;
6120   return 0;
6121 }
6122 _ACEOF
6123 if ac_fn_c_try_compile "$LINENO"; then :
6124   pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6125 else
6126   pgac_cv_prog_CC_cflags__Wformat_truncation=no
6127 fi
6128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6129 ac_c_werror_flag=$ac_save_c_werror_flag
6130 CFLAGS="$pgac_save_CFLAGS"
6131 CC="$pgac_save_CC"
6132 fi
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6134 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6135 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6136   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6137 fi
6138
6139
6140   if test -n "$NOT_THE_CFLAGS"; then
6141     CFLAGS="$CFLAGS -Wno-format-truncation"
6142   fi
6143   NOT_THE_CFLAGS=""
6144   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6145 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6146 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6147   $as_echo_n "(cached) " >&6
6148 else
6149   pgac_save_CFLAGS=$CFLAGS
6150 pgac_save_CC=$CC
6151 CC=${CC}
6152 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6153 ac_save_c_werror_flag=$ac_c_werror_flag
6154 ac_c_werror_flag=yes
6155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6156 /* end confdefs.h.  */
6157
6158 int
6159 main ()
6160 {
6161
6162   ;
6163   return 0;
6164 }
6165 _ACEOF
6166 if ac_fn_c_try_compile "$LINENO"; then :
6167   pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6168 else
6169   pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6170 fi
6171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6172 ac_c_werror_flag=$ac_save_c_werror_flag
6173 CFLAGS="$pgac_save_CFLAGS"
6174 CC="$pgac_save_CC"
6175 fi
6176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6177 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6178 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6179   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6180 fi
6181
6182
6183   if test -n "$NOT_THE_CFLAGS"; then
6184     CFLAGS="$CFLAGS -Wno-stringop-truncation"
6185   fi
6186 elif test "$ICC" = yes; then
6187   # Intel's compiler has a bug/misoptimization in checking for
6188   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6189
6190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6191 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6192 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6193   $as_echo_n "(cached) " >&6
6194 else
6195   pgac_save_CFLAGS=$CFLAGS
6196 pgac_save_CC=$CC
6197 CC=${CC}
6198 CFLAGS="${CFLAGS} -mp1"
6199 ac_save_c_werror_flag=$ac_c_werror_flag
6200 ac_c_werror_flag=yes
6201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6202 /* end confdefs.h.  */
6203
6204 int
6205 main ()
6206 {
6207
6208   ;
6209   return 0;
6210 }
6211 _ACEOF
6212 if ac_fn_c_try_compile "$LINENO"; then :
6213   pgac_cv_prog_CC_cflags__mp1=yes
6214 else
6215   pgac_cv_prog_CC_cflags__mp1=no
6216 fi
6217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6218 ac_c_werror_flag=$ac_save_c_werror_flag
6219 CFLAGS="$pgac_save_CFLAGS"
6220 CC="$pgac_save_CC"
6221 fi
6222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6223 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6224 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6225   CFLAGS="${CFLAGS} -mp1"
6226 fi
6227
6228
6229   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6230 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6231 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6232   $as_echo_n "(cached) " >&6
6233 else
6234   pgac_save_CXXFLAGS=$CXXFLAGS
6235 pgac_save_CXX=$CXX
6236 CXX=${CXX}
6237 CXXFLAGS="${CXXFLAGS} -mp1"
6238 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6239 ac_cxx_werror_flag=yes
6240 ac_ext=cpp
6241 ac_cpp='$CXXCPP $CPPFLAGS'
6242 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6243 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6244 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6245
6246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6247 /* end confdefs.h.  */
6248
6249 int
6250 main ()
6251 {
6252
6253   ;
6254   return 0;
6255 }
6256 _ACEOF
6257 if ac_fn_cxx_try_compile "$LINENO"; then :
6258   pgac_cv_prog_CXX_cxxflags__mp1=yes
6259 else
6260   pgac_cv_prog_CXX_cxxflags__mp1=no
6261 fi
6262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6263 ac_ext=c
6264 ac_cpp='$CPP $CPPFLAGS'
6265 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6266 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6267 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6268
6269 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6270 CXXFLAGS="$pgac_save_CXXFLAGS"
6271 CXX="$pgac_save_CXX"
6272 fi
6273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6274 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6275 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6276   CXXFLAGS="${CXXFLAGS} -mp1"
6277 fi
6278
6279
6280   # Make sure strict aliasing is off (though this is said to be the default)
6281
6282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6283 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6284 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6285   $as_echo_n "(cached) " >&6
6286 else
6287   pgac_save_CFLAGS=$CFLAGS
6288 pgac_save_CC=$CC
6289 CC=${CC}
6290 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6291 ac_save_c_werror_flag=$ac_c_werror_flag
6292 ac_c_werror_flag=yes
6293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6294 /* end confdefs.h.  */
6295
6296 int
6297 main ()
6298 {
6299
6300   ;
6301   return 0;
6302 }
6303 _ACEOF
6304 if ac_fn_c_try_compile "$LINENO"; then :
6305   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6306 else
6307   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6308 fi
6309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6310 ac_c_werror_flag=$ac_save_c_werror_flag
6311 CFLAGS="$pgac_save_CFLAGS"
6312 CC="$pgac_save_CC"
6313 fi
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6315 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6316 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6317   CFLAGS="${CFLAGS} -fno-strict-aliasing"
6318 fi
6319
6320
6321   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6322 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6323 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6324   $as_echo_n "(cached) " >&6
6325 else
6326   pgac_save_CXXFLAGS=$CXXFLAGS
6327 pgac_save_CXX=$CXX
6328 CXX=${CXX}
6329 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6330 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6331 ac_cxx_werror_flag=yes
6332 ac_ext=cpp
6333 ac_cpp='$CXXCPP $CPPFLAGS'
6334 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6335 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6336 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6337
6338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6339 /* end confdefs.h.  */
6340
6341 int
6342 main ()
6343 {
6344
6345   ;
6346   return 0;
6347 }
6348 _ACEOF
6349 if ac_fn_cxx_try_compile "$LINENO"; then :
6350   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6351 else
6352   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6353 fi
6354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6355 ac_ext=c
6356 ac_cpp='$CPP $CPPFLAGS'
6357 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6358 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6359 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6360
6361 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6362 CXXFLAGS="$pgac_save_CXXFLAGS"
6363 CXX="$pgac_save_CXX"
6364 fi
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6366 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6367 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6368   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6369 fi
6370
6371
6372 elif test "$PORTNAME" = "aix"; then
6373   # AIX's xlc has to have strict aliasing turned off too
6374
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6376 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6377 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6378   $as_echo_n "(cached) " >&6
6379 else
6380   pgac_save_CFLAGS=$CFLAGS
6381 pgac_save_CC=$CC
6382 CC=${CC}
6383 CFLAGS="${CFLAGS} -qnoansialias"
6384 ac_save_c_werror_flag=$ac_c_werror_flag
6385 ac_c_werror_flag=yes
6386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6387 /* end confdefs.h.  */
6388
6389 int
6390 main ()
6391 {
6392
6393   ;
6394   return 0;
6395 }
6396 _ACEOF
6397 if ac_fn_c_try_compile "$LINENO"; then :
6398   pgac_cv_prog_CC_cflags__qnoansialias=yes
6399 else
6400   pgac_cv_prog_CC_cflags__qnoansialias=no
6401 fi
6402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6403 ac_c_werror_flag=$ac_save_c_werror_flag
6404 CFLAGS="$pgac_save_CFLAGS"
6405 CC="$pgac_save_CC"
6406 fi
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6408 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6409 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6410   CFLAGS="${CFLAGS} -qnoansialias"
6411 fi
6412
6413
6414   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6415 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6416 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6417   $as_echo_n "(cached) " >&6
6418 else
6419   pgac_save_CXXFLAGS=$CXXFLAGS
6420 pgac_save_CXX=$CXX
6421 CXX=${CXX}
6422 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6423 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6424 ac_cxx_werror_flag=yes
6425 ac_ext=cpp
6426 ac_cpp='$CXXCPP $CPPFLAGS'
6427 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6428 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6429 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6430
6431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6432 /* end confdefs.h.  */
6433
6434 int
6435 main ()
6436 {
6437
6438   ;
6439   return 0;
6440 }
6441 _ACEOF
6442 if ac_fn_cxx_try_compile "$LINENO"; then :
6443   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6444 else
6445   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6446 fi
6447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6448 ac_ext=c
6449 ac_cpp='$CPP $CPPFLAGS'
6450 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6451 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6452 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6453
6454 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6455 CXXFLAGS="$pgac_save_CXXFLAGS"
6456 CXX="$pgac_save_CXX"
6457 fi
6458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6459 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6460 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6461   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6462 fi
6463
6464
6465
6466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6467 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6468 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6469   $as_echo_n "(cached) " >&6
6470 else
6471   pgac_save_CFLAGS=$CFLAGS
6472 pgac_save_CC=$CC
6473 CC=${CC}
6474 CFLAGS="${CFLAGS} -qlonglong"
6475 ac_save_c_werror_flag=$ac_c_werror_flag
6476 ac_c_werror_flag=yes
6477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6478 /* end confdefs.h.  */
6479
6480 int
6481 main ()
6482 {
6483
6484   ;
6485   return 0;
6486 }
6487 _ACEOF
6488 if ac_fn_c_try_compile "$LINENO"; then :
6489   pgac_cv_prog_CC_cflags__qlonglong=yes
6490 else
6491   pgac_cv_prog_CC_cflags__qlonglong=no
6492 fi
6493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6494 ac_c_werror_flag=$ac_save_c_werror_flag
6495 CFLAGS="$pgac_save_CFLAGS"
6496 CC="$pgac_save_CC"
6497 fi
6498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6499 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6500 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6501   CFLAGS="${CFLAGS} -qlonglong"
6502 fi
6503
6504
6505   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6506 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6507 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6508   $as_echo_n "(cached) " >&6
6509 else
6510   pgac_save_CXXFLAGS=$CXXFLAGS
6511 pgac_save_CXX=$CXX
6512 CXX=${CXX}
6513 CXXFLAGS="${CXXFLAGS} -qlonglong"
6514 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6515 ac_cxx_werror_flag=yes
6516 ac_ext=cpp
6517 ac_cpp='$CXXCPP $CPPFLAGS'
6518 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6519 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6520 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6521
6522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6523 /* end confdefs.h.  */
6524
6525 int
6526 main ()
6527 {
6528
6529   ;
6530   return 0;
6531 }
6532 _ACEOF
6533 if ac_fn_cxx_try_compile "$LINENO"; then :
6534   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6535 else
6536   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6537 fi
6538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6539 ac_ext=c
6540 ac_cpp='$CPP $CPPFLAGS'
6541 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6542 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6543 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6544
6545 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6546 CXXFLAGS="$pgac_save_CXXFLAGS"
6547 CXX="$pgac_save_CXX"
6548 fi
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6550 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6551 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6552   CXXFLAGS="${CXXFLAGS} -qlonglong"
6553 fi
6554
6555
6556 elif test "$PORTNAME" = "hpux"; then
6557   # On some versions of HP-UX, libm functions do not set errno by default.
6558   # Fix that by using +Olibmerrno if the compiler recognizes it.
6559
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6561 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6562 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6563   $as_echo_n "(cached) " >&6
6564 else
6565   pgac_save_CFLAGS=$CFLAGS
6566 pgac_save_CC=$CC
6567 CC=${CC}
6568 CFLAGS="${CFLAGS} +Olibmerrno"
6569 ac_save_c_werror_flag=$ac_c_werror_flag
6570 ac_c_werror_flag=yes
6571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6572 /* end confdefs.h.  */
6573
6574 int
6575 main ()
6576 {
6577
6578   ;
6579   return 0;
6580 }
6581 _ACEOF
6582 if ac_fn_c_try_compile "$LINENO"; then :
6583   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6584 else
6585   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6586 fi
6587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6588 ac_c_werror_flag=$ac_save_c_werror_flag
6589 CFLAGS="$pgac_save_CFLAGS"
6590 CC="$pgac_save_CC"
6591 fi
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6593 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6594 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6595   CFLAGS="${CFLAGS} +Olibmerrno"
6596 fi
6597
6598
6599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6600 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6601 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6602   $as_echo_n "(cached) " >&6
6603 else
6604   pgac_save_CXXFLAGS=$CXXFLAGS
6605 pgac_save_CXX=$CXX
6606 CXX=${CXX}
6607 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6608 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6609 ac_cxx_werror_flag=yes
6610 ac_ext=cpp
6611 ac_cpp='$CXXCPP $CPPFLAGS'
6612 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6613 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6614 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6615
6616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6617 /* end confdefs.h.  */
6618
6619 int
6620 main ()
6621 {
6622
6623   ;
6624   return 0;
6625 }
6626 _ACEOF
6627 if ac_fn_cxx_try_compile "$LINENO"; then :
6628   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6629 else
6630   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6631 fi
6632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6633 ac_ext=c
6634 ac_cpp='$CPP $CPPFLAGS'
6635 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6636 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6637 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6638
6639 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6640 CXXFLAGS="$pgac_save_CXXFLAGS"
6641 CXX="$pgac_save_CXX"
6642 fi
6643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6644 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6645 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6646   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6647 fi
6648
6649
6650 fi
6651
6652 CFLAGS_VECTOR=$CFLAGS_VECTOR
6653
6654
6655 # Determine flags used to emit bitcode for JIT inlining. Need to test
6656 # for behaviour changing compiler flags, to keep compatibility with
6657 # compiler used for normal postgres code.
6658 if test "$with_llvm" = yes ; then
6659   CLANGXX="$CLANG -xc++"
6660
6661   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6662 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6663 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6664   $as_echo_n "(cached) " >&6
6665 else
6666   pgac_save_CFLAGS=$CFLAGS
6667 pgac_save_CC=$CC
6668 CC=${CLANG}
6669 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6670 ac_save_c_werror_flag=$ac_c_werror_flag
6671 ac_c_werror_flag=yes
6672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6673 /* end confdefs.h.  */
6674
6675 int
6676 main ()
6677 {
6678
6679   ;
6680   return 0;
6681 }
6682 _ACEOF
6683 if ac_fn_c_try_compile "$LINENO"; then :
6684   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6685 else
6686   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6687 fi
6688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6689 ac_c_werror_flag=$ac_save_c_werror_flag
6690 CFLAGS="$pgac_save_CFLAGS"
6691 CC="$pgac_save_CC"
6692 fi
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6694 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6695 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6696   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6697 fi
6698
6699   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6700 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6701 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6702   $as_echo_n "(cached) " >&6
6703 else
6704   pgac_save_CXXFLAGS=$CXXFLAGS
6705 pgac_save_CXX=$CXX
6706 CXX=${CLANGXX}
6707 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6708 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6709 ac_cxx_werror_flag=yes
6710 ac_ext=cpp
6711 ac_cpp='$CXXCPP $CPPFLAGS'
6712 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6713 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6714 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6715
6716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6717 /* end confdefs.h.  */
6718
6719 int
6720 main ()
6721 {
6722
6723   ;
6724   return 0;
6725 }
6726 _ACEOF
6727 if ac_fn_cxx_try_compile "$LINENO"; then :
6728   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6729 else
6730   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6731 fi
6732 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6733 ac_ext=c
6734 ac_cpp='$CPP $CPPFLAGS'
6735 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6736 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6737 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6738
6739 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6740 CXXFLAGS="$pgac_save_CXXFLAGS"
6741 CXX="$pgac_save_CXX"
6742 fi
6743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6744 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6745 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6746   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6747 fi
6748
6749   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6750 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6751 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6752   $as_echo_n "(cached) " >&6
6753 else
6754   pgac_save_CFLAGS=$CFLAGS
6755 pgac_save_CC=$CC
6756 CC=${CLANG}
6757 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6758 ac_save_c_werror_flag=$ac_c_werror_flag
6759 ac_c_werror_flag=yes
6760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6761 /* end confdefs.h.  */
6762
6763 int
6764 main ()
6765 {
6766
6767   ;
6768   return 0;
6769 }
6770 _ACEOF
6771 if ac_fn_c_try_compile "$LINENO"; then :
6772   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6773 else
6774   pgac_cv_prog_CLANG_cflags__fwrapv=no
6775 fi
6776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6777 ac_c_werror_flag=$ac_save_c_werror_flag
6778 CFLAGS="$pgac_save_CFLAGS"
6779 CC="$pgac_save_CC"
6780 fi
6781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6782 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6783 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6784   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6785 fi
6786
6787   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6788 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6789 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6790   $as_echo_n "(cached) " >&6
6791 else
6792   pgac_save_CXXFLAGS=$CXXFLAGS
6793 pgac_save_CXX=$CXX
6794 CXX=${CLANGXX}
6795 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6796 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6797 ac_cxx_werror_flag=yes
6798 ac_ext=cpp
6799 ac_cpp='$CXXCPP $CPPFLAGS'
6800 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6801 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6802 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6803
6804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6805 /* end confdefs.h.  */
6806
6807 int
6808 main ()
6809 {
6810
6811   ;
6812   return 0;
6813 }
6814 _ACEOF
6815 if ac_fn_cxx_try_compile "$LINENO"; then :
6816   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6817 else
6818   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6819 fi
6820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6821 ac_ext=c
6822 ac_cpp='$CPP $CPPFLAGS'
6823 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6824 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6825 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6826
6827 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6828 CXXFLAGS="$pgac_save_CXXFLAGS"
6829 CXX="$pgac_save_CXX"
6830 fi
6831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6832 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6833 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6834   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6835 fi
6836
6837   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6838 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6839 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6840   $as_echo_n "(cached) " >&6
6841 else
6842   pgac_save_CFLAGS=$CFLAGS
6843 pgac_save_CC=$CC
6844 CC=${CLANG}
6845 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6846 ac_save_c_werror_flag=$ac_c_werror_flag
6847 ac_c_werror_flag=yes
6848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6849 /* end confdefs.h.  */
6850
6851 int
6852 main ()
6853 {
6854
6855   ;
6856   return 0;
6857 }
6858 _ACEOF
6859 if ac_fn_c_try_compile "$LINENO"; then :
6860   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6861 else
6862   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6863 fi
6864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6865 ac_c_werror_flag=$ac_save_c_werror_flag
6866 CFLAGS="$pgac_save_CFLAGS"
6867 CC="$pgac_save_CC"
6868 fi
6869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6870 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6871 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6872   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6873 fi
6874
6875   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6876 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6877 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6878   $as_echo_n "(cached) " >&6
6879 else
6880   pgac_save_CXXFLAGS=$CXXFLAGS
6881 pgac_save_CXX=$CXX
6882 CXX=${CLANGXX}
6883 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6884 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6885 ac_cxx_werror_flag=yes
6886 ac_ext=cpp
6887 ac_cpp='$CXXCPP $CPPFLAGS'
6888 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6889 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6890 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6891
6892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6893 /* end confdefs.h.  */
6894
6895 int
6896 main ()
6897 {
6898
6899   ;
6900   return 0;
6901 }
6902 _ACEOF
6903 if ac_fn_cxx_try_compile "$LINENO"; then :
6904   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6905 else
6906   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6907 fi
6908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6909 ac_ext=c
6910 ac_cpp='$CPP $CPPFLAGS'
6911 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6912 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6913 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6914
6915 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6916 CXXFLAGS="$pgac_save_CXXFLAGS"
6917 CXX="$pgac_save_CXX"
6918 fi
6919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6920 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6921 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6922   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6923 fi
6924
6925 fi
6926
6927 # supply -g if --enable-debug
6928 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6929   CFLAGS="$CFLAGS -g"
6930 fi
6931
6932 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6933   CXXFLAGS="$CXXFLAGS -g"
6934 fi
6935
6936 # enable code coverage if --enable-coverage
6937 if test "$enable_coverage" = yes; then
6938   if test "$GCC" = yes; then
6939     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6940     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6941   else
6942     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6943   fi
6944 fi
6945
6946 # enable profiling if --enable-profiling
6947 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6948   if test "$GCC" = yes; then
6949
6950 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6951
6952     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6953     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6954   else
6955     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6956   fi
6957 fi
6958
6959 # We already have this in Makefile.win32, but configure needs it too
6960 if test "$PORTNAME" = "win32"; then
6961   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6962 fi
6963
6964 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6965 # user-specified flags (if any) at the end.  This lets users override
6966 # the automatic additions.
6967 CFLAGS="$CFLAGS $user_CFLAGS"
6968 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6969 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6970 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6971
6972 BITCODE_CFLAGS=$BITCODE_CFLAGS
6973
6974 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6975
6976
6977 # Check if the compiler still works with the final flag settings
6978 # (note, we're not checking that for CXX, which is optional)
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6980 $as_echo_n "checking whether the C compiler still works... " >&6; }
6981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6982 /* end confdefs.h.  */
6983
6984 int
6985 main ()
6986 {
6987 return 0;
6988   ;
6989   return 0;
6990 }
6991 _ACEOF
6992 if ac_fn_c_try_link "$LINENO"; then :
6993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6994 $as_echo "yes" >&6; }
6995 else
6996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6997 $as_echo "no" >&6; }
6998    as_fn_error $? "cannot proceed" "$LINENO" 5
6999 fi
7000 rm -f core conftest.err conftest.$ac_objext \
7001     conftest$ac_exeext conftest.$ac_ext
7002
7003 # Defend against gcc -ffast-math
7004 if test "$GCC" = yes; then
7005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7006 /* end confdefs.h.  */
7007
7008 int
7009 main ()
7010 {
7011 #ifdef __FAST_MATH__
7012 choke me
7013 #endif
7014   ;
7015   return 0;
7016 }
7017 _ACEOF
7018 if ac_fn_c_try_compile "$LINENO"; then :
7019
7020 else
7021   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7022 fi
7023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7024 fi
7025
7026 ac_ext=c
7027 ac_cpp='$CPP $CPPFLAGS'
7028 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7029 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7030 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7032 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7033 # On Suns, sometimes $CPP names a directory.
7034 if test -n "$CPP" && test -d "$CPP"; then
7035   CPP=
7036 fi
7037 if test -z "$CPP"; then
7038   if ${ac_cv_prog_CPP+:} false; then :
7039   $as_echo_n "(cached) " >&6
7040 else
7041       # Double quotes because CPP needs to be expanded
7042     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7043     do
7044       ac_preproc_ok=false
7045 for ac_c_preproc_warn_flag in '' yes
7046 do
7047   # Use a header file that comes with gcc, so configuring glibc
7048   # with a fresh cross-compiler works.
7049   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7050   # <limits.h> exists even on freestanding compilers.
7051   # On the NeXT, cc -E runs the code through the compiler's parser,
7052   # not just through cpp. "Syntax error" is here to catch this case.
7053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7054 /* end confdefs.h.  */
7055 #ifdef __STDC__
7056 # include <limits.h>
7057 #else
7058 # include <assert.h>
7059 #endif
7060                      Syntax error
7061 _ACEOF
7062 if ac_fn_c_try_cpp "$LINENO"; then :
7063
7064 else
7065   # Broken: fails on valid input.
7066 continue
7067 fi
7068 rm -f conftest.err conftest.i conftest.$ac_ext
7069
7070   # OK, works on sane cases.  Now check whether nonexistent headers
7071   # can be detected and how.
7072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7073 /* end confdefs.h.  */
7074 #include <ac_nonexistent.h>
7075 _ACEOF
7076 if ac_fn_c_try_cpp "$LINENO"; then :
7077   # Broken: success on invalid input.
7078 continue
7079 else
7080   # Passes both tests.
7081 ac_preproc_ok=:
7082 break
7083 fi
7084 rm -f conftest.err conftest.i conftest.$ac_ext
7085
7086 done
7087 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7088 rm -f conftest.i conftest.err conftest.$ac_ext
7089 if $ac_preproc_ok; then :
7090   break
7091 fi
7092
7093     done
7094     ac_cv_prog_CPP=$CPP
7095
7096 fi
7097   CPP=$ac_cv_prog_CPP
7098 else
7099   ac_cv_prog_CPP=$CPP
7100 fi
7101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7102 $as_echo "$CPP" >&6; }
7103 ac_preproc_ok=false
7104 for ac_c_preproc_warn_flag in '' yes
7105 do
7106   # Use a header file that comes with gcc, so configuring glibc
7107   # with a fresh cross-compiler works.
7108   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7109   # <limits.h> exists even on freestanding compilers.
7110   # On the NeXT, cc -E runs the code through the compiler's parser,
7111   # not just through cpp. "Syntax error" is here to catch this case.
7112   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7113 /* end confdefs.h.  */
7114 #ifdef __STDC__
7115 # include <limits.h>
7116 #else
7117 # include <assert.h>
7118 #endif
7119                      Syntax error
7120 _ACEOF
7121 if ac_fn_c_try_cpp "$LINENO"; then :
7122
7123 else
7124   # Broken: fails on valid input.
7125 continue
7126 fi
7127 rm -f conftest.err conftest.i conftest.$ac_ext
7128
7129   # OK, works on sane cases.  Now check whether nonexistent headers
7130   # can be detected and how.
7131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7132 /* end confdefs.h.  */
7133 #include <ac_nonexistent.h>
7134 _ACEOF
7135 if ac_fn_c_try_cpp "$LINENO"; then :
7136   # Broken: success on invalid input.
7137 continue
7138 else
7139   # Passes both tests.
7140 ac_preproc_ok=:
7141 break
7142 fi
7143 rm -f conftest.err conftest.i conftest.$ac_ext
7144
7145 done
7146 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7147 rm -f conftest.i conftest.err conftest.$ac_ext
7148 if $ac_preproc_ok; then :
7149
7150 else
7151   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7152 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7153 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7154 See \`config.log' for more details" "$LINENO" 5; }
7155 fi
7156
7157 ac_ext=c
7158 ac_cpp='$CPP $CPPFLAGS'
7159 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7160 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7161 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7162
7163
7164
7165
7166 #
7167 # Set up TAS assembly code if needed; the template file has now had its
7168 # chance to request this.
7169 #
7170 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7171
7172
7173 if test "$need_tas" = yes ; then
7174   TAS=tas.o
7175 else
7176   TAS=""
7177 fi
7178
7179
7180
7181 #
7182 # Automatic dependency tracking
7183 #
7184
7185
7186 # Check whether --enable-depend was given.
7187 if test "${enable_depend+set}" = set; then :
7188   enableval=$enable_depend;
7189   case $enableval in
7190     yes)
7191       autodepend=yes
7192       ;;
7193     no)
7194       :
7195       ;;
7196     *)
7197       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7198       ;;
7199   esac
7200
7201 else
7202   enable_depend=no
7203
7204 fi
7205
7206
7207
7208
7209
7210 #
7211 # Enable assert checks
7212 #
7213
7214
7215 # Check whether --enable-cassert was given.
7216 if test "${enable_cassert+set}" = set; then :
7217   enableval=$enable_cassert;
7218   case $enableval in
7219     yes)
7220
7221 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7222
7223       ;;
7224     no)
7225       :
7226       ;;
7227     *)
7228       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7229       ;;
7230   esac
7231
7232 else
7233   enable_cassert=no
7234
7235 fi
7236
7237
7238
7239
7240 #
7241 # Include directories
7242 #
7243 ac_save_IFS=$IFS
7244 IFS="${IFS}${PATH_SEPARATOR}"
7245 # SRCH_INC comes from the template file
7246 for dir in $with_includes $SRCH_INC; do
7247   if test -d "$dir"; then
7248     INCLUDES="$INCLUDES -I$dir"
7249   else
7250     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7251 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7252   fi
7253 done
7254 IFS=$ac_save_IFS
7255
7256
7257
7258 #
7259 # Library directories
7260 #
7261 ac_save_IFS=$IFS
7262 IFS="${IFS}${PATH_SEPARATOR}"
7263 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7264 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7265   if test -d "$dir"; then
7266     LIBDIRS="$LIBDIRS -L$dir"
7267   else
7268     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7269 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7270   fi
7271 done
7272 IFS=$ac_save_IFS
7273
7274 #
7275 # Enable thread-safe client libraries
7276 #
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7278 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7279
7280
7281 # Check whether --enable-thread-safety was given.
7282 if test "${enable_thread_safety+set}" = set; then :
7283   enableval=$enable_thread_safety;
7284   case $enableval in
7285     yes)
7286       :
7287       ;;
7288     no)
7289       :
7290       ;;
7291     *)
7292       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7293       ;;
7294   esac
7295
7296 else
7297   enable_thread_safety=yes
7298
7299 fi
7300
7301
7302 if test "$enable_thread_safety" = yes; then
7303
7304 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7305
7306 fi
7307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7308 $as_echo "$enable_thread_safety" >&6; }
7309
7310
7311 #
7312 # ICU
7313 #
7314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7315 $as_echo_n "checking whether to build with ICU support... " >&6; }
7316
7317
7318
7319 # Check whether --with-icu was given.
7320 if test "${with_icu+set}" = set; then :
7321   withval=$with_icu;
7322   case $withval in
7323     yes)
7324
7325 $as_echo "#define USE_ICU 1" >>confdefs.h
7326
7327       ;;
7328     no)
7329       :
7330       ;;
7331     *)
7332       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7333       ;;
7334   esac
7335
7336 else
7337   with_icu=no
7338
7339 fi
7340
7341
7342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7343 $as_echo "$with_icu" >&6; }
7344
7345
7346 if test "$with_icu" = yes; then
7347
7348
7349
7350
7351
7352
7353
7354 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7355         if test -n "$ac_tool_prefix"; then
7356   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7357 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7359 $as_echo_n "checking for $ac_word... " >&6; }
7360 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7361   $as_echo_n "(cached) " >&6
7362 else
7363   case $PKG_CONFIG in
7364   [\\/]* | ?:[\\/]*)
7365   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7366   ;;
7367   *)
7368   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7369 for as_dir in $PATH
7370 do
7371   IFS=$as_save_IFS
7372   test -z "$as_dir" && as_dir=.
7373     for ac_exec_ext in '' $ac_executable_extensions; do
7374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7375     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7377     break 2
7378   fi
7379 done
7380   done
7381 IFS=$as_save_IFS
7382
7383   ;;
7384 esac
7385 fi
7386 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7387 if test -n "$PKG_CONFIG"; then
7388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7389 $as_echo "$PKG_CONFIG" >&6; }
7390 else
7391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7392 $as_echo "no" >&6; }
7393 fi
7394
7395
7396 fi
7397 if test -z "$ac_cv_path_PKG_CONFIG"; then
7398   ac_pt_PKG_CONFIG=$PKG_CONFIG
7399   # Extract the first word of "pkg-config", so it can be a program name with args.
7400 set dummy pkg-config; ac_word=$2
7401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7402 $as_echo_n "checking for $ac_word... " >&6; }
7403 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7404   $as_echo_n "(cached) " >&6
7405 else
7406   case $ac_pt_PKG_CONFIG in
7407   [\\/]* | ?:[\\/]*)
7408   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7409   ;;
7410   *)
7411   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7412 for as_dir in $PATH
7413 do
7414   IFS=$as_save_IFS
7415   test -z "$as_dir" && as_dir=.
7416     for ac_exec_ext in '' $ac_executable_extensions; do
7417   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7418     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7420     break 2
7421   fi
7422 done
7423   done
7424 IFS=$as_save_IFS
7425
7426   ;;
7427 esac
7428 fi
7429 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7430 if test -n "$ac_pt_PKG_CONFIG"; then
7431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7432 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7433 else
7434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7435 $as_echo "no" >&6; }
7436 fi
7437
7438   if test "x$ac_pt_PKG_CONFIG" = x; then
7439     PKG_CONFIG=""
7440   else
7441     case $cross_compiling:$ac_tool_warned in
7442 yes:)
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7444 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7445 ac_tool_warned=yes ;;
7446 esac
7447     PKG_CONFIG=$ac_pt_PKG_CONFIG
7448   fi
7449 else
7450   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7451 fi
7452
7453 fi
7454 if test -n "$PKG_CONFIG"; then
7455         _pkg_min_version=0.9.0
7456         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7457 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7458         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7459                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7460 $as_echo "yes" >&6; }
7461         else
7462                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7463 $as_echo "no" >&6; }
7464                 PKG_CONFIG=""
7465         fi
7466 fi
7467
7468 pkg_failed=no
7469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7470 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7471
7472 if test -n "$ICU_CFLAGS"; then
7473     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7474  elif test -n "$PKG_CONFIG"; then
7475     if test -n "$PKG_CONFIG" && \
7476     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7477   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7478   ac_status=$?
7479   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7480   test $ac_status = 0; }; then
7481   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7482                       test "x$?" != "x0" && pkg_failed=yes
7483 else
7484   pkg_failed=yes
7485 fi
7486  else
7487     pkg_failed=untried
7488 fi
7489 if test -n "$ICU_LIBS"; then
7490     pkg_cv_ICU_LIBS="$ICU_LIBS"
7491  elif test -n "$PKG_CONFIG"; then
7492     if test -n "$PKG_CONFIG" && \
7493     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7494   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7495   ac_status=$?
7496   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7497   test $ac_status = 0; }; then
7498   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7499                       test "x$?" != "x0" && pkg_failed=yes
7500 else
7501   pkg_failed=yes
7502 fi
7503  else
7504     pkg_failed=untried
7505 fi
7506
7507
7508
7509 if test $pkg_failed = yes; then
7510         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7511 $as_echo "no" >&6; }
7512
7513 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7514         _pkg_short_errors_supported=yes
7515 else
7516         _pkg_short_errors_supported=no
7517 fi
7518         if test $_pkg_short_errors_supported = yes; then
7519                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7520         else
7521                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7522         fi
7523         # Put the nasty error message in config.log where it belongs
7524         echo "$ICU_PKG_ERRORS" >&5
7525
7526         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7527
7528 $ICU_PKG_ERRORS
7529
7530 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7531 installed software in a non-standard prefix.
7532
7533 Alternatively, you may set the environment variables ICU_CFLAGS
7534 and ICU_LIBS to avoid the need to call pkg-config.
7535 See the pkg-config man page for more details." "$LINENO" 5
7536 elif test $pkg_failed = untried; then
7537         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7538 $as_echo "no" >&6; }
7539         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7540 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7541 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7542 is in your PATH or set the PKG_CONFIG environment variable to the full
7543 path to pkg-config.
7544
7545 Alternatively, you may set the environment variables ICU_CFLAGS
7546 and ICU_LIBS to avoid the need to call pkg-config.
7547 See the pkg-config man page for more details.
7548
7549 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7550 See \`config.log' for more details" "$LINENO" 5; }
7551 else
7552         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7553         ICU_LIBS=$pkg_cv_ICU_LIBS
7554         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7555 $as_echo "yes" >&6; }
7556
7557 fi
7558 fi
7559
7560 #
7561 # Optionally build Tcl modules (PL/Tcl)
7562 #
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7564 $as_echo_n "checking whether to build with Tcl... " >&6; }
7565
7566
7567
7568 # Check whether --with-tcl was given.
7569 if test "${with_tcl+set}" = set; then :
7570   withval=$with_tcl;
7571   case $withval in
7572     yes)
7573       :
7574       ;;
7575     no)
7576       :
7577       ;;
7578     *)
7579       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7580       ;;
7581   esac
7582
7583 else
7584   with_tcl=no
7585
7586 fi
7587
7588
7589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7590 $as_echo "$with_tcl" >&6; }
7591
7592
7593 # We see if the path to the Tcl/Tk configuration scripts is specified.
7594 # This will override the use of tclsh to find the paths to search.
7595
7596
7597
7598
7599 # Check whether --with-tclconfig was given.
7600 if test "${with_tclconfig+set}" = set; then :
7601   withval=$with_tclconfig;
7602   case $withval in
7603     yes)
7604       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7605       ;;
7606     no)
7607       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7608       ;;
7609     *)
7610
7611       ;;
7612   esac
7613
7614 fi
7615
7616
7617
7618 #
7619 # Optionally build Perl modules (PL/Perl)
7620 #
7621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7622 $as_echo_n "checking whether to build Perl modules... " >&6; }
7623
7624
7625
7626 # Check whether --with-perl was given.
7627 if test "${with_perl+set}" = set; then :
7628   withval=$with_perl;
7629   case $withval in
7630     yes)
7631       :
7632       ;;
7633     no)
7634       :
7635       ;;
7636     *)
7637       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7638       ;;
7639   esac
7640
7641 else
7642   with_perl=no
7643
7644 fi
7645
7646
7647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7648 $as_echo "$with_perl" >&6; }
7649
7650
7651 #
7652 # Optionally build Python modules (PL/Python)
7653 #
7654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7655 $as_echo_n "checking whether to build Python modules... " >&6; }
7656
7657
7658
7659 # Check whether --with-python was given.
7660 if test "${with_python+set}" = set; then :
7661   withval=$with_python;
7662   case $withval in
7663     yes)
7664       :
7665       ;;
7666     no)
7667       :
7668       ;;
7669     *)
7670       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7671       ;;
7672   esac
7673
7674 else
7675   with_python=no
7676
7677 fi
7678
7679
7680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7681 $as_echo "$with_python" >&6; }
7682
7683
7684 #
7685 # GSSAPI
7686 #
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7688 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7689
7690
7691
7692 # Check whether --with-gssapi was given.
7693 if test "${with_gssapi+set}" = set; then :
7694   withval=$with_gssapi;
7695   case $withval in
7696     yes)
7697
7698
7699 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7700
7701   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7702
7703       ;;
7704     no)
7705       :
7706       ;;
7707     *)
7708       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7709       ;;
7710   esac
7711
7712 else
7713   with_gssapi=no
7714
7715 fi
7716
7717
7718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7719 $as_echo "$with_gssapi" >&6; }
7720
7721
7722
7723
7724
7725
7726 #
7727 # Kerberos configuration parameters
7728 #
7729
7730
7731
7732 # Check whether --with-krb-srvnam was given.
7733 if test "${with_krb_srvnam+set}" = set; then :
7734   withval=$with_krb_srvnam;
7735   case $withval in
7736     yes)
7737       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7738       ;;
7739     no)
7740       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7741       ;;
7742     *)
7743
7744       ;;
7745   esac
7746
7747 else
7748   with_krb_srvnam="postgres"
7749 fi
7750
7751
7752
7753
7754 cat >>confdefs.h <<_ACEOF
7755 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7756 _ACEOF
7757
7758
7759
7760 #
7761 # PAM
7762 #
7763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7764 $as_echo_n "checking whether to build with PAM support... " >&6; }
7765
7766
7767
7768 # Check whether --with-pam was given.
7769 if test "${with_pam+set}" = set; then :
7770   withval=$with_pam;
7771   case $withval in
7772     yes)
7773
7774 $as_echo "#define USE_PAM 1" >>confdefs.h
7775
7776       ;;
7777     no)
7778       :
7779       ;;
7780     *)
7781       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7782       ;;
7783   esac
7784
7785 else
7786   with_pam=no
7787
7788 fi
7789
7790
7791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7792 $as_echo "$with_pam" >&6; }
7793
7794
7795 #
7796 # BSD AUTH
7797 #
7798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7799 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7800
7801
7802
7803 # Check whether --with-bsd-auth was given.
7804 if test "${with_bsd_auth+set}" = set; then :
7805   withval=$with_bsd_auth;
7806   case $withval in
7807     yes)
7808
7809 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7810
7811       ;;
7812     no)
7813       :
7814       ;;
7815     *)
7816       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7817       ;;
7818   esac
7819
7820 else
7821   with_bsd_auth=no
7822
7823 fi
7824
7825
7826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7827 $as_echo "$with_bsd_auth" >&6; }
7828
7829
7830 #
7831 # LDAP
7832 #
7833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7834 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7835
7836
7837
7838 # Check whether --with-ldap was given.
7839 if test "${with_ldap+set}" = set; then :
7840   withval=$with_ldap;
7841   case $withval in
7842     yes)
7843
7844 $as_echo "#define USE_LDAP 1" >>confdefs.h
7845
7846       ;;
7847     no)
7848       :
7849       ;;
7850     *)
7851       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7852       ;;
7853   esac
7854
7855 else
7856   with_ldap=no
7857
7858 fi
7859
7860
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7862 $as_echo "$with_ldap" >&6; }
7863
7864
7865
7866 #
7867 # Bonjour
7868 #
7869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7870 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7871
7872
7873
7874 # Check whether --with-bonjour was given.
7875 if test "${with_bonjour+set}" = set; then :
7876   withval=$with_bonjour;
7877   case $withval in
7878     yes)
7879
7880 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7881
7882       ;;
7883     no)
7884       :
7885       ;;
7886     *)
7887       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7888       ;;
7889   esac
7890
7891 else
7892   with_bonjour=no
7893
7894 fi
7895
7896
7897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7898 $as_echo "$with_bonjour" >&6; }
7899
7900
7901 #
7902 # OpenSSL
7903 #
7904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7905 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7906
7907
7908
7909 # Check whether --with-openssl was given.
7910 if test "${with_openssl+set}" = set; then :
7911   withval=$with_openssl;
7912   case $withval in
7913     yes)
7914
7915 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7916
7917       ;;
7918     no)
7919       :
7920       ;;
7921     *)
7922       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7923       ;;
7924   esac
7925
7926 else
7927   with_openssl=no
7928
7929 fi
7930
7931
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7933 $as_echo "$with_openssl" >&6; }
7934
7935
7936 #
7937 # SELinux
7938 #
7939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7940 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7941
7942
7943
7944 # Check whether --with-selinux was given.
7945 if test "${with_selinux+set}" = set; then :
7946   withval=$with_selinux;
7947   case $withval in
7948     yes)
7949       :
7950       ;;
7951     no)
7952       :
7953       ;;
7954     *)
7955       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7956       ;;
7957   esac
7958
7959 else
7960   with_selinux=no
7961
7962 fi
7963
7964
7965
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7967 $as_echo "$with_selinux" >&6; }
7968
7969 #
7970 # Systemd
7971 #
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7973 $as_echo_n "checking whether to build with systemd support... " >&6; }
7974
7975
7976
7977 # Check whether --with-systemd was given.
7978 if test "${with_systemd+set}" = set; then :
7979   withval=$with_systemd;
7980   case $withval in
7981     yes)
7982
7983 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7984
7985       ;;
7986     no)
7987       :
7988       ;;
7989     *)
7990       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7991       ;;
7992   esac
7993
7994 else
7995   with_systemd=no
7996
7997 fi
7998
7999
8000
8001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8002 $as_echo "$with_systemd" >&6; }
8003
8004 #
8005 # Readline
8006 #
8007
8008
8009
8010 # Check whether --with-readline was given.
8011 if test "${with_readline+set}" = set; then :
8012   withval=$with_readline;
8013   case $withval in
8014     yes)
8015       :
8016       ;;
8017     no)
8018       :
8019       ;;
8020     *)
8021       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8022       ;;
8023   esac
8024
8025 else
8026   with_readline=yes
8027
8028 fi
8029
8030
8031 # readline on MinGW has problems with backslashes in psql and other bugs.
8032 # This is particularly a problem with non-US code pages.
8033 # Therefore disable its use until we understand the cause. 2004-07-20
8034 if test "$PORTNAME" = "win32"; then
8035   if test "$with_readline" = yes; then
8036     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8037 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8038     with_readline=no
8039   fi
8040 fi
8041
8042
8043 #
8044 # Prefer libedit
8045 #
8046
8047
8048
8049 # Check whether --with-libedit-preferred was given.
8050 if test "${with_libedit_preferred+set}" = set; then :
8051   withval=$with_libedit_preferred;
8052   case $withval in
8053     yes)
8054       :
8055       ;;
8056     no)
8057       :
8058       ;;
8059     *)
8060       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8061       ;;
8062   esac
8063
8064 else
8065   with_libedit_preferred=no
8066
8067 fi
8068
8069
8070
8071
8072 #
8073 # UUID library
8074 #
8075 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8076 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8077 # UUID library.  More than one of these might be present on a given platform,
8078 # so we make the user say which one she wants.
8079 #
8080
8081
8082
8083 # Check whether --with-uuid was given.
8084 if test "${with_uuid+set}" = set; then :
8085   withval=$with_uuid;
8086   case $withval in
8087     yes)
8088       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8089       ;;
8090     no)
8091       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8092       ;;
8093     *)
8094
8095       ;;
8096   esac
8097
8098 fi
8099
8100
8101 if test x"$with_uuid" = x"" ; then
8102   with_uuid=no
8103 fi
8104
8105
8106
8107 # Check whether --with-ossp-uuid was given.
8108 if test "${with_ossp_uuid+set}" = set; then :
8109   withval=$with_ossp_uuid;
8110   case $withval in
8111     yes)
8112       :
8113       ;;
8114     no)
8115       :
8116       ;;
8117     *)
8118       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8119       ;;
8120   esac
8121
8122 else
8123   with_ossp_uuid=no
8124
8125 fi
8126
8127
8128 if test "$with_ossp_uuid" = yes ; then
8129   with_uuid=ossp
8130 fi
8131
8132 if test "$with_uuid" = bsd ; then
8133
8134 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8135
8136   UUID_EXTRA_OBJS="md5.o sha1.o"
8137 elif test "$with_uuid" = e2fs ; then
8138
8139 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8140
8141   UUID_EXTRA_OBJS="md5.o sha1.o"
8142 elif test "$with_uuid" = ossp ; then
8143
8144 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8145
8146   UUID_EXTRA_OBJS=""
8147 elif test "$with_uuid" = no ; then
8148   UUID_EXTRA_OBJS=""
8149 else
8150   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8151 fi
8152
8153
8154
8155
8156 #
8157 # XML
8158 #
8159
8160
8161
8162 # Check whether --with-libxml was given.
8163 if test "${with_libxml+set}" = set; then :
8164   withval=$with_libxml;
8165   case $withval in
8166     yes)
8167
8168 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8169
8170       ;;
8171     no)
8172       :
8173       ;;
8174     *)
8175       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8176       ;;
8177   esac
8178
8179 else
8180   with_libxml=no
8181
8182 fi
8183
8184
8185
8186 if test "$with_libxml" = yes ; then
8187   if test -z "$XML2_CONFIG"; then
8188   for ac_prog in xml2-config
8189 do
8190   # Extract the first word of "$ac_prog", so it can be a program name with args.
8191 set dummy $ac_prog; ac_word=$2
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8193 $as_echo_n "checking for $ac_word... " >&6; }
8194 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8195   $as_echo_n "(cached) " >&6
8196 else
8197   case $XML2_CONFIG in
8198   [\\/]* | ?:[\\/]*)
8199   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8200   ;;
8201   *)
8202   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8203 for as_dir in $PATH
8204 do
8205   IFS=$as_save_IFS
8206   test -z "$as_dir" && as_dir=.
8207     for ac_exec_ext in '' $ac_executable_extensions; do
8208   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8209     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8210     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8211     break 2
8212   fi
8213 done
8214   done
8215 IFS=$as_save_IFS
8216
8217   ;;
8218 esac
8219 fi
8220 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8221 if test -n "$XML2_CONFIG"; then
8222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8223 $as_echo "$XML2_CONFIG" >&6; }
8224 else
8225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8226 $as_echo "no" >&6; }
8227 fi
8228
8229
8230   test -n "$XML2_CONFIG" && break
8231 done
8232
8233 else
8234   # Report the value of XML2_CONFIG in configure's output in all cases.
8235   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8236 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8238 $as_echo "$XML2_CONFIG" >&6; }
8239 fi
8240
8241   if test -n "$XML2_CONFIG"; then
8242     for pgac_option in `$XML2_CONFIG --cflags`; do
8243       case $pgac_option in
8244         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8245       esac
8246     done
8247     for pgac_option in `$XML2_CONFIG --libs`; do
8248       case $pgac_option in
8249         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8250       esac
8251     done
8252   fi
8253 fi
8254
8255
8256
8257 #
8258 # XSLT
8259 #
8260
8261
8262
8263 # Check whether --with-libxslt was given.
8264 if test "${with_libxslt+set}" = set; then :
8265   withval=$with_libxslt;
8266   case $withval in
8267     yes)
8268
8269 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8270
8271       ;;
8272     no)
8273       :
8274       ;;
8275     *)
8276       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8277       ;;
8278   esac
8279
8280 else
8281   with_libxslt=no
8282
8283 fi
8284
8285
8286
8287
8288
8289
8290 #
8291 # tzdata
8292 #
8293
8294
8295
8296 # Check whether --with-system-tzdata was given.
8297 if test "${with_system_tzdata+set}" = set; then :
8298   withval=$with_system_tzdata;
8299   case $withval in
8300     yes)
8301       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8302       ;;
8303     no)
8304       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8305       ;;
8306     *)
8307
8308       ;;
8309   esac
8310
8311 fi
8312
8313
8314
8315
8316 #
8317 # Zlib
8318 #
8319
8320
8321
8322 # Check whether --with-zlib was given.
8323 if test "${with_zlib+set}" = set; then :
8324   withval=$with_zlib;
8325   case $withval in
8326     yes)
8327       :
8328       ;;
8329     no)
8330       :
8331       ;;
8332     *)
8333       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8334       ;;
8335   esac
8336
8337 else
8338   with_zlib=yes
8339
8340 fi
8341
8342
8343
8344
8345 #
8346 # Elf
8347 #
8348
8349 # Assume system is ELF if it predefines __ELF__ as 1,
8350 # otherwise believe host_os based default.
8351 case $host_os in
8352     freebsd1*|freebsd2*) elf=no;;
8353     freebsd3*|freebsd4*) elf=yes;;
8354 esac
8355
8356
8357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8358 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8359 if ${ac_cv_path_GREP+:} false; then :
8360   $as_echo_n "(cached) " >&6
8361 else
8362   if test -z "$GREP"; then
8363   ac_path_GREP_found=false
8364   # Loop through the user's path and test for each of PROGNAME-LIST
8365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8366 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8367 do
8368   IFS=$as_save_IFS
8369   test -z "$as_dir" && as_dir=.
8370     for ac_prog in grep ggrep; do
8371     for ac_exec_ext in '' $ac_executable_extensions; do
8372       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8373       as_fn_executable_p "$ac_path_GREP" || continue
8374 # Check for GNU ac_path_GREP and select it if it is found.
8375   # Check for GNU $ac_path_GREP
8376 case `"$ac_path_GREP" --version 2>&1` in
8377 *GNU*)
8378   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8379 *)
8380   ac_count=0
8381   $as_echo_n 0123456789 >"conftest.in"
8382   while :
8383   do
8384     cat "conftest.in" "conftest.in" >"conftest.tmp"
8385     mv "conftest.tmp" "conftest.in"
8386     cp "conftest.in" "conftest.nl"
8387     $as_echo 'GREP' >> "conftest.nl"
8388     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8389     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8390     as_fn_arith $ac_count + 1 && ac_count=$as_val
8391     if test $ac_count -gt ${ac_path_GREP_max-0}; then
8392       # Best one so far, save it but keep looking for a better one
8393       ac_cv_path_GREP="$ac_path_GREP"
8394       ac_path_GREP_max=$ac_count
8395     fi
8396     # 10*(2^10) chars as input seems more than enough
8397     test $ac_count -gt 10 && break
8398   done
8399   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8400 esac
8401
8402       $ac_path_GREP_found && break 3
8403     done
8404   done
8405   done
8406 IFS=$as_save_IFS
8407   if test -z "$ac_cv_path_GREP"; then
8408     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8409   fi
8410 else
8411   ac_cv_path_GREP=$GREP
8412 fi
8413
8414 fi
8415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8416 $as_echo "$ac_cv_path_GREP" >&6; }
8417  GREP="$ac_cv_path_GREP"
8418
8419
8420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8421 $as_echo_n "checking for egrep... " >&6; }
8422 if ${ac_cv_path_EGREP+:} false; then :
8423   $as_echo_n "(cached) " >&6
8424 else
8425   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8426    then ac_cv_path_EGREP="$GREP -E"
8427    else
8428      if test -z "$EGREP"; then
8429   ac_path_EGREP_found=false
8430   # Loop through the user's path and test for each of PROGNAME-LIST
8431   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8432 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8433 do
8434   IFS=$as_save_IFS
8435   test -z "$as_dir" && as_dir=.
8436     for ac_prog in egrep; do
8437     for ac_exec_ext in '' $ac_executable_extensions; do
8438       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8439       as_fn_executable_p "$ac_path_EGREP" || continue
8440 # Check for GNU ac_path_EGREP and select it if it is found.
8441   # Check for GNU $ac_path_EGREP
8442 case `"$ac_path_EGREP" --version 2>&1` in
8443 *GNU*)
8444   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8445 *)
8446   ac_count=0
8447   $as_echo_n 0123456789 >"conftest.in"
8448   while :
8449   do
8450     cat "conftest.in" "conftest.in" >"conftest.tmp"
8451     mv "conftest.tmp" "conftest.in"
8452     cp "conftest.in" "conftest.nl"
8453     $as_echo 'EGREP' >> "conftest.nl"
8454     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8455     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8456     as_fn_arith $ac_count + 1 && ac_count=$as_val
8457     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8458       # Best one so far, save it but keep looking for a better one
8459       ac_cv_path_EGREP="$ac_path_EGREP"
8460       ac_path_EGREP_max=$ac_count
8461     fi
8462     # 10*(2^10) chars as input seems more than enough
8463     test $ac_count -gt 10 && break
8464   done
8465   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8466 esac
8467
8468       $ac_path_EGREP_found && break 3
8469     done
8470   done
8471   done
8472 IFS=$as_save_IFS
8473   if test -z "$ac_cv_path_EGREP"; then
8474     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8475   fi
8476 else
8477   ac_cv_path_EGREP=$EGREP
8478 fi
8479
8480    fi
8481 fi
8482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8483 $as_echo "$ac_cv_path_EGREP" >&6; }
8484  EGREP="$ac_cv_path_EGREP"
8485
8486
8487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8488 /* end confdefs.h.  */
8489 #if __ELF__
8490   yes
8491 #endif
8492
8493 _ACEOF
8494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8495   $EGREP "yes" >/dev/null 2>&1; then :
8496   ELF_SYS=true
8497 else
8498   if test "X$elf" = "Xyes" ; then
8499   ELF_SYS=true
8500 else
8501   ELF_SYS=
8502 fi
8503 fi
8504 rm -f conftest*
8505
8506
8507
8508 #
8509 # Assignments
8510 #
8511
8512 CPPFLAGS="$CPPFLAGS $INCLUDES"
8513 LDFLAGS="$LDFLAGS $LIBDIRS"
8514
8515
8516
8517
8518
8519 # Check whether --with-gnu-ld was given.
8520 if test "${with_gnu_ld+set}" = set; then :
8521   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8522 else
8523   with_gnu_ld=no
8524 fi
8525
8526 ac_prog=ld
8527 if test "$GCC" = yes; then
8528   # Check if gcc -print-prog-name=ld gives a path.
8529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8530 $as_echo_n "checking for ld used by GCC... " >&6; }
8531   case $host in
8532   *-*-mingw*)
8533     # gcc leaves a trailing carriage return which upsets mingw
8534     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8535   *)
8536     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8537   esac
8538   case "$ac_prog" in
8539     # Accept absolute paths.
8540     [\\/]* | [A-Za-z]:[\\/]*)
8541       re_direlt='/[^/][^/]*/\.\./'
8542       # Canonicalize the path of ld
8543       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8544       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8545         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8546       done
8547       test -z "$LD" && LD="$ac_prog"
8548       ;;
8549   "")
8550     # If it fails, then pretend we aren't using GCC.
8551     ac_prog=ld
8552     ;;
8553   *)
8554     # If it is relative, then search for the first ld in PATH.
8555     with_gnu_ld=unknown
8556     ;;
8557   esac
8558 elif test "$with_gnu_ld" = yes; then
8559   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8560 $as_echo_n "checking for GNU ld... " >&6; }
8561 else
8562   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8563 $as_echo_n "checking for non-GNU ld... " >&6; }
8564 fi
8565 if ${ac_cv_path_LD+:} false; then :
8566   $as_echo_n "(cached) " >&6
8567 else
8568   if test -z "$LD"; then
8569   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8570   for ac_dir in $PATH; do
8571     test -z "$ac_dir" && ac_dir=.
8572     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8573       ac_cv_path_LD="$ac_dir/$ac_prog"
8574       # Check to see if the program is GNU ld.  I'd rather use --version,
8575       # but apparently some GNU ld's only accept -v.
8576       # Break only if it was the GNU/non-GNU ld that we prefer.
8577       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8578         test "$with_gnu_ld" != no && break
8579       else
8580         test "$with_gnu_ld" != yes && break
8581       fi
8582     fi
8583   done
8584   IFS="$ac_save_ifs"
8585 else
8586   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8587 fi
8588 fi
8589
8590 LD="$ac_cv_path_LD"
8591 if test -n "$LD"; then
8592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8593 $as_echo "$LD" >&6; }
8594 else
8595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8596 $as_echo "no" >&6; }
8597 fi
8598 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8600 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8601 if ${ac_cv_prog_gnu_ld+:} false; then :
8602   $as_echo_n "(cached) " >&6
8603 else
8604   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8605 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8606   ac_cv_prog_gnu_ld=yes
8607 else
8608   ac_cv_prog_gnu_ld=no
8609 fi
8610 fi
8611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8612 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8613 with_gnu_ld=$ac_cv_prog_gnu_ld
8614
8615
8616
8617
8618 if test -n "$ac_tool_prefix"; then
8619   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8620 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8622 $as_echo_n "checking for $ac_word... " >&6; }
8623 if ${ac_cv_prog_RANLIB+:} false; then :
8624   $as_echo_n "(cached) " >&6
8625 else
8626   if test -n "$RANLIB"; then
8627   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8628 else
8629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8630 for as_dir in $PATH
8631 do
8632   IFS=$as_save_IFS
8633   test -z "$as_dir" && as_dir=.
8634     for ac_exec_ext in '' $ac_executable_extensions; do
8635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8636     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8638     break 2
8639   fi
8640 done
8641   done
8642 IFS=$as_save_IFS
8643
8644 fi
8645 fi
8646 RANLIB=$ac_cv_prog_RANLIB
8647 if test -n "$RANLIB"; then
8648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8649 $as_echo "$RANLIB" >&6; }
8650 else
8651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8652 $as_echo "no" >&6; }
8653 fi
8654
8655
8656 fi
8657 if test -z "$ac_cv_prog_RANLIB"; then
8658   ac_ct_RANLIB=$RANLIB
8659   # Extract the first word of "ranlib", so it can be a program name with args.
8660 set dummy ranlib; ac_word=$2
8661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8662 $as_echo_n "checking for $ac_word... " >&6; }
8663 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8664   $as_echo_n "(cached) " >&6
8665 else
8666   if test -n "$ac_ct_RANLIB"; then
8667   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8668 else
8669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8670 for as_dir in $PATH
8671 do
8672   IFS=$as_save_IFS
8673   test -z "$as_dir" && as_dir=.
8674     for ac_exec_ext in '' $ac_executable_extensions; do
8675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8676     ac_cv_prog_ac_ct_RANLIB="ranlib"
8677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8678     break 2
8679   fi
8680 done
8681   done
8682 IFS=$as_save_IFS
8683
8684 fi
8685 fi
8686 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8687 if test -n "$ac_ct_RANLIB"; then
8688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8689 $as_echo "$ac_ct_RANLIB" >&6; }
8690 else
8691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8692 $as_echo "no" >&6; }
8693 fi
8694
8695   if test "x$ac_ct_RANLIB" = x; then
8696     RANLIB=":"
8697   else
8698     case $cross_compiling:$ac_tool_warned in
8699 yes:)
8700 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8701 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8702 ac_tool_warned=yes ;;
8703 esac
8704     RANLIB=$ac_ct_RANLIB
8705   fi
8706 else
8707   RANLIB="$ac_cv_prog_RANLIB"
8708 fi
8709
8710
8711   if test -n "$ac_tool_prefix"; then
8712   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8713 set dummy ${ac_tool_prefix}strip; ac_word=$2
8714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8715 $as_echo_n "checking for $ac_word... " >&6; }
8716 if ${ac_cv_prog_STRIP+:} false; then :
8717   $as_echo_n "(cached) " >&6
8718 else
8719   if test -n "$STRIP"; then
8720   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8721 else
8722 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8723 for as_dir in $PATH
8724 do
8725   IFS=$as_save_IFS
8726   test -z "$as_dir" && as_dir=.
8727     for ac_exec_ext in '' $ac_executable_extensions; do
8728   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8729     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8730     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8731     break 2
8732   fi
8733 done
8734   done
8735 IFS=$as_save_IFS
8736
8737 fi
8738 fi
8739 STRIP=$ac_cv_prog_STRIP
8740 if test -n "$STRIP"; then
8741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8742 $as_echo "$STRIP" >&6; }
8743 else
8744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8745 $as_echo "no" >&6; }
8746 fi
8747
8748
8749 fi
8750 if test -z "$ac_cv_prog_STRIP"; then
8751   ac_ct_STRIP=$STRIP
8752   # Extract the first word of "strip", so it can be a program name with args.
8753 set dummy strip; ac_word=$2
8754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8755 $as_echo_n "checking for $ac_word... " >&6; }
8756 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8757   $as_echo_n "(cached) " >&6
8758 else
8759   if test -n "$ac_ct_STRIP"; then
8760   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8761 else
8762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8763 for as_dir in $PATH
8764 do
8765   IFS=$as_save_IFS
8766   test -z "$as_dir" && as_dir=.
8767     for ac_exec_ext in '' $ac_executable_extensions; do
8768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8769     ac_cv_prog_ac_ct_STRIP="strip"
8770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8771     break 2
8772   fi
8773 done
8774   done
8775 IFS=$as_save_IFS
8776
8777 fi
8778 fi
8779 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8780 if test -n "$ac_ct_STRIP"; then
8781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8782 $as_echo "$ac_ct_STRIP" >&6; }
8783 else
8784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8785 $as_echo "no" >&6; }
8786 fi
8787
8788   if test "x$ac_ct_STRIP" = x; then
8789     STRIP=":"
8790   else
8791     case $cross_compiling:$ac_tool_warned in
8792 yes:)
8793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8794 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8795 ac_tool_warned=yes ;;
8796 esac
8797     STRIP=$ac_ct_STRIP
8798   fi
8799 else
8800   STRIP="$ac_cv_prog_STRIP"
8801 fi
8802
8803
8804   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8805 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8806   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8807     STRIP_STATIC_LIB="$STRIP -x"
8808     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8809     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8810 $as_echo "yes" >&6; }
8811   else
8812     case $host_os in
8813       darwin*)
8814         STRIP="$STRIP -x"
8815         STRIP_STATIC_LIB=$STRIP
8816         STRIP_SHARED_LIB=$STRIP
8817         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8818 $as_echo "yes" >&6; }
8819         ;;
8820       *)
8821         STRIP_STATIC_LIB=:
8822         STRIP_SHARED_LIB=:
8823         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8824 $as_echo "no" >&6; }
8825         ;;
8826     esac
8827   fi
8828
8829
8830
8831 if test -n "$ac_tool_prefix"; then
8832   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8833 set dummy ${ac_tool_prefix}ar; ac_word=$2
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8835 $as_echo_n "checking for $ac_word... " >&6; }
8836 if ${ac_cv_prog_AR+:} false; then :
8837   $as_echo_n "(cached) " >&6
8838 else
8839   if test -n "$AR"; then
8840   ac_cv_prog_AR="$AR" # Let the user override the test.
8841 else
8842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8843 for as_dir in $PATH
8844 do
8845   IFS=$as_save_IFS
8846   test -z "$as_dir" && as_dir=.
8847     for ac_exec_ext in '' $ac_executable_extensions; do
8848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8849     ac_cv_prog_AR="${ac_tool_prefix}ar"
8850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8851     break 2
8852   fi
8853 done
8854   done
8855 IFS=$as_save_IFS
8856
8857 fi
8858 fi
8859 AR=$ac_cv_prog_AR
8860 if test -n "$AR"; then
8861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8862 $as_echo "$AR" >&6; }
8863 else
8864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8865 $as_echo "no" >&6; }
8866 fi
8867
8868
8869 fi
8870 if test -z "$ac_cv_prog_AR"; then
8871   ac_ct_AR=$AR
8872   # Extract the first word of "ar", so it can be a program name with args.
8873 set dummy ar; ac_word=$2
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8875 $as_echo_n "checking for $ac_word... " >&6; }
8876 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8877   $as_echo_n "(cached) " >&6
8878 else
8879   if test -n "$ac_ct_AR"; then
8880   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8881 else
8882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8883 for as_dir in $PATH
8884 do
8885   IFS=$as_save_IFS
8886   test -z "$as_dir" && as_dir=.
8887     for ac_exec_ext in '' $ac_executable_extensions; do
8888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8889     ac_cv_prog_ac_ct_AR="ar"
8890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8891     break 2
8892   fi
8893 done
8894   done
8895 IFS=$as_save_IFS
8896
8897 fi
8898 fi
8899 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8900 if test -n "$ac_ct_AR"; then
8901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8902 $as_echo "$ac_ct_AR" >&6; }
8903 else
8904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8905 $as_echo "no" >&6; }
8906 fi
8907
8908   if test "x$ac_ct_AR" = x; then
8909     AR="ar"
8910   else
8911     case $cross_compiling:$ac_tool_warned in
8912 yes:)
8913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8914 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8915 ac_tool_warned=yes ;;
8916 esac
8917     AR=$ac_ct_AR
8918   fi
8919 else
8920   AR="$ac_cv_prog_AR"
8921 fi
8922
8923 if test "$PORTNAME" = "win32"; then
8924   if test -n "$ac_tool_prefix"; then
8925   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8926 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8928 $as_echo_n "checking for $ac_word... " >&6; }
8929 if ${ac_cv_prog_DLLTOOL+:} false; then :
8930   $as_echo_n "(cached) " >&6
8931 else
8932   if test -n "$DLLTOOL"; then
8933   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8934 else
8935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8936 for as_dir in $PATH
8937 do
8938   IFS=$as_save_IFS
8939   test -z "$as_dir" && as_dir=.
8940     for ac_exec_ext in '' $ac_executable_extensions; do
8941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8942     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8944     break 2
8945   fi
8946 done
8947   done
8948 IFS=$as_save_IFS
8949
8950 fi
8951 fi
8952 DLLTOOL=$ac_cv_prog_DLLTOOL
8953 if test -n "$DLLTOOL"; then
8954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8955 $as_echo "$DLLTOOL" >&6; }
8956 else
8957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8958 $as_echo "no" >&6; }
8959 fi
8960
8961
8962 fi
8963 if test -z "$ac_cv_prog_DLLTOOL"; then
8964   ac_ct_DLLTOOL=$DLLTOOL
8965   # Extract the first word of "dlltool", so it can be a program name with args.
8966 set dummy dlltool; ac_word=$2
8967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8968 $as_echo_n "checking for $ac_word... " >&6; }
8969 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8970   $as_echo_n "(cached) " >&6
8971 else
8972   if test -n "$ac_ct_DLLTOOL"; then
8973   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8974 else
8975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8976 for as_dir in $PATH
8977 do
8978   IFS=$as_save_IFS
8979   test -z "$as_dir" && as_dir=.
8980     for ac_exec_ext in '' $ac_executable_extensions; do
8981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8982     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8984     break 2
8985   fi
8986 done
8987   done
8988 IFS=$as_save_IFS
8989
8990 fi
8991 fi
8992 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8993 if test -n "$ac_ct_DLLTOOL"; then
8994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8995 $as_echo "$ac_ct_DLLTOOL" >&6; }
8996 else
8997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998 $as_echo "no" >&6; }
8999 fi
9000
9001   if test "x$ac_ct_DLLTOOL" = x; then
9002     DLLTOOL="dlltool"
9003   else
9004     case $cross_compiling:$ac_tool_warned in
9005 yes:)
9006 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9007 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9008 ac_tool_warned=yes ;;
9009 esac
9010     DLLTOOL=$ac_ct_DLLTOOL
9011   fi
9012 else
9013   DLLTOOL="$ac_cv_prog_DLLTOOL"
9014 fi
9015
9016   if test -n "$ac_tool_prefix"; then
9017   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9018 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9020 $as_echo_n "checking for $ac_word... " >&6; }
9021 if ${ac_cv_prog_DLLWRAP+:} false; then :
9022   $as_echo_n "(cached) " >&6
9023 else
9024   if test -n "$DLLWRAP"; then
9025   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9026 else
9027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9028 for as_dir in $PATH
9029 do
9030   IFS=$as_save_IFS
9031   test -z "$as_dir" && as_dir=.
9032     for ac_exec_ext in '' $ac_executable_extensions; do
9033   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9034     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9035     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9036     break 2
9037   fi
9038 done
9039   done
9040 IFS=$as_save_IFS
9041
9042 fi
9043 fi
9044 DLLWRAP=$ac_cv_prog_DLLWRAP
9045 if test -n "$DLLWRAP"; then
9046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9047 $as_echo "$DLLWRAP" >&6; }
9048 else
9049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9050 $as_echo "no" >&6; }
9051 fi
9052
9053
9054 fi
9055 if test -z "$ac_cv_prog_DLLWRAP"; then
9056   ac_ct_DLLWRAP=$DLLWRAP
9057   # Extract the first word of "dllwrap", so it can be a program name with args.
9058 set dummy dllwrap; ac_word=$2
9059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9060 $as_echo_n "checking for $ac_word... " >&6; }
9061 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9062   $as_echo_n "(cached) " >&6
9063 else
9064   if test -n "$ac_ct_DLLWRAP"; then
9065   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9066 else
9067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9068 for as_dir in $PATH
9069 do
9070   IFS=$as_save_IFS
9071   test -z "$as_dir" && as_dir=.
9072     for ac_exec_ext in '' $ac_executable_extensions; do
9073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9074     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9076     break 2
9077   fi
9078 done
9079   done
9080 IFS=$as_save_IFS
9081
9082 fi
9083 fi
9084 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9085 if test -n "$ac_ct_DLLWRAP"; then
9086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9087 $as_echo "$ac_ct_DLLWRAP" >&6; }
9088 else
9089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9090 $as_echo "no" >&6; }
9091 fi
9092
9093   if test "x$ac_ct_DLLWRAP" = x; then
9094     DLLWRAP="dllwrap"
9095   else
9096     case $cross_compiling:$ac_tool_warned in
9097 yes:)
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9099 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9100 ac_tool_warned=yes ;;
9101 esac
9102     DLLWRAP=$ac_ct_DLLWRAP
9103   fi
9104 else
9105   DLLWRAP="$ac_cv_prog_DLLWRAP"
9106 fi
9107
9108   if test -n "$ac_tool_prefix"; then
9109   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9110 set dummy ${ac_tool_prefix}windres; ac_word=$2
9111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9112 $as_echo_n "checking for $ac_word... " >&6; }
9113 if ${ac_cv_prog_WINDRES+:} false; then :
9114   $as_echo_n "(cached) " >&6
9115 else
9116   if test -n "$WINDRES"; then
9117   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9118 else
9119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9120 for as_dir in $PATH
9121 do
9122   IFS=$as_save_IFS
9123   test -z "$as_dir" && as_dir=.
9124     for ac_exec_ext in '' $ac_executable_extensions; do
9125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9126     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9128     break 2
9129   fi
9130 done
9131   done
9132 IFS=$as_save_IFS
9133
9134 fi
9135 fi
9136 WINDRES=$ac_cv_prog_WINDRES
9137 if test -n "$WINDRES"; then
9138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9139 $as_echo "$WINDRES" >&6; }
9140 else
9141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9142 $as_echo "no" >&6; }
9143 fi
9144
9145
9146 fi
9147 if test -z "$ac_cv_prog_WINDRES"; then
9148   ac_ct_WINDRES=$WINDRES
9149   # Extract the first word of "windres", so it can be a program name with args.
9150 set dummy windres; ac_word=$2
9151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9152 $as_echo_n "checking for $ac_word... " >&6; }
9153 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9154   $as_echo_n "(cached) " >&6
9155 else
9156   if test -n "$ac_ct_WINDRES"; then
9157   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9158 else
9159 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9160 for as_dir in $PATH
9161 do
9162   IFS=$as_save_IFS
9163   test -z "$as_dir" && as_dir=.
9164     for ac_exec_ext in '' $ac_executable_extensions; do
9165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9166     ac_cv_prog_ac_ct_WINDRES="windres"
9167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9168     break 2
9169   fi
9170 done
9171   done
9172 IFS=$as_save_IFS
9173
9174 fi
9175 fi
9176 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9177 if test -n "$ac_ct_WINDRES"; then
9178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9179 $as_echo "$ac_ct_WINDRES" >&6; }
9180 else
9181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9182 $as_echo "no" >&6; }
9183 fi
9184
9185   if test "x$ac_ct_WINDRES" = x; then
9186     WINDRES="windres"
9187   else
9188     case $cross_compiling:$ac_tool_warned in
9189 yes:)
9190 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9191 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9192 ac_tool_warned=yes ;;
9193 esac
9194     WINDRES=$ac_ct_WINDRES
9195   fi
9196 else
9197   WINDRES="$ac_cv_prog_WINDRES"
9198 fi
9199
9200 fi
9201
9202 # Find a good install program.  We prefer a C program (faster),
9203 # so one script is as good as another.  But avoid the broken or
9204 # incompatible versions:
9205 # SysV /etc/install, /usr/sbin/install
9206 # SunOS /usr/etc/install
9207 # IRIX /sbin/install
9208 # AIX /bin/install
9209 # AmigaOS /C/install, which installs bootblocks on floppy discs
9210 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9211 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9212 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9213 # OS/2's system install, which has a completely different semantic
9214 # ./install, which can be erroneously created by make from ./install.sh.
9215 # Reject install programs that cannot install multiple files.
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9217 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9218 if test -z "$INSTALL"; then
9219 if ${ac_cv_path_install+:} false; then :
9220   $as_echo_n "(cached) " >&6
9221 else
9222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9223 for as_dir in $PATH
9224 do
9225   IFS=$as_save_IFS
9226   test -z "$as_dir" && as_dir=.
9227     # Account for people who put trailing slashes in PATH elements.
9228 case $as_dir/ in #((
9229   ./ | .// | /[cC]/* | \
9230   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9231   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9232   /usr/ucb/* ) ;;
9233   *)
9234     # OSF1 and SCO ODT 3.0 have their own names for install.
9235     # Don't use installbsd from OSF since it installs stuff as root
9236     # by default.
9237     for ac_prog in ginstall scoinst install; do
9238       for ac_exec_ext in '' $ac_executable_extensions; do
9239         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9240           if test $ac_prog = install &&
9241             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9242             # AIX install.  It has an incompatible calling convention.
9243             :
9244           elif test $ac_prog = install &&
9245             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9246             # program-specific install script used by HP pwplus--don't use.
9247             :
9248           else
9249             rm -rf conftest.one conftest.two conftest.dir
9250             echo one > conftest.one
9251             echo two > conftest.two
9252             mkdir conftest.dir
9253             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9254               test -s conftest.one && test -s conftest.two &&
9255               test -s conftest.dir/conftest.one &&
9256               test -s conftest.dir/conftest.two
9257             then
9258               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9259               break 3
9260             fi
9261           fi
9262         fi
9263       done
9264     done
9265     ;;
9266 esac
9267
9268   done
9269 IFS=$as_save_IFS
9270
9271 rm -rf conftest.one conftest.two conftest.dir
9272
9273 fi
9274   if test "${ac_cv_path_install+set}" = set; then
9275     INSTALL=$ac_cv_path_install
9276   else
9277     # As a last resort, use the slow shell script.  Don't cache a
9278     # value for INSTALL within a source directory, because that will
9279     # break other packages using the cache if that directory is
9280     # removed, or if the value is a relative name.
9281     INSTALL=$ac_install_sh
9282   fi
9283 fi
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9285 $as_echo "$INSTALL" >&6; }
9286
9287 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9288 # It thinks the first close brace ends the variable substitution.
9289 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9290
9291 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9292
9293 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9294
9295 # When Autoconf chooses install-sh as install program it tries to generate
9296 # a relative path to it in each makefile where it substitutes it. This clashes
9297 # with our Makefile.global concept. This workaround helps.
9298 case $INSTALL in
9299   *install-sh*) install_bin='';;
9300   *) install_bin=$INSTALL;;
9301 esac
9302
9303
9304 if test -z "$TAR"; then
9305   for ac_prog in tar
9306 do
9307   # Extract the first word of "$ac_prog", so it can be a program name with args.
9308 set dummy $ac_prog; ac_word=$2
9309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9310 $as_echo_n "checking for $ac_word... " >&6; }
9311 if ${ac_cv_path_TAR+:} false; then :
9312   $as_echo_n "(cached) " >&6
9313 else
9314   case $TAR in
9315   [\\/]* | ?:[\\/]*)
9316   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9317   ;;
9318   *)
9319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9320 for as_dir in $PATH
9321 do
9322   IFS=$as_save_IFS
9323   test -z "$as_dir" && as_dir=.
9324     for ac_exec_ext in '' $ac_executable_extensions; do
9325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9326     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9328     break 2
9329   fi
9330 done
9331   done
9332 IFS=$as_save_IFS
9333
9334   ;;
9335 esac
9336 fi
9337 TAR=$ac_cv_path_TAR
9338 if test -n "$TAR"; then
9339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9340 $as_echo "$TAR" >&6; }
9341 else
9342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9343 $as_echo "no" >&6; }
9344 fi
9345
9346
9347   test -n "$TAR" && break
9348 done
9349
9350 else
9351   # Report the value of TAR in configure's output in all cases.
9352   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9353 $as_echo_n "checking for TAR... " >&6; }
9354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9355 $as_echo "$TAR" >&6; }
9356 fi
9357
9358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9359 $as_echo_n "checking whether ln -s works... " >&6; }
9360 LN_S=$as_ln_s
9361 if test "$LN_S" = "ln -s"; then
9362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9363 $as_echo "yes" >&6; }
9364 else
9365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9366 $as_echo "no, using $LN_S" >&6; }
9367 fi
9368
9369 for ac_prog in gawk mawk nawk awk
9370 do
9371   # Extract the first word of "$ac_prog", so it can be a program name with args.
9372 set dummy $ac_prog; ac_word=$2
9373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9374 $as_echo_n "checking for $ac_word... " >&6; }
9375 if ${ac_cv_prog_AWK+:} false; then :
9376   $as_echo_n "(cached) " >&6
9377 else
9378   if test -n "$AWK"; then
9379   ac_cv_prog_AWK="$AWK" # Let the user override the test.
9380 else
9381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9382 for as_dir in $PATH
9383 do
9384   IFS=$as_save_IFS
9385   test -z "$as_dir" && as_dir=.
9386     for ac_exec_ext in '' $ac_executable_extensions; do
9387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9388     ac_cv_prog_AWK="$ac_prog"
9389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9390     break 2
9391   fi
9392 done
9393   done
9394 IFS=$as_save_IFS
9395
9396 fi
9397 fi
9398 AWK=$ac_cv_prog_AWK
9399 if test -n "$AWK"; then
9400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9401 $as_echo "$AWK" >&6; }
9402 else
9403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9404 $as_echo "no" >&6; }
9405 fi
9406
9407
9408   test -n "$AWK" && break
9409 done
9410
9411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9412 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9413 if test -z "$MKDIR_P"; then
9414   if ${ac_cv_path_mkdir+:} false; then :
9415   $as_echo_n "(cached) " >&6
9416 else
9417   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9418 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9419 do
9420   IFS=$as_save_IFS
9421   test -z "$as_dir" && as_dir=.
9422     for ac_prog in mkdir gmkdir; do
9423          for ac_exec_ext in '' $ac_executable_extensions; do
9424            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9425            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9426              'mkdir (GNU coreutils) '* | \
9427              'mkdir (coreutils) '* | \
9428              'mkdir (fileutils) '4.1*)
9429                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9430                break 3;;
9431            esac
9432          done
9433        done
9434   done
9435 IFS=$as_save_IFS
9436
9437 fi
9438
9439   test -d ./--version && rmdir ./--version
9440   if test "${ac_cv_path_mkdir+set}" = set; then
9441     MKDIR_P="$ac_cv_path_mkdir -p"
9442   else
9443     # As a last resort, use the slow shell script.  Don't cache a
9444     # value for MKDIR_P within a source directory, because that will
9445     # break other packages using the cache if that directory is
9446     # removed, or if the value is a relative name.
9447     MKDIR_P="$ac_install_sh -d"
9448   fi
9449 fi
9450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9451 $as_echo "$MKDIR_P" >&6; }
9452
9453 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9454 # a relative path to it in each makefile where it substitutes it. This clashes
9455 # with our Makefile.global concept. This workaround helps.
9456 case $MKDIR_P in
9457   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9458 esac
9459
9460 if test -z "$BISON"; then
9461   for ac_prog in bison
9462 do
9463   # Extract the first word of "$ac_prog", so it can be a program name with args.
9464 set dummy $ac_prog; ac_word=$2
9465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9466 $as_echo_n "checking for $ac_word... " >&6; }
9467 if ${ac_cv_path_BISON+:} false; then :
9468   $as_echo_n "(cached) " >&6
9469 else
9470   case $BISON in
9471   [\\/]* | ?:[\\/]*)
9472   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9473   ;;
9474   *)
9475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9476 for as_dir in $PATH
9477 do
9478   IFS=$as_save_IFS
9479   test -z "$as_dir" && as_dir=.
9480     for ac_exec_ext in '' $ac_executable_extensions; do
9481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9482     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9484     break 2
9485   fi
9486 done
9487   done
9488 IFS=$as_save_IFS
9489
9490   ;;
9491 esac
9492 fi
9493 BISON=$ac_cv_path_BISON
9494 if test -n "$BISON"; then
9495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9496 $as_echo "$BISON" >&6; }
9497 else
9498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9499 $as_echo "no" >&6; }
9500 fi
9501
9502
9503   test -n "$BISON" && break
9504 done
9505
9506 else
9507   # Report the value of BISON in configure's output in all cases.
9508   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9509 $as_echo_n "checking for BISON... " >&6; }
9510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9511 $as_echo "$BISON" >&6; }
9512 fi
9513
9514
9515 if test "$BISON"; then
9516   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9517   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9518 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9519   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9520   then
9521     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9522 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9523 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9524 $as_echo "$as_me: WARNING:
9525 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9526 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9527     BISON=""
9528   fi
9529   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9530   # of the now preferred %name-prefix "base_yy", but the latter
9531   # doesn't work with Bison 2.3 or less.  So for now we silence the
9532   # deprecation warnings.
9533   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9534   then
9535     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9536   fi
9537 fi
9538
9539 if test -z "$BISON"; then
9540   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9541 *** Without Bison you will not be able to build PostgreSQL from Git nor
9542 *** change any of the parser definition files.  You can obtain Bison from
9543 *** a GNU mirror site.  (If you are using the official distribution of
9544 *** PostgreSQL then you do not need to worry about this, because the Bison
9545 *** output is pre-generated.)" >&5
9546 $as_echo "$as_me: WARNING:
9547 *** Without Bison you will not be able to build PostgreSQL from Git nor
9548 *** change any of the parser definition files.  You can obtain Bison from
9549 *** a GNU mirror site.  (If you are using the official distribution of
9550 *** PostgreSQL then you do not need to worry about this, because the Bison
9551 *** output is pre-generated.)" >&2;}
9552 fi
9553 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9554
9555
9556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9557 $as_echo_n "checking for flex... " >&6; }
9558 if ${pgac_cv_path_flex+:} false; then :
9559   $as_echo_n "(cached) " >&6
9560 else
9561   # Let the user override the test
9562 if test -n "$FLEX"; then
9563   pgac_cv_path_flex=$FLEX
9564 else
9565   pgac_save_IFS=$IFS
9566   IFS=$PATH_SEPARATOR
9567   for pgac_dir in $PATH; do
9568     IFS=$pgac_save_IFS
9569     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9570       pgac_dir=`pwd`
9571     fi
9572     for pgac_prog in flex lex; do
9573       pgac_candidate="$pgac_dir/$pgac_prog"
9574       if test -f "$pgac_candidate" \
9575         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9576       then
9577         echo '%%'  > conftest.l
9578         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9579           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9580           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;}'
9581           then
9582             pgac_cv_path_flex=$pgac_candidate
9583             break 2
9584           else
9585             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9586 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9587 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9588 $as_echo "$as_me: WARNING:
9589 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9590 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9591           fi
9592         fi
9593       fi
9594     done
9595   done
9596   rm -f conftest.l lex.yy.c
9597   : ${pgac_cv_path_flex=no}
9598 fi
9599
9600 fi
9601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9602 $as_echo "$pgac_cv_path_flex" >&6; }
9603 if test x"$pgac_cv_path_flex" = x"no"; then
9604   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9605 *** Without Flex you will not be able to build PostgreSQL from Git nor
9606 *** change any of the scanner definition files.  You can obtain Flex from
9607 *** a GNU mirror site.  (If you are using the official distribution of
9608 *** PostgreSQL then you do not need to worry about this because the Flex
9609 *** output is pre-generated.)" >&5
9610 $as_echo "$as_me: WARNING:
9611 *** Without Flex you will not be able to build PostgreSQL from Git nor
9612 *** change any of the scanner definition files.  You can obtain Flex from
9613 *** a GNU mirror site.  (If you are using the official distribution of
9614 *** PostgreSQL then you do not need to worry about this because the Flex
9615 *** output is pre-generated.)" >&2;}
9616
9617   FLEX=
9618 else
9619   FLEX=$pgac_cv_path_flex
9620   pgac_flex_version=`$FLEX --version 2>/dev/null`
9621   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9622 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9623 fi
9624
9625
9626
9627
9628
9629 if test -z "$PERL"; then
9630   for ac_prog in perl
9631 do
9632   # Extract the first word of "$ac_prog", so it can be a program name with args.
9633 set dummy $ac_prog; ac_word=$2
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9635 $as_echo_n "checking for $ac_word... " >&6; }
9636 if ${ac_cv_path_PERL+:} false; then :
9637   $as_echo_n "(cached) " >&6
9638 else
9639   case $PERL in
9640   [\\/]* | ?:[\\/]*)
9641   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9642   ;;
9643   *)
9644   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9645 for as_dir in $PATH
9646 do
9647   IFS=$as_save_IFS
9648   test -z "$as_dir" && as_dir=.
9649     for ac_exec_ext in '' $ac_executable_extensions; do
9650   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9651     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9653     break 2
9654   fi
9655 done
9656   done
9657 IFS=$as_save_IFS
9658
9659   ;;
9660 esac
9661 fi
9662 PERL=$ac_cv_path_PERL
9663 if test -n "$PERL"; then
9664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9665 $as_echo "$PERL" >&6; }
9666 else
9667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9668 $as_echo "no" >&6; }
9669 fi
9670
9671
9672   test -n "$PERL" && break
9673 done
9674
9675 else
9676   # Report the value of PERL in configure's output in all cases.
9677   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9678 $as_echo_n "checking for PERL... " >&6; }
9679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9680 $as_echo "$PERL" >&6; }
9681 fi
9682
9683
9684 if test "$PERL"; then
9685   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'`
9686   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9687 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9688   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9689     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9690   then
9691     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9692 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9693 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9694 $as_echo "$as_me: WARNING:
9695 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9696 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9697     PERL=""
9698   fi
9699 fi
9700
9701 if test -z "$PERL"; then
9702   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9703 *** Without Perl you will not be able to build PostgreSQL from Git.
9704 *** You can obtain Perl from any CPAN mirror site.
9705 *** (If you are using the official distribution of PostgreSQL then you do not
9706 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9707 $as_echo "$as_me: WARNING:
9708 *** Without Perl you will not be able to build PostgreSQL from Git.
9709 *** You can obtain Perl from any CPAN mirror site.
9710 *** (If you are using the official distribution of PostgreSQL then you do not
9711 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9712 fi
9713
9714 if test "$with_perl" = yes; then
9715   if test -z "$PERL"; then
9716     as_fn_error $? "Perl not found" "$LINENO" 5
9717   fi
9718
9719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9720 $as_echo_n "checking for Perl archlibexp... " >&6; }
9721 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9722 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9724 $as_echo "$perl_archlibexp" >&6; }
9725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9726 $as_echo_n "checking for Perl privlibexp... " >&6; }
9727 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9728 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9730 $as_echo "$perl_privlibexp" >&6; }
9731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9732 $as_echo_n "checking for Perl useshrplib... " >&6; }
9733 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9734 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9736 $as_echo "$perl_useshrplib" >&6; }
9737   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9738     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9739 You might have to rebuild your Perl installation.  Refer to the
9740 documentation for details.  Use --without-perl to disable building
9741 PL/Perl." "$LINENO" 5
9742   fi
9743
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9745 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9746 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9748 $as_echo "$perl_ccflags" >&6; }
9749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9750 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9751 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9753 $as_echo "$perl_embed_ccflags" >&6; }
9754
9755
9756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9757 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9758 if test "$PORTNAME" = "win32" ; then
9759         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9760         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9761                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9762         else
9763                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9764                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9765                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9766                 fi
9767         fi
9768 else
9769         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9770         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9771         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9772 fi
9773 if test -z "$perl_embed_ldflags" ; then
9774         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9775 $as_echo "no" >&6; }
9776         as_fn_error $? "could not determine flags for linking embedded Perl.
9777 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9778 installed." "$LINENO" 5
9779 else
9780         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9781 $as_echo "$perl_embed_ldflags" >&6; }
9782 fi
9783
9784 fi
9785
9786 if test "$with_python" = yes; then
9787   if test -z "$PYTHON"; then
9788   for ac_prog in python
9789 do
9790   # Extract the first word of "$ac_prog", so it can be a program name with args.
9791 set dummy $ac_prog; ac_word=$2
9792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9793 $as_echo_n "checking for $ac_word... " >&6; }
9794 if ${ac_cv_path_PYTHON+:} false; then :
9795   $as_echo_n "(cached) " >&6
9796 else
9797   case $PYTHON in
9798   [\\/]* | ?:[\\/]*)
9799   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9800   ;;
9801   *)
9802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9803 for as_dir in $PATH
9804 do
9805   IFS=$as_save_IFS
9806   test -z "$as_dir" && as_dir=.
9807     for ac_exec_ext in '' $ac_executable_extensions; do
9808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9809     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9811     break 2
9812   fi
9813 done
9814   done
9815 IFS=$as_save_IFS
9816
9817   ;;
9818 esac
9819 fi
9820 PYTHON=$ac_cv_path_PYTHON
9821 if test -n "$PYTHON"; then
9822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9823 $as_echo "$PYTHON" >&6; }
9824 else
9825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9826 $as_echo "no" >&6; }
9827 fi
9828
9829
9830   test -n "$PYTHON" && break
9831 done
9832
9833 else
9834   # Report the value of PYTHON in configure's output in all cases.
9835   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9836 $as_echo_n "checking for PYTHON... " >&6; }
9837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9838 $as_echo "$PYTHON" >&6; }
9839 fi
9840
9841 if test x"$PYTHON" = x""; then
9842   as_fn_error $? "Python not found" "$LINENO" 5
9843 fi
9844
9845
9846 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9847 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9848 $as_echo "$as_me: using python $python_fullversion" >&6;}
9849 # python_fullversion is typically n.n.n plus some trailing junk
9850 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9851 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9852 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9853 # Reject unsupported Python versions as soon as practical.
9854 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9855   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9856 fi
9857
9858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9859 $as_echo_n "checking for Python distutils module... " >&6; }
9860 if "${PYTHON}" -c 'import distutils' 2>&5
9861 then
9862     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9863 $as_echo "yes" >&6; }
9864 else
9865     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866 $as_echo "no" >&6; }
9867     as_fn_error $? "distutils module not found" "$LINENO" 5
9868 fi
9869
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9871 $as_echo_n "checking Python configuration directory... " >&6; }
9872 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9874 $as_echo "$python_configdir" >&6; }
9875
9876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9877 $as_echo_n "checking Python include directories... " >&6; }
9878 python_includespec=`${PYTHON} -c "
9879 import distutils.sysconfig
9880 a = '-I' + distutils.sysconfig.get_python_inc(False)
9881 b = '-I' + distutils.sysconfig.get_python_inc(True)
9882 if a == b:
9883     print(a)
9884 else:
9885     print(a + ' ' + b)"`
9886 if test "$PORTNAME" = win32 ; then
9887     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9888 fi
9889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9890 $as_echo "$python_includespec" >&6; }
9891
9892
9893
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9895 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9896
9897 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9898 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9899
9900 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9901 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9902 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9903 then
9904         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9905         found_shlib=1
9906 else
9907         # Otherwise, guess the base name of the shlib.
9908         # LDVERSION was added in Python 3.2, before that use VERSION,
9909         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9910         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9911         if test x"${python_ldversion}" != x""; then
9912                 ldlibrary="python${python_ldversion}"
9913         else
9914                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9915                 if test x"${python_version_var}" != x""; then
9916                         ldlibrary="python${python_version_var}"
9917                 else
9918                         ldlibrary="python${python_version}"
9919                 fi
9920         fi
9921         # Search for a likely-looking file.
9922         found_shlib=0
9923         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9924         do
9925                 # We don't know the platform DLSUFFIX here, so check 'em all.
9926                 for e in .so .dll .dylib .sl; do
9927                         if test -e "$d/lib${ldlibrary}$e"; then
9928                                 python_libdir="$d"
9929                                 found_shlib=1
9930                                 break 2
9931                         fi
9932                 done
9933         done
9934         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9935         # (".so.n.n") as well. However, check this only after failing to find
9936         # ".so" anywhere, because yet other platforms (Debian) put the .so
9937         # symlink in a different directory from the underlying versioned shlib.
9938         if test "$found_shlib" != 1; then
9939                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9940                 do
9941                         for f in "$d/lib${ldlibrary}.so."* ; do
9942                                 if test -e "$f"; then
9943                                         python_libdir="$d"
9944                                         found_shlib=1
9945                                         break 2
9946                                 fi
9947                         done
9948                 done
9949         fi
9950         # As usual, Windows has its own ideas.  Possible default library
9951         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9952         # and the "lib" prefix might not be there.
9953         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9954                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9955                 do
9956                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9957                                 if test -e "$f"; then
9958                                         python_libdir="$d"
9959                                         found_shlib=1
9960                                         break 2
9961                                 fi
9962                         done
9963                 done
9964         fi
9965 fi
9966 if test "$found_shlib" != 1; then
9967         as_fn_error $? "could not find shared library for Python
9968 You might have to rebuild your Python installation.  Refer to the
9969 documentation for details.  Use --without-python to disable building
9970 PL/Python." "$LINENO" 5
9971 fi
9972 python_libspec="-L${python_libdir} -l${ldlibrary}"
9973
9974 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9975
9976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9977 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9978
9979
9980
9981 fi
9982
9983 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9984   if test -z "$ZIC"; then
9985   for ac_prog in zic
9986 do
9987   # Extract the first word of "$ac_prog", so it can be a program name with args.
9988 set dummy $ac_prog; ac_word=$2
9989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9990 $as_echo_n "checking for $ac_word... " >&6; }
9991 if ${ac_cv_path_ZIC+:} false; then :
9992   $as_echo_n "(cached) " >&6
9993 else
9994   case $ZIC in
9995   [\\/]* | ?:[\\/]*)
9996   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9997   ;;
9998   *)
9999   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10000 for as_dir in $PATH
10001 do
10002   IFS=$as_save_IFS
10003   test -z "$as_dir" && as_dir=.
10004     for ac_exec_ext in '' $ac_executable_extensions; do
10005   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10006     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10008     break 2
10009   fi
10010 done
10011   done
10012 IFS=$as_save_IFS
10013
10014   ;;
10015 esac
10016 fi
10017 ZIC=$ac_cv_path_ZIC
10018 if test -n "$ZIC"; then
10019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10020 $as_echo "$ZIC" >&6; }
10021 else
10022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10023 $as_echo "no" >&6; }
10024 fi
10025
10026
10027   test -n "$ZIC" && break
10028 done
10029
10030 else
10031   # Report the value of ZIC in configure's output in all cases.
10032   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10033 $as_echo_n "checking for ZIC... " >&6; }
10034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10035 $as_echo "$ZIC" >&6; }
10036 fi
10037
10038   if test -z "$ZIC"; then
10039     as_fn_error $? "
10040 When cross-compiling, either use the option --with-system-tzdata to use
10041 existing time-zone data, or set the environment variable ZIC to a zic
10042 program to use during the build." "$LINENO" 5
10043   fi
10044 fi
10045
10046 #
10047 # Pthreads
10048 #
10049 # For each platform, we need to know about any special compile and link
10050 # libraries, and whether the normal C function names are thread-safe.
10051 # See the comment at the top of src/port/thread.c for more information.
10052 # WIN32 doesn't need the pthread tests;  it always uses threads
10053 #
10054 # These tests are run before the library-tests, because linking with the
10055 # other libraries can pull in the pthread functions as a side-effect.  We
10056 # want to use the -pthread or similar flags directly, and not rely on
10057 # the side-effects of linking with some other library.
10058 #
10059 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
10060 # invocation below is the first one in the script, and autoconf generates
10061 # additional code for that, which must not be inside the if-block. AS_IF
10062 # knows how to do that.
10063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10064 $as_echo_n "checking for ANSI C header files... " >&6; }
10065 if ${ac_cv_header_stdc+:} false; then :
10066   $as_echo_n "(cached) " >&6
10067 else
10068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10069 /* end confdefs.h.  */
10070 #include <stdlib.h>
10071 #include <stdarg.h>
10072 #include <string.h>
10073 #include <float.h>
10074
10075 int
10076 main ()
10077 {
10078
10079   ;
10080   return 0;
10081 }
10082 _ACEOF
10083 if ac_fn_c_try_compile "$LINENO"; then :
10084   ac_cv_header_stdc=yes
10085 else
10086   ac_cv_header_stdc=no
10087 fi
10088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10089
10090 if test $ac_cv_header_stdc = yes; then
10091   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10092   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10093 /* end confdefs.h.  */
10094 #include <string.h>
10095
10096 _ACEOF
10097 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10098   $EGREP "memchr" >/dev/null 2>&1; then :
10099
10100 else
10101   ac_cv_header_stdc=no
10102 fi
10103 rm -f conftest*
10104
10105 fi
10106
10107 if test $ac_cv_header_stdc = yes; then
10108   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10110 /* end confdefs.h.  */
10111 #include <stdlib.h>
10112
10113 _ACEOF
10114 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10115   $EGREP "free" >/dev/null 2>&1; then :
10116
10117 else
10118   ac_cv_header_stdc=no
10119 fi
10120 rm -f conftest*
10121
10122 fi
10123
10124 if test $ac_cv_header_stdc = yes; then
10125   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10126   if test "$cross_compiling" = yes; then :
10127   :
10128 else
10129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10130 /* end confdefs.h.  */
10131 #include <ctype.h>
10132 #include <stdlib.h>
10133 #if ((' ' & 0x0FF) == 0x020)
10134 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10135 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10136 #else
10137 # define ISLOWER(c) \
10138                    (('a' <= (c) && (c) <= 'i') \
10139                      || ('j' <= (c) && (c) <= 'r') \
10140                      || ('s' <= (c) && (c) <= 'z'))
10141 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10142 #endif
10143
10144 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10145 int
10146 main ()
10147 {
10148   int i;
10149   for (i = 0; i < 256; i++)
10150     if (XOR (islower (i), ISLOWER (i))
10151         || toupper (i) != TOUPPER (i))
10152       return 2;
10153   return 0;
10154 }
10155 _ACEOF
10156 if ac_fn_c_try_run "$LINENO"; then :
10157
10158 else
10159   ac_cv_header_stdc=no
10160 fi
10161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10162   conftest.$ac_objext conftest.beam conftest.$ac_ext
10163 fi
10164
10165 fi
10166 fi
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10168 $as_echo "$ac_cv_header_stdc" >&6; }
10169 if test $ac_cv_header_stdc = yes; then
10170
10171 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10172
10173 fi
10174
10175 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10176 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10177                   inttypes.h stdint.h unistd.h
10178 do :
10179   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10180 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10181 "
10182 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10183   cat >>confdefs.h <<_ACEOF
10184 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10185 _ACEOF
10186
10187 fi
10188
10189 done
10190
10191
10192 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10193    # then
10194
10195
10196
10197 ac_ext=c
10198 ac_cpp='$CPP $CPPFLAGS'
10199 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10200 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10201 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10202
10203 ax_pthread_ok=no
10204
10205 # We used to check for pthread.h first, but this fails if pthread.h
10206 # requires special compiler flags (e.g. on Tru64 or Sequent).
10207 # It gets checked for in the link test anyway.
10208
10209 # First of all, check if the user has set any of the PTHREAD_LIBS,
10210 # etcetera environment variables, and if threads linking works using
10211 # them:
10212 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
10213         save_CFLAGS="$CFLAGS"
10214         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10215         save_LIBS="$LIBS"
10216         LIBS="$PTHREAD_LIBS $LIBS"
10217         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10218 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10219         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10220 /* end confdefs.h.  */
10221
10222 /* Override any GCC internal prototype to avoid an error.
10223    Use char because int might match the return type of a GCC
10224    builtin and then its argument prototype would still apply.  */
10225 #ifdef __cplusplus
10226 extern "C"
10227 #endif
10228 char pthread_join ();
10229 int
10230 main ()
10231 {
10232 return pthread_join ();
10233   ;
10234   return 0;
10235 }
10236 _ACEOF
10237 if ac_fn_c_try_link "$LINENO"; then :
10238   ax_pthread_ok=yes
10239 fi
10240 rm -f core conftest.err conftest.$ac_objext \
10241     conftest$ac_exeext conftest.$ac_ext
10242         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10243 $as_echo "$ax_pthread_ok" >&6; }
10244         if test x"$ax_pthread_ok" = xno; then
10245                 PTHREAD_LIBS=""
10246                 PTHREAD_CFLAGS=""
10247         fi
10248         LIBS="$save_LIBS"
10249         CFLAGS="$save_CFLAGS"
10250 fi
10251
10252 # We must check for the threads library under a number of different
10253 # names; the ordering is very important because some systems
10254 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10255 # libraries is broken (non-POSIX).
10256
10257 # Create a list of thread flags to try.  Items starting with a "-" are
10258 # C compiler flags, and other items are library names, except for "none"
10259 # which indicates that we try without any flags at all, and "pthread-config"
10260 # which is a program returning the flags for the Pth emulation library.
10261
10262 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
10263
10264 # The ordering *is* (sometimes) important.  Some notes on the
10265 # individual items follow:
10266
10267 # pthreads: AIX (must check this before -lpthread)
10268 # none: in case threads are in libc; should be tried before -Kthread and
10269 #       other compiler flags to prevent continual compiler warnings
10270 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10271 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10272 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10273 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10274 # -pthreads: Solaris/gcc
10275 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10276 #      doesn't hurt to check since this sometimes defines pthreads and
10277 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10278 #      is present but should not be used directly)
10279 # -mthreads: Mingw32/gcc, Lynx/gcc
10280 # pthread: Linux, etcetera
10281 # --thread-safe: KAI C++
10282 # pthread-config: use pthread-config program (for GNU Pth library)
10283
10284 case $host_os in
10285
10286         hpux*)
10287
10288         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10289         # multi-threading and also sets -lpthread."
10290
10291         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10292         ;;
10293
10294         openedition*)
10295
10296         # IBM z/OS requires a feature-test macro to be defined in order to
10297         # enable POSIX threads at all, so give the user a hint if this is
10298         # not set. (We don't define these ourselves, as they can affect
10299         # other portions of the system API in unpredictable ways.)
10300
10301         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10302 /* end confdefs.h.  */
10303
10304 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10305              AX_PTHREAD_ZOS_MISSING
10306 #            endif
10307
10308 _ACEOF
10309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10310   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10311   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10312 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10313 fi
10314 rm -f conftest*
10315
10316         ;;
10317
10318         solaris*)
10319
10320         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
10321         # check that first.  On some older versions, libc contains stubbed
10322         # (non-functional) versions of the pthreads routines, so link-based
10323         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
10324         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
10325         # a function called by this macro, so we could check for that, but
10326         # who knows whether they'll stub that too in a future libc.)  So
10327         # we'll look for -pthreads and -lpthread shortly thereafter.
10328
10329         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
10330         ;;
10331 esac
10332
10333 # Older versions of Clang only give a warning instead of an error for an
10334 # unrecognized option, unless we specify -Werror. (We throw in some extra
10335 # Clang warning flags for good measure.)
10336
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
10338 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
10339 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
10340   $as_echo_n "(cached) " >&6
10341 else
10342   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
10343      save_CFLAGS="$CFLAGS"
10344      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
10345      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
10346      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10347 /* end confdefs.h.  */
10348 int foo(void);
10349 int
10350 main ()
10351 {
10352 foo()
10353   ;
10354   return 0;
10355 }
10356 _ACEOF
10357 if ac_fn_c_try_compile "$LINENO"; then :
10358   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
10359 else
10360   ax_cv_PTHREAD_REJECT_UNKNOWN=no
10361 fi
10362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10363      CFLAGS="$save_CFLAGS"
10364
10365 fi
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
10367 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
10368 ax_pthread_extra_flags=
10369 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
10370   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
10371 fi
10372
10373 if test x"$ax_pthread_ok" = xno; then
10374 for flag in $ax_pthread_flags; do
10375
10376         case $flag in
10377                 none)
10378                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10379 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10380                 ;;
10381
10382                 -mt,pthread)
10383                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10384 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10385                 PTHREAD_CFLAGS="-mt"
10386                 PTHREAD_LIBS="-lpthread"
10387                 ;;
10388
10389                 -*)
10390                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
10391 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
10392                 PTHREAD_CFLAGS="$flag"
10393                 ;;
10394
10395                 pthread-config)
10396                 # Extract the first word of "pthread-config", so it can be a program name with args.
10397 set dummy pthread-config; ac_word=$2
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10399 $as_echo_n "checking for $ac_word... " >&6; }
10400 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10401   $as_echo_n "(cached) " >&6
10402 else
10403   if test -n "$ax_pthread_config"; then
10404   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10405 else
10406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10407 for as_dir in $PATH
10408 do
10409   IFS=$as_save_IFS
10410   test -z "$as_dir" && as_dir=.
10411     for ac_exec_ext in '' $ac_executable_extensions; do
10412   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10413     ac_cv_prog_ax_pthread_config="yes"
10414     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10415     break 2
10416   fi
10417 done
10418   done
10419 IFS=$as_save_IFS
10420
10421   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10422 fi
10423 fi
10424 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10425 if test -n "$ax_pthread_config"; then
10426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10427 $as_echo "$ax_pthread_config" >&6; }
10428 else
10429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10430 $as_echo "no" >&6; }
10431 fi
10432
10433
10434                 if test x"$ax_pthread_config" = xno; then continue; fi
10435                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10436                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10437                 ;;
10438
10439                 *)
10440                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
10441 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
10442                 PTHREAD_LIBS="-l$flag"
10443                 ;;
10444         esac
10445
10446         save_LIBS="$LIBS"
10447         save_CFLAGS="$CFLAGS"
10448         LIBS="$PTHREAD_LIBS $LIBS"
10449         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
10450
10451         # Check for various functions.  We must include pthread.h,
10452         # since some functions may be macros.  (On the Sequent, we
10453         # need a special flag -Kthread to make this header compile.)
10454         # We check for pthread_join because it is in -lpthread on IRIX
10455         # while pthread_create is in libc.  We check for pthread_attr_init
10456         # due to DEC craziness with -lpthreads.  We check for
10457         # pthread_cleanup_push because it is one of the few pthread
10458         # functions on Solaris that doesn't have a non-functional libc stub.
10459         # We try pthread_create on general principles.
10460         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10461 /* end confdefs.h.  */
10462 #include <pthread.h>
10463                         static void routine(void *a) { a = 0; }
10464                         static void *start_routine(void *a) { return a; }
10465 int
10466 main ()
10467 {
10468 pthread_t th; pthread_attr_t attr;
10469                         pthread_create(&th, 0, start_routine, 0);
10470                         pthread_join(th, 0);
10471                         pthread_attr_init(&attr);
10472                         pthread_cleanup_push(routine, 0);
10473                         pthread_cleanup_pop(0) /* ; */
10474   ;
10475   return 0;
10476 }
10477 _ACEOF
10478 if ac_fn_c_try_link "$LINENO"; then :
10479   ax_pthread_ok=yes
10480 fi
10481 rm -f core conftest.err conftest.$ac_objext \
10482     conftest$ac_exeext conftest.$ac_ext
10483
10484         LIBS="$save_LIBS"
10485         CFLAGS="$save_CFLAGS"
10486
10487         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10488 $as_echo "$ax_pthread_ok" >&6; }
10489         if test "x$ax_pthread_ok" = xyes; then
10490                 break;
10491         fi
10492
10493         PTHREAD_LIBS=""
10494         PTHREAD_CFLAGS=""
10495 done
10496 fi
10497
10498 # Various other checks:
10499 if test "x$ax_pthread_ok" = xyes; then
10500         save_LIBS="$LIBS"
10501         LIBS="$PTHREAD_LIBS $LIBS"
10502         save_CFLAGS="$CFLAGS"
10503         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10504
10505         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10506         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10507 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10508 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10509   $as_echo_n "(cached) " >&6
10510 else
10511   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10512              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10513                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10514 /* end confdefs.h.  */
10515 #include <pthread.h>
10516 int
10517 main ()
10518 {
10519 int attr = $attr; return attr /* ; */
10520   ;
10521   return 0;
10522 }
10523 _ACEOF
10524 if ac_fn_c_try_link "$LINENO"; then :
10525   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
10526 fi
10527 rm -f core conftest.err conftest.$ac_objext \
10528     conftest$ac_exeext conftest.$ac_ext
10529              done
10530
10531 fi
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10533 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10534         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
10535                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
10536
10537 cat >>confdefs.h <<_ACEOF
10538 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10539 _ACEOF
10540
10541 fi
10542
10543         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
10544 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
10545 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10546   $as_echo_n "(cached) " >&6
10547 else
10548   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10549              ax_pthread_special_flags_added=no
10550              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10551 /* end confdefs.h.  */
10552
10553 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
10554                   AX_PTHREAD_NEED_SPECIAL_FLAG
10555 #                 endif
10556
10557 _ACEOF
10558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10559   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
10560   case $host_os in
10561                   aix* | freebsd*)
10562                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
10563                   ;;
10564                   darwin* | hpux* | osf* | solaris*)
10565                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
10566                   ;;
10567                   esac
10568
10569 fi
10570 rm -f conftest*
10571
10572
10573 fi
10574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10575 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10576         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10577                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10578   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10579                ax_pthread_special_flags_added=yes
10580 fi
10581
10582         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10583 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10584 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10585   $as_echo_n "(cached) " >&6
10586 else
10587   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10588 /* end confdefs.h.  */
10589 #include <pthread.h>
10590 int
10591 main ()
10592 {
10593 int i = PTHREAD_PRIO_INHERIT;
10594   ;
10595   return 0;
10596 }
10597 _ACEOF
10598 if ac_fn_c_try_link "$LINENO"; then :
10599   ax_cv_PTHREAD_PRIO_INHERIT=yes
10600 else
10601   ax_cv_PTHREAD_PRIO_INHERIT=no
10602 fi
10603 rm -f core conftest.err conftest.$ac_objext \
10604     conftest$ac_exeext conftest.$ac_ext
10605
10606 fi
10607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10608 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10609         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
10610
10611 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10612
10613 fi
10614
10615         LIBS="$save_LIBS"
10616         CFLAGS="$save_CFLAGS"
10617
10618         # More AIX lossage: compile with *_r variant
10619         if test "x$GCC" != xyes; then
10620             case $host_os in
10621                 aix*)
10622                 case "x/$CC" in #(
10623   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10624     #handle absolute path differently from PATH based program lookup
10625                    case "x$CC" in #(
10626   x/*) :
10627     if as_fn_executable_p ${CC}_r; then :
10628   PTHREAD_CC="${CC}_r"
10629 fi ;; #(
10630   *) :
10631     for ac_prog in ${CC}_r
10632 do
10633   # Extract the first word of "$ac_prog", so it can be a program name with args.
10634 set dummy $ac_prog; ac_word=$2
10635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10636 $as_echo_n "checking for $ac_word... " >&6; }
10637 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10638   $as_echo_n "(cached) " >&6
10639 else
10640   if test -n "$PTHREAD_CC"; then
10641   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10642 else
10643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10644 for as_dir in $PATH
10645 do
10646   IFS=$as_save_IFS
10647   test -z "$as_dir" && as_dir=.
10648     for ac_exec_ext in '' $ac_executable_extensions; do
10649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10650     ac_cv_prog_PTHREAD_CC="$ac_prog"
10651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10652     break 2
10653   fi
10654 done
10655   done
10656 IFS=$as_save_IFS
10657
10658 fi
10659 fi
10660 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10661 if test -n "$PTHREAD_CC"; then
10662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10663 $as_echo "$PTHREAD_CC" >&6; }
10664 else
10665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10666 $as_echo "no" >&6; }
10667 fi
10668
10669
10670   test -n "$PTHREAD_CC" && break
10671 done
10672 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10673  ;;
10674 esac ;; #(
10675   *) :
10676      ;;
10677 esac
10678                 ;;
10679             esac
10680         fi
10681 fi
10682
10683 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10684
10685
10686
10687
10688
10689 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10690 if test x"$ax_pthread_ok" = xyes; then
10691
10692 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10693
10694         :
10695 else
10696         ax_pthread_ok=no
10697
10698 fi
10699 ac_ext=c
10700 ac_cpp='$CPP $CPPFLAGS'
10701 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10702 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10703 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10704
10705         # set thread flags
10706
10707 # Some platforms use these, so just define them.  They can't hurt if they
10708 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10709 # enables 5-arg getpwuid_r, among other things.
10710 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10711
10712 # Check for *_r functions
10713 _CFLAGS="$CFLAGS"
10714 _LIBS="$LIBS"
10715 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10716 LIBS="$LIBS $PTHREAD_LIBS"
10717
10718 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10719 if test "x$ac_cv_header_pthread_h" = xyes; then :
10720
10721 else
10722   as_fn_error $? "
10723 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10724 fi
10725
10726
10727
10728 for ac_func in strerror_r getpwuid_r gethostbyname_r
10729 do :
10730   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10731 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10732 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10733   cat >>confdefs.h <<_ACEOF
10734 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10735 _ACEOF
10736
10737 fi
10738 done
10739
10740
10741 # Do test here with the proper thread flags
10742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10743 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10744 if ${pgac_cv_func_strerror_r_int+:} false; then :
10745   $as_echo_n "(cached) " >&6
10746 else
10747   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10748 /* end confdefs.h.  */
10749 #include <string.h>
10750 int
10751 main ()
10752 {
10753 #ifndef _AIX
10754 int strerror_r(int, char *, size_t);
10755 #else
10756 /* Older AIX has 'int' for the third argument so we don't test the args. */
10757 int strerror_r();
10758 #endif
10759   ;
10760   return 0;
10761 }
10762 _ACEOF
10763 if ac_fn_c_try_compile "$LINENO"; then :
10764   pgac_cv_func_strerror_r_int=yes
10765 else
10766   pgac_cv_func_strerror_r_int=no
10767 fi
10768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10769 fi
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10771 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10772 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10773
10774 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10775
10776 fi
10777
10778
10779 CFLAGS="$_CFLAGS"
10780 LIBS="$_LIBS"
10781
10782
10783 else
10784    # else
10785 # do not use values from template file
10786 PTHREAD_CFLAGS=
10787 PTHREAD_LIBS=
10788
10789 fi # fi
10790
10791
10792
10793
10794
10795 ##
10796 ## Libraries
10797 ##
10798 ## Most libraries are included only if they demonstrably provide a function
10799 ## we need, but libm is an exception: always include it, because there are
10800 ## too many compilers that play cute optimization games that will break
10801 ## probes for standard functions such as pow().
10802 ##
10803
10804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10805 $as_echo_n "checking for main in -lm... " >&6; }
10806 if ${ac_cv_lib_m_main+:} false; then :
10807   $as_echo_n "(cached) " >&6
10808 else
10809   ac_check_lib_save_LIBS=$LIBS
10810 LIBS="-lm  $LIBS"
10811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10812 /* end confdefs.h.  */
10813
10814
10815 int
10816 main ()
10817 {
10818 return main ();
10819   ;
10820   return 0;
10821 }
10822 _ACEOF
10823 if ac_fn_c_try_link "$LINENO"; then :
10824   ac_cv_lib_m_main=yes
10825 else
10826   ac_cv_lib_m_main=no
10827 fi
10828 rm -f core conftest.err conftest.$ac_objext \
10829     conftest$ac_exeext conftest.$ac_ext
10830 LIBS=$ac_check_lib_save_LIBS
10831 fi
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10833 $as_echo "$ac_cv_lib_m_main" >&6; }
10834 if test "x$ac_cv_lib_m_main" = xyes; then :
10835   cat >>confdefs.h <<_ACEOF
10836 #define HAVE_LIBM 1
10837 _ACEOF
10838
10839   LIBS="-lm $LIBS"
10840
10841 fi
10842
10843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10844 $as_echo_n "checking for library containing setproctitle... " >&6; }
10845 if ${ac_cv_search_setproctitle+:} false; then :
10846   $as_echo_n "(cached) " >&6
10847 else
10848   ac_func_search_save_LIBS=$LIBS
10849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10850 /* end confdefs.h.  */
10851
10852 /* Override any GCC internal prototype to avoid an error.
10853    Use char because int might match the return type of a GCC
10854    builtin and then its argument prototype would still apply.  */
10855 #ifdef __cplusplus
10856 extern "C"
10857 #endif
10858 char setproctitle ();
10859 int
10860 main ()
10861 {
10862 return setproctitle ();
10863   ;
10864   return 0;
10865 }
10866 _ACEOF
10867 for ac_lib in '' util; do
10868   if test -z "$ac_lib"; then
10869     ac_res="none required"
10870   else
10871     ac_res=-l$ac_lib
10872     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10873   fi
10874   if ac_fn_c_try_link "$LINENO"; then :
10875   ac_cv_search_setproctitle=$ac_res
10876 fi
10877 rm -f core conftest.err conftest.$ac_objext \
10878     conftest$ac_exeext
10879   if ${ac_cv_search_setproctitle+:} false; then :
10880   break
10881 fi
10882 done
10883 if ${ac_cv_search_setproctitle+:} false; then :
10884
10885 else
10886   ac_cv_search_setproctitle=no
10887 fi
10888 rm conftest.$ac_ext
10889 LIBS=$ac_func_search_save_LIBS
10890 fi
10891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
10892 $as_echo "$ac_cv_search_setproctitle" >&6; }
10893 ac_res=$ac_cv_search_setproctitle
10894 if test "$ac_res" != no; then :
10895   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10896
10897 fi
10898
10899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10900 $as_echo_n "checking for library containing dlopen... " >&6; }
10901 if ${ac_cv_search_dlopen+:} false; then :
10902   $as_echo_n "(cached) " >&6
10903 else
10904   ac_func_search_save_LIBS=$LIBS
10905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10906 /* end confdefs.h.  */
10907
10908 /* Override any GCC internal prototype to avoid an error.
10909    Use char because int might match the return type of a GCC
10910    builtin and then its argument prototype would still apply.  */
10911 #ifdef __cplusplus
10912 extern "C"
10913 #endif
10914 char dlopen ();
10915 int
10916 main ()
10917 {
10918 return dlopen ();
10919   ;
10920   return 0;
10921 }
10922 _ACEOF
10923 for ac_lib in '' dl; do
10924   if test -z "$ac_lib"; then
10925     ac_res="none required"
10926   else
10927     ac_res=-l$ac_lib
10928     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10929   fi
10930   if ac_fn_c_try_link "$LINENO"; then :
10931   ac_cv_search_dlopen=$ac_res
10932 fi
10933 rm -f core conftest.err conftest.$ac_objext \
10934     conftest$ac_exeext
10935   if ${ac_cv_search_dlopen+:} false; then :
10936   break
10937 fi
10938 done
10939 if ${ac_cv_search_dlopen+:} false; then :
10940
10941 else
10942   ac_cv_search_dlopen=no
10943 fi
10944 rm conftest.$ac_ext
10945 LIBS=$ac_func_search_save_LIBS
10946 fi
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10948 $as_echo "$ac_cv_search_dlopen" >&6; }
10949 ac_res=$ac_cv_search_dlopen
10950 if test "$ac_res" != no; then :
10951   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10952
10953 fi
10954
10955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
10956 $as_echo_n "checking for library containing socket... " >&6; }
10957 if ${ac_cv_search_socket+:} false; then :
10958   $as_echo_n "(cached) " >&6
10959 else
10960   ac_func_search_save_LIBS=$LIBS
10961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10962 /* end confdefs.h.  */
10963
10964 /* Override any GCC internal prototype to avoid an error.
10965    Use char because int might match the return type of a GCC
10966    builtin and then its argument prototype would still apply.  */
10967 #ifdef __cplusplus
10968 extern "C"
10969 #endif
10970 char socket ();
10971 int
10972 main ()
10973 {
10974 return socket ();
10975   ;
10976   return 0;
10977 }
10978 _ACEOF
10979 for ac_lib in '' socket ws2_32; do
10980   if test -z "$ac_lib"; then
10981     ac_res="none required"
10982   else
10983     ac_res=-l$ac_lib
10984     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10985   fi
10986   if ac_fn_c_try_link "$LINENO"; then :
10987   ac_cv_search_socket=$ac_res
10988 fi
10989 rm -f core conftest.err conftest.$ac_objext \
10990     conftest$ac_exeext
10991   if ${ac_cv_search_socket+:} false; then :
10992   break
10993 fi
10994 done
10995 if ${ac_cv_search_socket+:} false; then :
10996
10997 else
10998   ac_cv_search_socket=no
10999 fi
11000 rm conftest.$ac_ext
11001 LIBS=$ac_func_search_save_LIBS
11002 fi
11003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11004 $as_echo "$ac_cv_search_socket" >&6; }
11005 ac_res=$ac_cv_search_socket
11006 if test "$ac_res" != no; then :
11007   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11008
11009 fi
11010
11011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11012 $as_echo_n "checking for library containing shl_load... " >&6; }
11013 if ${ac_cv_search_shl_load+:} false; then :
11014   $as_echo_n "(cached) " >&6
11015 else
11016   ac_func_search_save_LIBS=$LIBS
11017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11018 /* end confdefs.h.  */
11019
11020 /* Override any GCC internal prototype to avoid an error.
11021    Use char because int might match the return type of a GCC
11022    builtin and then its argument prototype would still apply.  */
11023 #ifdef __cplusplus
11024 extern "C"
11025 #endif
11026 char shl_load ();
11027 int
11028 main ()
11029 {
11030 return shl_load ();
11031   ;
11032   return 0;
11033 }
11034 _ACEOF
11035 for ac_lib in '' dld; do
11036   if test -z "$ac_lib"; then
11037     ac_res="none required"
11038   else
11039     ac_res=-l$ac_lib
11040     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11041   fi
11042   if ac_fn_c_try_link "$LINENO"; then :
11043   ac_cv_search_shl_load=$ac_res
11044 fi
11045 rm -f core conftest.err conftest.$ac_objext \
11046     conftest$ac_exeext
11047   if ${ac_cv_search_shl_load+:} false; then :
11048   break
11049 fi
11050 done
11051 if ${ac_cv_search_shl_load+:} false; then :
11052
11053 else
11054   ac_cv_search_shl_load=no
11055 fi
11056 rm conftest.$ac_ext
11057 LIBS=$ac_func_search_save_LIBS
11058 fi
11059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11060 $as_echo "$ac_cv_search_shl_load" >&6; }
11061 ac_res=$ac_cv_search_shl_load
11062 if test "$ac_res" != no; then :
11063   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11064
11065 fi
11066
11067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11068 $as_echo_n "checking for library containing getopt_long... " >&6; }
11069 if ${ac_cv_search_getopt_long+:} false; then :
11070   $as_echo_n "(cached) " >&6
11071 else
11072   ac_func_search_save_LIBS=$LIBS
11073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11074 /* end confdefs.h.  */
11075
11076 /* Override any GCC internal prototype to avoid an error.
11077    Use char because int might match the return type of a GCC
11078    builtin and then its argument prototype would still apply.  */
11079 #ifdef __cplusplus
11080 extern "C"
11081 #endif
11082 char getopt_long ();
11083 int
11084 main ()
11085 {
11086 return getopt_long ();
11087   ;
11088   return 0;
11089 }
11090 _ACEOF
11091 for ac_lib in '' getopt gnugetopt; do
11092   if test -z "$ac_lib"; then
11093     ac_res="none required"
11094   else
11095     ac_res=-l$ac_lib
11096     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11097   fi
11098   if ac_fn_c_try_link "$LINENO"; then :
11099   ac_cv_search_getopt_long=$ac_res
11100 fi
11101 rm -f core conftest.err conftest.$ac_objext \
11102     conftest$ac_exeext
11103   if ${ac_cv_search_getopt_long+:} false; then :
11104   break
11105 fi
11106 done
11107 if ${ac_cv_search_getopt_long+:} false; then :
11108
11109 else
11110   ac_cv_search_getopt_long=no
11111 fi
11112 rm conftest.$ac_ext
11113 LIBS=$ac_func_search_save_LIBS
11114 fi
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11116 $as_echo "$ac_cv_search_getopt_long" >&6; }
11117 ac_res=$ac_cv_search_getopt_long
11118 if test "$ac_res" != no; then :
11119   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11120
11121 fi
11122
11123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11124 $as_echo_n "checking for library containing crypt... " >&6; }
11125 if ${ac_cv_search_crypt+:} false; then :
11126   $as_echo_n "(cached) " >&6
11127 else
11128   ac_func_search_save_LIBS=$LIBS
11129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11130 /* end confdefs.h.  */
11131
11132 /* Override any GCC internal prototype to avoid an error.
11133    Use char because int might match the return type of a GCC
11134    builtin and then its argument prototype would still apply.  */
11135 #ifdef __cplusplus
11136 extern "C"
11137 #endif
11138 char crypt ();
11139 int
11140 main ()
11141 {
11142 return crypt ();
11143   ;
11144   return 0;
11145 }
11146 _ACEOF
11147 for ac_lib in '' crypt; do
11148   if test -z "$ac_lib"; then
11149     ac_res="none required"
11150   else
11151     ac_res=-l$ac_lib
11152     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11153   fi
11154   if ac_fn_c_try_link "$LINENO"; then :
11155   ac_cv_search_crypt=$ac_res
11156 fi
11157 rm -f core conftest.err conftest.$ac_objext \
11158     conftest$ac_exeext
11159   if ${ac_cv_search_crypt+:} false; then :
11160   break
11161 fi
11162 done
11163 if ${ac_cv_search_crypt+:} false; then :
11164
11165 else
11166   ac_cv_search_crypt=no
11167 fi
11168 rm conftest.$ac_ext
11169 LIBS=$ac_func_search_save_LIBS
11170 fi
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11172 $as_echo "$ac_cv_search_crypt" >&6; }
11173 ac_res=$ac_cv_search_crypt
11174 if test "$ac_res" != no; then :
11175   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11176
11177 fi
11178
11179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11180 $as_echo_n "checking for library containing shm_open... " >&6; }
11181 if ${ac_cv_search_shm_open+:} false; then :
11182   $as_echo_n "(cached) " >&6
11183 else
11184   ac_func_search_save_LIBS=$LIBS
11185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11186 /* end confdefs.h.  */
11187
11188 /* Override any GCC internal prototype to avoid an error.
11189    Use char because int might match the return type of a GCC
11190    builtin and then its argument prototype would still apply.  */
11191 #ifdef __cplusplus
11192 extern "C"
11193 #endif
11194 char shm_open ();
11195 int
11196 main ()
11197 {
11198 return shm_open ();
11199   ;
11200   return 0;
11201 }
11202 _ACEOF
11203 for ac_lib in '' rt; do
11204   if test -z "$ac_lib"; then
11205     ac_res="none required"
11206   else
11207     ac_res=-l$ac_lib
11208     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11209   fi
11210   if ac_fn_c_try_link "$LINENO"; then :
11211   ac_cv_search_shm_open=$ac_res
11212 fi
11213 rm -f core conftest.err conftest.$ac_objext \
11214     conftest$ac_exeext
11215   if ${ac_cv_search_shm_open+:} false; then :
11216   break
11217 fi
11218 done
11219 if ${ac_cv_search_shm_open+:} false; then :
11220
11221 else
11222   ac_cv_search_shm_open=no
11223 fi
11224 rm conftest.$ac_ext
11225 LIBS=$ac_func_search_save_LIBS
11226 fi
11227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11228 $as_echo "$ac_cv_search_shm_open" >&6; }
11229 ac_res=$ac_cv_search_shm_open
11230 if test "$ac_res" != no; then :
11231   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11232
11233 fi
11234
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11236 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11237 if ${ac_cv_search_shm_unlink+:} false; then :
11238   $as_echo_n "(cached) " >&6
11239 else
11240   ac_func_search_save_LIBS=$LIBS
11241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11242 /* end confdefs.h.  */
11243
11244 /* Override any GCC internal prototype to avoid an error.
11245    Use char because int might match the return type of a GCC
11246    builtin and then its argument prototype would still apply.  */
11247 #ifdef __cplusplus
11248 extern "C"
11249 #endif
11250 char shm_unlink ();
11251 int
11252 main ()
11253 {
11254 return shm_unlink ();
11255   ;
11256   return 0;
11257 }
11258 _ACEOF
11259 for ac_lib in '' rt; do
11260   if test -z "$ac_lib"; then
11261     ac_res="none required"
11262   else
11263     ac_res=-l$ac_lib
11264     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11265   fi
11266   if ac_fn_c_try_link "$LINENO"; then :
11267   ac_cv_search_shm_unlink=$ac_res
11268 fi
11269 rm -f core conftest.err conftest.$ac_objext \
11270     conftest$ac_exeext
11271   if ${ac_cv_search_shm_unlink+:} false; then :
11272   break
11273 fi
11274 done
11275 if ${ac_cv_search_shm_unlink+:} false; then :
11276
11277 else
11278   ac_cv_search_shm_unlink=no
11279 fi
11280 rm conftest.$ac_ext
11281 LIBS=$ac_func_search_save_LIBS
11282 fi
11283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11284 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11285 ac_res=$ac_cv_search_shm_unlink
11286 if test "$ac_res" != no; then :
11287   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11288
11289 fi
11290
11291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11292 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11293 if ${ac_cv_search_clock_gettime+:} false; then :
11294   $as_echo_n "(cached) " >&6
11295 else
11296   ac_func_search_save_LIBS=$LIBS
11297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11298 /* end confdefs.h.  */
11299
11300 /* Override any GCC internal prototype to avoid an error.
11301    Use char because int might match the return type of a GCC
11302    builtin and then its argument prototype would still apply.  */
11303 #ifdef __cplusplus
11304 extern "C"
11305 #endif
11306 char clock_gettime ();
11307 int
11308 main ()
11309 {
11310 return clock_gettime ();
11311   ;
11312   return 0;
11313 }
11314 _ACEOF
11315 for ac_lib in '' rt posix4; do
11316   if test -z "$ac_lib"; then
11317     ac_res="none required"
11318   else
11319     ac_res=-l$ac_lib
11320     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11321   fi
11322   if ac_fn_c_try_link "$LINENO"; then :
11323   ac_cv_search_clock_gettime=$ac_res
11324 fi
11325 rm -f core conftest.err conftest.$ac_objext \
11326     conftest$ac_exeext
11327   if ${ac_cv_search_clock_gettime+:} false; then :
11328   break
11329 fi
11330 done
11331 if ${ac_cv_search_clock_gettime+:} false; then :
11332
11333 else
11334   ac_cv_search_clock_gettime=no
11335 fi
11336 rm conftest.$ac_ext
11337 LIBS=$ac_func_search_save_LIBS
11338 fi
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11340 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11341 ac_res=$ac_cv_search_clock_gettime
11342 if test "$ac_res" != no; then :
11343   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11344
11345 fi
11346
11347 # Solaris:
11348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11349 $as_echo_n "checking for library containing fdatasync... " >&6; }
11350 if ${ac_cv_search_fdatasync+:} false; then :
11351   $as_echo_n "(cached) " >&6
11352 else
11353   ac_func_search_save_LIBS=$LIBS
11354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11355 /* end confdefs.h.  */
11356
11357 /* Override any GCC internal prototype to avoid an error.
11358    Use char because int might match the return type of a GCC
11359    builtin and then its argument prototype would still apply.  */
11360 #ifdef __cplusplus
11361 extern "C"
11362 #endif
11363 char fdatasync ();
11364 int
11365 main ()
11366 {
11367 return fdatasync ();
11368   ;
11369   return 0;
11370 }
11371 _ACEOF
11372 for ac_lib in '' rt posix4; do
11373   if test -z "$ac_lib"; then
11374     ac_res="none required"
11375   else
11376     ac_res=-l$ac_lib
11377     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11378   fi
11379   if ac_fn_c_try_link "$LINENO"; then :
11380   ac_cv_search_fdatasync=$ac_res
11381 fi
11382 rm -f core conftest.err conftest.$ac_objext \
11383     conftest$ac_exeext
11384   if ${ac_cv_search_fdatasync+:} false; then :
11385   break
11386 fi
11387 done
11388 if ${ac_cv_search_fdatasync+:} false; then :
11389
11390 else
11391   ac_cv_search_fdatasync=no
11392 fi
11393 rm conftest.$ac_ext
11394 LIBS=$ac_func_search_save_LIBS
11395 fi
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11397 $as_echo "$ac_cv_search_fdatasync" >&6; }
11398 ac_res=$ac_cv_search_fdatasync
11399 if test "$ac_res" != no; then :
11400   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11401
11402 fi
11403
11404 # Required for thread_test.c on Solaris
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11406 $as_echo_n "checking for library containing sched_yield... " >&6; }
11407 if ${ac_cv_search_sched_yield+:} false; then :
11408   $as_echo_n "(cached) " >&6
11409 else
11410   ac_func_search_save_LIBS=$LIBS
11411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11412 /* end confdefs.h.  */
11413
11414 /* Override any GCC internal prototype to avoid an error.
11415    Use char because int might match the return type of a GCC
11416    builtin and then its argument prototype would still apply.  */
11417 #ifdef __cplusplus
11418 extern "C"
11419 #endif
11420 char sched_yield ();
11421 int
11422 main ()
11423 {
11424 return sched_yield ();
11425   ;
11426   return 0;
11427 }
11428 _ACEOF
11429 for ac_lib in '' rt; do
11430   if test -z "$ac_lib"; then
11431     ac_res="none required"
11432   else
11433     ac_res=-l$ac_lib
11434     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11435   fi
11436   if ac_fn_c_try_link "$LINENO"; then :
11437   ac_cv_search_sched_yield=$ac_res
11438 fi
11439 rm -f core conftest.err conftest.$ac_objext \
11440     conftest$ac_exeext
11441   if ${ac_cv_search_sched_yield+:} false; then :
11442   break
11443 fi
11444 done
11445 if ${ac_cv_search_sched_yield+:} false; then :
11446
11447 else
11448   ac_cv_search_sched_yield=no
11449 fi
11450 rm conftest.$ac_ext
11451 LIBS=$ac_func_search_save_LIBS
11452 fi
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11454 $as_echo "$ac_cv_search_sched_yield" >&6; }
11455 ac_res=$ac_cv_search_sched_yield
11456 if test "$ac_res" != no; then :
11457   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11458
11459 fi
11460
11461 # Required for thread_test.c on Solaris 2.5:
11462 # Other ports use it too (HP-UX) so test unconditionally
11463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11464 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11465 if ${ac_cv_search_gethostbyname_r+:} false; then :
11466   $as_echo_n "(cached) " >&6
11467 else
11468   ac_func_search_save_LIBS=$LIBS
11469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11470 /* end confdefs.h.  */
11471
11472 /* Override any GCC internal prototype to avoid an error.
11473    Use char because int might match the return type of a GCC
11474    builtin and then its argument prototype would still apply.  */
11475 #ifdef __cplusplus
11476 extern "C"
11477 #endif
11478 char gethostbyname_r ();
11479 int
11480 main ()
11481 {
11482 return gethostbyname_r ();
11483   ;
11484   return 0;
11485 }
11486 _ACEOF
11487 for ac_lib in '' nsl; do
11488   if test -z "$ac_lib"; then
11489     ac_res="none required"
11490   else
11491     ac_res=-l$ac_lib
11492     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11493   fi
11494   if ac_fn_c_try_link "$LINENO"; then :
11495   ac_cv_search_gethostbyname_r=$ac_res
11496 fi
11497 rm -f core conftest.err conftest.$ac_objext \
11498     conftest$ac_exeext
11499   if ${ac_cv_search_gethostbyname_r+:} false; then :
11500   break
11501 fi
11502 done
11503 if ${ac_cv_search_gethostbyname_r+:} false; then :
11504
11505 else
11506   ac_cv_search_gethostbyname_r=no
11507 fi
11508 rm conftest.$ac_ext
11509 LIBS=$ac_func_search_save_LIBS
11510 fi
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11512 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11513 ac_res=$ac_cv_search_gethostbyname_r
11514 if test "$ac_res" != no; then :
11515   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11516
11517 fi
11518
11519 # Cygwin:
11520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11521 $as_echo_n "checking for library containing shmget... " >&6; }
11522 if ${ac_cv_search_shmget+:} false; then :
11523   $as_echo_n "(cached) " >&6
11524 else
11525   ac_func_search_save_LIBS=$LIBS
11526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11527 /* end confdefs.h.  */
11528
11529 /* Override any GCC internal prototype to avoid an error.
11530    Use char because int might match the return type of a GCC
11531    builtin and then its argument prototype would still apply.  */
11532 #ifdef __cplusplus
11533 extern "C"
11534 #endif
11535 char shmget ();
11536 int
11537 main ()
11538 {
11539 return shmget ();
11540   ;
11541   return 0;
11542 }
11543 _ACEOF
11544 for ac_lib in '' cygipc; do
11545   if test -z "$ac_lib"; then
11546     ac_res="none required"
11547   else
11548     ac_res=-l$ac_lib
11549     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11550   fi
11551   if ac_fn_c_try_link "$LINENO"; then :
11552   ac_cv_search_shmget=$ac_res
11553 fi
11554 rm -f core conftest.err conftest.$ac_objext \
11555     conftest$ac_exeext
11556   if ${ac_cv_search_shmget+:} false; then :
11557   break
11558 fi
11559 done
11560 if ${ac_cv_search_shmget+:} false; then :
11561
11562 else
11563   ac_cv_search_shmget=no
11564 fi
11565 rm conftest.$ac_ext
11566 LIBS=$ac_func_search_save_LIBS
11567 fi
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11569 $as_echo "$ac_cv_search_shmget" >&6; }
11570 ac_res=$ac_cv_search_shmget
11571 if test "$ac_res" != no; then :
11572   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11573
11574 fi
11575
11576
11577 if test "$with_readline" = yes; then
11578
11579
11580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11581 $as_echo_n "checking for library containing readline... " >&6; }
11582 if ${pgac_cv_check_readline+:} false; then :
11583   $as_echo_n "(cached) " >&6
11584 else
11585   pgac_cv_check_readline=no
11586 pgac_save_LIBS=$LIBS
11587 if test x"$with_libedit_preferred" != x"yes"
11588 then    READLINE_ORDER="-lreadline -ledit"
11589 else    READLINE_ORDER="-ledit -lreadline"
11590 fi
11591 for pgac_rllib in $READLINE_ORDER ; do
11592   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11593     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11594     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11595 /* end confdefs.h.  */
11596
11597 /* Override any GCC internal prototype to avoid an error.
11598    Use char because int might match the return type of a GCC
11599    builtin and then its argument prototype would still apply.  */
11600 #ifdef __cplusplus
11601 extern "C"
11602 #endif
11603 char readline ();
11604 int
11605 main ()
11606 {
11607 return readline ();
11608   ;
11609   return 0;
11610 }
11611 _ACEOF
11612 if ac_fn_c_try_link "$LINENO"; then :
11613
11614       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11615       # recognize dependent libraries; assume curses is needed if we didn't
11616       # find any dependency.
11617       case $host_os in
11618         netbsd* | openbsd* | irix*)
11619           if test x"$pgac_lib" = x"" ; then
11620             pgac_lib=" -lcurses"
11621           fi ;;
11622       esac
11623
11624       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11625       break
11626
11627 fi
11628 rm -f core conftest.err conftest.$ac_objext \
11629     conftest$ac_exeext conftest.$ac_ext
11630   done
11631   if test "$pgac_cv_check_readline" != no ; then
11632     break
11633   fi
11634 done
11635 LIBS=$pgac_save_LIBS
11636
11637 fi
11638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11639 $as_echo "$pgac_cv_check_readline" >&6; }
11640 if test "$pgac_cv_check_readline" != no ; then
11641   LIBS="$pgac_cv_check_readline $LIBS"
11642
11643 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11644
11645 fi
11646
11647
11648   if test x"$pgac_cv_check_readline" = x"no"; then
11649     as_fn_error $? "readline library not found
11650 If you have readline already installed, see config.log for details on the
11651 failure.  It is possible the compiler isn't looking in the proper directory.
11652 Use --without-readline to disable readline support." "$LINENO" 5
11653   fi
11654 fi
11655
11656 if test "$with_zlib" = yes; then
11657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11658 $as_echo_n "checking for inflate in -lz... " >&6; }
11659 if ${ac_cv_lib_z_inflate+:} false; then :
11660   $as_echo_n "(cached) " >&6
11661 else
11662   ac_check_lib_save_LIBS=$LIBS
11663 LIBS="-lz  $LIBS"
11664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11665 /* end confdefs.h.  */
11666
11667 /* Override any GCC internal prototype to avoid an error.
11668    Use char because int might match the return type of a GCC
11669    builtin and then its argument prototype would still apply.  */
11670 #ifdef __cplusplus
11671 extern "C"
11672 #endif
11673 char inflate ();
11674 int
11675 main ()
11676 {
11677 return inflate ();
11678   ;
11679   return 0;
11680 }
11681 _ACEOF
11682 if ac_fn_c_try_link "$LINENO"; then :
11683   ac_cv_lib_z_inflate=yes
11684 else
11685   ac_cv_lib_z_inflate=no
11686 fi
11687 rm -f core conftest.err conftest.$ac_objext \
11688     conftest$ac_exeext conftest.$ac_ext
11689 LIBS=$ac_check_lib_save_LIBS
11690 fi
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11692 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11693 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11694   cat >>confdefs.h <<_ACEOF
11695 #define HAVE_LIBZ 1
11696 _ACEOF
11697
11698   LIBS="-lz $LIBS"
11699
11700 else
11701   as_fn_error $? "zlib library not found
11702 If you have zlib already installed, see config.log for details on the
11703 failure.  It is possible the compiler isn't looking in the proper directory.
11704 Use --without-zlib to disable zlib support." "$LINENO" 5
11705 fi
11706
11707 fi
11708
11709 if test "$enable_spinlocks" = yes; then
11710
11711 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11712
11713 else
11714   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11715 *** Not using spinlocks will cause poor performance." >&5
11716 $as_echo "$as_me: WARNING:
11717 *** Not using spinlocks will cause poor performance." >&2;}
11718 fi
11719
11720 if test "$enable_atomics" = yes; then
11721
11722 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11723
11724 else
11725   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11726 *** Not using atomic operations will cause poor performance." >&5
11727 $as_echo "$as_me: WARNING:
11728 *** Not using atomic operations will cause poor performance." >&2;}
11729 fi
11730
11731 if test "$with_gssapi" = yes ; then
11732   if test "$PORTNAME" != "win32"; then
11733     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11734 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11735 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11736   $as_echo_n "(cached) " >&6
11737 else
11738   ac_func_search_save_LIBS=$LIBS
11739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11740 /* end confdefs.h.  */
11741
11742 /* Override any GCC internal prototype to avoid an error.
11743    Use char because int might match the return type of a GCC
11744    builtin and then its argument prototype would still apply.  */
11745 #ifdef __cplusplus
11746 extern "C"
11747 #endif
11748 char gss_init_sec_context ();
11749 int
11750 main ()
11751 {
11752 return gss_init_sec_context ();
11753   ;
11754   return 0;
11755 }
11756 _ACEOF
11757 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11758   if test -z "$ac_lib"; then
11759     ac_res="none required"
11760   else
11761     ac_res=-l$ac_lib
11762     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11763   fi
11764   if ac_fn_c_try_link "$LINENO"; then :
11765   ac_cv_search_gss_init_sec_context=$ac_res
11766 fi
11767 rm -f core conftest.err conftest.$ac_objext \
11768     conftest$ac_exeext
11769   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11770   break
11771 fi
11772 done
11773 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11774
11775 else
11776   ac_cv_search_gss_init_sec_context=no
11777 fi
11778 rm conftest.$ac_ext
11779 LIBS=$ac_func_search_save_LIBS
11780 fi
11781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11782 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11783 ac_res=$ac_cv_search_gss_init_sec_context
11784 if test "$ac_res" != no; then :
11785   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11786
11787 else
11788   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11789 fi
11790
11791   else
11792     LIBS="$LIBS -lgssapi32"
11793   fi
11794 fi
11795
11796 if test "$with_openssl" = yes ; then
11797     if test "$PORTNAME" != "win32"; then
11798      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11799 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11800 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11801   $as_echo_n "(cached) " >&6
11802 else
11803   ac_check_lib_save_LIBS=$LIBS
11804 LIBS="-lcrypto  $LIBS"
11805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11806 /* end confdefs.h.  */
11807
11808 /* Override any GCC internal prototype to avoid an error.
11809    Use char because int might match the return type of a GCC
11810    builtin and then its argument prototype would still apply.  */
11811 #ifdef __cplusplus
11812 extern "C"
11813 #endif
11814 char CRYPTO_new_ex_data ();
11815 int
11816 main ()
11817 {
11818 return CRYPTO_new_ex_data ();
11819   ;
11820   return 0;
11821 }
11822 _ACEOF
11823 if ac_fn_c_try_link "$LINENO"; then :
11824   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11825 else
11826   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11827 fi
11828 rm -f core conftest.err conftest.$ac_objext \
11829     conftest$ac_exeext conftest.$ac_ext
11830 LIBS=$ac_check_lib_save_LIBS
11831 fi
11832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11833 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11834 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11835   cat >>confdefs.h <<_ACEOF
11836 #define HAVE_LIBCRYPTO 1
11837 _ACEOF
11838
11839   LIBS="-lcrypto $LIBS"
11840
11841 else
11842   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11843 fi
11844
11845      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11846 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11847 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11848   $as_echo_n "(cached) " >&6
11849 else
11850   ac_check_lib_save_LIBS=$LIBS
11851 LIBS="-lssl  $LIBS"
11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853 /* end confdefs.h.  */
11854
11855 /* Override any GCC internal prototype to avoid an error.
11856    Use char because int might match the return type of a GCC
11857    builtin and then its argument prototype would still apply.  */
11858 #ifdef __cplusplus
11859 extern "C"
11860 #endif
11861 char SSL_new ();
11862 int
11863 main ()
11864 {
11865 return SSL_new ();
11866   ;
11867   return 0;
11868 }
11869 _ACEOF
11870 if ac_fn_c_try_link "$LINENO"; then :
11871   ac_cv_lib_ssl_SSL_new=yes
11872 else
11873   ac_cv_lib_ssl_SSL_new=no
11874 fi
11875 rm -f core conftest.err conftest.$ac_objext \
11876     conftest$ac_exeext conftest.$ac_ext
11877 LIBS=$ac_check_lib_save_LIBS
11878 fi
11879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
11880 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
11881 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
11882   cat >>confdefs.h <<_ACEOF
11883 #define HAVE_LIBSSL 1
11884 _ACEOF
11885
11886   LIBS="-lssl $LIBS"
11887
11888 else
11889   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
11890 fi
11891
11892   else
11893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
11894 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
11895 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11896   $as_echo_n "(cached) " >&6
11897 else
11898   ac_func_search_save_LIBS=$LIBS
11899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11900 /* end confdefs.h.  */
11901
11902 /* Override any GCC internal prototype to avoid an error.
11903    Use char because int might match the return type of a GCC
11904    builtin and then its argument prototype would still apply.  */
11905 #ifdef __cplusplus
11906 extern "C"
11907 #endif
11908 char CRYPTO_new_ex_data ();
11909 int
11910 main ()
11911 {
11912 return CRYPTO_new_ex_data ();
11913   ;
11914   return 0;
11915 }
11916 _ACEOF
11917 for ac_lib in '' eay32 crypto; do
11918   if test -z "$ac_lib"; then
11919     ac_res="none required"
11920   else
11921     ac_res=-l$ac_lib
11922     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11923   fi
11924   if ac_fn_c_try_link "$LINENO"; then :
11925   ac_cv_search_CRYPTO_new_ex_data=$ac_res
11926 fi
11927 rm -f core conftest.err conftest.$ac_objext \
11928     conftest$ac_exeext
11929   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11930   break
11931 fi
11932 done
11933 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11934
11935 else
11936   ac_cv_search_CRYPTO_new_ex_data=no
11937 fi
11938 rm conftest.$ac_ext
11939 LIBS=$ac_func_search_save_LIBS
11940 fi
11941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
11942 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
11943 ac_res=$ac_cv_search_CRYPTO_new_ex_data
11944 if test "$ac_res" != no; then :
11945   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11946
11947 else
11948   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
11949 fi
11950
11951      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
11952 $as_echo_n "checking for library containing SSL_new... " >&6; }
11953 if ${ac_cv_search_SSL_new+:} false; then :
11954   $as_echo_n "(cached) " >&6
11955 else
11956   ac_func_search_save_LIBS=$LIBS
11957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11958 /* end confdefs.h.  */
11959
11960 /* Override any GCC internal prototype to avoid an error.
11961    Use char because int might match the return type of a GCC
11962    builtin and then its argument prototype would still apply.  */
11963 #ifdef __cplusplus
11964 extern "C"
11965 #endif
11966 char SSL_new ();
11967 int
11968 main ()
11969 {
11970 return SSL_new ();
11971   ;
11972   return 0;
11973 }
11974 _ACEOF
11975 for ac_lib in '' ssleay32 ssl; do
11976   if test -z "$ac_lib"; then
11977     ac_res="none required"
11978   else
11979     ac_res=-l$ac_lib
11980     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11981   fi
11982   if ac_fn_c_try_link "$LINENO"; then :
11983   ac_cv_search_SSL_new=$ac_res
11984 fi
11985 rm -f core conftest.err conftest.$ac_objext \
11986     conftest$ac_exeext
11987   if ${ac_cv_search_SSL_new+:} false; then :
11988   break
11989 fi
11990 done
11991 if ${ac_cv_search_SSL_new+:} false; then :
11992
11993 else
11994   ac_cv_search_SSL_new=no
11995 fi
11996 rm conftest.$ac_ext
11997 LIBS=$ac_func_search_save_LIBS
11998 fi
11999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12000 $as_echo "$ac_cv_search_SSL_new" >&6; }
12001 ac_res=$ac_cv_search_SSL_new
12002 if test "$ac_res" != no; then :
12003   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12004
12005 else
12006   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12007 fi
12008
12009   fi
12010   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
12011 do :
12012   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12013 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12014 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12015   cat >>confdefs.h <<_ACEOF
12016 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12017 _ACEOF
12018
12019 fi
12020 done
12021
12022   # Functions introduced in OpenSSL 1.1.0. We used to check for
12023   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12024   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12025   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12026   # functions.
12027   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
12028 do :
12029   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12030 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12031 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12032   cat >>confdefs.h <<_ACEOF
12033 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12034 _ACEOF
12035
12036 fi
12037 done
12038
12039   # OpenSSL versions before 1.1.0 required setting callback functions, for
12040   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12041   # function was removed.
12042   for ac_func in CRYPTO_lock
12043 do :
12044   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12045 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12046   cat >>confdefs.h <<_ACEOF
12047 #define HAVE_CRYPTO_LOCK 1
12048 _ACEOF
12049
12050 fi
12051 done
12052
12053 fi
12054
12055 if test "$with_pam" = yes ; then
12056   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12057 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12058 if ${ac_cv_lib_pam_pam_start+:} false; then :
12059   $as_echo_n "(cached) " >&6
12060 else
12061   ac_check_lib_save_LIBS=$LIBS
12062 LIBS="-lpam  $LIBS"
12063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12064 /* end confdefs.h.  */
12065
12066 /* Override any GCC internal prototype to avoid an error.
12067    Use char because int might match the return type of a GCC
12068    builtin and then its argument prototype would still apply.  */
12069 #ifdef __cplusplus
12070 extern "C"
12071 #endif
12072 char pam_start ();
12073 int
12074 main ()
12075 {
12076 return pam_start ();
12077   ;
12078   return 0;
12079 }
12080 _ACEOF
12081 if ac_fn_c_try_link "$LINENO"; then :
12082   ac_cv_lib_pam_pam_start=yes
12083 else
12084   ac_cv_lib_pam_pam_start=no
12085 fi
12086 rm -f core conftest.err conftest.$ac_objext \
12087     conftest$ac_exeext conftest.$ac_ext
12088 LIBS=$ac_check_lib_save_LIBS
12089 fi
12090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12091 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12092 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12093   cat >>confdefs.h <<_ACEOF
12094 #define HAVE_LIBPAM 1
12095 _ACEOF
12096
12097   LIBS="-lpam $LIBS"
12098
12099 else
12100   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12101 fi
12102
12103 fi
12104
12105 if test "$with_libxml" = yes ; then
12106   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12107 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12108 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12109   $as_echo_n "(cached) " >&6
12110 else
12111   ac_check_lib_save_LIBS=$LIBS
12112 LIBS="-lxml2  $LIBS"
12113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12114 /* end confdefs.h.  */
12115
12116 /* Override any GCC internal prototype to avoid an error.
12117    Use char because int might match the return type of a GCC
12118    builtin and then its argument prototype would still apply.  */
12119 #ifdef __cplusplus
12120 extern "C"
12121 #endif
12122 char xmlSaveToBuffer ();
12123 int
12124 main ()
12125 {
12126 return xmlSaveToBuffer ();
12127   ;
12128   return 0;
12129 }
12130 _ACEOF
12131 if ac_fn_c_try_link "$LINENO"; then :
12132   ac_cv_lib_xml2_xmlSaveToBuffer=yes
12133 else
12134   ac_cv_lib_xml2_xmlSaveToBuffer=no
12135 fi
12136 rm -f core conftest.err conftest.$ac_objext \
12137     conftest$ac_exeext conftest.$ac_ext
12138 LIBS=$ac_check_lib_save_LIBS
12139 fi
12140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12141 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12142 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12143   cat >>confdefs.h <<_ACEOF
12144 #define HAVE_LIBXML2 1
12145 _ACEOF
12146
12147   LIBS="-lxml2 $LIBS"
12148
12149 else
12150   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12151 fi
12152
12153 fi
12154
12155 if test "$with_libxslt" = yes ; then
12156   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12157 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12158 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12159   $as_echo_n "(cached) " >&6
12160 else
12161   ac_check_lib_save_LIBS=$LIBS
12162 LIBS="-lxslt  $LIBS"
12163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12164 /* end confdefs.h.  */
12165
12166 /* Override any GCC internal prototype to avoid an error.
12167    Use char because int might match the return type of a GCC
12168    builtin and then its argument prototype would still apply.  */
12169 #ifdef __cplusplus
12170 extern "C"
12171 #endif
12172 char xsltCleanupGlobals ();
12173 int
12174 main ()
12175 {
12176 return xsltCleanupGlobals ();
12177   ;
12178   return 0;
12179 }
12180 _ACEOF
12181 if ac_fn_c_try_link "$LINENO"; then :
12182   ac_cv_lib_xslt_xsltCleanupGlobals=yes
12183 else
12184   ac_cv_lib_xslt_xsltCleanupGlobals=no
12185 fi
12186 rm -f core conftest.err conftest.$ac_objext \
12187     conftest$ac_exeext conftest.$ac_ext
12188 LIBS=$ac_check_lib_save_LIBS
12189 fi
12190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12191 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12192 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12193   cat >>confdefs.h <<_ACEOF
12194 #define HAVE_LIBXSLT 1
12195 _ACEOF
12196
12197   LIBS="-lxslt $LIBS"
12198
12199 else
12200   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12201 fi
12202
12203 fi
12204
12205 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12206 if test "$with_ldap" = yes ; then
12207   _LIBS="$LIBS"
12208   if test "$PORTNAME" != "win32"; then
12209     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12210 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12211 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12212   $as_echo_n "(cached) " >&6
12213 else
12214   ac_check_lib_save_LIBS=$LIBS
12215 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12217 /* end confdefs.h.  */
12218
12219 /* Override any GCC internal prototype to avoid an error.
12220    Use char because int might match the return type of a GCC
12221    builtin and then its argument prototype would still apply.  */
12222 #ifdef __cplusplus
12223 extern "C"
12224 #endif
12225 char ldap_bind ();
12226 int
12227 main ()
12228 {
12229 return ldap_bind ();
12230   ;
12231   return 0;
12232 }
12233 _ACEOF
12234 if ac_fn_c_try_link "$LINENO"; then :
12235   ac_cv_lib_ldap_ldap_bind=yes
12236 else
12237   ac_cv_lib_ldap_ldap_bind=no
12238 fi
12239 rm -f core conftest.err conftest.$ac_objext \
12240     conftest$ac_exeext conftest.$ac_ext
12241 LIBS=$ac_check_lib_save_LIBS
12242 fi
12243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12244 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12245 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12246   cat >>confdefs.h <<_ACEOF
12247 #define HAVE_LIBLDAP 1
12248 _ACEOF
12249
12250   LIBS="-lldap $LIBS"
12251
12252 else
12253   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12254 fi
12255
12256     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12257     if test "$enable_thread_safety" = yes; then
12258       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12259       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12260 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12261 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12262   $as_echo_n "(cached) " >&6
12263 else
12264   ac_check_lib_save_LIBS=$LIBS
12265 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12267 /* end confdefs.h.  */
12268
12269 /* Override any GCC internal prototype to avoid an error.
12270    Use char because int might match the return type of a GCC
12271    builtin and then its argument prototype would still apply.  */
12272 #ifdef __cplusplus
12273 extern "C"
12274 #endif
12275 char ldap_simple_bind ();
12276 int
12277 main ()
12278 {
12279 return ldap_simple_bind ();
12280   ;
12281   return 0;
12282 }
12283 _ACEOF
12284 if ac_fn_c_try_link "$LINENO"; then :
12285   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12286 else
12287   ac_cv_lib_ldap_r_ldap_simple_bind=no
12288 fi
12289 rm -f core conftest.err conftest.$ac_objext \
12290     conftest$ac_exeext conftest.$ac_ext
12291 LIBS=$ac_check_lib_save_LIBS
12292 fi
12293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12294 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12295 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12296   cat >>confdefs.h <<_ACEOF
12297 #define HAVE_LIBLDAP_R 1
12298 _ACEOF
12299
12300   LIBS="-lldap_r $LIBS"
12301
12302 else
12303   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12304 fi
12305
12306       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12307     else
12308       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12309     fi
12310     for ac_func in ldap_initialize
12311 do :
12312   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12313 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12314   cat >>confdefs.h <<_ACEOF
12315 #define HAVE_LDAP_INITIALIZE 1
12316 _ACEOF
12317
12318 fi
12319 done
12320
12321   else
12322     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12323 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12324 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12325   $as_echo_n "(cached) " >&6
12326 else
12327   ac_check_lib_save_LIBS=$LIBS
12328 LIBS="-lwldap32  $LIBS"
12329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12330 /* end confdefs.h.  */
12331
12332 /* Override any GCC internal prototype to avoid an error.
12333    Use char because int might match the return type of a GCC
12334    builtin and then its argument prototype would still apply.  */
12335 #ifdef __cplusplus
12336 extern "C"
12337 #endif
12338 char ldap_bind ();
12339 int
12340 main ()
12341 {
12342 return ldap_bind ();
12343   ;
12344   return 0;
12345 }
12346 _ACEOF
12347 if ac_fn_c_try_link "$LINENO"; then :
12348   ac_cv_lib_wldap32_ldap_bind=yes
12349 else
12350   ac_cv_lib_wldap32_ldap_bind=no
12351 fi
12352 rm -f core conftest.err conftest.$ac_objext \
12353     conftest$ac_exeext conftest.$ac_ext
12354 LIBS=$ac_check_lib_save_LIBS
12355 fi
12356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12357 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12358 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12359   cat >>confdefs.h <<_ACEOF
12360 #define HAVE_LIBWLDAP32 1
12361 _ACEOF
12362
12363   LIBS="-lwldap32 $LIBS"
12364
12365 else
12366   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12367 fi
12368
12369     LDAP_LIBS_FE="-lwldap32"
12370     LDAP_LIBS_BE="-lwldap32"
12371   fi
12372   LIBS="$_LIBS"
12373 fi
12374
12375
12376
12377 # for contrib/sepgsql
12378 if test "$with_selinux" = yes; then
12379   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12380 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12381 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12382   $as_echo_n "(cached) " >&6
12383 else
12384   ac_check_lib_save_LIBS=$LIBS
12385 LIBS="-lselinux  $LIBS"
12386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12387 /* end confdefs.h.  */
12388
12389 /* Override any GCC internal prototype to avoid an error.
12390    Use char because int might match the return type of a GCC
12391    builtin and then its argument prototype would still apply.  */
12392 #ifdef __cplusplus
12393 extern "C"
12394 #endif
12395 char security_compute_create_name ();
12396 int
12397 main ()
12398 {
12399 return security_compute_create_name ();
12400   ;
12401   return 0;
12402 }
12403 _ACEOF
12404 if ac_fn_c_try_link "$LINENO"; then :
12405   ac_cv_lib_selinux_security_compute_create_name=yes
12406 else
12407   ac_cv_lib_selinux_security_compute_create_name=no
12408 fi
12409 rm -f core conftest.err conftest.$ac_objext \
12410     conftest$ac_exeext conftest.$ac_ext
12411 LIBS=$ac_check_lib_save_LIBS
12412 fi
12413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12414 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12415 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12416   cat >>confdefs.h <<_ACEOF
12417 #define HAVE_LIBSELINUX 1
12418 _ACEOF
12419
12420   LIBS="-lselinux $LIBS"
12421
12422 else
12423   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12424 fi
12425
12426 fi
12427
12428 # for contrib/uuid-ossp
12429 if test "$with_uuid" = bsd ; then
12430   # On BSD, the UUID functions are in libc
12431   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12432 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12433   UUID_LIBS=""
12434 else
12435   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12436 fi
12437
12438 elif test "$with_uuid" = e2fs ; then
12439   # On macOS, the UUID functions are in libc
12440   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12441 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12442   UUID_LIBS=""
12443 else
12444   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12445 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12446 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12447   $as_echo_n "(cached) " >&6
12448 else
12449   ac_check_lib_save_LIBS=$LIBS
12450 LIBS="-luuid  $LIBS"
12451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12452 /* end confdefs.h.  */
12453
12454 /* Override any GCC internal prototype to avoid an error.
12455    Use char because int might match the return type of a GCC
12456    builtin and then its argument prototype would still apply.  */
12457 #ifdef __cplusplus
12458 extern "C"
12459 #endif
12460 char uuid_generate ();
12461 int
12462 main ()
12463 {
12464 return uuid_generate ();
12465   ;
12466   return 0;
12467 }
12468 _ACEOF
12469 if ac_fn_c_try_link "$LINENO"; then :
12470   ac_cv_lib_uuid_uuid_generate=yes
12471 else
12472   ac_cv_lib_uuid_uuid_generate=no
12473 fi
12474 rm -f core conftest.err conftest.$ac_objext \
12475     conftest$ac_exeext conftest.$ac_ext
12476 LIBS=$ac_check_lib_save_LIBS
12477 fi
12478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12479 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12480 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12481   UUID_LIBS="-luuid"
12482 else
12483   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12484 fi
12485
12486 fi
12487
12488 elif test "$with_uuid" = ossp ; then
12489   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12490 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12491 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12492   $as_echo_n "(cached) " >&6
12493 else
12494   ac_check_lib_save_LIBS=$LIBS
12495 LIBS="-lossp-uuid  $LIBS"
12496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12497 /* end confdefs.h.  */
12498
12499 /* Override any GCC internal prototype to avoid an error.
12500    Use char because int might match the return type of a GCC
12501    builtin and then its argument prototype would still apply.  */
12502 #ifdef __cplusplus
12503 extern "C"
12504 #endif
12505 char uuid_export ();
12506 int
12507 main ()
12508 {
12509 return uuid_export ();
12510   ;
12511   return 0;
12512 }
12513 _ACEOF
12514 if ac_fn_c_try_link "$LINENO"; then :
12515   ac_cv_lib_ossp_uuid_uuid_export=yes
12516 else
12517   ac_cv_lib_ossp_uuid_uuid_export=no
12518 fi
12519 rm -f core conftest.err conftest.$ac_objext \
12520     conftest$ac_exeext conftest.$ac_ext
12521 LIBS=$ac_check_lib_save_LIBS
12522 fi
12523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12524 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12525 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12526   UUID_LIBS="-lossp-uuid"
12527 else
12528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12529 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12530 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12531   $as_echo_n "(cached) " >&6
12532 else
12533   ac_check_lib_save_LIBS=$LIBS
12534 LIBS="-luuid  $LIBS"
12535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12536 /* end confdefs.h.  */
12537
12538 /* Override any GCC internal prototype to avoid an error.
12539    Use char because int might match the return type of a GCC
12540    builtin and then its argument prototype would still apply.  */
12541 #ifdef __cplusplus
12542 extern "C"
12543 #endif
12544 char uuid_export ();
12545 int
12546 main ()
12547 {
12548 return uuid_export ();
12549   ;
12550   return 0;
12551 }
12552 _ACEOF
12553 if ac_fn_c_try_link "$LINENO"; then :
12554   ac_cv_lib_uuid_uuid_export=yes
12555 else
12556   ac_cv_lib_uuid_uuid_export=no
12557 fi
12558 rm -f core conftest.err conftest.$ac_objext \
12559     conftest$ac_exeext conftest.$ac_ext
12560 LIBS=$ac_check_lib_save_LIBS
12561 fi
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12563 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12564 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12565   UUID_LIBS="-luuid"
12566 else
12567   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12568 fi
12569
12570 fi
12571
12572 fi
12573
12574
12575
12576 ##
12577 ## Header files
12578 ##
12579
12580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12581 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12582 if ${ac_cv_header_stdbool_h+:} false; then :
12583   $as_echo_n "(cached) " >&6
12584 else
12585   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12586 /* end confdefs.h.  */
12587
12588              #include <stdbool.h>
12589              #ifndef bool
12590               "error: bool is not defined"
12591              #endif
12592              #ifndef false
12593               "error: false is not defined"
12594              #endif
12595              #if false
12596               "error: false is not 0"
12597              #endif
12598              #ifndef true
12599               "error: true is not defined"
12600              #endif
12601              #if true != 1
12602               "error: true is not 1"
12603              #endif
12604              #ifndef __bool_true_false_are_defined
12605               "error: __bool_true_false_are_defined is not defined"
12606              #endif
12607
12608              struct s { _Bool s: 1; _Bool t; } s;
12609
12610              char a[true == 1 ? 1 : -1];
12611              char b[false == 0 ? 1 : -1];
12612              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12613              char d[(bool) 0.5 == true ? 1 : -1];
12614              /* See body of main program for 'e'.  */
12615              char f[(_Bool) 0.0 == false ? 1 : -1];
12616              char g[true];
12617              char h[sizeof (_Bool)];
12618              char i[sizeof s.t];
12619              enum { j = false, k = true, l = false * true, m = true * 256 };
12620              /* The following fails for
12621                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12622              _Bool n[m];
12623              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12624              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12625              /* Catch a bug in an HP-UX C compiler.  See
12626                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12627                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12628               */
12629              _Bool q = true;
12630              _Bool *pq = &q;
12631
12632 int
12633 main ()
12634 {
12635
12636              bool e = &s;
12637              *pq |= q;
12638              *pq |= ! q;
12639              /* Refer to every declared value, to avoid compiler optimizations.  */
12640              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12641                      + !m + !n + !o + !p + !q + !pq);
12642
12643   ;
12644   return 0;
12645 }
12646 _ACEOF
12647 if ac_fn_c_try_compile "$LINENO"; then :
12648   ac_cv_header_stdbool_h=yes
12649 else
12650   ac_cv_header_stdbool_h=no
12651 fi
12652 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12653 fi
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12655 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12656    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12657 if test "x$ac_cv_type__Bool" = xyes; then :
12658
12659 cat >>confdefs.h <<_ACEOF
12660 #define HAVE__BOOL 1
12661 _ACEOF
12662
12663
12664 fi
12665
12666
12667 if test $ac_cv_header_stdbool_h = yes; then
12668
12669 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12670
12671 fi
12672
12673
12674 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
12675 do :
12676   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12677 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12678 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12679   cat >>confdefs.h <<_ACEOF
12680 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12681 _ACEOF
12682
12683 fi
12684
12685 done
12686
12687
12688 # On BSD, test for net/if.h will fail unless sys/socket.h
12689 # is included first.
12690 for ac_header in net/if.h
12691 do :
12692   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12693 #include <sys/socket.h>
12694
12695 "
12696 if test "x$ac_cv_header_net_if_h" = xyes; then :
12697   cat >>confdefs.h <<_ACEOF
12698 #define HAVE_NET_IF_H 1
12699 _ACEOF
12700
12701 fi
12702
12703 done
12704
12705
12706 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12707 # is included first.
12708 for ac_header in sys/ucred.h
12709 do :
12710   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12711 #include <sys/param.h>
12712
12713 "
12714 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12715   cat >>confdefs.h <<_ACEOF
12716 #define HAVE_SYS_UCRED_H 1
12717 _ACEOF
12718
12719 fi
12720
12721 done
12722
12723
12724 # At least on IRIX, test for netinet/tcp.h will fail unless
12725 # netinet/in.h is included first.
12726 for ac_header in netinet/tcp.h
12727 do :
12728   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12729 #include <netinet/in.h>
12730
12731 "
12732 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12733   cat >>confdefs.h <<_ACEOF
12734 #define HAVE_NETINET_TCP_H 1
12735 _ACEOF
12736
12737 fi
12738
12739 done
12740
12741
12742 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12743   for ac_header in readline/readline.h
12744 do :
12745   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12746 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12747   cat >>confdefs.h <<_ACEOF
12748 #define HAVE_READLINE_READLINE_H 1
12749 _ACEOF
12750
12751 else
12752   for ac_header in readline.h
12753 do :
12754   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12755 if test "x$ac_cv_header_readline_h" = xyes; then :
12756   cat >>confdefs.h <<_ACEOF
12757 #define HAVE_READLINE_H 1
12758 _ACEOF
12759
12760 else
12761   as_fn_error $? "readline header not found
12762 If you have readline already installed, see config.log for details on the
12763 failure.  It is possible the compiler isn't looking in the proper directory.
12764 Use --without-readline to disable readline support." "$LINENO" 5
12765 fi
12766
12767 done
12768
12769 fi
12770
12771 done
12772
12773   for ac_header in readline/history.h
12774 do :
12775   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12776 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12777   cat >>confdefs.h <<_ACEOF
12778 #define HAVE_READLINE_HISTORY_H 1
12779 _ACEOF
12780
12781 else
12782   for ac_header in history.h
12783 do :
12784   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12785 if test "x$ac_cv_header_history_h" = xyes; then :
12786   cat >>confdefs.h <<_ACEOF
12787 #define HAVE_HISTORY_H 1
12788 _ACEOF
12789
12790 else
12791   as_fn_error $? "history header not found
12792 If you have readline already installed, see config.log for details on the
12793 failure.  It is possible the compiler isn't looking in the proper directory.
12794 Use --without-readline to disable readline support." "$LINENO" 5
12795 fi
12796
12797 done
12798
12799 fi
12800
12801 done
12802
12803 fi
12804
12805 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12806 # Some installations of libedit usurp /usr/include/readline/, which seems
12807 # bad practice, since in combined installations readline will have its headers
12808 # there.  We might have to resort to AC_EGREP checks to make sure we found
12809 # the proper header...
12810   for ac_header in editline/readline.h
12811 do :
12812   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12813 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12814   cat >>confdefs.h <<_ACEOF
12815 #define HAVE_EDITLINE_READLINE_H 1
12816 _ACEOF
12817
12818 else
12819   for ac_header in readline.h
12820 do :
12821   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12822 if test "x$ac_cv_header_readline_h" = xyes; then :
12823   cat >>confdefs.h <<_ACEOF
12824 #define HAVE_READLINE_H 1
12825 _ACEOF
12826
12827 else
12828   for ac_header in readline/readline.h
12829 do :
12830   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12831 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12832   cat >>confdefs.h <<_ACEOF
12833 #define HAVE_READLINE_READLINE_H 1
12834 _ACEOF
12835
12836 else
12837   as_fn_error $? "readline header not found
12838 If you have libedit already installed, see config.log for details on the
12839 failure.  It is possible the compiler isn't looking in the proper directory.
12840 Use --without-readline to disable libedit support." "$LINENO" 5
12841 fi
12842
12843 done
12844
12845 fi
12846
12847 done
12848
12849 fi
12850
12851 done
12852
12853 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12854 # not be there at all.  Hence, don't complain if not found.  We must check
12855 # though, since in yet other versions it is an independent header.
12856   for ac_header in editline/history.h
12857 do :
12858   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12859 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12860   cat >>confdefs.h <<_ACEOF
12861 #define HAVE_EDITLINE_HISTORY_H 1
12862 _ACEOF
12863
12864 else
12865   for ac_header in history.h
12866 do :
12867   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12868 if test "x$ac_cv_header_history_h" = xyes; then :
12869   cat >>confdefs.h <<_ACEOF
12870 #define HAVE_HISTORY_H 1
12871 _ACEOF
12872
12873 else
12874   for ac_header in readline/history.h
12875 do :
12876   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12877 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12878   cat >>confdefs.h <<_ACEOF
12879 #define HAVE_READLINE_HISTORY_H 1
12880 _ACEOF
12881
12882 fi
12883
12884 done
12885
12886 fi
12887
12888 done
12889
12890 fi
12891
12892 done
12893
12894 fi
12895
12896 if test "$with_zlib" = yes; then
12897   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
12898 if test "x$ac_cv_header_zlib_h" = xyes; then :
12899
12900 else
12901   as_fn_error $? "zlib header not found
12902 If you have zlib already installed, see config.log for details on the
12903 failure.  It is possible the compiler isn't looking in the proper directory.
12904 Use --without-zlib to disable zlib support." "$LINENO" 5
12905 fi
12906
12907
12908 fi
12909
12910 if test "$with_gssapi" = yes ; then
12911   for ac_header in gssapi/gssapi.h
12912 do :
12913   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
12914 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
12915   cat >>confdefs.h <<_ACEOF
12916 #define HAVE_GSSAPI_GSSAPI_H 1
12917 _ACEOF
12918
12919 else
12920   for ac_header in gssapi.h
12921 do :
12922   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
12923 if test "x$ac_cv_header_gssapi_h" = xyes; then :
12924   cat >>confdefs.h <<_ACEOF
12925 #define HAVE_GSSAPI_H 1
12926 _ACEOF
12927
12928 else
12929   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
12930 fi
12931
12932 done
12933
12934 fi
12935
12936 done
12937
12938 fi
12939
12940 if test "$with_openssl" = yes ; then
12941   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
12942 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
12943
12944 else
12945   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
12946 fi
12947
12948
12949   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
12950 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
12951
12952 else
12953   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
12954 fi
12955
12956
12957 fi
12958
12959 if test "$with_pam" = yes ; then
12960   for ac_header in security/pam_appl.h
12961 do :
12962   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
12963 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
12964   cat >>confdefs.h <<_ACEOF
12965 #define HAVE_SECURITY_PAM_APPL_H 1
12966 _ACEOF
12967
12968 else
12969   for ac_header in pam/pam_appl.h
12970 do :
12971   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
12972 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
12973   cat >>confdefs.h <<_ACEOF
12974 #define HAVE_PAM_PAM_APPL_H 1
12975 _ACEOF
12976
12977 else
12978   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
12979 fi
12980
12981 done
12982
12983 fi
12984
12985 done
12986
12987 fi
12988
12989 if test "$with_bsd_auth" = yes ; then
12990   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
12991 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
12992
12993 else
12994   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
12995 fi
12996
12997
12998 fi
12999
13000 if test "$with_systemd" = yes ; then
13001   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13002 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13003
13004 else
13005   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13006 fi
13007
13008
13009 fi
13010
13011 if test "$with_libxml" = yes ; then
13012   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13013 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13014
13015 else
13016   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13017 fi
13018
13019
13020 fi
13021
13022 if test "$with_libxslt" = yes ; then
13023   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13024 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13025
13026 else
13027   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13028 fi
13029
13030
13031 fi
13032
13033 if test "$with_ldap" = yes ; then
13034   if test "$PORTNAME" != "win32"; then
13035      for ac_header in ldap.h
13036 do :
13037   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13038 if test "x$ac_cv_header_ldap_h" = xyes; then :
13039   cat >>confdefs.h <<_ACEOF
13040 #define HAVE_LDAP_H 1
13041 _ACEOF
13042
13043 else
13044   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13045 fi
13046
13047 done
13048
13049      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13050 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13051 if ${pgac_cv_ldap_safe+:} false; then :
13052   $as_echo_n "(cached) " >&6
13053 else
13054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13055 /* end confdefs.h.  */
13056 #include <ldap.h>
13057 #if !defined(LDAP_VENDOR_VERSION) || \
13058      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13059       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13060 choke me
13061 #endif
13062 int
13063 main ()
13064 {
13065
13066   ;
13067   return 0;
13068 }
13069 _ACEOF
13070 if ac_fn_c_try_compile "$LINENO"; then :
13071   pgac_cv_ldap_safe=yes
13072 else
13073   pgac_cv_ldap_safe=no
13074 fi
13075 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13076 fi
13077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13078 $as_echo "$pgac_cv_ldap_safe" >&6; }
13079
13080 if test "$pgac_cv_ldap_safe" != yes; then
13081   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13082 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13083 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13084 *** also uses LDAP will crash on exit." >&5
13085 $as_echo "$as_me: WARNING:
13086 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13087 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13088 *** also uses LDAP will crash on exit." >&2;}
13089 fi
13090   else
13091      for ac_header in winldap.h
13092 do :
13093   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13094 #include <windows.h>
13095
13096 "
13097 if test "x$ac_cv_header_winldap_h" = xyes; then :
13098   cat >>confdefs.h <<_ACEOF
13099 #define HAVE_WINLDAP_H 1
13100 _ACEOF
13101
13102 else
13103   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13104 fi
13105
13106 done
13107
13108   fi
13109 fi
13110
13111 if test "$with_bonjour" = yes ; then
13112   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13113 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13114
13115 else
13116   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13117 fi
13118
13119
13120 fi
13121
13122 # for contrib/uuid-ossp
13123 if test "$with_uuid" = bsd ; then
13124   for ac_header in uuid.h
13125 do :
13126   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13127 if test "x$ac_cv_header_uuid_h" = xyes; then :
13128   cat >>confdefs.h <<_ACEOF
13129 #define HAVE_UUID_H 1
13130 _ACEOF
13131  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13132 /* end confdefs.h.  */
13133 #include <uuid.h>
13134
13135 _ACEOF
13136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13137   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13138
13139 else
13140   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13141 fi
13142 rm -f conftest*
13143
13144 else
13145   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13146 fi
13147
13148 done
13149
13150 elif test "$with_uuid" = e2fs ; then
13151   for ac_header in uuid/uuid.h
13152 do :
13153   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13154 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13155   cat >>confdefs.h <<_ACEOF
13156 #define HAVE_UUID_UUID_H 1
13157 _ACEOF
13158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13159 /* end confdefs.h.  */
13160 #include <uuid/uuid.h>
13161
13162 _ACEOF
13163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13164   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13165
13166 else
13167   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13168 fi
13169 rm -f conftest*
13170
13171 else
13172   for ac_header in uuid.h
13173 do :
13174   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13175 if test "x$ac_cv_header_uuid_h" = xyes; then :
13176   cat >>confdefs.h <<_ACEOF
13177 #define HAVE_UUID_H 1
13178 _ACEOF
13179  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13180 /* end confdefs.h.  */
13181 #include <uuid.h>
13182
13183 _ACEOF
13184 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13185   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13186
13187 else
13188   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13189 fi
13190 rm -f conftest*
13191
13192 else
13193   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13194 fi
13195
13196 done
13197
13198 fi
13199
13200 done
13201
13202 elif test "$with_uuid" = ossp ; then
13203   for ac_header in ossp/uuid.h
13204 do :
13205   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13206 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13207   cat >>confdefs.h <<_ACEOF
13208 #define HAVE_OSSP_UUID_H 1
13209 _ACEOF
13210  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13211 /* end confdefs.h.  */
13212 #include <ossp/uuid.h>
13213
13214 _ACEOF
13215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13216   $EGREP "uuid_export" >/dev/null 2>&1; then :
13217
13218 else
13219   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13220 fi
13221 rm -f conftest*
13222
13223 else
13224   for ac_header in uuid.h
13225 do :
13226   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13227 if test "x$ac_cv_header_uuid_h" = xyes; then :
13228   cat >>confdefs.h <<_ACEOF
13229 #define HAVE_UUID_H 1
13230 _ACEOF
13231  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13232 /* end confdefs.h.  */
13233 #include <uuid.h>
13234
13235 _ACEOF
13236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13237   $EGREP "uuid_export" >/dev/null 2>&1; then :
13238
13239 else
13240   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13241 fi
13242 rm -f conftest*
13243
13244 else
13245   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13246 fi
13247
13248 done
13249
13250 fi
13251
13252 done
13253
13254 fi
13255
13256 if test "$PORTNAME" = "win32" ; then
13257    for ac_header in crtdefs.h
13258 do :
13259   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13260 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13261   cat >>confdefs.h <<_ACEOF
13262 #define HAVE_CRTDEFS_H 1
13263 _ACEOF
13264
13265 fi
13266
13267 done
13268
13269 fi
13270
13271 ##
13272 ## Types, structures, compiler characteristics
13273 ##
13274
13275   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13276 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13277 if ${ac_cv_c_bigendian+:} false; then :
13278   $as_echo_n "(cached) " >&6
13279 else
13280   ac_cv_c_bigendian=unknown
13281     # See if we're dealing with a universal compiler.
13282     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13283 /* end confdefs.h.  */
13284 #ifndef __APPLE_CC__
13285                not a universal capable compiler
13286              #endif
13287              typedef int dummy;
13288
13289 _ACEOF
13290 if ac_fn_c_try_compile "$LINENO"; then :
13291
13292         # Check for potential -arch flags.  It is not universal unless
13293         # there are at least two -arch flags with different values.
13294         ac_arch=
13295         ac_prev=
13296         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13297          if test -n "$ac_prev"; then
13298            case $ac_word in
13299              i?86 | x86_64 | ppc | ppc64)
13300                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13301                  ac_arch=$ac_word
13302                else
13303                  ac_cv_c_bigendian=universal
13304                  break
13305                fi
13306                ;;
13307            esac
13308            ac_prev=
13309          elif test "x$ac_word" = "x-arch"; then
13310            ac_prev=arch
13311          fi
13312        done
13313 fi
13314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13315     if test $ac_cv_c_bigendian = unknown; then
13316       # See if sys/param.h defines the BYTE_ORDER macro.
13317       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13318 /* end confdefs.h.  */
13319 #include <sys/types.h>
13320              #include <sys/param.h>
13321
13322 int
13323 main ()
13324 {
13325 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13326                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13327                      && LITTLE_ENDIAN)
13328               bogus endian macros
13329              #endif
13330
13331   ;
13332   return 0;
13333 }
13334 _ACEOF
13335 if ac_fn_c_try_compile "$LINENO"; then :
13336   # It does; now see whether it defined to BIG_ENDIAN or not.
13337          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13338 /* end confdefs.h.  */
13339 #include <sys/types.h>
13340                 #include <sys/param.h>
13341
13342 int
13343 main ()
13344 {
13345 #if BYTE_ORDER != BIG_ENDIAN
13346                  not big endian
13347                 #endif
13348
13349   ;
13350   return 0;
13351 }
13352 _ACEOF
13353 if ac_fn_c_try_compile "$LINENO"; then :
13354   ac_cv_c_bigendian=yes
13355 else
13356   ac_cv_c_bigendian=no
13357 fi
13358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13359 fi
13360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13361     fi
13362     if test $ac_cv_c_bigendian = unknown; then
13363       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13364       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13365 /* end confdefs.h.  */
13366 #include <limits.h>
13367
13368 int
13369 main ()
13370 {
13371 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13372               bogus endian macros
13373              #endif
13374
13375   ;
13376   return 0;
13377 }
13378 _ACEOF
13379 if ac_fn_c_try_compile "$LINENO"; then :
13380   # It does; now see whether it defined to _BIG_ENDIAN or not.
13381          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13382 /* end confdefs.h.  */
13383 #include <limits.h>
13384
13385 int
13386 main ()
13387 {
13388 #ifndef _BIG_ENDIAN
13389                  not big endian
13390                 #endif
13391
13392   ;
13393   return 0;
13394 }
13395 _ACEOF
13396 if ac_fn_c_try_compile "$LINENO"; then :
13397   ac_cv_c_bigendian=yes
13398 else
13399   ac_cv_c_bigendian=no
13400 fi
13401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13402 fi
13403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13404     fi
13405     if test $ac_cv_c_bigendian = unknown; then
13406       # Compile a test program.
13407       if test "$cross_compiling" = yes; then :
13408   # Try to guess by grepping values from an object file.
13409          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13410 /* end confdefs.h.  */
13411 short int ascii_mm[] =
13412                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13413                 short int ascii_ii[] =
13414                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13415                 int use_ascii (int i) {
13416                   return ascii_mm[i] + ascii_ii[i];
13417                 }
13418                 short int ebcdic_ii[] =
13419                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13420                 short int ebcdic_mm[] =
13421                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13422                 int use_ebcdic (int i) {
13423                   return ebcdic_mm[i] + ebcdic_ii[i];
13424                 }
13425                 extern int foo;
13426
13427 int
13428 main ()
13429 {
13430 return use_ascii (foo) == use_ebcdic (foo);
13431   ;
13432   return 0;
13433 }
13434 _ACEOF
13435 if ac_fn_c_try_compile "$LINENO"; then :
13436   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13437               ac_cv_c_bigendian=yes
13438             fi
13439             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13440               if test "$ac_cv_c_bigendian" = unknown; then
13441                 ac_cv_c_bigendian=no
13442               else
13443                 # finding both strings is unlikely to happen, but who knows?
13444                 ac_cv_c_bigendian=unknown
13445               fi
13446             fi
13447 fi
13448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13449 else
13450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13451 /* end confdefs.h.  */
13452 $ac_includes_default
13453 int
13454 main ()
13455 {
13456
13457              /* Are we little or big endian?  From Harbison&Steele.  */
13458              union
13459              {
13460                long int l;
13461                char c[sizeof (long int)];
13462              } u;
13463              u.l = 1;
13464              return u.c[sizeof (long int) - 1] == 1;
13465
13466   ;
13467   return 0;
13468 }
13469 _ACEOF
13470 if ac_fn_c_try_run "$LINENO"; then :
13471   ac_cv_c_bigendian=no
13472 else
13473   ac_cv_c_bigendian=yes
13474 fi
13475 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13476   conftest.$ac_objext conftest.beam conftest.$ac_ext
13477 fi
13478
13479     fi
13480 fi
13481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13482 $as_echo "$ac_cv_c_bigendian" >&6; }
13483  case $ac_cv_c_bigendian in #(
13484    yes)
13485      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13486 ;; #(
13487    no)
13488       ;; #(
13489    universal)
13490
13491 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13492
13493      ;; #(
13494    *)
13495      as_fn_error $? "unknown endianness
13496  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13497  esac
13498
13499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13500 $as_echo_n "checking for inline... " >&6; }
13501 if ${ac_cv_c_inline+:} false; then :
13502   $as_echo_n "(cached) " >&6
13503 else
13504   ac_cv_c_inline=no
13505 for ac_kw in inline __inline__ __inline; do
13506   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13507 /* end confdefs.h.  */
13508 #ifndef __cplusplus
13509 typedef int foo_t;
13510 static $ac_kw foo_t static_foo () {return 0; }
13511 $ac_kw foo_t foo () {return 0; }
13512 #endif
13513
13514 _ACEOF
13515 if ac_fn_c_try_compile "$LINENO"; then :
13516   ac_cv_c_inline=$ac_kw
13517 fi
13518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13519   test "$ac_cv_c_inline" != no && break
13520 done
13521
13522 fi
13523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13524 $as_echo "$ac_cv_c_inline" >&6; }
13525
13526 case $ac_cv_c_inline in
13527   inline | yes) ;;
13528   *)
13529     case $ac_cv_c_inline in
13530       no) ac_val=;;
13531       *) ac_val=$ac_cv_c_inline;;
13532     esac
13533     cat >>confdefs.h <<_ACEOF
13534 #ifndef __cplusplus
13535 #define inline $ac_val
13536 #endif
13537 _ACEOF
13538     ;;
13539 esac
13540
13541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13542 $as_echo_n "checking for printf format archetype... " >&6; }
13543 if ${pgac_cv_printf_archetype+:} false; then :
13544   $as_echo_n "(cached) " >&6
13545 else
13546   ac_save_c_werror_flag=$ac_c_werror_flag
13547 ac_c_werror_flag=yes
13548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13549 /* end confdefs.h.  */
13550 extern int
13551 pgac_write(int ignore, const char *fmt,...)
13552 __attribute__((format(gnu_printf, 2, 3)));
13553 int
13554 main ()
13555 {
13556
13557   ;
13558   return 0;
13559 }
13560 _ACEOF
13561 if ac_fn_c_try_compile "$LINENO"; then :
13562   pgac_cv_printf_archetype=gnu_printf
13563 else
13564   pgac_cv_printf_archetype=printf
13565 fi
13566 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13567 ac_c_werror_flag=$ac_save_c_werror_flag
13568 fi
13569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13570 $as_echo "$pgac_cv_printf_archetype" >&6; }
13571
13572 cat >>confdefs.h <<_ACEOF
13573 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13574 _ACEOF
13575
13576
13577
13578   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13579 $as_echo_n "checking for flexible array members... " >&6; }
13580 if ${ac_cv_c_flexmember+:} false; then :
13581   $as_echo_n "(cached) " >&6
13582 else
13583   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13584 /* end confdefs.h.  */
13585 #include <stdlib.h>
13586             #include <stdio.h>
13587             #include <stddef.h>
13588             struct s { int n; double d[]; };
13589 int
13590 main ()
13591 {
13592 int m = getchar ();
13593             struct s *p = malloc (offsetof (struct s, d)
13594                                   + m * sizeof (double));
13595             p->d[0] = 0.0;
13596             return p->d != (double *) NULL;
13597   ;
13598   return 0;
13599 }
13600 _ACEOF
13601 if ac_fn_c_try_compile "$LINENO"; then :
13602   ac_cv_c_flexmember=yes
13603 else
13604   ac_cv_c_flexmember=no
13605 fi
13606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13607 fi
13608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13609 $as_echo "$ac_cv_c_flexmember" >&6; }
13610   if test $ac_cv_c_flexmember = yes; then
13611
13612 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13613
13614   else
13615     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13616
13617   fi
13618
13619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13620 $as_echo_n "checking for signed types... " >&6; }
13621 if ${pgac_cv_c_signed+:} false; then :
13622   $as_echo_n "(cached) " >&6
13623 else
13624   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13625 /* end confdefs.h.  */
13626
13627 int
13628 main ()
13629 {
13630 signed char c; signed short s; signed int i;
13631   ;
13632   return 0;
13633 }
13634 _ACEOF
13635 if ac_fn_c_try_compile "$LINENO"; then :
13636   pgac_cv_c_signed=yes
13637 else
13638   pgac_cv_c_signed=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_c_signed" >&5
13643 $as_echo "$pgac_cv_c_signed" >&6; }
13644 if test x"$pgac_cv_c_signed" = xno ; then
13645
13646 $as_echo "#define signed /**/" >>confdefs.h
13647
13648 fi
13649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13650 $as_echo_n "checking for __func__... " >&6; }
13651 if ${pgac_cv_funcname_func_support+:} false; then :
13652   $as_echo_n "(cached) " >&6
13653 else
13654   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13655 /* end confdefs.h.  */
13656 #include <stdio.h>
13657 int
13658 main ()
13659 {
13660 printf("%s\n", __func__);
13661   ;
13662   return 0;
13663 }
13664 _ACEOF
13665 if ac_fn_c_try_compile "$LINENO"; then :
13666   pgac_cv_funcname_func_support=yes
13667 else
13668   pgac_cv_funcname_func_support=no
13669 fi
13670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13671 fi
13672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13673 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13674 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13675
13676 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13677
13678 else
13679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13680 $as_echo_n "checking for __FUNCTION__... " >&6; }
13681 if ${pgac_cv_funcname_function_support+:} false; then :
13682   $as_echo_n "(cached) " >&6
13683 else
13684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13685 /* end confdefs.h.  */
13686 #include <stdio.h>
13687 int
13688 main ()
13689 {
13690 printf("%s\n", __FUNCTION__);
13691   ;
13692   return 0;
13693 }
13694 _ACEOF
13695 if ac_fn_c_try_compile "$LINENO"; then :
13696   pgac_cv_funcname_function_support=yes
13697 else
13698   pgac_cv_funcname_function_support=no
13699 fi
13700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13701 fi
13702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13703 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13704 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13705
13706 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13707
13708 fi
13709 fi
13710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13711 $as_echo_n "checking for _Static_assert... " >&6; }
13712 if ${pgac_cv__static_assert+:} false; then :
13713   $as_echo_n "(cached) " >&6
13714 else
13715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13716 /* end confdefs.h.  */
13717
13718 int
13719 main ()
13720 {
13721 ({ _Static_assert(1, "foo"); })
13722   ;
13723   return 0;
13724 }
13725 _ACEOF
13726 if ac_fn_c_try_link "$LINENO"; then :
13727   pgac_cv__static_assert=yes
13728 else
13729   pgac_cv__static_assert=no
13730 fi
13731 rm -f core conftest.err conftest.$ac_objext \
13732     conftest$ac_exeext conftest.$ac_ext
13733 fi
13734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13735 $as_echo "$pgac_cv__static_assert" >&6; }
13736 if test x"$pgac_cv__static_assert" = xyes ; then
13737
13738 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13739
13740 fi
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13742 $as_echo_n "checking for typeof... " >&6; }
13743 if ${pgac_cv_c_typeof+:} false; then :
13744   $as_echo_n "(cached) " >&6
13745 else
13746   pgac_cv_c_typeof=no
13747 for pgac_kw in typeof __typeof__ decltype; do
13748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13749 /* end confdefs.h.  */
13750
13751 int
13752 main ()
13753 {
13754 int x = 0;
13755 $pgac_kw(x) y;
13756 y = x;
13757 return y;
13758   ;
13759   return 0;
13760 }
13761 _ACEOF
13762 if ac_fn_c_try_compile "$LINENO"; then :
13763   pgac_cv_c_typeof=$pgac_kw
13764 fi
13765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13766   test "$pgac_cv_c_typeof" != no && break
13767 done
13768 fi
13769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13770 $as_echo "$pgac_cv_c_typeof" >&6; }
13771 if test "$pgac_cv_c_typeof" != no; then
13772
13773 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13774
13775   if test "$pgac_cv_c_typeof" != typeof; then
13776
13777 cat >>confdefs.h <<_ACEOF
13778 #define typeof $pgac_cv_c_typeof
13779 _ACEOF
13780
13781   fi
13782 fi
13783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13784 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13785 if ${pgac_cv__types_compatible+:} false; then :
13786   $as_echo_n "(cached) " >&6
13787 else
13788   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13789 /* end confdefs.h.  */
13790
13791 int
13792 main ()
13793 {
13794  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13795   ;
13796   return 0;
13797 }
13798 _ACEOF
13799 if ac_fn_c_try_compile "$LINENO"; then :
13800   pgac_cv__types_compatible=yes
13801 else
13802   pgac_cv__types_compatible=no
13803 fi
13804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13805 fi
13806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13807 $as_echo "$pgac_cv__types_compatible" >&6; }
13808 if test x"$pgac_cv__types_compatible" = xyes ; then
13809
13810 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13811
13812 fi
13813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13814 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13815 if ${pgac_cv__builtin_bswap16+:} false; then :
13816   $as_echo_n "(cached) " >&6
13817 else
13818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13819 /* end confdefs.h.  */
13820 static unsigned long int x = __builtin_bswap16(0xaabb);
13821
13822 _ACEOF
13823 if ac_fn_c_try_compile "$LINENO"; then :
13824   pgac_cv__builtin_bswap16=yes
13825 else
13826   pgac_cv__builtin_bswap16=no
13827 fi
13828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13829 fi
13830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13831 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13832 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13833
13834 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13835
13836 fi
13837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13838 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13839 if ${pgac_cv__builtin_bswap32+:} false; then :
13840   $as_echo_n "(cached) " >&6
13841 else
13842   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13843 /* end confdefs.h.  */
13844 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13845
13846 _ACEOF
13847 if ac_fn_c_try_compile "$LINENO"; then :
13848   pgac_cv__builtin_bswap32=yes
13849 else
13850   pgac_cv__builtin_bswap32=no
13851 fi
13852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13853 fi
13854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
13855 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
13856 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
13857
13858 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
13859
13860 fi
13861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
13862 $as_echo_n "checking for __builtin_bswap64... " >&6; }
13863 if ${pgac_cv__builtin_bswap64+:} false; then :
13864   $as_echo_n "(cached) " >&6
13865 else
13866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13867 /* end confdefs.h.  */
13868 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
13869
13870 _ACEOF
13871 if ac_fn_c_try_compile "$LINENO"; then :
13872   pgac_cv__builtin_bswap64=yes
13873 else
13874   pgac_cv__builtin_bswap64=no
13875 fi
13876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13877 fi
13878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
13879 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
13880 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
13881
13882 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
13883
13884 fi
13885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
13886 $as_echo_n "checking for __builtin_constant_p... " >&6; }
13887 if ${pgac_cv__builtin_constant_p+:} false; then :
13888   $as_echo_n "(cached) " >&6
13889 else
13890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13891 /* end confdefs.h.  */
13892 static int x;
13893   static int y[__builtin_constant_p(x) ? x : 1];
13894   static int z[__builtin_constant_p("string literal") ? 1 : x];
13895
13896
13897 _ACEOF
13898 if ac_fn_c_try_compile "$LINENO"; then :
13899   pgac_cv__builtin_constant_p=yes
13900 else
13901   pgac_cv__builtin_constant_p=no
13902 fi
13903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13904 fi
13905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
13906 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
13907 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
13908
13909 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
13910
13911 fi
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
13913 $as_echo_n "checking for __builtin_unreachable... " >&6; }
13914 if ${pgac_cv__builtin_unreachable+:} false; then :
13915   $as_echo_n "(cached) " >&6
13916 else
13917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13918 /* end confdefs.h.  */
13919
13920 int
13921 main ()
13922 {
13923 __builtin_unreachable();
13924   ;
13925   return 0;
13926 }
13927 _ACEOF
13928 if ac_fn_c_try_link "$LINENO"; then :
13929   pgac_cv__builtin_unreachable=yes
13930 else
13931   pgac_cv__builtin_unreachable=no
13932 fi
13933 rm -f core conftest.err conftest.$ac_objext \
13934     conftest$ac_exeext conftest.$ac_ext
13935 fi
13936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
13937 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
13938 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
13939
13940 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
13941
13942 fi
13943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
13944 $as_echo_n "checking for computed goto support... " >&6; }
13945 if ${pgac_cv_computed_goto+:} false; then :
13946   $as_echo_n "(cached) " >&6
13947 else
13948   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13949 /* end confdefs.h.  */
13950
13951 int
13952 main ()
13953 {
13954 void *labeladdrs[] = {&&my_label};
13955   goto *labeladdrs[0];
13956   my_label:
13957   return 1;
13958
13959   ;
13960   return 0;
13961 }
13962 _ACEOF
13963 if ac_fn_c_try_compile "$LINENO"; then :
13964   pgac_cv_computed_goto=yes
13965 else
13966   pgac_cv_computed_goto=no
13967 fi
13968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13969 fi
13970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
13971 $as_echo "$pgac_cv_computed_goto" >&6; }
13972 if test x"$pgac_cv_computed_goto" = xyes ; then
13973
13974 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
13975
13976 fi
13977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
13978 $as_echo_n "checking for __VA_ARGS__... " >&6; }
13979 if ${pgac_cv__va_args+:} false; then :
13980   $as_echo_n "(cached) " >&6
13981 else
13982   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13983 /* end confdefs.h.  */
13984 #include <stdio.h>
13985 int
13986 main ()
13987 {
13988 #define debug(...) fprintf(stderr, __VA_ARGS__)
13989 debug("%s", "blarg");
13990
13991   ;
13992   return 0;
13993 }
13994 _ACEOF
13995 if ac_fn_c_try_compile "$LINENO"; then :
13996   pgac_cv__va_args=yes
13997 else
13998   pgac_cv__va_args=no
13999 fi
14000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14001 fi
14002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
14003 $as_echo "$pgac_cv__va_args" >&6; }
14004 if test x"$pgac_cv__va_args" = xyes ; then
14005
14006 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
14007
14008 fi
14009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14010 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14011 if ${ac_cv_struct_tm+:} false; then :
14012   $as_echo_n "(cached) " >&6
14013 else
14014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14015 /* end confdefs.h.  */
14016 #include <sys/types.h>
14017 #include <time.h>
14018
14019 int
14020 main ()
14021 {
14022 struct tm tm;
14023                                      int *p = &tm.tm_sec;
14024                                      return !p;
14025   ;
14026   return 0;
14027 }
14028 _ACEOF
14029 if ac_fn_c_try_compile "$LINENO"; then :
14030   ac_cv_struct_tm=time.h
14031 else
14032   ac_cv_struct_tm=sys/time.h
14033 fi
14034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14035 fi
14036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14037 $as_echo "$ac_cv_struct_tm" >&6; }
14038 if test $ac_cv_struct_tm = sys/time.h; then
14039
14040 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14041
14042 fi
14043
14044 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14045 #include <$ac_cv_struct_tm>
14046
14047 "
14048 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14049
14050 cat >>confdefs.h <<_ACEOF
14051 #define HAVE_STRUCT_TM_TM_ZONE 1
14052 _ACEOF
14053
14054
14055 fi
14056
14057 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14058
14059 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14060
14061 fi
14062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14063 $as_echo_n "checking for tzname... " >&6; }
14064 if ${ac_cv_var_tzname+:} false; then :
14065   $as_echo_n "(cached) " >&6
14066 else
14067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14068 /* end confdefs.h.  */
14069 #include <stdlib.h>
14070 #include <time.h>
14071 #ifndef tzname /* For SGI.  */
14072 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
14073 #endif
14074
14075 int
14076 main ()
14077 {
14078 atoi(*tzname);
14079   ;
14080   return 0;
14081 }
14082 _ACEOF
14083 if ac_fn_c_try_link "$LINENO"; then :
14084   ac_cv_var_tzname=yes
14085 else
14086   ac_cv_var_tzname=no
14087 fi
14088 rm -f core conftest.err conftest.$ac_objext \
14089     conftest$ac_exeext conftest.$ac_ext
14090 fi
14091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14092 $as_echo "$ac_cv_var_tzname" >&6; }
14093 if test $ac_cv_var_tzname = yes; then
14094
14095 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14096
14097 fi
14098
14099 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14100 #ifdef HAVE_SYS_IPC_H
14101 #include <sys/ipc.h>
14102 #endif
14103 #ifdef HAVE_SYS_SEM_H
14104 #include <sys/sem.h>
14105 #endif
14106 "
14107 if test "x$ac_cv_type_union_semun" = xyes; then :
14108
14109 cat >>confdefs.h <<_ACEOF
14110 #define HAVE_UNION_SEMUN 1
14111 _ACEOF
14112
14113
14114 fi
14115
14116 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14117 #ifdef HAVE_SYS_UN_H
14118 #include <sys/un.h>
14119 #endif
14120
14121 "
14122 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14123
14124 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14125
14126 fi
14127
14128 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14129 #include <sys/socket.h>
14130
14131 "
14132 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14133
14134 cat >>confdefs.h <<_ACEOF
14135 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14136 _ACEOF
14137
14138
14139 fi
14140
14141 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14142 #include <sys/socket.h>
14143
14144 "
14145 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14146
14147 cat >>confdefs.h <<_ACEOF
14148 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14149 _ACEOF
14150
14151
14152 fi
14153 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14154 #include <sys/socket.h>
14155
14156 "
14157 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14158
14159 cat >>confdefs.h <<_ACEOF
14160 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14161 _ACEOF
14162
14163
14164 fi
14165 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14166 #include <sys/socket.h>
14167
14168 "
14169 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14170
14171 cat >>confdefs.h <<_ACEOF
14172 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14173 _ACEOF
14174
14175
14176 fi
14177 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14178 #include <sys/socket.h>
14179
14180 "
14181 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14182
14183 cat >>confdefs.h <<_ACEOF
14184 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14185 _ACEOF
14186
14187
14188 fi
14189 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14190 #include <sys/socket.h>
14191
14192 "
14193 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14194
14195 cat >>confdefs.h <<_ACEOF
14196 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14197 _ACEOF
14198
14199
14200 fi
14201
14202 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14203 #include <sys/socket.h>
14204 #include <netdb.h>
14205
14206 "
14207 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14208
14209 cat >>confdefs.h <<_ACEOF
14210 #define HAVE_STRUCT_ADDRINFO 1
14211 _ACEOF
14212
14213
14214 fi
14215
14216
14217   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14218 if test "x$ac_cv_type_intptr_t" = xyes; then :
14219
14220 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14221
14222 else
14223   for ac_type in 'int' 'long int' 'long long int'; do
14224        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14225 /* end confdefs.h.  */
14226 $ac_includes_default
14227 int
14228 main ()
14229 {
14230 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14231 test_array [0] = 0;
14232 return test_array [0];
14233
14234   ;
14235   return 0;
14236 }
14237 _ACEOF
14238 if ac_fn_c_try_compile "$LINENO"; then :
14239
14240 cat >>confdefs.h <<_ACEOF
14241 #define intptr_t $ac_type
14242 _ACEOF
14243
14244           ac_type=
14245 fi
14246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14247        test -z "$ac_type" && break
14248      done
14249 fi
14250
14251
14252
14253   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14254 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14255
14256 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14257
14258 else
14259   for ac_type in 'unsigned int' 'unsigned long int' \
14260         'unsigned long long int'; do
14261        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14262 /* end confdefs.h.  */
14263 $ac_includes_default
14264 int
14265 main ()
14266 {
14267 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14268 test_array [0] = 0;
14269 return test_array [0];
14270
14271   ;
14272   return 0;
14273 }
14274 _ACEOF
14275 if ac_fn_c_try_compile "$LINENO"; then :
14276
14277 cat >>confdefs.h <<_ACEOF
14278 #define uintptr_t $ac_type
14279 _ACEOF
14280
14281           ac_type=
14282 fi
14283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14284        test -z "$ac_type" && break
14285      done
14286 fi
14287
14288
14289
14290   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14291 $as_echo_n "checking for unsigned long long int... " >&6; }
14292 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14293   $as_echo_n "(cached) " >&6
14294 else
14295   ac_cv_type_unsigned_long_long_int=yes
14296      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14297        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14298 /* end confdefs.h.  */
14299
14300   /* For now, do not test the preprocessor; as of 2007 there are too many
14301          implementations with broken preprocessors.  Perhaps this can
14302          be revisited in 2012.  In the meantime, code should not expect
14303          #if to work with literals wider than 32 bits.  */
14304       /* Test literals.  */
14305       long long int ll = 9223372036854775807ll;
14306       long long int nll = -9223372036854775807LL;
14307       unsigned long long int ull = 18446744073709551615ULL;
14308       /* Test constant expressions.   */
14309       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14310                      ? 1 : -1)];
14311       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14312                      ? 1 : -1)];
14313       int i = 63;
14314 int
14315 main ()
14316 {
14317 /* Test availability of runtime routines for shift and division.  */
14318       long long int llmax = 9223372036854775807ll;
14319       unsigned long long int ullmax = 18446744073709551615ull;
14320       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14321               | (llmax / ll) | (llmax % ll)
14322               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14323               | (ullmax / ull) | (ullmax % ull));
14324   ;
14325   return 0;
14326 }
14327
14328 _ACEOF
14329 if ac_fn_c_try_link "$LINENO"; then :
14330
14331 else
14332   ac_cv_type_unsigned_long_long_int=no
14333 fi
14334 rm -f core conftest.err conftest.$ac_objext \
14335     conftest$ac_exeext conftest.$ac_ext
14336      fi
14337 fi
14338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14339 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14340   if test $ac_cv_type_unsigned_long_long_int = yes; then
14341
14342 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14343
14344   fi
14345
14346
14347
14348   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14349 $as_echo_n "checking for long long int... " >&6; }
14350 if ${ac_cv_type_long_long_int+:} false; then :
14351   $as_echo_n "(cached) " >&6
14352 else
14353   ac_cv_type_long_long_int=yes
14354       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14355         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14356         if test $ac_cv_type_long_long_int = yes; then
14357                                   if test "$cross_compiling" = yes; then :
14358   :
14359 else
14360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14361 /* end confdefs.h.  */
14362 #include <limits.h>
14363                  #ifndef LLONG_MAX
14364                  # define HALF \
14365                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14366                  # define LLONG_MAX (HALF - 1 + HALF)
14367                  #endif
14368 int
14369 main ()
14370 {
14371 long long int n = 1;
14372                  int i;
14373                  for (i = 0; ; i++)
14374                    {
14375                      long long int m = n << i;
14376                      if (m >> i != n)
14377                        return 1;
14378                      if (LLONG_MAX / 2 < m)
14379                        break;
14380                    }
14381                  return 0;
14382   ;
14383   return 0;
14384 }
14385 _ACEOF
14386 if ac_fn_c_try_run "$LINENO"; then :
14387
14388 else
14389   ac_cv_type_long_long_int=no
14390 fi
14391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14392   conftest.$ac_objext conftest.beam conftest.$ac_ext
14393 fi
14394
14395         fi
14396       fi
14397 fi
14398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14399 $as_echo "$ac_cv_type_long_long_int" >&6; }
14400   if test $ac_cv_type_long_long_int = yes; then
14401
14402 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14403
14404   fi
14405
14406
14407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14408 $as_echo_n "checking for locale_t... " >&6; }
14409 if ${pgac_cv_type_locale_t+:} false; then :
14410   $as_echo_n "(cached) " >&6
14411 else
14412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14413 /* end confdefs.h.  */
14414 #include <locale.h>
14415 locale_t x;
14416 int
14417 main ()
14418 {
14419
14420   ;
14421   return 0;
14422 }
14423 _ACEOF
14424 if ac_fn_c_try_compile "$LINENO"; then :
14425   pgac_cv_type_locale_t=yes
14426 else
14427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14428 /* end confdefs.h.  */
14429 #include <xlocale.h>
14430 locale_t x;
14431 int
14432 main ()
14433 {
14434
14435   ;
14436   return 0;
14437 }
14438 _ACEOF
14439 if ac_fn_c_try_compile "$LINENO"; then :
14440   pgac_cv_type_locale_t='yes (in xlocale.h)'
14441 else
14442   pgac_cv_type_locale_t=no
14443 fi
14444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14445 fi
14446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14447 fi
14448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14449 $as_echo "$pgac_cv_type_locale_t" >&6; }
14450 if test "$pgac_cv_type_locale_t" != no; then
14451
14452 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14453
14454 fi
14455 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14456
14457 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14458
14459 fi
14460
14461 # MSVC doesn't cope well with defining restrict to __restrict, the
14462 # spelling it understands, because it conflicts with
14463 # __declspec(restrict). Therefore we define pg_restrict to the
14464 # appropriate definition, which presumably won't conflict.
14465 #
14466 # Allow platforms with buggy compilers to force restrict to not be
14467 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14468 # template.
14469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14470 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14471 if ${ac_cv_c_restrict+:} false; then :
14472   $as_echo_n "(cached) " >&6
14473 else
14474   ac_cv_c_restrict=no
14475    # The order here caters to the fact that C++ does not require restrict.
14476    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14477      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14478 /* end confdefs.h.  */
14479 typedef int * int_ptr;
14480         int foo (int_ptr $ac_kw ip) {
14481         return ip[0];
14482        }
14483 int
14484 main ()
14485 {
14486 int s[1];
14487         int * $ac_kw t = s;
14488         t[0] = 0;
14489         return foo(t)
14490   ;
14491   return 0;
14492 }
14493 _ACEOF
14494 if ac_fn_c_try_compile "$LINENO"; then :
14495   ac_cv_c_restrict=$ac_kw
14496 fi
14497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14498      test "$ac_cv_c_restrict" != no && break
14499    done
14500
14501 fi
14502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14503 $as_echo "$ac_cv_c_restrict" >&6; }
14504
14505  case $ac_cv_c_restrict in
14506    restrict) ;;
14507    no) $as_echo "#define restrict /**/" >>confdefs.h
14508  ;;
14509    *)  cat >>confdefs.h <<_ACEOF
14510 #define restrict $ac_cv_c_restrict
14511 _ACEOF
14512  ;;
14513  esac
14514
14515 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14516   pg_restrict=""
14517 else
14518   pg_restrict="$ac_cv_c_restrict"
14519 fi
14520
14521 cat >>confdefs.h <<_ACEOF
14522 #define pg_restrict $pg_restrict
14523 _ACEOF
14524
14525
14526 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14527 #include <sys/param.h>
14528 #ifdef HAVE_SYS_UCRED_H
14529 #include <sys/ucred.h>
14530 #endif
14531 "
14532 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14533
14534 cat >>confdefs.h <<_ACEOF
14535 #define HAVE_STRUCT_CMSGCRED 1
14536 _ACEOF
14537
14538
14539 fi
14540
14541
14542 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14543 #include <getopt.h>
14544 #endif
14545 "
14546 if test "x$ac_cv_type_struct_option" = xyes; then :
14547
14548 cat >>confdefs.h <<_ACEOF
14549 #define HAVE_STRUCT_OPTION 1
14550 _ACEOF
14551
14552
14553 fi
14554
14555
14556 if test "$with_zlib" = yes; then
14557   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14558   # did not).  While we could work around the lack of z_streamp, it
14559   # seems unwise to encourage people to use such old zlib versions...
14560   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14561 "
14562 if test "x$ac_cv_type_z_streamp" = xyes; then :
14563
14564 else
14565   as_fn_error $? "zlib version is too old
14566 Use --without-zlib to disable zlib support." "$LINENO" 5
14567 fi
14568
14569 fi
14570
14571 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14572 case $host_cpu in
14573   ppc*|powerpc*)
14574     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14575 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14576     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14577 /* end confdefs.h.  */
14578
14579 int
14580 main ()
14581 {
14582 int a = 0; int *p = &a; int r;
14583          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14584   ;
14585   return 0;
14586 }
14587 _ACEOF
14588 if ac_fn_c_try_compile "$LINENO"; then :
14589   pgac_cv_have_ppc_mutex_hint=yes
14590 else
14591   pgac_cv_have_ppc_mutex_hint=no
14592 fi
14593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14594     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14595 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14596     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14597
14598 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14599
14600     fi
14601   ;;
14602 esac
14603
14604 # Check largefile support.  You might think this is a system service not a
14605 # compiler characteristic, but you'd be wrong.  We must check this before
14606 # probing existence of related functions such as fseeko, since the largefile
14607 # defines can affect what is generated for that.
14608 if test "$PORTNAME" != "win32"; then
14609    # Check whether --enable-largefile was given.
14610 if test "${enable_largefile+set}" = set; then :
14611   enableval=$enable_largefile;
14612 fi
14613
14614 if test "$enable_largefile" != no; then
14615
14616   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14617 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14618 if ${ac_cv_sys_largefile_CC+:} false; then :
14619   $as_echo_n "(cached) " >&6
14620 else
14621   ac_cv_sys_largefile_CC=no
14622      if test "$GCC" != yes; then
14623        ac_save_CC=$CC
14624        while :; do
14625          # IRIX 6.2 and later do not support large files by default,
14626          # so use the C compiler's -n32 option if that helps.
14627          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628 /* end confdefs.h.  */
14629 #include <sys/types.h>
14630  /* Check that off_t can represent 2**63 - 1 correctly.
14631     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14632     since some C++ compilers masquerading as C compilers
14633     incorrectly reject 9223372036854775807.  */
14634 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14635   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14636                        && LARGE_OFF_T % 2147483647 == 1)
14637                       ? 1 : -1];
14638 int
14639 main ()
14640 {
14641
14642   ;
14643   return 0;
14644 }
14645 _ACEOF
14646          if ac_fn_c_try_compile "$LINENO"; then :
14647   break
14648 fi
14649 rm -f core conftest.err conftest.$ac_objext
14650          CC="$CC -n32"
14651          if ac_fn_c_try_compile "$LINENO"; then :
14652   ac_cv_sys_largefile_CC=' -n32'; break
14653 fi
14654 rm -f core conftest.err conftest.$ac_objext
14655          break
14656        done
14657        CC=$ac_save_CC
14658        rm -f conftest.$ac_ext
14659     fi
14660 fi
14661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14662 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14663   if test "$ac_cv_sys_largefile_CC" != no; then
14664     CC=$CC$ac_cv_sys_largefile_CC
14665   fi
14666
14667   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14668 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14669 if ${ac_cv_sys_file_offset_bits+:} false; then :
14670   $as_echo_n "(cached) " >&6
14671 else
14672   while :; do
14673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14674 /* end confdefs.h.  */
14675 #include <sys/types.h>
14676  /* Check that off_t can represent 2**63 - 1 correctly.
14677     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14678     since some C++ compilers masquerading as C compilers
14679     incorrectly reject 9223372036854775807.  */
14680 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14681   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14682                        && LARGE_OFF_T % 2147483647 == 1)
14683                       ? 1 : -1];
14684 int
14685 main ()
14686 {
14687
14688   ;
14689   return 0;
14690 }
14691 _ACEOF
14692 if ac_fn_c_try_compile "$LINENO"; then :
14693   ac_cv_sys_file_offset_bits=no; break
14694 fi
14695 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14697 /* end confdefs.h.  */
14698 #define _FILE_OFFSET_BITS 64
14699 #include <sys/types.h>
14700  /* Check that off_t can represent 2**63 - 1 correctly.
14701     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14702     since some C++ compilers masquerading as C compilers
14703     incorrectly reject 9223372036854775807.  */
14704 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14705   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14706                        && LARGE_OFF_T % 2147483647 == 1)
14707                       ? 1 : -1];
14708 int
14709 main ()
14710 {
14711
14712   ;
14713   return 0;
14714 }
14715 _ACEOF
14716 if ac_fn_c_try_compile "$LINENO"; then :
14717   ac_cv_sys_file_offset_bits=64; break
14718 fi
14719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14720   ac_cv_sys_file_offset_bits=unknown
14721   break
14722 done
14723 fi
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14725 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14726 case $ac_cv_sys_file_offset_bits in #(
14727   no | unknown) ;;
14728   *)
14729 cat >>confdefs.h <<_ACEOF
14730 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14731 _ACEOF
14732 ;;
14733 esac
14734 rm -rf conftest*
14735   if test $ac_cv_sys_file_offset_bits = unknown; then
14736     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14737 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14738 if ${ac_cv_sys_large_files+:} false; then :
14739   $as_echo_n "(cached) " >&6
14740 else
14741   while :; do
14742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14743 /* end confdefs.h.  */
14744 #include <sys/types.h>
14745  /* Check that off_t can represent 2**63 - 1 correctly.
14746     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14747     since some C++ compilers masquerading as C compilers
14748     incorrectly reject 9223372036854775807.  */
14749 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14750   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14751                        && LARGE_OFF_T % 2147483647 == 1)
14752                       ? 1 : -1];
14753 int
14754 main ()
14755 {
14756
14757   ;
14758   return 0;
14759 }
14760 _ACEOF
14761 if ac_fn_c_try_compile "$LINENO"; then :
14762   ac_cv_sys_large_files=no; break
14763 fi
14764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14766 /* end confdefs.h.  */
14767 #define _LARGE_FILES 1
14768 #include <sys/types.h>
14769  /* Check that off_t can represent 2**63 - 1 correctly.
14770     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14771     since some C++ compilers masquerading as C compilers
14772     incorrectly reject 9223372036854775807.  */
14773 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14774   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14775                        && LARGE_OFF_T % 2147483647 == 1)
14776                       ? 1 : -1];
14777 int
14778 main ()
14779 {
14780
14781   ;
14782   return 0;
14783 }
14784 _ACEOF
14785 if ac_fn_c_try_compile "$LINENO"; then :
14786   ac_cv_sys_large_files=1; break
14787 fi
14788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14789   ac_cv_sys_large_files=unknown
14790   break
14791 done
14792 fi
14793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14794 $as_echo "$ac_cv_sys_large_files" >&6; }
14795 case $ac_cv_sys_large_files in #(
14796   no | unknown) ;;
14797   *)
14798 cat >>confdefs.h <<_ACEOF
14799 #define _LARGE_FILES $ac_cv_sys_large_files
14800 _ACEOF
14801 ;;
14802 esac
14803 rm -rf conftest*
14804   fi
14805
14806
14807 fi
14808
14809
14810 fi
14811
14812 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14813 # The cast to long int works around a bug in the HP C Compiler
14814 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14815 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14816 # This bug is HP SR number 8606223364.
14817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14818 $as_echo_n "checking size of off_t... " >&6; }
14819 if ${ac_cv_sizeof_off_t+:} false; then :
14820   $as_echo_n "(cached) " >&6
14821 else
14822   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14823
14824 else
14825   if test "$ac_cv_type_off_t" = yes; then
14826      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14827 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14828 as_fn_error 77 "cannot compute sizeof (off_t)
14829 See \`config.log' for more details" "$LINENO" 5; }
14830    else
14831      ac_cv_sizeof_off_t=0
14832    fi
14833 fi
14834
14835 fi
14836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14837 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14838
14839
14840
14841 cat >>confdefs.h <<_ACEOF
14842 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14843 _ACEOF
14844
14845
14846
14847 # If we don't have largefile support, can't handle segsize >= 2GB.
14848 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14849    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14850 fi
14851
14852 # The cast to long int works around a bug in the HP C Compiler
14853 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14854 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14855 # This bug is HP SR number 8606223364.
14856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14857 $as_echo_n "checking size of bool... " >&6; }
14858 if ${ac_cv_sizeof_bool+:} false; then :
14859   $as_echo_n "(cached) " >&6
14860 else
14861   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
14862 #include <stdbool.h>
14863 #endif
14864 "; then :
14865
14866 else
14867   if test "$ac_cv_type_bool" = yes; then
14868      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14869 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14870 as_fn_error 77 "cannot compute sizeof (bool)
14871 See \`config.log' for more details" "$LINENO" 5; }
14872    else
14873      ac_cv_sizeof_bool=0
14874    fi
14875 fi
14876
14877 fi
14878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14879 $as_echo "$ac_cv_sizeof_bool" >&6; }
14880
14881
14882
14883 cat >>confdefs.h <<_ACEOF
14884 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14885 _ACEOF
14886
14887
14888
14889
14890 ##
14891 ## Functions, global variables
14892 ##
14893
14894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14895 $as_echo_n "checking for int timezone... " >&6; }
14896 if ${pgac_cv_var_int_timezone+:} false; then :
14897   $as_echo_n "(cached) " >&6
14898 else
14899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14900 /* end confdefs.h.  */
14901 #include <time.h>
14902 int res;
14903 int
14904 main ()
14905 {
14906 #ifndef __CYGWIN__
14907 res = timezone / 60;
14908 #else
14909 res = _timezone / 60;
14910 #endif
14911   ;
14912   return 0;
14913 }
14914 _ACEOF
14915 if ac_fn_c_try_link "$LINENO"; then :
14916   pgac_cv_var_int_timezone=yes
14917 else
14918   pgac_cv_var_int_timezone=no
14919 fi
14920 rm -f core conftest.err conftest.$ac_objext \
14921     conftest$ac_exeext conftest.$ac_ext
14922 fi
14923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
14924 $as_echo "$pgac_cv_var_int_timezone" >&6; }
14925 if test x"$pgac_cv_var_int_timezone" = xyes ; then
14926
14927 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
14928
14929 fi
14930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
14931 $as_echo_n "checking types of arguments for accept()... " >&6; }
14932  if ${ac_cv_func_accept_return+:} false; then :
14933   $as_echo_n "(cached) " >&6
14934 else
14935    if ${ac_cv_func_accept_arg1+:} false; then :
14936   $as_echo_n "(cached) " >&6
14937 else
14938     if ${ac_cv_func_accept_arg2+:} false; then :
14939   $as_echo_n "(cached) " >&6
14940 else
14941      if ${ac_cv_func_accept_arg3+:} false; then :
14942   $as_echo_n "(cached) " >&6
14943 else
14944       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
14945       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
14946        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
14947         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
14948          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14949 /* end confdefs.h.  */
14950 #include <sys/types.h>
14951 #include <sys/socket.h>
14952 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
14953 _ACEOF
14954 if ac_fn_c_try_compile "$LINENO"; then :
14955   ac_not_found=no; break 4
14956 else
14957   ac_not_found=yes
14958 fi
14959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14960        done
14961       done
14962      done
14963     done
14964     if test "$ac_not_found" = yes; then
14965       as_fn_error $? "could not determine argument types" "$LINENO" 5
14966     fi
14967     if test "$ac_cv_func_accept_arg3" = "void"; then
14968       ac_cv_func_accept_arg3=int
14969     fi
14970
14971 fi
14972
14973 fi
14974
14975 fi
14976
14977 fi
14978  { $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
14979 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
14980
14981 cat >>confdefs.h <<_ACEOF
14982 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
14983 _ACEOF
14984
14985
14986 cat >>confdefs.h <<_ACEOF
14987 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
14988 _ACEOF
14989
14990
14991 cat >>confdefs.h <<_ACEOF
14992 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
14993 _ACEOF
14994
14995
14996 cat >>confdefs.h <<_ACEOF
14997 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
14998 _ACEOF
14999
15000
15001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15002 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15003 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15004   $as_echo_n "(cached) " >&6
15005 else
15006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15007 /* end confdefs.h.  */
15008 #include <sys/time.h>
15009 int
15010 main ()
15011 {
15012 struct timeval *tp;
15013 struct timezone *tzp;
15014 gettimeofday(tp,tzp);
15015   ;
15016   return 0;
15017 }
15018 _ACEOF
15019 if ac_fn_c_try_compile "$LINENO"; then :
15020   pgac_cv_func_gettimeofday_1arg=no
15021 else
15022   pgac_cv_func_gettimeofday_1arg=yes
15023 fi
15024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15025 fi
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15027 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15028 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15029
15030 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15031
15032 fi
15033
15034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15035 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15036 if ${pgac_cv_func_wcstombs_l+:} false; then :
15037   $as_echo_n "(cached) " >&6
15038 else
15039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15040 /* end confdefs.h.  */
15041 #include <stdlib.h>
15042 #include <locale.h>
15043 int
15044 main ()
15045 {
15046 #ifndef wcstombs_l
15047 (void) wcstombs_l;
15048 #endif
15049   ;
15050   return 0;
15051 }
15052 _ACEOF
15053 if ac_fn_c_try_compile "$LINENO"; then :
15054   pgac_cv_func_wcstombs_l='yes'
15055 else
15056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15057 /* end confdefs.h.  */
15058 #include <stdlib.h>
15059 #include <locale.h>
15060 #include <xlocale.h>
15061 int
15062 main ()
15063 {
15064 #ifndef wcstombs_l
15065 (void) wcstombs_l;
15066 #endif
15067   ;
15068   return 0;
15069 }
15070 _ACEOF
15071 if ac_fn_c_try_compile "$LINENO"; then :
15072   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15073 else
15074   pgac_cv_func_wcstombs_l='no'
15075 fi
15076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15077 fi
15078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15079 fi
15080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15081 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15082 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15083
15084 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15085
15086 fi
15087
15088 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15089 # symbols that that library has no business exposing to the world.  Pending
15090 # acquisition of a clue by those developers, ignore libedit (including its
15091 # possible alias of libreadline) while checking for everything else.
15092 LIBS_including_readline="$LIBS"
15093 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15094
15095 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
15096 do :
15097   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15098 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15099 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15100   cat >>confdefs.h <<_ACEOF
15101 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15102 _ACEOF
15103
15104 fi
15105 done
15106
15107
15108 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15109 if test "x$ac_cv_func_fseeko" = xyes; then :
15110   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15111
15112 else
15113   case " $LIBOBJS " in
15114   *" fseeko.$ac_objext "* ) ;;
15115   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15116  ;;
15117 esac
15118
15119 fi
15120
15121
15122 case $host_os in
15123         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15124         # Mingw uses macros to access Win32 API calls
15125         netbsd*|mingw*)
15126
15127 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15128
15129                 ac_cv_func_fseeko=yes;;
15130         *)
15131                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15132 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15133 if ${ac_cv_sys_largefile_source+:} false; then :
15134   $as_echo_n "(cached) " >&6
15135 else
15136   while :; do
15137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15138 /* end confdefs.h.  */
15139 #include <sys/types.h> /* for off_t */
15140      #include <stdio.h>
15141 int
15142 main ()
15143 {
15144 int (*fp) (FILE *, off_t, int) = fseeko;
15145      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15146   ;
15147   return 0;
15148 }
15149 _ACEOF
15150 if ac_fn_c_try_link "$LINENO"; then :
15151   ac_cv_sys_largefile_source=no; break
15152 fi
15153 rm -f core conftest.err conftest.$ac_objext \
15154     conftest$ac_exeext conftest.$ac_ext
15155   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15156 /* end confdefs.h.  */
15157 #define _LARGEFILE_SOURCE 1
15158 #include <sys/types.h> /* for off_t */
15159      #include <stdio.h>
15160 int
15161 main ()
15162 {
15163 int (*fp) (FILE *, off_t, int) = fseeko;
15164      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15165   ;
15166   return 0;
15167 }
15168 _ACEOF
15169 if ac_fn_c_try_link "$LINENO"; then :
15170   ac_cv_sys_largefile_source=1; break
15171 fi
15172 rm -f core conftest.err conftest.$ac_objext \
15173     conftest$ac_exeext conftest.$ac_ext
15174   ac_cv_sys_largefile_source=unknown
15175   break
15176 done
15177 fi
15178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15179 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15180 case $ac_cv_sys_largefile_source in #(
15181   no | unknown) ;;
15182   *)
15183 cat >>confdefs.h <<_ACEOF
15184 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15185 _ACEOF
15186 ;;
15187 esac
15188 rm -rf conftest*
15189
15190 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15191 # in glibc 2.1.3, but that breaks too many other things.
15192 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15193 if test $ac_cv_sys_largefile_source != unknown; then
15194
15195 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15196
15197 fi
15198 ;;
15199 esac
15200
15201 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15202 # by calling it, 2009-04-02
15203 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15204 if test "$PORTNAME" != "solaris"; then
15205 for ac_func in posix_fadvise
15206 do :
15207   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15208 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15209   cat >>confdefs.h <<_ACEOF
15210 #define HAVE_POSIX_FADVISE 1
15211 _ACEOF
15212
15213 fi
15214 done
15215
15216 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15217 "
15218 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15219   ac_have_decl=1
15220 else
15221   ac_have_decl=0
15222 fi
15223
15224 cat >>confdefs.h <<_ACEOF
15225 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15226 _ACEOF
15227
15228 fi
15229
15230 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15231 "
15232 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15233   ac_have_decl=1
15234 else
15235   ac_have_decl=0
15236 fi
15237
15238 cat >>confdefs.h <<_ACEOF
15239 #define HAVE_DECL_FDATASYNC $ac_have_decl
15240 _ACEOF
15241
15242 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15243 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15244   ac_have_decl=1
15245 else
15246   ac_have_decl=0
15247 fi
15248
15249 cat >>confdefs.h <<_ACEOF
15250 #define HAVE_DECL_STRLCAT $ac_have_decl
15251 _ACEOF
15252 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15253 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15254   ac_have_decl=1
15255 else
15256   ac_have_decl=0
15257 fi
15258
15259 cat >>confdefs.h <<_ACEOF
15260 #define HAVE_DECL_STRLCPY $ac_have_decl
15261 _ACEOF
15262 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15263 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15264   ac_have_decl=1
15265 else
15266   ac_have_decl=0
15267 fi
15268
15269 cat >>confdefs.h <<_ACEOF
15270 #define HAVE_DECL_STRNLEN $ac_have_decl
15271 _ACEOF
15272
15273 # This is probably only present on macOS, but may as well check always
15274 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15275 "
15276 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15277   ac_have_decl=1
15278 else
15279   ac_have_decl=0
15280 fi
15281
15282 cat >>confdefs.h <<_ACEOF
15283 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15284 _ACEOF
15285
15286
15287 HAVE_IPV6=no
15288 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15289 #include <netinet/in.h>
15290 "
15291 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15292
15293 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15294
15295          HAVE_IPV6=yes
15296 fi
15297
15298
15299
15300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15301 $as_echo_n "checking for PS_STRINGS... " >&6; }
15302 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15303   $as_echo_n "(cached) " >&6
15304 else
15305   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15306 /* end confdefs.h.  */
15307 #include <machine/vmparam.h>
15308 #include <sys/exec.h>
15309
15310 int
15311 main ()
15312 {
15313 PS_STRINGS->ps_nargvstr = 1;
15314 PS_STRINGS->ps_argvstr = "foo";
15315   ;
15316   return 0;
15317 }
15318 _ACEOF
15319 if ac_fn_c_try_link "$LINENO"; then :
15320   pgac_cv_var_PS_STRINGS=yes
15321 else
15322   pgac_cv_var_PS_STRINGS=no
15323 fi
15324 rm -f core conftest.err conftest.$ac_objext \
15325     conftest$ac_exeext conftest.$ac_ext
15326 fi
15327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15328 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15329 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15330
15331 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15332
15333 fi
15334
15335
15336 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
15337 # is missing.  Yes, there are machines that have only one.  We may
15338 # also decide to use snprintf.c if snprintf() is present but does not
15339 # have all the features we need --- see below.
15340
15341 if test "$PORTNAME" = "win32"; then
15342   # Win32 gets snprintf.c built unconditionally.
15343   #
15344   # To properly translate all NLS languages strings, we must support the
15345   # *printf() %$ format, which allows *printf() arguments to be selected
15346   # by position in the translated string.
15347   #
15348   # libintl versions < 0.13 use the native *printf() functions, and Win32
15349   # *printf() doesn't understand %$, so we must use our /port versions,
15350   # which do understand %$. libintl versions >= 0.13 include their own
15351   # *printf versions on Win32.  The libintl 0.13 release note text is:
15352   #
15353   #   C format strings with positions, as they arise when a translator
15354   #   needs to reorder a sentence, are now supported on all platforms.
15355   #   On those few platforms (NetBSD and Woe32) for which the native
15356   #   printf()/fprintf()/... functions don't support such format
15357   #   strings, replacements are provided through <libintl.h>.
15358   #
15359   # We could use libintl >= 0.13's *printf() if we were sure that we had
15360   # a libintl >= 0.13 at runtime, but seeing that there is no clean way
15361   # to guarantee that, it is best to just use our own, so we are sure to
15362   # get %$ support. In include/port.h we disable the *printf() macros
15363   # that might have been defined by libintl.
15364   #
15365   # We do this unconditionally whether NLS is used or not so we are sure
15366   # that all Win32 libraries and binaries behave the same.
15367   pgac_need_repl_snprintf=yes
15368 else
15369   pgac_need_repl_snprintf=no
15370   for ac_func in snprintf
15371 do :
15372   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15373 if test "x$ac_cv_func_snprintf" = xyes; then :
15374   cat >>confdefs.h <<_ACEOF
15375 #define HAVE_SNPRINTF 1
15376 _ACEOF
15377
15378 else
15379   pgac_need_repl_snprintf=yes
15380 fi
15381 done
15382
15383   for ac_func in vsnprintf
15384 do :
15385   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
15386 if test "x$ac_cv_func_vsnprintf" = xyes; then :
15387   cat >>confdefs.h <<_ACEOF
15388 #define HAVE_VSNPRINTF 1
15389 _ACEOF
15390
15391 else
15392   pgac_need_repl_snprintf=yes
15393 fi
15394 done
15395
15396 fi
15397
15398
15399 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
15400 # include/c.h will provide declarations.  Note this is a separate test
15401 # from whether the functions exist in the C library --- there are
15402 # systems that have the functions but don't bother to declare them :-(
15403
15404 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15405 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15406   ac_have_decl=1
15407 else
15408   ac_have_decl=0
15409 fi
15410
15411 cat >>confdefs.h <<_ACEOF
15412 #define HAVE_DECL_SNPRINTF $ac_have_decl
15413 _ACEOF
15414 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
15415 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
15416   ac_have_decl=1
15417 else
15418   ac_have_decl=0
15419 fi
15420
15421 cat >>confdefs.h <<_ACEOF
15422 #define HAVE_DECL_VSNPRINTF $ac_have_decl
15423 _ACEOF
15424
15425
15426
15427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15428 $as_echo_n "checking for isinf... " >&6; }
15429 if ${ac_cv_func_isinf+:} false; then :
15430   $as_echo_n "(cached) " >&6
15431 else
15432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15433 /* end confdefs.h.  */
15434
15435 #include <math.h>
15436 double glob_double;
15437
15438 int
15439 main ()
15440 {
15441 return isinf(glob_double) ? 0 : 1;
15442   ;
15443   return 0;
15444 }
15445 _ACEOF
15446 if ac_fn_c_try_link "$LINENO"; then :
15447   ac_cv_func_isinf=yes
15448 else
15449   ac_cv_func_isinf=no
15450 fi
15451 rm -f core conftest.err conftest.$ac_objext \
15452     conftest$ac_exeext conftest.$ac_ext
15453 fi
15454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15455 $as_echo "$ac_cv_func_isinf" >&6; }
15456
15457 if test $ac_cv_func_isinf = yes ; then
15458
15459 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15460
15461 else
15462   case " $LIBOBJS " in
15463   *" isinf.$ac_objext "* ) ;;
15464   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15465  ;;
15466 esac
15467
15468   # Look for a way to implement a substitute for isinf()
15469   for ac_func in fpclass fp_class fp_class_d class
15470 do :
15471   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15472 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15473 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15474   cat >>confdefs.h <<_ACEOF
15475 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15476 _ACEOF
15477  break
15478 fi
15479 done
15480
15481 fi
15482
15483 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15484 if test "x$ac_cv_func_crypt" = xyes; then :
15485   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15486
15487 else
15488   case " $LIBOBJS " in
15489   *" crypt.$ac_objext "* ) ;;
15490   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15491  ;;
15492 esac
15493
15494 fi
15495
15496 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15497 if test "x$ac_cv_func_fls" = xyes; then :
15498   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15499
15500 else
15501   case " $LIBOBJS " in
15502   *" fls.$ac_objext "* ) ;;
15503   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15504  ;;
15505 esac
15506
15507 fi
15508
15509 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15510 if test "x$ac_cv_func_getopt" = xyes; then :
15511   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15512
15513 else
15514   case " $LIBOBJS " in
15515   *" getopt.$ac_objext "* ) ;;
15516   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15517  ;;
15518 esac
15519
15520 fi
15521
15522 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15523 if test "x$ac_cv_func_getrusage" = xyes; then :
15524   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15525
15526 else
15527   case " $LIBOBJS " in
15528   *" getrusage.$ac_objext "* ) ;;
15529   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15530  ;;
15531 esac
15532
15533 fi
15534
15535 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15536 if test "x$ac_cv_func_inet_aton" = xyes; then :
15537   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15538
15539 else
15540   case " $LIBOBJS " in
15541   *" inet_aton.$ac_objext "* ) ;;
15542   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15543  ;;
15544 esac
15545
15546 fi
15547
15548 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15549 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15550   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15551
15552 else
15553   case " $LIBOBJS " in
15554   *" mkdtemp.$ac_objext "* ) ;;
15555   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15556  ;;
15557 esac
15558
15559 fi
15560
15561 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15562 if test "x$ac_cv_func_random" = xyes; then :
15563   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15564
15565 else
15566   case " $LIBOBJS " in
15567   *" random.$ac_objext "* ) ;;
15568   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15569  ;;
15570 esac
15571
15572 fi
15573
15574 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15575 if test "x$ac_cv_func_rint" = xyes; then :
15576   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15577
15578 else
15579   case " $LIBOBJS " in
15580   *" rint.$ac_objext "* ) ;;
15581   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15582  ;;
15583 esac
15584
15585 fi
15586
15587 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15588 if test "x$ac_cv_func_srandom" = xyes; then :
15589   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15590
15591 else
15592   case " $LIBOBJS " in
15593   *" srandom.$ac_objext "* ) ;;
15594   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15595  ;;
15596 esac
15597
15598 fi
15599
15600 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
15601 if test "x$ac_cv_func_strerror" = xyes; then :
15602   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
15603
15604 else
15605   case " $LIBOBJS " in
15606   *" strerror.$ac_objext "* ) ;;
15607   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
15608  ;;
15609 esac
15610
15611 fi
15612
15613 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15614 if test "x$ac_cv_func_strlcat" = xyes; then :
15615   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15616
15617 else
15618   case " $LIBOBJS " in
15619   *" strlcat.$ac_objext "* ) ;;
15620   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15621  ;;
15622 esac
15623
15624 fi
15625
15626 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15627 if test "x$ac_cv_func_strlcpy" = xyes; then :
15628   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15629
15630 else
15631   case " $LIBOBJS " in
15632   *" strlcpy.$ac_objext "* ) ;;
15633   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15634  ;;
15635 esac
15636
15637 fi
15638
15639 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15640 if test "x$ac_cv_func_strnlen" = xyes; then :
15641   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15642
15643 else
15644   case " $LIBOBJS " in
15645   *" strnlen.$ac_objext "* ) ;;
15646   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15647  ;;
15648 esac
15649
15650 fi
15651
15652
15653
15654 case $host_os in
15655
15656         # Windows uses a specialised env handler
15657         # and doesn't need a replacement getpeereid because it doesn't use
15658         # Unix sockets.
15659         mingw*)
15660
15661 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15662
15663
15664 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15665
15666                 ac_cv_func_unsetenv=yes
15667                 ac_cv_func_getpeereid=yes;;
15668         *)
15669                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15670 if test "x$ac_cv_func_unsetenv" = xyes; then :
15671   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15672
15673 else
15674   case " $LIBOBJS " in
15675   *" unsetenv.$ac_objext "* ) ;;
15676   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15677  ;;
15678 esac
15679
15680 fi
15681
15682 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15683 if test "x$ac_cv_func_getpeereid" = xyes; then :
15684   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15685
15686 else
15687   case " $LIBOBJS " in
15688   *" getpeereid.$ac_objext "* ) ;;
15689   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15690  ;;
15691 esac
15692
15693 fi
15694
15695
15696                 ;;
15697 esac
15698
15699 # System's version of getaddrinfo(), if any, may be used only if we found
15700 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15701 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15702 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15703    test "$PORTNAME" != "win32"; then
15704   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15705 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15706   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15707
15708 else
15709   case " $LIBOBJS " in
15710   *" getaddrinfo.$ac_objext "* ) ;;
15711   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15712  ;;
15713 esac
15714
15715 fi
15716
15717
15718 else
15719   case " $LIBOBJS " in
15720   *" getaddrinfo.$ac_objext "* ) ;;
15721   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15722  ;;
15723 esac
15724
15725 fi
15726
15727 # Similarly, use system's getopt_long() only if system provides struct option.
15728 if test x"$ac_cv_type_struct_option" = xyes ; then
15729   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15730 if test "x$ac_cv_func_getopt_long" = xyes; then :
15731   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15732
15733 else
15734   case " $LIBOBJS " in
15735   *" getopt_long.$ac_objext "* ) ;;
15736   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15737  ;;
15738 esac
15739
15740 fi
15741
15742
15743 else
15744   case " $LIBOBJS " in
15745   *" getopt_long.$ac_objext "* ) ;;
15746   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15747  ;;
15748 esac
15749
15750 fi
15751
15752 # Solaris' getopt() doesn't do what we want for long options, so always use
15753 # our version on that platform.
15754 if test "$PORTNAME" = "solaris"; then
15755   case " $LIBOBJS " in
15756   *" getopt.$ac_objext "* ) ;;
15757   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15758  ;;
15759 esac
15760
15761 fi
15762
15763 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15764 # so always use our version on Windows.
15765 if test "$PORTNAME" = "win32"; then
15766   case " $LIBOBJS " in
15767   *" getopt.$ac_objext "* ) ;;
15768   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15769  ;;
15770 esac
15771
15772   case " $LIBOBJS " in
15773   *" getopt_long.$ac_objext "* ) ;;
15774   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15775  ;;
15776 esac
15777
15778 fi
15779
15780 # Win32 (really MinGW) support
15781 if test "$PORTNAME" = "win32"; then
15782   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15783 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15784   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15785
15786 else
15787   case " $LIBOBJS " in
15788   *" gettimeofday.$ac_objext "* ) ;;
15789   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15790  ;;
15791 esac
15792
15793 fi
15794
15795
15796   case " $LIBOBJS " in
15797   *" dirmod.$ac_objext "* ) ;;
15798   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15799  ;;
15800 esac
15801
15802   case " $LIBOBJS " in
15803   *" kill.$ac_objext "* ) ;;
15804   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15805  ;;
15806 esac
15807
15808   case " $LIBOBJS " in
15809   *" open.$ac_objext "* ) ;;
15810   *) LIBOBJS="$LIBOBJS open.$ac_objext"
15811  ;;
15812 esac
15813
15814   case " $LIBOBJS " in
15815   *" system.$ac_objext "* ) ;;
15816   *) LIBOBJS="$LIBOBJS system.$ac_objext"
15817  ;;
15818 esac
15819
15820   case " $LIBOBJS " in
15821   *" win32env.$ac_objext "* ) ;;
15822   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15823  ;;
15824 esac
15825
15826   case " $LIBOBJS " in
15827   *" win32error.$ac_objext "* ) ;;
15828   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15829  ;;
15830 esac
15831
15832   case " $LIBOBJS " in
15833   *" win32security.$ac_objext "* ) ;;
15834   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15835  ;;
15836 esac
15837
15838   case " $LIBOBJS " in
15839   *" win32setlocale.$ac_objext "* ) ;;
15840   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15841  ;;
15842 esac
15843
15844
15845 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
15846
15847   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
15848 #define WIN32_LEAN_AND_MEAN
15849 #include <windows.h>
15850 #include <string.h>
15851 #include <dbghelp.h>
15852 "
15853 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
15854
15855 cat >>confdefs.h <<_ACEOF
15856 #define HAVE_MINIDUMP_TYPE 1
15857 _ACEOF
15858
15859 pgac_minidump_type=yes
15860 else
15861   pgac_minidump_type=no
15862 fi
15863
15864 fi
15865 if test x"$pgac_minidump_type" = x"yes" ; then
15866   have_win32_dbghelp=yes
15867
15868 else
15869   have_win32_dbghelp=no
15870
15871 fi
15872
15873 # Cygwin needs only a bit of that
15874 if test "$PORTNAME" = "cygwin"; then
15875   case " $LIBOBJS " in
15876   *" dirmod.$ac_objext "* ) ;;
15877   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15878  ;;
15879 esac
15880
15881 fi
15882
15883 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
15884 /* NetBSD declares sys_siglist in unistd.h.  */
15885 #ifdef HAVE_UNISTD_H
15886 # include <unistd.h>
15887 #endif
15888
15889 "
15890 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
15891   ac_have_decl=1
15892 else
15893   ac_have_decl=0
15894 fi
15895
15896 cat >>confdefs.h <<_ACEOF
15897 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
15898 _ACEOF
15899
15900
15901 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15902 if test "x$ac_cv_func_syslog" = xyes; then :
15903   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15904 if test "x$ac_cv_header_syslog_h" = xyes; then :
15905
15906 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15907
15908 fi
15909
15910
15911 fi
15912
15913
15914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15915 $as_echo_n "checking for opterr... " >&6; }
15916 if ${pgac_cv_var_int_opterr+:} false; then :
15917   $as_echo_n "(cached) " >&6
15918 else
15919   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15920 /* end confdefs.h.  */
15921 #include <unistd.h>
15922 int
15923 main ()
15924 {
15925 extern int opterr; opterr = 1;
15926   ;
15927   return 0;
15928 }
15929 _ACEOF
15930 if ac_fn_c_try_link "$LINENO"; then :
15931   pgac_cv_var_int_opterr=yes
15932 else
15933   pgac_cv_var_int_opterr=no
15934 fi
15935 rm -f core conftest.err conftest.$ac_objext \
15936     conftest$ac_exeext conftest.$ac_ext
15937 fi
15938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15939 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15940 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15941
15942 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15943
15944 fi
15945
15946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15947 $as_echo_n "checking for optreset... " >&6; }
15948 if ${pgac_cv_var_int_optreset+:} false; then :
15949   $as_echo_n "(cached) " >&6
15950 else
15951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15952 /* end confdefs.h.  */
15953 #include <unistd.h>
15954 int
15955 main ()
15956 {
15957 extern int optreset; optreset = 1;
15958   ;
15959   return 0;
15960 }
15961 _ACEOF
15962 if ac_fn_c_try_link "$LINENO"; then :
15963   pgac_cv_var_int_optreset=yes
15964 else
15965   pgac_cv_var_int_optreset=no
15966 fi
15967 rm -f core conftest.err conftest.$ac_objext \
15968     conftest$ac_exeext conftest.$ac_ext
15969 fi
15970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
15971 $as_echo "$pgac_cv_var_int_optreset" >&6; }
15972 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15973
15974 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
15975
15976 fi
15977
15978 for ac_func in strtoll __strtoll strtoq
15979 do :
15980   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15981 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15982 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15983   cat >>confdefs.h <<_ACEOF
15984 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15985 _ACEOF
15986  break
15987 fi
15988 done
15989
15990 for ac_func in strtoull __strtoull strtouq
15991 do :
15992   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15993 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15994 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15995   cat >>confdefs.h <<_ACEOF
15996 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15997 _ACEOF
15998  break
15999 fi
16000 done
16001
16002 # strto[u]ll may exist but not be declared
16003 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16004 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16005   ac_have_decl=1
16006 else
16007   ac_have_decl=0
16008 fi
16009
16010 cat >>confdefs.h <<_ACEOF
16011 #define HAVE_DECL_STRTOLL $ac_have_decl
16012 _ACEOF
16013 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16014 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16015   ac_have_decl=1
16016 else
16017   ac_have_decl=0
16018 fi
16019
16020 cat >>confdefs.h <<_ACEOF
16021 #define HAVE_DECL_STRTOULL $ac_have_decl
16022 _ACEOF
16023
16024
16025 if test "$with_icu" = yes; then
16026   ac_save_CPPFLAGS=$CPPFLAGS
16027   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16028
16029   # Verify we have ICU's header files
16030   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16031 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16032
16033 else
16034   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16035 fi
16036
16037
16038
16039   CPPFLAGS=$ac_save_CPPFLAGS
16040 fi
16041
16042 # Lastly, restore full LIBS list and check for readline/libedit symbols
16043 LIBS="$LIBS_including_readline"
16044
16045 if test "$with_readline" = yes; then
16046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16047 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16048 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16049   $as_echo_n "(cached) " >&6
16050 else
16051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16052 /* end confdefs.h.  */
16053 #include <stdio.h>
16054 #ifdef HAVE_READLINE_READLINE_H
16055 # include <readline/readline.h>
16056 #elif defined(HAVE_READLINE_H)
16057 # include <readline.h>
16058 #endif
16059
16060 int
16061 main ()
16062 {
16063 rl_completion_append_character = 'x';
16064   ;
16065   return 0;
16066 }
16067 _ACEOF
16068 if ac_fn_c_try_link "$LINENO"; then :
16069   pgac_cv_var_rl_completion_append_character=yes
16070 else
16071   pgac_cv_var_rl_completion_append_character=no
16072 fi
16073 rm -f core conftest.err conftest.$ac_objext \
16074     conftest$ac_exeext conftest.$ac_ext
16075 fi
16076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16077 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16078 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16079
16080 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16081
16082 fi
16083   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16084 do :
16085   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16086 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16087 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16088   cat >>confdefs.h <<_ACEOF
16089 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16090 _ACEOF
16091
16092 fi
16093 done
16094
16095   for ac_func in append_history history_truncate_file
16096 do :
16097   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16098 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16099 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16100   cat >>confdefs.h <<_ACEOF
16101 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16102 _ACEOF
16103
16104 fi
16105 done
16106
16107 fi
16108
16109
16110 # This test makes sure that run tests work at all.  Sometimes a shared
16111 # library is found by the linker, but the runtime linker can't find it.
16112 # This check should come after all modifications of compiler or linker
16113 # variables, and before any other run tests.
16114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16115 $as_echo_n "checking test program... " >&6; }
16116 if test "$cross_compiling" = yes; then :
16117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16118 $as_echo "cross-compiling" >&6; }
16119 else
16120   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16121 /* end confdefs.h.  */
16122 int main() { return 0; }
16123 _ACEOF
16124 if ac_fn_c_try_run "$LINENO"; then :
16125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16126 $as_echo "ok" >&6; }
16127 else
16128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16129 $as_echo "failed" >&6; }
16130 as_fn_error $? "
16131 Could not execute a simple test program.  This may be a problem
16132 related to locating shared libraries.  Check the file 'config.log'
16133 for the exact reason." "$LINENO" 5
16134 fi
16135 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16136   conftest.$ac_objext conftest.beam conftest.$ac_ext
16137 fi
16138
16139
16140 # --------------------
16141 # Run tests below here
16142 # --------------------
16143
16144 # For NLS, force use of our snprintf if system's doesn't do arg control.
16145 # See comment above at snprintf test for details.
16146 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
16147   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
16148 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
16149 if ${pgac_cv_snprintf_arg_control+:} false; then :
16150   $as_echo_n "(cached) " >&6
16151 else
16152   if test "$cross_compiling" = yes; then :
16153   pgac_cv_snprintf_arg_control=cross
16154 else
16155   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16156 /* end confdefs.h.  */
16157 #include <stdio.h>
16158 #include <string.h>
16159
16160 int main()
16161 {
16162   char buf[100];
16163
16164   /* can it swap arguments? */
16165   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
16166   if (strcmp(buf, "4 3") != 0)
16167     return 1;
16168   return 0;
16169 }
16170 _ACEOF
16171 if ac_fn_c_try_run "$LINENO"; then :
16172   pgac_cv_snprintf_arg_control=yes
16173 else
16174   pgac_cv_snprintf_arg_control=no
16175 fi
16176 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16177   conftest.$ac_objext conftest.beam conftest.$ac_ext
16178 fi
16179
16180
16181 fi
16182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
16183 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
16184
16185   if test $pgac_cv_snprintf_arg_control != yes ; then
16186     pgac_need_repl_snprintf=yes
16187   fi
16188 fi
16189
16190
16191
16192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16193 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16194 if ${pgac_cv_type_long_int_64+:} false; then :
16195   $as_echo_n "(cached) " >&6
16196 else
16197   if test "$cross_compiling" = yes; then :
16198   # If cross-compiling, check the size reported by the compiler and
16199 # trust that the arithmetic works.
16200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16201 /* end confdefs.h.  */
16202
16203 int
16204 main ()
16205 {
16206 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16207 test_array [0] = 0;
16208 return test_array [0];
16209
16210   ;
16211   return 0;
16212 }
16213 _ACEOF
16214 if ac_fn_c_try_compile "$LINENO"; then :
16215   pgac_cv_type_long_int_64=yes
16216 else
16217   pgac_cv_type_long_int_64=no
16218 fi
16219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16220 else
16221   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16222 /* end confdefs.h.  */
16223 typedef long int ac_int64;
16224
16225 /*
16226  * These are globals to discourage the compiler from folding all the
16227  * arithmetic tests down to compile-time constants.
16228  */
16229 ac_int64 a = 20000001;
16230 ac_int64 b = 40000005;
16231
16232 int does_int64_work()
16233 {
16234   ac_int64 c,d;
16235
16236   if (sizeof(ac_int64) != 8)
16237     return 0;                   /* definitely not the right size */
16238
16239   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16240   c = a * b;
16241   d = (c + b) / b;
16242   if (d != a+1)
16243     return 0;
16244   return 1;
16245 }
16246
16247 int
16248 main() {
16249   return (! does_int64_work());
16250 }
16251 _ACEOF
16252 if ac_fn_c_try_run "$LINENO"; then :
16253   pgac_cv_type_long_int_64=yes
16254 else
16255   pgac_cv_type_long_int_64=no
16256 fi
16257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16258   conftest.$ac_objext conftest.beam conftest.$ac_ext
16259 fi
16260
16261 fi
16262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16263 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16264
16265 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16266 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16267
16268 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16269
16270 fi
16271
16272
16273 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16274   pg_int64_type="long int"
16275 else
16276   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16277 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16278 if ${pgac_cv_type_long_long_int_64+:} false; then :
16279   $as_echo_n "(cached) " >&6
16280 else
16281   if test "$cross_compiling" = yes; then :
16282   # If cross-compiling, check the size reported by the compiler and
16283 # trust that the arithmetic works.
16284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16285 /* end confdefs.h.  */
16286
16287 int
16288 main ()
16289 {
16290 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16291 test_array [0] = 0;
16292 return test_array [0];
16293
16294   ;
16295   return 0;
16296 }
16297 _ACEOF
16298 if ac_fn_c_try_compile "$LINENO"; then :
16299   pgac_cv_type_long_long_int_64=yes
16300 else
16301   pgac_cv_type_long_long_int_64=no
16302 fi
16303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16304 else
16305   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16306 /* end confdefs.h.  */
16307 typedef long long int ac_int64;
16308
16309 /*
16310  * These are globals to discourage the compiler from folding all the
16311  * arithmetic tests down to compile-time constants.
16312  */
16313 ac_int64 a = 20000001;
16314 ac_int64 b = 40000005;
16315
16316 int does_int64_work()
16317 {
16318   ac_int64 c,d;
16319
16320   if (sizeof(ac_int64) != 8)
16321     return 0;                   /* definitely not the right size */
16322
16323   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16324   c = a * b;
16325   d = (c + b) / b;
16326   if (d != a+1)
16327     return 0;
16328   return 1;
16329 }
16330
16331 int
16332 main() {
16333   return (! does_int64_work());
16334 }
16335 _ACEOF
16336 if ac_fn_c_try_run "$LINENO"; then :
16337   pgac_cv_type_long_long_int_64=yes
16338 else
16339   pgac_cv_type_long_long_int_64=no
16340 fi
16341 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16342   conftest.$ac_objext conftest.beam conftest.$ac_ext
16343 fi
16344
16345 fi
16346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16347 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16348
16349 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16350 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16351
16352 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16353
16354 fi
16355
16356   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16357     pg_int64_type="long long int"
16358   else
16359     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16360   fi
16361 fi
16362
16363
16364 cat >>confdefs.h <<_ACEOF
16365 #define PG_INT64_TYPE $pg_int64_type
16366 _ACEOF
16367
16368
16369 # Select the printf length modifier that goes with that, too.
16370 # (This used to be bound up with replacement-snprintf selection, but now
16371 # we assume that the native *printf functions use standard length modifiers.)
16372 if test x"$pg_int64_type" = x"long long int" ; then
16373   INT64_MODIFIER='"ll"'
16374 else
16375   INT64_MODIFIER='"l"'
16376 fi
16377
16378
16379 cat >>confdefs.h <<_ACEOF
16380 #define INT64_MODIFIER $INT64_MODIFIER
16381 _ACEOF
16382
16383
16384 # Force use of our snprintf if the system's doesn't support the %z flag.
16385 # (Note this test uses PG_INT64_TYPE and INT64_MODIFIER.)
16386 if test "$pgac_need_repl_snprintf" = no; then
16387   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
16388 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
16389 if ${pgac_cv_snprintf_size_t_support+:} false; then :
16390   $as_echo_n "(cached) " >&6
16391 else
16392   if test "$cross_compiling" = yes; then :
16393   pgac_cv_snprintf_size_t_support=cross
16394 else
16395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16396 /* end confdefs.h.  */
16397 #include <stdio.h>
16398 #include <string.h>
16399
16400 int main()
16401 {
16402   char bufz[100];
16403   char buf64[100];
16404
16405   /*
16406    * Print the largest unsigned number fitting in a size_t using both %zu
16407    * and the previously-determined format for 64-bit integers.  Note that
16408    * we don't run this code unless we know snprintf handles 64-bit ints.
16409    */
16410   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
16411   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
16412   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
16413     (unsigned PG_INT64_TYPE) ~((size_t) 0));
16414   if (strcmp(bufz, buf64) != 0)
16415     return 1;
16416   return 0;
16417 }
16418 _ACEOF
16419 if ac_fn_c_try_run "$LINENO"; then :
16420   pgac_cv_snprintf_size_t_support=yes
16421 else
16422   pgac_cv_snprintf_size_t_support=no
16423 fi
16424 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16425   conftest.$ac_objext conftest.beam conftest.$ac_ext
16426 fi
16427
16428
16429 fi
16430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
16431 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
16432
16433   if test "$pgac_cv_snprintf_size_t_support" != yes; then
16434     pgac_need_repl_snprintf=yes
16435   fi
16436 fi
16437
16438 # Force use of our snprintf if the system's doesn't handle buffer overrun
16439 # as specified by C99.
16440 if test "$pgac_need_repl_snprintf" = no; then
16441   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf handles buffer overrun per C99" >&5
16442 $as_echo_n "checking whether snprintf handles buffer overrun per C99... " >&6; }
16443 if ${pgac_cv_snprintf_c99_result+:} false; then :
16444   $as_echo_n "(cached) " >&6
16445 else
16446   if test "$cross_compiling" = yes; then :
16447   pgac_cv_snprintf_c99_result=cross
16448 else
16449   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16450 /* end confdefs.h.  */
16451 #include <stdio.h>
16452 #include <string.h>
16453
16454 int main()
16455 {
16456   char buf[10];
16457
16458   strcpy(buf, "abcdefghi");
16459   if (snprintf(buf, 4, "%d", 123456) != 6)
16460     return 1;
16461   if (strcmp(buf, "123") != 0 || buf[4] != 'e')
16462     return 1;
16463   return 0;
16464 }
16465 _ACEOF
16466 if ac_fn_c_try_run "$LINENO"; then :
16467   pgac_cv_snprintf_c99_result=yes
16468 else
16469   pgac_cv_snprintf_c99_result=no
16470 fi
16471 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16472   conftest.$ac_objext conftest.beam conftest.$ac_ext
16473 fi
16474
16475
16476 fi
16477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_c99_result" >&5
16478 $as_echo "$pgac_cv_snprintf_c99_result" >&6; }
16479
16480   if test "$pgac_cv_snprintf_c99_result" != yes; then
16481     pgac_need_repl_snprintf=yes
16482   fi
16483 fi
16484
16485 # Now we have checked all the reasons to replace snprintf
16486 if test $pgac_need_repl_snprintf = yes; then
16487
16488 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
16489
16490   case " $LIBOBJS " in
16491   *" snprintf.$ac_objext "* ) ;;
16492   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
16493  ;;
16494 esac
16495
16496 fi
16497
16498 # has to be down here, rather than with the other builtins, because
16499 # the test uses PG_INT64_TYPE.
16500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16501 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16502 if ${pgac_cv__builtin_op_overflow+:} false; then :
16503   $as_echo_n "(cached) " >&6
16504 else
16505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16506 /* end confdefs.h.  */
16507
16508 PG_INT64_TYPE a = 1;
16509 PG_INT64_TYPE b = 1;
16510 PG_INT64_TYPE result;
16511 int oflo;
16512
16513 int
16514 main ()
16515 {
16516 oflo = __builtin_mul_overflow(a, b, &result);
16517   ;
16518   return 0;
16519 }
16520 _ACEOF
16521 if ac_fn_c_try_link "$LINENO"; then :
16522   pgac_cv__builtin_op_overflow=yes
16523 else
16524   pgac_cv__builtin_op_overflow=no
16525 fi
16526 rm -f core conftest.err conftest.$ac_objext \
16527     conftest$ac_exeext conftest.$ac_ext
16528 fi
16529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16530 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16531 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16532
16533 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16534
16535 fi
16536
16537 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16538 # The cast to long int works around a bug in the HP C Compiler
16539 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16540 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16541 # This bug is HP SR number 8606223364.
16542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16543 $as_echo_n "checking size of void *... " >&6; }
16544 if ${ac_cv_sizeof_void_p+:} false; then :
16545   $as_echo_n "(cached) " >&6
16546 else
16547   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16548
16549 else
16550   if test "$ac_cv_type_void_p" = yes; then
16551      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16552 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16553 as_fn_error 77 "cannot compute sizeof (void *)
16554 See \`config.log' for more details" "$LINENO" 5; }
16555    else
16556      ac_cv_sizeof_void_p=0
16557    fi
16558 fi
16559
16560 fi
16561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16562 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16563
16564
16565
16566 cat >>confdefs.h <<_ACEOF
16567 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16568 _ACEOF
16569
16570
16571 # The cast to long int works around a bug in the HP C Compiler
16572 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16573 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16574 # This bug is HP SR number 8606223364.
16575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16576 $as_echo_n "checking size of size_t... " >&6; }
16577 if ${ac_cv_sizeof_size_t+:} false; then :
16578   $as_echo_n "(cached) " >&6
16579 else
16580   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16581
16582 else
16583   if test "$ac_cv_type_size_t" = yes; then
16584      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16585 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16586 as_fn_error 77 "cannot compute sizeof (size_t)
16587 See \`config.log' for more details" "$LINENO" 5; }
16588    else
16589      ac_cv_sizeof_size_t=0
16590    fi
16591 fi
16592
16593 fi
16594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16595 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16596
16597
16598
16599 cat >>confdefs.h <<_ACEOF
16600 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16601 _ACEOF
16602
16603
16604 # The cast to long int works around a bug in the HP C Compiler
16605 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16606 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16607 # This bug is HP SR number 8606223364.
16608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16609 $as_echo_n "checking size of long... " >&6; }
16610 if ${ac_cv_sizeof_long+:} false; then :
16611   $as_echo_n "(cached) " >&6
16612 else
16613   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16614
16615 else
16616   if test "$ac_cv_type_long" = yes; then
16617      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16618 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16619 as_fn_error 77 "cannot compute sizeof (long)
16620 See \`config.log' for more details" "$LINENO" 5; }
16621    else
16622      ac_cv_sizeof_long=0
16623    fi
16624 fi
16625
16626 fi
16627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16628 $as_echo "$ac_cv_sizeof_long" >&6; }
16629
16630
16631
16632 cat >>confdefs.h <<_ACEOF
16633 #define SIZEOF_LONG $ac_cv_sizeof_long
16634 _ACEOF
16635
16636
16637
16638 # Decide whether float4 is passed by value: user-selectable, enabled by default
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16640 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16641
16642
16643 # Check whether --enable-float4-byval was given.
16644 if test "${enable_float4_byval+set}" = set; then :
16645   enableval=$enable_float4_byval;
16646   case $enableval in
16647     yes)
16648
16649 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16650
16651                float4passbyval=true
16652       ;;
16653     no)
16654       float4passbyval=false
16655       ;;
16656     *)
16657       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16658       ;;
16659   esac
16660
16661 else
16662   enable_float4_byval=yes
16663
16664 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16665
16666                float4passbyval=true
16667 fi
16668
16669
16670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16671 $as_echo "$enable_float4_byval" >&6; }
16672
16673 cat >>confdefs.h <<_ACEOF
16674 #define FLOAT4PASSBYVAL $float4passbyval
16675 _ACEOF
16676
16677
16678 # Decide whether float8 is passed by value.
16679 # Note: this setting also controls int8 and related types such as timestamp.
16680 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16681 # If not, trying to select it is an error.
16682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16683 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16684 if test $ac_cv_sizeof_void_p -ge 8 ; then
16685
16686
16687 # Check whether --enable-float8-byval was given.
16688 if test "${enable_float8_byval+set}" = set; then :
16689   enableval=$enable_float8_byval;
16690   case $enableval in
16691     yes)
16692       :
16693       ;;
16694     no)
16695       :
16696       ;;
16697     *)
16698       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16699       ;;
16700   esac
16701
16702 else
16703   enable_float8_byval=yes
16704
16705 fi
16706
16707
16708 else
16709
16710
16711 # Check whether --enable-float8-byval was given.
16712 if test "${enable_float8_byval+set}" = set; then :
16713   enableval=$enable_float8_byval;
16714   case $enableval in
16715     yes)
16716       :
16717       ;;
16718     no)
16719       :
16720       ;;
16721     *)
16722       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16723       ;;
16724   esac
16725
16726 else
16727   enable_float8_byval=no
16728
16729 fi
16730
16731
16732   if test "$enable_float8_byval" = yes ; then
16733     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16734   fi
16735 fi
16736 if test "$enable_float8_byval" = yes ; then
16737
16738 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16739
16740   float8passbyval=true
16741 else
16742   float8passbyval=false
16743 fi
16744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16745 $as_echo "$enable_float8_byval" >&6; }
16746
16747 cat >>confdefs.h <<_ACEOF
16748 #define FLOAT8PASSBYVAL $float8passbyval
16749 _ACEOF
16750
16751
16752 # Determine memory alignment requirements for the basic C data types.
16753
16754 # The cast to long int works around a bug in the HP C Compiler,
16755 # see AC_CHECK_SIZEOF for more information.
16756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16757 $as_echo_n "checking alignment of short... " >&6; }
16758 if ${ac_cv_alignof_short+:} false; then :
16759   $as_echo_n "(cached) " >&6
16760 else
16761   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16762 #ifndef offsetof
16763 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16764 #endif
16765 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16766
16767 else
16768   if test "$ac_cv_type_short" = yes; then
16769      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16770 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16771 as_fn_error 77 "cannot compute alignment of short
16772 See \`config.log' for more details" "$LINENO" 5; }
16773    else
16774      ac_cv_alignof_short=0
16775    fi
16776 fi
16777
16778 fi
16779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16780 $as_echo "$ac_cv_alignof_short" >&6; }
16781
16782
16783
16784 cat >>confdefs.h <<_ACEOF
16785 #define ALIGNOF_SHORT $ac_cv_alignof_short
16786 _ACEOF
16787
16788
16789 # The cast to long int works around a bug in the HP C Compiler,
16790 # see AC_CHECK_SIZEOF for more information.
16791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16792 $as_echo_n "checking alignment of int... " >&6; }
16793 if ${ac_cv_alignof_int+:} false; then :
16794   $as_echo_n "(cached) " >&6
16795 else
16796   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16797 #ifndef offsetof
16798 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16799 #endif
16800 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16801
16802 else
16803   if test "$ac_cv_type_int" = yes; then
16804      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16805 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16806 as_fn_error 77 "cannot compute alignment of int
16807 See \`config.log' for more details" "$LINENO" 5; }
16808    else
16809      ac_cv_alignof_int=0
16810    fi
16811 fi
16812
16813 fi
16814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16815 $as_echo "$ac_cv_alignof_int" >&6; }
16816
16817
16818
16819 cat >>confdefs.h <<_ACEOF
16820 #define ALIGNOF_INT $ac_cv_alignof_int
16821 _ACEOF
16822
16823
16824 # The cast to long int works around a bug in the HP C Compiler,
16825 # see AC_CHECK_SIZEOF for more information.
16826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16827 $as_echo_n "checking alignment of long... " >&6; }
16828 if ${ac_cv_alignof_long+:} false; then :
16829   $as_echo_n "(cached) " >&6
16830 else
16831   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16832 #ifndef offsetof
16833 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16834 #endif
16835 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16836
16837 else
16838   if test "$ac_cv_type_long" = yes; then
16839      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16840 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16841 as_fn_error 77 "cannot compute alignment of long
16842 See \`config.log' for more details" "$LINENO" 5; }
16843    else
16844      ac_cv_alignof_long=0
16845    fi
16846 fi
16847
16848 fi
16849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16850 $as_echo "$ac_cv_alignof_long" >&6; }
16851
16852
16853
16854 cat >>confdefs.h <<_ACEOF
16855 #define ALIGNOF_LONG $ac_cv_alignof_long
16856 _ACEOF
16857
16858
16859 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16860   # The cast to long int works around a bug in the HP C Compiler,
16861 # see AC_CHECK_SIZEOF for more information.
16862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16863 $as_echo_n "checking alignment of long long int... " >&6; }
16864 if ${ac_cv_alignof_long_long_int+:} false; then :
16865   $as_echo_n "(cached) " >&6
16866 else
16867   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
16868 #ifndef offsetof
16869 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16870 #endif
16871 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16872
16873 else
16874   if test "$ac_cv_type_long_long_int" = yes; then
16875      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16876 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16877 as_fn_error 77 "cannot compute alignment of long long int
16878 See \`config.log' for more details" "$LINENO" 5; }
16879    else
16880      ac_cv_alignof_long_long_int=0
16881    fi
16882 fi
16883
16884 fi
16885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16886 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16887
16888
16889
16890 cat >>confdefs.h <<_ACEOF
16891 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16892 _ACEOF
16893
16894
16895 fi
16896 # The cast to long int works around a bug in the HP C Compiler,
16897 # see AC_CHECK_SIZEOF for more information.
16898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16899 $as_echo_n "checking alignment of double... " >&6; }
16900 if ${ac_cv_alignof_double+:} false; then :
16901   $as_echo_n "(cached) " >&6
16902 else
16903   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
16904 #ifndef offsetof
16905 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16906 #endif
16907 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16908
16909 else
16910   if test "$ac_cv_type_double" = yes; then
16911      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16912 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16913 as_fn_error 77 "cannot compute alignment of double
16914 See \`config.log' for more details" "$LINENO" 5; }
16915    else
16916      ac_cv_alignof_double=0
16917    fi
16918 fi
16919
16920 fi
16921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16922 $as_echo "$ac_cv_alignof_double" >&6; }
16923
16924
16925
16926 cat >>confdefs.h <<_ACEOF
16927 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16928 _ACEOF
16929
16930
16931
16932 # Compute maximum alignment of any basic type.
16933 # We assume long's alignment is at least as strong as char, short, or int;
16934 # but we must check long long (if it is being used for int64) and double.
16935 # Note that we intentionally do not consider any types wider than 64 bits,
16936 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
16937 # for disk and memory space.
16938
16939 MAX_ALIGNOF=$ac_cv_alignof_long
16940 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
16941   MAX_ALIGNOF=$ac_cv_alignof_double
16942 fi
16943 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
16944   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
16945 fi
16946
16947 cat >>confdefs.h <<_ACEOF
16948 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16949 _ACEOF
16950
16951
16952
16953 # Some platforms predefine the types int8, int16, etc.  Only check
16954 # a (hopefully) representative subset.
16955 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16956 "
16957 if test "x$ac_cv_type_int8" = xyes; then :
16958
16959 cat >>confdefs.h <<_ACEOF
16960 #define HAVE_INT8 1
16961 _ACEOF
16962
16963
16964 fi
16965 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16966 "
16967 if test "x$ac_cv_type_uint8" = xyes; then :
16968
16969 cat >>confdefs.h <<_ACEOF
16970 #define HAVE_UINT8 1
16971 _ACEOF
16972
16973
16974 fi
16975 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
16976 "
16977 if test "x$ac_cv_type_int64" = xyes; then :
16978
16979 cat >>confdefs.h <<_ACEOF
16980 #define HAVE_INT64 1
16981 _ACEOF
16982
16983
16984 fi
16985 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
16986 "
16987 if test "x$ac_cv_type_uint64" = xyes; then :
16988
16989 cat >>confdefs.h <<_ACEOF
16990 #define HAVE_UINT64 1
16991 _ACEOF
16992
16993
16994 fi
16995
16996
16997 # Some compilers offer a 128-bit integer scalar type.
16998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16999 $as_echo_n "checking for __int128... " >&6; }
17000 if ${pgac_cv__128bit_int+:} false; then :
17001   $as_echo_n "(cached) " >&6
17002 else
17003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17004 /* end confdefs.h.  */
17005
17006 /*
17007  * We don't actually run this test, just link it to verify that any support
17008  * functions needed for __int128 are present.
17009  *
17010  * These are globals to discourage the compiler from folding all the
17011  * arithmetic tests down to compile-time constants.  We do not have
17012  * convenient support for 128bit literals at this point...
17013  */
17014 __int128 a = 48828125;
17015 __int128 b = 97656250;
17016
17017 int
17018 main ()
17019 {
17020
17021 __int128 c,d;
17022 a = (a << 12) + 1; /* 200000000001 */
17023 b = (b << 12) + 5; /* 400000000005 */
17024 /* try the most relevant arithmetic ops */
17025 c = a * b;
17026 d = (c + b) / b;
17027 /* must use the results, else compiler may optimize arithmetic away */
17028 if (d != a+1)
17029   return 1;
17030
17031   ;
17032   return 0;
17033 }
17034 _ACEOF
17035 if ac_fn_c_try_link "$LINENO"; then :
17036   pgac_cv__128bit_int=yes
17037 else
17038   pgac_cv__128bit_int=no
17039 fi
17040 rm -f core conftest.err conftest.$ac_objext \
17041     conftest$ac_exeext conftest.$ac_ext
17042 fi
17043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17044 $as_echo "$pgac_cv__128bit_int" >&6; }
17045 if test x"$pgac_cv__128bit_int" = xyes ; then
17046   # Use of non-default alignment with __int128 tickles bugs in some compilers.
17047   # If not cross-compiling, we can test for bugs and disable use of __int128
17048   # with buggy compilers.  If cross-compiling, hope for the best.
17049   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17050   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17051 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17052 if ${pgac_cv__128bit_int_bug+:} false; then :
17053   $as_echo_n "(cached) " >&6
17054 else
17055   if test "$cross_compiling" = yes; then :
17056   pgac_cv__128bit_int_bug="assuming ok"
17057 else
17058   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17059 /* end confdefs.h.  */
17060
17061 /* This must match the corresponding code in c.h: */
17062 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17063 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17064 #endif
17065 typedef __int128 int128a
17066 #if defined(pg_attribute_aligned)
17067 pg_attribute_aligned(8)
17068 #endif
17069 ;
17070 int128a holder;
17071 void pass_by_val(void *buffer, int128a par) { holder = par; }
17072
17073 int
17074 main ()
17075 {
17076
17077 long int i64 = 97656225L << 12;
17078 int128a q;
17079 pass_by_val(main, (int128a) i64);
17080 q = (int128a) i64;
17081 if (q != holder)
17082   return 1;
17083
17084   ;
17085   return 0;
17086 }
17087 _ACEOF
17088 if ac_fn_c_try_run "$LINENO"; then :
17089   pgac_cv__128bit_int_bug=ok
17090 else
17091   pgac_cv__128bit_int_bug=broken
17092 fi
17093 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17094   conftest.$ac_objext conftest.beam conftest.$ac_ext
17095 fi
17096
17097 fi
17098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17099 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17100   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17101
17102 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17103
17104     # The cast to long int works around a bug in the HP C Compiler,
17105 # see AC_CHECK_SIZEOF for more information.
17106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17107 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17108 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17109   $as_echo_n "(cached) " >&6
17110 else
17111   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
17112 #ifndef offsetof
17113 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17114 #endif
17115 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17116
17117 else
17118   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17119      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17120 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17121 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17122 See \`config.log' for more details" "$LINENO" 5; }
17123    else
17124      ac_cv_alignof_PG_INT128_TYPE=0
17125    fi
17126 fi
17127
17128 fi
17129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17130 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17131
17132
17133
17134 cat >>confdefs.h <<_ACEOF
17135 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17136 _ACEOF
17137
17138
17139   fi
17140 fi
17141
17142 # Check for various atomic operations now that we have checked how to declare
17143 # 64bit integers.
17144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17145 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17146 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17147   $as_echo_n "(cached) " >&6
17148 else
17149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17150 /* end confdefs.h.  */
17151
17152 int
17153 main ()
17154 {
17155 char lock = 0;
17156    __sync_lock_test_and_set(&lock, 1);
17157    __sync_lock_release(&lock);
17158   ;
17159   return 0;
17160 }
17161 _ACEOF
17162 if ac_fn_c_try_link "$LINENO"; then :
17163   pgac_cv_gcc_sync_char_tas="yes"
17164 else
17165   pgac_cv_gcc_sync_char_tas="no"
17166 fi
17167 rm -f core conftest.err conftest.$ac_objext \
17168     conftest$ac_exeext conftest.$ac_ext
17169 fi
17170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17171 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17172 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17173
17174 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17175
17176 fi
17177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17178 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17179 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17180   $as_echo_n "(cached) " >&6
17181 else
17182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17183 /* end confdefs.h.  */
17184
17185 int
17186 main ()
17187 {
17188 int lock = 0;
17189    __sync_lock_test_and_set(&lock, 1);
17190    __sync_lock_release(&lock);
17191   ;
17192   return 0;
17193 }
17194 _ACEOF
17195 if ac_fn_c_try_link "$LINENO"; then :
17196   pgac_cv_gcc_sync_int32_tas="yes"
17197 else
17198   pgac_cv_gcc_sync_int32_tas="no"
17199 fi
17200 rm -f core conftest.err conftest.$ac_objext \
17201     conftest$ac_exeext conftest.$ac_ext
17202 fi
17203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17204 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17205 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17206
17207 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17208
17209 fi
17210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17211 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17212 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17213   $as_echo_n "(cached) " >&6
17214 else
17215   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17216 /* end confdefs.h.  */
17217
17218 int
17219 main ()
17220 {
17221 int val = 0;
17222    __sync_val_compare_and_swap(&val, 0, 37);
17223   ;
17224   return 0;
17225 }
17226 _ACEOF
17227 if ac_fn_c_try_link "$LINENO"; then :
17228   pgac_cv_gcc_sync_int32_cas="yes"
17229 else
17230   pgac_cv_gcc_sync_int32_cas="no"
17231 fi
17232 rm -f core conftest.err conftest.$ac_objext \
17233     conftest$ac_exeext conftest.$ac_ext
17234 fi
17235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17236 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17237 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17238
17239 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17240
17241 fi
17242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17243 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17244 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17245   $as_echo_n "(cached) " >&6
17246 else
17247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17248 /* end confdefs.h.  */
17249
17250 int
17251 main ()
17252 {
17253 PG_INT64_TYPE lock = 0;
17254    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17255   ;
17256   return 0;
17257 }
17258 _ACEOF
17259 if ac_fn_c_try_link "$LINENO"; then :
17260   pgac_cv_gcc_sync_int64_cas="yes"
17261 else
17262   pgac_cv_gcc_sync_int64_cas="no"
17263 fi
17264 rm -f core conftest.err conftest.$ac_objext \
17265     conftest$ac_exeext conftest.$ac_ext
17266 fi
17267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17268 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17269 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17270
17271 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17272
17273 fi
17274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17275 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17276 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17277   $as_echo_n "(cached) " >&6
17278 else
17279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17280 /* end confdefs.h.  */
17281
17282 int
17283 main ()
17284 {
17285 int val = 0;
17286    int expect = 0;
17287    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17288   ;
17289   return 0;
17290 }
17291 _ACEOF
17292 if ac_fn_c_try_link "$LINENO"; then :
17293   pgac_cv_gcc_atomic_int32_cas="yes"
17294 else
17295   pgac_cv_gcc_atomic_int32_cas="no"
17296 fi
17297 rm -f core conftest.err conftest.$ac_objext \
17298     conftest$ac_exeext conftest.$ac_ext
17299 fi
17300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17301 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17302 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17303
17304 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17305
17306 fi
17307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17308 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17309 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17310   $as_echo_n "(cached) " >&6
17311 else
17312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17313 /* end confdefs.h.  */
17314
17315 int
17316 main ()
17317 {
17318 PG_INT64_TYPE val = 0;
17319    PG_INT64_TYPE expect = 0;
17320    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17321   ;
17322   return 0;
17323 }
17324 _ACEOF
17325 if ac_fn_c_try_link "$LINENO"; then :
17326   pgac_cv_gcc_atomic_int64_cas="yes"
17327 else
17328   pgac_cv_gcc_atomic_int64_cas="no"
17329 fi
17330 rm -f core conftest.err conftest.$ac_objext \
17331     conftest$ac_exeext conftest.$ac_ext
17332 fi
17333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17334 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17335 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17336
17337 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17338
17339 fi
17340
17341
17342 # Check for x86 cpuid instruction
17343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17344 $as_echo_n "checking for __get_cpuid... " >&6; }
17345 if ${pgac_cv__get_cpuid+:} false; then :
17346   $as_echo_n "(cached) " >&6
17347 else
17348   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17349 /* end confdefs.h.  */
17350 #include <cpuid.h>
17351 int
17352 main ()
17353 {
17354 unsigned int exx[4] = {0, 0, 0, 0};
17355   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17356
17357   ;
17358   return 0;
17359 }
17360 _ACEOF
17361 if ac_fn_c_try_link "$LINENO"; then :
17362   pgac_cv__get_cpuid="yes"
17363 else
17364   pgac_cv__get_cpuid="no"
17365 fi
17366 rm -f core conftest.err conftest.$ac_objext \
17367     conftest$ac_exeext conftest.$ac_ext
17368 fi
17369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17370 $as_echo "$pgac_cv__get_cpuid" >&6; }
17371 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17372
17373 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17374
17375 fi
17376
17377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17378 $as_echo_n "checking for __cpuid... " >&6; }
17379 if ${pgac_cv__cpuid+:} false; then :
17380   $as_echo_n "(cached) " >&6
17381 else
17382   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17383 /* end confdefs.h.  */
17384 #include <intrin.h>
17385 int
17386 main ()
17387 {
17388 unsigned int exx[4] = {0, 0, 0, 0};
17389   __get_cpuid(exx[0], 1);
17390
17391   ;
17392   return 0;
17393 }
17394 _ACEOF
17395 if ac_fn_c_try_link "$LINENO"; then :
17396   pgac_cv__cpuid="yes"
17397 else
17398   pgac_cv__cpuid="no"
17399 fi
17400 rm -f core conftest.err conftest.$ac_objext \
17401     conftest$ac_exeext conftest.$ac_ext
17402 fi
17403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17404 $as_echo "$pgac_cv__cpuid" >&6; }
17405 if test x"$pgac_cv__cpuid" = x"yes"; then
17406
17407 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17408
17409 fi
17410
17411 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17412 #
17413 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17414 # with the default compiler flags. If not, check if adding the -msse4.2
17415 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17417 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17418 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17419   $as_echo_n "(cached) " >&6
17420 else
17421   pgac_save_CFLAGS=$CFLAGS
17422 CFLAGS="$pgac_save_CFLAGS "
17423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17424 /* end confdefs.h.  */
17425 #include <nmmintrin.h>
17426 int
17427 main ()
17428 {
17429 unsigned int crc = 0;
17430    crc = _mm_crc32_u8(crc, 0);
17431    crc = _mm_crc32_u32(crc, 0);
17432    /* return computed value, to prevent the above being optimized away */
17433    return crc == 0;
17434   ;
17435   return 0;
17436 }
17437 _ACEOF
17438 if ac_fn_c_try_link "$LINENO"; then :
17439   pgac_cv_sse42_crc32_intrinsics_=yes
17440 else
17441   pgac_cv_sse42_crc32_intrinsics_=no
17442 fi
17443 rm -f core conftest.err conftest.$ac_objext \
17444     conftest$ac_exeext conftest.$ac_ext
17445 CFLAGS="$pgac_save_CFLAGS"
17446 fi
17447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17448 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17449 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17450   CFLAGS_SSE42=""
17451   pgac_sse42_crc32_intrinsics=yes
17452 fi
17453
17454 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17455   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17456 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17457 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17458   $as_echo_n "(cached) " >&6
17459 else
17460   pgac_save_CFLAGS=$CFLAGS
17461 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17463 /* end confdefs.h.  */
17464 #include <nmmintrin.h>
17465 int
17466 main ()
17467 {
17468 unsigned int crc = 0;
17469    crc = _mm_crc32_u8(crc, 0);
17470    crc = _mm_crc32_u32(crc, 0);
17471    /* return computed value, to prevent the above being optimized away */
17472    return crc == 0;
17473   ;
17474   return 0;
17475 }
17476 _ACEOF
17477 if ac_fn_c_try_link "$LINENO"; then :
17478   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17479 else
17480   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17481 fi
17482 rm -f core conftest.err conftest.$ac_objext \
17483     conftest$ac_exeext conftest.$ac_ext
17484 CFLAGS="$pgac_save_CFLAGS"
17485 fi
17486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17487 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17488 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17489   CFLAGS_SSE42="-msse4.2"
17490   pgac_sse42_crc32_intrinsics=yes
17491 fi
17492
17493 fi
17494
17495
17496 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17497 # define __SSE4_2__ in that case.
17498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17499 /* end confdefs.h.  */
17500
17501 int
17502 main ()
17503 {
17504
17505 #ifndef __SSE4_2__
17506 #error __SSE4_2__ not defined
17507 #endif
17508
17509   ;
17510   return 0;
17511 }
17512 _ACEOF
17513 if ac_fn_c_try_compile "$LINENO"; then :
17514   SSE4_2_TARGETED=1
17515 fi
17516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17517
17518 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17519 #
17520 # First check if __crc32c* intrinsics can be used with the default compiler
17521 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17522 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17524 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17525 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17526   $as_echo_n "(cached) " >&6
17527 else
17528   pgac_save_CFLAGS=$CFLAGS
17529 CFLAGS="$pgac_save_CFLAGS "
17530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17531 /* end confdefs.h.  */
17532 #include <arm_acle.h>
17533 int
17534 main ()
17535 {
17536 unsigned int crc = 0;
17537    crc = __crc32cb(crc, 0);
17538    crc = __crc32ch(crc, 0);
17539    crc = __crc32cw(crc, 0);
17540    crc = __crc32cd(crc, 0);
17541    /* return computed value, to prevent the above being optimized away */
17542    return crc == 0;
17543   ;
17544   return 0;
17545 }
17546 _ACEOF
17547 if ac_fn_c_try_link "$LINENO"; then :
17548   pgac_cv_armv8_crc32c_intrinsics_=yes
17549 else
17550   pgac_cv_armv8_crc32c_intrinsics_=no
17551 fi
17552 rm -f core conftest.err conftest.$ac_objext \
17553     conftest$ac_exeext conftest.$ac_ext
17554 CFLAGS="$pgac_save_CFLAGS"
17555 fi
17556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17557 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17558 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17559   CFLAGS_ARMV8_CRC32C=""
17560   pgac_armv8_crc32c_intrinsics=yes
17561 fi
17562
17563 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17564   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17565 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17566 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17567   $as_echo_n "(cached) " >&6
17568 else
17569   pgac_save_CFLAGS=$CFLAGS
17570 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17572 /* end confdefs.h.  */
17573 #include <arm_acle.h>
17574 int
17575 main ()
17576 {
17577 unsigned int crc = 0;
17578    crc = __crc32cb(crc, 0);
17579    crc = __crc32ch(crc, 0);
17580    crc = __crc32cw(crc, 0);
17581    crc = __crc32cd(crc, 0);
17582    /* return computed value, to prevent the above being optimized away */
17583    return crc == 0;
17584   ;
17585   return 0;
17586 }
17587 _ACEOF
17588 if ac_fn_c_try_link "$LINENO"; then :
17589   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17590 else
17591   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17592 fi
17593 rm -f core conftest.err conftest.$ac_objext \
17594     conftest$ac_exeext conftest.$ac_ext
17595 CFLAGS="$pgac_save_CFLAGS"
17596 fi
17597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17598 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17599 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17600   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17601   pgac_armv8_crc32c_intrinsics=yes
17602 fi
17603
17604 fi
17605
17606
17607 # Select CRC-32C implementation.
17608 #
17609 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17610 # use the special CRC instructions for calculating CRC-32C. If we're not
17611 # targeting such a processor, but we can nevertheless produce code that uses
17612 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17613 # implementations and select which one to use at runtime, depending on whether
17614 # SSE 4.2 is supported by the processor we're running on.
17615 #
17616 # Similarly, if we are targeting an ARM processor that has the CRC
17617 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17618 # we're not targeting such a processor, but can nevertheless produce code that
17619 # uses the CRC instructions, compile both, and select at runtime.
17620 #
17621 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17622 # in the template or configure command line.
17623 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
17624   # Use Intel SSE 4.2 if available.
17625   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17626     USE_SSE42_CRC32C=1
17627   else
17628     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17629     # the runtime check.
17630     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
17631       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17632     else
17633       # Use ARM CRC Extension if available.
17634       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17635         USE_ARMV8_CRC32C=1
17636       else
17637         # ARM CRC Extension, with runtime check?
17638         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17639           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17640         else
17641           # fall back to slicing-by-8 algorithm, which doesn't require any
17642           # special CPU support.
17643           USE_SLICING_BY_8_CRC32C=1
17644         fi
17645       fi
17646     fi
17647   fi
17648 fi
17649
17650 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17652 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17653 if test x"$USE_SSE42_CRC32C" = x"1"; then
17654
17655 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17656
17657   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17659 $as_echo "SSE 4.2" >&6; }
17660 else
17661   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17662
17663 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17664
17665     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17666     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17667 $as_echo "SSE 4.2 with runtime check" >&6; }
17668   else
17669     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17670
17671 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17672
17673       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17674       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17675 $as_echo "ARMv8 CRC instructions" >&6; }
17676     else
17677       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17678
17679 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17680
17681         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17682         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17683 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17684       else
17685
17686 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17687
17688         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17689         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17690 $as_echo "slicing-by-8" >&6; }
17691       fi
17692     fi
17693   fi
17694 fi
17695
17696
17697
17698 # Select semaphore implementation type.
17699 if test "$PORTNAME" != "win32"; then
17700   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17701     # Need sem_open for this
17702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17703 $as_echo_n "checking for library containing sem_open... " >&6; }
17704 if ${ac_cv_search_sem_open+:} false; then :
17705   $as_echo_n "(cached) " >&6
17706 else
17707   ac_func_search_save_LIBS=$LIBS
17708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17709 /* end confdefs.h.  */
17710
17711 /* Override any GCC internal prototype to avoid an error.
17712    Use char because int might match the return type of a GCC
17713    builtin and then its argument prototype would still apply.  */
17714 #ifdef __cplusplus
17715 extern "C"
17716 #endif
17717 char sem_open ();
17718 int
17719 main ()
17720 {
17721 return sem_open ();
17722   ;
17723   return 0;
17724 }
17725 _ACEOF
17726 for ac_lib in '' rt pthread; do
17727   if test -z "$ac_lib"; then
17728     ac_res="none required"
17729   else
17730     ac_res=-l$ac_lib
17731     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17732   fi
17733   if ac_fn_c_try_link "$LINENO"; then :
17734   ac_cv_search_sem_open=$ac_res
17735 fi
17736 rm -f core conftest.err conftest.$ac_objext \
17737     conftest$ac_exeext
17738   if ${ac_cv_search_sem_open+:} false; then :
17739   break
17740 fi
17741 done
17742 if ${ac_cv_search_sem_open+:} false; then :
17743
17744 else
17745   ac_cv_search_sem_open=no
17746 fi
17747 rm conftest.$ac_ext
17748 LIBS=$ac_func_search_save_LIBS
17749 fi
17750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17751 $as_echo "$ac_cv_search_sem_open" >&6; }
17752 ac_res=$ac_cv_search_sem_open
17753 if test "$ac_res" != no; then :
17754   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17755   USE_NAMED_POSIX_SEMAPHORES=1
17756 fi
17757
17758   fi
17759   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17760     # Need sem_init for this
17761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17762 $as_echo_n "checking for library containing sem_init... " >&6; }
17763 if ${ac_cv_search_sem_init+:} false; then :
17764   $as_echo_n "(cached) " >&6
17765 else
17766   ac_func_search_save_LIBS=$LIBS
17767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17768 /* end confdefs.h.  */
17769
17770 /* Override any GCC internal prototype to avoid an error.
17771    Use char because int might match the return type of a GCC
17772    builtin and then its argument prototype would still apply.  */
17773 #ifdef __cplusplus
17774 extern "C"
17775 #endif
17776 char sem_init ();
17777 int
17778 main ()
17779 {
17780 return sem_init ();
17781   ;
17782   return 0;
17783 }
17784 _ACEOF
17785 for ac_lib in '' rt pthread; do
17786   if test -z "$ac_lib"; then
17787     ac_res="none required"
17788   else
17789     ac_res=-l$ac_lib
17790     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17791   fi
17792   if ac_fn_c_try_link "$LINENO"; then :
17793   ac_cv_search_sem_init=$ac_res
17794 fi
17795 rm -f core conftest.err conftest.$ac_objext \
17796     conftest$ac_exeext
17797   if ${ac_cv_search_sem_init+:} false; then :
17798   break
17799 fi
17800 done
17801 if ${ac_cv_search_sem_init+:} false; then :
17802
17803 else
17804   ac_cv_search_sem_init=no
17805 fi
17806 rm conftest.$ac_ext
17807 LIBS=$ac_func_search_save_LIBS
17808 fi
17809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17810 $as_echo "$ac_cv_search_sem_init" >&6; }
17811 ac_res=$ac_cv_search_sem_init
17812 if test "$ac_res" != no; then :
17813   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17814   USE_UNNAMED_POSIX_SEMAPHORES=1
17815 fi
17816
17817   fi
17818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17819 $as_echo_n "checking which semaphore API to use... " >&6; }
17820   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17821
17822 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17823
17824     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17825     sematype="named POSIX"
17826   else
17827     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17828
17829 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17830
17831       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17832       sematype="unnamed POSIX"
17833     else
17834
17835 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17836
17837       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17838       sematype="System V"
17839     fi
17840   fi
17841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17842 $as_echo "$sematype" >&6; }
17843 else
17844
17845 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17846
17847   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17848 fi
17849
17850
17851 # Select shared-memory implementation type.
17852 if test "$PORTNAME" != "win32"; then
17853
17854 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17855
17856   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17857 else
17858
17859 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17860
17861   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17862 fi
17863
17864 # Select random number source
17865 #
17866 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17867 # in the template or configure command line.
17868
17869 # If not selected manually, try to select a source automatically.
17870 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
17871   if test x"$with_openssl" = x"yes" ; then
17872     USE_OPENSSL_RANDOM=1
17873   elif test "$PORTNAME" = "win32" ; then
17874     USE_WIN32_RANDOM=1
17875   else
17876     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17877 $as_echo_n "checking for /dev/urandom... " >&6; }
17878 if ${ac_cv_file__dev_urandom+:} false; then :
17879   $as_echo_n "(cached) " >&6
17880 else
17881   test "$cross_compiling" = yes &&
17882   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17883 if test -r "/dev/urandom"; then
17884   ac_cv_file__dev_urandom=yes
17885 else
17886   ac_cv_file__dev_urandom=no
17887 fi
17888 fi
17889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17890 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17891 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17892
17893 fi
17894
17895
17896     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17897       USE_DEV_URANDOM=1
17898     fi
17899   fi
17900 fi
17901
17902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17903 $as_echo_n "checking which random number source to use... " >&6; }
17904 if test "$enable_strong_random" = yes ; then
17905   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17906
17907 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17908
17909     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17910 $as_echo "OpenSSL" >&6; }
17911   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
17912
17913 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
17914
17915     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17916 $as_echo "Windows native" >&6; }
17917   elif test x"$USE_DEV_URANDOM" = x"1" ; then
17918
17919 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
17920
17921     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17922 $as_echo "/dev/urandom" >&6; }
17923   else
17924     as_fn_error $? "
17925 no source of strong random numbers was found
17926 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
17927 for authentication protocols. You can use --disable-strong-random to use a
17928 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
17929   fi
17930
17931 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
17932
17933 else
17934     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
17935 $as_echo "weak builtin PRNG" >&6; }
17936     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17937 *** Not using a strong random number source may be insecure." >&5
17938 $as_echo "$as_me: WARNING:
17939 *** Not using a strong random number source may be insecure." >&2;}
17940 fi
17941
17942 # If not set in template file, set bytes to use libc memset()
17943 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17944   MEMSET_LOOP_LIMIT=1024
17945 fi
17946
17947 cat >>confdefs.h <<_ACEOF
17948 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17949 _ACEOF
17950
17951
17952
17953 if test "$enable_nls" = yes ; then
17954
17955   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17956 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17957 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17958   $as_echo_n "(cached) " >&6
17959 else
17960   ac_func_search_save_LIBS=$LIBS
17961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17962 /* end confdefs.h.  */
17963
17964 /* Override any GCC internal prototype to avoid an error.
17965    Use char because int might match the return type of a GCC
17966    builtin and then its argument prototype would still apply.  */
17967 #ifdef __cplusplus
17968 extern "C"
17969 #endif
17970 char bind_textdomain_codeset ();
17971 int
17972 main ()
17973 {
17974 return bind_textdomain_codeset ();
17975   ;
17976   return 0;
17977 }
17978 _ACEOF
17979 for ac_lib in '' intl; do
17980   if test -z "$ac_lib"; then
17981     ac_res="none required"
17982   else
17983     ac_res=-l$ac_lib
17984     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17985   fi
17986   if ac_fn_c_try_link "$LINENO"; then :
17987   ac_cv_search_bind_textdomain_codeset=$ac_res
17988 fi
17989 rm -f core conftest.err conftest.$ac_objext \
17990     conftest$ac_exeext
17991   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17992   break
17993 fi
17994 done
17995 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17996
17997 else
17998   ac_cv_search_bind_textdomain_codeset=no
17999 fi
18000 rm conftest.$ac_ext
18001 LIBS=$ac_func_search_save_LIBS
18002 fi
18003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18004 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18005 ac_res=$ac_cv_search_bind_textdomain_codeset
18006 if test "$ac_res" != no; then :
18007   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18008
18009 else
18010   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18011 fi
18012
18013   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18014 if test "x$ac_cv_header_libintl_h" = xyes; then :
18015
18016 else
18017   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18018 fi
18019
18020
18021   if test -z "$MSGFMT"; then
18022   for ac_prog in msgfmt
18023 do
18024   # Extract the first word of "$ac_prog", so it can be a program name with args.
18025 set dummy $ac_prog; ac_word=$2
18026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18027 $as_echo_n "checking for $ac_word... " >&6; }
18028 if ${ac_cv_path_MSGFMT+:} false; then :
18029   $as_echo_n "(cached) " >&6
18030 else
18031   case $MSGFMT in
18032   [\\/]* | ?:[\\/]*)
18033   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18034   ;;
18035   *)
18036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18037 for as_dir in $PATH
18038 do
18039   IFS=$as_save_IFS
18040   test -z "$as_dir" && as_dir=.
18041     for ac_exec_ext in '' $ac_executable_extensions; do
18042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18043     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18045     break 2
18046   fi
18047 done
18048   done
18049 IFS=$as_save_IFS
18050
18051   ;;
18052 esac
18053 fi
18054 MSGFMT=$ac_cv_path_MSGFMT
18055 if test -n "$MSGFMT"; then
18056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18057 $as_echo "$MSGFMT" >&6; }
18058 else
18059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18060 $as_echo "no" >&6; }
18061 fi
18062
18063
18064   test -n "$MSGFMT" && break
18065 done
18066
18067 else
18068   # Report the value of MSGFMT in configure's output in all cases.
18069   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18070 $as_echo_n "checking for MSGFMT... " >&6; }
18071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18072 $as_echo "$MSGFMT" >&6; }
18073 fi
18074
18075   if test -z "$MSGFMT"; then
18076     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18077   fi
18078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18079 $as_echo_n "checking for msgfmt flags... " >&6; }
18080 if ${pgac_cv_msgfmt_flags+:} false; then :
18081   $as_echo_n "(cached) " >&6
18082 else
18083   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18084     pgac_cv_msgfmt_flags=-c
18085 fi
18086 fi
18087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18088 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18089   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18090
18091   if test -z "$MSGMERGE"; then
18092   for ac_prog in msgmerge
18093 do
18094   # Extract the first word of "$ac_prog", so it can be a program name with args.
18095 set dummy $ac_prog; ac_word=$2
18096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18097 $as_echo_n "checking for $ac_word... " >&6; }
18098 if ${ac_cv_path_MSGMERGE+:} false; then :
18099   $as_echo_n "(cached) " >&6
18100 else
18101   case $MSGMERGE in
18102   [\\/]* | ?:[\\/]*)
18103   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18104   ;;
18105   *)
18106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18107 for as_dir in $PATH
18108 do
18109   IFS=$as_save_IFS
18110   test -z "$as_dir" && as_dir=.
18111     for ac_exec_ext in '' $ac_executable_extensions; do
18112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18113     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18115     break 2
18116   fi
18117 done
18118   done
18119 IFS=$as_save_IFS
18120
18121   ;;
18122 esac
18123 fi
18124 MSGMERGE=$ac_cv_path_MSGMERGE
18125 if test -n "$MSGMERGE"; then
18126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18127 $as_echo "$MSGMERGE" >&6; }
18128 else
18129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18130 $as_echo "no" >&6; }
18131 fi
18132
18133
18134   test -n "$MSGMERGE" && break
18135 done
18136
18137 else
18138   # Report the value of MSGMERGE in configure's output in all cases.
18139   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18140 $as_echo_n "checking for MSGMERGE... " >&6; }
18141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18142 $as_echo "$MSGMERGE" >&6; }
18143 fi
18144
18145   if test -z "$XGETTEXT"; then
18146   for ac_prog in xgettext
18147 do
18148   # Extract the first word of "$ac_prog", so it can be a program name with args.
18149 set dummy $ac_prog; ac_word=$2
18150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18151 $as_echo_n "checking for $ac_word... " >&6; }
18152 if ${ac_cv_path_XGETTEXT+:} false; then :
18153   $as_echo_n "(cached) " >&6
18154 else
18155   case $XGETTEXT in
18156   [\\/]* | ?:[\\/]*)
18157   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18158   ;;
18159   *)
18160   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18161 for as_dir in $PATH
18162 do
18163   IFS=$as_save_IFS
18164   test -z "$as_dir" && as_dir=.
18165     for ac_exec_ext in '' $ac_executable_extensions; do
18166   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18167     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18168     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18169     break 2
18170   fi
18171 done
18172   done
18173 IFS=$as_save_IFS
18174
18175   ;;
18176 esac
18177 fi
18178 XGETTEXT=$ac_cv_path_XGETTEXT
18179 if test -n "$XGETTEXT"; then
18180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18181 $as_echo "$XGETTEXT" >&6; }
18182 else
18183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18184 $as_echo "no" >&6; }
18185 fi
18186
18187
18188   test -n "$XGETTEXT" && break
18189 done
18190
18191 else
18192   # Report the value of XGETTEXT in configure's output in all cases.
18193   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18194 $as_echo_n "checking for XGETTEXT... " >&6; }
18195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18196 $as_echo "$XGETTEXT" >&6; }
18197 fi
18198
18199
18200 fi
18201
18202 # Check for Tcl configuration script tclConfig.sh
18203 if test "$with_tcl" = yes; then
18204     if test -z "$TCLSH"; then
18205   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18206 do
18207   # Extract the first word of "$ac_prog", so it can be a program name with args.
18208 set dummy $ac_prog; ac_word=$2
18209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18210 $as_echo_n "checking for $ac_word... " >&6; }
18211 if ${ac_cv_path_TCLSH+:} false; then :
18212   $as_echo_n "(cached) " >&6
18213 else
18214   case $TCLSH in
18215   [\\/]* | ?:[\\/]*)
18216   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18217   ;;
18218   *)
18219   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18220 for as_dir in $PATH
18221 do
18222   IFS=$as_save_IFS
18223   test -z "$as_dir" && as_dir=.
18224     for ac_exec_ext in '' $ac_executable_extensions; do
18225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18226     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18228     break 2
18229   fi
18230 done
18231   done
18232 IFS=$as_save_IFS
18233
18234   ;;
18235 esac
18236 fi
18237 TCLSH=$ac_cv_path_TCLSH
18238 if test -n "$TCLSH"; then
18239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18240 $as_echo "$TCLSH" >&6; }
18241 else
18242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18243 $as_echo "no" >&6; }
18244 fi
18245
18246
18247   test -n "$TCLSH" && break
18248 done
18249
18250 else
18251   # Report the value of TCLSH in configure's output in all cases.
18252   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18253 $as_echo_n "checking for TCLSH... " >&6; }
18254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18255 $as_echo "$TCLSH" >&6; }
18256 fi
18257
18258 if test x"$TCLSH" = x""; then
18259   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18260 fi
18261
18262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18263 $as_echo_n "checking for tclConfig.sh... " >&6; }
18264 # Let user override test
18265 if test -z "$TCL_CONFIG_SH"; then
18266     pgac_test_dirs="$with_tclconfig"
18267
18268     set X $pgac_test_dirs; shift
18269     if test $# -eq 0; then
18270         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18271         set X `echo 'puts $auto_path' | $TCLSH`; shift
18272     fi
18273
18274     for pgac_dir do
18275         if test -r "$pgac_dir/tclConfig.sh"; then
18276             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18277             break
18278         fi
18279     done
18280 fi
18281
18282 if test -z "$TCL_CONFIG_SH"; then
18283     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18284 $as_echo "no" >&6; }
18285     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18286 else
18287     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18288 $as_echo "$TCL_CONFIG_SH" >&6; }
18289 fi
18290
18291
18292
18293     . "$TCL_CONFIG_SH"
18294 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18295 eval TCL_LIBS=\"$TCL_LIBS\"
18296 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18297 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18298
18299         if test "$TCL_SHARED_BUILD" != 1; then
18300       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18301 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18302     fi
18303     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18304     ac_save_CPPFLAGS=$CPPFLAGS
18305     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18306     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18307 if test "x$ac_cv_header_tcl_h" = xyes; then :
18308
18309 else
18310   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18311 fi
18312
18313
18314     CPPFLAGS=$ac_save_CPPFLAGS
18315 fi
18316
18317 # check for <perl.h>
18318 if test "$with_perl" = yes; then
18319   ac_save_CPPFLAGS=$CPPFLAGS
18320   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
18321   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18322 "
18323 if test "x$ac_cv_header_perl_h" = xyes; then :
18324
18325 else
18326   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18327 fi
18328
18329
18330   # While we're at it, check that we can link to libperl.
18331   # On most platforms, if perl.h is there then libperl.so will be too, but at
18332   # this writing Debian packages them separately.  There is no known reason to
18333   # waste cycles on separate probes for the Tcl or Python libraries, though.
18334   pgac_save_LIBS=$LIBS
18335   LIBS="$perl_embed_ldflags"
18336   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18337 $as_echo_n "checking for libperl... " >&6; }
18338   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18339 /* end confdefs.h.  */
18340
18341 #include <EXTERN.h>
18342 #include <perl.h>
18343
18344 int
18345 main ()
18346 {
18347 perl_alloc();
18348   ;
18349   return 0;
18350 }
18351 _ACEOF
18352 if ac_fn_c_try_link "$LINENO"; then :
18353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18354 $as_echo "yes" >&6; }
18355 else
18356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18357 $as_echo "no" >&6; }
18358      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18359 fi
18360 rm -f core conftest.err conftest.$ac_objext \
18361     conftest$ac_exeext conftest.$ac_ext
18362   LIBS=$pgac_save_LIBS
18363   CPPFLAGS=$ac_save_CPPFLAGS
18364 fi
18365
18366 # check for <Python.h>
18367 if test "$with_python" = yes; then
18368   ac_save_CPPFLAGS=$CPPFLAGS
18369   CPPFLAGS="$python_includespec $CPPFLAGS"
18370   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18371 if test "x$ac_cv_header_Python_h" = xyes; then :
18372
18373 else
18374   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18375 fi
18376
18377
18378   CPPFLAGS=$ac_save_CPPFLAGS
18379 fi
18380
18381 #
18382 # Check for DocBook and tools
18383 #
18384 if test -z "$XMLLINT"; then
18385   for ac_prog in xmllint
18386 do
18387   # Extract the first word of "$ac_prog", so it can be a program name with args.
18388 set dummy $ac_prog; ac_word=$2
18389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18390 $as_echo_n "checking for $ac_word... " >&6; }
18391 if ${ac_cv_path_XMLLINT+:} false; then :
18392   $as_echo_n "(cached) " >&6
18393 else
18394   case $XMLLINT in
18395   [\\/]* | ?:[\\/]*)
18396   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18397   ;;
18398   *)
18399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18400 for as_dir in $PATH
18401 do
18402   IFS=$as_save_IFS
18403   test -z "$as_dir" && as_dir=.
18404     for ac_exec_ext in '' $ac_executable_extensions; do
18405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18406     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18408     break 2
18409   fi
18410 done
18411   done
18412 IFS=$as_save_IFS
18413
18414   ;;
18415 esac
18416 fi
18417 XMLLINT=$ac_cv_path_XMLLINT
18418 if test -n "$XMLLINT"; then
18419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18420 $as_echo "$XMLLINT" >&6; }
18421 else
18422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18423 $as_echo "no" >&6; }
18424 fi
18425
18426
18427   test -n "$XMLLINT" && break
18428 done
18429
18430 else
18431   # Report the value of XMLLINT in configure's output in all cases.
18432   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18433 $as_echo_n "checking for XMLLINT... " >&6; }
18434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18435 $as_echo "$XMLLINT" >&6; }
18436 fi
18437
18438
18439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18440 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18441 if ${pgac_cv_check_docbook+:} false; then :
18442   $as_echo_n "(cached) " >&6
18443 else
18444   cat >conftest.xml <<EOF
18445 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18446 <book>
18447  <title>test</title>
18448  <chapter>
18449   <title>random</title>
18450    <sect1>
18451     <title>testsect</title>
18452     <para>text</para>
18453   </sect1>
18454  </chapter>
18455 </book>
18456 EOF
18457
18458 pgac_cv_check_docbook=no
18459
18460 if test -n "$XMLLINT"; then
18461   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18462   if test $? -eq 0; then
18463     pgac_cv_check_docbook=yes
18464   fi
18465 fi
18466 rm -f conftest.xml
18467 fi
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18469 $as_echo "$pgac_cv_check_docbook" >&6; }
18470
18471 have_docbook=$pgac_cv_check_docbook
18472
18473
18474 if test -z "$DBTOEPUB"; then
18475   for ac_prog in dbtoepub
18476 do
18477   # Extract the first word of "$ac_prog", so it can be a program name with args.
18478 set dummy $ac_prog; ac_word=$2
18479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18480 $as_echo_n "checking for $ac_word... " >&6; }
18481 if ${ac_cv_path_DBTOEPUB+:} false; then :
18482   $as_echo_n "(cached) " >&6
18483 else
18484   case $DBTOEPUB in
18485   [\\/]* | ?:[\\/]*)
18486   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18487   ;;
18488   *)
18489   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18490 for as_dir in $PATH
18491 do
18492   IFS=$as_save_IFS
18493   test -z "$as_dir" && as_dir=.
18494     for ac_exec_ext in '' $ac_executable_extensions; do
18495   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18496     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18498     break 2
18499   fi
18500 done
18501   done
18502 IFS=$as_save_IFS
18503
18504   ;;
18505 esac
18506 fi
18507 DBTOEPUB=$ac_cv_path_DBTOEPUB
18508 if test -n "$DBTOEPUB"; then
18509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18510 $as_echo "$DBTOEPUB" >&6; }
18511 else
18512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18513 $as_echo "no" >&6; }
18514 fi
18515
18516
18517   test -n "$DBTOEPUB" && break
18518 done
18519
18520 else
18521   # Report the value of DBTOEPUB in configure's output in all cases.
18522   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18523 $as_echo_n "checking for DBTOEPUB... " >&6; }
18524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18525 $as_echo "$DBTOEPUB" >&6; }
18526 fi
18527
18528 if test -z "$XSLTPROC"; then
18529   for ac_prog in xsltproc
18530 do
18531   # Extract the first word of "$ac_prog", so it can be a program name with args.
18532 set dummy $ac_prog; ac_word=$2
18533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18534 $as_echo_n "checking for $ac_word... " >&6; }
18535 if ${ac_cv_path_XSLTPROC+:} false; then :
18536   $as_echo_n "(cached) " >&6
18537 else
18538   case $XSLTPROC in
18539   [\\/]* | ?:[\\/]*)
18540   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18541   ;;
18542   *)
18543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18544 for as_dir in $PATH
18545 do
18546   IFS=$as_save_IFS
18547   test -z "$as_dir" && as_dir=.
18548     for ac_exec_ext in '' $ac_executable_extensions; do
18549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18550     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18552     break 2
18553   fi
18554 done
18555   done
18556 IFS=$as_save_IFS
18557
18558   ;;
18559 esac
18560 fi
18561 XSLTPROC=$ac_cv_path_XSLTPROC
18562 if test -n "$XSLTPROC"; then
18563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18564 $as_echo "$XSLTPROC" >&6; }
18565 else
18566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18567 $as_echo "no" >&6; }
18568 fi
18569
18570
18571   test -n "$XSLTPROC" && break
18572 done
18573
18574 else
18575   # Report the value of XSLTPROC in configure's output in all cases.
18576   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18577 $as_echo_n "checking for XSLTPROC... " >&6; }
18578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18579 $as_echo "$XSLTPROC" >&6; }
18580 fi
18581
18582 if test -z "$FOP"; then
18583   for ac_prog in fop
18584 do
18585   # Extract the first word of "$ac_prog", so it can be a program name with args.
18586 set dummy $ac_prog; ac_word=$2
18587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18588 $as_echo_n "checking for $ac_word... " >&6; }
18589 if ${ac_cv_path_FOP+:} false; then :
18590   $as_echo_n "(cached) " >&6
18591 else
18592   case $FOP in
18593   [\\/]* | ?:[\\/]*)
18594   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18595   ;;
18596   *)
18597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18598 for as_dir in $PATH
18599 do
18600   IFS=$as_save_IFS
18601   test -z "$as_dir" && as_dir=.
18602     for ac_exec_ext in '' $ac_executable_extensions; do
18603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18604     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18606     break 2
18607   fi
18608 done
18609   done
18610 IFS=$as_save_IFS
18611
18612   ;;
18613 esac
18614 fi
18615 FOP=$ac_cv_path_FOP
18616 if test -n "$FOP"; then
18617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18618 $as_echo "$FOP" >&6; }
18619 else
18620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18621 $as_echo "no" >&6; }
18622 fi
18623
18624
18625   test -n "$FOP" && break
18626 done
18627
18628 else
18629   # Report the value of FOP in configure's output in all cases.
18630   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18631 $as_echo_n "checking for FOP... " >&6; }
18632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18633 $as_echo "$FOP" >&6; }
18634 fi
18635
18636
18637 #
18638 # Check for test tools
18639 #
18640 if test "$enable_tap_tests" = yes; then
18641   # Check for necessary modules, unless user has specified the "prove" to use;
18642   # in that case it's her responsibility to have a working configuration.
18643   # (prove might be part of a different Perl installation than perl, eg on
18644   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18645   if test -z "$PROVE"; then
18646     # Test::More and Time::HiRes are supposed to be part of core Perl,
18647     # but some distros omit them in a minimal installation.
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658 # Make sure we have perl
18659 if test -z "$PERL"; then
18660 # Extract the first word of "perl", so it can be a program name with args.
18661 set dummy perl; ac_word=$2
18662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18663 $as_echo_n "checking for $ac_word... " >&6; }
18664 if ${ac_cv_prog_PERL+:} false; then :
18665   $as_echo_n "(cached) " >&6
18666 else
18667   if test -n "$PERL"; then
18668   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18669 else
18670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18671 for as_dir in $PATH
18672 do
18673   IFS=$as_save_IFS
18674   test -z "$as_dir" && as_dir=.
18675     for ac_exec_ext in '' $ac_executable_extensions; do
18676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18677     ac_cv_prog_PERL="perl"
18678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18679     break 2
18680   fi
18681 done
18682   done
18683 IFS=$as_save_IFS
18684
18685 fi
18686 fi
18687 PERL=$ac_cv_prog_PERL
18688 if test -n "$PERL"; then
18689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18690 $as_echo "$PERL" >&6; }
18691 else
18692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18693 $as_echo "no" >&6; }
18694 fi
18695
18696
18697 fi
18698
18699 if test "x$PERL" != x; then
18700   ax_perl_modules_failed=0
18701   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18703 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18704
18705     # Would be nice to log result here, but can't rely on autoconf internals
18706     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18707     if test $? -ne 0; then
18708       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18709 $as_echo "no" >&6; };
18710       ax_perl_modules_failed=1
18711    else
18712       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18713 $as_echo "ok" >&6; };
18714     fi
18715   done
18716
18717   # Run optional shell commands
18718   if test "$ax_perl_modules_failed" = 0; then
18719     :
18720
18721   else
18722     :
18723     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18724   fi
18725 else
18726   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18727 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18728 fi
18729   fi
18730   # Now make sure we know where prove is
18731   if test -z "$PROVE"; then
18732   for ac_prog in prove
18733 do
18734   # Extract the first word of "$ac_prog", so it can be a program name with args.
18735 set dummy $ac_prog; ac_word=$2
18736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18737 $as_echo_n "checking for $ac_word... " >&6; }
18738 if ${ac_cv_path_PROVE+:} false; then :
18739   $as_echo_n "(cached) " >&6
18740 else
18741   case $PROVE in
18742   [\\/]* | ?:[\\/]*)
18743   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18744   ;;
18745   *)
18746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18747 for as_dir in $PATH
18748 do
18749   IFS=$as_save_IFS
18750   test -z "$as_dir" && as_dir=.
18751     for ac_exec_ext in '' $ac_executable_extensions; do
18752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18753     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18755     break 2
18756   fi
18757 done
18758   done
18759 IFS=$as_save_IFS
18760
18761   ;;
18762 esac
18763 fi
18764 PROVE=$ac_cv_path_PROVE
18765 if test -n "$PROVE"; then
18766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18767 $as_echo "$PROVE" >&6; }
18768 else
18769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18770 $as_echo "no" >&6; }
18771 fi
18772
18773
18774   test -n "$PROVE" && break
18775 done
18776
18777 else
18778   # Report the value of PROVE in configure's output in all cases.
18779   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18780 $as_echo_n "checking for PROVE... " >&6; }
18781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18782 $as_echo "$PROVE" >&6; }
18783 fi
18784
18785   if test -z "$PROVE"; then
18786     as_fn_error $? "prove not found" "$LINENO" 5
18787   fi
18788 fi
18789
18790 # Thread testing
18791
18792 # We have to run the thread test near the end so we have all our symbols
18793 # defined.  Cross compiling throws a warning.
18794 #
18795 if test "$enable_thread_safety" = yes; then
18796 if test "$PORTNAME" != "win32"
18797 then
18798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18799 $as_echo_n "checking thread safety of required library functions... " >&6; }
18800
18801 _CFLAGS="$CFLAGS"
18802 _LIBS="$LIBS"
18803 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18804 LIBS="$LIBS $PTHREAD_LIBS"
18805 if test "$cross_compiling" = yes; then :
18806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18807 $as_echo "maybe" >&6; }
18808   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18809 *** Skipping thread test program because of cross-compile build.
18810 *** Run the program in src/test/thread on the target machine.
18811 " >&5
18812 $as_echo "$as_me: WARNING:
18813 *** Skipping thread test program because of cross-compile build.
18814 *** Run the program in src/test/thread on the target machine.
18815 " >&2;}
18816 else
18817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18818 /* end confdefs.h.  */
18819 #include "$srcdir/src/test/thread/thread_test.c"
18820 _ACEOF
18821 if ac_fn_c_try_run "$LINENO"; then :
18822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18823 $as_echo "yes" >&6; }
18824 else
18825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18826 $as_echo "no" >&6; }
18827   as_fn_error $? "thread test program failed
18828 This platform is not thread-safe.  Check the file 'config.log' or compile
18829 and run src/test/thread/thread_test for the exact reason.
18830 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18831 fi
18832 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18833   conftest.$ac_objext conftest.beam conftest.$ac_ext
18834 fi
18835
18836 CFLAGS="$_CFLAGS"
18837 LIBS="$_LIBS"
18838 else
18839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18840 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18841 fi
18842 fi
18843
18844 # If compiler will take -Wl,--as-needed (or various platform-specific
18845 # spellings thereof) then add that to LDFLAGS.  This is much easier than
18846 # trying to filter LIBS to the minimum for each executable.
18847 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18848 # libreadline; therefore we postpone testing it until we know what library
18849 # dependencies readline has.  The test code will try to link with $LIBS.
18850 if test "$with_readline" = yes; then
18851   link_test_func=readline
18852 else
18853   link_test_func=exit
18854 fi
18855
18856 if test "$PORTNAME" = "darwin"; then
18857   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18858 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18859 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18860   $as_echo_n "(cached) " >&6
18861 else
18862   pgac_save_LDFLAGS=$LDFLAGS
18863 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18864 if test "$cross_compiling" = yes; then :
18865   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18866 else
18867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18868 /* end confdefs.h.  */
18869 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18870 int
18871 main ()
18872 {
18873
18874   ;
18875   return 0;
18876 }
18877 _ACEOF
18878 if ac_fn_c_try_run "$LINENO"; then :
18879   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18880 else
18881   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18882 fi
18883 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18884   conftest.$ac_objext conftest.beam conftest.$ac_ext
18885 fi
18886
18887 LDFLAGS="$pgac_save_LDFLAGS"
18888 fi
18889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18890 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18891 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18892   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18893 fi
18894
18895 elif test "$PORTNAME" = "openbsd"; then
18896   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18897 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18898 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18899   $as_echo_n "(cached) " >&6
18900 else
18901   pgac_save_LDFLAGS=$LDFLAGS
18902 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18903 if test "$cross_compiling" = yes; then :
18904   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18905 else
18906   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18907 /* end confdefs.h.  */
18908 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18909 int
18910 main ()
18911 {
18912
18913   ;
18914   return 0;
18915 }
18916 _ACEOF
18917 if ac_fn_c_try_run "$LINENO"; then :
18918   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
18919 else
18920   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
18921 fi
18922 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18923   conftest.$ac_objext conftest.beam conftest.$ac_ext
18924 fi
18925
18926 LDFLAGS="$pgac_save_LDFLAGS"
18927 fi
18928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
18929 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
18930 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
18931   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
18932 fi
18933
18934 else
18935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
18936 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
18937 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
18938   $as_echo_n "(cached) " >&6
18939 else
18940   pgac_save_LDFLAGS=$LDFLAGS
18941 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18942 if test "$cross_compiling" = yes; then :
18943   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
18944 else
18945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18946 /* end confdefs.h.  */
18947 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18948 int
18949 main ()
18950 {
18951
18952   ;
18953   return 0;
18954 }
18955 _ACEOF
18956 if ac_fn_c_try_run "$LINENO"; then :
18957   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
18958 else
18959   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
18960 fi
18961 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18962   conftest.$ac_objext conftest.beam conftest.$ac_ext
18963 fi
18964
18965 LDFLAGS="$pgac_save_LDFLAGS"
18966 fi
18967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
18968 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
18969 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
18970   LDFLAGS="$LDFLAGS -Wl,--as-needed"
18971 fi
18972
18973 fi
18974
18975 # Create compiler version string
18976 if test x"$GCC" = x"yes" ; then
18977   cc_string=`${CC} --version | sed q`
18978   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18979 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18980   cc_string=`${CC} -V 2>&1 | sed q`
18981 else
18982   cc_string=$CC
18983 fi
18984
18985
18986 cat >>confdefs.h <<_ACEOF
18987 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18988 _ACEOF
18989
18990
18991 # Supply a numeric version string for use by 3rd party add-ons
18992 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18993 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
18994 tr '.' '        ' |
18995 $AWK '{printf "%d%04d", $1, $2}'`"
18996
18997 cat >>confdefs.h <<_ACEOF
18998 #define PG_VERSION_NUM $PG_VERSION_NUM
18999 _ACEOF
19000
19001
19002
19003
19004 # Begin output steps
19005
19006 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19007 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19008 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19009 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19010 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19011 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19012 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19013 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19014 # Currently only used when LLVM is used
19015 if test "$with_llvm" = yes ; then
19016    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19017 $as_echo "$as_me: using CXX=$CXX" >&6;}
19018    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19019 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19020    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19021 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19022    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19023 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19024    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19025 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19026 fi
19027
19028 # prepare build tree if outside source tree
19029 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19030 # Note 2: /bin/pwd might be better than shell's built-in at getting
19031 #         a symlink-free name.
19032 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19033   vpath_build=no
19034 else
19035   vpath_build=yes
19036   if test "$no_create" != yes; then
19037     $as_echo_n "preparing build tree... " >&6
19038     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19039     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19040       || as_fn_error $? "failed" "$LINENO" 5
19041     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19042 $as_echo "done" >&6; }
19043   fi
19044 fi
19045
19046
19047
19048 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19049
19050
19051 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}"
19052
19053
19054 if test "$PORTNAME" = "win32"; then
19055 ac_config_commands="$ac_config_commands check_win32_symlinks"
19056
19057 fi
19058
19059 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19060
19061
19062 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19063
19064
19065 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19066
19067
19068 cat >confcache <<\_ACEOF
19069 # This file is a shell script that caches the results of configure
19070 # tests run on this system so they can be shared between configure
19071 # scripts and configure runs, see configure's option --config-cache.
19072 # It is not useful on other systems.  If it contains results you don't
19073 # want to keep, you may remove or edit it.
19074 #
19075 # config.status only pays attention to the cache file if you give it
19076 # the --recheck option to rerun configure.
19077 #
19078 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19079 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19080 # following values.
19081
19082 _ACEOF
19083
19084 # The following way of writing the cache mishandles newlines in values,
19085 # but we know of no workaround that is simple, portable, and efficient.
19086 # So, we kill variables containing newlines.
19087 # Ultrix sh set writes to stderr and can't be redirected directly,
19088 # and sets the high bit in the cache file unless we assign to the vars.
19089 (
19090   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19091     eval ac_val=\$$ac_var
19092     case $ac_val in #(
19093     *${as_nl}*)
19094       case $ac_var in #(
19095       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19096 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19097       esac
19098       case $ac_var in #(
19099       _ | IFS | as_nl) ;; #(
19100       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19101       *) { eval $ac_var=; unset $ac_var;} ;;
19102       esac ;;
19103     esac
19104   done
19105
19106   (set) 2>&1 |
19107     case $as_nl`(ac_space=' '; set) 2>&1` in #(
19108     *${as_nl}ac_space=\ *)
19109       # `set' does not quote correctly, so add quotes: double-quote
19110       # substitution turns \\\\ into \\, and sed turns \\ into \.
19111       sed -n \
19112         "s/'/'\\\\''/g;
19113           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19114       ;; #(
19115     *)
19116       # `set' quotes correctly as required by POSIX, so do not add quotes.
19117       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19118       ;;
19119     esac |
19120     sort
19121 ) |
19122   sed '
19123      /^ac_cv_env_/b end
19124      t clear
19125      :clear
19126      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19127      t end
19128      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19129      :end' >>confcache
19130 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19131   if test -w "$cache_file"; then
19132     if test "x$cache_file" != "x/dev/null"; then
19133       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19134 $as_echo "$as_me: updating cache $cache_file" >&6;}
19135       if test ! -f "$cache_file" || test -h "$cache_file"; then
19136         cat confcache >"$cache_file"
19137       else
19138         case $cache_file in #(
19139         */* | ?:*)
19140           mv -f confcache "$cache_file"$$ &&
19141           mv -f "$cache_file"$$ "$cache_file" ;; #(
19142         *)
19143           mv -f confcache "$cache_file" ;;
19144         esac
19145       fi
19146     fi
19147   else
19148     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19149 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19150   fi
19151 fi
19152 rm -f confcache
19153
19154 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19155 # Let make expand exec_prefix.
19156 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19157
19158 DEFS=-DHAVE_CONFIG_H
19159
19160 ac_libobjs=
19161 ac_ltlibobjs=
19162 U=
19163 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19164   # 1. Remove the extension, and $U if already installed.
19165   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19166   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19167   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19168   #    will be set to the directory where LIBOBJS objects are built.
19169   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19170   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19171 done
19172 LIBOBJS=$ac_libobjs
19173
19174 LTLIBOBJS=$ac_ltlibobjs
19175
19176
19177
19178
19179 : "${CONFIG_STATUS=./config.status}"
19180 ac_write_fail=0
19181 ac_clean_files_save=$ac_clean_files
19182 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19183 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19184 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19185 as_write_fail=0
19186 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19187 #! $SHELL
19188 # Generated by $as_me.
19189 # Run this file to recreate the current configuration.
19190 # Compiler output produced by configure, useful for debugging
19191 # configure, is in config.log if it exists.
19192
19193 debug=false
19194 ac_cs_recheck=false
19195 ac_cs_silent=false
19196
19197 SHELL=\${CONFIG_SHELL-$SHELL}
19198 export SHELL
19199 _ASEOF
19200 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19201 ## -------------------- ##
19202 ## M4sh Initialization. ##
19203 ## -------------------- ##
19204
19205 # Be more Bourne compatible
19206 DUALCASE=1; export DUALCASE # for MKS sh
19207 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19208   emulate sh
19209   NULLCMD=:
19210   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19211   # is contrary to our usage.  Disable this feature.
19212   alias -g '${1+"$@"}'='"$@"'
19213   setopt NO_GLOB_SUBST
19214 else
19215   case `(set -o) 2>/dev/null` in #(
19216   *posix*) :
19217     set -o posix ;; #(
19218   *) :
19219      ;;
19220 esac
19221 fi
19222
19223
19224 as_nl='
19225 '
19226 export as_nl
19227 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19228 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19229 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19230 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19231 # Prefer a ksh shell builtin over an external printf program on Solaris,
19232 # but without wasting forks for bash or zsh.
19233 if test -z "$BASH_VERSION$ZSH_VERSION" \
19234     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19235   as_echo='print -r --'
19236   as_echo_n='print -rn --'
19237 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19238   as_echo='printf %s\n'
19239   as_echo_n='printf %s'
19240 else
19241   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19242     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19243     as_echo_n='/usr/ucb/echo -n'
19244   else
19245     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19246     as_echo_n_body='eval
19247       arg=$1;
19248       case $arg in #(
19249       *"$as_nl"*)
19250         expr "X$arg" : "X\\(.*\\)$as_nl";
19251         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19252       esac;
19253       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19254     '
19255     export as_echo_n_body
19256     as_echo_n='sh -c $as_echo_n_body as_echo'
19257   fi
19258   export as_echo_body
19259   as_echo='sh -c $as_echo_body as_echo'
19260 fi
19261
19262 # The user is always right.
19263 if test "${PATH_SEPARATOR+set}" != set; then
19264   PATH_SEPARATOR=:
19265   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19266     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19267       PATH_SEPARATOR=';'
19268   }
19269 fi
19270
19271
19272 # IFS
19273 # We need space, tab and new line, in precisely that order.  Quoting is
19274 # there to prevent editors from complaining about space-tab.
19275 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19276 # splitting by setting IFS to empty value.)
19277 IFS=" ""        $as_nl"
19278
19279 # Find who we are.  Look in the path if we contain no directory separator.
19280 as_myself=
19281 case $0 in #((
19282   *[\\/]* ) as_myself=$0 ;;
19283   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19284 for as_dir in $PATH
19285 do
19286   IFS=$as_save_IFS
19287   test -z "$as_dir" && as_dir=.
19288     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19289   done
19290 IFS=$as_save_IFS
19291
19292      ;;
19293 esac
19294 # We did not find ourselves, most probably we were run as `sh COMMAND'
19295 # in which case we are not to be found in the path.
19296 if test "x$as_myself" = x; then
19297   as_myself=$0
19298 fi
19299 if test ! -f "$as_myself"; then
19300   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19301   exit 1
19302 fi
19303
19304 # Unset variables that we do not need and which cause bugs (e.g. in
19305 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19306 # suppresses any "Segmentation fault" message there.  '((' could
19307 # trigger a bug in pdksh 5.2.14.
19308 for as_var in BASH_ENV ENV MAIL MAILPATH
19309 do eval test x\${$as_var+set} = xset \
19310   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19311 done
19312 PS1='$ '
19313 PS2='> '
19314 PS4='+ '
19315
19316 # NLS nuisances.
19317 LC_ALL=C
19318 export LC_ALL
19319 LANGUAGE=C
19320 export LANGUAGE
19321
19322 # CDPATH.
19323 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19324
19325
19326 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19327 # ----------------------------------------
19328 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19329 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19330 # script with STATUS, using 1 if that was 0.
19331 as_fn_error ()
19332 {
19333   as_status=$1; test $as_status -eq 0 && as_status=1
19334   if test "$4"; then
19335     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19336     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19337   fi
19338   $as_echo "$as_me: error: $2" >&2
19339   as_fn_exit $as_status
19340 } # as_fn_error
19341
19342
19343 # as_fn_set_status STATUS
19344 # -----------------------
19345 # Set $? to STATUS, without forking.
19346 as_fn_set_status ()
19347 {
19348   return $1
19349 } # as_fn_set_status
19350
19351 # as_fn_exit STATUS
19352 # -----------------
19353 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19354 as_fn_exit ()
19355 {
19356   set +e
19357   as_fn_set_status $1
19358   exit $1
19359 } # as_fn_exit
19360
19361 # as_fn_unset VAR
19362 # ---------------
19363 # Portably unset VAR.
19364 as_fn_unset ()
19365 {
19366   { eval $1=; unset $1;}
19367 }
19368 as_unset=as_fn_unset
19369 # as_fn_append VAR VALUE
19370 # ----------------------
19371 # Append the text in VALUE to the end of the definition contained in VAR. Take
19372 # advantage of any shell optimizations that allow amortized linear growth over
19373 # repeated appends, instead of the typical quadratic growth present in naive
19374 # implementations.
19375 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19376   eval 'as_fn_append ()
19377   {
19378     eval $1+=\$2
19379   }'
19380 else
19381   as_fn_append ()
19382   {
19383     eval $1=\$$1\$2
19384   }
19385 fi # as_fn_append
19386
19387 # as_fn_arith ARG...
19388 # ------------------
19389 # Perform arithmetic evaluation on the ARGs, and store the result in the
19390 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19391 # must be portable across $(()) and expr.
19392 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19393   eval 'as_fn_arith ()
19394   {
19395     as_val=$(( $* ))
19396   }'
19397 else
19398   as_fn_arith ()
19399   {
19400     as_val=`expr "$@" || test $? -eq 1`
19401   }
19402 fi # as_fn_arith
19403
19404
19405 if expr a : '\(a\)' >/dev/null 2>&1 &&
19406    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19407   as_expr=expr
19408 else
19409   as_expr=false
19410 fi
19411
19412 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19413   as_basename=basename
19414 else
19415   as_basename=false
19416 fi
19417
19418 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19419   as_dirname=dirname
19420 else
19421   as_dirname=false
19422 fi
19423
19424 as_me=`$as_basename -- "$0" ||
19425 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19426          X"$0" : 'X\(//\)$' \| \
19427          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19428 $as_echo X/"$0" |
19429     sed '/^.*\/\([^/][^/]*\)\/*$/{
19430             s//\1/
19431             q
19432           }
19433           /^X\/\(\/\/\)$/{
19434             s//\1/
19435             q
19436           }
19437           /^X\/\(\/\).*/{
19438             s//\1/
19439             q
19440           }
19441           s/.*/./; q'`
19442
19443 # Avoid depending upon Character Ranges.
19444 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19445 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19446 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19447 as_cr_digits='0123456789'
19448 as_cr_alnum=$as_cr_Letters$as_cr_digits
19449
19450 ECHO_C= ECHO_N= ECHO_T=
19451 case `echo -n x` in #(((((
19452 -n*)
19453   case `echo 'xy\c'` in
19454   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19455   xy)  ECHO_C='\c';;
19456   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19457        ECHO_T=' ';;
19458   esac;;
19459 *)
19460   ECHO_N='-n';;
19461 esac
19462
19463 rm -f conf$$ conf$$.exe conf$$.file
19464 if test -d conf$$.dir; then
19465   rm -f conf$$.dir/conf$$.file
19466 else
19467   rm -f conf$$.dir
19468   mkdir conf$$.dir 2>/dev/null
19469 fi
19470 if (echo >conf$$.file) 2>/dev/null; then
19471   if ln -s conf$$.file conf$$ 2>/dev/null; then
19472     as_ln_s='ln -s'
19473     # ... but there are two gotchas:
19474     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19475     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19476     # In both cases, we have to default to `cp -pR'.
19477     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19478       as_ln_s='cp -pR'
19479   elif ln conf$$.file conf$$ 2>/dev/null; then
19480     as_ln_s=ln
19481   else
19482     as_ln_s='cp -pR'
19483   fi
19484 else
19485   as_ln_s='cp -pR'
19486 fi
19487 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19488 rmdir conf$$.dir 2>/dev/null
19489
19490
19491 # as_fn_mkdir_p
19492 # -------------
19493 # Create "$as_dir" as a directory, including parents if necessary.
19494 as_fn_mkdir_p ()
19495 {
19496
19497   case $as_dir in #(
19498   -*) as_dir=./$as_dir;;
19499   esac
19500   test -d "$as_dir" || eval $as_mkdir_p || {
19501     as_dirs=
19502     while :; do
19503       case $as_dir in #(
19504       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19505       *) as_qdir=$as_dir;;
19506       esac
19507       as_dirs="'$as_qdir' $as_dirs"
19508       as_dir=`$as_dirname -- "$as_dir" ||
19509 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19510          X"$as_dir" : 'X\(//\)[^/]' \| \
19511          X"$as_dir" : 'X\(//\)$' \| \
19512          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19513 $as_echo X"$as_dir" |
19514     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19515             s//\1/
19516             q
19517           }
19518           /^X\(\/\/\)[^/].*/{
19519             s//\1/
19520             q
19521           }
19522           /^X\(\/\/\)$/{
19523             s//\1/
19524             q
19525           }
19526           /^X\(\/\).*/{
19527             s//\1/
19528             q
19529           }
19530           s/.*/./; q'`
19531       test -d "$as_dir" && break
19532     done
19533     test -z "$as_dirs" || eval "mkdir $as_dirs"
19534   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19535
19536
19537 } # as_fn_mkdir_p
19538 if mkdir -p . 2>/dev/null; then
19539   as_mkdir_p='mkdir -p "$as_dir"'
19540 else
19541   test -d ./-p && rmdir ./-p
19542   as_mkdir_p=false
19543 fi
19544
19545
19546 # as_fn_executable_p FILE
19547 # -----------------------
19548 # Test if FILE is an executable regular file.
19549 as_fn_executable_p ()
19550 {
19551   test -f "$1" && test -x "$1"
19552 } # as_fn_executable_p
19553 as_test_x='test -x'
19554 as_executable_p=as_fn_executable_p
19555
19556 # Sed expression to map a string onto a valid CPP name.
19557 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19558
19559 # Sed expression to map a string onto a valid variable name.
19560 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19561
19562
19563 exec 6>&1
19564 ## ----------------------------------- ##
19565 ## Main body of $CONFIG_STATUS script. ##
19566 ## ----------------------------------- ##
19567 _ASEOF
19568 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19569
19570 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19571 # Save the log message, to keep $0 and so on meaningful, and to
19572 # report actual input values of CONFIG_FILES etc. instead of their
19573 # values after options handling.
19574 ac_log="
19575 This file was extended by PostgreSQL $as_me 12devel, which was
19576 generated by GNU Autoconf 2.69.  Invocation command line was
19577
19578   CONFIG_FILES    = $CONFIG_FILES
19579   CONFIG_HEADERS  = $CONFIG_HEADERS
19580   CONFIG_LINKS    = $CONFIG_LINKS
19581   CONFIG_COMMANDS = $CONFIG_COMMANDS
19582   $ $0 $@
19583
19584 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19585 "
19586
19587 _ACEOF
19588
19589 case $ac_config_files in *"
19590 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19591 esac
19592
19593 case $ac_config_headers in *"
19594 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19595 esac
19596
19597
19598 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19599 # Files that config.status was made for.
19600 config_files="$ac_config_files"
19601 config_headers="$ac_config_headers"
19602 config_links="$ac_config_links"
19603 config_commands="$ac_config_commands"
19604
19605 _ACEOF
19606
19607 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19608 ac_cs_usage="\
19609 \`$as_me' instantiates files and other configuration actions
19610 from templates according to the current configuration.  Unless the files
19611 and actions are specified as TAGs, all are instantiated by default.
19612
19613 Usage: $0 [OPTION]... [TAG]...
19614
19615   -h, --help       print this help, then exit
19616   -V, --version    print version number and configuration settings, then exit
19617       --config     print configuration, then exit
19618   -q, --quiet, --silent
19619                    do not print progress messages
19620   -d, --debug      don't remove temporary files
19621       --recheck    update $as_me by reconfiguring in the same conditions
19622       --file=FILE[:TEMPLATE]
19623                    instantiate the configuration file FILE
19624       --header=FILE[:TEMPLATE]
19625                    instantiate the configuration header FILE
19626
19627 Configuration files:
19628 $config_files
19629
19630 Configuration headers:
19631 $config_headers
19632
19633 Configuration links:
19634 $config_links
19635
19636 Configuration commands:
19637 $config_commands
19638
19639 Report bugs to <pgsql-bugs@postgresql.org>."
19640
19641 _ACEOF
19642 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19643 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19644 ac_cs_version="\\
19645 PostgreSQL config.status 12devel
19646 configured by $0, generated by GNU Autoconf 2.69,
19647   with options \\"\$ac_cs_config\\"
19648
19649 Copyright (C) 2012 Free Software Foundation, Inc.
19650 This config.status script is free software; the Free Software Foundation
19651 gives unlimited permission to copy, distribute and modify it."
19652
19653 ac_pwd='$ac_pwd'
19654 srcdir='$srcdir'
19655 INSTALL='$INSTALL'
19656 MKDIR_P='$MKDIR_P'
19657 AWK='$AWK'
19658 test -n "\$AWK" || AWK=awk
19659 _ACEOF
19660
19661 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19662 # The default lists apply if the user does not specify any file.
19663 ac_need_defaults=:
19664 while test $# != 0
19665 do
19666   case $1 in
19667   --*=?*)
19668     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19669     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19670     ac_shift=:
19671     ;;
19672   --*=)
19673     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19674     ac_optarg=
19675     ac_shift=:
19676     ;;
19677   *)
19678     ac_option=$1
19679     ac_optarg=$2
19680     ac_shift=shift
19681     ;;
19682   esac
19683
19684   case $ac_option in
19685   # Handling of the options.
19686   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19687     ac_cs_recheck=: ;;
19688   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19689     $as_echo "$ac_cs_version"; exit ;;
19690   --config | --confi | --conf | --con | --co | --c )
19691     $as_echo "$ac_cs_config"; exit ;;
19692   --debug | --debu | --deb | --de | --d | -d )
19693     debug=: ;;
19694   --file | --fil | --fi | --f )
19695     $ac_shift
19696     case $ac_optarg in
19697     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19698     '') as_fn_error $? "missing file argument" ;;
19699     esac
19700     as_fn_append CONFIG_FILES " '$ac_optarg'"
19701     ac_need_defaults=false;;
19702   --header | --heade | --head | --hea )
19703     $ac_shift
19704     case $ac_optarg in
19705     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19706     esac
19707     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19708     ac_need_defaults=false;;
19709   --he | --h)
19710     # Conflict between --help and --header
19711     as_fn_error $? "ambiguous option: \`$1'
19712 Try \`$0 --help' for more information.";;
19713   --help | --hel | -h )
19714     $as_echo "$ac_cs_usage"; exit ;;
19715   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19716   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19717     ac_cs_silent=: ;;
19718
19719   # This is an error.
19720   -*) as_fn_error $? "unrecognized option: \`$1'
19721 Try \`$0 --help' for more information." ;;
19722
19723   *) as_fn_append ac_config_targets " $1"
19724      ac_need_defaults=false ;;
19725
19726   esac
19727   shift
19728 done
19729
19730 ac_configure_extra_args=
19731
19732 if $ac_cs_silent; then
19733   exec 6>/dev/null
19734   ac_configure_extra_args="$ac_configure_extra_args --silent"
19735 fi
19736
19737 _ACEOF
19738 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19739 if \$ac_cs_recheck; then
19740   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19741   shift
19742   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19743   CONFIG_SHELL='$SHELL'
19744   export CONFIG_SHELL
19745   exec "\$@"
19746 fi
19747
19748 _ACEOF
19749 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19750 exec 5>>config.log
19751 {
19752   echo
19753   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19754 ## Running $as_me. ##
19755 _ASBOX
19756   $as_echo "$ac_log"
19757 } >&5
19758
19759 _ACEOF
19760 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19761 _ACEOF
19762
19763 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19764
19765 # Handling of arguments.
19766 for ac_config_target in $ac_config_targets
19767 do
19768   case $ac_config_target in
19769     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19770     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19771     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19772     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
19773     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19774     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19775     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
19776     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19777     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19778     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19779     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19780     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19781     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19782
19783   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19784   esac
19785 done
19786
19787
19788 # If the user did not use the arguments to specify the items to instantiate,
19789 # then the envvar interface is used.  Set only those that are not.
19790 # We use the long form for the default assignment because of an extremely
19791 # bizarre bug on SunOS 4.1.3.
19792 if $ac_need_defaults; then
19793   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19794   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19795   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19796   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19797 fi
19798
19799 # Have a temporary directory for convenience.  Make it in the build tree
19800 # simply because there is no reason against having it here, and in addition,
19801 # creating and moving files from /tmp can sometimes cause problems.
19802 # Hook for its removal unless debugging.
19803 # Note that there is a small window in which the directory will not be cleaned:
19804 # after its creation but before its name has been assigned to `$tmp'.
19805 $debug ||
19806 {
19807   tmp= ac_tmp=
19808   trap 'exit_status=$?
19809   : "${ac_tmp:=$tmp}"
19810   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19811 ' 0
19812   trap 'as_fn_exit 1' 1 2 13 15
19813 }
19814 # Create a (secure) tmp directory for tmp files.
19815
19816 {
19817   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19818   test -d "$tmp"
19819 }  ||
19820 {
19821   tmp=./conf$$-$RANDOM
19822   (umask 077 && mkdir "$tmp")
19823 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19824 ac_tmp=$tmp
19825
19826 # Set up the scripts for CONFIG_FILES section.
19827 # No need to generate them if there are no CONFIG_FILES.
19828 # This happens for instance with `./config.status config.h'.
19829 if test -n "$CONFIG_FILES"; then
19830
19831
19832 ac_cr=`echo X | tr X '\015'`
19833 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19834 # But we know of no other shell where ac_cr would be empty at this
19835 # point, so we can use a bashism as a fallback.
19836 if test "x$ac_cr" = x; then
19837   eval ac_cr=\$\'\\r\'
19838 fi
19839 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19840 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19841   ac_cs_awk_cr='\\r'
19842 else
19843   ac_cs_awk_cr=$ac_cr
19844 fi
19845
19846 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19847 _ACEOF
19848
19849
19850 {
19851   echo "cat >conf$$subs.awk <<_ACEOF" &&
19852   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19853   echo "_ACEOF"
19854 } >conf$$subs.sh ||
19855   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19856 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19857 ac_delim='%!_!# '
19858 for ac_last_try in false false false false false :; do
19859   . ./conf$$subs.sh ||
19860     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19861
19862   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19863   if test $ac_delim_n = $ac_delim_num; then
19864     break
19865   elif $ac_last_try; then
19866     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19867   else
19868     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19869   fi
19870 done
19871 rm -f conf$$subs.sh
19872
19873 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19874 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19875 _ACEOF
19876 sed -n '
19877 h
19878 s/^/S["/; s/!.*/"]=/
19879 p
19880 g
19881 s/^[^!]*!//
19882 :repl
19883 t repl
19884 s/'"$ac_delim"'$//
19885 t delim
19886 :nl
19887 h
19888 s/\(.\{148\}\)..*/\1/
19889 t more1
19890 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19891 p
19892 n
19893 b repl
19894 :more1
19895 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19896 p
19897 g
19898 s/.\{148\}//
19899 t nl
19900 :delim
19901 h
19902 s/\(.\{148\}\)..*/\1/
19903 t more2
19904 s/["\\]/\\&/g; s/^/"/; s/$/"/
19905 p
19906 b
19907 :more2
19908 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19909 p
19910 g
19911 s/.\{148\}//
19912 t delim
19913 ' <conf$$subs.awk | sed '
19914 /^[^""]/{
19915   N
19916   s/\n//
19917 }
19918 ' >>$CONFIG_STATUS || ac_write_fail=1
19919 rm -f conf$$subs.awk
19920 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19921 _ACAWK
19922 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19923   for (key in S) S_is_set[key] = 1
19924   FS = "\a"
19925
19926 }
19927 {
19928   line = $ 0
19929   nfields = split(line, field, "@")
19930   substed = 0
19931   len = length(field[1])
19932   for (i = 2; i < nfields; i++) {
19933     key = field[i]
19934     keylen = length(key)
19935     if (S_is_set[key]) {
19936       value = S[key]
19937       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19938       len += length(value) + length(field[++i])
19939       substed = 1
19940     } else
19941       len += 1 + keylen
19942   }
19943
19944   print line
19945 }
19946
19947 _ACAWK
19948 _ACEOF
19949 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19950 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19951   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19952 else
19953   cat
19954 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19955   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19956 _ACEOF
19957
19958 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19959 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19960 # trailing colons and then remove the whole line if VPATH becomes empty
19961 # (actually we leave an empty line to preserve line numbers).
19962 if test "x$srcdir" = x.; then
19963   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
19964 h
19965 s///
19966 s/^/:/
19967 s/[      ]*$/:/
19968 s/:\$(srcdir):/:/g
19969 s/:\${srcdir}:/:/g
19970 s/:@srcdir@:/:/g
19971 s/^:*//
19972 s/:*$//
19973 x
19974 s/\(=[   ]*\).*/\1/
19975 G
19976 s/\n//
19977 s/^[^=]*=[       ]*$//
19978 }'
19979 fi
19980
19981 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19982 fi # test -n "$CONFIG_FILES"
19983
19984 # Set up the scripts for CONFIG_HEADERS section.
19985 # No need to generate them if there are no CONFIG_HEADERS.
19986 # This happens for instance with `./config.status Makefile'.
19987 if test -n "$CONFIG_HEADERS"; then
19988 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19989 BEGIN {
19990 _ACEOF
19991
19992 # Transform confdefs.h into an awk script `defines.awk', embedded as
19993 # here-document in config.status, that substitutes the proper values into
19994 # config.h.in to produce config.h.
19995
19996 # Create a delimiter string that does not exist in confdefs.h, to ease
19997 # handling of long lines.
19998 ac_delim='%!_!# '
19999 for ac_last_try in false false :; do
20000   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20001   if test -z "$ac_tt"; then
20002     break
20003   elif $ac_last_try; then
20004     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20005   else
20006     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20007   fi
20008 done
20009
20010 # For the awk script, D is an array of macro values keyed by name,
20011 # likewise P contains macro parameters if any.  Preserve backslash
20012 # newline sequences.
20013
20014 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20015 sed -n '
20016 s/.\{148\}/&'"$ac_delim"'/g
20017 t rset
20018 :rset
20019 s/^[     ]*#[    ]*define[       ][      ]*/ /
20020 t def
20021 d
20022 :def
20023 s/\\$//
20024 t bsnl
20025 s/["\\]/\\&/g
20026 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20027 D["\1"]=" \3"/p
20028 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
20029 d
20030 :bsnl
20031 s/["\\]/\\&/g
20032 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20033 D["\1"]=" \3\\\\\\n"\\/p
20034 t cont
20035 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20036 t cont
20037 d
20038 :cont
20039 n
20040 s/.\{148\}/&'"$ac_delim"'/g
20041 t clear
20042 :clear
20043 s/\\$//
20044 t bsnlc
20045 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20046 d
20047 :bsnlc
20048 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20049 b cont
20050 ' <confdefs.h | sed '
20051 s/'"$ac_delim"'/"\\\
20052 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20053
20054 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20055   for (key in D) D_is_set[key] = 1
20056   FS = "\a"
20057 }
20058 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20059   line = \$ 0
20060   split(line, arg, " ")
20061   if (arg[1] == "#") {
20062     defundef = arg[2]
20063     mac1 = arg[3]
20064   } else {
20065     defundef = substr(arg[1], 2)
20066     mac1 = arg[2]
20067   }
20068   split(mac1, mac2, "(") #)
20069   macro = mac2[1]
20070   prefix = substr(line, 1, index(line, defundef) - 1)
20071   if (D_is_set[macro]) {
20072     # Preserve the white space surrounding the "#".
20073     print prefix "define", macro P[macro] D[macro]
20074     next
20075   } else {
20076     # Replace #undef with comments.  This is necessary, for example,
20077     # in the case of _POSIX_SOURCE, which is predefined and required
20078     # on some systems where configure will not decide to define it.
20079     if (defundef == "undef") {
20080       print "/*", prefix defundef, macro, "*/"
20081       next
20082     }
20083   }
20084 }
20085 { print }
20086 _ACAWK
20087 _ACEOF
20088 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20089   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20090 fi # test -n "$CONFIG_HEADERS"
20091
20092
20093 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
20094 shift
20095 for ac_tag
20096 do
20097   case $ac_tag in
20098   :[FHLC]) ac_mode=$ac_tag; continue;;
20099   esac
20100   case $ac_mode$ac_tag in
20101   :[FHL]*:*);;
20102   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20103   :[FH]-) ac_tag=-:-;;
20104   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20105   esac
20106   ac_save_IFS=$IFS
20107   IFS=:
20108   set x $ac_tag
20109   IFS=$ac_save_IFS
20110   shift
20111   ac_file=$1
20112   shift
20113
20114   case $ac_mode in
20115   :L) ac_source=$1;;
20116   :[FH])
20117     ac_file_inputs=
20118     for ac_f
20119     do
20120       case $ac_f in
20121       -) ac_f="$ac_tmp/stdin";;
20122       *) # Look for the file first in the build tree, then in the source tree
20123          # (if the path is not absolute).  The absolute path cannot be DOS-style,
20124          # because $ac_f cannot contain `:'.
20125          test -f "$ac_f" ||
20126            case $ac_f in
20127            [\\/$]*) false;;
20128            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20129            esac ||
20130            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20131       esac
20132       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20133       as_fn_append ac_file_inputs " '$ac_f'"
20134     done
20135
20136     # Let's still pretend it is `configure' which instantiates (i.e., don't
20137     # use $as_me), people would be surprised to read:
20138     #    /* config.h.  Generated by config.status.  */
20139     configure_input='Generated from '`
20140           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20141         `' by configure.'
20142     if test x"$ac_file" != x-; then
20143       configure_input="$ac_file.  $configure_input"
20144       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20145 $as_echo "$as_me: creating $ac_file" >&6;}
20146     fi
20147     # Neutralize special characters interpreted by sed in replacement strings.
20148     case $configure_input in #(
20149     *\&* | *\|* | *\\* )
20150        ac_sed_conf_input=`$as_echo "$configure_input" |
20151        sed 's/[\\\\&|]/\\\\&/g'`;; #(
20152     *) ac_sed_conf_input=$configure_input;;
20153     esac
20154
20155     case $ac_tag in
20156     *:-:* | *:-) cat >"$ac_tmp/stdin" \
20157       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20158     esac
20159     ;;
20160   esac
20161
20162   ac_dir=`$as_dirname -- "$ac_file" ||
20163 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20164          X"$ac_file" : 'X\(//\)[^/]' \| \
20165          X"$ac_file" : 'X\(//\)$' \| \
20166          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20167 $as_echo X"$ac_file" |
20168     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20169             s//\1/
20170             q
20171           }
20172           /^X\(\/\/\)[^/].*/{
20173             s//\1/
20174             q
20175           }
20176           /^X\(\/\/\)$/{
20177             s//\1/
20178             q
20179           }
20180           /^X\(\/\).*/{
20181             s//\1/
20182             q
20183           }
20184           s/.*/./; q'`
20185   as_dir="$ac_dir"; as_fn_mkdir_p
20186   ac_builddir=.
20187
20188 case "$ac_dir" in
20189 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20190 *)
20191   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20192   # A ".." for each directory in $ac_dir_suffix.
20193   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20194   case $ac_top_builddir_sub in
20195   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20196   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20197   esac ;;
20198 esac
20199 ac_abs_top_builddir=$ac_pwd
20200 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20201 # for backward compatibility:
20202 ac_top_builddir=$ac_top_build_prefix
20203
20204 case $srcdir in
20205   .)  # We are building in place.
20206     ac_srcdir=.
20207     ac_top_srcdir=$ac_top_builddir_sub
20208     ac_abs_top_srcdir=$ac_pwd ;;
20209   [\\/]* | ?:[\\/]* )  # Absolute name.
20210     ac_srcdir=$srcdir$ac_dir_suffix;
20211     ac_top_srcdir=$srcdir
20212     ac_abs_top_srcdir=$srcdir ;;
20213   *) # Relative name.
20214     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20215     ac_top_srcdir=$ac_top_build_prefix$srcdir
20216     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20217 esac
20218 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20219
20220
20221   case $ac_mode in
20222   :F)
20223   #
20224   # CONFIG_FILE
20225   #
20226
20227   case $INSTALL in
20228   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20229   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20230   esac
20231   ac_MKDIR_P=$MKDIR_P
20232   case $MKDIR_P in
20233   [\\/$]* | ?:[\\/]* ) ;;
20234   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20235   esac
20236 _ACEOF
20237
20238 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20239 # If the template does not know about datarootdir, expand it.
20240 # FIXME: This hack should be removed a few years after 2.60.
20241 ac_datarootdir_hack=; ac_datarootdir_seen=
20242 ac_sed_dataroot='
20243 /datarootdir/ {
20244   p
20245   q
20246 }
20247 /@datadir@/p
20248 /@docdir@/p
20249 /@infodir@/p
20250 /@localedir@/p
20251 /@mandir@/p'
20252 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20253 *datarootdir*) ac_datarootdir_seen=yes;;
20254 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20255   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20256 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20257 _ACEOF
20258 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20259   ac_datarootdir_hack='
20260   s&@datadir@&$datadir&g
20261   s&@docdir@&$docdir&g
20262   s&@infodir@&$infodir&g
20263   s&@localedir@&$localedir&g
20264   s&@mandir@&$mandir&g
20265   s&\\\${datarootdir}&$datarootdir&g' ;;
20266 esac
20267 _ACEOF
20268
20269 # Neutralize VPATH when `$srcdir' = `.'.
20270 # Shell code in configure.ac might set extrasub.
20271 # FIXME: do we really want to maintain this feature?
20272 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20273 ac_sed_extra="$ac_vpsub
20274 $extrasub
20275 _ACEOF
20276 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20277 :t
20278 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20279 s|@configure_input@|$ac_sed_conf_input|;t t
20280 s&@top_builddir@&$ac_top_builddir_sub&;t t
20281 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20282 s&@srcdir@&$ac_srcdir&;t t
20283 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20284 s&@top_srcdir@&$ac_top_srcdir&;t t
20285 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20286 s&@builddir@&$ac_builddir&;t t
20287 s&@abs_builddir@&$ac_abs_builddir&;t t
20288 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20289 s&@INSTALL@&$ac_INSTALL&;t t
20290 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20291 $ac_datarootdir_hack
20292 "
20293 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20294   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20295
20296 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20297   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20298   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20299       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20300   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20301 which seems to be undefined.  Please make sure it is defined" >&5
20302 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20303 which seems to be undefined.  Please make sure it is defined" >&2;}
20304
20305   rm -f "$ac_tmp/stdin"
20306   case $ac_file in
20307   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20308   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20309   esac \
20310   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20311  ;;
20312   :H)
20313   #
20314   # CONFIG_HEADER
20315   #
20316   if test x"$ac_file" != x-; then
20317     {
20318       $as_echo "/* $configure_input  */" \
20319       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20320     } >"$ac_tmp/config.h" \
20321       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20322     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20323       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20324 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20325     else
20326       rm -f "$ac_file"
20327       mv "$ac_tmp/config.h" "$ac_file" \
20328         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20329     fi
20330   else
20331     $as_echo "/* $configure_input  */" \
20332       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20333       || as_fn_error $? "could not create -" "$LINENO" 5
20334   fi
20335  ;;
20336   :L)
20337   #
20338   # CONFIG_LINK
20339   #
20340
20341   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20342     :
20343   else
20344     # Prefer the file from the source tree if names are identical.
20345     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20346       ac_source=$srcdir/$ac_source
20347     fi
20348
20349     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20350 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20351
20352     if test ! -r "$ac_source"; then
20353       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20354     fi
20355     rm -f "$ac_file"
20356
20357     # Try a relative symlink, then a hard link, then a copy.
20358     case $ac_source in
20359     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20360         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20361     esac
20362     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20363       ln "$ac_source" "$ac_file" 2>/dev/null ||
20364       cp -p "$ac_source" "$ac_file" ||
20365       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20366   fi
20367  ;;
20368   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20369 $as_echo "$as_me: executing $ac_file commands" >&6;}
20370  ;;
20371   esac
20372
20373
20374   case $ac_file$ac_mode in
20375     "check_win32_symlinks":C)
20376 # Links sometimes fail undetected on Mingw -
20377 # so here we detect it and warn the user
20378 for FILE in $CONFIG_LINKS
20379  do
20380         # test -e works for symlinks in the MinGW console
20381         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20382 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20383  done
20384  ;;
20385     "src/include/pg_config.h":H)
20386 # Update timestamp for pg_config.h (see Makefile.global)
20387 echo >src/include/stamp-h
20388  ;;
20389     "src/include/pg_config_ext.h":H)
20390 # Update timestamp for pg_config_ext.h (see Makefile.global)
20391 echo >src/include/stamp-ext-h
20392  ;;
20393     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20394
20395   esac
20396 done # for ac_tag
20397
20398
20399 as_fn_exit 0
20400 _ACEOF
20401 ac_clean_files=$ac_clean_files_save
20402
20403 test $ac_write_fail = 0 ||
20404   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20405
20406
20407 # configure is writing to config.log, and then calls config.status.
20408 # config.status does its own redirection, appending to config.log.
20409 # Unfortunately, on DOS this fails, as config.log is still kept open
20410 # by configure, so config.status won't be able to write to it; its
20411 # output is simply discarded.  So we exec the FD to /dev/null,
20412 # effectively closing config.log, so it can be properly (re)opened and
20413 # appended to by config.status.  When coming back to configure, we
20414 # need to make the FD available again.
20415 if test "$no_create" != yes; then
20416   ac_cs_success=:
20417   ac_config_status_args=
20418   test "$silent" = yes &&
20419     ac_config_status_args="$ac_config_status_args --quiet"
20420   exec 5>/dev/null
20421   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20422   exec 5>>config.log
20423   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20424   # would make configure fail if this is the last instruction.
20425   $ac_cs_success || as_fn_exit 1
20426 fi
20427 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20428   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20429 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20430 fi
20431