]> granicus.if.org Git - postgresql/blob - configure
Stamp HEAD as 12devel
[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 ac_ext=cpp
4429 ac_cpp='$CXXCPP $CPPFLAGS'
4430 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4431 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4432 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4433 if test -z "$CXX"; then
4434   if test -n "$CCC"; then
4435     CXX=$CCC
4436   else
4437     if test -n "$ac_tool_prefix"; then
4438   for ac_prog in $pgac_cxx_list
4439   do
4440     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4441 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4443 $as_echo_n "checking for $ac_word... " >&6; }
4444 if ${ac_cv_prog_CXX+:} false; then :
4445   $as_echo_n "(cached) " >&6
4446 else
4447   if test -n "$CXX"; then
4448   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4449 else
4450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4451 for as_dir in $PATH
4452 do
4453   IFS=$as_save_IFS
4454   test -z "$as_dir" && as_dir=.
4455     for ac_exec_ext in '' $ac_executable_extensions; do
4456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4457     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4459     break 2
4460   fi
4461 done
4462   done
4463 IFS=$as_save_IFS
4464
4465 fi
4466 fi
4467 CXX=$ac_cv_prog_CXX
4468 if test -n "$CXX"; then
4469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4470 $as_echo "$CXX" >&6; }
4471 else
4472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4473 $as_echo "no" >&6; }
4474 fi
4475
4476
4477     test -n "$CXX" && break
4478   done
4479 fi
4480 if test -z "$CXX"; then
4481   ac_ct_CXX=$CXX
4482   for ac_prog in $pgac_cxx_list
4483 do
4484   # Extract the first word of "$ac_prog", so it can be a program name with args.
4485 set dummy $ac_prog; ac_word=$2
4486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4487 $as_echo_n "checking for $ac_word... " >&6; }
4488 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4489   $as_echo_n "(cached) " >&6
4490 else
4491   if test -n "$ac_ct_CXX"; then
4492   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4493 else
4494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4495 for as_dir in $PATH
4496 do
4497   IFS=$as_save_IFS
4498   test -z "$as_dir" && as_dir=.
4499     for ac_exec_ext in '' $ac_executable_extensions; do
4500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4501     ac_cv_prog_ac_ct_CXX="$ac_prog"
4502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4503     break 2
4504   fi
4505 done
4506   done
4507 IFS=$as_save_IFS
4508
4509 fi
4510 fi
4511 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4512 if test -n "$ac_ct_CXX"; then
4513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4514 $as_echo "$ac_ct_CXX" >&6; }
4515 else
4516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4517 $as_echo "no" >&6; }
4518 fi
4519
4520
4521   test -n "$ac_ct_CXX" && break
4522 done
4523
4524   if test "x$ac_ct_CXX" = x; then
4525     CXX="g++"
4526   else
4527     case $cross_compiling:$ac_tool_warned in
4528 yes:)
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4530 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4531 ac_tool_warned=yes ;;
4532 esac
4533     CXX=$ac_ct_CXX
4534   fi
4535 fi
4536
4537   fi
4538 fi
4539 # Provide some information about the compiler.
4540 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4541 set X $ac_compile
4542 ac_compiler=$2
4543 for ac_option in --version -v -V -qversion; do
4544   { { ac_try="$ac_compiler $ac_option >&5"
4545 case "(($ac_try" in
4546   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4547   *) ac_try_echo=$ac_try;;
4548 esac
4549 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4550 $as_echo "$ac_try_echo"; } >&5
4551   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4552   ac_status=$?
4553   if test -s conftest.err; then
4554     sed '10a\
4555 ... rest of stderr output deleted ...
4556          10q' conftest.err >conftest.er1
4557     cat conftest.er1 >&5
4558   fi
4559   rm -f conftest.er1 conftest.err
4560   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4561   test $ac_status = 0; }
4562 done
4563
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4565 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4566 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4567   $as_echo_n "(cached) " >&6
4568 else
4569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4570 /* end confdefs.h.  */
4571
4572 int
4573 main ()
4574 {
4575 #ifndef __GNUC__
4576        choke me
4577 #endif
4578
4579   ;
4580   return 0;
4581 }
4582 _ACEOF
4583 if ac_fn_cxx_try_compile "$LINENO"; then :
4584   ac_compiler_gnu=yes
4585 else
4586   ac_compiler_gnu=no
4587 fi
4588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4589 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4590
4591 fi
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4593 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4594 if test $ac_compiler_gnu = yes; then
4595   GXX=yes
4596 else
4597   GXX=
4598 fi
4599 ac_test_CXXFLAGS=${CXXFLAGS+set}
4600 ac_save_CXXFLAGS=$CXXFLAGS
4601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4602 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4603 if ${ac_cv_prog_cxx_g+:} false; then :
4604   $as_echo_n "(cached) " >&6
4605 else
4606   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4607    ac_cxx_werror_flag=yes
4608    ac_cv_prog_cxx_g=no
4609    CXXFLAGS="-g"
4610    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611 /* end confdefs.h.  */
4612
4613 int
4614 main ()
4615 {
4616
4617   ;
4618   return 0;
4619 }
4620 _ACEOF
4621 if ac_fn_cxx_try_compile "$LINENO"; then :
4622   ac_cv_prog_cxx_g=yes
4623 else
4624   CXXFLAGS=""
4625       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4626 /* end confdefs.h.  */
4627
4628 int
4629 main ()
4630 {
4631
4632   ;
4633   return 0;
4634 }
4635 _ACEOF
4636 if ac_fn_cxx_try_compile "$LINENO"; then :
4637
4638 else
4639   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4640          CXXFLAGS="-g"
4641          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4642 /* end confdefs.h.  */
4643
4644 int
4645 main ()
4646 {
4647
4648   ;
4649   return 0;
4650 }
4651 _ACEOF
4652 if ac_fn_cxx_try_compile "$LINENO"; then :
4653   ac_cv_prog_cxx_g=yes
4654 fi
4655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4656 fi
4657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4658 fi
4659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4660    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4661 fi
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4663 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4664 if test "$ac_test_CXXFLAGS" = set; then
4665   CXXFLAGS=$ac_save_CXXFLAGS
4666 elif test $ac_cv_prog_cxx_g = yes; then
4667   if test "$GXX" = yes; then
4668     CXXFLAGS="-g -O2"
4669   else
4670     CXXFLAGS="-g"
4671   fi
4672 else
4673   if test "$GXX" = yes; then
4674     CXXFLAGS="-O2"
4675   else
4676     CXXFLAGS=
4677   fi
4678 fi
4679 ac_ext=c
4680 ac_cpp='$CPP $CPPFLAGS'
4681 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4682 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4683 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4684
4685
4686 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4687 # but has idiosyncrasies of its own.  We assume icc will define
4688 # __INTEL_COMPILER regardless of CFLAGS.
4689
4690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4691 /* end confdefs.h.  */
4692
4693 int
4694 main ()
4695 {
4696 #ifndef __INTEL_COMPILER
4697 choke me
4698 #endif
4699   ;
4700   return 0;
4701 }
4702 _ACEOF
4703 if ac_fn_c_try_compile "$LINENO"; then :
4704   ICC=yes
4705 else
4706   ICC=no
4707 fi
4708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4709
4710 # Check if it's Sun Studio compiler. We assume that
4711 # __SUNPRO_C will be defined for Sun Studio compilers
4712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4713 /* end confdefs.h.  */
4714
4715 int
4716 main ()
4717 {
4718 #ifndef __SUNPRO_C
4719 choke me
4720 #endif
4721   ;
4722   return 0;
4723 }
4724 _ACEOF
4725 if ac_fn_c_try_compile "$LINENO"; then :
4726   SUN_STUDIO_CC=yes
4727 else
4728   SUN_STUDIO_CC=no
4729 fi
4730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4731
4732
4733
4734
4735 #
4736 # LLVM
4737 #
4738 # Checked early because subsequent tests depend on it.
4739
4740
4741
4742 # Check whether --with-llvm was given.
4743 if test "${with_llvm+set}" = set; then :
4744   withval=$with_llvm;
4745   case $withval in
4746     yes)
4747
4748 $as_echo "#define USE_LLVM 1" >>confdefs.h
4749
4750       ;;
4751     no)
4752       :
4753       ;;
4754     *)
4755       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4756       ;;
4757   esac
4758
4759 else
4760   with_llvm=no
4761
4762 fi
4763
4764
4765
4766 if test "$with_llvm" = yes ; then
4767    for ac_prog in gawk mawk nawk awk
4768 do
4769   # Extract the first word of "$ac_prog", so it can be a program name with args.
4770 set dummy $ac_prog; ac_word=$2
4771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4772 $as_echo_n "checking for $ac_word... " >&6; }
4773 if ${ac_cv_prog_AWK+:} false; then :
4774   $as_echo_n "(cached) " >&6
4775 else
4776   if test -n "$AWK"; then
4777   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4778 else
4779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780 for as_dir in $PATH
4781 do
4782   IFS=$as_save_IFS
4783   test -z "$as_dir" && as_dir=.
4784     for ac_exec_ext in '' $ac_executable_extensions; do
4785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4786     ac_cv_prog_AWK="$ac_prog"
4787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4788     break 2
4789   fi
4790 done
4791   done
4792 IFS=$as_save_IFS
4793
4794 fi
4795 fi
4796 AWK=$ac_cv_prog_AWK
4797 if test -n "$AWK"; then
4798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4799 $as_echo "$AWK" >&6; }
4800 else
4801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802 $as_echo "no" >&6; }
4803 fi
4804
4805
4806   test -n "$AWK" && break
4807 done
4808
4809
4810
4811
4812
4813   if test -z "$LLVM_CONFIG"; then
4814   for ac_prog in llvm-config llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
4815 do
4816   # Extract the first word of "$ac_prog", so it can be a program name with args.
4817 set dummy $ac_prog; ac_word=$2
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4819 $as_echo_n "checking for $ac_word... " >&6; }
4820 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4821   $as_echo_n "(cached) " >&6
4822 else
4823   case $LLVM_CONFIG in
4824   [\\/]* | ?:[\\/]*)
4825   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
4826   ;;
4827   *)
4828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4829 for as_dir in $PATH
4830 do
4831   IFS=$as_save_IFS
4832   test -z "$as_dir" && as_dir=.
4833     for ac_exec_ext in '' $ac_executable_extensions; do
4834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4835     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4837     break 2
4838   fi
4839 done
4840   done
4841 IFS=$as_save_IFS
4842
4843   ;;
4844 esac
4845 fi
4846 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
4847 if test -n "$LLVM_CONFIG"; then
4848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
4849 $as_echo "$LLVM_CONFIG" >&6; }
4850 else
4851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4852 $as_echo "no" >&6; }
4853 fi
4854
4855
4856   test -n "$LLVM_CONFIG" && break
4857 done
4858
4859 else
4860   # Report the value of LLVM_CONFIG in configure's output in all cases.
4861   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
4862 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
4863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
4864 $as_echo "$LLVM_CONFIG" >&6; }
4865 fi
4866
4867
4868   # no point continuing if llvm wasn't found
4869   if test -z "$LLVM_CONFIG"; then
4870     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
4871   fi
4872   # check if detected $LLVM_CONFIG is executable
4873   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
4874   if test "x$pgac_llvm_version" = "xno"; then
4875     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
4876   fi
4877   # and whether the version is supported
4878   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
4879     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
4880   fi
4881
4882   # need clang to create some bitcode files
4883
4884   if test -z "$CLANG"; then
4885   for ac_prog in clang clang-6.0 clang-5.0 clang-4.0 clang-3.9
4886 do
4887   # Extract the first word of "$ac_prog", so it can be a program name with args.
4888 set dummy $ac_prog; ac_word=$2
4889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4890 $as_echo_n "checking for $ac_word... " >&6; }
4891 if ${ac_cv_path_CLANG+:} false; then :
4892   $as_echo_n "(cached) " >&6
4893 else
4894   case $CLANG in
4895   [\\/]* | ?:[\\/]*)
4896   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
4897   ;;
4898   *)
4899   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4900 for as_dir in $PATH
4901 do
4902   IFS=$as_save_IFS
4903   test -z "$as_dir" && as_dir=.
4904     for ac_exec_ext in '' $ac_executable_extensions; do
4905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4906     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
4907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4908     break 2
4909   fi
4910 done
4911   done
4912 IFS=$as_save_IFS
4913
4914   ;;
4915 esac
4916 fi
4917 CLANG=$ac_cv_path_CLANG
4918 if test -n "$CLANG"; then
4919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
4920 $as_echo "$CLANG" >&6; }
4921 else
4922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4923 $as_echo "no" >&6; }
4924 fi
4925
4926
4927   test -n "$CLANG" && break
4928 done
4929
4930 else
4931   # Report the value of CLANG in configure's output in all cases.
4932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
4933 $as_echo_n "checking for CLANG... " >&6; }
4934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
4935 $as_echo "$CLANG" >&6; }
4936 fi
4937
4938   if test -z "$CLANG"; then
4939     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
4940   fi
4941   # make sure clang is executable
4942   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
4943     as_fn_error $? "$CLANG does not work" "$LINENO" 5
4944   fi
4945   # Could check clang version, but it doesn't seem that
4946   # important. Systems with a new enough LLVM version are usually
4947   # going to have a decent clang version too. It's also not entirely
4948   # clear what the minimum version is.
4949
4950   # Collect compiler flags necessary to build the LLVM dependent
4951   # shared library.
4952   for pgac_option in `$LLVM_CONFIG --cppflags`; do
4953     case $pgac_option in
4954       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
4955     esac
4956   done
4957
4958   for pgac_option in `$LLVM_CONFIG --ldflags`; do
4959     case $pgac_option in
4960       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
4961     esac
4962   done
4963
4964   # ABI influencing options, standard influencing options
4965   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
4966     case $pgac_option in
4967       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
4968       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
4969     esac
4970   done
4971
4972   # Look for components we're interested in, collect necessary
4973   # libs. As some components are optional, we can't just list all of
4974   # them as it'd raise an error.
4975   pgac_components='';
4976   for pgac_component in `$LLVM_CONFIG --components`; do
4977     case $pgac_component in
4978       engine) pgac_components="$pgac_components $pgac_component";;
4979       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
4980       orcjit) pgac_components="$pgac_components $pgac_component";;
4981       passes) pgac_components="$pgac_components $pgac_component";;
4982       perfjitevents) pgac_components="$pgac_components $pgac_component";;
4983     esac
4984   done;
4985
4986   # And then get the libraries that need to be linked in for the
4987   # selected components.  They're large libraries, we only want to
4988   # link them into the LLVM using shared library.
4989   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
4990     case $pgac_option in
4991       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
4992     esac
4993   done
4994
4995   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
4996
4997   # Check which functionality is present
4998   SAVE_CPPFLAGS="$CPPFLAGS"
4999   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
5000   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
5001 "
5002 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
5003   ac_have_decl=1
5004 else
5005   ac_have_decl=0
5006 fi
5007
5008 cat >>confdefs.h <<_ACEOF
5009 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
5010 _ACEOF
5011 ac_fn_c_check_decl "$LINENO" "LLVMOrcRegisterGDB" "ac_cv_have_decl_LLVMOrcRegisterGDB" "#include <llvm-c/OrcBindings.h>
5012 "
5013 if test "x$ac_cv_have_decl_LLVMOrcRegisterGDB" = xyes; then :
5014   ac_have_decl=1
5015 else
5016   ac_have_decl=0
5017 fi
5018
5019 cat >>confdefs.h <<_ACEOF
5020 #define HAVE_DECL_LLVMORCREGISTERGDB $ac_have_decl
5021 _ACEOF
5022 ac_fn_c_check_decl "$LINENO" "LLVMOrcRegisterPerf" "ac_cv_have_decl_LLVMOrcRegisterPerf" "#include <llvm-c/OrcBindings.h>
5023 "
5024 if test "x$ac_cv_have_decl_LLVMOrcRegisterPerf" = xyes; then :
5025   ac_have_decl=1
5026 else
5027   ac_have_decl=0
5028 fi
5029
5030 cat >>confdefs.h <<_ACEOF
5031 #define HAVE_DECL_LLVMORCREGISTERPERF $ac_have_decl
5032 _ACEOF
5033
5034   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
5035 "
5036 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
5037   ac_have_decl=1
5038 else
5039   ac_have_decl=0
5040 fi
5041
5042 cat >>confdefs.h <<_ACEOF
5043 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
5044 _ACEOF
5045
5046   CPPFLAGS="$SAVE_CPPFLAGS"
5047
5048   # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5049
5050
5051
5052
5053
5054
5055
5056 fi
5057
5058
5059 unset CFLAGS
5060 unset CXXFLAGS
5061
5062 #
5063 # Read the template
5064 #
5065 . "$srcdir/src/template/$template" || exit
5066
5067 # C[XX]FLAGS are selected so:
5068 # If the user specifies something in the environment, that is used.
5069 # else:  If the template file set something, that is used.
5070 # else:  If coverage was enabled, don't set anything.
5071 # else:  If the compiler is GCC, then we use -O2.
5072 # else:  If the compiler is something else, then we use -O, unless debugging.
5073
5074 if test "$ac_env_CFLAGS_set" = set; then
5075   CFLAGS=$ac_env_CFLAGS_value
5076 elif test "${CFLAGS+set}" = set; then
5077   : # (keep what template set)
5078 elif test "$enable_coverage" = yes; then
5079   : # no optimization by default
5080 elif test "$GCC" = yes; then
5081   CFLAGS="-O2"
5082 else
5083   # if the user selected debug mode, don't use -O
5084   if test "$enable_debug" != yes; then
5085     CFLAGS="-O"
5086   fi
5087 fi
5088
5089 if test "$ac_env_CXXFLAGS_set" = set; then
5090   CXXFLAGS=$ac_env_CXXFLAGS_value
5091 elif test "${CXXFLAGS+set}" = set; then
5092   : # (keep what template set)
5093 elif test "$enable_coverage" = yes; then
5094   : # no optimization by default
5095 elif test "$GCC" = yes; then
5096   CXXFLAGS="-O2"
5097 else
5098   # if the user selected debug mode, don't use -O
5099   if test "$enable_debug" != yes; then
5100     CXXFLAGS="-O"
5101   fi
5102 fi
5103
5104 # When generating bitcode (for inlining) we always want to use -O2
5105 # even when --enable-debug is specified. The bitcode it's not going to
5106 # be used for line-by-line debugging, and JIT inlining doesn't work
5107 # without at least -O1 (otherwise clang will emit 'noinline'
5108 # attributes everywhere), which is bad for testing.  Still allow the
5109 # environment to override if done explicitly.
5110 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5111   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5112 else
5113   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5114 fi
5115 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5116   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5117 else
5118   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5119 fi
5120
5121 # C[XX]FLAGS we determined above will be added back at the end
5122 user_CFLAGS=$CFLAGS
5123 CFLAGS=""
5124 user_CXXFLAGS=$CXXFLAGS
5125 CXXFLAGS=""
5126 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5127 BITCODE_CFLAGS=""
5128 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5129 BITCODE_CXXFLAGS=""
5130
5131 # set CFLAGS_VECTOR from the environment, if available
5132 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5133   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5134 fi
5135
5136 # Some versions of GCC support some additional useful warning flags.
5137 # Check whether they are supported, and add them to CFLAGS if so.
5138 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5139 # but has its own.  Also check other compiler-specific flags here.
5140
5141 if test "$GCC" = yes -a "$ICC" = no; then
5142   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5143   CXXFLAGS="-Wall -Wpointer-arith"
5144   # These work in some but not all gcc versions
5145
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5147 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5148 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5149   $as_echo_n "(cached) " >&6
5150 else
5151   pgac_save_CFLAGS=$CFLAGS
5152 pgac_save_CC=$CC
5153 CC=${CC}
5154 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5155 ac_save_c_werror_flag=$ac_c_werror_flag
5156 ac_c_werror_flag=yes
5157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5158 /* end confdefs.h.  */
5159
5160 int
5161 main ()
5162 {
5163
5164   ;
5165   return 0;
5166 }
5167 _ACEOF
5168 if ac_fn_c_try_compile "$LINENO"; then :
5169   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5170 else
5171   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5172 fi
5173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5174 ac_c_werror_flag=$ac_save_c_werror_flag
5175 CFLAGS="$pgac_save_CFLAGS"
5176 CC="$pgac_save_CC"
5177 fi
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5179 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5180 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5181   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5182 fi
5183
5184
5185   # -Wdeclaration-after-statement isn't applicable for C++
5186
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5188 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5189 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5190   $as_echo_n "(cached) " >&6
5191 else
5192   pgac_save_CFLAGS=$CFLAGS
5193 pgac_save_CC=$CC
5194 CC=${CC}
5195 CFLAGS="${CFLAGS} -Wendif-labels"
5196 ac_save_c_werror_flag=$ac_c_werror_flag
5197 ac_c_werror_flag=yes
5198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5199 /* end confdefs.h.  */
5200
5201 int
5202 main ()
5203 {
5204
5205   ;
5206   return 0;
5207 }
5208 _ACEOF
5209 if ac_fn_c_try_compile "$LINENO"; then :
5210   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5211 else
5212   pgac_cv_prog_CC_cflags__Wendif_labels=no
5213 fi
5214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5215 ac_c_werror_flag=$ac_save_c_werror_flag
5216 CFLAGS="$pgac_save_CFLAGS"
5217 CC="$pgac_save_CC"
5218 fi
5219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5220 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5221 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5222   CFLAGS="${CFLAGS} -Wendif-labels"
5223 fi
5224
5225
5226   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5227 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5228 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5229   $as_echo_n "(cached) " >&6
5230 else
5231   pgac_save_CXXFLAGS=$CXXFLAGS
5232 pgac_save_CXX=$CXX
5233 CXX=${CXX}
5234 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5235 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5236 ac_cxx_werror_flag=yes
5237 ac_ext=cpp
5238 ac_cpp='$CXXCPP $CPPFLAGS'
5239 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5240 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5241 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5242
5243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5244 /* end confdefs.h.  */
5245
5246 int
5247 main ()
5248 {
5249
5250   ;
5251   return 0;
5252 }
5253 _ACEOF
5254 if ac_fn_cxx_try_compile "$LINENO"; then :
5255   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5256 else
5257   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5258 fi
5259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5260 ac_ext=c
5261 ac_cpp='$CPP $CPPFLAGS'
5262 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5263 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5264 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5265
5266 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5267 CXXFLAGS="$pgac_save_CXXFLAGS"
5268 CXX="$pgac_save_CXX"
5269 fi
5270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5271 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5272 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5273   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5274 fi
5275
5276
5277
5278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5279 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5280 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5281   $as_echo_n "(cached) " >&6
5282 else
5283   pgac_save_CFLAGS=$CFLAGS
5284 pgac_save_CC=$CC
5285 CC=${CC}
5286 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5287 ac_save_c_werror_flag=$ac_c_werror_flag
5288 ac_c_werror_flag=yes
5289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5290 /* end confdefs.h.  */
5291
5292 int
5293 main ()
5294 {
5295
5296   ;
5297   return 0;
5298 }
5299 _ACEOF
5300 if ac_fn_c_try_compile "$LINENO"; then :
5301   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5302 else
5303   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5304 fi
5305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5306 ac_c_werror_flag=$ac_save_c_werror_flag
5307 CFLAGS="$pgac_save_CFLAGS"
5308 CC="$pgac_save_CC"
5309 fi
5310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5311 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5312 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5313   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5314 fi
5315
5316
5317   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5318 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5319 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5320   $as_echo_n "(cached) " >&6
5321 else
5322   pgac_save_CXXFLAGS=$CXXFLAGS
5323 pgac_save_CXX=$CXX
5324 CXX=${CXX}
5325 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5326 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5327 ac_cxx_werror_flag=yes
5328 ac_ext=cpp
5329 ac_cpp='$CXXCPP $CPPFLAGS'
5330 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5331 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5332 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5333
5334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5335 /* end confdefs.h.  */
5336
5337 int
5338 main ()
5339 {
5340
5341   ;
5342   return 0;
5343 }
5344 _ACEOF
5345 if ac_fn_cxx_try_compile "$LINENO"; then :
5346   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5347 else
5348   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5349 fi
5350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5351 ac_ext=c
5352 ac_cpp='$CPP $CPPFLAGS'
5353 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5354 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5355 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5356
5357 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5358 CXXFLAGS="$pgac_save_CXXFLAGS"
5359 CXX="$pgac_save_CXX"
5360 fi
5361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5362 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5363 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5364   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5365 fi
5366
5367
5368   # This was included in -Wall/-Wformat in older GCC versions
5369
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5371 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5372 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5373   $as_echo_n "(cached) " >&6
5374 else
5375   pgac_save_CFLAGS=$CFLAGS
5376 pgac_save_CC=$CC
5377 CC=${CC}
5378 CFLAGS="${CFLAGS} -Wformat-security"
5379 ac_save_c_werror_flag=$ac_c_werror_flag
5380 ac_c_werror_flag=yes
5381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5382 /* end confdefs.h.  */
5383
5384 int
5385 main ()
5386 {
5387
5388   ;
5389   return 0;
5390 }
5391 _ACEOF
5392 if ac_fn_c_try_compile "$LINENO"; then :
5393   pgac_cv_prog_CC_cflags__Wformat_security=yes
5394 else
5395   pgac_cv_prog_CC_cflags__Wformat_security=no
5396 fi
5397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5398 ac_c_werror_flag=$ac_save_c_werror_flag
5399 CFLAGS="$pgac_save_CFLAGS"
5400 CC="$pgac_save_CC"
5401 fi
5402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5403 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5404 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5405   CFLAGS="${CFLAGS} -Wformat-security"
5406 fi
5407
5408
5409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5410 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5411 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5412   $as_echo_n "(cached) " >&6
5413 else
5414   pgac_save_CXXFLAGS=$CXXFLAGS
5415 pgac_save_CXX=$CXX
5416 CXX=${CXX}
5417 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5418 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5419 ac_cxx_werror_flag=yes
5420 ac_ext=cpp
5421 ac_cpp='$CXXCPP $CPPFLAGS'
5422 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5423 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5424 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5425
5426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5427 /* end confdefs.h.  */
5428
5429 int
5430 main ()
5431 {
5432
5433   ;
5434   return 0;
5435 }
5436 _ACEOF
5437 if ac_fn_cxx_try_compile "$LINENO"; then :
5438   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5439 else
5440   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5441 fi
5442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5443 ac_ext=c
5444 ac_cpp='$CPP $CPPFLAGS'
5445 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5446 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5448
5449 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5450 CXXFLAGS="$pgac_save_CXXFLAGS"
5451 CXX="$pgac_save_CXX"
5452 fi
5453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5454 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5455 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5456   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5457 fi
5458
5459
5460   # Disable strict-aliasing rules; needed for gcc 3.3+
5461
5462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5463 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5464 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5465   $as_echo_n "(cached) " >&6
5466 else
5467   pgac_save_CFLAGS=$CFLAGS
5468 pgac_save_CC=$CC
5469 CC=${CC}
5470 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5471 ac_save_c_werror_flag=$ac_c_werror_flag
5472 ac_c_werror_flag=yes
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474 /* end confdefs.h.  */
5475
5476 int
5477 main ()
5478 {
5479
5480   ;
5481   return 0;
5482 }
5483 _ACEOF
5484 if ac_fn_c_try_compile "$LINENO"; then :
5485   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5486 else
5487   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5488 fi
5489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5490 ac_c_werror_flag=$ac_save_c_werror_flag
5491 CFLAGS="$pgac_save_CFLAGS"
5492 CC="$pgac_save_CC"
5493 fi
5494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5495 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5496 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5497   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5498 fi
5499
5500
5501   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5502 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5503 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5504   $as_echo_n "(cached) " >&6
5505 else
5506   pgac_save_CXXFLAGS=$CXXFLAGS
5507 pgac_save_CXX=$CXX
5508 CXX=${CXX}
5509 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5510 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5511 ac_cxx_werror_flag=yes
5512 ac_ext=cpp
5513 ac_cpp='$CXXCPP $CPPFLAGS'
5514 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5515 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5516 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5517
5518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5519 /* end confdefs.h.  */
5520
5521 int
5522 main ()
5523 {
5524
5525   ;
5526   return 0;
5527 }
5528 _ACEOF
5529 if ac_fn_cxx_try_compile "$LINENO"; then :
5530   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5531 else
5532   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5533 fi
5534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5535 ac_ext=c
5536 ac_cpp='$CPP $CPPFLAGS'
5537 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5538 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5539 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5540
5541 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5542 CXXFLAGS="$pgac_save_CXXFLAGS"
5543 CXX="$pgac_save_CXX"
5544 fi
5545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5546 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5547 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5548   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5549 fi
5550
5551
5552   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5553
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5555 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5556 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5557   $as_echo_n "(cached) " >&6
5558 else
5559   pgac_save_CFLAGS=$CFLAGS
5560 pgac_save_CC=$CC
5561 CC=${CC}
5562 CFLAGS="${CFLAGS} -fwrapv"
5563 ac_save_c_werror_flag=$ac_c_werror_flag
5564 ac_c_werror_flag=yes
5565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5566 /* end confdefs.h.  */
5567
5568 int
5569 main ()
5570 {
5571
5572   ;
5573   return 0;
5574 }
5575 _ACEOF
5576 if ac_fn_c_try_compile "$LINENO"; then :
5577   pgac_cv_prog_CC_cflags__fwrapv=yes
5578 else
5579   pgac_cv_prog_CC_cflags__fwrapv=no
5580 fi
5581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5582 ac_c_werror_flag=$ac_save_c_werror_flag
5583 CFLAGS="$pgac_save_CFLAGS"
5584 CC="$pgac_save_CC"
5585 fi
5586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5587 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5588 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5589   CFLAGS="${CFLAGS} -fwrapv"
5590 fi
5591
5592
5593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5594 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5595 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5596   $as_echo_n "(cached) " >&6
5597 else
5598   pgac_save_CXXFLAGS=$CXXFLAGS
5599 pgac_save_CXX=$CXX
5600 CXX=${CXX}
5601 CXXFLAGS="${CXXFLAGS} -fwrapv"
5602 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5603 ac_cxx_werror_flag=yes
5604 ac_ext=cpp
5605 ac_cpp='$CXXCPP $CPPFLAGS'
5606 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5607 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5608 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5609
5610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5611 /* end confdefs.h.  */
5612
5613 int
5614 main ()
5615 {
5616
5617   ;
5618   return 0;
5619 }
5620 _ACEOF
5621 if ac_fn_cxx_try_compile "$LINENO"; then :
5622   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5623 else
5624   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5625 fi
5626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5627 ac_ext=c
5628 ac_cpp='$CPP $CPPFLAGS'
5629 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5630 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5631 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5632
5633 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5634 CXXFLAGS="$pgac_save_CXXFLAGS"
5635 CXX="$pgac_save_CXX"
5636 fi
5637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5638 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5639 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5640   CXXFLAGS="${CXXFLAGS} -fwrapv"
5641 fi
5642
5643
5644   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5645
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5647 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5648 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5649   $as_echo_n "(cached) " >&6
5650 else
5651   pgac_save_CFLAGS=$CFLAGS
5652 pgac_save_CC=$CC
5653 CC=${CC}
5654 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5655 ac_save_c_werror_flag=$ac_c_werror_flag
5656 ac_c_werror_flag=yes
5657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5658 /* end confdefs.h.  */
5659
5660 int
5661 main ()
5662 {
5663
5664   ;
5665   return 0;
5666 }
5667 _ACEOF
5668 if ac_fn_c_try_compile "$LINENO"; then :
5669   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5670 else
5671   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5672 fi
5673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5674 ac_c_werror_flag=$ac_save_c_werror_flag
5675 CFLAGS="$pgac_save_CFLAGS"
5676 CC="$pgac_save_CC"
5677 fi
5678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5679 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5680 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5681   CFLAGS="${CFLAGS} -fexcess-precision=standard"
5682 fi
5683
5684
5685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5686 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5687 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5688   $as_echo_n "(cached) " >&6
5689 else
5690   pgac_save_CXXFLAGS=$CXXFLAGS
5691 pgac_save_CXX=$CXX
5692 CXX=${CXX}
5693 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5694 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5695 ac_cxx_werror_flag=yes
5696 ac_ext=cpp
5697 ac_cpp='$CXXCPP $CPPFLAGS'
5698 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5699 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5700 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5701
5702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5703 /* end confdefs.h.  */
5704
5705 int
5706 main ()
5707 {
5708
5709   ;
5710   return 0;
5711 }
5712 _ACEOF
5713 if ac_fn_cxx_try_compile "$LINENO"; then :
5714   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5715 else
5716   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5717 fi
5718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5719 ac_ext=c
5720 ac_cpp='$CPP $CPPFLAGS'
5721 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5722 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5723 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5724
5725 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5726 CXXFLAGS="$pgac_save_CXXFLAGS"
5727 CXX="$pgac_save_CXX"
5728 fi
5729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5730 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5731 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5732   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5733 fi
5734
5735
5736   # Optimization flags for specific files that benefit from vectorization
5737   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5738 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5739 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5740   $as_echo_n "(cached) " >&6
5741 else
5742   pgac_save_CFLAGS=$CFLAGS
5743 pgac_save_CC=$CC
5744 CC=${CC}
5745 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5746 ac_save_c_werror_flag=$ac_c_werror_flag
5747 ac_c_werror_flag=yes
5748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5749 /* end confdefs.h.  */
5750
5751 int
5752 main ()
5753 {
5754
5755   ;
5756   return 0;
5757 }
5758 _ACEOF
5759 if ac_fn_c_try_compile "$LINENO"; then :
5760   pgac_cv_prog_CC_cflags__funroll_loops=yes
5761 else
5762   pgac_cv_prog_CC_cflags__funroll_loops=no
5763 fi
5764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5765 ac_c_werror_flag=$ac_save_c_werror_flag
5766 CFLAGS="$pgac_save_CFLAGS"
5767 CC="$pgac_save_CC"
5768 fi
5769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5770 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5771 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5772   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5773 fi
5774
5775
5776   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5777 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5778 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5779   $as_echo_n "(cached) " >&6
5780 else
5781   pgac_save_CFLAGS=$CFLAGS
5782 pgac_save_CC=$CC
5783 CC=${CC}
5784 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5785 ac_save_c_werror_flag=$ac_c_werror_flag
5786 ac_c_werror_flag=yes
5787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5788 /* end confdefs.h.  */
5789
5790 int
5791 main ()
5792 {
5793
5794   ;
5795   return 0;
5796 }
5797 _ACEOF
5798 if ac_fn_c_try_compile "$LINENO"; then :
5799   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5800 else
5801   pgac_cv_prog_CC_cflags__ftree_vectorize=no
5802 fi
5803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5804 ac_c_werror_flag=$ac_save_c_werror_flag
5805 CFLAGS="$pgac_save_CFLAGS"
5806 CC="$pgac_save_CC"
5807 fi
5808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5809 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5810 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5811   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5812 fi
5813
5814
5815   # We want to suppress clang's unhelpful unused-command-line-argument warnings
5816   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5817   # test for the positive form and if that works, add the negative form
5818   NOT_THE_CFLAGS=""
5819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5820 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5821 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
5822   $as_echo_n "(cached) " >&6
5823 else
5824   pgac_save_CFLAGS=$CFLAGS
5825 pgac_save_CC=$CC
5826 CC=${CC}
5827 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5828 ac_save_c_werror_flag=$ac_c_werror_flag
5829 ac_c_werror_flag=yes
5830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5831 /* end confdefs.h.  */
5832
5833 int
5834 main ()
5835 {
5836
5837   ;
5838   return 0;
5839 }
5840 _ACEOF
5841 if ac_fn_c_try_compile "$LINENO"; then :
5842   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
5843 else
5844   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
5845 fi
5846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5847 ac_c_werror_flag=$ac_save_c_werror_flag
5848 CFLAGS="$pgac_save_CFLAGS"
5849 CC="$pgac_save_CC"
5850 fi
5851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
5852 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
5853 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
5854   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5855 fi
5856
5857
5858   if test -n "$NOT_THE_CFLAGS"; then
5859     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
5860   fi
5861   # Similarly disable useless truncation warnings from gcc 8+
5862   NOT_THE_CFLAGS=""
5863   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
5864 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
5865 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
5866   $as_echo_n "(cached) " >&6
5867 else
5868   pgac_save_CFLAGS=$CFLAGS
5869 pgac_save_CC=$CC
5870 CC=${CC}
5871 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
5872 ac_save_c_werror_flag=$ac_c_werror_flag
5873 ac_c_werror_flag=yes
5874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5875 /* end confdefs.h.  */
5876
5877 int
5878 main ()
5879 {
5880
5881   ;
5882   return 0;
5883 }
5884 _ACEOF
5885 if ac_fn_c_try_compile "$LINENO"; then :
5886   pgac_cv_prog_CC_cflags__Wformat_truncation=yes
5887 else
5888   pgac_cv_prog_CC_cflags__Wformat_truncation=no
5889 fi
5890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5891 ac_c_werror_flag=$ac_save_c_werror_flag
5892 CFLAGS="$pgac_save_CFLAGS"
5893 CC="$pgac_save_CC"
5894 fi
5895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
5896 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
5897 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
5898   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
5899 fi
5900
5901
5902   if test -n "$NOT_THE_CFLAGS"; then
5903     CFLAGS="$CFLAGS -Wno-format-truncation"
5904   fi
5905   NOT_THE_CFLAGS=""
5906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
5907 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
5908 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
5909   $as_echo_n "(cached) " >&6
5910 else
5911   pgac_save_CFLAGS=$CFLAGS
5912 pgac_save_CC=$CC
5913 CC=${CC}
5914 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
5915 ac_save_c_werror_flag=$ac_c_werror_flag
5916 ac_c_werror_flag=yes
5917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5918 /* end confdefs.h.  */
5919
5920 int
5921 main ()
5922 {
5923
5924   ;
5925   return 0;
5926 }
5927 _ACEOF
5928 if ac_fn_c_try_compile "$LINENO"; then :
5929   pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
5930 else
5931   pgac_cv_prog_CC_cflags__Wstringop_truncation=no
5932 fi
5933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5934 ac_c_werror_flag=$ac_save_c_werror_flag
5935 CFLAGS="$pgac_save_CFLAGS"
5936 CC="$pgac_save_CC"
5937 fi
5938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
5939 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
5940 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
5941   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
5942 fi
5943
5944
5945   if test -n "$NOT_THE_CFLAGS"; then
5946     CFLAGS="$CFLAGS -Wno-stringop-truncation"
5947   fi
5948 elif test "$ICC" = yes; then
5949   # Intel's compiler has a bug/misoptimization in checking for
5950   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
5951
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
5953 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
5954 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
5955   $as_echo_n "(cached) " >&6
5956 else
5957   pgac_save_CFLAGS=$CFLAGS
5958 pgac_save_CC=$CC
5959 CC=${CC}
5960 CFLAGS="${CFLAGS} -mp1"
5961 ac_save_c_werror_flag=$ac_c_werror_flag
5962 ac_c_werror_flag=yes
5963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5964 /* end confdefs.h.  */
5965
5966 int
5967 main ()
5968 {
5969
5970   ;
5971   return 0;
5972 }
5973 _ACEOF
5974 if ac_fn_c_try_compile "$LINENO"; then :
5975   pgac_cv_prog_CC_cflags__mp1=yes
5976 else
5977   pgac_cv_prog_CC_cflags__mp1=no
5978 fi
5979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5980 ac_c_werror_flag=$ac_save_c_werror_flag
5981 CFLAGS="$pgac_save_CFLAGS"
5982 CC="$pgac_save_CC"
5983 fi
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
5985 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
5986 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
5987   CFLAGS="${CFLAGS} -mp1"
5988 fi
5989
5990
5991   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
5992 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
5993 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
5994   $as_echo_n "(cached) " >&6
5995 else
5996   pgac_save_CXXFLAGS=$CXXFLAGS
5997 pgac_save_CXX=$CXX
5998 CXX=${CXX}
5999 CXXFLAGS="${CXXFLAGS} -mp1"
6000 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6001 ac_cxx_werror_flag=yes
6002 ac_ext=cpp
6003 ac_cpp='$CXXCPP $CPPFLAGS'
6004 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6005 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6006 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6007
6008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6009 /* end confdefs.h.  */
6010
6011 int
6012 main ()
6013 {
6014
6015   ;
6016   return 0;
6017 }
6018 _ACEOF
6019 if ac_fn_cxx_try_compile "$LINENO"; then :
6020   pgac_cv_prog_CXX_cxxflags__mp1=yes
6021 else
6022   pgac_cv_prog_CXX_cxxflags__mp1=no
6023 fi
6024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6025 ac_ext=c
6026 ac_cpp='$CPP $CPPFLAGS'
6027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6030
6031 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6032 CXXFLAGS="$pgac_save_CXXFLAGS"
6033 CXX="$pgac_save_CXX"
6034 fi
6035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6036 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6037 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6038   CXXFLAGS="${CXXFLAGS} -mp1"
6039 fi
6040
6041
6042   # Make sure strict aliasing is off (though this is said to be the default)
6043
6044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6045 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6046 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6047   $as_echo_n "(cached) " >&6
6048 else
6049   pgac_save_CFLAGS=$CFLAGS
6050 pgac_save_CC=$CC
6051 CC=${CC}
6052 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6053 ac_save_c_werror_flag=$ac_c_werror_flag
6054 ac_c_werror_flag=yes
6055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6056 /* end confdefs.h.  */
6057
6058 int
6059 main ()
6060 {
6061
6062   ;
6063   return 0;
6064 }
6065 _ACEOF
6066 if ac_fn_c_try_compile "$LINENO"; then :
6067   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6068 else
6069   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6070 fi
6071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6072 ac_c_werror_flag=$ac_save_c_werror_flag
6073 CFLAGS="$pgac_save_CFLAGS"
6074 CC="$pgac_save_CC"
6075 fi
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6077 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6078 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6079   CFLAGS="${CFLAGS} -fno-strict-aliasing"
6080 fi
6081
6082
6083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6084 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6085 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6086   $as_echo_n "(cached) " >&6
6087 else
6088   pgac_save_CXXFLAGS=$CXXFLAGS
6089 pgac_save_CXX=$CXX
6090 CXX=${CXX}
6091 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6092 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6093 ac_cxx_werror_flag=yes
6094 ac_ext=cpp
6095 ac_cpp='$CXXCPP $CPPFLAGS'
6096 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6097 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6098 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6099
6100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6101 /* end confdefs.h.  */
6102
6103 int
6104 main ()
6105 {
6106
6107   ;
6108   return 0;
6109 }
6110 _ACEOF
6111 if ac_fn_cxx_try_compile "$LINENO"; then :
6112   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6113 else
6114   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6115 fi
6116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6117 ac_ext=c
6118 ac_cpp='$CPP $CPPFLAGS'
6119 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6120 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6121 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6122
6123 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6124 CXXFLAGS="$pgac_save_CXXFLAGS"
6125 CXX="$pgac_save_CXX"
6126 fi
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6128 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6129 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6130   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6131 fi
6132
6133
6134 elif test "$PORTNAME" = "aix"; then
6135   # AIX's xlc has to have strict aliasing turned off too
6136
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6138 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6139 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6140   $as_echo_n "(cached) " >&6
6141 else
6142   pgac_save_CFLAGS=$CFLAGS
6143 pgac_save_CC=$CC
6144 CC=${CC}
6145 CFLAGS="${CFLAGS} -qnoansialias"
6146 ac_save_c_werror_flag=$ac_c_werror_flag
6147 ac_c_werror_flag=yes
6148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6149 /* end confdefs.h.  */
6150
6151 int
6152 main ()
6153 {
6154
6155   ;
6156   return 0;
6157 }
6158 _ACEOF
6159 if ac_fn_c_try_compile "$LINENO"; then :
6160   pgac_cv_prog_CC_cflags__qnoansialias=yes
6161 else
6162   pgac_cv_prog_CC_cflags__qnoansialias=no
6163 fi
6164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6165 ac_c_werror_flag=$ac_save_c_werror_flag
6166 CFLAGS="$pgac_save_CFLAGS"
6167 CC="$pgac_save_CC"
6168 fi
6169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6170 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6171 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6172   CFLAGS="${CFLAGS} -qnoansialias"
6173 fi
6174
6175
6176   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6177 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6178 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6179   $as_echo_n "(cached) " >&6
6180 else
6181   pgac_save_CXXFLAGS=$CXXFLAGS
6182 pgac_save_CXX=$CXX
6183 CXX=${CXX}
6184 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6185 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6186 ac_cxx_werror_flag=yes
6187 ac_ext=cpp
6188 ac_cpp='$CXXCPP $CPPFLAGS'
6189 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6190 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6191 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6192
6193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6194 /* end confdefs.h.  */
6195
6196 int
6197 main ()
6198 {
6199
6200   ;
6201   return 0;
6202 }
6203 _ACEOF
6204 if ac_fn_cxx_try_compile "$LINENO"; then :
6205   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6206 else
6207   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6208 fi
6209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6210 ac_ext=c
6211 ac_cpp='$CPP $CPPFLAGS'
6212 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6213 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6214 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6215
6216 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6217 CXXFLAGS="$pgac_save_CXXFLAGS"
6218 CXX="$pgac_save_CXX"
6219 fi
6220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6221 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6222 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6223   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6224 fi
6225
6226
6227
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6229 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6230 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6231   $as_echo_n "(cached) " >&6
6232 else
6233   pgac_save_CFLAGS=$CFLAGS
6234 pgac_save_CC=$CC
6235 CC=${CC}
6236 CFLAGS="${CFLAGS} -qlonglong"
6237 ac_save_c_werror_flag=$ac_c_werror_flag
6238 ac_c_werror_flag=yes
6239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6240 /* end confdefs.h.  */
6241
6242 int
6243 main ()
6244 {
6245
6246   ;
6247   return 0;
6248 }
6249 _ACEOF
6250 if ac_fn_c_try_compile "$LINENO"; then :
6251   pgac_cv_prog_CC_cflags__qlonglong=yes
6252 else
6253   pgac_cv_prog_CC_cflags__qlonglong=no
6254 fi
6255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6256 ac_c_werror_flag=$ac_save_c_werror_flag
6257 CFLAGS="$pgac_save_CFLAGS"
6258 CC="$pgac_save_CC"
6259 fi
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6261 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6262 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6263   CFLAGS="${CFLAGS} -qlonglong"
6264 fi
6265
6266
6267   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6268 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6269 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6270   $as_echo_n "(cached) " >&6
6271 else
6272   pgac_save_CXXFLAGS=$CXXFLAGS
6273 pgac_save_CXX=$CXX
6274 CXX=${CXX}
6275 CXXFLAGS="${CXXFLAGS} -qlonglong"
6276 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6277 ac_cxx_werror_flag=yes
6278 ac_ext=cpp
6279 ac_cpp='$CXXCPP $CPPFLAGS'
6280 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6281 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6282 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6283
6284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6285 /* end confdefs.h.  */
6286
6287 int
6288 main ()
6289 {
6290
6291   ;
6292   return 0;
6293 }
6294 _ACEOF
6295 if ac_fn_cxx_try_compile "$LINENO"; then :
6296   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6297 else
6298   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6299 fi
6300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6301 ac_ext=c
6302 ac_cpp='$CPP $CPPFLAGS'
6303 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6304 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6305 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6306
6307 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6308 CXXFLAGS="$pgac_save_CXXFLAGS"
6309 CXX="$pgac_save_CXX"
6310 fi
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6312 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6313 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6314   CXXFLAGS="${CXXFLAGS} -qlonglong"
6315 fi
6316
6317
6318 elif test "$PORTNAME" = "hpux"; then
6319   # On some versions of HP-UX, libm functions do not set errno by default.
6320   # Fix that by using +Olibmerrno if the compiler recognizes it.
6321
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6323 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6324 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6325   $as_echo_n "(cached) " >&6
6326 else
6327   pgac_save_CFLAGS=$CFLAGS
6328 pgac_save_CC=$CC
6329 CC=${CC}
6330 CFLAGS="${CFLAGS} +Olibmerrno"
6331 ac_save_c_werror_flag=$ac_c_werror_flag
6332 ac_c_werror_flag=yes
6333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6334 /* end confdefs.h.  */
6335
6336 int
6337 main ()
6338 {
6339
6340   ;
6341   return 0;
6342 }
6343 _ACEOF
6344 if ac_fn_c_try_compile "$LINENO"; then :
6345   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6346 else
6347   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6348 fi
6349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6350 ac_c_werror_flag=$ac_save_c_werror_flag
6351 CFLAGS="$pgac_save_CFLAGS"
6352 CC="$pgac_save_CC"
6353 fi
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6355 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6356 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6357   CFLAGS="${CFLAGS} +Olibmerrno"
6358 fi
6359
6360
6361   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6362 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6363 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6364   $as_echo_n "(cached) " >&6
6365 else
6366   pgac_save_CXXFLAGS=$CXXFLAGS
6367 pgac_save_CXX=$CXX
6368 CXX=${CXX}
6369 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6370 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6371 ac_cxx_werror_flag=yes
6372 ac_ext=cpp
6373 ac_cpp='$CXXCPP $CPPFLAGS'
6374 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6375 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6376 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6377
6378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6379 /* end confdefs.h.  */
6380
6381 int
6382 main ()
6383 {
6384
6385   ;
6386   return 0;
6387 }
6388 _ACEOF
6389 if ac_fn_cxx_try_compile "$LINENO"; then :
6390   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6391 else
6392   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6393 fi
6394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6395 ac_ext=c
6396 ac_cpp='$CPP $CPPFLAGS'
6397 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6398 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6399 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6400
6401 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6402 CXXFLAGS="$pgac_save_CXXFLAGS"
6403 CXX="$pgac_save_CXX"
6404 fi
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6406 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6407 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6408   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6409 fi
6410
6411
6412 fi
6413
6414 CFLAGS_VECTOR=$CFLAGS_VECTOR
6415
6416
6417 # Determine flags used to emit bitcode for JIT inlining. Need to test
6418 # for behaviour changing compiler flags, to keep compatibility with
6419 # compiler used for normal postgres code.
6420 if test "$with_llvm" = yes ; then
6421   CLANGXX="$CLANG -xc++"
6422
6423   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6424 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6425 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6426   $as_echo_n "(cached) " >&6
6427 else
6428   pgac_save_CFLAGS=$CFLAGS
6429 pgac_save_CC=$CC
6430 CC=${CLANG}
6431 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6432 ac_save_c_werror_flag=$ac_c_werror_flag
6433 ac_c_werror_flag=yes
6434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6435 /* end confdefs.h.  */
6436
6437 int
6438 main ()
6439 {
6440
6441   ;
6442   return 0;
6443 }
6444 _ACEOF
6445 if ac_fn_c_try_compile "$LINENO"; then :
6446   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6447 else
6448   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6449 fi
6450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6451 ac_c_werror_flag=$ac_save_c_werror_flag
6452 CFLAGS="$pgac_save_CFLAGS"
6453 CC="$pgac_save_CC"
6454 fi
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6456 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6457 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6458   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6459 fi
6460
6461   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6462 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6463 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6464   $as_echo_n "(cached) " >&6
6465 else
6466   pgac_save_CXXFLAGS=$CXXFLAGS
6467 pgac_save_CXX=$CXX
6468 CXX=${CLANGXX}
6469 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6470 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6471 ac_cxx_werror_flag=yes
6472 ac_ext=cpp
6473 ac_cpp='$CXXCPP $CPPFLAGS'
6474 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6475 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6476 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6477
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479 /* end confdefs.h.  */
6480
6481 int
6482 main ()
6483 {
6484
6485   ;
6486   return 0;
6487 }
6488 _ACEOF
6489 if ac_fn_cxx_try_compile "$LINENO"; then :
6490   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6491 else
6492   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6493 fi
6494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6495 ac_ext=c
6496 ac_cpp='$CPP $CPPFLAGS'
6497 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6498 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6499 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6500
6501 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6502 CXXFLAGS="$pgac_save_CXXFLAGS"
6503 CXX="$pgac_save_CXX"
6504 fi
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6506 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6507 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6508   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6509 fi
6510
6511   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6512 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6513 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6514   $as_echo_n "(cached) " >&6
6515 else
6516   pgac_save_CFLAGS=$CFLAGS
6517 pgac_save_CC=$CC
6518 CC=${CLANG}
6519 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6520 ac_save_c_werror_flag=$ac_c_werror_flag
6521 ac_c_werror_flag=yes
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_c_try_compile "$LINENO"; then :
6534   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6535 else
6536   pgac_cv_prog_CLANG_cflags__fwrapv=no
6537 fi
6538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6539 ac_c_werror_flag=$ac_save_c_werror_flag
6540 CFLAGS="$pgac_save_CFLAGS"
6541 CC="$pgac_save_CC"
6542 fi
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6544 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6545 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6546   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6547 fi
6548
6549   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6550 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6551 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6552   $as_echo_n "(cached) " >&6
6553 else
6554   pgac_save_CXXFLAGS=$CXXFLAGS
6555 pgac_save_CXX=$CXX
6556 CXX=${CLANGXX}
6557 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6558 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6559 ac_cxx_werror_flag=yes
6560 ac_ext=cpp
6561 ac_cpp='$CXXCPP $CPPFLAGS'
6562 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6563 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6564 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6565
6566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6567 /* end confdefs.h.  */
6568
6569 int
6570 main ()
6571 {
6572
6573   ;
6574   return 0;
6575 }
6576 _ACEOF
6577 if ac_fn_cxx_try_compile "$LINENO"; then :
6578   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6579 else
6580   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6581 fi
6582 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6583 ac_ext=c
6584 ac_cpp='$CPP $CPPFLAGS'
6585 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6586 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6587 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6588
6589 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6590 CXXFLAGS="$pgac_save_CXXFLAGS"
6591 CXX="$pgac_save_CXX"
6592 fi
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6594 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6595 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6596   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6597 fi
6598
6599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6600 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6601 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6602   $as_echo_n "(cached) " >&6
6603 else
6604   pgac_save_CFLAGS=$CFLAGS
6605 pgac_save_CC=$CC
6606 CC=${CLANG}
6607 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6608 ac_save_c_werror_flag=$ac_c_werror_flag
6609 ac_c_werror_flag=yes
6610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6611 /* end confdefs.h.  */
6612
6613 int
6614 main ()
6615 {
6616
6617   ;
6618   return 0;
6619 }
6620 _ACEOF
6621 if ac_fn_c_try_compile "$LINENO"; then :
6622   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6623 else
6624   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6625 fi
6626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6627 ac_c_werror_flag=$ac_save_c_werror_flag
6628 CFLAGS="$pgac_save_CFLAGS"
6629 CC="$pgac_save_CC"
6630 fi
6631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6632 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6633 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6634   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6635 fi
6636
6637   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6638 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6639 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6640   $as_echo_n "(cached) " >&6
6641 else
6642   pgac_save_CXXFLAGS=$CXXFLAGS
6643 pgac_save_CXX=$CXX
6644 CXX=${CLANGXX}
6645 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6646 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6647 ac_cxx_werror_flag=yes
6648 ac_ext=cpp
6649 ac_cpp='$CXXCPP $CPPFLAGS'
6650 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6651 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6652 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6653
6654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6655 /* end confdefs.h.  */
6656
6657 int
6658 main ()
6659 {
6660
6661   ;
6662   return 0;
6663 }
6664 _ACEOF
6665 if ac_fn_cxx_try_compile "$LINENO"; then :
6666   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6667 else
6668   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6669 fi
6670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6671 ac_ext=c
6672 ac_cpp='$CPP $CPPFLAGS'
6673 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6674 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6675 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6676
6677 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6678 CXXFLAGS="$pgac_save_CXXFLAGS"
6679 CXX="$pgac_save_CXX"
6680 fi
6681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6682 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6683 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6684   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6685 fi
6686
6687 fi
6688
6689 # supply -g if --enable-debug
6690 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6691   CFLAGS="$CFLAGS -g"
6692 fi
6693
6694 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6695   CXXFLAGS="$CXXFLAGS -g"
6696 fi
6697
6698 # enable code coverage if --enable-coverage
6699 if test "$enable_coverage" = yes; then
6700   if test "$GCC" = yes; then
6701     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6702     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6703   else
6704     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6705   fi
6706 fi
6707
6708 # enable profiling if --enable-profiling
6709 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6710   if test "$GCC" = yes; then
6711
6712 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6713
6714     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6715     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6716   else
6717     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6718   fi
6719 fi
6720
6721 # We already have this in Makefile.win32, but configure needs it too
6722 if test "$PORTNAME" = "win32"; then
6723   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6724 fi
6725
6726 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6727 # user-specified flags (if any) at the end.  This lets users override
6728 # the automatic additions.
6729 CFLAGS="$CFLAGS $user_CFLAGS"
6730 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6731 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6732 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6733
6734 BITCODE_CFLAGS=$BITCODE_CFLAGS
6735
6736 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6737
6738
6739 # Check if the compiler still works with the final flag settings
6740 # (note, we're not checking that for CXX, which is optional)
6741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6742 $as_echo_n "checking whether the C compiler still works... " >&6; }
6743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6744 /* end confdefs.h.  */
6745
6746 int
6747 main ()
6748 {
6749 return 0;
6750   ;
6751   return 0;
6752 }
6753 _ACEOF
6754 if ac_fn_c_try_link "$LINENO"; then :
6755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6756 $as_echo "yes" >&6; }
6757 else
6758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6759 $as_echo "no" >&6; }
6760    as_fn_error $? "cannot proceed" "$LINENO" 5
6761 fi
6762 rm -f core conftest.err conftest.$ac_objext \
6763     conftest$ac_exeext conftest.$ac_ext
6764
6765 # Defend against gcc -ffast-math
6766 if test "$GCC" = yes; then
6767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6768 /* end confdefs.h.  */
6769
6770 int
6771 main ()
6772 {
6773 #ifdef __FAST_MATH__
6774 choke me
6775 #endif
6776   ;
6777   return 0;
6778 }
6779 _ACEOF
6780 if ac_fn_c_try_compile "$LINENO"; then :
6781
6782 else
6783   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6784 fi
6785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6786 fi
6787
6788 ac_ext=c
6789 ac_cpp='$CPP $CPPFLAGS'
6790 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6791 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6792 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6794 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6795 # On Suns, sometimes $CPP names a directory.
6796 if test -n "$CPP" && test -d "$CPP"; then
6797   CPP=
6798 fi
6799 if test -z "$CPP"; then
6800   if ${ac_cv_prog_CPP+:} false; then :
6801   $as_echo_n "(cached) " >&6
6802 else
6803       # Double quotes because CPP needs to be expanded
6804     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6805     do
6806       ac_preproc_ok=false
6807 for ac_c_preproc_warn_flag in '' yes
6808 do
6809   # Use a header file that comes with gcc, so configuring glibc
6810   # with a fresh cross-compiler works.
6811   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6812   # <limits.h> exists even on freestanding compilers.
6813   # On the NeXT, cc -E runs the code through the compiler's parser,
6814   # not just through cpp. "Syntax error" is here to catch this case.
6815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6816 /* end confdefs.h.  */
6817 #ifdef __STDC__
6818 # include <limits.h>
6819 #else
6820 # include <assert.h>
6821 #endif
6822                      Syntax error
6823 _ACEOF
6824 if ac_fn_c_try_cpp "$LINENO"; then :
6825
6826 else
6827   # Broken: fails on valid input.
6828 continue
6829 fi
6830 rm -f conftest.err conftest.i conftest.$ac_ext
6831
6832   # OK, works on sane cases.  Now check whether nonexistent headers
6833   # can be detected and how.
6834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6835 /* end confdefs.h.  */
6836 #include <ac_nonexistent.h>
6837 _ACEOF
6838 if ac_fn_c_try_cpp "$LINENO"; then :
6839   # Broken: success on invalid input.
6840 continue
6841 else
6842   # Passes both tests.
6843 ac_preproc_ok=:
6844 break
6845 fi
6846 rm -f conftest.err conftest.i conftest.$ac_ext
6847
6848 done
6849 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6850 rm -f conftest.i conftest.err conftest.$ac_ext
6851 if $ac_preproc_ok; then :
6852   break
6853 fi
6854
6855     done
6856     ac_cv_prog_CPP=$CPP
6857
6858 fi
6859   CPP=$ac_cv_prog_CPP
6860 else
6861   ac_cv_prog_CPP=$CPP
6862 fi
6863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6864 $as_echo "$CPP" >&6; }
6865 ac_preproc_ok=false
6866 for ac_c_preproc_warn_flag in '' yes
6867 do
6868   # Use a header file that comes with gcc, so configuring glibc
6869   # with a fresh cross-compiler works.
6870   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6871   # <limits.h> exists even on freestanding compilers.
6872   # On the NeXT, cc -E runs the code through the compiler's parser,
6873   # not just through cpp. "Syntax error" is here to catch this case.
6874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6875 /* end confdefs.h.  */
6876 #ifdef __STDC__
6877 # include <limits.h>
6878 #else
6879 # include <assert.h>
6880 #endif
6881                      Syntax error
6882 _ACEOF
6883 if ac_fn_c_try_cpp "$LINENO"; then :
6884
6885 else
6886   # Broken: fails on valid input.
6887 continue
6888 fi
6889 rm -f conftest.err conftest.i conftest.$ac_ext
6890
6891   # OK, works on sane cases.  Now check whether nonexistent headers
6892   # can be detected and how.
6893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6894 /* end confdefs.h.  */
6895 #include <ac_nonexistent.h>
6896 _ACEOF
6897 if ac_fn_c_try_cpp "$LINENO"; then :
6898   # Broken: success on invalid input.
6899 continue
6900 else
6901   # Passes both tests.
6902 ac_preproc_ok=:
6903 break
6904 fi
6905 rm -f conftest.err conftest.i conftest.$ac_ext
6906
6907 done
6908 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6909 rm -f conftest.i conftest.err conftest.$ac_ext
6910 if $ac_preproc_ok; then :
6911
6912 else
6913   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6914 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6915 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6916 See \`config.log' for more details" "$LINENO" 5; }
6917 fi
6918
6919 ac_ext=c
6920 ac_cpp='$CPP $CPPFLAGS'
6921 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6922 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6923 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6924
6925
6926
6927
6928 #
6929 # Set up TAS assembly code if needed; the template file has now had its
6930 # chance to request this.
6931 #
6932 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
6933
6934
6935 if test "$need_tas" = yes ; then
6936   TAS=tas.o
6937 else
6938   TAS=""
6939 fi
6940
6941
6942
6943 #
6944 # Automatic dependency tracking
6945 #
6946
6947
6948 # Check whether --enable-depend was given.
6949 if test "${enable_depend+set}" = set; then :
6950   enableval=$enable_depend;
6951   case $enableval in
6952     yes)
6953       autodepend=yes
6954       ;;
6955     no)
6956       :
6957       ;;
6958     *)
6959       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
6960       ;;
6961   esac
6962
6963 else
6964   enable_depend=no
6965
6966 fi
6967
6968
6969
6970
6971
6972 #
6973 # Enable assert checks
6974 #
6975
6976
6977 # Check whether --enable-cassert was given.
6978 if test "${enable_cassert+set}" = set; then :
6979   enableval=$enable_cassert;
6980   case $enableval in
6981     yes)
6982
6983 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
6984
6985       ;;
6986     no)
6987       :
6988       ;;
6989     *)
6990       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
6991       ;;
6992   esac
6993
6994 else
6995   enable_cassert=no
6996
6997 fi
6998
6999
7000
7001
7002 #
7003 # Include directories
7004 #
7005 ac_save_IFS=$IFS
7006 IFS="${IFS}${PATH_SEPARATOR}"
7007 # SRCH_INC comes from the template file
7008 for dir in $with_includes $SRCH_INC; do
7009   if test -d "$dir"; then
7010     INCLUDES="$INCLUDES -I$dir"
7011   else
7012     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7013 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7014   fi
7015 done
7016 IFS=$ac_save_IFS
7017
7018
7019
7020 #
7021 # Library directories
7022 #
7023 ac_save_IFS=$IFS
7024 IFS="${IFS}${PATH_SEPARATOR}"
7025 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7026 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7027   if test -d "$dir"; then
7028     LIBDIRS="$LIBDIRS -L$dir"
7029   else
7030     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7031 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7032   fi
7033 done
7034 IFS=$ac_save_IFS
7035
7036 #
7037 # Enable thread-safe client libraries
7038 #
7039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7040 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7041
7042
7043 # Check whether --enable-thread-safety was given.
7044 if test "${enable_thread_safety+set}" = set; then :
7045   enableval=$enable_thread_safety;
7046   case $enableval in
7047     yes)
7048       :
7049       ;;
7050     no)
7051       :
7052       ;;
7053     *)
7054       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7055       ;;
7056   esac
7057
7058 else
7059   enable_thread_safety=yes
7060
7061 fi
7062
7063
7064 if test "$enable_thread_safety" = yes; then
7065
7066 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7067
7068 fi
7069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7070 $as_echo "$enable_thread_safety" >&6; }
7071
7072
7073 #
7074 # ICU
7075 #
7076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7077 $as_echo_n "checking whether to build with ICU support... " >&6; }
7078
7079
7080
7081 # Check whether --with-icu was given.
7082 if test "${with_icu+set}" = set; then :
7083   withval=$with_icu;
7084   case $withval in
7085     yes)
7086
7087 $as_echo "#define USE_ICU 1" >>confdefs.h
7088
7089       ;;
7090     no)
7091       :
7092       ;;
7093     *)
7094       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7095       ;;
7096   esac
7097
7098 else
7099   with_icu=no
7100
7101 fi
7102
7103
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7105 $as_echo "$with_icu" >&6; }
7106
7107
7108 if test "$with_icu" = yes; then
7109
7110
7111
7112
7113
7114
7115
7116 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7117         if test -n "$ac_tool_prefix"; then
7118   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7119 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7121 $as_echo_n "checking for $ac_word... " >&6; }
7122 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7123   $as_echo_n "(cached) " >&6
7124 else
7125   case $PKG_CONFIG in
7126   [\\/]* | ?:[\\/]*)
7127   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7128   ;;
7129   *)
7130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7131 for as_dir in $PATH
7132 do
7133   IFS=$as_save_IFS
7134   test -z "$as_dir" && as_dir=.
7135     for ac_exec_ext in '' $ac_executable_extensions; do
7136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7137     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7139     break 2
7140   fi
7141 done
7142   done
7143 IFS=$as_save_IFS
7144
7145   ;;
7146 esac
7147 fi
7148 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7149 if test -n "$PKG_CONFIG"; then
7150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7151 $as_echo "$PKG_CONFIG" >&6; }
7152 else
7153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154 $as_echo "no" >&6; }
7155 fi
7156
7157
7158 fi
7159 if test -z "$ac_cv_path_PKG_CONFIG"; then
7160   ac_pt_PKG_CONFIG=$PKG_CONFIG
7161   # Extract the first word of "pkg-config", so it can be a program name with args.
7162 set dummy pkg-config; ac_word=$2
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7164 $as_echo_n "checking for $ac_word... " >&6; }
7165 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7166   $as_echo_n "(cached) " >&6
7167 else
7168   case $ac_pt_PKG_CONFIG in
7169   [\\/]* | ?:[\\/]*)
7170   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7171   ;;
7172   *)
7173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7174 for as_dir in $PATH
7175 do
7176   IFS=$as_save_IFS
7177   test -z "$as_dir" && as_dir=.
7178     for ac_exec_ext in '' $ac_executable_extensions; do
7179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7180     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7182     break 2
7183   fi
7184 done
7185   done
7186 IFS=$as_save_IFS
7187
7188   ;;
7189 esac
7190 fi
7191 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7192 if test -n "$ac_pt_PKG_CONFIG"; then
7193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7194 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7195 else
7196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7197 $as_echo "no" >&6; }
7198 fi
7199
7200   if test "x$ac_pt_PKG_CONFIG" = x; then
7201     PKG_CONFIG=""
7202   else
7203     case $cross_compiling:$ac_tool_warned in
7204 yes:)
7205 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7206 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7207 ac_tool_warned=yes ;;
7208 esac
7209     PKG_CONFIG=$ac_pt_PKG_CONFIG
7210   fi
7211 else
7212   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7213 fi
7214
7215 fi
7216 if test -n "$PKG_CONFIG"; then
7217         _pkg_min_version=0.9.0
7218         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7219 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7220         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7221                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7222 $as_echo "yes" >&6; }
7223         else
7224                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7225 $as_echo "no" >&6; }
7226                 PKG_CONFIG=""
7227         fi
7228 fi
7229
7230 pkg_failed=no
7231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7232 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7233
7234 if test -n "$ICU_CFLAGS"; then
7235     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7236  elif test -n "$PKG_CONFIG"; then
7237     if test -n "$PKG_CONFIG" && \
7238     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7239   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7240   ac_status=$?
7241   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7242   test $ac_status = 0; }; then
7243   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7244                       test "x$?" != "x0" && pkg_failed=yes
7245 else
7246   pkg_failed=yes
7247 fi
7248  else
7249     pkg_failed=untried
7250 fi
7251 if test -n "$ICU_LIBS"; then
7252     pkg_cv_ICU_LIBS="$ICU_LIBS"
7253  elif test -n "$PKG_CONFIG"; then
7254     if test -n "$PKG_CONFIG" && \
7255     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7256   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7257   ac_status=$?
7258   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7259   test $ac_status = 0; }; then
7260   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7261                       test "x$?" != "x0" && pkg_failed=yes
7262 else
7263   pkg_failed=yes
7264 fi
7265  else
7266     pkg_failed=untried
7267 fi
7268
7269
7270
7271 if test $pkg_failed = yes; then
7272         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7273 $as_echo "no" >&6; }
7274
7275 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7276         _pkg_short_errors_supported=yes
7277 else
7278         _pkg_short_errors_supported=no
7279 fi
7280         if test $_pkg_short_errors_supported = yes; then
7281                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7282         else
7283                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7284         fi
7285         # Put the nasty error message in config.log where it belongs
7286         echo "$ICU_PKG_ERRORS" >&5
7287
7288         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7289
7290 $ICU_PKG_ERRORS
7291
7292 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7293 installed software in a non-standard prefix.
7294
7295 Alternatively, you may set the environment variables ICU_CFLAGS
7296 and ICU_LIBS to avoid the need to call pkg-config.
7297 See the pkg-config man page for more details." "$LINENO" 5
7298 elif test $pkg_failed = untried; then
7299         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7300 $as_echo "no" >&6; }
7301         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7302 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7303 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7304 is in your PATH or set the PKG_CONFIG environment variable to the full
7305 path to pkg-config.
7306
7307 Alternatively, you may set the environment variables ICU_CFLAGS
7308 and ICU_LIBS to avoid the need to call pkg-config.
7309 See the pkg-config man page for more details.
7310
7311 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7312 See \`config.log' for more details" "$LINENO" 5; }
7313 else
7314         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7315         ICU_LIBS=$pkg_cv_ICU_LIBS
7316         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7317 $as_echo "yes" >&6; }
7318
7319 fi
7320 fi
7321
7322 #
7323 # Optionally build Tcl modules (PL/Tcl)
7324 #
7325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7326 $as_echo_n "checking whether to build with Tcl... " >&6; }
7327
7328
7329
7330 # Check whether --with-tcl was given.
7331 if test "${with_tcl+set}" = set; then :
7332   withval=$with_tcl;
7333   case $withval in
7334     yes)
7335       :
7336       ;;
7337     no)
7338       :
7339       ;;
7340     *)
7341       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7342       ;;
7343   esac
7344
7345 else
7346   with_tcl=no
7347
7348 fi
7349
7350
7351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7352 $as_echo "$with_tcl" >&6; }
7353
7354
7355 # We see if the path to the Tcl/Tk configuration scripts is specified.
7356 # This will override the use of tclsh to find the paths to search.
7357
7358
7359
7360
7361 # Check whether --with-tclconfig was given.
7362 if test "${with_tclconfig+set}" = set; then :
7363   withval=$with_tclconfig;
7364   case $withval in
7365     yes)
7366       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7367       ;;
7368     no)
7369       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7370       ;;
7371     *)
7372
7373       ;;
7374   esac
7375
7376 fi
7377
7378
7379
7380 #
7381 # Optionally build Perl modules (PL/Perl)
7382 #
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7384 $as_echo_n "checking whether to build Perl modules... " >&6; }
7385
7386
7387
7388 # Check whether --with-perl was given.
7389 if test "${with_perl+set}" = set; then :
7390   withval=$with_perl;
7391   case $withval in
7392     yes)
7393       :
7394       ;;
7395     no)
7396       :
7397       ;;
7398     *)
7399       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7400       ;;
7401   esac
7402
7403 else
7404   with_perl=no
7405
7406 fi
7407
7408
7409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7410 $as_echo "$with_perl" >&6; }
7411
7412
7413 #
7414 # Optionally build Python modules (PL/Python)
7415 #
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7417 $as_echo_n "checking whether to build Python modules... " >&6; }
7418
7419
7420
7421 # Check whether --with-python was given.
7422 if test "${with_python+set}" = set; then :
7423   withval=$with_python;
7424   case $withval in
7425     yes)
7426       :
7427       ;;
7428     no)
7429       :
7430       ;;
7431     *)
7432       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7433       ;;
7434   esac
7435
7436 else
7437   with_python=no
7438
7439 fi
7440
7441
7442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7443 $as_echo "$with_python" >&6; }
7444
7445
7446 #
7447 # GSSAPI
7448 #
7449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7450 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7451
7452
7453
7454 # Check whether --with-gssapi was given.
7455 if test "${with_gssapi+set}" = set; then :
7456   withval=$with_gssapi;
7457   case $withval in
7458     yes)
7459
7460
7461 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7462
7463   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7464
7465       ;;
7466     no)
7467       :
7468       ;;
7469     *)
7470       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7471       ;;
7472   esac
7473
7474 else
7475   with_gssapi=no
7476
7477 fi
7478
7479
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7481 $as_echo "$with_gssapi" >&6; }
7482
7483
7484
7485
7486
7487
7488 #
7489 # Kerberos configuration parameters
7490 #
7491
7492
7493
7494 # Check whether --with-krb-srvnam was given.
7495 if test "${with_krb_srvnam+set}" = set; then :
7496   withval=$with_krb_srvnam;
7497   case $withval in
7498     yes)
7499       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7500       ;;
7501     no)
7502       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7503       ;;
7504     *)
7505
7506       ;;
7507   esac
7508
7509 else
7510   with_krb_srvnam="postgres"
7511 fi
7512
7513
7514
7515
7516 cat >>confdefs.h <<_ACEOF
7517 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7518 _ACEOF
7519
7520
7521
7522 #
7523 # PAM
7524 #
7525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7526 $as_echo_n "checking whether to build with PAM support... " >&6; }
7527
7528
7529
7530 # Check whether --with-pam was given.
7531 if test "${with_pam+set}" = set; then :
7532   withval=$with_pam;
7533   case $withval in
7534     yes)
7535
7536 $as_echo "#define USE_PAM 1" >>confdefs.h
7537
7538       ;;
7539     no)
7540       :
7541       ;;
7542     *)
7543       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7544       ;;
7545   esac
7546
7547 else
7548   with_pam=no
7549
7550 fi
7551
7552
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7554 $as_echo "$with_pam" >&6; }
7555
7556
7557 #
7558 # BSD AUTH
7559 #
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7561 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7562
7563
7564
7565 # Check whether --with-bsd-auth was given.
7566 if test "${with_bsd_auth+set}" = set; then :
7567   withval=$with_bsd_auth;
7568   case $withval in
7569     yes)
7570
7571 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7572
7573       ;;
7574     no)
7575       :
7576       ;;
7577     *)
7578       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7579       ;;
7580   esac
7581
7582 else
7583   with_bsd_auth=no
7584
7585 fi
7586
7587
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7589 $as_echo "$with_bsd_auth" >&6; }
7590
7591
7592 #
7593 # LDAP
7594 #
7595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7596 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7597
7598
7599
7600 # Check whether --with-ldap was given.
7601 if test "${with_ldap+set}" = set; then :
7602   withval=$with_ldap;
7603   case $withval in
7604     yes)
7605
7606 $as_echo "#define USE_LDAP 1" >>confdefs.h
7607
7608       ;;
7609     no)
7610       :
7611       ;;
7612     *)
7613       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7614       ;;
7615   esac
7616
7617 else
7618   with_ldap=no
7619
7620 fi
7621
7622
7623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7624 $as_echo "$with_ldap" >&6; }
7625
7626
7627
7628 #
7629 # Bonjour
7630 #
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7632 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7633
7634
7635
7636 # Check whether --with-bonjour was given.
7637 if test "${with_bonjour+set}" = set; then :
7638   withval=$with_bonjour;
7639   case $withval in
7640     yes)
7641
7642 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7643
7644       ;;
7645     no)
7646       :
7647       ;;
7648     *)
7649       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7650       ;;
7651   esac
7652
7653 else
7654   with_bonjour=no
7655
7656 fi
7657
7658
7659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7660 $as_echo "$with_bonjour" >&6; }
7661
7662
7663 #
7664 # OpenSSL
7665 #
7666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7667 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7668
7669
7670
7671 # Check whether --with-openssl was given.
7672 if test "${with_openssl+set}" = set; then :
7673   withval=$with_openssl;
7674   case $withval in
7675     yes)
7676
7677 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7678
7679       ;;
7680     no)
7681       :
7682       ;;
7683     *)
7684       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7685       ;;
7686   esac
7687
7688 else
7689   with_openssl=no
7690
7691 fi
7692
7693
7694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7695 $as_echo "$with_openssl" >&6; }
7696
7697
7698 #
7699 # SELinux
7700 #
7701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7702 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7703
7704
7705
7706 # Check whether --with-selinux was given.
7707 if test "${with_selinux+set}" = set; then :
7708   withval=$with_selinux;
7709   case $withval in
7710     yes)
7711       :
7712       ;;
7713     no)
7714       :
7715       ;;
7716     *)
7717       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7718       ;;
7719   esac
7720
7721 else
7722   with_selinux=no
7723
7724 fi
7725
7726
7727
7728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7729 $as_echo "$with_selinux" >&6; }
7730
7731 #
7732 # Systemd
7733 #
7734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7735 $as_echo_n "checking whether to build with systemd support... " >&6; }
7736
7737
7738
7739 # Check whether --with-systemd was given.
7740 if test "${with_systemd+set}" = set; then :
7741   withval=$with_systemd;
7742   case $withval in
7743     yes)
7744
7745 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7746
7747       ;;
7748     no)
7749       :
7750       ;;
7751     *)
7752       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7753       ;;
7754   esac
7755
7756 else
7757   with_systemd=no
7758
7759 fi
7760
7761
7762
7763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7764 $as_echo "$with_systemd" >&6; }
7765
7766 #
7767 # Readline
7768 #
7769
7770
7771
7772 # Check whether --with-readline was given.
7773 if test "${with_readline+set}" = set; then :
7774   withval=$with_readline;
7775   case $withval in
7776     yes)
7777       :
7778       ;;
7779     no)
7780       :
7781       ;;
7782     *)
7783       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7784       ;;
7785   esac
7786
7787 else
7788   with_readline=yes
7789
7790 fi
7791
7792
7793 # readline on MinGW has problems with backslashes in psql and other bugs.
7794 # This is particularly a problem with non-US code pages.
7795 # Therefore disable its use until we understand the cause. 2004-07-20
7796 if test "$PORTNAME" = "win32"; then
7797   if test "$with_readline" = yes; then
7798     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
7799 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
7800     with_readline=no
7801   fi
7802 fi
7803
7804
7805 #
7806 # Prefer libedit
7807 #
7808
7809
7810
7811 # Check whether --with-libedit-preferred was given.
7812 if test "${with_libedit_preferred+set}" = set; then :
7813   withval=$with_libedit_preferred;
7814   case $withval in
7815     yes)
7816       :
7817       ;;
7818     no)
7819       :
7820       ;;
7821     *)
7822       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
7823       ;;
7824   esac
7825
7826 else
7827   with_libedit_preferred=no
7828
7829 fi
7830
7831
7832
7833
7834 #
7835 # UUID library
7836 #
7837 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
7838 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
7839 # UUID library.  More than one of these might be present on a given platform,
7840 # so we make the user say which one she wants.
7841 #
7842
7843
7844
7845 # Check whether --with-uuid was given.
7846 if test "${with_uuid+set}" = set; then :
7847   withval=$with_uuid;
7848   case $withval in
7849     yes)
7850       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
7851       ;;
7852     no)
7853       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
7854       ;;
7855     *)
7856
7857       ;;
7858   esac
7859
7860 fi
7861
7862
7863 if test x"$with_uuid" = x"" ; then
7864   with_uuid=no
7865 fi
7866
7867
7868
7869 # Check whether --with-ossp-uuid was given.
7870 if test "${with_ossp_uuid+set}" = set; then :
7871   withval=$with_ossp_uuid;
7872   case $withval in
7873     yes)
7874       :
7875       ;;
7876     no)
7877       :
7878       ;;
7879     *)
7880       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
7881       ;;
7882   esac
7883
7884 else
7885   with_ossp_uuid=no
7886
7887 fi
7888
7889
7890 if test "$with_ossp_uuid" = yes ; then
7891   with_uuid=ossp
7892 fi
7893
7894 if test "$with_uuid" = bsd ; then
7895
7896 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
7897
7898   UUID_EXTRA_OBJS="md5.o sha1.o"
7899 elif test "$with_uuid" = e2fs ; then
7900
7901 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
7902
7903   UUID_EXTRA_OBJS="md5.o sha1.o"
7904 elif test "$with_uuid" = ossp ; then
7905
7906 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
7907
7908   UUID_EXTRA_OBJS=""
7909 elif test "$with_uuid" = no ; then
7910   UUID_EXTRA_OBJS=""
7911 else
7912   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
7913 fi
7914
7915
7916
7917
7918 #
7919 # XML
7920 #
7921
7922
7923
7924 # Check whether --with-libxml was given.
7925 if test "${with_libxml+set}" = set; then :
7926   withval=$with_libxml;
7927   case $withval in
7928     yes)
7929
7930 $as_echo "#define USE_LIBXML 1" >>confdefs.h
7931
7932       ;;
7933     no)
7934       :
7935       ;;
7936     *)
7937       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
7938       ;;
7939   esac
7940
7941 else
7942   with_libxml=no
7943
7944 fi
7945
7946
7947
7948 if test "$with_libxml" = yes ; then
7949   if test -z "$XML2_CONFIG"; then
7950   for ac_prog in xml2-config
7951 do
7952   # Extract the first word of "$ac_prog", so it can be a program name with args.
7953 set dummy $ac_prog; ac_word=$2
7954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7955 $as_echo_n "checking for $ac_word... " >&6; }
7956 if ${ac_cv_path_XML2_CONFIG+:} false; then :
7957   $as_echo_n "(cached) " >&6
7958 else
7959   case $XML2_CONFIG in
7960   [\\/]* | ?:[\\/]*)
7961   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
7962   ;;
7963   *)
7964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7965 for as_dir in $PATH
7966 do
7967   IFS=$as_save_IFS
7968   test -z "$as_dir" && as_dir=.
7969     for ac_exec_ext in '' $ac_executable_extensions; do
7970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7971     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7973     break 2
7974   fi
7975 done
7976   done
7977 IFS=$as_save_IFS
7978
7979   ;;
7980 esac
7981 fi
7982 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
7983 if test -n "$XML2_CONFIG"; then
7984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
7985 $as_echo "$XML2_CONFIG" >&6; }
7986 else
7987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7988 $as_echo "no" >&6; }
7989 fi
7990
7991
7992   test -n "$XML2_CONFIG" && break
7993 done
7994
7995 else
7996   # Report the value of XML2_CONFIG in configure's output in all cases.
7997   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
7998 $as_echo_n "checking for XML2_CONFIG... " >&6; }
7999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8000 $as_echo "$XML2_CONFIG" >&6; }
8001 fi
8002
8003   if test -n "$XML2_CONFIG"; then
8004     for pgac_option in `$XML2_CONFIG --cflags`; do
8005       case $pgac_option in
8006         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8007       esac
8008     done
8009     for pgac_option in `$XML2_CONFIG --libs`; do
8010       case $pgac_option in
8011         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8012       esac
8013     done
8014   fi
8015 fi
8016
8017
8018
8019 #
8020 # XSLT
8021 #
8022
8023
8024
8025 # Check whether --with-libxslt was given.
8026 if test "${with_libxslt+set}" = set; then :
8027   withval=$with_libxslt;
8028   case $withval in
8029     yes)
8030
8031 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8032
8033       ;;
8034     no)
8035       :
8036       ;;
8037     *)
8038       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8039       ;;
8040   esac
8041
8042 else
8043   with_libxslt=no
8044
8045 fi
8046
8047
8048
8049
8050
8051
8052 #
8053 # tzdata
8054 #
8055
8056
8057
8058 # Check whether --with-system-tzdata was given.
8059 if test "${with_system_tzdata+set}" = set; then :
8060   withval=$with_system_tzdata;
8061   case $withval in
8062     yes)
8063       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8064       ;;
8065     no)
8066       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8067       ;;
8068     *)
8069
8070       ;;
8071   esac
8072
8073 fi
8074
8075
8076
8077
8078 #
8079 # Zlib
8080 #
8081
8082
8083
8084 # Check whether --with-zlib was given.
8085 if test "${with_zlib+set}" = set; then :
8086   withval=$with_zlib;
8087   case $withval in
8088     yes)
8089       :
8090       ;;
8091     no)
8092       :
8093       ;;
8094     *)
8095       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8096       ;;
8097   esac
8098
8099 else
8100   with_zlib=yes
8101
8102 fi
8103
8104
8105
8106
8107 #
8108 # Elf
8109 #
8110
8111 # Assume system is ELF if it predefines __ELF__ as 1,
8112 # otherwise believe host_os based default.
8113 case $host_os in
8114     freebsd1*|freebsd2*) elf=no;;
8115     freebsd3*|freebsd4*) elf=yes;;
8116 esac
8117
8118
8119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8120 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8121 if ${ac_cv_path_GREP+:} false; then :
8122   $as_echo_n "(cached) " >&6
8123 else
8124   if test -z "$GREP"; then
8125   ac_path_GREP_found=false
8126   # Loop through the user's path and test for each of PROGNAME-LIST
8127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8128 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8129 do
8130   IFS=$as_save_IFS
8131   test -z "$as_dir" && as_dir=.
8132     for ac_prog in grep ggrep; do
8133     for ac_exec_ext in '' $ac_executable_extensions; do
8134       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8135       as_fn_executable_p "$ac_path_GREP" || continue
8136 # Check for GNU ac_path_GREP and select it if it is found.
8137   # Check for GNU $ac_path_GREP
8138 case `"$ac_path_GREP" --version 2>&1` in
8139 *GNU*)
8140   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8141 *)
8142   ac_count=0
8143   $as_echo_n 0123456789 >"conftest.in"
8144   while :
8145   do
8146     cat "conftest.in" "conftest.in" >"conftest.tmp"
8147     mv "conftest.tmp" "conftest.in"
8148     cp "conftest.in" "conftest.nl"
8149     $as_echo 'GREP' >> "conftest.nl"
8150     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8151     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8152     as_fn_arith $ac_count + 1 && ac_count=$as_val
8153     if test $ac_count -gt ${ac_path_GREP_max-0}; then
8154       # Best one so far, save it but keep looking for a better one
8155       ac_cv_path_GREP="$ac_path_GREP"
8156       ac_path_GREP_max=$ac_count
8157     fi
8158     # 10*(2^10) chars as input seems more than enough
8159     test $ac_count -gt 10 && break
8160   done
8161   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8162 esac
8163
8164       $ac_path_GREP_found && break 3
8165     done
8166   done
8167   done
8168 IFS=$as_save_IFS
8169   if test -z "$ac_cv_path_GREP"; then
8170     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8171   fi
8172 else
8173   ac_cv_path_GREP=$GREP
8174 fi
8175
8176 fi
8177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8178 $as_echo "$ac_cv_path_GREP" >&6; }
8179  GREP="$ac_cv_path_GREP"
8180
8181
8182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8183 $as_echo_n "checking for egrep... " >&6; }
8184 if ${ac_cv_path_EGREP+:} false; then :
8185   $as_echo_n "(cached) " >&6
8186 else
8187   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8188    then ac_cv_path_EGREP="$GREP -E"
8189    else
8190      if test -z "$EGREP"; then
8191   ac_path_EGREP_found=false
8192   # Loop through the user's path and test for each of PROGNAME-LIST
8193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8194 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8195 do
8196   IFS=$as_save_IFS
8197   test -z "$as_dir" && as_dir=.
8198     for ac_prog in egrep; do
8199     for ac_exec_ext in '' $ac_executable_extensions; do
8200       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8201       as_fn_executable_p "$ac_path_EGREP" || continue
8202 # Check for GNU ac_path_EGREP and select it if it is found.
8203   # Check for GNU $ac_path_EGREP
8204 case `"$ac_path_EGREP" --version 2>&1` in
8205 *GNU*)
8206   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8207 *)
8208   ac_count=0
8209   $as_echo_n 0123456789 >"conftest.in"
8210   while :
8211   do
8212     cat "conftest.in" "conftest.in" >"conftest.tmp"
8213     mv "conftest.tmp" "conftest.in"
8214     cp "conftest.in" "conftest.nl"
8215     $as_echo 'EGREP' >> "conftest.nl"
8216     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8217     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8218     as_fn_arith $ac_count + 1 && ac_count=$as_val
8219     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8220       # Best one so far, save it but keep looking for a better one
8221       ac_cv_path_EGREP="$ac_path_EGREP"
8222       ac_path_EGREP_max=$ac_count
8223     fi
8224     # 10*(2^10) chars as input seems more than enough
8225     test $ac_count -gt 10 && break
8226   done
8227   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8228 esac
8229
8230       $ac_path_EGREP_found && break 3
8231     done
8232   done
8233   done
8234 IFS=$as_save_IFS
8235   if test -z "$ac_cv_path_EGREP"; then
8236     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8237   fi
8238 else
8239   ac_cv_path_EGREP=$EGREP
8240 fi
8241
8242    fi
8243 fi
8244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8245 $as_echo "$ac_cv_path_EGREP" >&6; }
8246  EGREP="$ac_cv_path_EGREP"
8247
8248
8249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8250 /* end confdefs.h.  */
8251 #if __ELF__
8252   yes
8253 #endif
8254
8255 _ACEOF
8256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8257   $EGREP "yes" >/dev/null 2>&1; then :
8258   ELF_SYS=true
8259 else
8260   if test "X$elf" = "Xyes" ; then
8261   ELF_SYS=true
8262 else
8263   ELF_SYS=
8264 fi
8265 fi
8266 rm -f conftest*
8267
8268
8269
8270 #
8271 # Assignments
8272 #
8273
8274 CPPFLAGS="$CPPFLAGS $INCLUDES"
8275 LDFLAGS="$LDFLAGS $LIBDIRS"
8276
8277
8278
8279
8280
8281 # Check whether --with-gnu-ld was given.
8282 if test "${with_gnu_ld+set}" = set; then :
8283   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8284 else
8285   with_gnu_ld=no
8286 fi
8287
8288 ac_prog=ld
8289 if test "$GCC" = yes; then
8290   # Check if gcc -print-prog-name=ld gives a path.
8291   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8292 $as_echo_n "checking for ld used by GCC... " >&6; }
8293   case $host in
8294   *-*-mingw*)
8295     # gcc leaves a trailing carriage return which upsets mingw
8296     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8297   *)
8298     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8299   esac
8300   case "$ac_prog" in
8301     # Accept absolute paths.
8302     [\\/]* | [A-Za-z]:[\\/]*)
8303       re_direlt='/[^/][^/]*/\.\./'
8304       # Canonicalize the path of ld
8305       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8306       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8307         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8308       done
8309       test -z "$LD" && LD="$ac_prog"
8310       ;;
8311   "")
8312     # If it fails, then pretend we aren't using GCC.
8313     ac_prog=ld
8314     ;;
8315   *)
8316     # If it is relative, then search for the first ld in PATH.
8317     with_gnu_ld=unknown
8318     ;;
8319   esac
8320 elif test "$with_gnu_ld" = yes; then
8321   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8322 $as_echo_n "checking for GNU ld... " >&6; }
8323 else
8324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8325 $as_echo_n "checking for non-GNU ld... " >&6; }
8326 fi
8327 if ${ac_cv_path_LD+:} false; then :
8328   $as_echo_n "(cached) " >&6
8329 else
8330   if test -z "$LD"; then
8331   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8332   for ac_dir in $PATH; do
8333     test -z "$ac_dir" && ac_dir=.
8334     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8335       ac_cv_path_LD="$ac_dir/$ac_prog"
8336       # Check to see if the program is GNU ld.  I'd rather use --version,
8337       # but apparently some GNU ld's only accept -v.
8338       # Break only if it was the GNU/non-GNU ld that we prefer.
8339       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8340         test "$with_gnu_ld" != no && break
8341       else
8342         test "$with_gnu_ld" != yes && break
8343       fi
8344     fi
8345   done
8346   IFS="$ac_save_ifs"
8347 else
8348   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8349 fi
8350 fi
8351
8352 LD="$ac_cv_path_LD"
8353 if test -n "$LD"; then
8354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8355 $as_echo "$LD" >&6; }
8356 else
8357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8358 $as_echo "no" >&6; }
8359 fi
8360 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8362 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8363 if ${ac_cv_prog_gnu_ld+:} false; then :
8364   $as_echo_n "(cached) " >&6
8365 else
8366   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8367 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8368   ac_cv_prog_gnu_ld=yes
8369 else
8370   ac_cv_prog_gnu_ld=no
8371 fi
8372 fi
8373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8374 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8375 with_gnu_ld=$ac_cv_prog_gnu_ld
8376
8377
8378
8379
8380 if test -n "$ac_tool_prefix"; then
8381   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8382 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8384 $as_echo_n "checking for $ac_word... " >&6; }
8385 if ${ac_cv_prog_RANLIB+:} false; then :
8386   $as_echo_n "(cached) " >&6
8387 else
8388   if test -n "$RANLIB"; then
8389   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8390 else
8391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8392 for as_dir in $PATH
8393 do
8394   IFS=$as_save_IFS
8395   test -z "$as_dir" && as_dir=.
8396     for ac_exec_ext in '' $ac_executable_extensions; do
8397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8398     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8400     break 2
8401   fi
8402 done
8403   done
8404 IFS=$as_save_IFS
8405
8406 fi
8407 fi
8408 RANLIB=$ac_cv_prog_RANLIB
8409 if test -n "$RANLIB"; then
8410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8411 $as_echo "$RANLIB" >&6; }
8412 else
8413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8414 $as_echo "no" >&6; }
8415 fi
8416
8417
8418 fi
8419 if test -z "$ac_cv_prog_RANLIB"; then
8420   ac_ct_RANLIB=$RANLIB
8421   # Extract the first word of "ranlib", so it can be a program name with args.
8422 set dummy ranlib; ac_word=$2
8423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8424 $as_echo_n "checking for $ac_word... " >&6; }
8425 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8426   $as_echo_n "(cached) " >&6
8427 else
8428   if test -n "$ac_ct_RANLIB"; then
8429   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8430 else
8431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8432 for as_dir in $PATH
8433 do
8434   IFS=$as_save_IFS
8435   test -z "$as_dir" && as_dir=.
8436     for ac_exec_ext in '' $ac_executable_extensions; do
8437   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8438     ac_cv_prog_ac_ct_RANLIB="ranlib"
8439     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8440     break 2
8441   fi
8442 done
8443   done
8444 IFS=$as_save_IFS
8445
8446 fi
8447 fi
8448 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8449 if test -n "$ac_ct_RANLIB"; then
8450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8451 $as_echo "$ac_ct_RANLIB" >&6; }
8452 else
8453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8454 $as_echo "no" >&6; }
8455 fi
8456
8457   if test "x$ac_ct_RANLIB" = x; then
8458     RANLIB=":"
8459   else
8460     case $cross_compiling:$ac_tool_warned in
8461 yes:)
8462 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8463 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8464 ac_tool_warned=yes ;;
8465 esac
8466     RANLIB=$ac_ct_RANLIB
8467   fi
8468 else
8469   RANLIB="$ac_cv_prog_RANLIB"
8470 fi
8471
8472
8473   if test -n "$ac_tool_prefix"; then
8474   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8475 set dummy ${ac_tool_prefix}strip; ac_word=$2
8476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8477 $as_echo_n "checking for $ac_word... " >&6; }
8478 if ${ac_cv_prog_STRIP+:} false; then :
8479   $as_echo_n "(cached) " >&6
8480 else
8481   if test -n "$STRIP"; then
8482   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8483 else
8484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8485 for as_dir in $PATH
8486 do
8487   IFS=$as_save_IFS
8488   test -z "$as_dir" && as_dir=.
8489     for ac_exec_ext in '' $ac_executable_extensions; do
8490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8491     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8493     break 2
8494   fi
8495 done
8496   done
8497 IFS=$as_save_IFS
8498
8499 fi
8500 fi
8501 STRIP=$ac_cv_prog_STRIP
8502 if test -n "$STRIP"; then
8503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8504 $as_echo "$STRIP" >&6; }
8505 else
8506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8507 $as_echo "no" >&6; }
8508 fi
8509
8510
8511 fi
8512 if test -z "$ac_cv_prog_STRIP"; then
8513   ac_ct_STRIP=$STRIP
8514   # Extract the first word of "strip", so it can be a program name with args.
8515 set dummy strip; ac_word=$2
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8517 $as_echo_n "checking for $ac_word... " >&6; }
8518 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8519   $as_echo_n "(cached) " >&6
8520 else
8521   if test -n "$ac_ct_STRIP"; then
8522   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8523 else
8524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8525 for as_dir in $PATH
8526 do
8527   IFS=$as_save_IFS
8528   test -z "$as_dir" && as_dir=.
8529     for ac_exec_ext in '' $ac_executable_extensions; do
8530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8531     ac_cv_prog_ac_ct_STRIP="strip"
8532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8533     break 2
8534   fi
8535 done
8536   done
8537 IFS=$as_save_IFS
8538
8539 fi
8540 fi
8541 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8542 if test -n "$ac_ct_STRIP"; then
8543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8544 $as_echo "$ac_ct_STRIP" >&6; }
8545 else
8546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8547 $as_echo "no" >&6; }
8548 fi
8549
8550   if test "x$ac_ct_STRIP" = x; then
8551     STRIP=":"
8552   else
8553     case $cross_compiling:$ac_tool_warned in
8554 yes:)
8555 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8556 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8557 ac_tool_warned=yes ;;
8558 esac
8559     STRIP=$ac_ct_STRIP
8560   fi
8561 else
8562   STRIP="$ac_cv_prog_STRIP"
8563 fi
8564
8565
8566   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8567 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8568   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8569     STRIP_STATIC_LIB="$STRIP -x"
8570     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8571     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8572 $as_echo "yes" >&6; }
8573   else
8574     case $host_os in
8575       darwin*)
8576         STRIP="$STRIP -x"
8577         STRIP_STATIC_LIB=$STRIP
8578         STRIP_SHARED_LIB=$STRIP
8579         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8580 $as_echo "yes" >&6; }
8581         ;;
8582       *)
8583         STRIP_STATIC_LIB=:
8584         STRIP_SHARED_LIB=:
8585         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8586 $as_echo "no" >&6; }
8587         ;;
8588     esac
8589   fi
8590
8591
8592
8593 if test -n "$ac_tool_prefix"; then
8594   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8595 set dummy ${ac_tool_prefix}ar; ac_word=$2
8596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8597 $as_echo_n "checking for $ac_word... " >&6; }
8598 if ${ac_cv_prog_AR+:} false; then :
8599   $as_echo_n "(cached) " >&6
8600 else
8601   if test -n "$AR"; then
8602   ac_cv_prog_AR="$AR" # Let the user override the test.
8603 else
8604 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8605 for as_dir in $PATH
8606 do
8607   IFS=$as_save_IFS
8608   test -z "$as_dir" && as_dir=.
8609     for ac_exec_ext in '' $ac_executable_extensions; do
8610   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8611     ac_cv_prog_AR="${ac_tool_prefix}ar"
8612     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8613     break 2
8614   fi
8615 done
8616   done
8617 IFS=$as_save_IFS
8618
8619 fi
8620 fi
8621 AR=$ac_cv_prog_AR
8622 if test -n "$AR"; then
8623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8624 $as_echo "$AR" >&6; }
8625 else
8626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8627 $as_echo "no" >&6; }
8628 fi
8629
8630
8631 fi
8632 if test -z "$ac_cv_prog_AR"; then
8633   ac_ct_AR=$AR
8634   # Extract the first word of "ar", so it can be a program name with args.
8635 set dummy ar; ac_word=$2
8636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8637 $as_echo_n "checking for $ac_word... " >&6; }
8638 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8639   $as_echo_n "(cached) " >&6
8640 else
8641   if test -n "$ac_ct_AR"; then
8642   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8643 else
8644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8645 for as_dir in $PATH
8646 do
8647   IFS=$as_save_IFS
8648   test -z "$as_dir" && as_dir=.
8649     for ac_exec_ext in '' $ac_executable_extensions; do
8650   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8651     ac_cv_prog_ac_ct_AR="ar"
8652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8653     break 2
8654   fi
8655 done
8656   done
8657 IFS=$as_save_IFS
8658
8659 fi
8660 fi
8661 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8662 if test -n "$ac_ct_AR"; then
8663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8664 $as_echo "$ac_ct_AR" >&6; }
8665 else
8666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8667 $as_echo "no" >&6; }
8668 fi
8669
8670   if test "x$ac_ct_AR" = x; then
8671     AR="ar"
8672   else
8673     case $cross_compiling:$ac_tool_warned in
8674 yes:)
8675 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8676 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8677 ac_tool_warned=yes ;;
8678 esac
8679     AR=$ac_ct_AR
8680   fi
8681 else
8682   AR="$ac_cv_prog_AR"
8683 fi
8684
8685 if test "$PORTNAME" = "win32"; then
8686   if test -n "$ac_tool_prefix"; then
8687   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8688 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8690 $as_echo_n "checking for $ac_word... " >&6; }
8691 if ${ac_cv_prog_DLLTOOL+:} false; then :
8692   $as_echo_n "(cached) " >&6
8693 else
8694   if test -n "$DLLTOOL"; then
8695   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8696 else
8697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8698 for as_dir in $PATH
8699 do
8700   IFS=$as_save_IFS
8701   test -z "$as_dir" && as_dir=.
8702     for ac_exec_ext in '' $ac_executable_extensions; do
8703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8704     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8706     break 2
8707   fi
8708 done
8709   done
8710 IFS=$as_save_IFS
8711
8712 fi
8713 fi
8714 DLLTOOL=$ac_cv_prog_DLLTOOL
8715 if test -n "$DLLTOOL"; then
8716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8717 $as_echo "$DLLTOOL" >&6; }
8718 else
8719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8720 $as_echo "no" >&6; }
8721 fi
8722
8723
8724 fi
8725 if test -z "$ac_cv_prog_DLLTOOL"; then
8726   ac_ct_DLLTOOL=$DLLTOOL
8727   # Extract the first word of "dlltool", so it can be a program name with args.
8728 set dummy dlltool; ac_word=$2
8729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8730 $as_echo_n "checking for $ac_word... " >&6; }
8731 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8732   $as_echo_n "(cached) " >&6
8733 else
8734   if test -n "$ac_ct_DLLTOOL"; then
8735   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8736 else
8737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8738 for as_dir in $PATH
8739 do
8740   IFS=$as_save_IFS
8741   test -z "$as_dir" && as_dir=.
8742     for ac_exec_ext in '' $ac_executable_extensions; do
8743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8744     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8746     break 2
8747   fi
8748 done
8749   done
8750 IFS=$as_save_IFS
8751
8752 fi
8753 fi
8754 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8755 if test -n "$ac_ct_DLLTOOL"; then
8756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8757 $as_echo "$ac_ct_DLLTOOL" >&6; }
8758 else
8759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8760 $as_echo "no" >&6; }
8761 fi
8762
8763   if test "x$ac_ct_DLLTOOL" = x; then
8764     DLLTOOL="dlltool"
8765   else
8766     case $cross_compiling:$ac_tool_warned in
8767 yes:)
8768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8769 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8770 ac_tool_warned=yes ;;
8771 esac
8772     DLLTOOL=$ac_ct_DLLTOOL
8773   fi
8774 else
8775   DLLTOOL="$ac_cv_prog_DLLTOOL"
8776 fi
8777
8778   if test -n "$ac_tool_prefix"; then
8779   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8780 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8782 $as_echo_n "checking for $ac_word... " >&6; }
8783 if ${ac_cv_prog_DLLWRAP+:} false; then :
8784   $as_echo_n "(cached) " >&6
8785 else
8786   if test -n "$DLLWRAP"; then
8787   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
8788 else
8789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8790 for as_dir in $PATH
8791 do
8792   IFS=$as_save_IFS
8793   test -z "$as_dir" && as_dir=.
8794     for ac_exec_ext in '' $ac_executable_extensions; do
8795   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8796     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
8797     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8798     break 2
8799   fi
8800 done
8801   done
8802 IFS=$as_save_IFS
8803
8804 fi
8805 fi
8806 DLLWRAP=$ac_cv_prog_DLLWRAP
8807 if test -n "$DLLWRAP"; then
8808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
8809 $as_echo "$DLLWRAP" >&6; }
8810 else
8811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8812 $as_echo "no" >&6; }
8813 fi
8814
8815
8816 fi
8817 if test -z "$ac_cv_prog_DLLWRAP"; then
8818   ac_ct_DLLWRAP=$DLLWRAP
8819   # Extract the first word of "dllwrap", so it can be a program name with args.
8820 set dummy dllwrap; ac_word=$2
8821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8822 $as_echo_n "checking for $ac_word... " >&6; }
8823 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
8824   $as_echo_n "(cached) " >&6
8825 else
8826   if test -n "$ac_ct_DLLWRAP"; then
8827   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
8828 else
8829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8830 for as_dir in $PATH
8831 do
8832   IFS=$as_save_IFS
8833   test -z "$as_dir" && as_dir=.
8834     for ac_exec_ext in '' $ac_executable_extensions; do
8835   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8836     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
8837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8838     break 2
8839   fi
8840 done
8841   done
8842 IFS=$as_save_IFS
8843
8844 fi
8845 fi
8846 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
8847 if test -n "$ac_ct_DLLWRAP"; then
8848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
8849 $as_echo "$ac_ct_DLLWRAP" >&6; }
8850 else
8851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8852 $as_echo "no" >&6; }
8853 fi
8854
8855   if test "x$ac_ct_DLLWRAP" = x; then
8856     DLLWRAP="dllwrap"
8857   else
8858     case $cross_compiling:$ac_tool_warned in
8859 yes:)
8860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8861 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8862 ac_tool_warned=yes ;;
8863 esac
8864     DLLWRAP=$ac_ct_DLLWRAP
8865   fi
8866 else
8867   DLLWRAP="$ac_cv_prog_DLLWRAP"
8868 fi
8869
8870   if test -n "$ac_tool_prefix"; then
8871   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8872 set dummy ${ac_tool_prefix}windres; ac_word=$2
8873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8874 $as_echo_n "checking for $ac_word... " >&6; }
8875 if ${ac_cv_prog_WINDRES+:} false; then :
8876   $as_echo_n "(cached) " >&6
8877 else
8878   if test -n "$WINDRES"; then
8879   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8880 else
8881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8882 for as_dir in $PATH
8883 do
8884   IFS=$as_save_IFS
8885   test -z "$as_dir" && as_dir=.
8886     for ac_exec_ext in '' $ac_executable_extensions; do
8887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8888     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
8889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8890     break 2
8891   fi
8892 done
8893   done
8894 IFS=$as_save_IFS
8895
8896 fi
8897 fi
8898 WINDRES=$ac_cv_prog_WINDRES
8899 if test -n "$WINDRES"; then
8900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8901 $as_echo "$WINDRES" >&6; }
8902 else
8903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8904 $as_echo "no" >&6; }
8905 fi
8906
8907
8908 fi
8909 if test -z "$ac_cv_prog_WINDRES"; then
8910   ac_ct_WINDRES=$WINDRES
8911   # Extract the first word of "windres", so it can be a program name with args.
8912 set dummy windres; ac_word=$2
8913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8914 $as_echo_n "checking for $ac_word... " >&6; }
8915 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
8916   $as_echo_n "(cached) " >&6
8917 else
8918   if test -n "$ac_ct_WINDRES"; then
8919   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8920 else
8921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8922 for as_dir in $PATH
8923 do
8924   IFS=$as_save_IFS
8925   test -z "$as_dir" && as_dir=.
8926     for ac_exec_ext in '' $ac_executable_extensions; do
8927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8928     ac_cv_prog_ac_ct_WINDRES="windres"
8929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8930     break 2
8931   fi
8932 done
8933   done
8934 IFS=$as_save_IFS
8935
8936 fi
8937 fi
8938 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8939 if test -n "$ac_ct_WINDRES"; then
8940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8941 $as_echo "$ac_ct_WINDRES" >&6; }
8942 else
8943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8944 $as_echo "no" >&6; }
8945 fi
8946
8947   if test "x$ac_ct_WINDRES" = x; then
8948     WINDRES="windres"
8949   else
8950     case $cross_compiling:$ac_tool_warned in
8951 yes:)
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8953 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8954 ac_tool_warned=yes ;;
8955 esac
8956     WINDRES=$ac_ct_WINDRES
8957   fi
8958 else
8959   WINDRES="$ac_cv_prog_WINDRES"
8960 fi
8961
8962 fi
8963
8964 # Find a good install program.  We prefer a C program (faster),
8965 # so one script is as good as another.  But avoid the broken or
8966 # incompatible versions:
8967 # SysV /etc/install, /usr/sbin/install
8968 # SunOS /usr/etc/install
8969 # IRIX /sbin/install
8970 # AIX /bin/install
8971 # AmigaOS /C/install, which installs bootblocks on floppy discs
8972 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8973 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
8974 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8975 # OS/2's system install, which has a completely different semantic
8976 # ./install, which can be erroneously created by make from ./install.sh.
8977 # Reject install programs that cannot install multiple files.
8978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
8979 $as_echo_n "checking for a BSD-compatible install... " >&6; }
8980 if test -z "$INSTALL"; then
8981 if ${ac_cv_path_install+:} false; then :
8982   $as_echo_n "(cached) " >&6
8983 else
8984   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8985 for as_dir in $PATH
8986 do
8987   IFS=$as_save_IFS
8988   test -z "$as_dir" && as_dir=.
8989     # Account for people who put trailing slashes in PATH elements.
8990 case $as_dir/ in #((
8991   ./ | .// | /[cC]/* | \
8992   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8993   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
8994   /usr/ucb/* ) ;;
8995   *)
8996     # OSF1 and SCO ODT 3.0 have their own names for install.
8997     # Don't use installbsd from OSF since it installs stuff as root
8998     # by default.
8999     for ac_prog in ginstall scoinst install; do
9000       for ac_exec_ext in '' $ac_executable_extensions; do
9001         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9002           if test $ac_prog = install &&
9003             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9004             # AIX install.  It has an incompatible calling convention.
9005             :
9006           elif test $ac_prog = install &&
9007             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9008             # program-specific install script used by HP pwplus--don't use.
9009             :
9010           else
9011             rm -rf conftest.one conftest.two conftest.dir
9012             echo one > conftest.one
9013             echo two > conftest.two
9014             mkdir conftest.dir
9015             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9016               test -s conftest.one && test -s conftest.two &&
9017               test -s conftest.dir/conftest.one &&
9018               test -s conftest.dir/conftest.two
9019             then
9020               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9021               break 3
9022             fi
9023           fi
9024         fi
9025       done
9026     done
9027     ;;
9028 esac
9029
9030   done
9031 IFS=$as_save_IFS
9032
9033 rm -rf conftest.one conftest.two conftest.dir
9034
9035 fi
9036   if test "${ac_cv_path_install+set}" = set; then
9037     INSTALL=$ac_cv_path_install
9038   else
9039     # As a last resort, use the slow shell script.  Don't cache a
9040     # value for INSTALL within a source directory, because that will
9041     # break other packages using the cache if that directory is
9042     # removed, or if the value is a relative name.
9043     INSTALL=$ac_install_sh
9044   fi
9045 fi
9046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9047 $as_echo "$INSTALL" >&6; }
9048
9049 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9050 # It thinks the first close brace ends the variable substitution.
9051 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9052
9053 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9054
9055 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9056
9057 # When Autoconf chooses install-sh as install program it tries to generate
9058 # a relative path to it in each makefile where it substitutes it. This clashes
9059 # with our Makefile.global concept. This workaround helps.
9060 case $INSTALL in
9061   *install-sh*) install_bin='';;
9062   *) install_bin=$INSTALL;;
9063 esac
9064
9065
9066 if test -z "$TAR"; then
9067   for ac_prog in tar
9068 do
9069   # Extract the first word of "$ac_prog", so it can be a program name with args.
9070 set dummy $ac_prog; ac_word=$2
9071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9072 $as_echo_n "checking for $ac_word... " >&6; }
9073 if ${ac_cv_path_TAR+:} false; then :
9074   $as_echo_n "(cached) " >&6
9075 else
9076   case $TAR in
9077   [\\/]* | ?:[\\/]*)
9078   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9079   ;;
9080   *)
9081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9082 for as_dir in $PATH
9083 do
9084   IFS=$as_save_IFS
9085   test -z "$as_dir" && as_dir=.
9086     for ac_exec_ext in '' $ac_executable_extensions; do
9087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9088     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9090     break 2
9091   fi
9092 done
9093   done
9094 IFS=$as_save_IFS
9095
9096   ;;
9097 esac
9098 fi
9099 TAR=$ac_cv_path_TAR
9100 if test -n "$TAR"; then
9101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9102 $as_echo "$TAR" >&6; }
9103 else
9104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9105 $as_echo "no" >&6; }
9106 fi
9107
9108
9109   test -n "$TAR" && break
9110 done
9111
9112 else
9113   # Report the value of TAR in configure's output in all cases.
9114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9115 $as_echo_n "checking for TAR... " >&6; }
9116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9117 $as_echo "$TAR" >&6; }
9118 fi
9119
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9121 $as_echo_n "checking whether ln -s works... " >&6; }
9122 LN_S=$as_ln_s
9123 if test "$LN_S" = "ln -s"; then
9124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9125 $as_echo "yes" >&6; }
9126 else
9127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9128 $as_echo "no, using $LN_S" >&6; }
9129 fi
9130
9131 for ac_prog in gawk mawk nawk awk
9132 do
9133   # Extract the first word of "$ac_prog", so it can be a program name with args.
9134 set dummy $ac_prog; ac_word=$2
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9136 $as_echo_n "checking for $ac_word... " >&6; }
9137 if ${ac_cv_prog_AWK+:} false; then :
9138   $as_echo_n "(cached) " >&6
9139 else
9140   if test -n "$AWK"; then
9141   ac_cv_prog_AWK="$AWK" # Let the user override the test.
9142 else
9143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9144 for as_dir in $PATH
9145 do
9146   IFS=$as_save_IFS
9147   test -z "$as_dir" && as_dir=.
9148     for ac_exec_ext in '' $ac_executable_extensions; do
9149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9150     ac_cv_prog_AWK="$ac_prog"
9151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9152     break 2
9153   fi
9154 done
9155   done
9156 IFS=$as_save_IFS
9157
9158 fi
9159 fi
9160 AWK=$ac_cv_prog_AWK
9161 if test -n "$AWK"; then
9162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9163 $as_echo "$AWK" >&6; }
9164 else
9165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9166 $as_echo "no" >&6; }
9167 fi
9168
9169
9170   test -n "$AWK" && break
9171 done
9172
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9174 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9175 if test -z "$MKDIR_P"; then
9176   if ${ac_cv_path_mkdir+:} false; then :
9177   $as_echo_n "(cached) " >&6
9178 else
9179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9180 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9181 do
9182   IFS=$as_save_IFS
9183   test -z "$as_dir" && as_dir=.
9184     for ac_prog in mkdir gmkdir; do
9185          for ac_exec_ext in '' $ac_executable_extensions; do
9186            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9187            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9188              'mkdir (GNU coreutils) '* | \
9189              'mkdir (coreutils) '* | \
9190              'mkdir (fileutils) '4.1*)
9191                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9192                break 3;;
9193            esac
9194          done
9195        done
9196   done
9197 IFS=$as_save_IFS
9198
9199 fi
9200
9201   test -d ./--version && rmdir ./--version
9202   if test "${ac_cv_path_mkdir+set}" = set; then
9203     MKDIR_P="$ac_cv_path_mkdir -p"
9204   else
9205     # As a last resort, use the slow shell script.  Don't cache a
9206     # value for MKDIR_P within a source directory, because that will
9207     # break other packages using the cache if that directory is
9208     # removed, or if the value is a relative name.
9209     MKDIR_P="$ac_install_sh -d"
9210   fi
9211 fi
9212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9213 $as_echo "$MKDIR_P" >&6; }
9214
9215 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9216 # a relative path to it in each makefile where it substitutes it. This clashes
9217 # with our Makefile.global concept. This workaround helps.
9218 case $MKDIR_P in
9219   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9220 esac
9221
9222 if test -z "$BISON"; then
9223   for ac_prog in bison
9224 do
9225   # Extract the first word of "$ac_prog", so it can be a program name with args.
9226 set dummy $ac_prog; ac_word=$2
9227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9228 $as_echo_n "checking for $ac_word... " >&6; }
9229 if ${ac_cv_path_BISON+:} false; then :
9230   $as_echo_n "(cached) " >&6
9231 else
9232   case $BISON in
9233   [\\/]* | ?:[\\/]*)
9234   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9235   ;;
9236   *)
9237   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9238 for as_dir in $PATH
9239 do
9240   IFS=$as_save_IFS
9241   test -z "$as_dir" && as_dir=.
9242     for ac_exec_ext in '' $ac_executable_extensions; do
9243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9244     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9246     break 2
9247   fi
9248 done
9249   done
9250 IFS=$as_save_IFS
9251
9252   ;;
9253 esac
9254 fi
9255 BISON=$ac_cv_path_BISON
9256 if test -n "$BISON"; then
9257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9258 $as_echo "$BISON" >&6; }
9259 else
9260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9261 $as_echo "no" >&6; }
9262 fi
9263
9264
9265   test -n "$BISON" && break
9266 done
9267
9268 else
9269   # Report the value of BISON in configure's output in all cases.
9270   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9271 $as_echo_n "checking for BISON... " >&6; }
9272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9273 $as_echo "$BISON" >&6; }
9274 fi
9275
9276
9277 if test "$BISON"; then
9278   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9279   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9280 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9281   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9282   then
9283     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9284 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9285 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9286 $as_echo "$as_me: WARNING:
9287 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9288 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9289     BISON=""
9290   fi
9291   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9292   # of the now preferred %name-prefix "base_yy", but the latter
9293   # doesn't work with Bison 2.3 or less.  So for now we silence the
9294   # deprecation warnings.
9295   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9296   then
9297     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9298   fi
9299 fi
9300
9301 if test -z "$BISON"; then
9302   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9303 *** Without Bison you will not be able to build PostgreSQL from Git nor
9304 *** change any of the parser definition files.  You can obtain Bison from
9305 *** a GNU mirror site.  (If you are using the official distribution of
9306 *** PostgreSQL then you do not need to worry about this, because the Bison
9307 *** output is pre-generated.)" >&5
9308 $as_echo "$as_me: WARNING:
9309 *** Without Bison you will not be able to build PostgreSQL from Git nor
9310 *** change any of the parser definition files.  You can obtain Bison from
9311 *** a GNU mirror site.  (If you are using the official distribution of
9312 *** PostgreSQL then you do not need to worry about this, because the Bison
9313 *** output is pre-generated.)" >&2;}
9314 fi
9315 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9316
9317
9318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9319 $as_echo_n "checking for flex... " >&6; }
9320 if ${pgac_cv_path_flex+:} false; then :
9321   $as_echo_n "(cached) " >&6
9322 else
9323   # Let the user override the test
9324 if test -n "$FLEX"; then
9325   pgac_cv_path_flex=$FLEX
9326 else
9327   pgac_save_IFS=$IFS
9328   IFS=$PATH_SEPARATOR
9329   for pgac_dir in $PATH; do
9330     IFS=$pgac_save_IFS
9331     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9332       pgac_dir=`pwd`
9333     fi
9334     for pgac_prog in flex lex; do
9335       pgac_candidate="$pgac_dir/$pgac_prog"
9336       if test -f "$pgac_candidate" \
9337         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9338       then
9339         echo '%%'  > conftest.l
9340         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9341           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9342           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;}'
9343           then
9344             pgac_cv_path_flex=$pgac_candidate
9345             break 2
9346           else
9347             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9348 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9349 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9350 $as_echo "$as_me: WARNING:
9351 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9352 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9353           fi
9354         fi
9355       fi
9356     done
9357   done
9358   rm -f conftest.l lex.yy.c
9359   : ${pgac_cv_path_flex=no}
9360 fi
9361
9362 fi
9363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9364 $as_echo "$pgac_cv_path_flex" >&6; }
9365 if test x"$pgac_cv_path_flex" = x"no"; then
9366   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9367 *** Without Flex you will not be able to build PostgreSQL from Git nor
9368 *** change any of the scanner definition files.  You can obtain Flex from
9369 *** a GNU mirror site.  (If you are using the official distribution of
9370 *** PostgreSQL then you do not need to worry about this because the Flex
9371 *** output is pre-generated.)" >&5
9372 $as_echo "$as_me: WARNING:
9373 *** Without Flex you will not be able to build PostgreSQL from Git nor
9374 *** change any of the scanner definition files.  You can obtain Flex from
9375 *** a GNU mirror site.  (If you are using the official distribution of
9376 *** PostgreSQL then you do not need to worry about this because the Flex
9377 *** output is pre-generated.)" >&2;}
9378
9379   FLEX=
9380 else
9381   FLEX=$pgac_cv_path_flex
9382   pgac_flex_version=`$FLEX --version 2>/dev/null`
9383   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9384 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9385 fi
9386
9387
9388
9389
9390
9391 if test -z "$PERL"; then
9392   for ac_prog in perl
9393 do
9394   # Extract the first word of "$ac_prog", so it can be a program name with args.
9395 set dummy $ac_prog; ac_word=$2
9396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9397 $as_echo_n "checking for $ac_word... " >&6; }
9398 if ${ac_cv_path_PERL+:} false; then :
9399   $as_echo_n "(cached) " >&6
9400 else
9401   case $PERL in
9402   [\\/]* | ?:[\\/]*)
9403   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9404   ;;
9405   *)
9406   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9407 for as_dir in $PATH
9408 do
9409   IFS=$as_save_IFS
9410   test -z "$as_dir" && as_dir=.
9411     for ac_exec_ext in '' $ac_executable_extensions; do
9412   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9413     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9414     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9415     break 2
9416   fi
9417 done
9418   done
9419 IFS=$as_save_IFS
9420
9421   ;;
9422 esac
9423 fi
9424 PERL=$ac_cv_path_PERL
9425 if test -n "$PERL"; then
9426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9427 $as_echo "$PERL" >&6; }
9428 else
9429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9430 $as_echo "no" >&6; }
9431 fi
9432
9433
9434   test -n "$PERL" && break
9435 done
9436
9437 else
9438   # Report the value of PERL in configure's output in all cases.
9439   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9440 $as_echo_n "checking for PERL... " >&6; }
9441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9442 $as_echo "$PERL" >&6; }
9443 fi
9444
9445
9446 if test "$PERL"; then
9447   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'`
9448   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9449 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9450   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9451     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9452   then
9453     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9454 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9455 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9456 $as_echo "$as_me: WARNING:
9457 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9458 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9459     PERL=""
9460   fi
9461 fi
9462
9463 if test -z "$PERL"; then
9464   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9465 *** Without Perl you will not be able to build PostgreSQL from Git.
9466 *** You can obtain Perl from any CPAN mirror site.
9467 *** (If you are using the official distribution of PostgreSQL then you do not
9468 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9469 $as_echo "$as_me: WARNING:
9470 *** Without Perl you will not be able to build PostgreSQL from Git.
9471 *** You can obtain Perl from any CPAN mirror site.
9472 *** (If you are using the official distribution of PostgreSQL then you do not
9473 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9474 fi
9475
9476 if test "$with_perl" = yes; then
9477   if test -z "$PERL"; then
9478     as_fn_error $? "Perl not found" "$LINENO" 5
9479   fi
9480
9481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9482 $as_echo_n "checking for Perl archlibexp... " >&6; }
9483 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9484 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9486 $as_echo "$perl_archlibexp" >&6; }
9487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9488 $as_echo_n "checking for Perl privlibexp... " >&6; }
9489 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9490 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9492 $as_echo "$perl_privlibexp" >&6; }
9493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9494 $as_echo_n "checking for Perl useshrplib... " >&6; }
9495 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9496 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9498 $as_echo "$perl_useshrplib" >&6; }
9499   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9500     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9501 You might have to rebuild your Perl installation.  Refer to the
9502 documentation for details.  Use --without-perl to disable building
9503 PL/Perl." "$LINENO" 5
9504   fi
9505
9506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9507 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9508 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9510 $as_echo "$perl_ccflags" >&6; }
9511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9512 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9513 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9515 $as_echo "$perl_embed_ccflags" >&6; }
9516
9517
9518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9519 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9520 if test "$PORTNAME" = "win32" ; then
9521         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9522         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9523                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9524         else
9525                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9526                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9527                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9528                 fi
9529         fi
9530 else
9531         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9532         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9533         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9534 fi
9535 if test -z "$perl_embed_ldflags" ; then
9536         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9537 $as_echo "no" >&6; }
9538         as_fn_error $? "could not determine flags for linking embedded Perl.
9539 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9540 installed." "$LINENO" 5
9541 else
9542         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9543 $as_echo "$perl_embed_ldflags" >&6; }
9544 fi
9545
9546 fi
9547
9548 if test "$with_python" = yes; then
9549   if test -z "$PYTHON"; then
9550   for ac_prog in python
9551 do
9552   # Extract the first word of "$ac_prog", so it can be a program name with args.
9553 set dummy $ac_prog; ac_word=$2
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9555 $as_echo_n "checking for $ac_word... " >&6; }
9556 if ${ac_cv_path_PYTHON+:} false; then :
9557   $as_echo_n "(cached) " >&6
9558 else
9559   case $PYTHON in
9560   [\\/]* | ?:[\\/]*)
9561   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9562   ;;
9563   *)
9564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9565 for as_dir in $PATH
9566 do
9567   IFS=$as_save_IFS
9568   test -z "$as_dir" && as_dir=.
9569     for ac_exec_ext in '' $ac_executable_extensions; do
9570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9571     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9573     break 2
9574   fi
9575 done
9576   done
9577 IFS=$as_save_IFS
9578
9579   ;;
9580 esac
9581 fi
9582 PYTHON=$ac_cv_path_PYTHON
9583 if test -n "$PYTHON"; then
9584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9585 $as_echo "$PYTHON" >&6; }
9586 else
9587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9588 $as_echo "no" >&6; }
9589 fi
9590
9591
9592   test -n "$PYTHON" && break
9593 done
9594
9595 else
9596   # Report the value of PYTHON in configure's output in all cases.
9597   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9598 $as_echo_n "checking for PYTHON... " >&6; }
9599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9600 $as_echo "$PYTHON" >&6; }
9601 fi
9602
9603 if test x"$PYTHON" = x""; then
9604   as_fn_error $? "Python not found" "$LINENO" 5
9605 fi
9606
9607
9608 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9609 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9610 $as_echo "$as_me: using python $python_fullversion" >&6;}
9611 # python_fullversion is typically n.n.n plus some trailing junk
9612 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9613 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9614 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9615 # Reject unsupported Python versions as soon as practical.
9616 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9617   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9618 fi
9619
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9621 $as_echo_n "checking for Python distutils module... " >&6; }
9622 if "${PYTHON}" -c 'import distutils' 2>&5
9623 then
9624     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9625 $as_echo "yes" >&6; }
9626 else
9627     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9628 $as_echo "no" >&6; }
9629     as_fn_error $? "distutils module not found" "$LINENO" 5
9630 fi
9631
9632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9633 $as_echo_n "checking Python configuration directory... " >&6; }
9634 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9636 $as_echo "$python_configdir" >&6; }
9637
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9639 $as_echo_n "checking Python include directories... " >&6; }
9640 python_includespec=`${PYTHON} -c "
9641 import distutils.sysconfig
9642 a = '-I' + distutils.sysconfig.get_python_inc(False)
9643 b = '-I' + distutils.sysconfig.get_python_inc(True)
9644 if a == b:
9645     print(a)
9646 else:
9647     print(a + ' ' + b)"`
9648 if test "$PORTNAME" = win32 ; then
9649     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9650 fi
9651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9652 $as_echo "$python_includespec" >&6; }
9653
9654
9655
9656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9657 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9658
9659 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9660 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9661
9662 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9663 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9664 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9665 then
9666         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9667         found_shlib=1
9668 else
9669         # Otherwise, guess the base name of the shlib.
9670         # LDVERSION was added in Python 3.2, before that use VERSION,
9671         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9672         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9673         if test x"${python_ldversion}" != x""; then
9674                 ldlibrary="python${python_ldversion}"
9675         else
9676                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9677                 if test x"${python_version_var}" != x""; then
9678                         ldlibrary="python${python_version_var}"
9679                 else
9680                         ldlibrary="python${python_version}"
9681                 fi
9682         fi
9683         # Search for a likely-looking file.
9684         found_shlib=0
9685         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9686         do
9687                 # We don't know the platform DLSUFFIX here, so check 'em all.
9688                 for e in .so .dll .dylib .sl; do
9689                         if test -e "$d/lib${ldlibrary}$e"; then
9690                                 python_libdir="$d"
9691                                 found_shlib=1
9692                                 break 2
9693                         fi
9694                 done
9695         done
9696         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9697         # (".so.n.n") as well. However, check this only after failing to find
9698         # ".so" anywhere, because yet other platforms (Debian) put the .so
9699         # symlink in a different directory from the underlying versioned shlib.
9700         if test "$found_shlib" != 1; then
9701                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9702                 do
9703                         for f in "$d/lib${ldlibrary}.so."* ; do
9704                                 if test -e "$f"; then
9705                                         python_libdir="$d"
9706                                         found_shlib=1
9707                                         break 2
9708                                 fi
9709                         done
9710                 done
9711         fi
9712         # As usual, Windows has its own ideas.  Possible default library
9713         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9714         # and the "lib" prefix might not be there.
9715         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9716                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9717                 do
9718                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9719                                 if test -e "$f"; then
9720                                         python_libdir="$d"
9721                                         found_shlib=1
9722                                         break 2
9723                                 fi
9724                         done
9725                 done
9726         fi
9727 fi
9728 if test "$found_shlib" != 1; then
9729         as_fn_error $? "could not find shared library for Python
9730 You might have to rebuild your Python installation.  Refer to the
9731 documentation for details.  Use --without-python to disable building
9732 PL/Python." "$LINENO" 5
9733 fi
9734 python_libspec="-L${python_libdir} -l${ldlibrary}"
9735
9736 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9737
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9739 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9740
9741
9742
9743 fi
9744
9745 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9746   if test -z "$ZIC"; then
9747   for ac_prog in zic
9748 do
9749   # Extract the first word of "$ac_prog", so it can be a program name with args.
9750 set dummy $ac_prog; ac_word=$2
9751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9752 $as_echo_n "checking for $ac_word... " >&6; }
9753 if ${ac_cv_path_ZIC+:} false; then :
9754   $as_echo_n "(cached) " >&6
9755 else
9756   case $ZIC in
9757   [\\/]* | ?:[\\/]*)
9758   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9759   ;;
9760   *)
9761   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9762 for as_dir in $PATH
9763 do
9764   IFS=$as_save_IFS
9765   test -z "$as_dir" && as_dir=.
9766     for ac_exec_ext in '' $ac_executable_extensions; do
9767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9768     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9770     break 2
9771   fi
9772 done
9773   done
9774 IFS=$as_save_IFS
9775
9776   ;;
9777 esac
9778 fi
9779 ZIC=$ac_cv_path_ZIC
9780 if test -n "$ZIC"; then
9781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9782 $as_echo "$ZIC" >&6; }
9783 else
9784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9785 $as_echo "no" >&6; }
9786 fi
9787
9788
9789   test -n "$ZIC" && break
9790 done
9791
9792 else
9793   # Report the value of ZIC in configure's output in all cases.
9794   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9795 $as_echo_n "checking for ZIC... " >&6; }
9796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9797 $as_echo "$ZIC" >&6; }
9798 fi
9799
9800   if test -z "$ZIC"; then
9801     as_fn_error $? "
9802 When cross-compiling, either use the option --with-system-tzdata to use
9803 existing time-zone data, or set the environment variable ZIC to a zic
9804 program to use during the build." "$LINENO" 5
9805   fi
9806 fi
9807
9808 #
9809 # Pthreads
9810 #
9811 # For each platform, we need to know about any special compile and link
9812 # libraries, and whether the normal C function names are thread-safe.
9813 # See the comment at the top of src/port/thread.c for more information.
9814 # WIN32 doesn't need the pthread tests;  it always uses threads
9815 #
9816 # These tests are run before the library-tests, because linking with the
9817 # other libraries can pull in the pthread functions as a side-effect.  We
9818 # want to use the -pthread or similar flags directly, and not rely on
9819 # the side-effects of linking with some other library.
9820 #
9821 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
9822 # invocation below is the first one in the script, and autoconf generates
9823 # additional code for that, which must not be inside the if-block. AS_IF
9824 # knows how to do that.
9825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9826 $as_echo_n "checking for ANSI C header files... " >&6; }
9827 if ${ac_cv_header_stdc+:} false; then :
9828   $as_echo_n "(cached) " >&6
9829 else
9830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9831 /* end confdefs.h.  */
9832 #include <stdlib.h>
9833 #include <stdarg.h>
9834 #include <string.h>
9835 #include <float.h>
9836
9837 int
9838 main ()
9839 {
9840
9841   ;
9842   return 0;
9843 }
9844 _ACEOF
9845 if ac_fn_c_try_compile "$LINENO"; then :
9846   ac_cv_header_stdc=yes
9847 else
9848   ac_cv_header_stdc=no
9849 fi
9850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9851
9852 if test $ac_cv_header_stdc = yes; then
9853   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9855 /* end confdefs.h.  */
9856 #include <string.h>
9857
9858 _ACEOF
9859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9860   $EGREP "memchr" >/dev/null 2>&1; then :
9861
9862 else
9863   ac_cv_header_stdc=no
9864 fi
9865 rm -f conftest*
9866
9867 fi
9868
9869 if test $ac_cv_header_stdc = yes; then
9870   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9872 /* end confdefs.h.  */
9873 #include <stdlib.h>
9874
9875 _ACEOF
9876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9877   $EGREP "free" >/dev/null 2>&1; then :
9878
9879 else
9880   ac_cv_header_stdc=no
9881 fi
9882 rm -f conftest*
9883
9884 fi
9885
9886 if test $ac_cv_header_stdc = yes; then
9887   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9888   if test "$cross_compiling" = yes; then :
9889   :
9890 else
9891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9892 /* end confdefs.h.  */
9893 #include <ctype.h>
9894 #include <stdlib.h>
9895 #if ((' ' & 0x0FF) == 0x020)
9896 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9897 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9898 #else
9899 # define ISLOWER(c) \
9900                    (('a' <= (c) && (c) <= 'i') \
9901                      || ('j' <= (c) && (c) <= 'r') \
9902                      || ('s' <= (c) && (c) <= 'z'))
9903 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9904 #endif
9905
9906 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9907 int
9908 main ()
9909 {
9910   int i;
9911   for (i = 0; i < 256; i++)
9912     if (XOR (islower (i), ISLOWER (i))
9913         || toupper (i) != TOUPPER (i))
9914       return 2;
9915   return 0;
9916 }
9917 _ACEOF
9918 if ac_fn_c_try_run "$LINENO"; then :
9919
9920 else
9921   ac_cv_header_stdc=no
9922 fi
9923 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9924   conftest.$ac_objext conftest.beam conftest.$ac_ext
9925 fi
9926
9927 fi
9928 fi
9929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9930 $as_echo "$ac_cv_header_stdc" >&6; }
9931 if test $ac_cv_header_stdc = yes; then
9932
9933 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9934
9935 fi
9936
9937 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9938 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9939                   inttypes.h stdint.h unistd.h
9940 do :
9941   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9942 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9943 "
9944 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9945   cat >>confdefs.h <<_ACEOF
9946 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9947 _ACEOF
9948
9949 fi
9950
9951 done
9952
9953
9954 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
9955    # then
9956
9957
9958
9959 ac_ext=c
9960 ac_cpp='$CPP $CPPFLAGS'
9961 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9962 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9963 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9964
9965 ax_pthread_ok=no
9966
9967 # We used to check for pthread.h first, but this fails if pthread.h
9968 # requires special compiler flags (e.g. on Tru64 or Sequent).
9969 # It gets checked for in the link test anyway.
9970
9971 # First of all, check if the user has set any of the PTHREAD_LIBS,
9972 # etcetera environment variables, and if threads linking works using
9973 # them:
9974 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
9975         save_CFLAGS="$CFLAGS"
9976         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9977         save_LIBS="$LIBS"
9978         LIBS="$PTHREAD_LIBS $LIBS"
9979         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
9980 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
9981         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9982 /* end confdefs.h.  */
9983
9984 /* Override any GCC internal prototype to avoid an error.
9985    Use char because int might match the return type of a GCC
9986    builtin and then its argument prototype would still apply.  */
9987 #ifdef __cplusplus
9988 extern "C"
9989 #endif
9990 char pthread_join ();
9991 int
9992 main ()
9993 {
9994 return pthread_join ();
9995   ;
9996   return 0;
9997 }
9998 _ACEOF
9999 if ac_fn_c_try_link "$LINENO"; then :
10000   ax_pthread_ok=yes
10001 fi
10002 rm -f core conftest.err conftest.$ac_objext \
10003     conftest$ac_exeext conftest.$ac_ext
10004         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10005 $as_echo "$ax_pthread_ok" >&6; }
10006         if test x"$ax_pthread_ok" = xno; then
10007                 PTHREAD_LIBS=""
10008                 PTHREAD_CFLAGS=""
10009         fi
10010         LIBS="$save_LIBS"
10011         CFLAGS="$save_CFLAGS"
10012 fi
10013
10014 # We must check for the threads library under a number of different
10015 # names; the ordering is very important because some systems
10016 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10017 # libraries is broken (non-POSIX).
10018
10019 # Create a list of thread flags to try.  Items starting with a "-" are
10020 # C compiler flags, and other items are library names, except for "none"
10021 # which indicates that we try without any flags at all, and "pthread-config"
10022 # which is a program returning the flags for the Pth emulation library.
10023
10024 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
10025
10026 # The ordering *is* (sometimes) important.  Some notes on the
10027 # individual items follow:
10028
10029 # pthreads: AIX (must check this before -lpthread)
10030 # none: in case threads are in libc; should be tried before -Kthread and
10031 #       other compiler flags to prevent continual compiler warnings
10032 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10033 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10034 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10035 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10036 # -pthreads: Solaris/gcc
10037 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10038 #      doesn't hurt to check since this sometimes defines pthreads and
10039 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10040 #      is present but should not be used directly)
10041 # -mthreads: Mingw32/gcc, Lynx/gcc
10042 # pthread: Linux, etcetera
10043 # --thread-safe: KAI C++
10044 # pthread-config: use pthread-config program (for GNU Pth library)
10045
10046 case $host_os in
10047
10048         hpux*)
10049
10050         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10051         # multi-threading and also sets -lpthread."
10052
10053         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10054         ;;
10055
10056         openedition*)
10057
10058         # IBM z/OS requires a feature-test macro to be defined in order to
10059         # enable POSIX threads at all, so give the user a hint if this is
10060         # not set. (We don't define these ourselves, as they can affect
10061         # other portions of the system API in unpredictable ways.)
10062
10063         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10064 /* end confdefs.h.  */
10065
10066 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10067              AX_PTHREAD_ZOS_MISSING
10068 #            endif
10069
10070 _ACEOF
10071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10072   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10073   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10074 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10075 fi
10076 rm -f conftest*
10077
10078         ;;
10079
10080         solaris*)
10081
10082         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
10083         # check that first.  On some older versions, libc contains stubbed
10084         # (non-functional) versions of the pthreads routines, so link-based
10085         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
10086         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
10087         # a function called by this macro, so we could check for that, but
10088         # who knows whether they'll stub that too in a future libc.)  So
10089         # we'll look for -pthreads and -lpthread shortly thereafter.
10090
10091         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
10092         ;;
10093 esac
10094
10095 # Older versions of Clang only give a warning instead of an error for an
10096 # unrecognized option, unless we specify -Werror. (We throw in some extra
10097 # Clang warning flags for good measure.)
10098
10099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
10100 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
10101 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
10102   $as_echo_n "(cached) " >&6
10103 else
10104   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
10105      save_CFLAGS="$CFLAGS"
10106      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
10107      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
10108      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10109 /* end confdefs.h.  */
10110 int foo(void);
10111 int
10112 main ()
10113 {
10114 foo()
10115   ;
10116   return 0;
10117 }
10118 _ACEOF
10119 if ac_fn_c_try_compile "$LINENO"; then :
10120   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
10121 else
10122   ax_cv_PTHREAD_REJECT_UNKNOWN=no
10123 fi
10124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10125      CFLAGS="$save_CFLAGS"
10126
10127 fi
10128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
10129 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
10130 ax_pthread_extra_flags=
10131 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
10132   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
10133 fi
10134
10135 if test x"$ax_pthread_ok" = xno; then
10136 for flag in $ax_pthread_flags; do
10137
10138         case $flag in
10139                 none)
10140                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10141 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10142                 ;;
10143
10144                 -mt,pthread)
10145                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10146 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10147                 PTHREAD_CFLAGS="-mt"
10148                 PTHREAD_LIBS="-lpthread"
10149                 ;;
10150
10151                 -*)
10152                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
10153 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
10154                 PTHREAD_CFLAGS="$flag"
10155                 ;;
10156
10157                 pthread-config)
10158                 # Extract the first word of "pthread-config", so it can be a program name with args.
10159 set dummy pthread-config; ac_word=$2
10160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10161 $as_echo_n "checking for $ac_word... " >&6; }
10162 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10163   $as_echo_n "(cached) " >&6
10164 else
10165   if test -n "$ax_pthread_config"; then
10166   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10167 else
10168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10169 for as_dir in $PATH
10170 do
10171   IFS=$as_save_IFS
10172   test -z "$as_dir" && as_dir=.
10173     for ac_exec_ext in '' $ac_executable_extensions; do
10174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10175     ac_cv_prog_ax_pthread_config="yes"
10176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10177     break 2
10178   fi
10179 done
10180   done
10181 IFS=$as_save_IFS
10182
10183   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10184 fi
10185 fi
10186 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10187 if test -n "$ax_pthread_config"; then
10188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10189 $as_echo "$ax_pthread_config" >&6; }
10190 else
10191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10192 $as_echo "no" >&6; }
10193 fi
10194
10195
10196                 if test x"$ax_pthread_config" = xno; then continue; fi
10197                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10198                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10199                 ;;
10200
10201                 *)
10202                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
10203 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
10204                 PTHREAD_LIBS="-l$flag"
10205                 ;;
10206         esac
10207
10208         save_LIBS="$LIBS"
10209         save_CFLAGS="$CFLAGS"
10210         LIBS="$PTHREAD_LIBS $LIBS"
10211         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
10212
10213         # Check for various functions.  We must include pthread.h,
10214         # since some functions may be macros.  (On the Sequent, we
10215         # need a special flag -Kthread to make this header compile.)
10216         # We check for pthread_join because it is in -lpthread on IRIX
10217         # while pthread_create is in libc.  We check for pthread_attr_init
10218         # due to DEC craziness with -lpthreads.  We check for
10219         # pthread_cleanup_push because it is one of the few pthread
10220         # functions on Solaris that doesn't have a non-functional libc stub.
10221         # We try pthread_create on general principles.
10222         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10223 /* end confdefs.h.  */
10224 #include <pthread.h>
10225                         static void routine(void *a) { a = 0; }
10226                         static void *start_routine(void *a) { return a; }
10227 int
10228 main ()
10229 {
10230 pthread_t th; pthread_attr_t attr;
10231                         pthread_create(&th, 0, start_routine, 0);
10232                         pthread_join(th, 0);
10233                         pthread_attr_init(&attr);
10234                         pthread_cleanup_push(routine, 0);
10235                         pthread_cleanup_pop(0) /* ; */
10236   ;
10237   return 0;
10238 }
10239 _ACEOF
10240 if ac_fn_c_try_link "$LINENO"; then :
10241   ax_pthread_ok=yes
10242 fi
10243 rm -f core conftest.err conftest.$ac_objext \
10244     conftest$ac_exeext conftest.$ac_ext
10245
10246         LIBS="$save_LIBS"
10247         CFLAGS="$save_CFLAGS"
10248
10249         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10250 $as_echo "$ax_pthread_ok" >&6; }
10251         if test "x$ax_pthread_ok" = xyes; then
10252                 break;
10253         fi
10254
10255         PTHREAD_LIBS=""
10256         PTHREAD_CFLAGS=""
10257 done
10258 fi
10259
10260 # Various other checks:
10261 if test "x$ax_pthread_ok" = xyes; then
10262         save_LIBS="$LIBS"
10263         LIBS="$PTHREAD_LIBS $LIBS"
10264         save_CFLAGS="$CFLAGS"
10265         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10266
10267         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10268         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10269 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10270 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10271   $as_echo_n "(cached) " >&6
10272 else
10273   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10274              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10275                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10276 /* end confdefs.h.  */
10277 #include <pthread.h>
10278 int
10279 main ()
10280 {
10281 int attr = $attr; return attr /* ; */
10282   ;
10283   return 0;
10284 }
10285 _ACEOF
10286 if ac_fn_c_try_link "$LINENO"; then :
10287   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
10288 fi
10289 rm -f core conftest.err conftest.$ac_objext \
10290     conftest$ac_exeext conftest.$ac_ext
10291              done
10292
10293 fi
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10295 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10296         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
10297                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
10298
10299 cat >>confdefs.h <<_ACEOF
10300 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10301 _ACEOF
10302
10303 fi
10304
10305         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
10306 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
10307 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10308   $as_echo_n "(cached) " >&6
10309 else
10310   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10311              ax_pthread_special_flags_added=no
10312              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10313 /* end confdefs.h.  */
10314
10315 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
10316                   AX_PTHREAD_NEED_SPECIAL_FLAG
10317 #                 endif
10318
10319 _ACEOF
10320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10321   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
10322   case $host_os in
10323                   aix* | freebsd*)
10324                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
10325                   ;;
10326                   darwin* | hpux* | osf* | solaris*)
10327                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
10328                   ;;
10329                   esac
10330
10331 fi
10332 rm -f conftest*
10333
10334
10335 fi
10336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10337 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10338         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10339                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10340   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10341                ax_pthread_special_flags_added=yes
10342 fi
10343
10344         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10345 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10346 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10347   $as_echo_n "(cached) " >&6
10348 else
10349   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10350 /* end confdefs.h.  */
10351 #include <pthread.h>
10352 int
10353 main ()
10354 {
10355 int i = PTHREAD_PRIO_INHERIT;
10356   ;
10357   return 0;
10358 }
10359 _ACEOF
10360 if ac_fn_c_try_link "$LINENO"; then :
10361   ax_cv_PTHREAD_PRIO_INHERIT=yes
10362 else
10363   ax_cv_PTHREAD_PRIO_INHERIT=no
10364 fi
10365 rm -f core conftest.err conftest.$ac_objext \
10366     conftest$ac_exeext conftest.$ac_ext
10367
10368 fi
10369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10370 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10371         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
10372
10373 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10374
10375 fi
10376
10377         LIBS="$save_LIBS"
10378         CFLAGS="$save_CFLAGS"
10379
10380         # More AIX lossage: compile with *_r variant
10381         if test "x$GCC" != xyes; then
10382             case $host_os in
10383                 aix*)
10384                 case "x/$CC" in #(
10385   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10386     #handle absolute path differently from PATH based program lookup
10387                    case "x$CC" in #(
10388   x/*) :
10389     if as_fn_executable_p ${CC}_r; then :
10390   PTHREAD_CC="${CC}_r"
10391 fi ;; #(
10392   *) :
10393     for ac_prog in ${CC}_r
10394 do
10395   # Extract the first word of "$ac_prog", so it can be a program name with args.
10396 set dummy $ac_prog; ac_word=$2
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10398 $as_echo_n "checking for $ac_word... " >&6; }
10399 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10400   $as_echo_n "(cached) " >&6
10401 else
10402   if test -n "$PTHREAD_CC"; then
10403   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10404 else
10405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10406 for as_dir in $PATH
10407 do
10408   IFS=$as_save_IFS
10409   test -z "$as_dir" && as_dir=.
10410     for ac_exec_ext in '' $ac_executable_extensions; do
10411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10412     ac_cv_prog_PTHREAD_CC="$ac_prog"
10413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10414     break 2
10415   fi
10416 done
10417   done
10418 IFS=$as_save_IFS
10419
10420 fi
10421 fi
10422 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10423 if test -n "$PTHREAD_CC"; then
10424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10425 $as_echo "$PTHREAD_CC" >&6; }
10426 else
10427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10428 $as_echo "no" >&6; }
10429 fi
10430
10431
10432   test -n "$PTHREAD_CC" && break
10433 done
10434 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10435  ;;
10436 esac ;; #(
10437   *) :
10438      ;;
10439 esac
10440                 ;;
10441             esac
10442         fi
10443 fi
10444
10445 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10446
10447
10448
10449
10450
10451 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10452 if test x"$ax_pthread_ok" = xyes; then
10453
10454 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10455
10456         :
10457 else
10458         ax_pthread_ok=no
10459
10460 fi
10461 ac_ext=c
10462 ac_cpp='$CPP $CPPFLAGS'
10463 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10464 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10466
10467         # set thread flags
10468
10469 # Some platforms use these, so just define them.  They can't hurt if they
10470 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10471 # enables 5-arg getpwuid_r, among other things.
10472 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10473
10474 # Check for *_r functions
10475 _CFLAGS="$CFLAGS"
10476 _LIBS="$LIBS"
10477 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10478 LIBS="$LIBS $PTHREAD_LIBS"
10479
10480 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10481 if test "x$ac_cv_header_pthread_h" = xyes; then :
10482
10483 else
10484   as_fn_error $? "
10485 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10486 fi
10487
10488
10489
10490 for ac_func in strerror_r getpwuid_r gethostbyname_r
10491 do :
10492   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10493 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10494 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10495   cat >>confdefs.h <<_ACEOF
10496 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10497 _ACEOF
10498
10499 fi
10500 done
10501
10502
10503 # Do test here with the proper thread flags
10504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10505 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10506 if ${pgac_cv_func_strerror_r_int+:} false; then :
10507   $as_echo_n "(cached) " >&6
10508 else
10509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10510 /* end confdefs.h.  */
10511 #include <string.h>
10512 int
10513 main ()
10514 {
10515 #ifndef _AIX
10516 int strerror_r(int, char *, size_t);
10517 #else
10518 /* Older AIX has 'int' for the third argument so we don't test the args. */
10519 int strerror_r();
10520 #endif
10521   ;
10522   return 0;
10523 }
10524 _ACEOF
10525 if ac_fn_c_try_compile "$LINENO"; then :
10526   pgac_cv_func_strerror_r_int=yes
10527 else
10528   pgac_cv_func_strerror_r_int=no
10529 fi
10530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10531 fi
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10533 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10534 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10535
10536 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10537
10538 fi
10539
10540
10541 CFLAGS="$_CFLAGS"
10542 LIBS="$_LIBS"
10543
10544
10545 else
10546    # else
10547 # do not use values from template file
10548 PTHREAD_CFLAGS=
10549 PTHREAD_LIBS=
10550
10551 fi # fi
10552
10553
10554
10555
10556
10557 ##
10558 ## Libraries
10559 ##
10560 ## Most libraries are included only if they demonstrably provide a function
10561 ## we need, but libm is an exception: always include it, because there are
10562 ## too many compilers that play cute optimization games that will break
10563 ## probes for standard functions such as pow().
10564 ##
10565
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10567 $as_echo_n "checking for main in -lm... " >&6; }
10568 if ${ac_cv_lib_m_main+:} false; then :
10569   $as_echo_n "(cached) " >&6
10570 else
10571   ac_check_lib_save_LIBS=$LIBS
10572 LIBS="-lm  $LIBS"
10573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10574 /* end confdefs.h.  */
10575
10576
10577 int
10578 main ()
10579 {
10580 return main ();
10581   ;
10582   return 0;
10583 }
10584 _ACEOF
10585 if ac_fn_c_try_link "$LINENO"; then :
10586   ac_cv_lib_m_main=yes
10587 else
10588   ac_cv_lib_m_main=no
10589 fi
10590 rm -f core conftest.err conftest.$ac_objext \
10591     conftest$ac_exeext conftest.$ac_ext
10592 LIBS=$ac_check_lib_save_LIBS
10593 fi
10594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10595 $as_echo "$ac_cv_lib_m_main" >&6; }
10596 if test "x$ac_cv_lib_m_main" = xyes; then :
10597   cat >>confdefs.h <<_ACEOF
10598 #define HAVE_LIBM 1
10599 _ACEOF
10600
10601   LIBS="-lm $LIBS"
10602
10603 fi
10604
10605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10606 $as_echo_n "checking for library containing setproctitle... " >&6; }
10607 if ${ac_cv_search_setproctitle+:} false; then :
10608   $as_echo_n "(cached) " >&6
10609 else
10610   ac_func_search_save_LIBS=$LIBS
10611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10612 /* end confdefs.h.  */
10613
10614 /* Override any GCC internal prototype to avoid an error.
10615    Use char because int might match the return type of a GCC
10616    builtin and then its argument prototype would still apply.  */
10617 #ifdef __cplusplus
10618 extern "C"
10619 #endif
10620 char setproctitle ();
10621 int
10622 main ()
10623 {
10624 return setproctitle ();
10625   ;
10626   return 0;
10627 }
10628 _ACEOF
10629 for ac_lib in '' util; do
10630   if test -z "$ac_lib"; then
10631     ac_res="none required"
10632   else
10633     ac_res=-l$ac_lib
10634     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10635   fi
10636   if ac_fn_c_try_link "$LINENO"; then :
10637   ac_cv_search_setproctitle=$ac_res
10638 fi
10639 rm -f core conftest.err conftest.$ac_objext \
10640     conftest$ac_exeext
10641   if ${ac_cv_search_setproctitle+:} false; then :
10642   break
10643 fi
10644 done
10645 if ${ac_cv_search_setproctitle+:} false; then :
10646
10647 else
10648   ac_cv_search_setproctitle=no
10649 fi
10650 rm conftest.$ac_ext
10651 LIBS=$ac_func_search_save_LIBS
10652 fi
10653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
10654 $as_echo "$ac_cv_search_setproctitle" >&6; }
10655 ac_res=$ac_cv_search_setproctitle
10656 if test "$ac_res" != no; then :
10657   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10658
10659 fi
10660
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10662 $as_echo_n "checking for library containing dlopen... " >&6; }
10663 if ${ac_cv_search_dlopen+:} false; then :
10664   $as_echo_n "(cached) " >&6
10665 else
10666   ac_func_search_save_LIBS=$LIBS
10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10668 /* end confdefs.h.  */
10669
10670 /* Override any GCC internal prototype to avoid an error.
10671    Use char because int might match the return type of a GCC
10672    builtin and then its argument prototype would still apply.  */
10673 #ifdef __cplusplus
10674 extern "C"
10675 #endif
10676 char dlopen ();
10677 int
10678 main ()
10679 {
10680 return dlopen ();
10681   ;
10682   return 0;
10683 }
10684 _ACEOF
10685 for ac_lib in '' dl; do
10686   if test -z "$ac_lib"; then
10687     ac_res="none required"
10688   else
10689     ac_res=-l$ac_lib
10690     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10691   fi
10692   if ac_fn_c_try_link "$LINENO"; then :
10693   ac_cv_search_dlopen=$ac_res
10694 fi
10695 rm -f core conftest.err conftest.$ac_objext \
10696     conftest$ac_exeext
10697   if ${ac_cv_search_dlopen+:} false; then :
10698   break
10699 fi
10700 done
10701 if ${ac_cv_search_dlopen+:} false; then :
10702
10703 else
10704   ac_cv_search_dlopen=no
10705 fi
10706 rm conftest.$ac_ext
10707 LIBS=$ac_func_search_save_LIBS
10708 fi
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10710 $as_echo "$ac_cv_search_dlopen" >&6; }
10711 ac_res=$ac_cv_search_dlopen
10712 if test "$ac_res" != no; then :
10713   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10714
10715 fi
10716
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
10718 $as_echo_n "checking for library containing socket... " >&6; }
10719 if ${ac_cv_search_socket+:} false; then :
10720   $as_echo_n "(cached) " >&6
10721 else
10722   ac_func_search_save_LIBS=$LIBS
10723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10724 /* end confdefs.h.  */
10725
10726 /* Override any GCC internal prototype to avoid an error.
10727    Use char because int might match the return type of a GCC
10728    builtin and then its argument prototype would still apply.  */
10729 #ifdef __cplusplus
10730 extern "C"
10731 #endif
10732 char socket ();
10733 int
10734 main ()
10735 {
10736 return socket ();
10737   ;
10738   return 0;
10739 }
10740 _ACEOF
10741 for ac_lib in '' socket ws2_32; do
10742   if test -z "$ac_lib"; then
10743     ac_res="none required"
10744   else
10745     ac_res=-l$ac_lib
10746     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10747   fi
10748   if ac_fn_c_try_link "$LINENO"; then :
10749   ac_cv_search_socket=$ac_res
10750 fi
10751 rm -f core conftest.err conftest.$ac_objext \
10752     conftest$ac_exeext
10753   if ${ac_cv_search_socket+:} false; then :
10754   break
10755 fi
10756 done
10757 if ${ac_cv_search_socket+:} false; then :
10758
10759 else
10760   ac_cv_search_socket=no
10761 fi
10762 rm conftest.$ac_ext
10763 LIBS=$ac_func_search_save_LIBS
10764 fi
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
10766 $as_echo "$ac_cv_search_socket" >&6; }
10767 ac_res=$ac_cv_search_socket
10768 if test "$ac_res" != no; then :
10769   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10770
10771 fi
10772
10773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
10774 $as_echo_n "checking for library containing shl_load... " >&6; }
10775 if ${ac_cv_search_shl_load+:} false; then :
10776   $as_echo_n "(cached) " >&6
10777 else
10778   ac_func_search_save_LIBS=$LIBS
10779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10780 /* end confdefs.h.  */
10781
10782 /* Override any GCC internal prototype to avoid an error.
10783    Use char because int might match the return type of a GCC
10784    builtin and then its argument prototype would still apply.  */
10785 #ifdef __cplusplus
10786 extern "C"
10787 #endif
10788 char shl_load ();
10789 int
10790 main ()
10791 {
10792 return shl_load ();
10793   ;
10794   return 0;
10795 }
10796 _ACEOF
10797 for ac_lib in '' dld; do
10798   if test -z "$ac_lib"; then
10799     ac_res="none required"
10800   else
10801     ac_res=-l$ac_lib
10802     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10803   fi
10804   if ac_fn_c_try_link "$LINENO"; then :
10805   ac_cv_search_shl_load=$ac_res
10806 fi
10807 rm -f core conftest.err conftest.$ac_objext \
10808     conftest$ac_exeext
10809   if ${ac_cv_search_shl_load+:} false; then :
10810   break
10811 fi
10812 done
10813 if ${ac_cv_search_shl_load+:} false; then :
10814
10815 else
10816   ac_cv_search_shl_load=no
10817 fi
10818 rm conftest.$ac_ext
10819 LIBS=$ac_func_search_save_LIBS
10820 fi
10821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
10822 $as_echo "$ac_cv_search_shl_load" >&6; }
10823 ac_res=$ac_cv_search_shl_load
10824 if test "$ac_res" != no; then :
10825   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10826
10827 fi
10828
10829 # We only use libld in port/dynloader/aix.c
10830 case $host_os in
10831      aix*)
10832         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
10833 $as_echo_n "checking for library containing ldopen... " >&6; }
10834 if ${ac_cv_search_ldopen+:} false; then :
10835   $as_echo_n "(cached) " >&6
10836 else
10837   ac_func_search_save_LIBS=$LIBS
10838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10839 /* end confdefs.h.  */
10840
10841 /* Override any GCC internal prototype to avoid an error.
10842    Use char because int might match the return type of a GCC
10843    builtin and then its argument prototype would still apply.  */
10844 #ifdef __cplusplus
10845 extern "C"
10846 #endif
10847 char ldopen ();
10848 int
10849 main ()
10850 {
10851 return ldopen ();
10852   ;
10853   return 0;
10854 }
10855 _ACEOF
10856 for ac_lib in '' ld; do
10857   if test -z "$ac_lib"; then
10858     ac_res="none required"
10859   else
10860     ac_res=-l$ac_lib
10861     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10862   fi
10863   if ac_fn_c_try_link "$LINENO"; then :
10864   ac_cv_search_ldopen=$ac_res
10865 fi
10866 rm -f core conftest.err conftest.$ac_objext \
10867     conftest$ac_exeext
10868   if ${ac_cv_search_ldopen+:} false; then :
10869   break
10870 fi
10871 done
10872 if ${ac_cv_search_ldopen+:} false; then :
10873
10874 else
10875   ac_cv_search_ldopen=no
10876 fi
10877 rm conftest.$ac_ext
10878 LIBS=$ac_func_search_save_LIBS
10879 fi
10880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
10881 $as_echo "$ac_cv_search_ldopen" >&6; }
10882 ac_res=$ac_cv_search_ldopen
10883 if test "$ac_res" != no; then :
10884   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10885
10886 fi
10887
10888         ;;
10889 esac
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
10891 $as_echo_n "checking for library containing getopt_long... " >&6; }
10892 if ${ac_cv_search_getopt_long+:} false; then :
10893   $as_echo_n "(cached) " >&6
10894 else
10895   ac_func_search_save_LIBS=$LIBS
10896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10897 /* end confdefs.h.  */
10898
10899 /* Override any GCC internal prototype to avoid an error.
10900    Use char because int might match the return type of a GCC
10901    builtin and then its argument prototype would still apply.  */
10902 #ifdef __cplusplus
10903 extern "C"
10904 #endif
10905 char getopt_long ();
10906 int
10907 main ()
10908 {
10909 return getopt_long ();
10910   ;
10911   return 0;
10912 }
10913 _ACEOF
10914 for ac_lib in '' getopt gnugetopt; do
10915   if test -z "$ac_lib"; then
10916     ac_res="none required"
10917   else
10918     ac_res=-l$ac_lib
10919     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10920   fi
10921   if ac_fn_c_try_link "$LINENO"; then :
10922   ac_cv_search_getopt_long=$ac_res
10923 fi
10924 rm -f core conftest.err conftest.$ac_objext \
10925     conftest$ac_exeext
10926   if ${ac_cv_search_getopt_long+:} false; then :
10927   break
10928 fi
10929 done
10930 if ${ac_cv_search_getopt_long+:} false; then :
10931
10932 else
10933   ac_cv_search_getopt_long=no
10934 fi
10935 rm conftest.$ac_ext
10936 LIBS=$ac_func_search_save_LIBS
10937 fi
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
10939 $as_echo "$ac_cv_search_getopt_long" >&6; }
10940 ac_res=$ac_cv_search_getopt_long
10941 if test "$ac_res" != no; then :
10942   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10943
10944 fi
10945
10946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
10947 $as_echo_n "checking for library containing crypt... " >&6; }
10948 if ${ac_cv_search_crypt+:} false; then :
10949   $as_echo_n "(cached) " >&6
10950 else
10951   ac_func_search_save_LIBS=$LIBS
10952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10953 /* end confdefs.h.  */
10954
10955 /* Override any GCC internal prototype to avoid an error.
10956    Use char because int might match the return type of a GCC
10957    builtin and then its argument prototype would still apply.  */
10958 #ifdef __cplusplus
10959 extern "C"
10960 #endif
10961 char crypt ();
10962 int
10963 main ()
10964 {
10965 return crypt ();
10966   ;
10967   return 0;
10968 }
10969 _ACEOF
10970 for ac_lib in '' crypt; do
10971   if test -z "$ac_lib"; then
10972     ac_res="none required"
10973   else
10974     ac_res=-l$ac_lib
10975     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10976   fi
10977   if ac_fn_c_try_link "$LINENO"; then :
10978   ac_cv_search_crypt=$ac_res
10979 fi
10980 rm -f core conftest.err conftest.$ac_objext \
10981     conftest$ac_exeext
10982   if ${ac_cv_search_crypt+:} false; then :
10983   break
10984 fi
10985 done
10986 if ${ac_cv_search_crypt+:} false; then :
10987
10988 else
10989   ac_cv_search_crypt=no
10990 fi
10991 rm conftest.$ac_ext
10992 LIBS=$ac_func_search_save_LIBS
10993 fi
10994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
10995 $as_echo "$ac_cv_search_crypt" >&6; }
10996 ac_res=$ac_cv_search_crypt
10997 if test "$ac_res" != no; then :
10998   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10999
11000 fi
11001
11002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11003 $as_echo_n "checking for library containing shm_open... " >&6; }
11004 if ${ac_cv_search_shm_open+:} false; then :
11005   $as_echo_n "(cached) " >&6
11006 else
11007   ac_func_search_save_LIBS=$LIBS
11008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11009 /* end confdefs.h.  */
11010
11011 /* Override any GCC internal prototype to avoid an error.
11012    Use char because int might match the return type of a GCC
11013    builtin and then its argument prototype would still apply.  */
11014 #ifdef __cplusplus
11015 extern "C"
11016 #endif
11017 char shm_open ();
11018 int
11019 main ()
11020 {
11021 return shm_open ();
11022   ;
11023   return 0;
11024 }
11025 _ACEOF
11026 for ac_lib in '' rt; do
11027   if test -z "$ac_lib"; then
11028     ac_res="none required"
11029   else
11030     ac_res=-l$ac_lib
11031     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11032   fi
11033   if ac_fn_c_try_link "$LINENO"; then :
11034   ac_cv_search_shm_open=$ac_res
11035 fi
11036 rm -f core conftest.err conftest.$ac_objext \
11037     conftest$ac_exeext
11038   if ${ac_cv_search_shm_open+:} false; then :
11039   break
11040 fi
11041 done
11042 if ${ac_cv_search_shm_open+:} false; then :
11043
11044 else
11045   ac_cv_search_shm_open=no
11046 fi
11047 rm conftest.$ac_ext
11048 LIBS=$ac_func_search_save_LIBS
11049 fi
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11051 $as_echo "$ac_cv_search_shm_open" >&6; }
11052 ac_res=$ac_cv_search_shm_open
11053 if test "$ac_res" != no; then :
11054   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11055
11056 fi
11057
11058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11059 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11060 if ${ac_cv_search_shm_unlink+:} false; then :
11061   $as_echo_n "(cached) " >&6
11062 else
11063   ac_func_search_save_LIBS=$LIBS
11064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11065 /* end confdefs.h.  */
11066
11067 /* Override any GCC internal prototype to avoid an error.
11068    Use char because int might match the return type of a GCC
11069    builtin and then its argument prototype would still apply.  */
11070 #ifdef __cplusplus
11071 extern "C"
11072 #endif
11073 char shm_unlink ();
11074 int
11075 main ()
11076 {
11077 return shm_unlink ();
11078   ;
11079   return 0;
11080 }
11081 _ACEOF
11082 for ac_lib in '' rt; do
11083   if test -z "$ac_lib"; then
11084     ac_res="none required"
11085   else
11086     ac_res=-l$ac_lib
11087     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11088   fi
11089   if ac_fn_c_try_link "$LINENO"; then :
11090   ac_cv_search_shm_unlink=$ac_res
11091 fi
11092 rm -f core conftest.err conftest.$ac_objext \
11093     conftest$ac_exeext
11094   if ${ac_cv_search_shm_unlink+:} false; then :
11095   break
11096 fi
11097 done
11098 if ${ac_cv_search_shm_unlink+:} false; then :
11099
11100 else
11101   ac_cv_search_shm_unlink=no
11102 fi
11103 rm conftest.$ac_ext
11104 LIBS=$ac_func_search_save_LIBS
11105 fi
11106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11107 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11108 ac_res=$ac_cv_search_shm_unlink
11109 if test "$ac_res" != no; then :
11110   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11111
11112 fi
11113
11114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11115 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11116 if ${ac_cv_search_clock_gettime+:} false; then :
11117   $as_echo_n "(cached) " >&6
11118 else
11119   ac_func_search_save_LIBS=$LIBS
11120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11121 /* end confdefs.h.  */
11122
11123 /* Override any GCC internal prototype to avoid an error.
11124    Use char because int might match the return type of a GCC
11125    builtin and then its argument prototype would still apply.  */
11126 #ifdef __cplusplus
11127 extern "C"
11128 #endif
11129 char clock_gettime ();
11130 int
11131 main ()
11132 {
11133 return clock_gettime ();
11134   ;
11135   return 0;
11136 }
11137 _ACEOF
11138 for ac_lib in '' rt posix4; do
11139   if test -z "$ac_lib"; then
11140     ac_res="none required"
11141   else
11142     ac_res=-l$ac_lib
11143     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11144   fi
11145   if ac_fn_c_try_link "$LINENO"; then :
11146   ac_cv_search_clock_gettime=$ac_res
11147 fi
11148 rm -f core conftest.err conftest.$ac_objext \
11149     conftest$ac_exeext
11150   if ${ac_cv_search_clock_gettime+:} false; then :
11151   break
11152 fi
11153 done
11154 if ${ac_cv_search_clock_gettime+:} false; then :
11155
11156 else
11157   ac_cv_search_clock_gettime=no
11158 fi
11159 rm conftest.$ac_ext
11160 LIBS=$ac_func_search_save_LIBS
11161 fi
11162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11163 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11164 ac_res=$ac_cv_search_clock_gettime
11165 if test "$ac_res" != no; then :
11166   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11167
11168 fi
11169
11170 # Solaris:
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11172 $as_echo_n "checking for library containing fdatasync... " >&6; }
11173 if ${ac_cv_search_fdatasync+:} false; then :
11174   $as_echo_n "(cached) " >&6
11175 else
11176   ac_func_search_save_LIBS=$LIBS
11177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11178 /* end confdefs.h.  */
11179
11180 /* Override any GCC internal prototype to avoid an error.
11181    Use char because int might match the return type of a GCC
11182    builtin and then its argument prototype would still apply.  */
11183 #ifdef __cplusplus
11184 extern "C"
11185 #endif
11186 char fdatasync ();
11187 int
11188 main ()
11189 {
11190 return fdatasync ();
11191   ;
11192   return 0;
11193 }
11194 _ACEOF
11195 for ac_lib in '' rt posix4; do
11196   if test -z "$ac_lib"; then
11197     ac_res="none required"
11198   else
11199     ac_res=-l$ac_lib
11200     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11201   fi
11202   if ac_fn_c_try_link "$LINENO"; then :
11203   ac_cv_search_fdatasync=$ac_res
11204 fi
11205 rm -f core conftest.err conftest.$ac_objext \
11206     conftest$ac_exeext
11207   if ${ac_cv_search_fdatasync+:} false; then :
11208   break
11209 fi
11210 done
11211 if ${ac_cv_search_fdatasync+:} false; then :
11212
11213 else
11214   ac_cv_search_fdatasync=no
11215 fi
11216 rm conftest.$ac_ext
11217 LIBS=$ac_func_search_save_LIBS
11218 fi
11219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11220 $as_echo "$ac_cv_search_fdatasync" >&6; }
11221 ac_res=$ac_cv_search_fdatasync
11222 if test "$ac_res" != no; then :
11223   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11224
11225 fi
11226
11227 # Required for thread_test.c on Solaris
11228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11229 $as_echo_n "checking for library containing sched_yield... " >&6; }
11230 if ${ac_cv_search_sched_yield+:} false; then :
11231   $as_echo_n "(cached) " >&6
11232 else
11233   ac_func_search_save_LIBS=$LIBS
11234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11235 /* end confdefs.h.  */
11236
11237 /* Override any GCC internal prototype to avoid an error.
11238    Use char because int might match the return type of a GCC
11239    builtin and then its argument prototype would still apply.  */
11240 #ifdef __cplusplus
11241 extern "C"
11242 #endif
11243 char sched_yield ();
11244 int
11245 main ()
11246 {
11247 return sched_yield ();
11248   ;
11249   return 0;
11250 }
11251 _ACEOF
11252 for ac_lib in '' rt; do
11253   if test -z "$ac_lib"; then
11254     ac_res="none required"
11255   else
11256     ac_res=-l$ac_lib
11257     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11258   fi
11259   if ac_fn_c_try_link "$LINENO"; then :
11260   ac_cv_search_sched_yield=$ac_res
11261 fi
11262 rm -f core conftest.err conftest.$ac_objext \
11263     conftest$ac_exeext
11264   if ${ac_cv_search_sched_yield+:} false; then :
11265   break
11266 fi
11267 done
11268 if ${ac_cv_search_sched_yield+:} false; then :
11269
11270 else
11271   ac_cv_search_sched_yield=no
11272 fi
11273 rm conftest.$ac_ext
11274 LIBS=$ac_func_search_save_LIBS
11275 fi
11276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11277 $as_echo "$ac_cv_search_sched_yield" >&6; }
11278 ac_res=$ac_cv_search_sched_yield
11279 if test "$ac_res" != no; then :
11280   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11281
11282 fi
11283
11284 # Required for thread_test.c on Solaris 2.5:
11285 # Other ports use it too (HP-UX) so test unconditionally
11286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11287 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11288 if ${ac_cv_search_gethostbyname_r+:} false; then :
11289   $as_echo_n "(cached) " >&6
11290 else
11291   ac_func_search_save_LIBS=$LIBS
11292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11293 /* end confdefs.h.  */
11294
11295 /* Override any GCC internal prototype to avoid an error.
11296    Use char because int might match the return type of a GCC
11297    builtin and then its argument prototype would still apply.  */
11298 #ifdef __cplusplus
11299 extern "C"
11300 #endif
11301 char gethostbyname_r ();
11302 int
11303 main ()
11304 {
11305 return gethostbyname_r ();
11306   ;
11307   return 0;
11308 }
11309 _ACEOF
11310 for ac_lib in '' nsl; do
11311   if test -z "$ac_lib"; then
11312     ac_res="none required"
11313   else
11314     ac_res=-l$ac_lib
11315     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11316   fi
11317   if ac_fn_c_try_link "$LINENO"; then :
11318   ac_cv_search_gethostbyname_r=$ac_res
11319 fi
11320 rm -f core conftest.err conftest.$ac_objext \
11321     conftest$ac_exeext
11322   if ${ac_cv_search_gethostbyname_r+:} false; then :
11323   break
11324 fi
11325 done
11326 if ${ac_cv_search_gethostbyname_r+:} false; then :
11327
11328 else
11329   ac_cv_search_gethostbyname_r=no
11330 fi
11331 rm conftest.$ac_ext
11332 LIBS=$ac_func_search_save_LIBS
11333 fi
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11335 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11336 ac_res=$ac_cv_search_gethostbyname_r
11337 if test "$ac_res" != no; then :
11338   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11339
11340 fi
11341
11342 # Cygwin:
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11344 $as_echo_n "checking for library containing shmget... " >&6; }
11345 if ${ac_cv_search_shmget+:} false; then :
11346   $as_echo_n "(cached) " >&6
11347 else
11348   ac_func_search_save_LIBS=$LIBS
11349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11350 /* end confdefs.h.  */
11351
11352 /* Override any GCC internal prototype to avoid an error.
11353    Use char because int might match the return type of a GCC
11354    builtin and then its argument prototype would still apply.  */
11355 #ifdef __cplusplus
11356 extern "C"
11357 #endif
11358 char shmget ();
11359 int
11360 main ()
11361 {
11362 return shmget ();
11363   ;
11364   return 0;
11365 }
11366 _ACEOF
11367 for ac_lib in '' cygipc; do
11368   if test -z "$ac_lib"; then
11369     ac_res="none required"
11370   else
11371     ac_res=-l$ac_lib
11372     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11373   fi
11374   if ac_fn_c_try_link "$LINENO"; then :
11375   ac_cv_search_shmget=$ac_res
11376 fi
11377 rm -f core conftest.err conftest.$ac_objext \
11378     conftest$ac_exeext
11379   if ${ac_cv_search_shmget+:} false; then :
11380   break
11381 fi
11382 done
11383 if ${ac_cv_search_shmget+:} false; then :
11384
11385 else
11386   ac_cv_search_shmget=no
11387 fi
11388 rm conftest.$ac_ext
11389 LIBS=$ac_func_search_save_LIBS
11390 fi
11391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11392 $as_echo "$ac_cv_search_shmget" >&6; }
11393 ac_res=$ac_cv_search_shmget
11394 if test "$ac_res" != no; then :
11395   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11396
11397 fi
11398
11399
11400 if test "$with_readline" = yes; then
11401
11402
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11404 $as_echo_n "checking for library containing readline... " >&6; }
11405 if ${pgac_cv_check_readline+:} false; then :
11406   $as_echo_n "(cached) " >&6
11407 else
11408   pgac_cv_check_readline=no
11409 pgac_save_LIBS=$LIBS
11410 if test x"$with_libedit_preferred" != x"yes"
11411 then    READLINE_ORDER="-lreadline -ledit"
11412 else    READLINE_ORDER="-ledit -lreadline"
11413 fi
11414 for pgac_rllib in $READLINE_ORDER ; do
11415   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11416     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11417     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11418 /* end confdefs.h.  */
11419
11420 /* Override any GCC internal prototype to avoid an error.
11421    Use char because int might match the return type of a GCC
11422    builtin and then its argument prototype would still apply.  */
11423 #ifdef __cplusplus
11424 extern "C"
11425 #endif
11426 char readline ();
11427 int
11428 main ()
11429 {
11430 return readline ();
11431   ;
11432   return 0;
11433 }
11434 _ACEOF
11435 if ac_fn_c_try_link "$LINENO"; then :
11436
11437       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11438       # recognize dependent libraries; assume curses is needed if we didn't
11439       # find any dependency.
11440       case $host_os in
11441         netbsd* | openbsd* | irix*)
11442           if test x"$pgac_lib" = x"" ; then
11443             pgac_lib=" -lcurses"
11444           fi ;;
11445       esac
11446
11447       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11448       break
11449
11450 fi
11451 rm -f core conftest.err conftest.$ac_objext \
11452     conftest$ac_exeext conftest.$ac_ext
11453   done
11454   if test "$pgac_cv_check_readline" != no ; then
11455     break
11456   fi
11457 done
11458 LIBS=$pgac_save_LIBS
11459
11460 fi
11461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11462 $as_echo "$pgac_cv_check_readline" >&6; }
11463 if test "$pgac_cv_check_readline" != no ; then
11464   LIBS="$pgac_cv_check_readline $LIBS"
11465
11466 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11467
11468 fi
11469
11470
11471   if test x"$pgac_cv_check_readline" = x"no"; then
11472     as_fn_error $? "readline library not found
11473 If you have readline already installed, see config.log for details on the
11474 failure.  It is possible the compiler isn't looking in the proper directory.
11475 Use --without-readline to disable readline support." "$LINENO" 5
11476   fi
11477 fi
11478
11479 if test "$with_zlib" = yes; then
11480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11481 $as_echo_n "checking for inflate in -lz... " >&6; }
11482 if ${ac_cv_lib_z_inflate+:} false; then :
11483   $as_echo_n "(cached) " >&6
11484 else
11485   ac_check_lib_save_LIBS=$LIBS
11486 LIBS="-lz  $LIBS"
11487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11488 /* end confdefs.h.  */
11489
11490 /* Override any GCC internal prototype to avoid an error.
11491    Use char because int might match the return type of a GCC
11492    builtin and then its argument prototype would still apply.  */
11493 #ifdef __cplusplus
11494 extern "C"
11495 #endif
11496 char inflate ();
11497 int
11498 main ()
11499 {
11500 return inflate ();
11501   ;
11502   return 0;
11503 }
11504 _ACEOF
11505 if ac_fn_c_try_link "$LINENO"; then :
11506   ac_cv_lib_z_inflate=yes
11507 else
11508   ac_cv_lib_z_inflate=no
11509 fi
11510 rm -f core conftest.err conftest.$ac_objext \
11511     conftest$ac_exeext conftest.$ac_ext
11512 LIBS=$ac_check_lib_save_LIBS
11513 fi
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11515 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11516 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11517   cat >>confdefs.h <<_ACEOF
11518 #define HAVE_LIBZ 1
11519 _ACEOF
11520
11521   LIBS="-lz $LIBS"
11522
11523 else
11524   as_fn_error $? "zlib library not found
11525 If you have zlib already installed, see config.log for details on the
11526 failure.  It is possible the compiler isn't looking in the proper directory.
11527 Use --without-zlib to disable zlib support." "$LINENO" 5
11528 fi
11529
11530 fi
11531
11532 if test "$enable_spinlocks" = yes; then
11533
11534 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11535
11536 else
11537   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11538 *** Not using spinlocks will cause poor performance." >&5
11539 $as_echo "$as_me: WARNING:
11540 *** Not using spinlocks will cause poor performance." >&2;}
11541 fi
11542
11543 if test "$enable_atomics" = yes; then
11544
11545 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11546
11547 else
11548   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11549 *** Not using atomic operations will cause poor performance." >&5
11550 $as_echo "$as_me: WARNING:
11551 *** Not using atomic operations will cause poor performance." >&2;}
11552 fi
11553
11554 if test "$with_gssapi" = yes ; then
11555   if test "$PORTNAME" != "win32"; then
11556     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11557 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11558 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11559   $as_echo_n "(cached) " >&6
11560 else
11561   ac_func_search_save_LIBS=$LIBS
11562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11563 /* end confdefs.h.  */
11564
11565 /* Override any GCC internal prototype to avoid an error.
11566    Use char because int might match the return type of a GCC
11567    builtin and then its argument prototype would still apply.  */
11568 #ifdef __cplusplus
11569 extern "C"
11570 #endif
11571 char gss_init_sec_context ();
11572 int
11573 main ()
11574 {
11575 return gss_init_sec_context ();
11576   ;
11577   return 0;
11578 }
11579 _ACEOF
11580 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11581   if test -z "$ac_lib"; then
11582     ac_res="none required"
11583   else
11584     ac_res=-l$ac_lib
11585     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11586   fi
11587   if ac_fn_c_try_link "$LINENO"; then :
11588   ac_cv_search_gss_init_sec_context=$ac_res
11589 fi
11590 rm -f core conftest.err conftest.$ac_objext \
11591     conftest$ac_exeext
11592   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11593   break
11594 fi
11595 done
11596 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11597
11598 else
11599   ac_cv_search_gss_init_sec_context=no
11600 fi
11601 rm conftest.$ac_ext
11602 LIBS=$ac_func_search_save_LIBS
11603 fi
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11605 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11606 ac_res=$ac_cv_search_gss_init_sec_context
11607 if test "$ac_res" != no; then :
11608   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11609
11610 else
11611   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11612 fi
11613
11614   else
11615     LIBS="$LIBS -lgssapi32"
11616   fi
11617 fi
11618
11619 if test "$with_openssl" = yes ; then
11620     if test "$PORTNAME" != "win32"; then
11621      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11622 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11623 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11624   $as_echo_n "(cached) " >&6
11625 else
11626   ac_check_lib_save_LIBS=$LIBS
11627 LIBS="-lcrypto  $LIBS"
11628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11629 /* end confdefs.h.  */
11630
11631 /* Override any GCC internal prototype to avoid an error.
11632    Use char because int might match the return type of a GCC
11633    builtin and then its argument prototype would still apply.  */
11634 #ifdef __cplusplus
11635 extern "C"
11636 #endif
11637 char CRYPTO_new_ex_data ();
11638 int
11639 main ()
11640 {
11641 return CRYPTO_new_ex_data ();
11642   ;
11643   return 0;
11644 }
11645 _ACEOF
11646 if ac_fn_c_try_link "$LINENO"; then :
11647   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11648 else
11649   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11650 fi
11651 rm -f core conftest.err conftest.$ac_objext \
11652     conftest$ac_exeext conftest.$ac_ext
11653 LIBS=$ac_check_lib_save_LIBS
11654 fi
11655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11656 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11657 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11658   cat >>confdefs.h <<_ACEOF
11659 #define HAVE_LIBCRYPTO 1
11660 _ACEOF
11661
11662   LIBS="-lcrypto $LIBS"
11663
11664 else
11665   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11666 fi
11667
11668      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11669 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11670 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11671   $as_echo_n "(cached) " >&6
11672 else
11673   ac_check_lib_save_LIBS=$LIBS
11674 LIBS="-lssl  $LIBS"
11675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11676 /* end confdefs.h.  */
11677
11678 /* Override any GCC internal prototype to avoid an error.
11679    Use char because int might match the return type of a GCC
11680    builtin and then its argument prototype would still apply.  */
11681 #ifdef __cplusplus
11682 extern "C"
11683 #endif
11684 char SSL_new ();
11685 int
11686 main ()
11687 {
11688 return SSL_new ();
11689   ;
11690   return 0;
11691 }
11692 _ACEOF
11693 if ac_fn_c_try_link "$LINENO"; then :
11694   ac_cv_lib_ssl_SSL_new=yes
11695 else
11696   ac_cv_lib_ssl_SSL_new=no
11697 fi
11698 rm -f core conftest.err conftest.$ac_objext \
11699     conftest$ac_exeext conftest.$ac_ext
11700 LIBS=$ac_check_lib_save_LIBS
11701 fi
11702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
11703 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
11704 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
11705   cat >>confdefs.h <<_ACEOF
11706 #define HAVE_LIBSSL 1
11707 _ACEOF
11708
11709   LIBS="-lssl $LIBS"
11710
11711 else
11712   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
11713 fi
11714
11715   else
11716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
11717 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
11718 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11719   $as_echo_n "(cached) " >&6
11720 else
11721   ac_func_search_save_LIBS=$LIBS
11722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11723 /* end confdefs.h.  */
11724
11725 /* Override any GCC internal prototype to avoid an error.
11726    Use char because int might match the return type of a GCC
11727    builtin and then its argument prototype would still apply.  */
11728 #ifdef __cplusplus
11729 extern "C"
11730 #endif
11731 char CRYPTO_new_ex_data ();
11732 int
11733 main ()
11734 {
11735 return CRYPTO_new_ex_data ();
11736   ;
11737   return 0;
11738 }
11739 _ACEOF
11740 for ac_lib in '' eay32 crypto; do
11741   if test -z "$ac_lib"; then
11742     ac_res="none required"
11743   else
11744     ac_res=-l$ac_lib
11745     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11746   fi
11747   if ac_fn_c_try_link "$LINENO"; then :
11748   ac_cv_search_CRYPTO_new_ex_data=$ac_res
11749 fi
11750 rm -f core conftest.err conftest.$ac_objext \
11751     conftest$ac_exeext
11752   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11753   break
11754 fi
11755 done
11756 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11757
11758 else
11759   ac_cv_search_CRYPTO_new_ex_data=no
11760 fi
11761 rm conftest.$ac_ext
11762 LIBS=$ac_func_search_save_LIBS
11763 fi
11764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
11765 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
11766 ac_res=$ac_cv_search_CRYPTO_new_ex_data
11767 if test "$ac_res" != no; then :
11768   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11769
11770 else
11771   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
11772 fi
11773
11774      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
11775 $as_echo_n "checking for library containing SSL_new... " >&6; }
11776 if ${ac_cv_search_SSL_new+:} false; then :
11777   $as_echo_n "(cached) " >&6
11778 else
11779   ac_func_search_save_LIBS=$LIBS
11780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781 /* end confdefs.h.  */
11782
11783 /* Override any GCC internal prototype to avoid an error.
11784    Use char because int might match the return type of a GCC
11785    builtin and then its argument prototype would still apply.  */
11786 #ifdef __cplusplus
11787 extern "C"
11788 #endif
11789 char SSL_new ();
11790 int
11791 main ()
11792 {
11793 return SSL_new ();
11794   ;
11795   return 0;
11796 }
11797 _ACEOF
11798 for ac_lib in '' ssleay32 ssl; do
11799   if test -z "$ac_lib"; then
11800     ac_res="none required"
11801   else
11802     ac_res=-l$ac_lib
11803     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11804   fi
11805   if ac_fn_c_try_link "$LINENO"; then :
11806   ac_cv_search_SSL_new=$ac_res
11807 fi
11808 rm -f core conftest.err conftest.$ac_objext \
11809     conftest$ac_exeext
11810   if ${ac_cv_search_SSL_new+:} false; then :
11811   break
11812 fi
11813 done
11814 if ${ac_cv_search_SSL_new+:} false; then :
11815
11816 else
11817   ac_cv_search_SSL_new=no
11818 fi
11819 rm conftest.$ac_ext
11820 LIBS=$ac_func_search_save_LIBS
11821 fi
11822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
11823 $as_echo "$ac_cv_search_SSL_new" >&6; }
11824 ac_res=$ac_cv_search_SSL_new
11825 if test "$ac_res" != no; then :
11826   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11827
11828 else
11829   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
11830 fi
11831
11832   fi
11833   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
11834 do :
11835   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11836 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11837 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11838   cat >>confdefs.h <<_ACEOF
11839 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11840 _ACEOF
11841
11842 fi
11843 done
11844
11845   # Functions introduced in OpenSSL 1.1.0. We used to check for
11846   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
11847   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
11848   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
11849   # functions.
11850   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
11851 do :
11852   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11853 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11854 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11855   cat >>confdefs.h <<_ACEOF
11856 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11857 _ACEOF
11858
11859 fi
11860 done
11861
11862   # OpenSSL versions before 1.1.0 required setting callback functions, for
11863   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
11864   # function was removed.
11865   for ac_func in CRYPTO_lock
11866 do :
11867   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
11868 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
11869   cat >>confdefs.h <<_ACEOF
11870 #define HAVE_CRYPTO_LOCK 1
11871 _ACEOF
11872
11873 fi
11874 done
11875
11876 fi
11877
11878 if test "$with_pam" = yes ; then
11879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
11880 $as_echo_n "checking for pam_start in -lpam... " >&6; }
11881 if ${ac_cv_lib_pam_pam_start+:} false; then :
11882   $as_echo_n "(cached) " >&6
11883 else
11884   ac_check_lib_save_LIBS=$LIBS
11885 LIBS="-lpam  $LIBS"
11886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11887 /* end confdefs.h.  */
11888
11889 /* Override any GCC internal prototype to avoid an error.
11890    Use char because int might match the return type of a GCC
11891    builtin and then its argument prototype would still apply.  */
11892 #ifdef __cplusplus
11893 extern "C"
11894 #endif
11895 char pam_start ();
11896 int
11897 main ()
11898 {
11899 return pam_start ();
11900   ;
11901   return 0;
11902 }
11903 _ACEOF
11904 if ac_fn_c_try_link "$LINENO"; then :
11905   ac_cv_lib_pam_pam_start=yes
11906 else
11907   ac_cv_lib_pam_pam_start=no
11908 fi
11909 rm -f core conftest.err conftest.$ac_objext \
11910     conftest$ac_exeext conftest.$ac_ext
11911 LIBS=$ac_check_lib_save_LIBS
11912 fi
11913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
11914 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
11915 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
11916   cat >>confdefs.h <<_ACEOF
11917 #define HAVE_LIBPAM 1
11918 _ACEOF
11919
11920   LIBS="-lpam $LIBS"
11921
11922 else
11923   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
11924 fi
11925
11926 fi
11927
11928 if test "$with_libxml" = yes ; then
11929   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
11930 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
11931 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
11932   $as_echo_n "(cached) " >&6
11933 else
11934   ac_check_lib_save_LIBS=$LIBS
11935 LIBS="-lxml2  $LIBS"
11936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11937 /* end confdefs.h.  */
11938
11939 /* Override any GCC internal prototype to avoid an error.
11940    Use char because int might match the return type of a GCC
11941    builtin and then its argument prototype would still apply.  */
11942 #ifdef __cplusplus
11943 extern "C"
11944 #endif
11945 char xmlSaveToBuffer ();
11946 int
11947 main ()
11948 {
11949 return xmlSaveToBuffer ();
11950   ;
11951   return 0;
11952 }
11953 _ACEOF
11954 if ac_fn_c_try_link "$LINENO"; then :
11955   ac_cv_lib_xml2_xmlSaveToBuffer=yes
11956 else
11957   ac_cv_lib_xml2_xmlSaveToBuffer=no
11958 fi
11959 rm -f core conftest.err conftest.$ac_objext \
11960     conftest$ac_exeext conftest.$ac_ext
11961 LIBS=$ac_check_lib_save_LIBS
11962 fi
11963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
11964 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
11965 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
11966   cat >>confdefs.h <<_ACEOF
11967 #define HAVE_LIBXML2 1
11968 _ACEOF
11969
11970   LIBS="-lxml2 $LIBS"
11971
11972 else
11973   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
11974 fi
11975
11976 fi
11977
11978 if test "$with_libxslt" = yes ; then
11979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
11980 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
11981 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
11982   $as_echo_n "(cached) " >&6
11983 else
11984   ac_check_lib_save_LIBS=$LIBS
11985 LIBS="-lxslt  $LIBS"
11986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11987 /* end confdefs.h.  */
11988
11989 /* Override any GCC internal prototype to avoid an error.
11990    Use char because int might match the return type of a GCC
11991    builtin and then its argument prototype would still apply.  */
11992 #ifdef __cplusplus
11993 extern "C"
11994 #endif
11995 char xsltCleanupGlobals ();
11996 int
11997 main ()
11998 {
11999 return xsltCleanupGlobals ();
12000   ;
12001   return 0;
12002 }
12003 _ACEOF
12004 if ac_fn_c_try_link "$LINENO"; then :
12005   ac_cv_lib_xslt_xsltCleanupGlobals=yes
12006 else
12007   ac_cv_lib_xslt_xsltCleanupGlobals=no
12008 fi
12009 rm -f core conftest.err conftest.$ac_objext \
12010     conftest$ac_exeext conftest.$ac_ext
12011 LIBS=$ac_check_lib_save_LIBS
12012 fi
12013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12014 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12015 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12016   cat >>confdefs.h <<_ACEOF
12017 #define HAVE_LIBXSLT 1
12018 _ACEOF
12019
12020   LIBS="-lxslt $LIBS"
12021
12022 else
12023   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12024 fi
12025
12026 fi
12027
12028 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12029 if test "$with_ldap" = yes ; then
12030   _LIBS="$LIBS"
12031   if test "$PORTNAME" != "win32"; then
12032     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12033 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12034 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12035   $as_echo_n "(cached) " >&6
12036 else
12037   ac_check_lib_save_LIBS=$LIBS
12038 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12040 /* end confdefs.h.  */
12041
12042 /* Override any GCC internal prototype to avoid an error.
12043    Use char because int might match the return type of a GCC
12044    builtin and then its argument prototype would still apply.  */
12045 #ifdef __cplusplus
12046 extern "C"
12047 #endif
12048 char ldap_bind ();
12049 int
12050 main ()
12051 {
12052 return ldap_bind ();
12053   ;
12054   return 0;
12055 }
12056 _ACEOF
12057 if ac_fn_c_try_link "$LINENO"; then :
12058   ac_cv_lib_ldap_ldap_bind=yes
12059 else
12060   ac_cv_lib_ldap_ldap_bind=no
12061 fi
12062 rm -f core conftest.err conftest.$ac_objext \
12063     conftest$ac_exeext conftest.$ac_ext
12064 LIBS=$ac_check_lib_save_LIBS
12065 fi
12066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12067 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12068 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12069   cat >>confdefs.h <<_ACEOF
12070 #define HAVE_LIBLDAP 1
12071 _ACEOF
12072
12073   LIBS="-lldap $LIBS"
12074
12075 else
12076   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12077 fi
12078
12079     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12080     if test "$enable_thread_safety" = yes; then
12081       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12082       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12083 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12084 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12085   $as_echo_n "(cached) " >&6
12086 else
12087   ac_check_lib_save_LIBS=$LIBS
12088 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12090 /* end confdefs.h.  */
12091
12092 /* Override any GCC internal prototype to avoid an error.
12093    Use char because int might match the return type of a GCC
12094    builtin and then its argument prototype would still apply.  */
12095 #ifdef __cplusplus
12096 extern "C"
12097 #endif
12098 char ldap_simple_bind ();
12099 int
12100 main ()
12101 {
12102 return ldap_simple_bind ();
12103   ;
12104   return 0;
12105 }
12106 _ACEOF
12107 if ac_fn_c_try_link "$LINENO"; then :
12108   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12109 else
12110   ac_cv_lib_ldap_r_ldap_simple_bind=no
12111 fi
12112 rm -f core conftest.err conftest.$ac_objext \
12113     conftest$ac_exeext conftest.$ac_ext
12114 LIBS=$ac_check_lib_save_LIBS
12115 fi
12116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12117 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12118 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12119   cat >>confdefs.h <<_ACEOF
12120 #define HAVE_LIBLDAP_R 1
12121 _ACEOF
12122
12123   LIBS="-lldap_r $LIBS"
12124
12125 else
12126   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12127 fi
12128
12129       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12130     else
12131       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12132     fi
12133     for ac_func in ldap_initialize
12134 do :
12135   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12136 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12137   cat >>confdefs.h <<_ACEOF
12138 #define HAVE_LDAP_INITIALIZE 1
12139 _ACEOF
12140
12141 fi
12142 done
12143
12144   else
12145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12146 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12147 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12148   $as_echo_n "(cached) " >&6
12149 else
12150   ac_check_lib_save_LIBS=$LIBS
12151 LIBS="-lwldap32  $LIBS"
12152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12153 /* end confdefs.h.  */
12154
12155 /* Override any GCC internal prototype to avoid an error.
12156    Use char because int might match the return type of a GCC
12157    builtin and then its argument prototype would still apply.  */
12158 #ifdef __cplusplus
12159 extern "C"
12160 #endif
12161 char ldap_bind ();
12162 int
12163 main ()
12164 {
12165 return ldap_bind ();
12166   ;
12167   return 0;
12168 }
12169 _ACEOF
12170 if ac_fn_c_try_link "$LINENO"; then :
12171   ac_cv_lib_wldap32_ldap_bind=yes
12172 else
12173   ac_cv_lib_wldap32_ldap_bind=no
12174 fi
12175 rm -f core conftest.err conftest.$ac_objext \
12176     conftest$ac_exeext conftest.$ac_ext
12177 LIBS=$ac_check_lib_save_LIBS
12178 fi
12179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12180 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12181 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12182   cat >>confdefs.h <<_ACEOF
12183 #define HAVE_LIBWLDAP32 1
12184 _ACEOF
12185
12186   LIBS="-lwldap32 $LIBS"
12187
12188 else
12189   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12190 fi
12191
12192     LDAP_LIBS_FE="-lwldap32"
12193     LDAP_LIBS_BE="-lwldap32"
12194   fi
12195   LIBS="$_LIBS"
12196 fi
12197
12198
12199
12200 # for contrib/sepgsql
12201 if test "$with_selinux" = yes; then
12202   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12203 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12204 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12205   $as_echo_n "(cached) " >&6
12206 else
12207   ac_check_lib_save_LIBS=$LIBS
12208 LIBS="-lselinux  $LIBS"
12209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12210 /* end confdefs.h.  */
12211
12212 /* Override any GCC internal prototype to avoid an error.
12213    Use char because int might match the return type of a GCC
12214    builtin and then its argument prototype would still apply.  */
12215 #ifdef __cplusplus
12216 extern "C"
12217 #endif
12218 char security_compute_create_name ();
12219 int
12220 main ()
12221 {
12222 return security_compute_create_name ();
12223   ;
12224   return 0;
12225 }
12226 _ACEOF
12227 if ac_fn_c_try_link "$LINENO"; then :
12228   ac_cv_lib_selinux_security_compute_create_name=yes
12229 else
12230   ac_cv_lib_selinux_security_compute_create_name=no
12231 fi
12232 rm -f core conftest.err conftest.$ac_objext \
12233     conftest$ac_exeext conftest.$ac_ext
12234 LIBS=$ac_check_lib_save_LIBS
12235 fi
12236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12237 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12238 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12239   cat >>confdefs.h <<_ACEOF
12240 #define HAVE_LIBSELINUX 1
12241 _ACEOF
12242
12243   LIBS="-lselinux $LIBS"
12244
12245 else
12246   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12247 fi
12248
12249 fi
12250
12251 # for contrib/uuid-ossp
12252 if test "$with_uuid" = bsd ; then
12253   # On BSD, the UUID functions are in libc
12254   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12255 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12256   UUID_LIBS=""
12257 else
12258   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12259 fi
12260
12261 elif test "$with_uuid" = e2fs ; then
12262   # On macOS, the UUID functions are in libc
12263   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12264 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12265   UUID_LIBS=""
12266 else
12267   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12268 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12269 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12270   $as_echo_n "(cached) " >&6
12271 else
12272   ac_check_lib_save_LIBS=$LIBS
12273 LIBS="-luuid  $LIBS"
12274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12275 /* end confdefs.h.  */
12276
12277 /* Override any GCC internal prototype to avoid an error.
12278    Use char because int might match the return type of a GCC
12279    builtin and then its argument prototype would still apply.  */
12280 #ifdef __cplusplus
12281 extern "C"
12282 #endif
12283 char uuid_generate ();
12284 int
12285 main ()
12286 {
12287 return uuid_generate ();
12288   ;
12289   return 0;
12290 }
12291 _ACEOF
12292 if ac_fn_c_try_link "$LINENO"; then :
12293   ac_cv_lib_uuid_uuid_generate=yes
12294 else
12295   ac_cv_lib_uuid_uuid_generate=no
12296 fi
12297 rm -f core conftest.err conftest.$ac_objext \
12298     conftest$ac_exeext conftest.$ac_ext
12299 LIBS=$ac_check_lib_save_LIBS
12300 fi
12301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12302 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12303 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12304   UUID_LIBS="-luuid"
12305 else
12306   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12307 fi
12308
12309 fi
12310
12311 elif test "$with_uuid" = ossp ; then
12312   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12313 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12314 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12315   $as_echo_n "(cached) " >&6
12316 else
12317   ac_check_lib_save_LIBS=$LIBS
12318 LIBS="-lossp-uuid  $LIBS"
12319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12320 /* end confdefs.h.  */
12321
12322 /* Override any GCC internal prototype to avoid an error.
12323    Use char because int might match the return type of a GCC
12324    builtin and then its argument prototype would still apply.  */
12325 #ifdef __cplusplus
12326 extern "C"
12327 #endif
12328 char uuid_export ();
12329 int
12330 main ()
12331 {
12332 return uuid_export ();
12333   ;
12334   return 0;
12335 }
12336 _ACEOF
12337 if ac_fn_c_try_link "$LINENO"; then :
12338   ac_cv_lib_ossp_uuid_uuid_export=yes
12339 else
12340   ac_cv_lib_ossp_uuid_uuid_export=no
12341 fi
12342 rm -f core conftest.err conftest.$ac_objext \
12343     conftest$ac_exeext conftest.$ac_ext
12344 LIBS=$ac_check_lib_save_LIBS
12345 fi
12346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12347 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12348 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12349   UUID_LIBS="-lossp-uuid"
12350 else
12351   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12352 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12353 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12354   $as_echo_n "(cached) " >&6
12355 else
12356   ac_check_lib_save_LIBS=$LIBS
12357 LIBS="-luuid  $LIBS"
12358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12359 /* end confdefs.h.  */
12360
12361 /* Override any GCC internal prototype to avoid an error.
12362    Use char because int might match the return type of a GCC
12363    builtin and then its argument prototype would still apply.  */
12364 #ifdef __cplusplus
12365 extern "C"
12366 #endif
12367 char uuid_export ();
12368 int
12369 main ()
12370 {
12371 return uuid_export ();
12372   ;
12373   return 0;
12374 }
12375 _ACEOF
12376 if ac_fn_c_try_link "$LINENO"; then :
12377   ac_cv_lib_uuid_uuid_export=yes
12378 else
12379   ac_cv_lib_uuid_uuid_export=no
12380 fi
12381 rm -f core conftest.err conftest.$ac_objext \
12382     conftest$ac_exeext conftest.$ac_ext
12383 LIBS=$ac_check_lib_save_LIBS
12384 fi
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12386 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12387 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12388   UUID_LIBS="-luuid"
12389 else
12390   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12391 fi
12392
12393 fi
12394
12395 fi
12396
12397
12398
12399 ##
12400 ## Header files
12401 ##
12402
12403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12404 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12405 if ${ac_cv_header_stdbool_h+:} false; then :
12406   $as_echo_n "(cached) " >&6
12407 else
12408   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12409 /* end confdefs.h.  */
12410
12411              #include <stdbool.h>
12412              #ifndef bool
12413               "error: bool is not defined"
12414              #endif
12415              #ifndef false
12416               "error: false is not defined"
12417              #endif
12418              #if false
12419               "error: false is not 0"
12420              #endif
12421              #ifndef true
12422               "error: true is not defined"
12423              #endif
12424              #if true != 1
12425               "error: true is not 1"
12426              #endif
12427              #ifndef __bool_true_false_are_defined
12428               "error: __bool_true_false_are_defined is not defined"
12429              #endif
12430
12431              struct s { _Bool s: 1; _Bool t; } s;
12432
12433              char a[true == 1 ? 1 : -1];
12434              char b[false == 0 ? 1 : -1];
12435              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12436              char d[(bool) 0.5 == true ? 1 : -1];
12437              /* See body of main program for 'e'.  */
12438              char f[(_Bool) 0.0 == false ? 1 : -1];
12439              char g[true];
12440              char h[sizeof (_Bool)];
12441              char i[sizeof s.t];
12442              enum { j = false, k = true, l = false * true, m = true * 256 };
12443              /* The following fails for
12444                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12445              _Bool n[m];
12446              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12447              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12448              /* Catch a bug in an HP-UX C compiler.  See
12449                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12450                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12451               */
12452              _Bool q = true;
12453              _Bool *pq = &q;
12454
12455 int
12456 main ()
12457 {
12458
12459              bool e = &s;
12460              *pq |= q;
12461              *pq |= ! q;
12462              /* Refer to every declared value, to avoid compiler optimizations.  */
12463              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12464                      + !m + !n + !o + !p + !q + !pq);
12465
12466   ;
12467   return 0;
12468 }
12469 _ACEOF
12470 if ac_fn_c_try_compile "$LINENO"; then :
12471   ac_cv_header_stdbool_h=yes
12472 else
12473   ac_cv_header_stdbool_h=no
12474 fi
12475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12476 fi
12477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12478 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12479    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12480 if test "x$ac_cv_type__Bool" = xyes; then :
12481
12482 cat >>confdefs.h <<_ACEOF
12483 #define HAVE__BOOL 1
12484 _ACEOF
12485
12486
12487 fi
12488
12489
12490 if test $ac_cv_header_stdbool_h = yes; then
12491
12492 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12493
12494 fi
12495
12496
12497 for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.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
12498 do :
12499   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12500 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12501 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12502   cat >>confdefs.h <<_ACEOF
12503 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12504 _ACEOF
12505
12506 fi
12507
12508 done
12509
12510
12511 # On BSD, test for net/if.h will fail unless sys/socket.h
12512 # is included first.
12513 for ac_header in net/if.h
12514 do :
12515   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12516 #include <sys/socket.h>
12517
12518 "
12519 if test "x$ac_cv_header_net_if_h" = xyes; then :
12520   cat >>confdefs.h <<_ACEOF
12521 #define HAVE_NET_IF_H 1
12522 _ACEOF
12523
12524 fi
12525
12526 done
12527
12528
12529 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12530 # is included first.
12531 for ac_header in sys/ucred.h
12532 do :
12533   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12534 #include <sys/param.h>
12535
12536 "
12537 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12538   cat >>confdefs.h <<_ACEOF
12539 #define HAVE_SYS_UCRED_H 1
12540 _ACEOF
12541
12542 fi
12543
12544 done
12545
12546
12547 # At least on IRIX, test for netinet/tcp.h will fail unless
12548 # netinet/in.h is included first.
12549 for ac_header in netinet/tcp.h
12550 do :
12551   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12552 #include <netinet/in.h>
12553
12554 "
12555 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12556   cat >>confdefs.h <<_ACEOF
12557 #define HAVE_NETINET_TCP_H 1
12558 _ACEOF
12559
12560 fi
12561
12562 done
12563
12564
12565 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12566   for ac_header in readline/readline.h
12567 do :
12568   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12569 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12570   cat >>confdefs.h <<_ACEOF
12571 #define HAVE_READLINE_READLINE_H 1
12572 _ACEOF
12573
12574 else
12575   for ac_header in readline.h
12576 do :
12577   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12578 if test "x$ac_cv_header_readline_h" = xyes; then :
12579   cat >>confdefs.h <<_ACEOF
12580 #define HAVE_READLINE_H 1
12581 _ACEOF
12582
12583 else
12584   as_fn_error $? "readline header not found
12585 If you have readline already installed, see config.log for details on the
12586 failure.  It is possible the compiler isn't looking in the proper directory.
12587 Use --without-readline to disable readline support." "$LINENO" 5
12588 fi
12589
12590 done
12591
12592 fi
12593
12594 done
12595
12596   for ac_header in readline/history.h
12597 do :
12598   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12599 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12600   cat >>confdefs.h <<_ACEOF
12601 #define HAVE_READLINE_HISTORY_H 1
12602 _ACEOF
12603
12604 else
12605   for ac_header in history.h
12606 do :
12607   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12608 if test "x$ac_cv_header_history_h" = xyes; then :
12609   cat >>confdefs.h <<_ACEOF
12610 #define HAVE_HISTORY_H 1
12611 _ACEOF
12612
12613 else
12614   as_fn_error $? "history header not found
12615 If you have readline already installed, see config.log for details on the
12616 failure.  It is possible the compiler isn't looking in the proper directory.
12617 Use --without-readline to disable readline support." "$LINENO" 5
12618 fi
12619
12620 done
12621
12622 fi
12623
12624 done
12625
12626 fi
12627
12628 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12629 # Some installations of libedit usurp /usr/include/readline/, which seems
12630 # bad practice, since in combined installations readline will have its headers
12631 # there.  We might have to resort to AC_EGREP checks to make sure we found
12632 # the proper header...
12633   for ac_header in editline/readline.h
12634 do :
12635   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12636 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12637   cat >>confdefs.h <<_ACEOF
12638 #define HAVE_EDITLINE_READLINE_H 1
12639 _ACEOF
12640
12641 else
12642   for ac_header in readline.h
12643 do :
12644   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12645 if test "x$ac_cv_header_readline_h" = xyes; then :
12646   cat >>confdefs.h <<_ACEOF
12647 #define HAVE_READLINE_H 1
12648 _ACEOF
12649
12650 else
12651   for ac_header in readline/readline.h
12652 do :
12653   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12654 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12655   cat >>confdefs.h <<_ACEOF
12656 #define HAVE_READLINE_READLINE_H 1
12657 _ACEOF
12658
12659 else
12660   as_fn_error $? "readline header not found
12661 If you have libedit already installed, see config.log for details on the
12662 failure.  It is possible the compiler isn't looking in the proper directory.
12663 Use --without-readline to disable libedit support." "$LINENO" 5
12664 fi
12665
12666 done
12667
12668 fi
12669
12670 done
12671
12672 fi
12673
12674 done
12675
12676 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12677 # not be there at all.  Hence, don't complain if not found.  We must check
12678 # though, since in yet other versions it is an independent header.
12679   for ac_header in editline/history.h
12680 do :
12681   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12682 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12683   cat >>confdefs.h <<_ACEOF
12684 #define HAVE_EDITLINE_HISTORY_H 1
12685 _ACEOF
12686
12687 else
12688   for ac_header in history.h
12689 do :
12690   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12691 if test "x$ac_cv_header_history_h" = xyes; then :
12692   cat >>confdefs.h <<_ACEOF
12693 #define HAVE_HISTORY_H 1
12694 _ACEOF
12695
12696 else
12697   for ac_header in readline/history.h
12698 do :
12699   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12700 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12701   cat >>confdefs.h <<_ACEOF
12702 #define HAVE_READLINE_HISTORY_H 1
12703 _ACEOF
12704
12705 fi
12706
12707 done
12708
12709 fi
12710
12711 done
12712
12713 fi
12714
12715 done
12716
12717 fi
12718
12719 if test "$with_zlib" = yes; then
12720   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
12721 if test "x$ac_cv_header_zlib_h" = xyes; then :
12722
12723 else
12724   as_fn_error $? "zlib header not found
12725 If you have zlib already installed, see config.log for details on the
12726 failure.  It is possible the compiler isn't looking in the proper directory.
12727 Use --without-zlib to disable zlib support." "$LINENO" 5
12728 fi
12729
12730
12731 fi
12732
12733 if test "$with_gssapi" = yes ; then
12734   for ac_header in gssapi/gssapi.h
12735 do :
12736   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
12737 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
12738   cat >>confdefs.h <<_ACEOF
12739 #define HAVE_GSSAPI_GSSAPI_H 1
12740 _ACEOF
12741
12742 else
12743   for ac_header in gssapi.h
12744 do :
12745   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
12746 if test "x$ac_cv_header_gssapi_h" = xyes; then :
12747   cat >>confdefs.h <<_ACEOF
12748 #define HAVE_GSSAPI_H 1
12749 _ACEOF
12750
12751 else
12752   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
12753 fi
12754
12755 done
12756
12757 fi
12758
12759 done
12760
12761 fi
12762
12763 if test "$with_openssl" = yes ; then
12764   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
12765 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
12766
12767 else
12768   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
12769 fi
12770
12771
12772   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
12773 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
12774
12775 else
12776   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
12777 fi
12778
12779
12780 fi
12781
12782 if test "$with_pam" = yes ; then
12783   for ac_header in security/pam_appl.h
12784 do :
12785   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
12786 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
12787   cat >>confdefs.h <<_ACEOF
12788 #define HAVE_SECURITY_PAM_APPL_H 1
12789 _ACEOF
12790
12791 else
12792   for ac_header in pam/pam_appl.h
12793 do :
12794   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
12795 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
12796   cat >>confdefs.h <<_ACEOF
12797 #define HAVE_PAM_PAM_APPL_H 1
12798 _ACEOF
12799
12800 else
12801   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
12802 fi
12803
12804 done
12805
12806 fi
12807
12808 done
12809
12810 fi
12811
12812 if test "$with_bsd_auth" = yes ; then
12813   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
12814 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
12815
12816 else
12817   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
12818 fi
12819
12820
12821 fi
12822
12823 if test "$with_systemd" = yes ; then
12824   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
12825 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
12826
12827 else
12828   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
12829 fi
12830
12831
12832 fi
12833
12834 if test "$with_libxml" = yes ; then
12835   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
12836 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
12837
12838 else
12839   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
12840 fi
12841
12842
12843 fi
12844
12845 if test "$with_libxslt" = yes ; then
12846   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
12847 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
12848
12849 else
12850   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
12851 fi
12852
12853
12854 fi
12855
12856 if test "$with_ldap" = yes ; then
12857   if test "$PORTNAME" != "win32"; then
12858      for ac_header in ldap.h
12859 do :
12860   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
12861 if test "x$ac_cv_header_ldap_h" = xyes; then :
12862   cat >>confdefs.h <<_ACEOF
12863 #define HAVE_LDAP_H 1
12864 _ACEOF
12865
12866 else
12867   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
12868 fi
12869
12870 done
12871
12872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
12873 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
12874 if ${pgac_cv_ldap_safe+:} false; then :
12875   $as_echo_n "(cached) " >&6
12876 else
12877   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12878 /* end confdefs.h.  */
12879 #include <ldap.h>
12880 #if !defined(LDAP_VENDOR_VERSION) || \
12881      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
12882       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
12883 choke me
12884 #endif
12885 int
12886 main ()
12887 {
12888
12889   ;
12890   return 0;
12891 }
12892 _ACEOF
12893 if ac_fn_c_try_compile "$LINENO"; then :
12894   pgac_cv_ldap_safe=yes
12895 else
12896   pgac_cv_ldap_safe=no
12897 fi
12898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12899 fi
12900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
12901 $as_echo "$pgac_cv_ldap_safe" >&6; }
12902
12903 if test "$pgac_cv_ldap_safe" != yes; then
12904   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12905 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
12906 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
12907 *** also uses LDAP will crash on exit." >&5
12908 $as_echo "$as_me: WARNING:
12909 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
12910 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
12911 *** also uses LDAP will crash on exit." >&2;}
12912 fi
12913   else
12914      for ac_header in winldap.h
12915 do :
12916   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
12917 #include <windows.h>
12918
12919 "
12920 if test "x$ac_cv_header_winldap_h" = xyes; then :
12921   cat >>confdefs.h <<_ACEOF
12922 #define HAVE_WINLDAP_H 1
12923 _ACEOF
12924
12925 else
12926   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
12927 fi
12928
12929 done
12930
12931   fi
12932 fi
12933
12934 if test "$with_bonjour" = yes ; then
12935   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
12936 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
12937
12938 else
12939   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
12940 fi
12941
12942
12943 fi
12944
12945 # for contrib/uuid-ossp
12946 if test "$with_uuid" = bsd ; then
12947   for ac_header in uuid.h
12948 do :
12949   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
12950 if test "x$ac_cv_header_uuid_h" = xyes; then :
12951   cat >>confdefs.h <<_ACEOF
12952 #define HAVE_UUID_H 1
12953 _ACEOF
12954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12955 /* end confdefs.h.  */
12956 #include <uuid.h>
12957
12958 _ACEOF
12959 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12960   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
12961
12962 else
12963   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
12964 fi
12965 rm -f conftest*
12966
12967 else
12968   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
12969 fi
12970
12971 done
12972
12973 elif test "$with_uuid" = e2fs ; then
12974   for ac_header in uuid/uuid.h
12975 do :
12976   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
12977 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
12978   cat >>confdefs.h <<_ACEOF
12979 #define HAVE_UUID_UUID_H 1
12980 _ACEOF
12981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12982 /* end confdefs.h.  */
12983 #include <uuid/uuid.h>
12984
12985 _ACEOF
12986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12987   $EGREP "uuid_generate" >/dev/null 2>&1; then :
12988
12989 else
12990   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
12991 fi
12992 rm -f conftest*
12993
12994 else
12995   for ac_header in uuid.h
12996 do :
12997   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
12998 if test "x$ac_cv_header_uuid_h" = xyes; then :
12999   cat >>confdefs.h <<_ACEOF
13000 #define HAVE_UUID_H 1
13001 _ACEOF
13002  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13003 /* end confdefs.h.  */
13004 #include <uuid.h>
13005
13006 _ACEOF
13007 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13008   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13009
13010 else
13011   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13012 fi
13013 rm -f conftest*
13014
13015 else
13016   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13017 fi
13018
13019 done
13020
13021 fi
13022
13023 done
13024
13025 elif test "$with_uuid" = ossp ; then
13026   for ac_header in ossp/uuid.h
13027 do :
13028   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13029 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13030   cat >>confdefs.h <<_ACEOF
13031 #define HAVE_OSSP_UUID_H 1
13032 _ACEOF
13033  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13034 /* end confdefs.h.  */
13035 #include <ossp/uuid.h>
13036
13037 _ACEOF
13038 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13039   $EGREP "uuid_export" >/dev/null 2>&1; then :
13040
13041 else
13042   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13043 fi
13044 rm -f conftest*
13045
13046 else
13047   for ac_header in uuid.h
13048 do :
13049   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13050 if test "x$ac_cv_header_uuid_h" = xyes; then :
13051   cat >>confdefs.h <<_ACEOF
13052 #define HAVE_UUID_H 1
13053 _ACEOF
13054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13055 /* end confdefs.h.  */
13056 #include <uuid.h>
13057
13058 _ACEOF
13059 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13060   $EGREP "uuid_export" >/dev/null 2>&1; then :
13061
13062 else
13063   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13064 fi
13065 rm -f conftest*
13066
13067 else
13068   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13069 fi
13070
13071 done
13072
13073 fi
13074
13075 done
13076
13077 fi
13078
13079 if test "$PORTNAME" = "win32" ; then
13080    for ac_header in crtdefs.h
13081 do :
13082   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13083 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13084   cat >>confdefs.h <<_ACEOF
13085 #define HAVE_CRTDEFS_H 1
13086 _ACEOF
13087
13088 fi
13089
13090 done
13091
13092 fi
13093
13094 ##
13095 ## Types, structures, compiler characteristics
13096 ##
13097
13098   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13099 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13100 if ${ac_cv_c_bigendian+:} false; then :
13101   $as_echo_n "(cached) " >&6
13102 else
13103   ac_cv_c_bigendian=unknown
13104     # See if we're dealing with a universal compiler.
13105     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13106 /* end confdefs.h.  */
13107 #ifndef __APPLE_CC__
13108                not a universal capable compiler
13109              #endif
13110              typedef int dummy;
13111
13112 _ACEOF
13113 if ac_fn_c_try_compile "$LINENO"; then :
13114
13115         # Check for potential -arch flags.  It is not universal unless
13116         # there are at least two -arch flags with different values.
13117         ac_arch=
13118         ac_prev=
13119         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13120          if test -n "$ac_prev"; then
13121            case $ac_word in
13122              i?86 | x86_64 | ppc | ppc64)
13123                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13124                  ac_arch=$ac_word
13125                else
13126                  ac_cv_c_bigendian=universal
13127                  break
13128                fi
13129                ;;
13130            esac
13131            ac_prev=
13132          elif test "x$ac_word" = "x-arch"; then
13133            ac_prev=arch
13134          fi
13135        done
13136 fi
13137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13138     if test $ac_cv_c_bigendian = unknown; then
13139       # See if sys/param.h defines the BYTE_ORDER macro.
13140       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13141 /* end confdefs.h.  */
13142 #include <sys/types.h>
13143              #include <sys/param.h>
13144
13145 int
13146 main ()
13147 {
13148 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13149                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13150                      && LITTLE_ENDIAN)
13151               bogus endian macros
13152              #endif
13153
13154   ;
13155   return 0;
13156 }
13157 _ACEOF
13158 if ac_fn_c_try_compile "$LINENO"; then :
13159   # It does; now see whether it defined to BIG_ENDIAN or not.
13160          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13161 /* end confdefs.h.  */
13162 #include <sys/types.h>
13163                 #include <sys/param.h>
13164
13165 int
13166 main ()
13167 {
13168 #if BYTE_ORDER != BIG_ENDIAN
13169                  not big endian
13170                 #endif
13171
13172   ;
13173   return 0;
13174 }
13175 _ACEOF
13176 if ac_fn_c_try_compile "$LINENO"; then :
13177   ac_cv_c_bigendian=yes
13178 else
13179   ac_cv_c_bigendian=no
13180 fi
13181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13182 fi
13183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13184     fi
13185     if test $ac_cv_c_bigendian = unknown; then
13186       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13187       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13188 /* end confdefs.h.  */
13189 #include <limits.h>
13190
13191 int
13192 main ()
13193 {
13194 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13195               bogus endian macros
13196              #endif
13197
13198   ;
13199   return 0;
13200 }
13201 _ACEOF
13202 if ac_fn_c_try_compile "$LINENO"; then :
13203   # It does; now see whether it defined to _BIG_ENDIAN or not.
13204          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13205 /* end confdefs.h.  */
13206 #include <limits.h>
13207
13208 int
13209 main ()
13210 {
13211 #ifndef _BIG_ENDIAN
13212                  not big endian
13213                 #endif
13214
13215   ;
13216   return 0;
13217 }
13218 _ACEOF
13219 if ac_fn_c_try_compile "$LINENO"; then :
13220   ac_cv_c_bigendian=yes
13221 else
13222   ac_cv_c_bigendian=no
13223 fi
13224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13225 fi
13226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13227     fi
13228     if test $ac_cv_c_bigendian = unknown; then
13229       # Compile a test program.
13230       if test "$cross_compiling" = yes; then :
13231   # Try to guess by grepping values from an object file.
13232          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13233 /* end confdefs.h.  */
13234 short int ascii_mm[] =
13235                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13236                 short int ascii_ii[] =
13237                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13238                 int use_ascii (int i) {
13239                   return ascii_mm[i] + ascii_ii[i];
13240                 }
13241                 short int ebcdic_ii[] =
13242                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13243                 short int ebcdic_mm[] =
13244                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13245                 int use_ebcdic (int i) {
13246                   return ebcdic_mm[i] + ebcdic_ii[i];
13247                 }
13248                 extern int foo;
13249
13250 int
13251 main ()
13252 {
13253 return use_ascii (foo) == use_ebcdic (foo);
13254   ;
13255   return 0;
13256 }
13257 _ACEOF
13258 if ac_fn_c_try_compile "$LINENO"; then :
13259   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13260               ac_cv_c_bigendian=yes
13261             fi
13262             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13263               if test "$ac_cv_c_bigendian" = unknown; then
13264                 ac_cv_c_bigendian=no
13265               else
13266                 # finding both strings is unlikely to happen, but who knows?
13267                 ac_cv_c_bigendian=unknown
13268               fi
13269             fi
13270 fi
13271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13272 else
13273   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13274 /* end confdefs.h.  */
13275 $ac_includes_default
13276 int
13277 main ()
13278 {
13279
13280              /* Are we little or big endian?  From Harbison&Steele.  */
13281              union
13282              {
13283                long int l;
13284                char c[sizeof (long int)];
13285              } u;
13286              u.l = 1;
13287              return u.c[sizeof (long int) - 1] == 1;
13288
13289   ;
13290   return 0;
13291 }
13292 _ACEOF
13293 if ac_fn_c_try_run "$LINENO"; then :
13294   ac_cv_c_bigendian=no
13295 else
13296   ac_cv_c_bigendian=yes
13297 fi
13298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13299   conftest.$ac_objext conftest.beam conftest.$ac_ext
13300 fi
13301
13302     fi
13303 fi
13304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13305 $as_echo "$ac_cv_c_bigendian" >&6; }
13306  case $ac_cv_c_bigendian in #(
13307    yes)
13308      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13309 ;; #(
13310    no)
13311       ;; #(
13312    universal)
13313
13314 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13315
13316      ;; #(
13317    *)
13318      as_fn_error $? "unknown endianness
13319  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13320  esac
13321
13322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13323 $as_echo_n "checking for inline... " >&6; }
13324 if ${ac_cv_c_inline+:} false; then :
13325   $as_echo_n "(cached) " >&6
13326 else
13327   ac_cv_c_inline=no
13328 for ac_kw in inline __inline__ __inline; do
13329   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13330 /* end confdefs.h.  */
13331 #ifndef __cplusplus
13332 typedef int foo_t;
13333 static $ac_kw foo_t static_foo () {return 0; }
13334 $ac_kw foo_t foo () {return 0; }
13335 #endif
13336
13337 _ACEOF
13338 if ac_fn_c_try_compile "$LINENO"; then :
13339   ac_cv_c_inline=$ac_kw
13340 fi
13341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13342   test "$ac_cv_c_inline" != no && break
13343 done
13344
13345 fi
13346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13347 $as_echo "$ac_cv_c_inline" >&6; }
13348
13349 case $ac_cv_c_inline in
13350   inline | yes) ;;
13351   *)
13352     case $ac_cv_c_inline in
13353       no) ac_val=;;
13354       *) ac_val=$ac_cv_c_inline;;
13355     esac
13356     cat >>confdefs.h <<_ACEOF
13357 #ifndef __cplusplus
13358 #define inline $ac_val
13359 #endif
13360 _ACEOF
13361     ;;
13362 esac
13363
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13365 $as_echo_n "checking for printf format archetype... " >&6; }
13366 if ${pgac_cv_printf_archetype+:} false; then :
13367   $as_echo_n "(cached) " >&6
13368 else
13369   ac_save_c_werror_flag=$ac_c_werror_flag
13370 ac_c_werror_flag=yes
13371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13372 /* end confdefs.h.  */
13373 extern int
13374 pgac_write(int ignore, const char *fmt,...)
13375 __attribute__((format(gnu_printf, 2, 3)));
13376 int
13377 main ()
13378 {
13379
13380   ;
13381   return 0;
13382 }
13383 _ACEOF
13384 if ac_fn_c_try_compile "$LINENO"; then :
13385   pgac_cv_printf_archetype=gnu_printf
13386 else
13387   pgac_cv_printf_archetype=printf
13388 fi
13389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13390 ac_c_werror_flag=$ac_save_c_werror_flag
13391 fi
13392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13393 $as_echo "$pgac_cv_printf_archetype" >&6; }
13394
13395 cat >>confdefs.h <<_ACEOF
13396 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13397 _ACEOF
13398
13399
13400
13401   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13402 $as_echo_n "checking for flexible array members... " >&6; }
13403 if ${ac_cv_c_flexmember+:} false; then :
13404   $as_echo_n "(cached) " >&6
13405 else
13406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13407 /* end confdefs.h.  */
13408 #include <stdlib.h>
13409             #include <stdio.h>
13410             #include <stddef.h>
13411             struct s { int n; double d[]; };
13412 int
13413 main ()
13414 {
13415 int m = getchar ();
13416             struct s *p = malloc (offsetof (struct s, d)
13417                                   + m * sizeof (double));
13418             p->d[0] = 0.0;
13419             return p->d != (double *) NULL;
13420   ;
13421   return 0;
13422 }
13423 _ACEOF
13424 if ac_fn_c_try_compile "$LINENO"; then :
13425   ac_cv_c_flexmember=yes
13426 else
13427   ac_cv_c_flexmember=no
13428 fi
13429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13430 fi
13431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13432 $as_echo "$ac_cv_c_flexmember" >&6; }
13433   if test $ac_cv_c_flexmember = yes; then
13434
13435 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13436
13437   else
13438     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13439
13440   fi
13441
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13443 $as_echo_n "checking for signed types... " >&6; }
13444 if ${pgac_cv_c_signed+:} false; then :
13445   $as_echo_n "(cached) " >&6
13446 else
13447   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13448 /* end confdefs.h.  */
13449
13450 int
13451 main ()
13452 {
13453 signed char c; signed short s; signed int i;
13454   ;
13455   return 0;
13456 }
13457 _ACEOF
13458 if ac_fn_c_try_compile "$LINENO"; then :
13459   pgac_cv_c_signed=yes
13460 else
13461   pgac_cv_c_signed=no
13462 fi
13463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13464 fi
13465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13466 $as_echo "$pgac_cv_c_signed" >&6; }
13467 if test x"$pgac_cv_c_signed" = xno ; then
13468
13469 $as_echo "#define signed /**/" >>confdefs.h
13470
13471 fi
13472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13473 $as_echo_n "checking for __func__... " >&6; }
13474 if ${pgac_cv_funcname_func_support+:} false; then :
13475   $as_echo_n "(cached) " >&6
13476 else
13477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13478 /* end confdefs.h.  */
13479 #include <stdio.h>
13480 int
13481 main ()
13482 {
13483 printf("%s\n", __func__);
13484   ;
13485   return 0;
13486 }
13487 _ACEOF
13488 if ac_fn_c_try_compile "$LINENO"; then :
13489   pgac_cv_funcname_func_support=yes
13490 else
13491   pgac_cv_funcname_func_support=no
13492 fi
13493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13494 fi
13495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13496 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13497 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13498
13499 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13500
13501 else
13502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13503 $as_echo_n "checking for __FUNCTION__... " >&6; }
13504 if ${pgac_cv_funcname_function_support+:} false; then :
13505   $as_echo_n "(cached) " >&6
13506 else
13507   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13508 /* end confdefs.h.  */
13509 #include <stdio.h>
13510 int
13511 main ()
13512 {
13513 printf("%s\n", __FUNCTION__);
13514   ;
13515   return 0;
13516 }
13517 _ACEOF
13518 if ac_fn_c_try_compile "$LINENO"; then :
13519   pgac_cv_funcname_function_support=yes
13520 else
13521   pgac_cv_funcname_function_support=no
13522 fi
13523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13524 fi
13525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13526 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13527 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13528
13529 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13530
13531 fi
13532 fi
13533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13534 $as_echo_n "checking for _Static_assert... " >&6; }
13535 if ${pgac_cv__static_assert+:} false; then :
13536   $as_echo_n "(cached) " >&6
13537 else
13538   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13539 /* end confdefs.h.  */
13540
13541 int
13542 main ()
13543 {
13544 ({ _Static_assert(1, "foo"); })
13545   ;
13546   return 0;
13547 }
13548 _ACEOF
13549 if ac_fn_c_try_link "$LINENO"; then :
13550   pgac_cv__static_assert=yes
13551 else
13552   pgac_cv__static_assert=no
13553 fi
13554 rm -f core conftest.err conftest.$ac_objext \
13555     conftest$ac_exeext conftest.$ac_ext
13556 fi
13557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13558 $as_echo "$pgac_cv__static_assert" >&6; }
13559 if test x"$pgac_cv__static_assert" = xyes ; then
13560
13561 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13562
13563 fi
13564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13565 $as_echo_n "checking for typeof... " >&6; }
13566 if ${pgac_cv_c_typeof+:} false; then :
13567   $as_echo_n "(cached) " >&6
13568 else
13569   pgac_cv_c_typeof=no
13570 for pgac_kw in typeof __typeof__ decltype; do
13571   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13572 /* end confdefs.h.  */
13573
13574 int
13575 main ()
13576 {
13577 int x = 0;
13578 $pgac_kw(x) y;
13579 y = x;
13580 return y;
13581   ;
13582   return 0;
13583 }
13584 _ACEOF
13585 if ac_fn_c_try_compile "$LINENO"; then :
13586   pgac_cv_c_typeof=$pgac_kw
13587 fi
13588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13589   test "$pgac_cv_c_typeof" != no && break
13590 done
13591 fi
13592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13593 $as_echo "$pgac_cv_c_typeof" >&6; }
13594 if test "$pgac_cv_c_typeof" != no; then
13595
13596 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13597
13598   if test "$pgac_cv_c_typeof" != typeof; then
13599
13600 cat >>confdefs.h <<_ACEOF
13601 #define typeof $pgac_cv_c_typeof
13602 _ACEOF
13603
13604   fi
13605 fi
13606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13607 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13608 if ${pgac_cv__types_compatible+:} false; then :
13609   $as_echo_n "(cached) " >&6
13610 else
13611   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13612 /* end confdefs.h.  */
13613
13614 int
13615 main ()
13616 {
13617  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13618   ;
13619   return 0;
13620 }
13621 _ACEOF
13622 if ac_fn_c_try_compile "$LINENO"; then :
13623   pgac_cv__types_compatible=yes
13624 else
13625   pgac_cv__types_compatible=no
13626 fi
13627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13628 fi
13629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13630 $as_echo "$pgac_cv__types_compatible" >&6; }
13631 if test x"$pgac_cv__types_compatible" = xyes ; then
13632
13633 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13634
13635 fi
13636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13637 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13638 if ${pgac_cv__builtin_bswap16+:} false; then :
13639   $as_echo_n "(cached) " >&6
13640 else
13641   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13642 /* end confdefs.h.  */
13643 static unsigned long int x = __builtin_bswap16(0xaabb);
13644
13645 _ACEOF
13646 if ac_fn_c_try_compile "$LINENO"; then :
13647   pgac_cv__builtin_bswap16=yes
13648 else
13649   pgac_cv__builtin_bswap16=no
13650 fi
13651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13652 fi
13653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13654 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13655 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13656
13657 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13658
13659 fi
13660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13661 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13662 if ${pgac_cv__builtin_bswap32+:} false; then :
13663   $as_echo_n "(cached) " >&6
13664 else
13665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13666 /* end confdefs.h.  */
13667 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13668
13669 _ACEOF
13670 if ac_fn_c_try_compile "$LINENO"; then :
13671   pgac_cv__builtin_bswap32=yes
13672 else
13673   pgac_cv__builtin_bswap32=no
13674 fi
13675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13676 fi
13677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
13678 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
13679 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
13680
13681 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
13682
13683 fi
13684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
13685 $as_echo_n "checking for __builtin_bswap64... " >&6; }
13686 if ${pgac_cv__builtin_bswap64+:} false; then :
13687   $as_echo_n "(cached) " >&6
13688 else
13689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13690 /* end confdefs.h.  */
13691 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
13692
13693 _ACEOF
13694 if ac_fn_c_try_compile "$LINENO"; then :
13695   pgac_cv__builtin_bswap64=yes
13696 else
13697   pgac_cv__builtin_bswap64=no
13698 fi
13699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13700 fi
13701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
13702 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
13703 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
13704
13705 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
13706
13707 fi
13708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
13709 $as_echo_n "checking for __builtin_constant_p... " >&6; }
13710 if ${pgac_cv__builtin_constant_p+:} false; then :
13711   $as_echo_n "(cached) " >&6
13712 else
13713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13714 /* end confdefs.h.  */
13715 static int x;
13716   static int y[__builtin_constant_p(x) ? x : 1];
13717   static int z[__builtin_constant_p("string literal") ? 1 : x];
13718
13719
13720 _ACEOF
13721 if ac_fn_c_try_compile "$LINENO"; then :
13722   pgac_cv__builtin_constant_p=yes
13723 else
13724   pgac_cv__builtin_constant_p=no
13725 fi
13726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13727 fi
13728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
13729 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
13730 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
13731
13732 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
13733
13734 fi
13735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
13736 $as_echo_n "checking for __builtin_unreachable... " >&6; }
13737 if ${pgac_cv__builtin_unreachable+:} false; then :
13738   $as_echo_n "(cached) " >&6
13739 else
13740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13741 /* end confdefs.h.  */
13742
13743 int
13744 main ()
13745 {
13746 __builtin_unreachable();
13747   ;
13748   return 0;
13749 }
13750 _ACEOF
13751 if ac_fn_c_try_link "$LINENO"; then :
13752   pgac_cv__builtin_unreachable=yes
13753 else
13754   pgac_cv__builtin_unreachable=no
13755 fi
13756 rm -f core conftest.err conftest.$ac_objext \
13757     conftest$ac_exeext conftest.$ac_ext
13758 fi
13759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
13760 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
13761 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
13762
13763 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
13764
13765 fi
13766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
13767 $as_echo_n "checking for computed goto support... " >&6; }
13768 if ${pgac_cv_computed_goto+:} false; then :
13769   $as_echo_n "(cached) " >&6
13770 else
13771   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13772 /* end confdefs.h.  */
13773
13774 int
13775 main ()
13776 {
13777 void *labeladdrs[] = {&&my_label};
13778   goto *labeladdrs[0];
13779   my_label:
13780   return 1;
13781
13782   ;
13783   return 0;
13784 }
13785 _ACEOF
13786 if ac_fn_c_try_compile "$LINENO"; then :
13787   pgac_cv_computed_goto=yes
13788 else
13789   pgac_cv_computed_goto=no
13790 fi
13791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13792 fi
13793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
13794 $as_echo "$pgac_cv_computed_goto" >&6; }
13795 if test x"$pgac_cv_computed_goto" = xyes ; then
13796
13797 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
13798
13799 fi
13800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
13801 $as_echo_n "checking for __VA_ARGS__... " >&6; }
13802 if ${pgac_cv__va_args+:} false; then :
13803   $as_echo_n "(cached) " >&6
13804 else
13805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13806 /* end confdefs.h.  */
13807 #include <stdio.h>
13808 int
13809 main ()
13810 {
13811 #define debug(...) fprintf(stderr, __VA_ARGS__)
13812 debug("%s", "blarg");
13813
13814   ;
13815   return 0;
13816 }
13817 _ACEOF
13818 if ac_fn_c_try_compile "$LINENO"; then :
13819   pgac_cv__va_args=yes
13820 else
13821   pgac_cv__va_args=no
13822 fi
13823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13824 fi
13825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
13826 $as_echo "$pgac_cv__va_args" >&6; }
13827 if test x"$pgac_cv__va_args" = xyes ; then
13828
13829 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
13830
13831 fi
13832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13833 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13834 if ${ac_cv_struct_tm+:} false; then :
13835   $as_echo_n "(cached) " >&6
13836 else
13837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13838 /* end confdefs.h.  */
13839 #include <sys/types.h>
13840 #include <time.h>
13841
13842 int
13843 main ()
13844 {
13845 struct tm tm;
13846                                      int *p = &tm.tm_sec;
13847                                      return !p;
13848   ;
13849   return 0;
13850 }
13851 _ACEOF
13852 if ac_fn_c_try_compile "$LINENO"; then :
13853   ac_cv_struct_tm=time.h
13854 else
13855   ac_cv_struct_tm=sys/time.h
13856 fi
13857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13858 fi
13859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13860 $as_echo "$ac_cv_struct_tm" >&6; }
13861 if test $ac_cv_struct_tm = sys/time.h; then
13862
13863 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
13864
13865 fi
13866
13867 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
13868 #include <$ac_cv_struct_tm>
13869
13870 "
13871 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
13872
13873 cat >>confdefs.h <<_ACEOF
13874 #define HAVE_STRUCT_TM_TM_ZONE 1
13875 _ACEOF
13876
13877
13878 fi
13879
13880 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13881
13882 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
13883
13884 fi
13885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13886 $as_echo_n "checking for tzname... " >&6; }
13887 if ${ac_cv_var_tzname+:} false; then :
13888   $as_echo_n "(cached) " >&6
13889 else
13890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13891 /* end confdefs.h.  */
13892 #include <stdlib.h>
13893 #include <time.h>
13894 #ifndef tzname /* For SGI.  */
13895 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
13896 #endif
13897
13898 int
13899 main ()
13900 {
13901 atoi(*tzname);
13902   ;
13903   return 0;
13904 }
13905 _ACEOF
13906 if ac_fn_c_try_link "$LINENO"; then :
13907   ac_cv_var_tzname=yes
13908 else
13909   ac_cv_var_tzname=no
13910 fi
13911 rm -f core conftest.err conftest.$ac_objext \
13912     conftest$ac_exeext conftest.$ac_ext
13913 fi
13914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13915 $as_echo "$ac_cv_var_tzname" >&6; }
13916 if test $ac_cv_var_tzname = yes; then
13917
13918 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
13919
13920 fi
13921
13922 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
13923 #ifdef HAVE_SYS_IPC_H
13924 #include <sys/ipc.h>
13925 #endif
13926 #ifdef HAVE_SYS_SEM_H
13927 #include <sys/sem.h>
13928 #endif
13929 "
13930 if test "x$ac_cv_type_union_semun" = xyes; then :
13931
13932 cat >>confdefs.h <<_ACEOF
13933 #define HAVE_UNION_SEMUN 1
13934 _ACEOF
13935
13936
13937 fi
13938
13939 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
13940 #ifdef HAVE_SYS_UN_H
13941 #include <sys/un.h>
13942 #endif
13943
13944 "
13945 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
13946
13947 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
13948
13949 fi
13950
13951 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
13952 #include <sys/socket.h>
13953
13954 "
13955 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
13956
13957 cat >>confdefs.h <<_ACEOF
13958 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
13959 _ACEOF
13960
13961
13962 fi
13963
13964 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
13965 #include <sys/socket.h>
13966
13967 "
13968 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
13969
13970 cat >>confdefs.h <<_ACEOF
13971 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
13972 _ACEOF
13973
13974
13975 fi
13976 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
13977 #include <sys/socket.h>
13978
13979 "
13980 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
13981
13982 cat >>confdefs.h <<_ACEOF
13983 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
13984 _ACEOF
13985
13986
13987 fi
13988 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
13989 #include <sys/socket.h>
13990
13991 "
13992 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
13993
13994 cat >>confdefs.h <<_ACEOF
13995 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
13996 _ACEOF
13997
13998
13999 fi
14000 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14001 #include <sys/socket.h>
14002
14003 "
14004 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14005
14006 cat >>confdefs.h <<_ACEOF
14007 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14008 _ACEOF
14009
14010
14011 fi
14012 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14013 #include <sys/socket.h>
14014
14015 "
14016 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14017
14018 cat >>confdefs.h <<_ACEOF
14019 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14020 _ACEOF
14021
14022
14023 fi
14024
14025 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14026 #include <sys/socket.h>
14027 #include <netdb.h>
14028
14029 "
14030 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14031
14032 cat >>confdefs.h <<_ACEOF
14033 #define HAVE_STRUCT_ADDRINFO 1
14034 _ACEOF
14035
14036
14037 fi
14038
14039
14040   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14041 if test "x$ac_cv_type_intptr_t" = xyes; then :
14042
14043 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14044
14045 else
14046   for ac_type in 'int' 'long int' 'long long int'; do
14047        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14048 /* end confdefs.h.  */
14049 $ac_includes_default
14050 int
14051 main ()
14052 {
14053 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14054 test_array [0] = 0;
14055 return test_array [0];
14056
14057   ;
14058   return 0;
14059 }
14060 _ACEOF
14061 if ac_fn_c_try_compile "$LINENO"; then :
14062
14063 cat >>confdefs.h <<_ACEOF
14064 #define intptr_t $ac_type
14065 _ACEOF
14066
14067           ac_type=
14068 fi
14069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14070        test -z "$ac_type" && break
14071      done
14072 fi
14073
14074
14075
14076   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14077 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14078
14079 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14080
14081 else
14082   for ac_type in 'unsigned int' 'unsigned long int' \
14083         'unsigned long long int'; do
14084        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14085 /* end confdefs.h.  */
14086 $ac_includes_default
14087 int
14088 main ()
14089 {
14090 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14091 test_array [0] = 0;
14092 return test_array [0];
14093
14094   ;
14095   return 0;
14096 }
14097 _ACEOF
14098 if ac_fn_c_try_compile "$LINENO"; then :
14099
14100 cat >>confdefs.h <<_ACEOF
14101 #define uintptr_t $ac_type
14102 _ACEOF
14103
14104           ac_type=
14105 fi
14106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14107        test -z "$ac_type" && break
14108      done
14109 fi
14110
14111
14112
14113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14114 $as_echo_n "checking for unsigned long long int... " >&6; }
14115 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14116   $as_echo_n "(cached) " >&6
14117 else
14118   ac_cv_type_unsigned_long_long_int=yes
14119      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14120        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14121 /* end confdefs.h.  */
14122
14123   /* For now, do not test the preprocessor; as of 2007 there are too many
14124          implementations with broken preprocessors.  Perhaps this can
14125          be revisited in 2012.  In the meantime, code should not expect
14126          #if to work with literals wider than 32 bits.  */
14127       /* Test literals.  */
14128       long long int ll = 9223372036854775807ll;
14129       long long int nll = -9223372036854775807LL;
14130       unsigned long long int ull = 18446744073709551615ULL;
14131       /* Test constant expressions.   */
14132       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14133                      ? 1 : -1)];
14134       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14135                      ? 1 : -1)];
14136       int i = 63;
14137 int
14138 main ()
14139 {
14140 /* Test availability of runtime routines for shift and division.  */
14141       long long int llmax = 9223372036854775807ll;
14142       unsigned long long int ullmax = 18446744073709551615ull;
14143       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14144               | (llmax / ll) | (llmax % ll)
14145               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14146               | (ullmax / ull) | (ullmax % ull));
14147   ;
14148   return 0;
14149 }
14150
14151 _ACEOF
14152 if ac_fn_c_try_link "$LINENO"; then :
14153
14154 else
14155   ac_cv_type_unsigned_long_long_int=no
14156 fi
14157 rm -f core conftest.err conftest.$ac_objext \
14158     conftest$ac_exeext conftest.$ac_ext
14159      fi
14160 fi
14161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14162 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14163   if test $ac_cv_type_unsigned_long_long_int = yes; then
14164
14165 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14166
14167   fi
14168
14169
14170
14171   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14172 $as_echo_n "checking for long long int... " >&6; }
14173 if ${ac_cv_type_long_long_int+:} false; then :
14174   $as_echo_n "(cached) " >&6
14175 else
14176   ac_cv_type_long_long_int=yes
14177       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14178         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14179         if test $ac_cv_type_long_long_int = yes; then
14180                                   if test "$cross_compiling" = yes; then :
14181   :
14182 else
14183   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14184 /* end confdefs.h.  */
14185 #include <limits.h>
14186                  #ifndef LLONG_MAX
14187                  # define HALF \
14188                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14189                  # define LLONG_MAX (HALF - 1 + HALF)
14190                  #endif
14191 int
14192 main ()
14193 {
14194 long long int n = 1;
14195                  int i;
14196                  for (i = 0; ; i++)
14197                    {
14198                      long long int m = n << i;
14199                      if (m >> i != n)
14200                        return 1;
14201                      if (LLONG_MAX / 2 < m)
14202                        break;
14203                    }
14204                  return 0;
14205   ;
14206   return 0;
14207 }
14208 _ACEOF
14209 if ac_fn_c_try_run "$LINENO"; then :
14210
14211 else
14212   ac_cv_type_long_long_int=no
14213 fi
14214 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14215   conftest.$ac_objext conftest.beam conftest.$ac_ext
14216 fi
14217
14218         fi
14219       fi
14220 fi
14221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14222 $as_echo "$ac_cv_type_long_long_int" >&6; }
14223   if test $ac_cv_type_long_long_int = yes; then
14224
14225 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14226
14227   fi
14228
14229
14230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14231 $as_echo_n "checking for locale_t... " >&6; }
14232 if ${pgac_cv_type_locale_t+:} false; then :
14233   $as_echo_n "(cached) " >&6
14234 else
14235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14236 /* end confdefs.h.  */
14237 #include <locale.h>
14238 locale_t x;
14239 int
14240 main ()
14241 {
14242
14243   ;
14244   return 0;
14245 }
14246 _ACEOF
14247 if ac_fn_c_try_compile "$LINENO"; then :
14248   pgac_cv_type_locale_t=yes
14249 else
14250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14251 /* end confdefs.h.  */
14252 #include <xlocale.h>
14253 locale_t x;
14254 int
14255 main ()
14256 {
14257
14258   ;
14259   return 0;
14260 }
14261 _ACEOF
14262 if ac_fn_c_try_compile "$LINENO"; then :
14263   pgac_cv_type_locale_t='yes (in xlocale.h)'
14264 else
14265   pgac_cv_type_locale_t=no
14266 fi
14267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14268 fi
14269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14270 fi
14271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14272 $as_echo "$pgac_cv_type_locale_t" >&6; }
14273 if test "$pgac_cv_type_locale_t" != no; then
14274
14275 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14276
14277 fi
14278 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14279
14280 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14281
14282 fi
14283
14284 # MSVC doesn't cope well with defining restrict to __restrict, the
14285 # spelling it understands, because it conflicts with
14286 # __declspec(restrict). Therefore we define pg_restrict to the
14287 # appropriate definition, which presumably won't conflict.
14288 #
14289 # Allow platforms with buggy compilers to force restrict to not be
14290 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14291 # template.
14292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14293 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14294 if ${ac_cv_c_restrict+:} false; then :
14295   $as_echo_n "(cached) " >&6
14296 else
14297   ac_cv_c_restrict=no
14298    # The order here caters to the fact that C++ does not require restrict.
14299    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14300      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14301 /* end confdefs.h.  */
14302 typedef int * int_ptr;
14303         int foo (int_ptr $ac_kw ip) {
14304         return ip[0];
14305        }
14306 int
14307 main ()
14308 {
14309 int s[1];
14310         int * $ac_kw t = s;
14311         t[0] = 0;
14312         return foo(t)
14313   ;
14314   return 0;
14315 }
14316 _ACEOF
14317 if ac_fn_c_try_compile "$LINENO"; then :
14318   ac_cv_c_restrict=$ac_kw
14319 fi
14320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14321      test "$ac_cv_c_restrict" != no && break
14322    done
14323
14324 fi
14325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14326 $as_echo "$ac_cv_c_restrict" >&6; }
14327
14328  case $ac_cv_c_restrict in
14329    restrict) ;;
14330    no) $as_echo "#define restrict /**/" >>confdefs.h
14331  ;;
14332    *)  cat >>confdefs.h <<_ACEOF
14333 #define restrict $ac_cv_c_restrict
14334 _ACEOF
14335  ;;
14336  esac
14337
14338 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14339   pg_restrict=""
14340 else
14341   pg_restrict="$ac_cv_c_restrict"
14342 fi
14343
14344 cat >>confdefs.h <<_ACEOF
14345 #define pg_restrict $pg_restrict
14346 _ACEOF
14347
14348
14349 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14350 #include <sys/param.h>
14351 #ifdef HAVE_SYS_UCRED_H
14352 #include <sys/ucred.h>
14353 #endif
14354 "
14355 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14356
14357 cat >>confdefs.h <<_ACEOF
14358 #define HAVE_STRUCT_CMSGCRED 1
14359 _ACEOF
14360
14361
14362 fi
14363
14364
14365 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14366 #include <getopt.h>
14367 #endif
14368 "
14369 if test "x$ac_cv_type_struct_option" = xyes; then :
14370
14371 cat >>confdefs.h <<_ACEOF
14372 #define HAVE_STRUCT_OPTION 1
14373 _ACEOF
14374
14375
14376 fi
14377
14378
14379 if test "$with_zlib" = yes; then
14380   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14381   # did not).  While we could work around the lack of z_streamp, it
14382   # seems unwise to encourage people to use such old zlib versions...
14383   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14384 "
14385 if test "x$ac_cv_type_z_streamp" = xyes; then :
14386
14387 else
14388   as_fn_error $? "zlib version is too old
14389 Use --without-zlib to disable zlib support." "$LINENO" 5
14390 fi
14391
14392 fi
14393
14394 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14395 case $host_cpu in
14396   ppc*|powerpc*)
14397     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14398 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14399     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14400 /* end confdefs.h.  */
14401
14402 int
14403 main ()
14404 {
14405 int a = 0; int *p = &a; int r;
14406          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14407   ;
14408   return 0;
14409 }
14410 _ACEOF
14411 if ac_fn_c_try_compile "$LINENO"; then :
14412   pgac_cv_have_ppc_mutex_hint=yes
14413 else
14414   pgac_cv_have_ppc_mutex_hint=no
14415 fi
14416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14417     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14418 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14419     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14420
14421 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14422
14423     fi
14424   ;;
14425 esac
14426
14427 # Check largefile support.  You might think this is a system service not a
14428 # compiler characteristic, but you'd be wrong.  We must check this before
14429 # probing existence of related functions such as fseeko, since the largefile
14430 # defines can affect what is generated for that.
14431 if test "$PORTNAME" != "win32"; then
14432    # Check whether --enable-largefile was given.
14433 if test "${enable_largefile+set}" = set; then :
14434   enableval=$enable_largefile;
14435 fi
14436
14437 if test "$enable_largefile" != no; then
14438
14439   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14440 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14441 if ${ac_cv_sys_largefile_CC+:} false; then :
14442   $as_echo_n "(cached) " >&6
14443 else
14444   ac_cv_sys_largefile_CC=no
14445      if test "$GCC" != yes; then
14446        ac_save_CC=$CC
14447        while :; do
14448          # IRIX 6.2 and later do not support large files by default,
14449          # so use the C compiler's -n32 option if that helps.
14450          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14451 /* end confdefs.h.  */
14452 #include <sys/types.h>
14453  /* Check that off_t can represent 2**63 - 1 correctly.
14454     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14455     since some C++ compilers masquerading as C compilers
14456     incorrectly reject 9223372036854775807.  */
14457 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14458   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14459                        && LARGE_OFF_T % 2147483647 == 1)
14460                       ? 1 : -1];
14461 int
14462 main ()
14463 {
14464
14465   ;
14466   return 0;
14467 }
14468 _ACEOF
14469          if ac_fn_c_try_compile "$LINENO"; then :
14470   break
14471 fi
14472 rm -f core conftest.err conftest.$ac_objext
14473          CC="$CC -n32"
14474          if ac_fn_c_try_compile "$LINENO"; then :
14475   ac_cv_sys_largefile_CC=' -n32'; break
14476 fi
14477 rm -f core conftest.err conftest.$ac_objext
14478          break
14479        done
14480        CC=$ac_save_CC
14481        rm -f conftest.$ac_ext
14482     fi
14483 fi
14484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14485 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14486   if test "$ac_cv_sys_largefile_CC" != no; then
14487     CC=$CC$ac_cv_sys_largefile_CC
14488   fi
14489
14490   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14491 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14492 if ${ac_cv_sys_file_offset_bits+:} false; then :
14493   $as_echo_n "(cached) " >&6
14494 else
14495   while :; do
14496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14497 /* end confdefs.h.  */
14498 #include <sys/types.h>
14499  /* Check that off_t can represent 2**63 - 1 correctly.
14500     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14501     since some C++ compilers masquerading as C compilers
14502     incorrectly reject 9223372036854775807.  */
14503 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14504   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14505                        && LARGE_OFF_T % 2147483647 == 1)
14506                       ? 1 : -1];
14507 int
14508 main ()
14509 {
14510
14511   ;
14512   return 0;
14513 }
14514 _ACEOF
14515 if ac_fn_c_try_compile "$LINENO"; then :
14516   ac_cv_sys_file_offset_bits=no; break
14517 fi
14518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14519   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14520 /* end confdefs.h.  */
14521 #define _FILE_OFFSET_BITS 64
14522 #include <sys/types.h>
14523  /* Check that off_t can represent 2**63 - 1 correctly.
14524     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14525     since some C++ compilers masquerading as C compilers
14526     incorrectly reject 9223372036854775807.  */
14527 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14528   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14529                        && LARGE_OFF_T % 2147483647 == 1)
14530                       ? 1 : -1];
14531 int
14532 main ()
14533 {
14534
14535   ;
14536   return 0;
14537 }
14538 _ACEOF
14539 if ac_fn_c_try_compile "$LINENO"; then :
14540   ac_cv_sys_file_offset_bits=64; break
14541 fi
14542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14543   ac_cv_sys_file_offset_bits=unknown
14544   break
14545 done
14546 fi
14547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14548 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14549 case $ac_cv_sys_file_offset_bits in #(
14550   no | unknown) ;;
14551   *)
14552 cat >>confdefs.h <<_ACEOF
14553 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14554 _ACEOF
14555 ;;
14556 esac
14557 rm -rf conftest*
14558   if test $ac_cv_sys_file_offset_bits = unknown; then
14559     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14560 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14561 if ${ac_cv_sys_large_files+:} false; then :
14562   $as_echo_n "(cached) " >&6
14563 else
14564   while :; do
14565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14566 /* end confdefs.h.  */
14567 #include <sys/types.h>
14568  /* Check that off_t can represent 2**63 - 1 correctly.
14569     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14570     since some C++ compilers masquerading as C compilers
14571     incorrectly reject 9223372036854775807.  */
14572 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14573   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14574                        && LARGE_OFF_T % 2147483647 == 1)
14575                       ? 1 : -1];
14576 int
14577 main ()
14578 {
14579
14580   ;
14581   return 0;
14582 }
14583 _ACEOF
14584 if ac_fn_c_try_compile "$LINENO"; then :
14585   ac_cv_sys_large_files=no; break
14586 fi
14587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14588   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14589 /* end confdefs.h.  */
14590 #define _LARGE_FILES 1
14591 #include <sys/types.h>
14592  /* Check that off_t can represent 2**63 - 1 correctly.
14593     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14594     since some C++ compilers masquerading as C compilers
14595     incorrectly reject 9223372036854775807.  */
14596 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14597   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14598                        && LARGE_OFF_T % 2147483647 == 1)
14599                       ? 1 : -1];
14600 int
14601 main ()
14602 {
14603
14604   ;
14605   return 0;
14606 }
14607 _ACEOF
14608 if ac_fn_c_try_compile "$LINENO"; then :
14609   ac_cv_sys_large_files=1; break
14610 fi
14611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14612   ac_cv_sys_large_files=unknown
14613   break
14614 done
14615 fi
14616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14617 $as_echo "$ac_cv_sys_large_files" >&6; }
14618 case $ac_cv_sys_large_files in #(
14619   no | unknown) ;;
14620   *)
14621 cat >>confdefs.h <<_ACEOF
14622 #define _LARGE_FILES $ac_cv_sys_large_files
14623 _ACEOF
14624 ;;
14625 esac
14626 rm -rf conftest*
14627   fi
14628
14629
14630 fi
14631
14632
14633 fi
14634
14635 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14636 # The cast to long int works around a bug in the HP C Compiler
14637 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14638 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14639 # This bug is HP SR number 8606223364.
14640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14641 $as_echo_n "checking size of off_t... " >&6; }
14642 if ${ac_cv_sizeof_off_t+:} false; then :
14643   $as_echo_n "(cached) " >&6
14644 else
14645   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14646
14647 else
14648   if test "$ac_cv_type_off_t" = yes; then
14649      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14650 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14651 as_fn_error 77 "cannot compute sizeof (off_t)
14652 See \`config.log' for more details" "$LINENO" 5; }
14653    else
14654      ac_cv_sizeof_off_t=0
14655    fi
14656 fi
14657
14658 fi
14659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14660 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14661
14662
14663
14664 cat >>confdefs.h <<_ACEOF
14665 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14666 _ACEOF
14667
14668
14669
14670 # If we don't have largefile support, can't handle segsize >= 2GB.
14671 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14672    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14673 fi
14674
14675 # The cast to long int works around a bug in the HP C Compiler
14676 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14677 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14678 # This bug is HP SR number 8606223364.
14679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14680 $as_echo_n "checking size of bool... " >&6; }
14681 if ${ac_cv_sizeof_bool+:} false; then :
14682   $as_echo_n "(cached) " >&6
14683 else
14684   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
14685 #include <stdbool.h>
14686 #endif
14687 "; then :
14688
14689 else
14690   if test "$ac_cv_type_bool" = yes; then
14691      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14692 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14693 as_fn_error 77 "cannot compute sizeof (bool)
14694 See \`config.log' for more details" "$LINENO" 5; }
14695    else
14696      ac_cv_sizeof_bool=0
14697    fi
14698 fi
14699
14700 fi
14701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14702 $as_echo "$ac_cv_sizeof_bool" >&6; }
14703
14704
14705
14706 cat >>confdefs.h <<_ACEOF
14707 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14708 _ACEOF
14709
14710
14711
14712
14713 ##
14714 ## Functions, global variables
14715 ##
14716
14717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14718 $as_echo_n "checking for int timezone... " >&6; }
14719 if ${pgac_cv_var_int_timezone+:} false; then :
14720   $as_echo_n "(cached) " >&6
14721 else
14722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14723 /* end confdefs.h.  */
14724 #include <time.h>
14725 int res;
14726 int
14727 main ()
14728 {
14729 #ifndef __CYGWIN__
14730 res = timezone / 60;
14731 #else
14732 res = _timezone / 60;
14733 #endif
14734   ;
14735   return 0;
14736 }
14737 _ACEOF
14738 if ac_fn_c_try_link "$LINENO"; then :
14739   pgac_cv_var_int_timezone=yes
14740 else
14741   pgac_cv_var_int_timezone=no
14742 fi
14743 rm -f core conftest.err conftest.$ac_objext \
14744     conftest$ac_exeext conftest.$ac_ext
14745 fi
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
14747 $as_echo "$pgac_cv_var_int_timezone" >&6; }
14748 if test x"$pgac_cv_var_int_timezone" = xyes ; then
14749
14750 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
14751
14752 fi
14753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
14754 $as_echo_n "checking types of arguments for accept()... " >&6; }
14755  if ${ac_cv_func_accept_return+:} false; then :
14756   $as_echo_n "(cached) " >&6
14757 else
14758    if ${ac_cv_func_accept_arg1+:} false; then :
14759   $as_echo_n "(cached) " >&6
14760 else
14761     if ${ac_cv_func_accept_arg2+:} false; then :
14762   $as_echo_n "(cached) " >&6
14763 else
14764      if ${ac_cv_func_accept_arg3+:} false; then :
14765   $as_echo_n "(cached) " >&6
14766 else
14767       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
14768       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
14769        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
14770         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
14771          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14772 /* end confdefs.h.  */
14773 #include <sys/types.h>
14774 #include <sys/socket.h>
14775 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
14776 _ACEOF
14777 if ac_fn_c_try_compile "$LINENO"; then :
14778   ac_not_found=no; break 4
14779 else
14780   ac_not_found=yes
14781 fi
14782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14783        done
14784       done
14785      done
14786     done
14787     if test "$ac_not_found" = yes; then
14788       as_fn_error $? "could not determine argument types" "$LINENO" 5
14789     fi
14790     if test "$ac_cv_func_accept_arg3" = "void"; then
14791       ac_cv_func_accept_arg3=int
14792     fi
14793
14794 fi
14795
14796 fi
14797
14798 fi
14799
14800 fi
14801  { $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
14802 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
14803
14804 cat >>confdefs.h <<_ACEOF
14805 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
14806 _ACEOF
14807
14808
14809 cat >>confdefs.h <<_ACEOF
14810 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
14811 _ACEOF
14812
14813
14814 cat >>confdefs.h <<_ACEOF
14815 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
14816 _ACEOF
14817
14818
14819 cat >>confdefs.h <<_ACEOF
14820 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
14821 _ACEOF
14822
14823
14824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
14825 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
14826 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
14827   $as_echo_n "(cached) " >&6
14828 else
14829   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14830 /* end confdefs.h.  */
14831 #include <sys/time.h>
14832 int
14833 main ()
14834 {
14835 struct timeval *tp;
14836 struct timezone *tzp;
14837 gettimeofday(tp,tzp);
14838   ;
14839   return 0;
14840 }
14841 _ACEOF
14842 if ac_fn_c_try_compile "$LINENO"; then :
14843   pgac_cv_func_gettimeofday_1arg=no
14844 else
14845   pgac_cv_func_gettimeofday_1arg=yes
14846 fi
14847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14848 fi
14849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
14850 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
14851 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
14852
14853 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
14854
14855 fi
14856
14857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
14858 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
14859 if ${pgac_cv_func_wcstombs_l+:} false; then :
14860   $as_echo_n "(cached) " >&6
14861 else
14862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14863 /* end confdefs.h.  */
14864 #include <stdlib.h>
14865 #include <locale.h>
14866 int
14867 main ()
14868 {
14869 #ifndef wcstombs_l
14870 (void) wcstombs_l;
14871 #endif
14872   ;
14873   return 0;
14874 }
14875 _ACEOF
14876 if ac_fn_c_try_compile "$LINENO"; then :
14877   pgac_cv_func_wcstombs_l='yes'
14878 else
14879   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14880 /* end confdefs.h.  */
14881 #include <stdlib.h>
14882 #include <locale.h>
14883 #include <xlocale.h>
14884 int
14885 main ()
14886 {
14887 #ifndef wcstombs_l
14888 (void) wcstombs_l;
14889 #endif
14890   ;
14891   return 0;
14892 }
14893 _ACEOF
14894 if ac_fn_c_try_compile "$LINENO"; then :
14895   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
14896 else
14897   pgac_cv_func_wcstombs_l='no'
14898 fi
14899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14900 fi
14901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14902 fi
14903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
14904 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
14905 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
14906
14907 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
14908
14909 fi
14910
14911 # Some versions of libedit contain strlcpy(), setproctitle(), and other
14912 # symbols that that library has no business exposing to the world.  Pending
14913 # acquisition of a clue by those developers, ignore libedit (including its
14914 # possible alias of libreadline) while checking for everything else.
14915 LIBS_including_readline="$LIBS"
14916 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
14917
14918 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 setsid shm_open symlink sync_file_range utime utimes wcstombs_l
14919 do :
14920   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14921 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14922 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14923   cat >>confdefs.h <<_ACEOF
14924 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14925 _ACEOF
14926
14927 fi
14928 done
14929
14930
14931 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
14932 if test "x$ac_cv_func_fseeko" = xyes; then :
14933   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14934
14935 else
14936   case " $LIBOBJS " in
14937   *" fseeko.$ac_objext "* ) ;;
14938   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
14939  ;;
14940 esac
14941
14942 fi
14943
14944
14945 case $host_os in
14946         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
14947         # Mingw uses macros to access Win32 API calls
14948         netbsd*|mingw*)
14949
14950 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14951
14952                 ac_cv_func_fseeko=yes;;
14953         *)
14954                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14955 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14956 if ${ac_cv_sys_largefile_source+:} false; then :
14957   $as_echo_n "(cached) " >&6
14958 else
14959   while :; do
14960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14961 /* end confdefs.h.  */
14962 #include <sys/types.h> /* for off_t */
14963      #include <stdio.h>
14964 int
14965 main ()
14966 {
14967 int (*fp) (FILE *, off_t, int) = fseeko;
14968      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14969   ;
14970   return 0;
14971 }
14972 _ACEOF
14973 if ac_fn_c_try_link "$LINENO"; then :
14974   ac_cv_sys_largefile_source=no; break
14975 fi
14976 rm -f core conftest.err conftest.$ac_objext \
14977     conftest$ac_exeext conftest.$ac_ext
14978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14979 /* end confdefs.h.  */
14980 #define _LARGEFILE_SOURCE 1
14981 #include <sys/types.h> /* for off_t */
14982      #include <stdio.h>
14983 int
14984 main ()
14985 {
14986 int (*fp) (FILE *, off_t, int) = fseeko;
14987      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14988   ;
14989   return 0;
14990 }
14991 _ACEOF
14992 if ac_fn_c_try_link "$LINENO"; then :
14993   ac_cv_sys_largefile_source=1; break
14994 fi
14995 rm -f core conftest.err conftest.$ac_objext \
14996     conftest$ac_exeext conftest.$ac_ext
14997   ac_cv_sys_largefile_source=unknown
14998   break
14999 done
15000 fi
15001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15002 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15003 case $ac_cv_sys_largefile_source in #(
15004   no | unknown) ;;
15005   *)
15006 cat >>confdefs.h <<_ACEOF
15007 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15008 _ACEOF
15009 ;;
15010 esac
15011 rm -rf conftest*
15012
15013 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15014 # in glibc 2.1.3, but that breaks too many other things.
15015 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15016 if test $ac_cv_sys_largefile_source != unknown; then
15017
15018 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15019
15020 fi
15021 ;;
15022 esac
15023
15024 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15025 # by calling it, 2009-04-02
15026 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15027 if test "$PORTNAME" != "solaris"; then
15028 for ac_func in posix_fadvise
15029 do :
15030   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15031 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15032   cat >>confdefs.h <<_ACEOF
15033 #define HAVE_POSIX_FADVISE 1
15034 _ACEOF
15035
15036 fi
15037 done
15038
15039 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15040 "
15041 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15042   ac_have_decl=1
15043 else
15044   ac_have_decl=0
15045 fi
15046
15047 cat >>confdefs.h <<_ACEOF
15048 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15049 _ACEOF
15050
15051 fi
15052
15053 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15054 "
15055 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15056   ac_have_decl=1
15057 else
15058   ac_have_decl=0
15059 fi
15060
15061 cat >>confdefs.h <<_ACEOF
15062 #define HAVE_DECL_FDATASYNC $ac_have_decl
15063 _ACEOF
15064
15065 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15066 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15067   ac_have_decl=1
15068 else
15069   ac_have_decl=0
15070 fi
15071
15072 cat >>confdefs.h <<_ACEOF
15073 #define HAVE_DECL_STRLCAT $ac_have_decl
15074 _ACEOF
15075 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15076 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15077   ac_have_decl=1
15078 else
15079   ac_have_decl=0
15080 fi
15081
15082 cat >>confdefs.h <<_ACEOF
15083 #define HAVE_DECL_STRLCPY $ac_have_decl
15084 _ACEOF
15085 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15086 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15087   ac_have_decl=1
15088 else
15089   ac_have_decl=0
15090 fi
15091
15092 cat >>confdefs.h <<_ACEOF
15093 #define HAVE_DECL_STRNLEN $ac_have_decl
15094 _ACEOF
15095
15096 # This is probably only present on macOS, but may as well check always
15097 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15098 "
15099 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15100   ac_have_decl=1
15101 else
15102   ac_have_decl=0
15103 fi
15104
15105 cat >>confdefs.h <<_ACEOF
15106 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15107 _ACEOF
15108
15109
15110 HAVE_IPV6=no
15111 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15112 #include <netinet/in.h>
15113 "
15114 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15115
15116 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15117
15118          HAVE_IPV6=yes
15119 fi
15120
15121
15122
15123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15124 $as_echo_n "checking for PS_STRINGS... " >&6; }
15125 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15126   $as_echo_n "(cached) " >&6
15127 else
15128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15129 /* end confdefs.h.  */
15130 #include <machine/vmparam.h>
15131 #include <sys/exec.h>
15132
15133 int
15134 main ()
15135 {
15136 PS_STRINGS->ps_nargvstr = 1;
15137 PS_STRINGS->ps_argvstr = "foo";
15138   ;
15139   return 0;
15140 }
15141 _ACEOF
15142 if ac_fn_c_try_link "$LINENO"; then :
15143   pgac_cv_var_PS_STRINGS=yes
15144 else
15145   pgac_cv_var_PS_STRINGS=no
15146 fi
15147 rm -f core conftest.err conftest.$ac_objext \
15148     conftest$ac_exeext conftest.$ac_ext
15149 fi
15150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15151 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15152 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15153
15154 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15155
15156 fi
15157
15158
15159 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
15160 # is missing.  Yes, there are machines that have only one.  We may
15161 # also decide to use snprintf.c if snprintf() is present but does not
15162 # have all the features we need --- see below.
15163
15164 if test "$PORTNAME" = "win32"; then
15165   # Win32 gets snprintf.c built unconditionally.
15166   #
15167   # To properly translate all NLS languages strings, we must support the
15168   # *printf() %$ format, which allows *printf() arguments to be selected
15169   # by position in the translated string.
15170   #
15171   # libintl versions < 0.13 use the native *printf() functions, and Win32
15172   # *printf() doesn't understand %$, so we must use our /port versions,
15173   # which do understand %$. libintl versions >= 0.13 include their own
15174   # *printf versions on Win32.  The libintl 0.13 release note text is:
15175   #
15176   #   C format strings with positions, as they arise when a translator
15177   #   needs to reorder a sentence, are now supported on all platforms.
15178   #   On those few platforms (NetBSD and Woe32) for which the native
15179   #   printf()/fprintf()/... functions don't support such format
15180   #   strings, replacements are provided through <libintl.h>.
15181   #
15182   # We could use libintl >= 0.13's *printf() if we were sure that we had
15183   # a libintl >= 0.13 at runtime, but seeing that there is no clean way
15184   # to guarantee that, it is best to just use our own, so we are sure to
15185   # get %$ support. In include/port.h we disable the *printf() macros
15186   # that might have been defined by libintl.
15187   #
15188   # We do this unconditionally whether NLS is used or not so we are sure
15189   # that all Win32 libraries and binaries behave the same.
15190   pgac_need_repl_snprintf=yes
15191 else
15192   pgac_need_repl_snprintf=no
15193   for ac_func in snprintf
15194 do :
15195   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15196 if test "x$ac_cv_func_snprintf" = xyes; then :
15197   cat >>confdefs.h <<_ACEOF
15198 #define HAVE_SNPRINTF 1
15199 _ACEOF
15200
15201 else
15202   pgac_need_repl_snprintf=yes
15203 fi
15204 done
15205
15206   for ac_func in vsnprintf
15207 do :
15208   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
15209 if test "x$ac_cv_func_vsnprintf" = xyes; then :
15210   cat >>confdefs.h <<_ACEOF
15211 #define HAVE_VSNPRINTF 1
15212 _ACEOF
15213
15214 else
15215   pgac_need_repl_snprintf=yes
15216 fi
15217 done
15218
15219 fi
15220
15221
15222 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
15223 # include/c.h will provide declarations.  Note this is a separate test
15224 # from whether the functions exist in the C library --- there are
15225 # systems that have the functions but don't bother to declare them :-(
15226
15227 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15228 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15229   ac_have_decl=1
15230 else
15231   ac_have_decl=0
15232 fi
15233
15234 cat >>confdefs.h <<_ACEOF
15235 #define HAVE_DECL_SNPRINTF $ac_have_decl
15236 _ACEOF
15237 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
15238 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
15239   ac_have_decl=1
15240 else
15241   ac_have_decl=0
15242 fi
15243
15244 cat >>confdefs.h <<_ACEOF
15245 #define HAVE_DECL_VSNPRINTF $ac_have_decl
15246 _ACEOF
15247
15248
15249
15250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15251 $as_echo_n "checking for isinf... " >&6; }
15252 if ${ac_cv_func_isinf+:} false; then :
15253   $as_echo_n "(cached) " >&6
15254 else
15255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15256 /* end confdefs.h.  */
15257
15258 #include <math.h>
15259 double glob_double;
15260
15261 int
15262 main ()
15263 {
15264 return isinf(glob_double) ? 0 : 1;
15265   ;
15266   return 0;
15267 }
15268 _ACEOF
15269 if ac_fn_c_try_link "$LINENO"; then :
15270   ac_cv_func_isinf=yes
15271 else
15272   ac_cv_func_isinf=no
15273 fi
15274 rm -f core conftest.err conftest.$ac_objext \
15275     conftest$ac_exeext conftest.$ac_ext
15276 fi
15277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15278 $as_echo "$ac_cv_func_isinf" >&6; }
15279
15280 if test $ac_cv_func_isinf = yes ; then
15281
15282 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15283
15284 else
15285   case " $LIBOBJS " in
15286   *" isinf.$ac_objext "* ) ;;
15287   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15288  ;;
15289 esac
15290
15291   # Look for a way to implement a substitute for isinf()
15292   for ac_func in fpclass fp_class fp_class_d class
15293 do :
15294   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15295 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15296 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15297   cat >>confdefs.h <<_ACEOF
15298 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15299 _ACEOF
15300  break
15301 fi
15302 done
15303
15304 fi
15305
15306 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15307 if test "x$ac_cv_func_crypt" = xyes; then :
15308   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15309
15310 else
15311   case " $LIBOBJS " in
15312   *" crypt.$ac_objext "* ) ;;
15313   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15314  ;;
15315 esac
15316
15317 fi
15318
15319 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15320 if test "x$ac_cv_func_fls" = xyes; then :
15321   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15322
15323 else
15324   case " $LIBOBJS " in
15325   *" fls.$ac_objext "* ) ;;
15326   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15327  ;;
15328 esac
15329
15330 fi
15331
15332 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15333 if test "x$ac_cv_func_getopt" = xyes; then :
15334   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15335
15336 else
15337   case " $LIBOBJS " in
15338   *" getopt.$ac_objext "* ) ;;
15339   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15340  ;;
15341 esac
15342
15343 fi
15344
15345 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15346 if test "x$ac_cv_func_getrusage" = xyes; then :
15347   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15348
15349 else
15350   case " $LIBOBJS " in
15351   *" getrusage.$ac_objext "* ) ;;
15352   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15353  ;;
15354 esac
15355
15356 fi
15357
15358 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15359 if test "x$ac_cv_func_inet_aton" = xyes; then :
15360   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15361
15362 else
15363   case " $LIBOBJS " in
15364   *" inet_aton.$ac_objext "* ) ;;
15365   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15366  ;;
15367 esac
15368
15369 fi
15370
15371 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15372 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15373   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15374
15375 else
15376   case " $LIBOBJS " in
15377   *" mkdtemp.$ac_objext "* ) ;;
15378   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15379  ;;
15380 esac
15381
15382 fi
15383
15384 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15385 if test "x$ac_cv_func_random" = xyes; then :
15386   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15387
15388 else
15389   case " $LIBOBJS " in
15390   *" random.$ac_objext "* ) ;;
15391   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15392  ;;
15393 esac
15394
15395 fi
15396
15397 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15398 if test "x$ac_cv_func_rint" = xyes; then :
15399   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15400
15401 else
15402   case " $LIBOBJS " in
15403   *" rint.$ac_objext "* ) ;;
15404   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15405  ;;
15406 esac
15407
15408 fi
15409
15410 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15411 if test "x$ac_cv_func_srandom" = xyes; then :
15412   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15413
15414 else
15415   case " $LIBOBJS " in
15416   *" srandom.$ac_objext "* ) ;;
15417   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15418  ;;
15419 esac
15420
15421 fi
15422
15423 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
15424 if test "x$ac_cv_func_strerror" = xyes; then :
15425   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
15426
15427 else
15428   case " $LIBOBJS " in
15429   *" strerror.$ac_objext "* ) ;;
15430   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
15431  ;;
15432 esac
15433
15434 fi
15435
15436 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15437 if test "x$ac_cv_func_strlcat" = xyes; then :
15438   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15439
15440 else
15441   case " $LIBOBJS " in
15442   *" strlcat.$ac_objext "* ) ;;
15443   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15444  ;;
15445 esac
15446
15447 fi
15448
15449 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15450 if test "x$ac_cv_func_strlcpy" = xyes; then :
15451   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15452
15453 else
15454   case " $LIBOBJS " in
15455   *" strlcpy.$ac_objext "* ) ;;
15456   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15457  ;;
15458 esac
15459
15460 fi
15461
15462 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15463 if test "x$ac_cv_func_strnlen" = xyes; then :
15464   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15465
15466 else
15467   case " $LIBOBJS " in
15468   *" strnlen.$ac_objext "* ) ;;
15469   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15470  ;;
15471 esac
15472
15473 fi
15474
15475
15476
15477 case $host_os in
15478
15479         # Windows uses a specialised env handler
15480         # and doesn't need a replacement getpeereid because it doesn't use
15481         # Unix sockets.
15482         mingw*)
15483
15484 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15485
15486
15487 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15488
15489                 ac_cv_func_unsetenv=yes
15490                 ac_cv_func_getpeereid=yes;;
15491         *)
15492                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15493 if test "x$ac_cv_func_unsetenv" = xyes; then :
15494   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15495
15496 else
15497   case " $LIBOBJS " in
15498   *" unsetenv.$ac_objext "* ) ;;
15499   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15500  ;;
15501 esac
15502
15503 fi
15504
15505 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15506 if test "x$ac_cv_func_getpeereid" = xyes; then :
15507   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15508
15509 else
15510   case " $LIBOBJS " in
15511   *" getpeereid.$ac_objext "* ) ;;
15512   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15513  ;;
15514 esac
15515
15516 fi
15517
15518
15519                 ;;
15520 esac
15521
15522 # System's version of getaddrinfo(), if any, may be used only if we found
15523 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15524 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15525 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15526    test "$PORTNAME" != "win32"; then
15527   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15528 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15529   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15530
15531 else
15532   case " $LIBOBJS " in
15533   *" getaddrinfo.$ac_objext "* ) ;;
15534   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15535  ;;
15536 esac
15537
15538 fi
15539
15540
15541 else
15542   case " $LIBOBJS " in
15543   *" getaddrinfo.$ac_objext "* ) ;;
15544   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15545  ;;
15546 esac
15547
15548 fi
15549
15550 # Similarly, use system's getopt_long() only if system provides struct option.
15551 if test x"$ac_cv_type_struct_option" = xyes ; then
15552   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15553 if test "x$ac_cv_func_getopt_long" = xyes; then :
15554   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15555
15556 else
15557   case " $LIBOBJS " in
15558   *" getopt_long.$ac_objext "* ) ;;
15559   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15560  ;;
15561 esac
15562
15563 fi
15564
15565
15566 else
15567   case " $LIBOBJS " in
15568   *" getopt_long.$ac_objext "* ) ;;
15569   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15570  ;;
15571 esac
15572
15573 fi
15574
15575 # Solaris' getopt() doesn't do what we want for long options, so always use
15576 # our version on that platform.
15577 if test "$PORTNAME" = "solaris"; then
15578   case " $LIBOBJS " in
15579   *" getopt.$ac_objext "* ) ;;
15580   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15581  ;;
15582 esac
15583
15584 fi
15585
15586 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15587 # so always use our version on Windows.
15588 if test "$PORTNAME" = "win32"; then
15589   case " $LIBOBJS " in
15590   *" getopt.$ac_objext "* ) ;;
15591   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15592  ;;
15593 esac
15594
15595   case " $LIBOBJS " in
15596   *" getopt_long.$ac_objext "* ) ;;
15597   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15598  ;;
15599 esac
15600
15601 fi
15602
15603 # Win32 (really MinGW) support
15604 if test "$PORTNAME" = "win32"; then
15605   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15606 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15607   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15608
15609 else
15610   case " $LIBOBJS " in
15611   *" gettimeofday.$ac_objext "* ) ;;
15612   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15613  ;;
15614 esac
15615
15616 fi
15617
15618
15619   case " $LIBOBJS " in
15620   *" dirmod.$ac_objext "* ) ;;
15621   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15622  ;;
15623 esac
15624
15625   case " $LIBOBJS " in
15626   *" kill.$ac_objext "* ) ;;
15627   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15628  ;;
15629 esac
15630
15631   case " $LIBOBJS " in
15632   *" open.$ac_objext "* ) ;;
15633   *) LIBOBJS="$LIBOBJS open.$ac_objext"
15634  ;;
15635 esac
15636
15637   case " $LIBOBJS " in
15638   *" system.$ac_objext "* ) ;;
15639   *) LIBOBJS="$LIBOBJS system.$ac_objext"
15640  ;;
15641 esac
15642
15643   case " $LIBOBJS " in
15644   *" win32env.$ac_objext "* ) ;;
15645   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15646  ;;
15647 esac
15648
15649   case " $LIBOBJS " in
15650   *" win32error.$ac_objext "* ) ;;
15651   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15652  ;;
15653 esac
15654
15655   case " $LIBOBJS " in
15656   *" win32security.$ac_objext "* ) ;;
15657   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15658  ;;
15659 esac
15660
15661   case " $LIBOBJS " in
15662   *" win32setlocale.$ac_objext "* ) ;;
15663   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15664  ;;
15665 esac
15666
15667
15668 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
15669
15670   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
15671 #define WIN32_LEAN_AND_MEAN
15672 #include <windows.h>
15673 #include <string.h>
15674 #include <dbghelp.h>
15675 "
15676 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
15677
15678 cat >>confdefs.h <<_ACEOF
15679 #define HAVE_MINIDUMP_TYPE 1
15680 _ACEOF
15681
15682 pgac_minidump_type=yes
15683 else
15684   pgac_minidump_type=no
15685 fi
15686
15687 fi
15688 if test x"$pgac_minidump_type" = x"yes" ; then
15689   have_win32_dbghelp=yes
15690
15691 else
15692   have_win32_dbghelp=no
15693
15694 fi
15695
15696 # Cygwin needs only a bit of that
15697 if test "$PORTNAME" = "cygwin"; then
15698   case " $LIBOBJS " in
15699   *" dirmod.$ac_objext "* ) ;;
15700   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15701  ;;
15702 esac
15703
15704 fi
15705
15706 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
15707 /* NetBSD declares sys_siglist in unistd.h.  */
15708 #ifdef HAVE_UNISTD_H
15709 # include <unistd.h>
15710 #endif
15711
15712 "
15713 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
15714   ac_have_decl=1
15715 else
15716   ac_have_decl=0
15717 fi
15718
15719 cat >>confdefs.h <<_ACEOF
15720 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
15721 _ACEOF
15722
15723
15724 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15725 if test "x$ac_cv_func_syslog" = xyes; then :
15726   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15727 if test "x$ac_cv_header_syslog_h" = xyes; then :
15728
15729 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15730
15731 fi
15732
15733
15734 fi
15735
15736
15737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15738 $as_echo_n "checking for opterr... " >&6; }
15739 if ${pgac_cv_var_int_opterr+:} false; then :
15740   $as_echo_n "(cached) " >&6
15741 else
15742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15743 /* end confdefs.h.  */
15744 #include <unistd.h>
15745 int
15746 main ()
15747 {
15748 extern int opterr; opterr = 1;
15749   ;
15750   return 0;
15751 }
15752 _ACEOF
15753 if ac_fn_c_try_link "$LINENO"; then :
15754   pgac_cv_var_int_opterr=yes
15755 else
15756   pgac_cv_var_int_opterr=no
15757 fi
15758 rm -f core conftest.err conftest.$ac_objext \
15759     conftest$ac_exeext conftest.$ac_ext
15760 fi
15761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15762 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15763 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15764
15765 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15766
15767 fi
15768
15769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15770 $as_echo_n "checking for optreset... " >&6; }
15771 if ${pgac_cv_var_int_optreset+:} false; then :
15772   $as_echo_n "(cached) " >&6
15773 else
15774   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15775 /* end confdefs.h.  */
15776 #include <unistd.h>
15777 int
15778 main ()
15779 {
15780 extern int optreset; optreset = 1;
15781   ;
15782   return 0;
15783 }
15784 _ACEOF
15785 if ac_fn_c_try_link "$LINENO"; then :
15786   pgac_cv_var_int_optreset=yes
15787 else
15788   pgac_cv_var_int_optreset=no
15789 fi
15790 rm -f core conftest.err conftest.$ac_objext \
15791     conftest$ac_exeext conftest.$ac_ext
15792 fi
15793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
15794 $as_echo "$pgac_cv_var_int_optreset" >&6; }
15795 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15796
15797 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
15798
15799 fi
15800
15801 for ac_func in strtoll __strtoll strtoq
15802 do :
15803   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15804 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15805 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15806   cat >>confdefs.h <<_ACEOF
15807 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15808 _ACEOF
15809  break
15810 fi
15811 done
15812
15813 for ac_func in strtoull __strtoull strtouq
15814 do :
15815   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15816 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15817 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15818   cat >>confdefs.h <<_ACEOF
15819 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15820 _ACEOF
15821  break
15822 fi
15823 done
15824
15825 # strto[u]ll may exist but not be declared
15826 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
15827 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
15828   ac_have_decl=1
15829 else
15830   ac_have_decl=0
15831 fi
15832
15833 cat >>confdefs.h <<_ACEOF
15834 #define HAVE_DECL_STRTOLL $ac_have_decl
15835 _ACEOF
15836 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
15837 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
15838   ac_have_decl=1
15839 else
15840   ac_have_decl=0
15841 fi
15842
15843 cat >>confdefs.h <<_ACEOF
15844 #define HAVE_DECL_STRTOULL $ac_have_decl
15845 _ACEOF
15846
15847
15848 if test "$with_icu" = yes; then
15849   ac_save_CPPFLAGS=$CPPFLAGS
15850   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
15851
15852   # Verify we have ICU's header files
15853   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
15854 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
15855
15856 else
15857   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
15858 fi
15859
15860
15861
15862   CPPFLAGS=$ac_save_CPPFLAGS
15863 fi
15864
15865 # Lastly, restore full LIBS list and check for readline/libedit symbols
15866 LIBS="$LIBS_including_readline"
15867
15868 if test "$with_readline" = yes; then
15869   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
15870 $as_echo_n "checking for rl_completion_append_character... " >&6; }
15871 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
15872   $as_echo_n "(cached) " >&6
15873 else
15874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15875 /* end confdefs.h.  */
15876 #include <stdio.h>
15877 #ifdef HAVE_READLINE_READLINE_H
15878 # include <readline/readline.h>
15879 #elif defined(HAVE_READLINE_H)
15880 # include <readline.h>
15881 #endif
15882
15883 int
15884 main ()
15885 {
15886 rl_completion_append_character = 'x';
15887   ;
15888   return 0;
15889 }
15890 _ACEOF
15891 if ac_fn_c_try_link "$LINENO"; then :
15892   pgac_cv_var_rl_completion_append_character=yes
15893 else
15894   pgac_cv_var_rl_completion_append_character=no
15895 fi
15896 rm -f core conftest.err conftest.$ac_objext \
15897     conftest$ac_exeext conftest.$ac_ext
15898 fi
15899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
15900 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
15901 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
15902
15903 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
15904
15905 fi
15906   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
15907 do :
15908   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15909 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15910 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15911   cat >>confdefs.h <<_ACEOF
15912 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15913 _ACEOF
15914
15915 fi
15916 done
15917
15918   for ac_func in append_history history_truncate_file
15919 do :
15920   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15921 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15922 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15923   cat >>confdefs.h <<_ACEOF
15924 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15925 _ACEOF
15926
15927 fi
15928 done
15929
15930 fi
15931
15932
15933 # This test makes sure that run tests work at all.  Sometimes a shared
15934 # library is found by the linker, but the runtime linker can't find it.
15935 # This check should come after all modifications of compiler or linker
15936 # variables, and before any other run tests.
15937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
15938 $as_echo_n "checking test program... " >&6; }
15939 if test "$cross_compiling" = yes; then :
15940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
15941 $as_echo "cross-compiling" >&6; }
15942 else
15943   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15944 /* end confdefs.h.  */
15945 int main() { return 0; }
15946 _ACEOF
15947 if ac_fn_c_try_run "$LINENO"; then :
15948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15949 $as_echo "ok" >&6; }
15950 else
15951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15952 $as_echo "failed" >&6; }
15953 as_fn_error $? "
15954 Could not execute a simple test program.  This may be a problem
15955 related to locating shared libraries.  Check the file 'config.log'
15956 for the exact reason." "$LINENO" 5
15957 fi
15958 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15959   conftest.$ac_objext conftest.beam conftest.$ac_ext
15960 fi
15961
15962
15963 # --------------------
15964 # Run tests below here
15965 # --------------------
15966
15967 # Force use of our snprintf if system's doesn't do arg control
15968 # See comment above at snprintf test for details.
15969 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
15970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
15971 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
15972 if ${pgac_cv_snprintf_arg_control+:} false; then :
15973   $as_echo_n "(cached) " >&6
15974 else
15975   if test "$cross_compiling" = yes; then :
15976   pgac_cv_snprintf_arg_control=cross
15977 else
15978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15979 /* end confdefs.h.  */
15980 #include <stdio.h>
15981 #include <string.h>
15982
15983 int main()
15984 {
15985   char buf[100];
15986
15987   /* can it swap arguments? */
15988   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
15989   if (strcmp(buf, "4 3") != 0)
15990     return 1;
15991   return 0;
15992 }
15993 _ACEOF
15994 if ac_fn_c_try_run "$LINENO"; then :
15995   pgac_cv_snprintf_arg_control=yes
15996 else
15997   pgac_cv_snprintf_arg_control=no
15998 fi
15999 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16000   conftest.$ac_objext conftest.beam conftest.$ac_ext
16001 fi
16002
16003
16004 fi
16005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
16006 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
16007
16008   if test $pgac_cv_snprintf_arg_control != yes ; then
16009     pgac_need_repl_snprintf=yes
16010   fi
16011 fi
16012
16013
16014
16015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16016 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16017 if ${pgac_cv_type_long_int_64+:} false; then :
16018   $as_echo_n "(cached) " >&6
16019 else
16020   if test "$cross_compiling" = yes; then :
16021   # If cross-compiling, check the size reported by the compiler and
16022 # trust that the arithmetic works.
16023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16024 /* end confdefs.h.  */
16025
16026 int
16027 main ()
16028 {
16029 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16030 test_array [0] = 0;
16031 return test_array [0];
16032
16033   ;
16034   return 0;
16035 }
16036 _ACEOF
16037 if ac_fn_c_try_compile "$LINENO"; then :
16038   pgac_cv_type_long_int_64=yes
16039 else
16040   pgac_cv_type_long_int_64=no
16041 fi
16042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16043 else
16044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16045 /* end confdefs.h.  */
16046 typedef long int ac_int64;
16047
16048 /*
16049  * These are globals to discourage the compiler from folding all the
16050  * arithmetic tests down to compile-time constants.
16051  */
16052 ac_int64 a = 20000001;
16053 ac_int64 b = 40000005;
16054
16055 int does_int64_work()
16056 {
16057   ac_int64 c,d;
16058
16059   if (sizeof(ac_int64) != 8)
16060     return 0;                   /* definitely not the right size */
16061
16062   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16063   c = a * b;
16064   d = (c + b) / b;
16065   if (d != a+1)
16066     return 0;
16067   return 1;
16068 }
16069
16070 int
16071 main() {
16072   return (! does_int64_work());
16073 }
16074 _ACEOF
16075 if ac_fn_c_try_run "$LINENO"; then :
16076   pgac_cv_type_long_int_64=yes
16077 else
16078   pgac_cv_type_long_int_64=no
16079 fi
16080 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16081   conftest.$ac_objext conftest.beam conftest.$ac_ext
16082 fi
16083
16084 fi
16085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16086 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16087
16088 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16089 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16090
16091 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16092
16093 fi
16094
16095
16096 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16097   pg_int64_type="long int"
16098 else
16099   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16100 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16101 if ${pgac_cv_type_long_long_int_64+:} false; then :
16102   $as_echo_n "(cached) " >&6
16103 else
16104   if test "$cross_compiling" = yes; then :
16105   # If cross-compiling, check the size reported by the compiler and
16106 # trust that the arithmetic works.
16107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16108 /* end confdefs.h.  */
16109
16110 int
16111 main ()
16112 {
16113 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16114 test_array [0] = 0;
16115 return test_array [0];
16116
16117   ;
16118   return 0;
16119 }
16120 _ACEOF
16121 if ac_fn_c_try_compile "$LINENO"; then :
16122   pgac_cv_type_long_long_int_64=yes
16123 else
16124   pgac_cv_type_long_long_int_64=no
16125 fi
16126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16127 else
16128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16129 /* end confdefs.h.  */
16130 typedef long long int ac_int64;
16131
16132 /*
16133  * These are globals to discourage the compiler from folding all the
16134  * arithmetic tests down to compile-time constants.
16135  */
16136 ac_int64 a = 20000001;
16137 ac_int64 b = 40000005;
16138
16139 int does_int64_work()
16140 {
16141   ac_int64 c,d;
16142
16143   if (sizeof(ac_int64) != 8)
16144     return 0;                   /* definitely not the right size */
16145
16146   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16147   c = a * b;
16148   d = (c + b) / b;
16149   if (d != a+1)
16150     return 0;
16151   return 1;
16152 }
16153
16154 int
16155 main() {
16156   return (! does_int64_work());
16157 }
16158 _ACEOF
16159 if ac_fn_c_try_run "$LINENO"; then :
16160   pgac_cv_type_long_long_int_64=yes
16161 else
16162   pgac_cv_type_long_long_int_64=no
16163 fi
16164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16165   conftest.$ac_objext conftest.beam conftest.$ac_ext
16166 fi
16167
16168 fi
16169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16170 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16171
16172 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16173 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16174
16175 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16176
16177 fi
16178
16179   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16180     pg_int64_type="long long int"
16181   else
16182     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16183   fi
16184 fi
16185
16186
16187 cat >>confdefs.h <<_ACEOF
16188 #define PG_INT64_TYPE $pg_int64_type
16189 _ACEOF
16190
16191
16192 # Select the printf length modifier that goes with that, too.
16193 # (This used to be bound up with replacement-snprintf selection, but now
16194 # we assume that the native *printf functions use standard length modifiers.)
16195 if test x"$pg_int64_type" = x"long long int" ; then
16196   INT64_MODIFIER='"ll"'
16197 else
16198   INT64_MODIFIER='"l"'
16199 fi
16200
16201
16202 cat >>confdefs.h <<_ACEOF
16203 #define INT64_MODIFIER $INT64_MODIFIER
16204 _ACEOF
16205
16206
16207 # Force use of our snprintf if the system's doesn't support the %z flag.
16208 # (Note this test uses PG_INT64_TYPE and INT64_MODIFIER.)
16209 if test "$pgac_need_repl_snprintf" = no; then
16210   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
16211 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
16212 if ${pgac_cv_snprintf_size_t_support+:} false; then :
16213   $as_echo_n "(cached) " >&6
16214 else
16215   if test "$cross_compiling" = yes; then :
16216   pgac_cv_snprintf_size_t_support=cross
16217 else
16218   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16219 /* end confdefs.h.  */
16220 #include <stdio.h>
16221 #include <string.h>
16222
16223 int main()
16224 {
16225   char bufz[100];
16226   char buf64[100];
16227
16228   /*
16229    * Print the largest unsigned number fitting in a size_t using both %zu
16230    * and the previously-determined format for 64-bit integers.  Note that
16231    * we don't run this code unless we know snprintf handles 64-bit ints.
16232    */
16233   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
16234   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
16235   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
16236     (unsigned PG_INT64_TYPE) ~((size_t) 0));
16237   if (strcmp(bufz, buf64) != 0)
16238     return 1;
16239   return 0;
16240 }
16241 _ACEOF
16242 if ac_fn_c_try_run "$LINENO"; then :
16243   pgac_cv_snprintf_size_t_support=yes
16244 else
16245   pgac_cv_snprintf_size_t_support=no
16246 fi
16247 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16248   conftest.$ac_objext conftest.beam conftest.$ac_ext
16249 fi
16250
16251
16252 fi
16253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
16254 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
16255
16256   if test "$pgac_cv_snprintf_size_t_support" != yes; then
16257     pgac_need_repl_snprintf=yes
16258   fi
16259 fi
16260
16261 # Now we have checked all the reasons to replace snprintf
16262 if test $pgac_need_repl_snprintf = yes; then
16263
16264 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
16265
16266   case " $LIBOBJS " in
16267   *" snprintf.$ac_objext "* ) ;;
16268   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
16269  ;;
16270 esac
16271
16272 fi
16273
16274 # has to be down here, rather than with the other builtins, because
16275 # the test uses PG_INT64_TYPE.
16276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16277 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16278 if ${pgac_cv__builtin_op_overflow+:} false; then :
16279   $as_echo_n "(cached) " >&6
16280 else
16281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16282 /* end confdefs.h.  */
16283
16284 PG_INT64_TYPE a = 1;
16285 PG_INT64_TYPE b = 1;
16286 PG_INT64_TYPE result;
16287 int oflo;
16288
16289 int
16290 main ()
16291 {
16292 oflo = __builtin_mul_overflow(a, b, &result);
16293   ;
16294   return 0;
16295 }
16296 _ACEOF
16297 if ac_fn_c_try_link "$LINENO"; then :
16298   pgac_cv__builtin_op_overflow=yes
16299 else
16300   pgac_cv__builtin_op_overflow=no
16301 fi
16302 rm -f core conftest.err conftest.$ac_objext \
16303     conftest$ac_exeext conftest.$ac_ext
16304 fi
16305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16306 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16307 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16308
16309 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16310
16311 fi
16312
16313 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16314 # The cast to long int works around a bug in the HP C Compiler
16315 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16316 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16317 # This bug is HP SR number 8606223364.
16318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16319 $as_echo_n "checking size of void *... " >&6; }
16320 if ${ac_cv_sizeof_void_p+:} false; then :
16321   $as_echo_n "(cached) " >&6
16322 else
16323   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16324
16325 else
16326   if test "$ac_cv_type_void_p" = yes; then
16327      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16328 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16329 as_fn_error 77 "cannot compute sizeof (void *)
16330 See \`config.log' for more details" "$LINENO" 5; }
16331    else
16332      ac_cv_sizeof_void_p=0
16333    fi
16334 fi
16335
16336 fi
16337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16338 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16339
16340
16341
16342 cat >>confdefs.h <<_ACEOF
16343 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16344 _ACEOF
16345
16346
16347 # The cast to long int works around a bug in the HP C Compiler
16348 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16349 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16350 # This bug is HP SR number 8606223364.
16351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16352 $as_echo_n "checking size of size_t... " >&6; }
16353 if ${ac_cv_sizeof_size_t+:} false; then :
16354   $as_echo_n "(cached) " >&6
16355 else
16356   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16357
16358 else
16359   if test "$ac_cv_type_size_t" = yes; then
16360      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16361 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16362 as_fn_error 77 "cannot compute sizeof (size_t)
16363 See \`config.log' for more details" "$LINENO" 5; }
16364    else
16365      ac_cv_sizeof_size_t=0
16366    fi
16367 fi
16368
16369 fi
16370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16371 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16372
16373
16374
16375 cat >>confdefs.h <<_ACEOF
16376 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16377 _ACEOF
16378
16379
16380 # The cast to long int works around a bug in the HP C Compiler
16381 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16382 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16383 # This bug is HP SR number 8606223364.
16384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16385 $as_echo_n "checking size of long... " >&6; }
16386 if ${ac_cv_sizeof_long+:} false; then :
16387   $as_echo_n "(cached) " >&6
16388 else
16389   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16390
16391 else
16392   if test "$ac_cv_type_long" = yes; then
16393      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16394 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16395 as_fn_error 77 "cannot compute sizeof (long)
16396 See \`config.log' for more details" "$LINENO" 5; }
16397    else
16398      ac_cv_sizeof_long=0
16399    fi
16400 fi
16401
16402 fi
16403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16404 $as_echo "$ac_cv_sizeof_long" >&6; }
16405
16406
16407
16408 cat >>confdefs.h <<_ACEOF
16409 #define SIZEOF_LONG $ac_cv_sizeof_long
16410 _ACEOF
16411
16412
16413
16414 # Decide whether float4 is passed by value: user-selectable, enabled by default
16415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16416 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16417
16418
16419 # Check whether --enable-float4-byval was given.
16420 if test "${enable_float4_byval+set}" = set; then :
16421   enableval=$enable_float4_byval;
16422   case $enableval in
16423     yes)
16424
16425 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16426
16427                float4passbyval=true
16428       ;;
16429     no)
16430       float4passbyval=false
16431       ;;
16432     *)
16433       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16434       ;;
16435   esac
16436
16437 else
16438   enable_float4_byval=yes
16439
16440 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16441
16442                float4passbyval=true
16443 fi
16444
16445
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16447 $as_echo "$enable_float4_byval" >&6; }
16448
16449 cat >>confdefs.h <<_ACEOF
16450 #define FLOAT4PASSBYVAL $float4passbyval
16451 _ACEOF
16452
16453
16454 # Decide whether float8 is passed by value.
16455 # Note: this setting also controls int8 and related types such as timestamp.
16456 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16457 # If not, trying to select it is an error.
16458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16459 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16460 if test $ac_cv_sizeof_void_p -ge 8 ; then
16461
16462
16463 # Check whether --enable-float8-byval was given.
16464 if test "${enable_float8_byval+set}" = set; then :
16465   enableval=$enable_float8_byval;
16466   case $enableval in
16467     yes)
16468       :
16469       ;;
16470     no)
16471       :
16472       ;;
16473     *)
16474       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16475       ;;
16476   esac
16477
16478 else
16479   enable_float8_byval=yes
16480
16481 fi
16482
16483
16484 else
16485
16486
16487 # Check whether --enable-float8-byval was given.
16488 if test "${enable_float8_byval+set}" = set; then :
16489   enableval=$enable_float8_byval;
16490   case $enableval in
16491     yes)
16492       :
16493       ;;
16494     no)
16495       :
16496       ;;
16497     *)
16498       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16499       ;;
16500   esac
16501
16502 else
16503   enable_float8_byval=no
16504
16505 fi
16506
16507
16508   if test "$enable_float8_byval" = yes ; then
16509     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16510   fi
16511 fi
16512 if test "$enable_float8_byval" = yes ; then
16513
16514 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16515
16516   float8passbyval=true
16517 else
16518   float8passbyval=false
16519 fi
16520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16521 $as_echo "$enable_float8_byval" >&6; }
16522
16523 cat >>confdefs.h <<_ACEOF
16524 #define FLOAT8PASSBYVAL $float8passbyval
16525 _ACEOF
16526
16527
16528 # Determine memory alignment requirements for the basic C data types.
16529
16530 # The cast to long int works around a bug in the HP C Compiler,
16531 # see AC_CHECK_SIZEOF for more information.
16532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16533 $as_echo_n "checking alignment of short... " >&6; }
16534 if ${ac_cv_alignof_short+:} false; then :
16535   $as_echo_n "(cached) " >&6
16536 else
16537   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16538 #ifndef offsetof
16539 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16540 #endif
16541 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16542
16543 else
16544   if test "$ac_cv_type_short" = yes; then
16545      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16546 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16547 as_fn_error 77 "cannot compute alignment of short
16548 See \`config.log' for more details" "$LINENO" 5; }
16549    else
16550      ac_cv_alignof_short=0
16551    fi
16552 fi
16553
16554 fi
16555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16556 $as_echo "$ac_cv_alignof_short" >&6; }
16557
16558
16559
16560 cat >>confdefs.h <<_ACEOF
16561 #define ALIGNOF_SHORT $ac_cv_alignof_short
16562 _ACEOF
16563
16564
16565 # The cast to long int works around a bug in the HP C Compiler,
16566 # see AC_CHECK_SIZEOF for more information.
16567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16568 $as_echo_n "checking alignment of int... " >&6; }
16569 if ${ac_cv_alignof_int+:} false; then :
16570   $as_echo_n "(cached) " >&6
16571 else
16572   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16573 #ifndef offsetof
16574 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16575 #endif
16576 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16577
16578 else
16579   if test "$ac_cv_type_int" = yes; then
16580      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16581 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16582 as_fn_error 77 "cannot compute alignment of int
16583 See \`config.log' for more details" "$LINENO" 5; }
16584    else
16585      ac_cv_alignof_int=0
16586    fi
16587 fi
16588
16589 fi
16590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16591 $as_echo "$ac_cv_alignof_int" >&6; }
16592
16593
16594
16595 cat >>confdefs.h <<_ACEOF
16596 #define ALIGNOF_INT $ac_cv_alignof_int
16597 _ACEOF
16598
16599
16600 # The cast to long int works around a bug in the HP C Compiler,
16601 # see AC_CHECK_SIZEOF for more information.
16602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16603 $as_echo_n "checking alignment of long... " >&6; }
16604 if ${ac_cv_alignof_long+:} false; then :
16605   $as_echo_n "(cached) " >&6
16606 else
16607   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16608 #ifndef offsetof
16609 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16610 #endif
16611 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16612
16613 else
16614   if test "$ac_cv_type_long" = yes; then
16615      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16616 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16617 as_fn_error 77 "cannot compute alignment of long
16618 See \`config.log' for more details" "$LINENO" 5; }
16619    else
16620      ac_cv_alignof_long=0
16621    fi
16622 fi
16623
16624 fi
16625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16626 $as_echo "$ac_cv_alignof_long" >&6; }
16627
16628
16629
16630 cat >>confdefs.h <<_ACEOF
16631 #define ALIGNOF_LONG $ac_cv_alignof_long
16632 _ACEOF
16633
16634
16635 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16636   # The cast to long int works around a bug in the HP C Compiler,
16637 # see AC_CHECK_SIZEOF for more information.
16638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16639 $as_echo_n "checking alignment of long long int... " >&6; }
16640 if ${ac_cv_alignof_long_long_int+:} false; then :
16641   $as_echo_n "(cached) " >&6
16642 else
16643   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
16644 #ifndef offsetof
16645 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16646 #endif
16647 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16648
16649 else
16650   if test "$ac_cv_type_long_long_int" = yes; then
16651      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16652 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16653 as_fn_error 77 "cannot compute alignment of long long int
16654 See \`config.log' for more details" "$LINENO" 5; }
16655    else
16656      ac_cv_alignof_long_long_int=0
16657    fi
16658 fi
16659
16660 fi
16661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16662 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16663
16664
16665
16666 cat >>confdefs.h <<_ACEOF
16667 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16668 _ACEOF
16669
16670
16671 fi
16672 # The cast to long int works around a bug in the HP C Compiler,
16673 # see AC_CHECK_SIZEOF for more information.
16674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16675 $as_echo_n "checking alignment of double... " >&6; }
16676 if ${ac_cv_alignof_double+:} false; then :
16677   $as_echo_n "(cached) " >&6
16678 else
16679   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
16680 #ifndef offsetof
16681 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16682 #endif
16683 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16684
16685 else
16686   if test "$ac_cv_type_double" = yes; then
16687      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16688 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16689 as_fn_error 77 "cannot compute alignment of double
16690 See \`config.log' for more details" "$LINENO" 5; }
16691    else
16692      ac_cv_alignof_double=0
16693    fi
16694 fi
16695
16696 fi
16697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16698 $as_echo "$ac_cv_alignof_double" >&6; }
16699
16700
16701
16702 cat >>confdefs.h <<_ACEOF
16703 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16704 _ACEOF
16705
16706
16707
16708 # Compute maximum alignment of any basic type.
16709 # We assume long's alignment is at least as strong as char, short, or int;
16710 # but we must check long long (if it is being used for int64) and double.
16711 # Note that we intentionally do not consider any types wider than 64 bits,
16712 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
16713 # for disk and memory space.
16714
16715 MAX_ALIGNOF=$ac_cv_alignof_long
16716 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
16717   MAX_ALIGNOF=$ac_cv_alignof_double
16718 fi
16719 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
16720   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
16721 fi
16722
16723 cat >>confdefs.h <<_ACEOF
16724 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16725 _ACEOF
16726
16727
16728
16729 # Some platforms predefine the types int8, int16, etc.  Only check
16730 # a (hopefully) representative subset.
16731 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16732 "
16733 if test "x$ac_cv_type_int8" = xyes; then :
16734
16735 cat >>confdefs.h <<_ACEOF
16736 #define HAVE_INT8 1
16737 _ACEOF
16738
16739
16740 fi
16741 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16742 "
16743 if test "x$ac_cv_type_uint8" = xyes; then :
16744
16745 cat >>confdefs.h <<_ACEOF
16746 #define HAVE_UINT8 1
16747 _ACEOF
16748
16749
16750 fi
16751 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
16752 "
16753 if test "x$ac_cv_type_int64" = xyes; then :
16754
16755 cat >>confdefs.h <<_ACEOF
16756 #define HAVE_INT64 1
16757 _ACEOF
16758
16759
16760 fi
16761 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
16762 "
16763 if test "x$ac_cv_type_uint64" = xyes; then :
16764
16765 cat >>confdefs.h <<_ACEOF
16766 #define HAVE_UINT64 1
16767 _ACEOF
16768
16769
16770 fi
16771
16772
16773 # Some compilers offer a 128-bit integer scalar type.
16774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16775 $as_echo_n "checking for __int128... " >&6; }
16776 if ${pgac_cv__128bit_int+:} false; then :
16777   $as_echo_n "(cached) " >&6
16778 else
16779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16780 /* end confdefs.h.  */
16781
16782 /*
16783  * We don't actually run this test, just link it to verify that any support
16784  * functions needed for __int128 are present.
16785  *
16786  * These are globals to discourage the compiler from folding all the
16787  * arithmetic tests down to compile-time constants.  We do not have
16788  * convenient support for 128bit literals at this point...
16789  */
16790 __int128 a = 48828125;
16791 __int128 b = 97656250;
16792
16793 int
16794 main ()
16795 {
16796
16797 __int128 c,d;
16798 a = (a << 12) + 1; /* 200000000001 */
16799 b = (b << 12) + 5; /* 400000000005 */
16800 /* try the most relevant arithmetic ops */
16801 c = a * b;
16802 d = (c + b) / b;
16803 /* must use the results, else compiler may optimize arithmetic away */
16804 if (d != a+1)
16805   return 1;
16806
16807   ;
16808   return 0;
16809 }
16810 _ACEOF
16811 if ac_fn_c_try_link "$LINENO"; then :
16812   pgac_cv__128bit_int=yes
16813 else
16814   pgac_cv__128bit_int=no
16815 fi
16816 rm -f core conftest.err conftest.$ac_objext \
16817     conftest$ac_exeext conftest.$ac_ext
16818 fi
16819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
16820 $as_echo "$pgac_cv__128bit_int" >&6; }
16821 if test x"$pgac_cv__128bit_int" = xyes ; then
16822   # Use of non-default alignment with __int128 tickles bugs in some compilers.
16823   # If not cross-compiling, we can test for bugs and disable use of __int128
16824   # with buggy compilers.  If cross-compiling, hope for the best.
16825   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
16826   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
16827 $as_echo_n "checking for __int128 alignment bug... " >&6; }
16828 if ${pgac_cv__128bit_int_bug+:} false; then :
16829   $as_echo_n "(cached) " >&6
16830 else
16831   if test "$cross_compiling" = yes; then :
16832   pgac_cv__128bit_int_bug="assuming ok"
16833 else
16834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16835 /* end confdefs.h.  */
16836
16837 /* This must match the corresponding code in c.h: */
16838 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
16839 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
16840 #endif
16841 typedef __int128 int128a
16842 #if defined(pg_attribute_aligned)
16843 pg_attribute_aligned(8)
16844 #endif
16845 ;
16846 int128a holder;
16847 void pass_by_val(void *buffer, int128a par) { holder = par; }
16848
16849 int
16850 main ()
16851 {
16852
16853 long int i64 = 97656225L << 12;
16854 int128a q;
16855 pass_by_val(main, (int128a) i64);
16856 q = (int128a) i64;
16857 if (q != holder)
16858   return 1;
16859
16860   ;
16861   return 0;
16862 }
16863 _ACEOF
16864 if ac_fn_c_try_run "$LINENO"; then :
16865   pgac_cv__128bit_int_bug=ok
16866 else
16867   pgac_cv__128bit_int_bug=broken
16868 fi
16869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16870   conftest.$ac_objext conftest.beam conftest.$ac_ext
16871 fi
16872
16873 fi
16874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
16875 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
16876   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
16877
16878 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
16879
16880     # The cast to long int works around a bug in the HP C Compiler,
16881 # see AC_CHECK_SIZEOF for more information.
16882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
16883 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
16884 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
16885   $as_echo_n "(cached) " >&6
16886 else
16887   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
16888 #ifndef offsetof
16889 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16890 #endif
16891 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
16892
16893 else
16894   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
16895      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16896 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16897 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
16898 See \`config.log' for more details" "$LINENO" 5; }
16899    else
16900      ac_cv_alignof_PG_INT128_TYPE=0
16901    fi
16902 fi
16903
16904 fi
16905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
16906 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
16907
16908
16909
16910 cat >>confdefs.h <<_ACEOF
16911 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
16912 _ACEOF
16913
16914
16915   fi
16916 fi
16917
16918 # Check for various atomic operations now that we have checked how to declare
16919 # 64bit integers.
16920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
16921 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
16922 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
16923   $as_echo_n "(cached) " >&6
16924 else
16925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16926 /* end confdefs.h.  */
16927
16928 int
16929 main ()
16930 {
16931 char lock = 0;
16932    __sync_lock_test_and_set(&lock, 1);
16933    __sync_lock_release(&lock);
16934   ;
16935   return 0;
16936 }
16937 _ACEOF
16938 if ac_fn_c_try_link "$LINENO"; then :
16939   pgac_cv_gcc_sync_char_tas="yes"
16940 else
16941   pgac_cv_gcc_sync_char_tas="no"
16942 fi
16943 rm -f core conftest.err conftest.$ac_objext \
16944     conftest$ac_exeext conftest.$ac_ext
16945 fi
16946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
16947 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
16948 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
16949
16950 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
16951
16952 fi
16953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
16954 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
16955 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
16956   $as_echo_n "(cached) " >&6
16957 else
16958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16959 /* end confdefs.h.  */
16960
16961 int
16962 main ()
16963 {
16964 int lock = 0;
16965    __sync_lock_test_and_set(&lock, 1);
16966    __sync_lock_release(&lock);
16967   ;
16968   return 0;
16969 }
16970 _ACEOF
16971 if ac_fn_c_try_link "$LINENO"; then :
16972   pgac_cv_gcc_sync_int32_tas="yes"
16973 else
16974   pgac_cv_gcc_sync_int32_tas="no"
16975 fi
16976 rm -f core conftest.err conftest.$ac_objext \
16977     conftest$ac_exeext conftest.$ac_ext
16978 fi
16979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
16980 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
16981 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
16982
16983 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
16984
16985 fi
16986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
16987 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
16988 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
16989   $as_echo_n "(cached) " >&6
16990 else
16991   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16992 /* end confdefs.h.  */
16993
16994 int
16995 main ()
16996 {
16997 int val = 0;
16998    __sync_val_compare_and_swap(&val, 0, 37);
16999   ;
17000   return 0;
17001 }
17002 _ACEOF
17003 if ac_fn_c_try_link "$LINENO"; then :
17004   pgac_cv_gcc_sync_int32_cas="yes"
17005 else
17006   pgac_cv_gcc_sync_int32_cas="no"
17007 fi
17008 rm -f core conftest.err conftest.$ac_objext \
17009     conftest$ac_exeext conftest.$ac_ext
17010 fi
17011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17012 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17013 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17014
17015 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17016
17017 fi
17018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17019 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17020 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17021   $as_echo_n "(cached) " >&6
17022 else
17023   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17024 /* end confdefs.h.  */
17025
17026 int
17027 main ()
17028 {
17029 PG_INT64_TYPE lock = 0;
17030    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17031   ;
17032   return 0;
17033 }
17034 _ACEOF
17035 if ac_fn_c_try_link "$LINENO"; then :
17036   pgac_cv_gcc_sync_int64_cas="yes"
17037 else
17038   pgac_cv_gcc_sync_int64_cas="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_gcc_sync_int64_cas" >&5
17044 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17045 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17046
17047 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17048
17049 fi
17050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17051 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17052 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17053   $as_echo_n "(cached) " >&6
17054 else
17055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17056 /* end confdefs.h.  */
17057
17058 int
17059 main ()
17060 {
17061 int val = 0;
17062    int expect = 0;
17063    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17064   ;
17065   return 0;
17066 }
17067 _ACEOF
17068 if ac_fn_c_try_link "$LINENO"; then :
17069   pgac_cv_gcc_atomic_int32_cas="yes"
17070 else
17071   pgac_cv_gcc_atomic_int32_cas="no"
17072 fi
17073 rm -f core conftest.err conftest.$ac_objext \
17074     conftest$ac_exeext conftest.$ac_ext
17075 fi
17076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17077 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17078 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17079
17080 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17081
17082 fi
17083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17084 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17085 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17086   $as_echo_n "(cached) " >&6
17087 else
17088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17089 /* end confdefs.h.  */
17090
17091 int
17092 main ()
17093 {
17094 PG_INT64_TYPE val = 0;
17095    PG_INT64_TYPE expect = 0;
17096    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17097   ;
17098   return 0;
17099 }
17100 _ACEOF
17101 if ac_fn_c_try_link "$LINENO"; then :
17102   pgac_cv_gcc_atomic_int64_cas="yes"
17103 else
17104   pgac_cv_gcc_atomic_int64_cas="no"
17105 fi
17106 rm -f core conftest.err conftest.$ac_objext \
17107     conftest$ac_exeext conftest.$ac_ext
17108 fi
17109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17110 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17111 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17112
17113 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17114
17115 fi
17116
17117
17118 # Check for x86 cpuid instruction
17119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17120 $as_echo_n "checking for __get_cpuid... " >&6; }
17121 if ${pgac_cv__get_cpuid+:} false; then :
17122   $as_echo_n "(cached) " >&6
17123 else
17124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17125 /* end confdefs.h.  */
17126 #include <cpuid.h>
17127 int
17128 main ()
17129 {
17130 unsigned int exx[4] = {0, 0, 0, 0};
17131   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17132
17133   ;
17134   return 0;
17135 }
17136 _ACEOF
17137 if ac_fn_c_try_link "$LINENO"; then :
17138   pgac_cv__get_cpuid="yes"
17139 else
17140   pgac_cv__get_cpuid="no"
17141 fi
17142 rm -f core conftest.err conftest.$ac_objext \
17143     conftest$ac_exeext conftest.$ac_ext
17144 fi
17145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17146 $as_echo "$pgac_cv__get_cpuid" >&6; }
17147 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17148
17149 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17150
17151 fi
17152
17153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17154 $as_echo_n "checking for __cpuid... " >&6; }
17155 if ${pgac_cv__cpuid+:} false; then :
17156   $as_echo_n "(cached) " >&6
17157 else
17158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17159 /* end confdefs.h.  */
17160 #include <intrin.h>
17161 int
17162 main ()
17163 {
17164 unsigned int exx[4] = {0, 0, 0, 0};
17165   __get_cpuid(exx[0], 1);
17166
17167   ;
17168   return 0;
17169 }
17170 _ACEOF
17171 if ac_fn_c_try_link "$LINENO"; then :
17172   pgac_cv__cpuid="yes"
17173 else
17174   pgac_cv__cpuid="no"
17175 fi
17176 rm -f core conftest.err conftest.$ac_objext \
17177     conftest$ac_exeext conftest.$ac_ext
17178 fi
17179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17180 $as_echo "$pgac_cv__cpuid" >&6; }
17181 if test x"$pgac_cv__cpuid" = x"yes"; then
17182
17183 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17184
17185 fi
17186
17187 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17188 #
17189 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17190 # with the default compiler flags. If not, check if adding the -msse4.2
17191 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17193 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17194 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17195   $as_echo_n "(cached) " >&6
17196 else
17197   pgac_save_CFLAGS=$CFLAGS
17198 CFLAGS="$pgac_save_CFLAGS "
17199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17200 /* end confdefs.h.  */
17201 #include <nmmintrin.h>
17202 int
17203 main ()
17204 {
17205 unsigned int crc = 0;
17206    crc = _mm_crc32_u8(crc, 0);
17207    crc = _mm_crc32_u32(crc, 0);
17208    /* return computed value, to prevent the above being optimized away */
17209    return crc == 0;
17210   ;
17211   return 0;
17212 }
17213 _ACEOF
17214 if ac_fn_c_try_link "$LINENO"; then :
17215   pgac_cv_sse42_crc32_intrinsics_=yes
17216 else
17217   pgac_cv_sse42_crc32_intrinsics_=no
17218 fi
17219 rm -f core conftest.err conftest.$ac_objext \
17220     conftest$ac_exeext conftest.$ac_ext
17221 CFLAGS="$pgac_save_CFLAGS"
17222 fi
17223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17224 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17225 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17226   CFLAGS_SSE42=""
17227   pgac_sse42_crc32_intrinsics=yes
17228 fi
17229
17230 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17231   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17232 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17233 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17234   $as_echo_n "(cached) " >&6
17235 else
17236   pgac_save_CFLAGS=$CFLAGS
17237 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17239 /* end confdefs.h.  */
17240 #include <nmmintrin.h>
17241 int
17242 main ()
17243 {
17244 unsigned int crc = 0;
17245    crc = _mm_crc32_u8(crc, 0);
17246    crc = _mm_crc32_u32(crc, 0);
17247    /* return computed value, to prevent the above being optimized away */
17248    return crc == 0;
17249   ;
17250   return 0;
17251 }
17252 _ACEOF
17253 if ac_fn_c_try_link "$LINENO"; then :
17254   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17255 else
17256   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17257 fi
17258 rm -f core conftest.err conftest.$ac_objext \
17259     conftest$ac_exeext conftest.$ac_ext
17260 CFLAGS="$pgac_save_CFLAGS"
17261 fi
17262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17263 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17264 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17265   CFLAGS_SSE42="-msse4.2"
17266   pgac_sse42_crc32_intrinsics=yes
17267 fi
17268
17269 fi
17270
17271
17272 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17273 # define __SSE4_2__ in that case.
17274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17275 /* end confdefs.h.  */
17276
17277 int
17278 main ()
17279 {
17280
17281 #ifndef __SSE4_2__
17282 #error __SSE4_2__ not defined
17283 #endif
17284
17285   ;
17286   return 0;
17287 }
17288 _ACEOF
17289 if ac_fn_c_try_compile "$LINENO"; then :
17290   SSE4_2_TARGETED=1
17291 fi
17292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17293
17294 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17295 #
17296 # First check if __crc32c* intrinsics can be used with the default compiler
17297 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17298 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17300 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17301 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17302   $as_echo_n "(cached) " >&6
17303 else
17304   pgac_save_CFLAGS=$CFLAGS
17305 CFLAGS="$pgac_save_CFLAGS "
17306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17307 /* end confdefs.h.  */
17308 #include <arm_acle.h>
17309 int
17310 main ()
17311 {
17312 unsigned int crc = 0;
17313    crc = __crc32cb(crc, 0);
17314    crc = __crc32ch(crc, 0);
17315    crc = __crc32cw(crc, 0);
17316    crc = __crc32cd(crc, 0);
17317    /* return computed value, to prevent the above being optimized away */
17318    return crc == 0;
17319   ;
17320   return 0;
17321 }
17322 _ACEOF
17323 if ac_fn_c_try_link "$LINENO"; then :
17324   pgac_cv_armv8_crc32c_intrinsics_=yes
17325 else
17326   pgac_cv_armv8_crc32c_intrinsics_=no
17327 fi
17328 rm -f core conftest.err conftest.$ac_objext \
17329     conftest$ac_exeext conftest.$ac_ext
17330 CFLAGS="$pgac_save_CFLAGS"
17331 fi
17332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17333 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17334 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17335   CFLAGS_ARMV8_CRC32C=""
17336   pgac_armv8_crc32c_intrinsics=yes
17337 fi
17338
17339 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17340   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17341 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17342 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17343   $as_echo_n "(cached) " >&6
17344 else
17345   pgac_save_CFLAGS=$CFLAGS
17346 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17348 /* end confdefs.h.  */
17349 #include <arm_acle.h>
17350 int
17351 main ()
17352 {
17353 unsigned int crc = 0;
17354    crc = __crc32cb(crc, 0);
17355    crc = __crc32ch(crc, 0);
17356    crc = __crc32cw(crc, 0);
17357    crc = __crc32cd(crc, 0);
17358    /* return computed value, to prevent the above being optimized away */
17359    return crc == 0;
17360   ;
17361   return 0;
17362 }
17363 _ACEOF
17364 if ac_fn_c_try_link "$LINENO"; then :
17365   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17366 else
17367   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17368 fi
17369 rm -f core conftest.err conftest.$ac_objext \
17370     conftest$ac_exeext conftest.$ac_ext
17371 CFLAGS="$pgac_save_CFLAGS"
17372 fi
17373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17374 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17375 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17376   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17377   pgac_armv8_crc32c_intrinsics=yes
17378 fi
17379
17380 fi
17381
17382
17383 # Select CRC-32C implementation.
17384 #
17385 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17386 # use the special CRC instructions for calculating CRC-32C. If we're not
17387 # targeting such a processor, but we can nevertheless produce code that uses
17388 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17389 # implementations and select which one to use at runtime, depending on whether
17390 # SSE 4.2 is supported by the processor we're running on.
17391 #
17392 # Similarly, if we are targeting an ARM processor that has the CRC
17393 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17394 # we're not targeting such a processor, but can nevertheless produce code that
17395 # uses the CRC instructions, compile both, and select at runtime.
17396 #
17397 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17398 # in the template or configure command line.
17399 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
17400   # Use Intel SSE 4.2 if available.
17401   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17402     USE_SSE42_CRC32C=1
17403   else
17404     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17405     # the runtime check.
17406     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
17407       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17408     else
17409       # Use ARM CRC Extension if available.
17410       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17411         USE_ARMV8_CRC32C=1
17412       else
17413         # ARM CRC Extension, with runtime check?
17414         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17415           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17416         else
17417           # fall back to slicing-by-8 algorithm, which doesn't require any
17418           # special CPU support.
17419           USE_SLICING_BY_8_CRC32C=1
17420         fi
17421       fi
17422     fi
17423   fi
17424 fi
17425
17426 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17428 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17429 if test x"$USE_SSE42_CRC32C" = x"1"; then
17430
17431 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17432
17433   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17435 $as_echo "SSE 4.2" >&6; }
17436 else
17437   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17438
17439 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17440
17441     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17442     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17443 $as_echo "SSE 4.2 with runtime check" >&6; }
17444   else
17445     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17446
17447 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17448
17449       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17450       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17451 $as_echo "ARMv8 CRC instructions" >&6; }
17452     else
17453       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17454
17455 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17456
17457         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17458         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17459 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17460       else
17461
17462 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17463
17464         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17465         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17466 $as_echo "slicing-by-8" >&6; }
17467       fi
17468     fi
17469   fi
17470 fi
17471
17472
17473
17474 # Select semaphore implementation type.
17475 if test "$PORTNAME" != "win32"; then
17476   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17477     # Need sem_open for this
17478     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17479 $as_echo_n "checking for library containing sem_open... " >&6; }
17480 if ${ac_cv_search_sem_open+:} false; then :
17481   $as_echo_n "(cached) " >&6
17482 else
17483   ac_func_search_save_LIBS=$LIBS
17484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17485 /* end confdefs.h.  */
17486
17487 /* Override any GCC internal prototype to avoid an error.
17488    Use char because int might match the return type of a GCC
17489    builtin and then its argument prototype would still apply.  */
17490 #ifdef __cplusplus
17491 extern "C"
17492 #endif
17493 char sem_open ();
17494 int
17495 main ()
17496 {
17497 return sem_open ();
17498   ;
17499   return 0;
17500 }
17501 _ACEOF
17502 for ac_lib in '' rt pthread; do
17503   if test -z "$ac_lib"; then
17504     ac_res="none required"
17505   else
17506     ac_res=-l$ac_lib
17507     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17508   fi
17509   if ac_fn_c_try_link "$LINENO"; then :
17510   ac_cv_search_sem_open=$ac_res
17511 fi
17512 rm -f core conftest.err conftest.$ac_objext \
17513     conftest$ac_exeext
17514   if ${ac_cv_search_sem_open+:} false; then :
17515   break
17516 fi
17517 done
17518 if ${ac_cv_search_sem_open+:} false; then :
17519
17520 else
17521   ac_cv_search_sem_open=no
17522 fi
17523 rm conftest.$ac_ext
17524 LIBS=$ac_func_search_save_LIBS
17525 fi
17526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17527 $as_echo "$ac_cv_search_sem_open" >&6; }
17528 ac_res=$ac_cv_search_sem_open
17529 if test "$ac_res" != no; then :
17530   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17531   USE_NAMED_POSIX_SEMAPHORES=1
17532 fi
17533
17534   fi
17535   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17536     # Need sem_init for this
17537     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17538 $as_echo_n "checking for library containing sem_init... " >&6; }
17539 if ${ac_cv_search_sem_init+:} false; then :
17540   $as_echo_n "(cached) " >&6
17541 else
17542   ac_func_search_save_LIBS=$LIBS
17543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17544 /* end confdefs.h.  */
17545
17546 /* Override any GCC internal prototype to avoid an error.
17547    Use char because int might match the return type of a GCC
17548    builtin and then its argument prototype would still apply.  */
17549 #ifdef __cplusplus
17550 extern "C"
17551 #endif
17552 char sem_init ();
17553 int
17554 main ()
17555 {
17556 return sem_init ();
17557   ;
17558   return 0;
17559 }
17560 _ACEOF
17561 for ac_lib in '' rt pthread; do
17562   if test -z "$ac_lib"; then
17563     ac_res="none required"
17564   else
17565     ac_res=-l$ac_lib
17566     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17567   fi
17568   if ac_fn_c_try_link "$LINENO"; then :
17569   ac_cv_search_sem_init=$ac_res
17570 fi
17571 rm -f core conftest.err conftest.$ac_objext \
17572     conftest$ac_exeext
17573   if ${ac_cv_search_sem_init+:} false; then :
17574   break
17575 fi
17576 done
17577 if ${ac_cv_search_sem_init+:} false; then :
17578
17579 else
17580   ac_cv_search_sem_init=no
17581 fi
17582 rm conftest.$ac_ext
17583 LIBS=$ac_func_search_save_LIBS
17584 fi
17585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17586 $as_echo "$ac_cv_search_sem_init" >&6; }
17587 ac_res=$ac_cv_search_sem_init
17588 if test "$ac_res" != no; then :
17589   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17590   USE_UNNAMED_POSIX_SEMAPHORES=1
17591 fi
17592
17593   fi
17594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17595 $as_echo_n "checking which semaphore API to use... " >&6; }
17596   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17597
17598 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17599
17600     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17601     sematype="named POSIX"
17602   else
17603     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17604
17605 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17606
17607       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17608       sematype="unnamed POSIX"
17609     else
17610
17611 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17612
17613       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17614       sematype="System V"
17615     fi
17616   fi
17617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17618 $as_echo "$sematype" >&6; }
17619 else
17620
17621 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17622
17623   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17624 fi
17625
17626
17627 # Select shared-memory implementation type.
17628 if test "$PORTNAME" != "win32"; then
17629
17630 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17631
17632   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17633 else
17634
17635 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17636
17637   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17638 fi
17639
17640 # Select random number source
17641 #
17642 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17643 # in the template or configure command line.
17644
17645 # If not selected manually, try to select a source automatically.
17646 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
17647   if test x"$with_openssl" = x"yes" ; then
17648     USE_OPENSSL_RANDOM=1
17649   elif test "$PORTNAME" = "win32" ; then
17650     USE_WIN32_RANDOM=1
17651   else
17652     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17653 $as_echo_n "checking for /dev/urandom... " >&6; }
17654 if ${ac_cv_file__dev_urandom+:} false; then :
17655   $as_echo_n "(cached) " >&6
17656 else
17657   test "$cross_compiling" = yes &&
17658   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17659 if test -r "/dev/urandom"; then
17660   ac_cv_file__dev_urandom=yes
17661 else
17662   ac_cv_file__dev_urandom=no
17663 fi
17664 fi
17665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17666 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17667 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17668
17669 fi
17670
17671
17672     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17673       USE_DEV_URANDOM=1
17674     fi
17675   fi
17676 fi
17677
17678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17679 $as_echo_n "checking which random number source to use... " >&6; }
17680 if test "$enable_strong_random" = yes ; then
17681   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17682
17683 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17684
17685     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17686 $as_echo "OpenSSL" >&6; }
17687   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
17688
17689 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
17690
17691     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17692 $as_echo "Windows native" >&6; }
17693   elif test x"$USE_DEV_URANDOM" = x"1" ; then
17694
17695 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
17696
17697     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17698 $as_echo "/dev/urandom" >&6; }
17699   else
17700     as_fn_error $? "
17701 no source of strong random numbers was found
17702 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
17703 for authentication protocols. You can use --disable-strong-random to use a
17704 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
17705   fi
17706
17707 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
17708
17709 else
17710     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
17711 $as_echo "weak builtin PRNG" >&6; }
17712     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17713 *** Not using a strong random number source may be insecure." >&5
17714 $as_echo "$as_me: WARNING:
17715 *** Not using a strong random number source may be insecure." >&2;}
17716 fi
17717
17718 # If not set in template file, set bytes to use libc memset()
17719 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17720   MEMSET_LOOP_LIMIT=1024
17721 fi
17722
17723 cat >>confdefs.h <<_ACEOF
17724 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17725 _ACEOF
17726
17727
17728
17729 if test "$enable_nls" = yes ; then
17730
17731   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17732 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17733 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17734   $as_echo_n "(cached) " >&6
17735 else
17736   ac_func_search_save_LIBS=$LIBS
17737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17738 /* end confdefs.h.  */
17739
17740 /* Override any GCC internal prototype to avoid an error.
17741    Use char because int might match the return type of a GCC
17742    builtin and then its argument prototype would still apply.  */
17743 #ifdef __cplusplus
17744 extern "C"
17745 #endif
17746 char bind_textdomain_codeset ();
17747 int
17748 main ()
17749 {
17750 return bind_textdomain_codeset ();
17751   ;
17752   return 0;
17753 }
17754 _ACEOF
17755 for ac_lib in '' intl; do
17756   if test -z "$ac_lib"; then
17757     ac_res="none required"
17758   else
17759     ac_res=-l$ac_lib
17760     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17761   fi
17762   if ac_fn_c_try_link "$LINENO"; then :
17763   ac_cv_search_bind_textdomain_codeset=$ac_res
17764 fi
17765 rm -f core conftest.err conftest.$ac_objext \
17766     conftest$ac_exeext
17767   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17768   break
17769 fi
17770 done
17771 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17772
17773 else
17774   ac_cv_search_bind_textdomain_codeset=no
17775 fi
17776 rm conftest.$ac_ext
17777 LIBS=$ac_func_search_save_LIBS
17778 fi
17779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
17780 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
17781 ac_res=$ac_cv_search_bind_textdomain_codeset
17782 if test "$ac_res" != no; then :
17783   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17784
17785 else
17786   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
17787 fi
17788
17789   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
17790 if test "x$ac_cv_header_libintl_h" = xyes; then :
17791
17792 else
17793   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
17794 fi
17795
17796
17797   if test -z "$MSGFMT"; then
17798   for ac_prog in msgfmt
17799 do
17800   # Extract the first word of "$ac_prog", so it can be a program name with args.
17801 set dummy $ac_prog; ac_word=$2
17802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17803 $as_echo_n "checking for $ac_word... " >&6; }
17804 if ${ac_cv_path_MSGFMT+:} false; then :
17805   $as_echo_n "(cached) " >&6
17806 else
17807   case $MSGFMT in
17808   [\\/]* | ?:[\\/]*)
17809   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
17810   ;;
17811   *)
17812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17813 for as_dir in $PATH
17814 do
17815   IFS=$as_save_IFS
17816   test -z "$as_dir" && as_dir=.
17817     for ac_exec_ext in '' $ac_executable_extensions; do
17818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17819     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
17820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17821     break 2
17822   fi
17823 done
17824   done
17825 IFS=$as_save_IFS
17826
17827   ;;
17828 esac
17829 fi
17830 MSGFMT=$ac_cv_path_MSGFMT
17831 if test -n "$MSGFMT"; then
17832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17833 $as_echo "$MSGFMT" >&6; }
17834 else
17835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17836 $as_echo "no" >&6; }
17837 fi
17838
17839
17840   test -n "$MSGFMT" && break
17841 done
17842
17843 else
17844   # Report the value of MSGFMT in configure's output in all cases.
17845   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
17846 $as_echo_n "checking for MSGFMT... " >&6; }
17847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17848 $as_echo "$MSGFMT" >&6; }
17849 fi
17850
17851   if test -z "$MSGFMT"; then
17852     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
17853   fi
17854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
17855 $as_echo_n "checking for msgfmt flags... " >&6; }
17856 if ${pgac_cv_msgfmt_flags+:} false; then :
17857   $as_echo_n "(cached) " >&6
17858 else
17859   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
17860     pgac_cv_msgfmt_flags=-c
17861 fi
17862 fi
17863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
17864 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
17865   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
17866
17867   if test -z "$MSGMERGE"; then
17868   for ac_prog in msgmerge
17869 do
17870   # Extract the first word of "$ac_prog", so it can be a program name with args.
17871 set dummy $ac_prog; ac_word=$2
17872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17873 $as_echo_n "checking for $ac_word... " >&6; }
17874 if ${ac_cv_path_MSGMERGE+:} false; then :
17875   $as_echo_n "(cached) " >&6
17876 else
17877   case $MSGMERGE in
17878   [\\/]* | ?:[\\/]*)
17879   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
17880   ;;
17881   *)
17882   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17883 for as_dir in $PATH
17884 do
17885   IFS=$as_save_IFS
17886   test -z "$as_dir" && as_dir=.
17887     for ac_exec_ext in '' $ac_executable_extensions; do
17888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17889     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
17890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17891     break 2
17892   fi
17893 done
17894   done
17895 IFS=$as_save_IFS
17896
17897   ;;
17898 esac
17899 fi
17900 MSGMERGE=$ac_cv_path_MSGMERGE
17901 if test -n "$MSGMERGE"; then
17902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17903 $as_echo "$MSGMERGE" >&6; }
17904 else
17905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17906 $as_echo "no" >&6; }
17907 fi
17908
17909
17910   test -n "$MSGMERGE" && break
17911 done
17912
17913 else
17914   # Report the value of MSGMERGE in configure's output in all cases.
17915   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
17916 $as_echo_n "checking for MSGMERGE... " >&6; }
17917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17918 $as_echo "$MSGMERGE" >&6; }
17919 fi
17920
17921   if test -z "$XGETTEXT"; then
17922   for ac_prog in xgettext
17923 do
17924   # Extract the first word of "$ac_prog", so it can be a program name with args.
17925 set dummy $ac_prog; ac_word=$2
17926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17927 $as_echo_n "checking for $ac_word... " >&6; }
17928 if ${ac_cv_path_XGETTEXT+:} false; then :
17929   $as_echo_n "(cached) " >&6
17930 else
17931   case $XGETTEXT in
17932   [\\/]* | ?:[\\/]*)
17933   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
17934   ;;
17935   *)
17936   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17937 for as_dir in $PATH
17938 do
17939   IFS=$as_save_IFS
17940   test -z "$as_dir" && as_dir=.
17941     for ac_exec_ext in '' $ac_executable_extensions; do
17942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17943     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
17944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17945     break 2
17946   fi
17947 done
17948   done
17949 IFS=$as_save_IFS
17950
17951   ;;
17952 esac
17953 fi
17954 XGETTEXT=$ac_cv_path_XGETTEXT
17955 if test -n "$XGETTEXT"; then
17956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
17957 $as_echo "$XGETTEXT" >&6; }
17958 else
17959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17960 $as_echo "no" >&6; }
17961 fi
17962
17963
17964   test -n "$XGETTEXT" && break
17965 done
17966
17967 else
17968   # Report the value of XGETTEXT in configure's output in all cases.
17969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
17970 $as_echo_n "checking for XGETTEXT... " >&6; }
17971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
17972 $as_echo "$XGETTEXT" >&6; }
17973 fi
17974
17975
17976 fi
17977
17978 # Check for Tcl configuration script tclConfig.sh
17979 if test "$with_tcl" = yes; then
17980     if test -z "$TCLSH"; then
17981   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
17982 do
17983   # Extract the first word of "$ac_prog", so it can be a program name with args.
17984 set dummy $ac_prog; ac_word=$2
17985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17986 $as_echo_n "checking for $ac_word... " >&6; }
17987 if ${ac_cv_path_TCLSH+:} false; then :
17988   $as_echo_n "(cached) " >&6
17989 else
17990   case $TCLSH in
17991   [\\/]* | ?:[\\/]*)
17992   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
17993   ;;
17994   *)
17995   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17996 for as_dir in $PATH
17997 do
17998   IFS=$as_save_IFS
17999   test -z "$as_dir" && as_dir=.
18000     for ac_exec_ext in '' $ac_executable_extensions; do
18001   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18002     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18004     break 2
18005   fi
18006 done
18007   done
18008 IFS=$as_save_IFS
18009
18010   ;;
18011 esac
18012 fi
18013 TCLSH=$ac_cv_path_TCLSH
18014 if test -n "$TCLSH"; then
18015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18016 $as_echo "$TCLSH" >&6; }
18017 else
18018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18019 $as_echo "no" >&6; }
18020 fi
18021
18022
18023   test -n "$TCLSH" && break
18024 done
18025
18026 else
18027   # Report the value of TCLSH in configure's output in all cases.
18028   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18029 $as_echo_n "checking for TCLSH... " >&6; }
18030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18031 $as_echo "$TCLSH" >&6; }
18032 fi
18033
18034 if test x"$TCLSH" = x""; then
18035   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18036 fi
18037
18038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18039 $as_echo_n "checking for tclConfig.sh... " >&6; }
18040 # Let user override test
18041 if test -z "$TCL_CONFIG_SH"; then
18042     pgac_test_dirs="$with_tclconfig"
18043
18044     set X $pgac_test_dirs; shift
18045     if test $# -eq 0; then
18046         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18047         set X `echo 'puts $auto_path' | $TCLSH`; shift
18048     fi
18049
18050     for pgac_dir do
18051         if test -r "$pgac_dir/tclConfig.sh"; then
18052             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18053             break
18054         fi
18055     done
18056 fi
18057
18058 if test -z "$TCL_CONFIG_SH"; then
18059     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18060 $as_echo "no" >&6; }
18061     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18062 else
18063     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18064 $as_echo "$TCL_CONFIG_SH" >&6; }
18065 fi
18066
18067
18068
18069     . "$TCL_CONFIG_SH"
18070 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18071 eval TCL_LIBS=\"$TCL_LIBS\"
18072 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18073 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18074
18075         if test "$TCL_SHARED_BUILD" != 1; then
18076       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18077 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18078     fi
18079     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18080     ac_save_CPPFLAGS=$CPPFLAGS
18081     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18082     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18083 if test "x$ac_cv_header_tcl_h" = xyes; then :
18084
18085 else
18086   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18087 fi
18088
18089
18090     CPPFLAGS=$ac_save_CPPFLAGS
18091 fi
18092
18093 # check for <perl.h>
18094 if test "$with_perl" = yes; then
18095   ac_save_CPPFLAGS=$CPPFLAGS
18096   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
18097   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18098 "
18099 if test "x$ac_cv_header_perl_h" = xyes; then :
18100
18101 else
18102   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18103 fi
18104
18105
18106   # While we're at it, check that we can link to libperl.
18107   # On most platforms, if perl.h is there then libperl.so will be too, but at
18108   # this writing Debian packages them separately.  There is no known reason to
18109   # waste cycles on separate probes for the Tcl or Python libraries, though.
18110   pgac_save_LIBS=$LIBS
18111   LIBS="$perl_embed_ldflags"
18112   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18113 $as_echo_n "checking for libperl... " >&6; }
18114   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18115 /* end confdefs.h.  */
18116
18117 #include <EXTERN.h>
18118 #include <perl.h>
18119
18120 int
18121 main ()
18122 {
18123 perl_alloc();
18124   ;
18125   return 0;
18126 }
18127 _ACEOF
18128 if ac_fn_c_try_link "$LINENO"; then :
18129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18130 $as_echo "yes" >&6; }
18131 else
18132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18133 $as_echo "no" >&6; }
18134      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18135 fi
18136 rm -f core conftest.err conftest.$ac_objext \
18137     conftest$ac_exeext conftest.$ac_ext
18138   LIBS=$pgac_save_LIBS
18139   CPPFLAGS=$ac_save_CPPFLAGS
18140 fi
18141
18142 # check for <Python.h>
18143 if test "$with_python" = yes; then
18144   ac_save_CPPFLAGS=$CPPFLAGS
18145   CPPFLAGS="$python_includespec $CPPFLAGS"
18146   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18147 if test "x$ac_cv_header_Python_h" = xyes; then :
18148
18149 else
18150   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18151 fi
18152
18153
18154   CPPFLAGS=$ac_save_CPPFLAGS
18155 fi
18156
18157 #
18158 # Check for DocBook and tools
18159 #
18160 if test -z "$XMLLINT"; then
18161   for ac_prog in xmllint
18162 do
18163   # Extract the first word of "$ac_prog", so it can be a program name with args.
18164 set dummy $ac_prog; ac_word=$2
18165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18166 $as_echo_n "checking for $ac_word... " >&6; }
18167 if ${ac_cv_path_XMLLINT+:} false; then :
18168   $as_echo_n "(cached) " >&6
18169 else
18170   case $XMLLINT in
18171   [\\/]* | ?:[\\/]*)
18172   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18173   ;;
18174   *)
18175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18176 for as_dir in $PATH
18177 do
18178   IFS=$as_save_IFS
18179   test -z "$as_dir" && as_dir=.
18180     for ac_exec_ext in '' $ac_executable_extensions; do
18181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18182     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18184     break 2
18185   fi
18186 done
18187   done
18188 IFS=$as_save_IFS
18189
18190   ;;
18191 esac
18192 fi
18193 XMLLINT=$ac_cv_path_XMLLINT
18194 if test -n "$XMLLINT"; then
18195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18196 $as_echo "$XMLLINT" >&6; }
18197 else
18198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18199 $as_echo "no" >&6; }
18200 fi
18201
18202
18203   test -n "$XMLLINT" && break
18204 done
18205
18206 else
18207   # Report the value of XMLLINT in configure's output in all cases.
18208   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18209 $as_echo_n "checking for XMLLINT... " >&6; }
18210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18211 $as_echo "$XMLLINT" >&6; }
18212 fi
18213
18214
18215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18216 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18217 if ${pgac_cv_check_docbook+:} false; then :
18218   $as_echo_n "(cached) " >&6
18219 else
18220   cat >conftest.xml <<EOF
18221 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18222 <book>
18223  <title>test</title>
18224  <chapter>
18225   <title>random</title>
18226    <sect1>
18227     <title>testsect</title>
18228     <para>text</para>
18229   </sect1>
18230  </chapter>
18231 </book>
18232 EOF
18233
18234 pgac_cv_check_docbook=no
18235
18236 if test -n "$XMLLINT"; then
18237   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18238   if test $? -eq 0; then
18239     pgac_cv_check_docbook=yes
18240   fi
18241 fi
18242 rm -f conftest.xml
18243 fi
18244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18245 $as_echo "$pgac_cv_check_docbook" >&6; }
18246
18247 have_docbook=$pgac_cv_check_docbook
18248
18249
18250 if test -z "$DBTOEPUB"; then
18251   for ac_prog in dbtoepub
18252 do
18253   # Extract the first word of "$ac_prog", so it can be a program name with args.
18254 set dummy $ac_prog; ac_word=$2
18255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18256 $as_echo_n "checking for $ac_word... " >&6; }
18257 if ${ac_cv_path_DBTOEPUB+:} false; then :
18258   $as_echo_n "(cached) " >&6
18259 else
18260   case $DBTOEPUB in
18261   [\\/]* | ?:[\\/]*)
18262   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18263   ;;
18264   *)
18265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18266 for as_dir in $PATH
18267 do
18268   IFS=$as_save_IFS
18269   test -z "$as_dir" && as_dir=.
18270     for ac_exec_ext in '' $ac_executable_extensions; do
18271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18272     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18274     break 2
18275   fi
18276 done
18277   done
18278 IFS=$as_save_IFS
18279
18280   ;;
18281 esac
18282 fi
18283 DBTOEPUB=$ac_cv_path_DBTOEPUB
18284 if test -n "$DBTOEPUB"; then
18285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18286 $as_echo "$DBTOEPUB" >&6; }
18287 else
18288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18289 $as_echo "no" >&6; }
18290 fi
18291
18292
18293   test -n "$DBTOEPUB" && break
18294 done
18295
18296 else
18297   # Report the value of DBTOEPUB in configure's output in all cases.
18298   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18299 $as_echo_n "checking for DBTOEPUB... " >&6; }
18300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18301 $as_echo "$DBTOEPUB" >&6; }
18302 fi
18303
18304 if test -z "$XSLTPROC"; then
18305   for ac_prog in xsltproc
18306 do
18307   # Extract the first word of "$ac_prog", so it can be a program name with args.
18308 set dummy $ac_prog; ac_word=$2
18309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18310 $as_echo_n "checking for $ac_word... " >&6; }
18311 if ${ac_cv_path_XSLTPROC+:} false; then :
18312   $as_echo_n "(cached) " >&6
18313 else
18314   case $XSLTPROC in
18315   [\\/]* | ?:[\\/]*)
18316   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18317   ;;
18318   *)
18319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18320 for as_dir in $PATH
18321 do
18322   IFS=$as_save_IFS
18323   test -z "$as_dir" && as_dir=.
18324     for ac_exec_ext in '' $ac_executable_extensions; do
18325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18326     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18328     break 2
18329   fi
18330 done
18331   done
18332 IFS=$as_save_IFS
18333
18334   ;;
18335 esac
18336 fi
18337 XSLTPROC=$ac_cv_path_XSLTPROC
18338 if test -n "$XSLTPROC"; then
18339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18340 $as_echo "$XSLTPROC" >&6; }
18341 else
18342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18343 $as_echo "no" >&6; }
18344 fi
18345
18346
18347   test -n "$XSLTPROC" && break
18348 done
18349
18350 else
18351   # Report the value of XSLTPROC in configure's output in all cases.
18352   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18353 $as_echo_n "checking for XSLTPROC... " >&6; }
18354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18355 $as_echo "$XSLTPROC" >&6; }
18356 fi
18357
18358 if test -z "$FOP"; then
18359   for ac_prog in fop
18360 do
18361   # Extract the first word of "$ac_prog", so it can be a program name with args.
18362 set dummy $ac_prog; ac_word=$2
18363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18364 $as_echo_n "checking for $ac_word... " >&6; }
18365 if ${ac_cv_path_FOP+:} false; then :
18366   $as_echo_n "(cached) " >&6
18367 else
18368   case $FOP in
18369   [\\/]* | ?:[\\/]*)
18370   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18371   ;;
18372   *)
18373   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18374 for as_dir in $PATH
18375 do
18376   IFS=$as_save_IFS
18377   test -z "$as_dir" && as_dir=.
18378     for ac_exec_ext in '' $ac_executable_extensions; do
18379   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18380     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18381     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18382     break 2
18383   fi
18384 done
18385   done
18386 IFS=$as_save_IFS
18387
18388   ;;
18389 esac
18390 fi
18391 FOP=$ac_cv_path_FOP
18392 if test -n "$FOP"; then
18393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18394 $as_echo "$FOP" >&6; }
18395 else
18396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18397 $as_echo "no" >&6; }
18398 fi
18399
18400
18401   test -n "$FOP" && break
18402 done
18403
18404 else
18405   # Report the value of FOP in configure's output in all cases.
18406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18407 $as_echo_n "checking for FOP... " >&6; }
18408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18409 $as_echo "$FOP" >&6; }
18410 fi
18411
18412
18413 #
18414 # Check for test tools
18415 #
18416 if test "$enable_tap_tests" = yes; then
18417   # Check for necessary modules, unless user has specified the "prove" to use;
18418   # in that case it's her responsibility to have a working configuration.
18419   # (prove might be part of a different Perl installation than perl, eg on
18420   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18421   if test -z "$PROVE"; then
18422     # Test::More and Time::HiRes are supposed to be part of core Perl,
18423     # but some distros omit them in a minimal installation.
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434 # Make sure we have perl
18435 if test -z "$PERL"; then
18436 # Extract the first word of "perl", so it can be a program name with args.
18437 set dummy perl; ac_word=$2
18438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18439 $as_echo_n "checking for $ac_word... " >&6; }
18440 if ${ac_cv_prog_PERL+:} false; then :
18441   $as_echo_n "(cached) " >&6
18442 else
18443   if test -n "$PERL"; then
18444   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18445 else
18446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18447 for as_dir in $PATH
18448 do
18449   IFS=$as_save_IFS
18450   test -z "$as_dir" && as_dir=.
18451     for ac_exec_ext in '' $ac_executable_extensions; do
18452   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18453     ac_cv_prog_PERL="perl"
18454     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18455     break 2
18456   fi
18457 done
18458   done
18459 IFS=$as_save_IFS
18460
18461 fi
18462 fi
18463 PERL=$ac_cv_prog_PERL
18464 if test -n "$PERL"; then
18465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18466 $as_echo "$PERL" >&6; }
18467 else
18468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18469 $as_echo "no" >&6; }
18470 fi
18471
18472
18473 fi
18474
18475 if test "x$PERL" != x; then
18476   ax_perl_modules_failed=0
18477   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18478     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18479 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18480
18481     # Would be nice to log result here, but can't rely on autoconf internals
18482     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18483     if test $? -ne 0; then
18484       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18485 $as_echo "no" >&6; };
18486       ax_perl_modules_failed=1
18487    else
18488       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18489 $as_echo "ok" >&6; };
18490     fi
18491   done
18492
18493   # Run optional shell commands
18494   if test "$ax_perl_modules_failed" = 0; then
18495     :
18496
18497   else
18498     :
18499     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18500   fi
18501 else
18502   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18503 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18504 fi
18505   fi
18506   # Now make sure we know where prove is
18507   if test -z "$PROVE"; then
18508   for ac_prog in prove
18509 do
18510   # Extract the first word of "$ac_prog", so it can be a program name with args.
18511 set dummy $ac_prog; ac_word=$2
18512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18513 $as_echo_n "checking for $ac_word... " >&6; }
18514 if ${ac_cv_path_PROVE+:} false; then :
18515   $as_echo_n "(cached) " >&6
18516 else
18517   case $PROVE in
18518   [\\/]* | ?:[\\/]*)
18519   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18520   ;;
18521   *)
18522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18523 for as_dir in $PATH
18524 do
18525   IFS=$as_save_IFS
18526   test -z "$as_dir" && as_dir=.
18527     for ac_exec_ext in '' $ac_executable_extensions; do
18528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18529     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18531     break 2
18532   fi
18533 done
18534   done
18535 IFS=$as_save_IFS
18536
18537   ;;
18538 esac
18539 fi
18540 PROVE=$ac_cv_path_PROVE
18541 if test -n "$PROVE"; then
18542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18543 $as_echo "$PROVE" >&6; }
18544 else
18545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18546 $as_echo "no" >&6; }
18547 fi
18548
18549
18550   test -n "$PROVE" && break
18551 done
18552
18553 else
18554   # Report the value of PROVE in configure's output in all cases.
18555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18556 $as_echo_n "checking for PROVE... " >&6; }
18557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18558 $as_echo "$PROVE" >&6; }
18559 fi
18560
18561   if test -z "$PROVE"; then
18562     as_fn_error $? "prove not found" "$LINENO" 5
18563   fi
18564 fi
18565
18566 # Thread testing
18567
18568 # We have to run the thread test near the end so we have all our symbols
18569 # defined.  Cross compiling throws a warning.
18570 #
18571 if test "$enable_thread_safety" = yes; then
18572 if test "$PORTNAME" != "win32"
18573 then
18574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18575 $as_echo_n "checking thread safety of required library functions... " >&6; }
18576
18577 _CFLAGS="$CFLAGS"
18578 _LIBS="$LIBS"
18579 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18580 LIBS="$LIBS $PTHREAD_LIBS"
18581 if test "$cross_compiling" = yes; then :
18582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18583 $as_echo "maybe" >&6; }
18584   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18585 *** Skipping thread test program because of cross-compile build.
18586 *** Run the program in src/test/thread on the target machine.
18587 " >&5
18588 $as_echo "$as_me: WARNING:
18589 *** Skipping thread test program because of cross-compile build.
18590 *** Run the program in src/test/thread on the target machine.
18591 " >&2;}
18592 else
18593   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18594 /* end confdefs.h.  */
18595 #include "$srcdir/src/test/thread/thread_test.c"
18596 _ACEOF
18597 if ac_fn_c_try_run "$LINENO"; then :
18598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18599 $as_echo "yes" >&6; }
18600 else
18601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18602 $as_echo "no" >&6; }
18603   as_fn_error $? "thread test program failed
18604 This platform is not thread-safe.  Check the file 'config.log' or compile
18605 and run src/test/thread/thread_test for the exact reason.
18606 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18607 fi
18608 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18609   conftest.$ac_objext conftest.beam conftest.$ac_ext
18610 fi
18611
18612 CFLAGS="$_CFLAGS"
18613 LIBS="$_LIBS"
18614 else
18615 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18616 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18617 fi
18618 fi
18619
18620 # If compiler will take -Wl,--as-needed (or various platform-specific
18621 # spellings thereof) then add that to LDFLAGS.  This is much easier than
18622 # trying to filter LIBS to the minimum for each executable.
18623 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18624 # libreadline; therefore we postpone testing it until we know what library
18625 # dependencies readline has.  The test code will try to link with $LIBS.
18626 if test "$with_readline" = yes; then
18627   link_test_func=readline
18628 else
18629   link_test_func=exit
18630 fi
18631
18632 if test "$PORTNAME" = "darwin"; then
18633   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18634 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18635 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18636   $as_echo_n "(cached) " >&6
18637 else
18638   pgac_save_LDFLAGS=$LDFLAGS
18639 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18640 if test "$cross_compiling" = yes; then :
18641   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18642 else
18643   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18644 /* end confdefs.h.  */
18645 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18646 int
18647 main ()
18648 {
18649
18650   ;
18651   return 0;
18652 }
18653 _ACEOF
18654 if ac_fn_c_try_run "$LINENO"; then :
18655   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18656 else
18657   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18658 fi
18659 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18660   conftest.$ac_objext conftest.beam conftest.$ac_ext
18661 fi
18662
18663 LDFLAGS="$pgac_save_LDFLAGS"
18664 fi
18665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18666 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18667 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18668   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18669 fi
18670
18671 elif test "$PORTNAME" = "openbsd"; then
18672   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18673 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18674 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18675   $as_echo_n "(cached) " >&6
18676 else
18677   pgac_save_LDFLAGS=$LDFLAGS
18678 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18679 if test "$cross_compiling" = yes; then :
18680   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18681 else
18682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18683 /* end confdefs.h.  */
18684 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18685 int
18686 main ()
18687 {
18688
18689   ;
18690   return 0;
18691 }
18692 _ACEOF
18693 if ac_fn_c_try_run "$LINENO"; then :
18694   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
18695 else
18696   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
18697 fi
18698 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18699   conftest.$ac_objext conftest.beam conftest.$ac_ext
18700 fi
18701
18702 LDFLAGS="$pgac_save_LDFLAGS"
18703 fi
18704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
18705 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
18706 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
18707   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
18708 fi
18709
18710 else
18711   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
18712 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
18713 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
18714   $as_echo_n "(cached) " >&6
18715 else
18716   pgac_save_LDFLAGS=$LDFLAGS
18717 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18718 if test "$cross_compiling" = yes; then :
18719   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
18720 else
18721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18722 /* end confdefs.h.  */
18723 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18724 int
18725 main ()
18726 {
18727
18728   ;
18729   return 0;
18730 }
18731 _ACEOF
18732 if ac_fn_c_try_run "$LINENO"; then :
18733   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
18734 else
18735   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
18736 fi
18737 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18738   conftest.$ac_objext conftest.beam conftest.$ac_ext
18739 fi
18740
18741 LDFLAGS="$pgac_save_LDFLAGS"
18742 fi
18743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
18744 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
18745 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
18746   LDFLAGS="$LDFLAGS -Wl,--as-needed"
18747 fi
18748
18749 fi
18750
18751 # Create compiler version string
18752 if test x"$GCC" = x"yes" ; then
18753   cc_string=`${CC} --version | sed q`
18754   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18755 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18756   cc_string=`${CC} -V 2>&1 | sed q`
18757 else
18758   cc_string=$CC
18759 fi
18760
18761
18762 cat >>confdefs.h <<_ACEOF
18763 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18764 _ACEOF
18765
18766
18767 # Supply a numeric version string for use by 3rd party add-ons
18768 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18769 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
18770 tr '.' '        ' |
18771 $AWK '{printf "%d%04d", $1, $2}'`"
18772
18773 cat >>confdefs.h <<_ACEOF
18774 #define PG_VERSION_NUM $PG_VERSION_NUM
18775 _ACEOF
18776
18777
18778
18779
18780 # Begin output steps
18781
18782 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
18783 $as_echo "$as_me: using compiler=$cc_string" >&6;}
18784 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
18785 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
18786 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
18787 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
18788 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
18789 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
18790 # Currently only used when LLVM is used
18791 if test "$with_llvm" = yes ; then
18792    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
18793 $as_echo "$as_me: using CXX=$CXX" >&6;}
18794    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
18795 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
18796    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
18797 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
18798    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
18799 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
18800    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
18801 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
18802 fi
18803
18804 # prepare build tree if outside source tree
18805 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18806 # Note 2: /bin/pwd might be better than shell's built-in at getting
18807 #         a symlink-free name.
18808 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18809   vpath_build=no
18810 else
18811   vpath_build=yes
18812   if test "$no_create" != yes; then
18813     $as_echo_n "preparing build tree... " >&6
18814     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
18815     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
18816       || as_fn_error $? "failed" "$LINENO" 5
18817     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
18818 $as_echo "done" >&6; }
18819   fi
18820 fi
18821
18822
18823
18824 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
18825
18826
18827 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}"
18828
18829
18830 if test "$PORTNAME" = "win32"; then
18831 ac_config_commands="$ac_config_commands check_win32_symlinks"
18832
18833 fi
18834
18835 ac_config_headers="$ac_config_headers src/include/pg_config.h"
18836
18837
18838 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
18839
18840
18841 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
18842
18843
18844 cat >confcache <<\_ACEOF
18845 # This file is a shell script that caches the results of configure
18846 # tests run on this system so they can be shared between configure
18847 # scripts and configure runs, see configure's option --config-cache.
18848 # It is not useful on other systems.  If it contains results you don't
18849 # want to keep, you may remove or edit it.
18850 #
18851 # config.status only pays attention to the cache file if you give it
18852 # the --recheck option to rerun configure.
18853 #
18854 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18855 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18856 # following values.
18857
18858 _ACEOF
18859
18860 # The following way of writing the cache mishandles newlines in values,
18861 # but we know of no workaround that is simple, portable, and efficient.
18862 # So, we kill variables containing newlines.
18863 # Ultrix sh set writes to stderr and can't be redirected directly,
18864 # and sets the high bit in the cache file unless we assign to the vars.
18865 (
18866   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18867     eval ac_val=\$$ac_var
18868     case $ac_val in #(
18869     *${as_nl}*)
18870       case $ac_var in #(
18871       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18872 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18873       esac
18874       case $ac_var in #(
18875       _ | IFS | as_nl) ;; #(
18876       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18877       *) { eval $ac_var=; unset $ac_var;} ;;
18878       esac ;;
18879     esac
18880   done
18881
18882   (set) 2>&1 |
18883     case $as_nl`(ac_space=' '; set) 2>&1` in #(
18884     *${as_nl}ac_space=\ *)
18885       # `set' does not quote correctly, so add quotes: double-quote
18886       # substitution turns \\\\ into \\, and sed turns \\ into \.
18887       sed -n \
18888         "s/'/'\\\\''/g;
18889           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18890       ;; #(
18891     *)
18892       # `set' quotes correctly as required by POSIX, so do not add quotes.
18893       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18894       ;;
18895     esac |
18896     sort
18897 ) |
18898   sed '
18899      /^ac_cv_env_/b end
18900      t clear
18901      :clear
18902      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18903      t end
18904      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18905      :end' >>confcache
18906 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18907   if test -w "$cache_file"; then
18908     if test "x$cache_file" != "x/dev/null"; then
18909       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18910 $as_echo "$as_me: updating cache $cache_file" >&6;}
18911       if test ! -f "$cache_file" || test -h "$cache_file"; then
18912         cat confcache >"$cache_file"
18913       else
18914         case $cache_file in #(
18915         */* | ?:*)
18916           mv -f confcache "$cache_file"$$ &&
18917           mv -f "$cache_file"$$ "$cache_file" ;; #(
18918         *)
18919           mv -f confcache "$cache_file" ;;
18920         esac
18921       fi
18922     fi
18923   else
18924     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18925 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18926   fi
18927 fi
18928 rm -f confcache
18929
18930 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18931 # Let make expand exec_prefix.
18932 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18933
18934 DEFS=-DHAVE_CONFIG_H
18935
18936 ac_libobjs=
18937 ac_ltlibobjs=
18938 U=
18939 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18940   # 1. Remove the extension, and $U if already installed.
18941   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18942   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18943   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
18944   #    will be set to the directory where LIBOBJS objects are built.
18945   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18946   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18947 done
18948 LIBOBJS=$ac_libobjs
18949
18950 LTLIBOBJS=$ac_ltlibobjs
18951
18952
18953
18954
18955 : "${CONFIG_STATUS=./config.status}"
18956 ac_write_fail=0
18957 ac_clean_files_save=$ac_clean_files
18958 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18959 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18960 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18961 as_write_fail=0
18962 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
18963 #! $SHELL
18964 # Generated by $as_me.
18965 # Run this file to recreate the current configuration.
18966 # Compiler output produced by configure, useful for debugging
18967 # configure, is in config.log if it exists.
18968
18969 debug=false
18970 ac_cs_recheck=false
18971 ac_cs_silent=false
18972
18973 SHELL=\${CONFIG_SHELL-$SHELL}
18974 export SHELL
18975 _ASEOF
18976 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18977 ## -------------------- ##
18978 ## M4sh Initialization. ##
18979 ## -------------------- ##
18980
18981 # Be more Bourne compatible
18982 DUALCASE=1; export DUALCASE # for MKS sh
18983 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18984   emulate sh
18985   NULLCMD=:
18986   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18987   # is contrary to our usage.  Disable this feature.
18988   alias -g '${1+"$@"}'='"$@"'
18989   setopt NO_GLOB_SUBST
18990 else
18991   case `(set -o) 2>/dev/null` in #(
18992   *posix*) :
18993     set -o posix ;; #(
18994   *) :
18995      ;;
18996 esac
18997 fi
18998
18999
19000 as_nl='
19001 '
19002 export as_nl
19003 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19004 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19005 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19006 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19007 # Prefer a ksh shell builtin over an external printf program on Solaris,
19008 # but without wasting forks for bash or zsh.
19009 if test -z "$BASH_VERSION$ZSH_VERSION" \
19010     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19011   as_echo='print -r --'
19012   as_echo_n='print -rn --'
19013 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19014   as_echo='printf %s\n'
19015   as_echo_n='printf %s'
19016 else
19017   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19018     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19019     as_echo_n='/usr/ucb/echo -n'
19020   else
19021     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19022     as_echo_n_body='eval
19023       arg=$1;
19024       case $arg in #(
19025       *"$as_nl"*)
19026         expr "X$arg" : "X\\(.*\\)$as_nl";
19027         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19028       esac;
19029       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19030     '
19031     export as_echo_n_body
19032     as_echo_n='sh -c $as_echo_n_body as_echo'
19033   fi
19034   export as_echo_body
19035   as_echo='sh -c $as_echo_body as_echo'
19036 fi
19037
19038 # The user is always right.
19039 if test "${PATH_SEPARATOR+set}" != set; then
19040   PATH_SEPARATOR=:
19041   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19042     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19043       PATH_SEPARATOR=';'
19044   }
19045 fi
19046
19047
19048 # IFS
19049 # We need space, tab and new line, in precisely that order.  Quoting is
19050 # there to prevent editors from complaining about space-tab.
19051 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19052 # splitting by setting IFS to empty value.)
19053 IFS=" ""        $as_nl"
19054
19055 # Find who we are.  Look in the path if we contain no directory separator.
19056 as_myself=
19057 case $0 in #((
19058   *[\\/]* ) as_myself=$0 ;;
19059   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19060 for as_dir in $PATH
19061 do
19062   IFS=$as_save_IFS
19063   test -z "$as_dir" && as_dir=.
19064     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19065   done
19066 IFS=$as_save_IFS
19067
19068      ;;
19069 esac
19070 # We did not find ourselves, most probably we were run as `sh COMMAND'
19071 # in which case we are not to be found in the path.
19072 if test "x$as_myself" = x; then
19073   as_myself=$0
19074 fi
19075 if test ! -f "$as_myself"; then
19076   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19077   exit 1
19078 fi
19079
19080 # Unset variables that we do not need and which cause bugs (e.g. in
19081 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19082 # suppresses any "Segmentation fault" message there.  '((' could
19083 # trigger a bug in pdksh 5.2.14.
19084 for as_var in BASH_ENV ENV MAIL MAILPATH
19085 do eval test x\${$as_var+set} = xset \
19086   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19087 done
19088 PS1='$ '
19089 PS2='> '
19090 PS4='+ '
19091
19092 # NLS nuisances.
19093 LC_ALL=C
19094 export LC_ALL
19095 LANGUAGE=C
19096 export LANGUAGE
19097
19098 # CDPATH.
19099 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19100
19101
19102 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19103 # ----------------------------------------
19104 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19105 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19106 # script with STATUS, using 1 if that was 0.
19107 as_fn_error ()
19108 {
19109   as_status=$1; test $as_status -eq 0 && as_status=1
19110   if test "$4"; then
19111     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19112     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19113   fi
19114   $as_echo "$as_me: error: $2" >&2
19115   as_fn_exit $as_status
19116 } # as_fn_error
19117
19118
19119 # as_fn_set_status STATUS
19120 # -----------------------
19121 # Set $? to STATUS, without forking.
19122 as_fn_set_status ()
19123 {
19124   return $1
19125 } # as_fn_set_status
19126
19127 # as_fn_exit STATUS
19128 # -----------------
19129 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19130 as_fn_exit ()
19131 {
19132   set +e
19133   as_fn_set_status $1
19134   exit $1
19135 } # as_fn_exit
19136
19137 # as_fn_unset VAR
19138 # ---------------
19139 # Portably unset VAR.
19140 as_fn_unset ()
19141 {
19142   { eval $1=; unset $1;}
19143 }
19144 as_unset=as_fn_unset
19145 # as_fn_append VAR VALUE
19146 # ----------------------
19147 # Append the text in VALUE to the end of the definition contained in VAR. Take
19148 # advantage of any shell optimizations that allow amortized linear growth over
19149 # repeated appends, instead of the typical quadratic growth present in naive
19150 # implementations.
19151 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19152   eval 'as_fn_append ()
19153   {
19154     eval $1+=\$2
19155   }'
19156 else
19157   as_fn_append ()
19158   {
19159     eval $1=\$$1\$2
19160   }
19161 fi # as_fn_append
19162
19163 # as_fn_arith ARG...
19164 # ------------------
19165 # Perform arithmetic evaluation on the ARGs, and store the result in the
19166 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19167 # must be portable across $(()) and expr.
19168 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19169   eval 'as_fn_arith ()
19170   {
19171     as_val=$(( $* ))
19172   }'
19173 else
19174   as_fn_arith ()
19175   {
19176     as_val=`expr "$@" || test $? -eq 1`
19177   }
19178 fi # as_fn_arith
19179
19180
19181 if expr a : '\(a\)' >/dev/null 2>&1 &&
19182    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19183   as_expr=expr
19184 else
19185   as_expr=false
19186 fi
19187
19188 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19189   as_basename=basename
19190 else
19191   as_basename=false
19192 fi
19193
19194 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19195   as_dirname=dirname
19196 else
19197   as_dirname=false
19198 fi
19199
19200 as_me=`$as_basename -- "$0" ||
19201 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19202          X"$0" : 'X\(//\)$' \| \
19203          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19204 $as_echo X/"$0" |
19205     sed '/^.*\/\([^/][^/]*\)\/*$/{
19206             s//\1/
19207             q
19208           }
19209           /^X\/\(\/\/\)$/{
19210             s//\1/
19211             q
19212           }
19213           /^X\/\(\/\).*/{
19214             s//\1/
19215             q
19216           }
19217           s/.*/./; q'`
19218
19219 # Avoid depending upon Character Ranges.
19220 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19221 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19222 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19223 as_cr_digits='0123456789'
19224 as_cr_alnum=$as_cr_Letters$as_cr_digits
19225
19226 ECHO_C= ECHO_N= ECHO_T=
19227 case `echo -n x` in #(((((
19228 -n*)
19229   case `echo 'xy\c'` in
19230   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19231   xy)  ECHO_C='\c';;
19232   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19233        ECHO_T=' ';;
19234   esac;;
19235 *)
19236   ECHO_N='-n';;
19237 esac
19238
19239 rm -f conf$$ conf$$.exe conf$$.file
19240 if test -d conf$$.dir; then
19241   rm -f conf$$.dir/conf$$.file
19242 else
19243   rm -f conf$$.dir
19244   mkdir conf$$.dir 2>/dev/null
19245 fi
19246 if (echo >conf$$.file) 2>/dev/null; then
19247   if ln -s conf$$.file conf$$ 2>/dev/null; then
19248     as_ln_s='ln -s'
19249     # ... but there are two gotchas:
19250     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19251     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19252     # In both cases, we have to default to `cp -pR'.
19253     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19254       as_ln_s='cp -pR'
19255   elif ln conf$$.file conf$$ 2>/dev/null; then
19256     as_ln_s=ln
19257   else
19258     as_ln_s='cp -pR'
19259   fi
19260 else
19261   as_ln_s='cp -pR'
19262 fi
19263 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19264 rmdir conf$$.dir 2>/dev/null
19265
19266
19267 # as_fn_mkdir_p
19268 # -------------
19269 # Create "$as_dir" as a directory, including parents if necessary.
19270 as_fn_mkdir_p ()
19271 {
19272
19273   case $as_dir in #(
19274   -*) as_dir=./$as_dir;;
19275   esac
19276   test -d "$as_dir" || eval $as_mkdir_p || {
19277     as_dirs=
19278     while :; do
19279       case $as_dir in #(
19280       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19281       *) as_qdir=$as_dir;;
19282       esac
19283       as_dirs="'$as_qdir' $as_dirs"
19284       as_dir=`$as_dirname -- "$as_dir" ||
19285 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19286          X"$as_dir" : 'X\(//\)[^/]' \| \
19287          X"$as_dir" : 'X\(//\)$' \| \
19288          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19289 $as_echo X"$as_dir" |
19290     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19291             s//\1/
19292             q
19293           }
19294           /^X\(\/\/\)[^/].*/{
19295             s//\1/
19296             q
19297           }
19298           /^X\(\/\/\)$/{
19299             s//\1/
19300             q
19301           }
19302           /^X\(\/\).*/{
19303             s//\1/
19304             q
19305           }
19306           s/.*/./; q'`
19307       test -d "$as_dir" && break
19308     done
19309     test -z "$as_dirs" || eval "mkdir $as_dirs"
19310   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19311
19312
19313 } # as_fn_mkdir_p
19314 if mkdir -p . 2>/dev/null; then
19315   as_mkdir_p='mkdir -p "$as_dir"'
19316 else
19317   test -d ./-p && rmdir ./-p
19318   as_mkdir_p=false
19319 fi
19320
19321
19322 # as_fn_executable_p FILE
19323 # -----------------------
19324 # Test if FILE is an executable regular file.
19325 as_fn_executable_p ()
19326 {
19327   test -f "$1" && test -x "$1"
19328 } # as_fn_executable_p
19329 as_test_x='test -x'
19330 as_executable_p=as_fn_executable_p
19331
19332 # Sed expression to map a string onto a valid CPP name.
19333 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19334
19335 # Sed expression to map a string onto a valid variable name.
19336 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19337
19338
19339 exec 6>&1
19340 ## ----------------------------------- ##
19341 ## Main body of $CONFIG_STATUS script. ##
19342 ## ----------------------------------- ##
19343 _ASEOF
19344 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19345
19346 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19347 # Save the log message, to keep $0 and so on meaningful, and to
19348 # report actual input values of CONFIG_FILES etc. instead of their
19349 # values after options handling.
19350 ac_log="
19351 This file was extended by PostgreSQL $as_me 12devel, which was
19352 generated by GNU Autoconf 2.69.  Invocation command line was
19353
19354   CONFIG_FILES    = $CONFIG_FILES
19355   CONFIG_HEADERS  = $CONFIG_HEADERS
19356   CONFIG_LINKS    = $CONFIG_LINKS
19357   CONFIG_COMMANDS = $CONFIG_COMMANDS
19358   $ $0 $@
19359
19360 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19361 "
19362
19363 _ACEOF
19364
19365 case $ac_config_files in *"
19366 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19367 esac
19368
19369 case $ac_config_headers in *"
19370 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19371 esac
19372
19373
19374 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19375 # Files that config.status was made for.
19376 config_files="$ac_config_files"
19377 config_headers="$ac_config_headers"
19378 config_links="$ac_config_links"
19379 config_commands="$ac_config_commands"
19380
19381 _ACEOF
19382
19383 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19384 ac_cs_usage="\
19385 \`$as_me' instantiates files and other configuration actions
19386 from templates according to the current configuration.  Unless the files
19387 and actions are specified as TAGs, all are instantiated by default.
19388
19389 Usage: $0 [OPTION]... [TAG]...
19390
19391   -h, --help       print this help, then exit
19392   -V, --version    print version number and configuration settings, then exit
19393       --config     print configuration, then exit
19394   -q, --quiet, --silent
19395                    do not print progress messages
19396   -d, --debug      don't remove temporary files
19397       --recheck    update $as_me by reconfiguring in the same conditions
19398       --file=FILE[:TEMPLATE]
19399                    instantiate the configuration file FILE
19400       --header=FILE[:TEMPLATE]
19401                    instantiate the configuration header FILE
19402
19403 Configuration files:
19404 $config_files
19405
19406 Configuration headers:
19407 $config_headers
19408
19409 Configuration links:
19410 $config_links
19411
19412 Configuration commands:
19413 $config_commands
19414
19415 Report bugs to <pgsql-bugs@postgresql.org>."
19416
19417 _ACEOF
19418 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19419 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19420 ac_cs_version="\\
19421 PostgreSQL config.status 12devel
19422 configured by $0, generated by GNU Autoconf 2.69,
19423   with options \\"\$ac_cs_config\\"
19424
19425 Copyright (C) 2012 Free Software Foundation, Inc.
19426 This config.status script is free software; the Free Software Foundation
19427 gives unlimited permission to copy, distribute and modify it."
19428
19429 ac_pwd='$ac_pwd'
19430 srcdir='$srcdir'
19431 INSTALL='$INSTALL'
19432 MKDIR_P='$MKDIR_P'
19433 AWK='$AWK'
19434 test -n "\$AWK" || AWK=awk
19435 _ACEOF
19436
19437 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19438 # The default lists apply if the user does not specify any file.
19439 ac_need_defaults=:
19440 while test $# != 0
19441 do
19442   case $1 in
19443   --*=?*)
19444     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19445     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19446     ac_shift=:
19447     ;;
19448   --*=)
19449     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19450     ac_optarg=
19451     ac_shift=:
19452     ;;
19453   *)
19454     ac_option=$1
19455     ac_optarg=$2
19456     ac_shift=shift
19457     ;;
19458   esac
19459
19460   case $ac_option in
19461   # Handling of the options.
19462   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19463     ac_cs_recheck=: ;;
19464   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19465     $as_echo "$ac_cs_version"; exit ;;
19466   --config | --confi | --conf | --con | --co | --c )
19467     $as_echo "$ac_cs_config"; exit ;;
19468   --debug | --debu | --deb | --de | --d | -d )
19469     debug=: ;;
19470   --file | --fil | --fi | --f )
19471     $ac_shift
19472     case $ac_optarg in
19473     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19474     '') as_fn_error $? "missing file argument" ;;
19475     esac
19476     as_fn_append CONFIG_FILES " '$ac_optarg'"
19477     ac_need_defaults=false;;
19478   --header | --heade | --head | --hea )
19479     $ac_shift
19480     case $ac_optarg in
19481     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19482     esac
19483     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19484     ac_need_defaults=false;;
19485   --he | --h)
19486     # Conflict between --help and --header
19487     as_fn_error $? "ambiguous option: \`$1'
19488 Try \`$0 --help' for more information.";;
19489   --help | --hel | -h )
19490     $as_echo "$ac_cs_usage"; exit ;;
19491   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19492   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19493     ac_cs_silent=: ;;
19494
19495   # This is an error.
19496   -*) as_fn_error $? "unrecognized option: \`$1'
19497 Try \`$0 --help' for more information." ;;
19498
19499   *) as_fn_append ac_config_targets " $1"
19500      ac_need_defaults=false ;;
19501
19502   esac
19503   shift
19504 done
19505
19506 ac_configure_extra_args=
19507
19508 if $ac_cs_silent; then
19509   exec 6>/dev/null
19510   ac_configure_extra_args="$ac_configure_extra_args --silent"
19511 fi
19512
19513 _ACEOF
19514 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19515 if \$ac_cs_recheck; then
19516   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19517   shift
19518   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19519   CONFIG_SHELL='$SHELL'
19520   export CONFIG_SHELL
19521   exec "\$@"
19522 fi
19523
19524 _ACEOF
19525 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19526 exec 5>>config.log
19527 {
19528   echo
19529   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19530 ## Running $as_me. ##
19531 _ASBOX
19532   $as_echo "$ac_log"
19533 } >&5
19534
19535 _ACEOF
19536 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19537 _ACEOF
19538
19539 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19540
19541 # Handling of arguments.
19542 for ac_config_target in $ac_config_targets
19543 do
19544   case $ac_config_target in
19545     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19546     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19547     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19548     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
19549     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19550     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19551     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
19552     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19553     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19554     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19555     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19556     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19557     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19558
19559   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19560   esac
19561 done
19562
19563
19564 # If the user did not use the arguments to specify the items to instantiate,
19565 # then the envvar interface is used.  Set only those that are not.
19566 # We use the long form for the default assignment because of an extremely
19567 # bizarre bug on SunOS 4.1.3.
19568 if $ac_need_defaults; then
19569   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19570   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19571   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19572   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19573 fi
19574
19575 # Have a temporary directory for convenience.  Make it in the build tree
19576 # simply because there is no reason against having it here, and in addition,
19577 # creating and moving files from /tmp can sometimes cause problems.
19578 # Hook for its removal unless debugging.
19579 # Note that there is a small window in which the directory will not be cleaned:
19580 # after its creation but before its name has been assigned to `$tmp'.
19581 $debug ||
19582 {
19583   tmp= ac_tmp=
19584   trap 'exit_status=$?
19585   : "${ac_tmp:=$tmp}"
19586   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19587 ' 0
19588   trap 'as_fn_exit 1' 1 2 13 15
19589 }
19590 # Create a (secure) tmp directory for tmp files.
19591
19592 {
19593   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19594   test -d "$tmp"
19595 }  ||
19596 {
19597   tmp=./conf$$-$RANDOM
19598   (umask 077 && mkdir "$tmp")
19599 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19600 ac_tmp=$tmp
19601
19602 # Set up the scripts for CONFIG_FILES section.
19603 # No need to generate them if there are no CONFIG_FILES.
19604 # This happens for instance with `./config.status config.h'.
19605 if test -n "$CONFIG_FILES"; then
19606
19607
19608 ac_cr=`echo X | tr X '\015'`
19609 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19610 # But we know of no other shell where ac_cr would be empty at this
19611 # point, so we can use a bashism as a fallback.
19612 if test "x$ac_cr" = x; then
19613   eval ac_cr=\$\'\\r\'
19614 fi
19615 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19616 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19617   ac_cs_awk_cr='\\r'
19618 else
19619   ac_cs_awk_cr=$ac_cr
19620 fi
19621
19622 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19623 _ACEOF
19624
19625
19626 {
19627   echo "cat >conf$$subs.awk <<_ACEOF" &&
19628   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19629   echo "_ACEOF"
19630 } >conf$$subs.sh ||
19631   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19632 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19633 ac_delim='%!_!# '
19634 for ac_last_try in false false false false false :; do
19635   . ./conf$$subs.sh ||
19636     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19637
19638   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19639   if test $ac_delim_n = $ac_delim_num; then
19640     break
19641   elif $ac_last_try; then
19642     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19643   else
19644     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19645   fi
19646 done
19647 rm -f conf$$subs.sh
19648
19649 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19650 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19651 _ACEOF
19652 sed -n '
19653 h
19654 s/^/S["/; s/!.*/"]=/
19655 p
19656 g
19657 s/^[^!]*!//
19658 :repl
19659 t repl
19660 s/'"$ac_delim"'$//
19661 t delim
19662 :nl
19663 h
19664 s/\(.\{148\}\)..*/\1/
19665 t more1
19666 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19667 p
19668 n
19669 b repl
19670 :more1
19671 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19672 p
19673 g
19674 s/.\{148\}//
19675 t nl
19676 :delim
19677 h
19678 s/\(.\{148\}\)..*/\1/
19679 t more2
19680 s/["\\]/\\&/g; s/^/"/; s/$/"/
19681 p
19682 b
19683 :more2
19684 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19685 p
19686 g
19687 s/.\{148\}//
19688 t delim
19689 ' <conf$$subs.awk | sed '
19690 /^[^""]/{
19691   N
19692   s/\n//
19693 }
19694 ' >>$CONFIG_STATUS || ac_write_fail=1
19695 rm -f conf$$subs.awk
19696 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19697 _ACAWK
19698 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19699   for (key in S) S_is_set[key] = 1
19700   FS = "\a"
19701
19702 }
19703 {
19704   line = $ 0
19705   nfields = split(line, field, "@")
19706   substed = 0
19707   len = length(field[1])
19708   for (i = 2; i < nfields; i++) {
19709     key = field[i]
19710     keylen = length(key)
19711     if (S_is_set[key]) {
19712       value = S[key]
19713       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19714       len += length(value) + length(field[++i])
19715       substed = 1
19716     } else
19717       len += 1 + keylen
19718   }
19719
19720   print line
19721 }
19722
19723 _ACAWK
19724 _ACEOF
19725 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19726 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19727   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19728 else
19729   cat
19730 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19731   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19732 _ACEOF
19733
19734 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19735 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19736 # trailing colons and then remove the whole line if VPATH becomes empty
19737 # (actually we leave an empty line to preserve line numbers).
19738 if test "x$srcdir" = x.; then
19739   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
19740 h
19741 s///
19742 s/^/:/
19743 s/[      ]*$/:/
19744 s/:\$(srcdir):/:/g
19745 s/:\${srcdir}:/:/g
19746 s/:@srcdir@:/:/g
19747 s/^:*//
19748 s/:*$//
19749 x
19750 s/\(=[   ]*\).*/\1/
19751 G
19752 s/\n//
19753 s/^[^=]*=[       ]*$//
19754 }'
19755 fi
19756
19757 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19758 fi # test -n "$CONFIG_FILES"
19759
19760 # Set up the scripts for CONFIG_HEADERS section.
19761 # No need to generate them if there are no CONFIG_HEADERS.
19762 # This happens for instance with `./config.status Makefile'.
19763 if test -n "$CONFIG_HEADERS"; then
19764 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19765 BEGIN {
19766 _ACEOF
19767
19768 # Transform confdefs.h into an awk script `defines.awk', embedded as
19769 # here-document in config.status, that substitutes the proper values into
19770 # config.h.in to produce config.h.
19771
19772 # Create a delimiter string that does not exist in confdefs.h, to ease
19773 # handling of long lines.
19774 ac_delim='%!_!# '
19775 for ac_last_try in false false :; do
19776   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19777   if test -z "$ac_tt"; then
19778     break
19779   elif $ac_last_try; then
19780     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19781   else
19782     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19783   fi
19784 done
19785
19786 # For the awk script, D is an array of macro values keyed by name,
19787 # likewise P contains macro parameters if any.  Preserve backslash
19788 # newline sequences.
19789
19790 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19791 sed -n '
19792 s/.\{148\}/&'"$ac_delim"'/g
19793 t rset
19794 :rset
19795 s/^[     ]*#[    ]*define[       ][      ]*/ /
19796 t def
19797 d
19798 :def
19799 s/\\$//
19800 t bsnl
19801 s/["\\]/\\&/g
19802 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19803 D["\1"]=" \3"/p
19804 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
19805 d
19806 :bsnl
19807 s/["\\]/\\&/g
19808 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19809 D["\1"]=" \3\\\\\\n"\\/p
19810 t cont
19811 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19812 t cont
19813 d
19814 :cont
19815 n
19816 s/.\{148\}/&'"$ac_delim"'/g
19817 t clear
19818 :clear
19819 s/\\$//
19820 t bsnlc
19821 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19822 d
19823 :bsnlc
19824 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19825 b cont
19826 ' <confdefs.h | sed '
19827 s/'"$ac_delim"'/"\\\
19828 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19829
19830 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19831   for (key in D) D_is_set[key] = 1
19832   FS = "\a"
19833 }
19834 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19835   line = \$ 0
19836   split(line, arg, " ")
19837   if (arg[1] == "#") {
19838     defundef = arg[2]
19839     mac1 = arg[3]
19840   } else {
19841     defundef = substr(arg[1], 2)
19842     mac1 = arg[2]
19843   }
19844   split(mac1, mac2, "(") #)
19845   macro = mac2[1]
19846   prefix = substr(line, 1, index(line, defundef) - 1)
19847   if (D_is_set[macro]) {
19848     # Preserve the white space surrounding the "#".
19849     print prefix "define", macro P[macro] D[macro]
19850     next
19851   } else {
19852     # Replace #undef with comments.  This is necessary, for example,
19853     # in the case of _POSIX_SOURCE, which is predefined and required
19854     # on some systems where configure will not decide to define it.
19855     if (defundef == "undef") {
19856       print "/*", prefix defundef, macro, "*/"
19857       next
19858     }
19859   }
19860 }
19861 { print }
19862 _ACAWK
19863 _ACEOF
19864 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19865   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
19866 fi # test -n "$CONFIG_HEADERS"
19867
19868
19869 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
19870 shift
19871 for ac_tag
19872 do
19873   case $ac_tag in
19874   :[FHLC]) ac_mode=$ac_tag; continue;;
19875   esac
19876   case $ac_mode$ac_tag in
19877   :[FHL]*:*);;
19878   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
19879   :[FH]-) ac_tag=-:-;;
19880   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19881   esac
19882   ac_save_IFS=$IFS
19883   IFS=:
19884   set x $ac_tag
19885   IFS=$ac_save_IFS
19886   shift
19887   ac_file=$1
19888   shift
19889
19890   case $ac_mode in
19891   :L) ac_source=$1;;
19892   :[FH])
19893     ac_file_inputs=
19894     for ac_f
19895     do
19896       case $ac_f in
19897       -) ac_f="$ac_tmp/stdin";;
19898       *) # Look for the file first in the build tree, then in the source tree
19899          # (if the path is not absolute).  The absolute path cannot be DOS-style,
19900          # because $ac_f cannot contain `:'.
19901          test -f "$ac_f" ||
19902            case $ac_f in
19903            [\\/$]*) false;;
19904            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19905            esac ||
19906            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
19907       esac
19908       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19909       as_fn_append ac_file_inputs " '$ac_f'"
19910     done
19911
19912     # Let's still pretend it is `configure' which instantiates (i.e., don't
19913     # use $as_me), people would be surprised to read:
19914     #    /* config.h.  Generated by config.status.  */
19915     configure_input='Generated from '`
19916           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19917         `' by configure.'
19918     if test x"$ac_file" != x-; then
19919       configure_input="$ac_file.  $configure_input"
19920       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19921 $as_echo "$as_me: creating $ac_file" >&6;}
19922     fi
19923     # Neutralize special characters interpreted by sed in replacement strings.
19924     case $configure_input in #(
19925     *\&* | *\|* | *\\* )
19926        ac_sed_conf_input=`$as_echo "$configure_input" |
19927        sed 's/[\\\\&|]/\\\\&/g'`;; #(
19928     *) ac_sed_conf_input=$configure_input;;
19929     esac
19930
19931     case $ac_tag in
19932     *:-:* | *:-) cat >"$ac_tmp/stdin" \
19933       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
19934     esac
19935     ;;
19936   esac
19937
19938   ac_dir=`$as_dirname -- "$ac_file" ||
19939 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19940          X"$ac_file" : 'X\(//\)[^/]' \| \
19941          X"$ac_file" : 'X\(//\)$' \| \
19942          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19943 $as_echo X"$ac_file" |
19944     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19945             s//\1/
19946             q
19947           }
19948           /^X\(\/\/\)[^/].*/{
19949             s//\1/
19950             q
19951           }
19952           /^X\(\/\/\)$/{
19953             s//\1/
19954             q
19955           }
19956           /^X\(\/\).*/{
19957             s//\1/
19958             q
19959           }
19960           s/.*/./; q'`
19961   as_dir="$ac_dir"; as_fn_mkdir_p
19962   ac_builddir=.
19963
19964 case "$ac_dir" in
19965 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19966 *)
19967   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19968   # A ".." for each directory in $ac_dir_suffix.
19969   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19970   case $ac_top_builddir_sub in
19971   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19972   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19973   esac ;;
19974 esac
19975 ac_abs_top_builddir=$ac_pwd
19976 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19977 # for backward compatibility:
19978 ac_top_builddir=$ac_top_build_prefix
19979
19980 case $srcdir in
19981   .)  # We are building in place.
19982     ac_srcdir=.
19983     ac_top_srcdir=$ac_top_builddir_sub
19984     ac_abs_top_srcdir=$ac_pwd ;;
19985   [\\/]* | ?:[\\/]* )  # Absolute name.
19986     ac_srcdir=$srcdir$ac_dir_suffix;
19987     ac_top_srcdir=$srcdir
19988     ac_abs_top_srcdir=$srcdir ;;
19989   *) # Relative name.
19990     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19991     ac_top_srcdir=$ac_top_build_prefix$srcdir
19992     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19993 esac
19994 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19995
19996
19997   case $ac_mode in
19998   :F)
19999   #
20000   # CONFIG_FILE
20001   #
20002
20003   case $INSTALL in
20004   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20005   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20006   esac
20007   ac_MKDIR_P=$MKDIR_P
20008   case $MKDIR_P in
20009   [\\/$]* | ?:[\\/]* ) ;;
20010   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20011   esac
20012 _ACEOF
20013
20014 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20015 # If the template does not know about datarootdir, expand it.
20016 # FIXME: This hack should be removed a few years after 2.60.
20017 ac_datarootdir_hack=; ac_datarootdir_seen=
20018 ac_sed_dataroot='
20019 /datarootdir/ {
20020   p
20021   q
20022 }
20023 /@datadir@/p
20024 /@docdir@/p
20025 /@infodir@/p
20026 /@localedir@/p
20027 /@mandir@/p'
20028 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20029 *datarootdir*) ac_datarootdir_seen=yes;;
20030 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20031   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20032 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20033 _ACEOF
20034 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20035   ac_datarootdir_hack='
20036   s&@datadir@&$datadir&g
20037   s&@docdir@&$docdir&g
20038   s&@infodir@&$infodir&g
20039   s&@localedir@&$localedir&g
20040   s&@mandir@&$mandir&g
20041   s&\\\${datarootdir}&$datarootdir&g' ;;
20042 esac
20043 _ACEOF
20044
20045 # Neutralize VPATH when `$srcdir' = `.'.
20046 # Shell code in configure.ac might set extrasub.
20047 # FIXME: do we really want to maintain this feature?
20048 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20049 ac_sed_extra="$ac_vpsub
20050 $extrasub
20051 _ACEOF
20052 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20053 :t
20054 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20055 s|@configure_input@|$ac_sed_conf_input|;t t
20056 s&@top_builddir@&$ac_top_builddir_sub&;t t
20057 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20058 s&@srcdir@&$ac_srcdir&;t t
20059 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20060 s&@top_srcdir@&$ac_top_srcdir&;t t
20061 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20062 s&@builddir@&$ac_builddir&;t t
20063 s&@abs_builddir@&$ac_abs_builddir&;t t
20064 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20065 s&@INSTALL@&$ac_INSTALL&;t t
20066 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20067 $ac_datarootdir_hack
20068 "
20069 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20070   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20071
20072 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20073   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20074   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20075       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20076   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20077 which seems to be undefined.  Please make sure it is defined" >&5
20078 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20079 which seems to be undefined.  Please make sure it is defined" >&2;}
20080
20081   rm -f "$ac_tmp/stdin"
20082   case $ac_file in
20083   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20084   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20085   esac \
20086   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20087  ;;
20088   :H)
20089   #
20090   # CONFIG_HEADER
20091   #
20092   if test x"$ac_file" != x-; then
20093     {
20094       $as_echo "/* $configure_input  */" \
20095       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20096     } >"$ac_tmp/config.h" \
20097       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20098     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20099       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20100 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20101     else
20102       rm -f "$ac_file"
20103       mv "$ac_tmp/config.h" "$ac_file" \
20104         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20105     fi
20106   else
20107     $as_echo "/* $configure_input  */" \
20108       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20109       || as_fn_error $? "could not create -" "$LINENO" 5
20110   fi
20111  ;;
20112   :L)
20113   #
20114   # CONFIG_LINK
20115   #
20116
20117   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20118     :
20119   else
20120     # Prefer the file from the source tree if names are identical.
20121     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20122       ac_source=$srcdir/$ac_source
20123     fi
20124
20125     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20126 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20127
20128     if test ! -r "$ac_source"; then
20129       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20130     fi
20131     rm -f "$ac_file"
20132
20133     # Try a relative symlink, then a hard link, then a copy.
20134     case $ac_source in
20135     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20136         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20137     esac
20138     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20139       ln "$ac_source" "$ac_file" 2>/dev/null ||
20140       cp -p "$ac_source" "$ac_file" ||
20141       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20142   fi
20143  ;;
20144   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20145 $as_echo "$as_me: executing $ac_file commands" >&6;}
20146  ;;
20147   esac
20148
20149
20150   case $ac_file$ac_mode in
20151     "check_win32_symlinks":C)
20152 # Links sometimes fail undetected on Mingw -
20153 # so here we detect it and warn the user
20154 for FILE in $CONFIG_LINKS
20155  do
20156         # test -e works for symlinks in the MinGW console
20157         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20158 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20159  done
20160  ;;
20161     "src/include/pg_config.h":H)
20162 # Update timestamp for pg_config.h (see Makefile.global)
20163 echo >src/include/stamp-h
20164  ;;
20165     "src/include/pg_config_ext.h":H)
20166 # Update timestamp for pg_config_ext.h (see Makefile.global)
20167 echo >src/include/stamp-ext-h
20168  ;;
20169     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20170
20171   esac
20172 done # for ac_tag
20173
20174
20175 as_fn_exit 0
20176 _ACEOF
20177 ac_clean_files=$ac_clean_files_save
20178
20179 test $ac_write_fail = 0 ||
20180   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20181
20182
20183 # configure is writing to config.log, and then calls config.status.
20184 # config.status does its own redirection, appending to config.log.
20185 # Unfortunately, on DOS this fails, as config.log is still kept open
20186 # by configure, so config.status won't be able to write to it; its
20187 # output is simply discarded.  So we exec the FD to /dev/null,
20188 # effectively closing config.log, so it can be properly (re)opened and
20189 # appended to by config.status.  When coming back to configure, we
20190 # need to make the FD available again.
20191 if test "$no_create" != yes; then
20192   ac_cs_success=:
20193   ac_config_status_args=
20194   test "$silent" = yes &&
20195     ac_config_status_args="$ac_config_status_args --quiet"
20196   exec 5>/dev/null
20197   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20198   exec 5>>config.log
20199   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20200   # would make configure fail if this is the last instruction.
20201   $ac_cs_success || as_fn_exit 1
20202 fi
20203 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20204   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20205 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20206 fi
20207