]> granicus.if.org Git - postgresql/blob - configure
Stamp 11.5.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 11.5.
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='11.5'
586 PACKAGE_STRING='PostgreSQL 11.5'
587 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
588 PACKAGE_URL=''
589
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 #  include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 #  include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
627
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 PROVE
633 FOP
634 XSLTPROC
635 DBTOEPUB
636 have_docbook
637 XMLLINT
638 TCL_SHLIB_LD_LIBS
639 TCL_SHARED_BUILD
640 TCL_LIB_SPEC
641 TCL_LIBS
642 TCL_INCLUDE_SPEC
643 TCL_CONFIG_SH
644 TCLSH
645 XGETTEXT
646 MSGMERGE
647 MSGFMT_FLAGS
648 MSGFMT
649 PG_CRC32C_OBJS
650 CFLAGS_ARMV8_CRC32C
651 CFLAGS_SSE42
652 have_win32_dbghelp
653 HAVE_IPV6
654 LIBOBJS
655 UUID_LIBS
656 LDAP_LIBS_BE
657 LDAP_LIBS_FE
658 PTHREAD_CFLAGS
659 PTHREAD_LIBS
660 PTHREAD_CC
661 ax_pthread_config
662 ZIC
663 python_additional_libs
664 python_libspec
665 python_libdir
666 python_includespec
667 python_version
668 python_majorversion
669 PYTHON
670 perl_embed_ldflags
671 perl_embed_ccflags
672 perl_includespec
673 perl_useshrplib
674 perl_privlibexp
675 perl_archlibexp
676 PERL
677 FLEXFLAGS
678 FLEX
679 BISONFLAGS
680 BISON
681 MKDIR_P
682 LN_S
683 TAR
684 install_bin
685 INSTALL_DATA
686 INSTALL_SCRIPT
687 INSTALL_PROGRAM
688 WINDRES
689 DLLWRAP
690 DLLTOOL
691 AR
692 STRIP_SHARED_LIB
693 STRIP_STATIC_LIB
694 STRIP
695 RANLIB
696 with_gnu_ld
697 LD
698 LDFLAGS_SL
699 LDFLAGS_EX
700 ELF_SYS
701 EGREP
702 GREP
703 with_zlib
704 with_system_tzdata
705 with_libxslt
706 with_libxml
707 XML2_CONFIG
708 UUID_EXTRA_OBJS
709 with_uuid
710 with_systemd
711 with_selinux
712 with_openssl
713 with_ldap
714 with_krb_srvnam
715 krb_srvtab
716 with_gssapi
717 with_python
718 with_perl
719 with_tcl
720 ICU_LIBS
721 ICU_CFLAGS
722 PKG_CONFIG_LIBDIR
723 PKG_CONFIG_PATH
724 PKG_CONFIG
725 with_icu
726 enable_thread_safety
727 INCLUDES
728 autodepend
729 TAS
730 GCC
731 CPP
732 BITCODE_CXXFLAGS
733 BITCODE_CFLAGS
734 CFLAGS_VECTOR
735 LLVM_BINPATH
736 LLVM_CXXFLAGS
737 LLVM_CFLAGS
738 LLVM_CPPFLAGS
739 LLVM_LIBS
740 CLANG
741 LLVM_CONFIG
742 AWK
743 with_llvm
744 SUN_STUDIO_CC
745 ac_ct_CXX
746 CXXFLAGS
747 CXX
748 OBJEXT
749 EXEEXT
750 ac_ct_CC
751 CPPFLAGS
752 LDFLAGS
753 CFLAGS
754 CC
755 enable_tap_tests
756 enable_dtrace
757 DTRACEFLAGS
758 DTRACE
759 enable_coverage
760 GENHTML
761 LCOV
762 GCOV
763 enable_debug
764 enable_strong_random
765 enable_rpath
766 default_port
767 WANTED_LANGUAGES
768 enable_nls
769 PORTNAME
770 host_os
771 host_vendor
772 host_cpu
773 host
774 build_os
775 build_vendor
776 build_cpu
777 build
778 PG_MAJORVERSION
779 configure_args
780 target_alias
781 host_alias
782 build_alias
783 LIBS
784 ECHO_T
785 ECHO_N
786 ECHO_C
787 DEFS
788 mandir
789 localedir
790 libdir
791 psdir
792 pdfdir
793 dvidir
794 htmldir
795 infodir
796 docdir
797 oldincludedir
798 includedir
799 localstatedir
800 sharedstatedir
801 sysconfdir
802 datadir
803 datarootdir
804 libexecdir
805 sbindir
806 bindir
807 program_transform_name
808 prefix
809 exec_prefix
810 PACKAGE_URL
811 PACKAGE_BUGREPORT
812 PACKAGE_STRING
813 PACKAGE_VERSION
814 PACKAGE_TARNAME
815 PACKAGE_NAME
816 PATH_SEPARATOR
817 SHELL'
818 ac_subst_files=''
819 ac_user_opts='
820 enable_option_checking
821 with_extra_version
822 with_template
823 with_includes
824 with_libraries
825 with_libs
826 enable_integer_datetimes
827 enable_nls
828 with_pgport
829 enable_rpath
830 enable_spinlocks
831 enable_atomics
832 enable_strong_random
833 enable_debug
834 enable_profiling
835 enable_coverage
836 enable_dtrace
837 enable_tap_tests
838 with_blocksize
839 with_segsize
840 with_wal_blocksize
841 with_CC
842 with_llvm
843 enable_depend
844 enable_cassert
845 enable_thread_safety
846 with_icu
847 with_tcl
848 with_tclconfig
849 with_perl
850 with_python
851 with_gssapi
852 with_krb_srvnam
853 with_pam
854 with_bsd_auth
855 with_ldap
856 with_bonjour
857 with_openssl
858 with_selinux
859 with_systemd
860 with_readline
861 with_libedit_preferred
862 with_uuid
863 with_ossp_uuid
864 with_libxml
865 with_libxslt
866 with_system_tzdata
867 with_zlib
868 with_gnu_ld
869 enable_largefile
870 enable_float4_byval
871 enable_float8_byval
872 '
873       ac_precious_vars='build_alias
874 host_alias
875 target_alias
876 CC
877 CFLAGS
878 LDFLAGS
879 LIBS
880 CPPFLAGS
881 CXX
882 CXXFLAGS
883 CCC
884 LLVM_CONFIG
885 CLANG
886 CPP
887 PKG_CONFIG
888 PKG_CONFIG_PATH
889 PKG_CONFIG_LIBDIR
890 ICU_CFLAGS
891 ICU_LIBS
892 LDFLAGS_EX
893 LDFLAGS_SL'
894
895
896 # Initialize some variables set by options.
897 ac_init_help=
898 ac_init_version=false
899 ac_unrecognized_opts=
900 ac_unrecognized_sep=
901 # The variables have the same names as the options, with
902 # dashes changed to underlines.
903 cache_file=/dev/null
904 exec_prefix=NONE
905 no_create=
906 no_recursion=
907 prefix=NONE
908 program_prefix=NONE
909 program_suffix=NONE
910 program_transform_name=s,x,x,
911 silent=
912 site=
913 srcdir=
914 verbose=
915 x_includes=NONE
916 x_libraries=NONE
917
918 # Installation directory options.
919 # These are left unexpanded so users can "make install exec_prefix=/foo"
920 # and all the variables that are supposed to be based on exec_prefix
921 # by default will actually change.
922 # Use braces instead of parens because sh, perl, etc. also accept them.
923 # (The list follows the same order as the GNU Coding Standards.)
924 bindir='${exec_prefix}/bin'
925 sbindir='${exec_prefix}/sbin'
926 libexecdir='${exec_prefix}/libexec'
927 datarootdir='${prefix}/share'
928 datadir='${datarootdir}'
929 sysconfdir='${prefix}/etc'
930 sharedstatedir='${prefix}/com'
931 localstatedir='${prefix}/var'
932 includedir='${prefix}/include'
933 oldincludedir='/usr/include'
934 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
935 infodir='${datarootdir}/info'
936 htmldir='${docdir}'
937 dvidir='${docdir}'
938 pdfdir='${docdir}'
939 psdir='${docdir}'
940 libdir='${exec_prefix}/lib'
941 localedir='${datarootdir}/locale'
942 mandir='${datarootdir}/man'
943
944 ac_prev=
945 ac_dashdash=
946 for ac_option
947 do
948   # If the previous option needs an argument, assign it.
949   if test -n "$ac_prev"; then
950     eval $ac_prev=\$ac_option
951     ac_prev=
952     continue
953   fi
954
955   case $ac_option in
956   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
957   *=)   ac_optarg= ;;
958   *)    ac_optarg=yes ;;
959   esac
960
961   # Accept the important Cygnus configure options, so we can diagnose typos.
962
963   case $ac_dashdash$ac_option in
964   --)
965     ac_dashdash=yes ;;
966
967   -bindir | --bindir | --bindi | --bind | --bin | --bi)
968     ac_prev=bindir ;;
969   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
970     bindir=$ac_optarg ;;
971
972   -build | --build | --buil | --bui | --bu)
973     ac_prev=build_alias ;;
974   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
975     build_alias=$ac_optarg ;;
976
977   -cache-file | --cache-file | --cache-fil | --cache-fi \
978   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
979     ac_prev=cache_file ;;
980   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
981   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
982     cache_file=$ac_optarg ;;
983
984   --config-cache | -C)
985     cache_file=config.cache ;;
986
987   -datadir | --datadir | --datadi | --datad)
988     ac_prev=datadir ;;
989   -datadir=* | --datadir=* | --datadi=* | --datad=*)
990     datadir=$ac_optarg ;;
991
992   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
993   | --dataroo | --dataro | --datar)
994     ac_prev=datarootdir ;;
995   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
996   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
997     datarootdir=$ac_optarg ;;
998
999   -disable-* | --disable-*)
1000     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1001     # Reject names that are not valid shell variable names.
1002     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1003       as_fn_error $? "invalid feature name: $ac_useropt"
1004     ac_useropt_orig=$ac_useropt
1005     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1006     case $ac_user_opts in
1007       *"
1008 "enable_$ac_useropt"
1009 "*) ;;
1010       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1011          ac_unrecognized_sep=', ';;
1012     esac
1013     eval enable_$ac_useropt=no ;;
1014
1015   -docdir | --docdir | --docdi | --doc | --do)
1016     ac_prev=docdir ;;
1017   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1018     docdir=$ac_optarg ;;
1019
1020   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1021     ac_prev=dvidir ;;
1022   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1023     dvidir=$ac_optarg ;;
1024
1025   -enable-* | --enable-*)
1026     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1027     # Reject names that are not valid shell variable names.
1028     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1029       as_fn_error $? "invalid feature name: $ac_useropt"
1030     ac_useropt_orig=$ac_useropt
1031     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1032     case $ac_user_opts in
1033       *"
1034 "enable_$ac_useropt"
1035 "*) ;;
1036       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1037          ac_unrecognized_sep=', ';;
1038     esac
1039     eval enable_$ac_useropt=\$ac_optarg ;;
1040
1041   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1042   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1043   | --exec | --exe | --ex)
1044     ac_prev=exec_prefix ;;
1045   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1046   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1047   | --exec=* | --exe=* | --ex=*)
1048     exec_prefix=$ac_optarg ;;
1049
1050   -gas | --gas | --ga | --g)
1051     # Obsolete; use --with-gas.
1052     with_gas=yes ;;
1053
1054   -help | --help | --hel | --he | -h)
1055     ac_init_help=long ;;
1056   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1057     ac_init_help=recursive ;;
1058   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1059     ac_init_help=short ;;
1060
1061   -host | --host | --hos | --ho)
1062     ac_prev=host_alias ;;
1063   -host=* | --host=* | --hos=* | --ho=*)
1064     host_alias=$ac_optarg ;;
1065
1066   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1067     ac_prev=htmldir ;;
1068   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1069   | --ht=*)
1070     htmldir=$ac_optarg ;;
1071
1072   -includedir | --includedir | --includedi | --included | --include \
1073   | --includ | --inclu | --incl | --inc)
1074     ac_prev=includedir ;;
1075   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1076   | --includ=* | --inclu=* | --incl=* | --inc=*)
1077     includedir=$ac_optarg ;;
1078
1079   -infodir | --infodir | --infodi | --infod | --info | --inf)
1080     ac_prev=infodir ;;
1081   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1082     infodir=$ac_optarg ;;
1083
1084   -libdir | --libdir | --libdi | --libd)
1085     ac_prev=libdir ;;
1086   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1087     libdir=$ac_optarg ;;
1088
1089   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1090   | --libexe | --libex | --libe)
1091     ac_prev=libexecdir ;;
1092   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1093   | --libexe=* | --libex=* | --libe=*)
1094     libexecdir=$ac_optarg ;;
1095
1096   -localedir | --localedir | --localedi | --localed | --locale)
1097     ac_prev=localedir ;;
1098   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1099     localedir=$ac_optarg ;;
1100
1101   -localstatedir | --localstatedir | --localstatedi | --localstated \
1102   | --localstate | --localstat | --localsta | --localst | --locals)
1103     ac_prev=localstatedir ;;
1104   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1105   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1106     localstatedir=$ac_optarg ;;
1107
1108   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1109     ac_prev=mandir ;;
1110   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1111     mandir=$ac_optarg ;;
1112
1113   -nfp | --nfp | --nf)
1114     # Obsolete; use --without-fp.
1115     with_fp=no ;;
1116
1117   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1118   | --no-cr | --no-c | -n)
1119     no_create=yes ;;
1120
1121   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1122   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1123     no_recursion=yes ;;
1124
1125   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1126   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1127   | --oldin | --oldi | --old | --ol | --o)
1128     ac_prev=oldincludedir ;;
1129   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1130   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1131   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1132     oldincludedir=$ac_optarg ;;
1133
1134   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1135     ac_prev=prefix ;;
1136   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1137     prefix=$ac_optarg ;;
1138
1139   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1140   | --program-pre | --program-pr | --program-p)
1141     ac_prev=program_prefix ;;
1142   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1143   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1144     program_prefix=$ac_optarg ;;
1145
1146   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1147   | --program-suf | --program-su | --program-s)
1148     ac_prev=program_suffix ;;
1149   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1150   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1151     program_suffix=$ac_optarg ;;
1152
1153   -program-transform-name | --program-transform-name \
1154   | --program-transform-nam | --program-transform-na \
1155   | --program-transform-n | --program-transform- \
1156   | --program-transform | --program-transfor \
1157   | --program-transfo | --program-transf \
1158   | --program-trans | --program-tran \
1159   | --progr-tra | --program-tr | --program-t)
1160     ac_prev=program_transform_name ;;
1161   -program-transform-name=* | --program-transform-name=* \
1162   | --program-transform-nam=* | --program-transform-na=* \
1163   | --program-transform-n=* | --program-transform-=* \
1164   | --program-transform=* | --program-transfor=* \
1165   | --program-transfo=* | --program-transf=* \
1166   | --program-trans=* | --program-tran=* \
1167   | --progr-tra=* | --program-tr=* | --program-t=*)
1168     program_transform_name=$ac_optarg ;;
1169
1170   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1171     ac_prev=pdfdir ;;
1172   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1173     pdfdir=$ac_optarg ;;
1174
1175   -psdir | --psdir | --psdi | --psd | --ps)
1176     ac_prev=psdir ;;
1177   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1178     psdir=$ac_optarg ;;
1179
1180   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1181   | -silent | --silent | --silen | --sile | --sil)
1182     silent=yes ;;
1183
1184   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1185     ac_prev=sbindir ;;
1186   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1187   | --sbi=* | --sb=*)
1188     sbindir=$ac_optarg ;;
1189
1190   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1191   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1192   | --sharedst | --shareds | --shared | --share | --shar \
1193   | --sha | --sh)
1194     ac_prev=sharedstatedir ;;
1195   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1196   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1197   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1198   | --sha=* | --sh=*)
1199     sharedstatedir=$ac_optarg ;;
1200
1201   -site | --site | --sit)
1202     ac_prev=site ;;
1203   -site=* | --site=* | --sit=*)
1204     site=$ac_optarg ;;
1205
1206   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1207     ac_prev=srcdir ;;
1208   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1209     srcdir=$ac_optarg ;;
1210
1211   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1212   | --syscon | --sysco | --sysc | --sys | --sy)
1213     ac_prev=sysconfdir ;;
1214   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1215   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1216     sysconfdir=$ac_optarg ;;
1217
1218   -target | --target | --targe | --targ | --tar | --ta | --t)
1219     ac_prev=target_alias ;;
1220   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1221     target_alias=$ac_optarg ;;
1222
1223   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1224     verbose=yes ;;
1225
1226   -version | --version | --versio | --versi | --vers | -V)
1227     ac_init_version=: ;;
1228
1229   -with-* | --with-*)
1230     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1231     # Reject names that are not valid shell variable names.
1232     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1233       as_fn_error $? "invalid package name: $ac_useropt"
1234     ac_useropt_orig=$ac_useropt
1235     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1236     case $ac_user_opts in
1237       *"
1238 "with_$ac_useropt"
1239 "*) ;;
1240       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1241          ac_unrecognized_sep=', ';;
1242     esac
1243     eval with_$ac_useropt=\$ac_optarg ;;
1244
1245   -without-* | --without-*)
1246     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1247     # Reject names that are not valid shell variable names.
1248     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1249       as_fn_error $? "invalid package name: $ac_useropt"
1250     ac_useropt_orig=$ac_useropt
1251     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1252     case $ac_user_opts in
1253       *"
1254 "with_$ac_useropt"
1255 "*) ;;
1256       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1257          ac_unrecognized_sep=', ';;
1258     esac
1259     eval with_$ac_useropt=no ;;
1260
1261   --x)
1262     # Obsolete; use --with-x.
1263     with_x=yes ;;
1264
1265   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1266   | --x-incl | --x-inc | --x-in | --x-i)
1267     ac_prev=x_includes ;;
1268   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1269   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1270     x_includes=$ac_optarg ;;
1271
1272   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1273   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1274     ac_prev=x_libraries ;;
1275   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1276   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1277     x_libraries=$ac_optarg ;;
1278
1279   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1280 Try \`$0 --help' for more information"
1281     ;;
1282
1283   *=*)
1284     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1285     # Reject names that are not valid shell variable names.
1286     case $ac_envvar in #(
1287       '' | [0-9]* | *[!_$as_cr_alnum]* )
1288       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1289     esac
1290     eval $ac_envvar=\$ac_optarg
1291     export $ac_envvar ;;
1292
1293   *)
1294     # FIXME: should be removed in autoconf 3.0.
1295     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1296     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1297       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1298     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1299     ;;
1300
1301   esac
1302 done
1303
1304 if test -n "$ac_prev"; then
1305   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1306   as_fn_error $? "missing argument to $ac_option"
1307 fi
1308
1309 if test -n "$ac_unrecognized_opts"; then
1310   case $enable_option_checking in
1311     no) ;;
1312     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1313     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1314   esac
1315 fi
1316
1317 # Check all directory arguments for consistency.
1318 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1319                 datadir sysconfdir sharedstatedir localstatedir includedir \
1320                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1321                 libdir localedir mandir
1322 do
1323   eval ac_val=\$$ac_var
1324   # Remove trailing slashes.
1325   case $ac_val in
1326     */ )
1327       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1328       eval $ac_var=\$ac_val;;
1329   esac
1330   # Be sure to have absolute directory names.
1331   case $ac_val in
1332     [\\/$]* | ?:[\\/]* )  continue;;
1333     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1334   esac
1335   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1336 done
1337
1338 # There might be people who depend on the old broken behavior: `$host'
1339 # used to hold the argument of --host etc.
1340 # FIXME: To remove some day.
1341 build=$build_alias
1342 host=$host_alias
1343 target=$target_alias
1344
1345 # FIXME: To remove some day.
1346 if test "x$host_alias" != x; then
1347   if test "x$build_alias" = x; then
1348     cross_compiling=maybe
1349   elif test "x$build_alias" != "x$host_alias"; then
1350     cross_compiling=yes
1351   fi
1352 fi
1353
1354 ac_tool_prefix=
1355 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1356
1357 test "$silent" = yes && exec 6>/dev/null
1358
1359
1360 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1361 ac_ls_di=`ls -di .` &&
1362 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1363   as_fn_error $? "working directory cannot be determined"
1364 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1365   as_fn_error $? "pwd does not report name of working directory"
1366
1367
1368 # Find the source files, if location was not specified.
1369 if test -z "$srcdir"; then
1370   ac_srcdir_defaulted=yes
1371   # Try the directory containing this script, then the parent directory.
1372   ac_confdir=`$as_dirname -- "$as_myself" ||
1373 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1374          X"$as_myself" : 'X\(//\)[^/]' \| \
1375          X"$as_myself" : 'X\(//\)$' \| \
1376          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1377 $as_echo X"$as_myself" |
1378     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1379             s//\1/
1380             q
1381           }
1382           /^X\(\/\/\)[^/].*/{
1383             s//\1/
1384             q
1385           }
1386           /^X\(\/\/\)$/{
1387             s//\1/
1388             q
1389           }
1390           /^X\(\/\).*/{
1391             s//\1/
1392             q
1393           }
1394           s/.*/./; q'`
1395   srcdir=$ac_confdir
1396   if test ! -r "$srcdir/$ac_unique_file"; then
1397     srcdir=..
1398   fi
1399 else
1400   ac_srcdir_defaulted=no
1401 fi
1402 if test ! -r "$srcdir/$ac_unique_file"; then
1403   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1404   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1405 fi
1406 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1407 ac_abs_confdir=`(
1408         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1409         pwd)`
1410 # When building in place, set srcdir=.
1411 if test "$ac_abs_confdir" = "$ac_pwd"; then
1412   srcdir=.
1413 fi
1414 # Remove unnecessary trailing slashes from srcdir.
1415 # Double slashes in file names in object file debugging info
1416 # mess up M-x gdb in Emacs.
1417 case $srcdir in
1418 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1419 esac
1420 for ac_var in $ac_precious_vars; do
1421   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1422   eval ac_env_${ac_var}_value=\$${ac_var}
1423   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1424   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1425 done
1426
1427 #
1428 # Report the --help message.
1429 #
1430 if test "$ac_init_help" = "long"; then
1431   # Omit some internal or obsolete options to make the list less imposing.
1432   # This message is too long to be a string in the A/UX 3.1 sh.
1433   cat <<_ACEOF
1434 \`configure' configures PostgreSQL 11.5 to adapt to many kinds of systems.
1435
1436 Usage: $0 [OPTION]... [VAR=VALUE]...
1437
1438 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1439 VAR=VALUE.  See below for descriptions of some of the useful variables.
1440
1441 Defaults for the options are specified in brackets.
1442
1443 Configuration:
1444   -h, --help              display this help and exit
1445       --help=short        display options specific to this package
1446       --help=recursive    display the short help of all the included packages
1447   -V, --version           display version information and exit
1448   -q, --quiet, --silent   do not print \`checking ...' messages
1449       --cache-file=FILE   cache test results in FILE [disabled]
1450   -C, --config-cache      alias for \`--cache-file=config.cache'
1451   -n, --no-create         do not create output files
1452       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1453
1454 Installation directories:
1455   --prefix=PREFIX         install architecture-independent files in PREFIX
1456                           [$ac_default_prefix]
1457   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1458                           [PREFIX]
1459
1460 By default, \`make install' will install all the files in
1461 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1462 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1463 for instance \`--prefix=\$HOME'.
1464
1465 For better control, use the options below.
1466
1467 Fine tuning of the installation directories:
1468   --bindir=DIR            user executables [EPREFIX/bin]
1469   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1470   --libexecdir=DIR        program executables [EPREFIX/libexec]
1471   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1472   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1473   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1474   --libdir=DIR            object code libraries [EPREFIX/lib]
1475   --includedir=DIR        C header files [PREFIX/include]
1476   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1477   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1478   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1479   --infodir=DIR           info documentation [DATAROOTDIR/info]
1480   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1481   --mandir=DIR            man documentation [DATAROOTDIR/man]
1482   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1483   --htmldir=DIR           html documentation [DOCDIR]
1484   --dvidir=DIR            dvi documentation [DOCDIR]
1485   --pdfdir=DIR            pdf documentation [DOCDIR]
1486   --psdir=DIR             ps documentation [DOCDIR]
1487 _ACEOF
1488
1489   cat <<\_ACEOF
1490
1491 System types:
1492   --build=BUILD     configure for building on BUILD [guessed]
1493   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1494 _ACEOF
1495 fi
1496
1497 if test -n "$ac_init_help"; then
1498   case $ac_init_help in
1499      short | recursive ) echo "Configuration of PostgreSQL 11.5:";;
1500    esac
1501   cat <<\_ACEOF
1502
1503 Optional Features:
1504   --disable-option-checking  ignore unrecognized --enable/--with options
1505   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1506   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1507   --disable-integer-datetimes
1508                           obsolete option, no longer supported
1509   --enable-nls[=LANGUAGES]
1510                           enable Native Language Support
1511   --disable-rpath         do not embed shared library search path in
1512                           executables
1513   --disable-spinlocks     do not use spinlocks
1514   --disable-atomics       do not use atomic operations
1515   --disable-strong-random do not use a strong random number source
1516   --enable-debug          build with debugging symbols (-g)
1517   --enable-profiling      build with profiling enabled
1518   --enable-coverage       build with coverage testing instrumentation
1519   --enable-dtrace         build with DTrace support
1520   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1521   --enable-depend         turn on automatic dependency tracking
1522   --enable-cassert        enable assertion checks (for debugging)
1523   --disable-thread-safety disable thread-safety in client libraries
1524   --disable-largefile     omit support for large files
1525   --disable-float4-byval  disable float4 passed by value
1526   --disable-float8-byval  disable float8 passed by value
1527
1528 Optional Packages:
1529   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1530   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1531   --with-extra-version=STRING
1532                           append STRING to version
1533   --with-template=NAME    override operating system template
1534   --with-includes=DIRS    look for additional header files in DIRS
1535   --with-libraries=DIRS   look for additional libraries in DIRS
1536   --with-libs=DIRS        alternative spelling of --with-libraries
1537   --with-pgport=PORTNUM   set default port number [5432]
1538   --with-blocksize=BLOCKSIZE
1539                           set table block size in kB [8]
1540   --with-segsize=SEGSIZE  set table segment size in GB [1]
1541   --with-wal-blocksize=BLOCKSIZE
1542                           set WAL block size in kB [8]
1543   --with-CC=CMD           set compiler (deprecated)
1544   --with-llvm             build with LLVM based JIT support
1545   --with-icu              build with ICU support
1546   --with-tcl              build Tcl modules (PL/Tcl)
1547   --with-tclconfig=DIR    tclConfig.sh is in DIR
1548   --with-perl             build Perl modules (PL/Perl)
1549   --with-python           build Python modules (PL/Python)
1550   --with-gssapi           build with GSSAPI support
1551   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1552                           [postgres]
1553   --with-pam              build with PAM support
1554   --with-bsd-auth         build with BSD Authentication support
1555   --with-ldap             build with LDAP support
1556   --with-bonjour          build with Bonjour support
1557   --with-openssl          build with OpenSSL support
1558   --with-selinux          build with SELinux support
1559   --with-systemd          build with systemd support
1560   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1561   --with-libedit-preferred
1562                           prefer BSD Libedit over GNU Readline
1563   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1564   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1565   --with-libxml           build with XML support
1566   --with-libxslt          use XSLT support when building contrib/xml2
1567   --with-system-tzdata=DIR
1568                           use system time zone data in DIR
1569   --without-zlib          do not use Zlib
1570   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1571
1572 Some influential environment variables:
1573   CC          C compiler command
1574   CFLAGS      C compiler flags
1575   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1576               nonstandard directory <lib dir>
1577   LIBS        libraries to pass to the linker, e.g. -l<library>
1578   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1579               you have headers in a nonstandard directory <include dir>
1580   CXX         C++ compiler command
1581   CXXFLAGS    C++ compiler flags
1582   LLVM_CONFIG path to llvm-config command
1583   CLANG       path to clang compiler to generate bitcode
1584   CPP         C preprocessor
1585   PKG_CONFIG  path to pkg-config utility
1586   PKG_CONFIG_PATH
1587               directories to add to pkg-config's search path
1588   PKG_CONFIG_LIBDIR
1589               path overriding pkg-config's built-in search path
1590   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1591   ICU_LIBS    linker flags for ICU, overriding pkg-config
1592   LDFLAGS_EX  extra linker flags for linking executables only
1593   LDFLAGS_SL  extra linker flags for linking shared libraries only
1594
1595 Use these variables to override the choices made by `configure' or to help
1596 it to find libraries and programs with nonstandard names/locations.
1597
1598 Report bugs to <pgsql-bugs@postgresql.org>.
1599 _ACEOF
1600 ac_status=$?
1601 fi
1602
1603 if test "$ac_init_help" = "recursive"; then
1604   # If there are subdirs, report their specific --help.
1605   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1606     test -d "$ac_dir" ||
1607       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1608       continue
1609     ac_builddir=.
1610
1611 case "$ac_dir" in
1612 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1613 *)
1614   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1615   # A ".." for each directory in $ac_dir_suffix.
1616   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1617   case $ac_top_builddir_sub in
1618   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1619   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1620   esac ;;
1621 esac
1622 ac_abs_top_builddir=$ac_pwd
1623 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1624 # for backward compatibility:
1625 ac_top_builddir=$ac_top_build_prefix
1626
1627 case $srcdir in
1628   .)  # We are building in place.
1629     ac_srcdir=.
1630     ac_top_srcdir=$ac_top_builddir_sub
1631     ac_abs_top_srcdir=$ac_pwd ;;
1632   [\\/]* | ?:[\\/]* )  # Absolute name.
1633     ac_srcdir=$srcdir$ac_dir_suffix;
1634     ac_top_srcdir=$srcdir
1635     ac_abs_top_srcdir=$srcdir ;;
1636   *) # Relative name.
1637     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1638     ac_top_srcdir=$ac_top_build_prefix$srcdir
1639     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1640 esac
1641 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1642
1643     cd "$ac_dir" || { ac_status=$?; continue; }
1644     # Check for guested configure.
1645     if test -f "$ac_srcdir/configure.gnu"; then
1646       echo &&
1647       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1648     elif test -f "$ac_srcdir/configure"; then
1649       echo &&
1650       $SHELL "$ac_srcdir/configure" --help=recursive
1651     else
1652       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1653     fi || ac_status=$?
1654     cd "$ac_pwd" || { ac_status=$?; break; }
1655   done
1656 fi
1657
1658 test -n "$ac_init_help" && exit $ac_status
1659 if $ac_init_version; then
1660   cat <<\_ACEOF
1661 PostgreSQL configure 11.5
1662 generated by GNU Autoconf 2.69
1663
1664 Copyright (C) 2012 Free Software Foundation, Inc.
1665 This configure script is free software; the Free Software Foundation
1666 gives unlimited permission to copy, distribute and modify it.
1667
1668 Copyright (c) 1996-2018, PostgreSQL Global Development Group
1669 _ACEOF
1670   exit
1671 fi
1672
1673 ## ------------------------ ##
1674 ## Autoconf initialization. ##
1675 ## ------------------------ ##
1676
1677 # ac_fn_c_try_compile LINENO
1678 # --------------------------
1679 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1680 ac_fn_c_try_compile ()
1681 {
1682   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1683   rm -f conftest.$ac_objext
1684   if { { ac_try="$ac_compile"
1685 case "(($ac_try" in
1686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1687   *) ac_try_echo=$ac_try;;
1688 esac
1689 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1690 $as_echo "$ac_try_echo"; } >&5
1691   (eval "$ac_compile") 2>conftest.err
1692   ac_status=$?
1693   if test -s conftest.err; then
1694     grep -v '^ *+' conftest.err >conftest.er1
1695     cat conftest.er1 >&5
1696     mv -f conftest.er1 conftest.err
1697   fi
1698   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1699   test $ac_status = 0; } && {
1700          test -z "$ac_c_werror_flag" ||
1701          test ! -s conftest.err
1702        } && test -s conftest.$ac_objext; then :
1703   ac_retval=0
1704 else
1705   $as_echo "$as_me: failed program was:" >&5
1706 sed 's/^/| /' conftest.$ac_ext >&5
1707
1708         ac_retval=1
1709 fi
1710   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1711   as_fn_set_status $ac_retval
1712
1713 } # ac_fn_c_try_compile
1714
1715 # ac_fn_cxx_try_compile LINENO
1716 # ----------------------------
1717 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1718 ac_fn_cxx_try_compile ()
1719 {
1720   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1721   rm -f conftest.$ac_objext
1722   if { { ac_try="$ac_compile"
1723 case "(($ac_try" in
1724   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1725   *) ac_try_echo=$ac_try;;
1726 esac
1727 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1728 $as_echo "$ac_try_echo"; } >&5
1729   (eval "$ac_compile") 2>conftest.err
1730   ac_status=$?
1731   if test -s conftest.err; then
1732     grep -v '^ *+' conftest.err >conftest.er1
1733     cat conftest.er1 >&5
1734     mv -f conftest.er1 conftest.err
1735   fi
1736   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1737   test $ac_status = 0; } && {
1738          test -z "$ac_cxx_werror_flag" ||
1739          test ! -s conftest.err
1740        } && test -s conftest.$ac_objext; then :
1741   ac_retval=0
1742 else
1743   $as_echo "$as_me: failed program was:" >&5
1744 sed 's/^/| /' conftest.$ac_ext >&5
1745
1746         ac_retval=1
1747 fi
1748   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1749   as_fn_set_status $ac_retval
1750
1751 } # ac_fn_cxx_try_compile
1752
1753 # ac_fn_c_try_link LINENO
1754 # -----------------------
1755 # Try to link conftest.$ac_ext, and return whether this succeeded.
1756 ac_fn_c_try_link ()
1757 {
1758   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1759   rm -f conftest.$ac_objext conftest$ac_exeext
1760   if { { ac_try="$ac_link"
1761 case "(($ac_try" in
1762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1763   *) ac_try_echo=$ac_try;;
1764 esac
1765 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1766 $as_echo "$ac_try_echo"; } >&5
1767   (eval "$ac_link") 2>conftest.err
1768   ac_status=$?
1769   if test -s conftest.err; then
1770     grep -v '^ *+' conftest.err >conftest.er1
1771     cat conftest.er1 >&5
1772     mv -f conftest.er1 conftest.err
1773   fi
1774   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1775   test $ac_status = 0; } && {
1776          test -z "$ac_c_werror_flag" ||
1777          test ! -s conftest.err
1778        } && test -s conftest$ac_exeext && {
1779          test "$cross_compiling" = yes ||
1780          test -x conftest$ac_exeext
1781        }; then :
1782   ac_retval=0
1783 else
1784   $as_echo "$as_me: failed program was:" >&5
1785 sed 's/^/| /' conftest.$ac_ext >&5
1786
1787         ac_retval=1
1788 fi
1789   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1790   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1791   # interfere with the next link command; also delete a directory that is
1792   # left behind by Apple's compiler.  We do this before executing the actions.
1793   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1794   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1795   as_fn_set_status $ac_retval
1796
1797 } # ac_fn_c_try_link
1798
1799 # ac_fn_c_try_cpp LINENO
1800 # ----------------------
1801 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1802 ac_fn_c_try_cpp ()
1803 {
1804   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805   if { { ac_try="$ac_cpp conftest.$ac_ext"
1806 case "(($ac_try" in
1807   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1808   *) ac_try_echo=$ac_try;;
1809 esac
1810 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1811 $as_echo "$ac_try_echo"; } >&5
1812   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1813   ac_status=$?
1814   if test -s conftest.err; then
1815     grep -v '^ *+' conftest.err >conftest.er1
1816     cat conftest.er1 >&5
1817     mv -f conftest.er1 conftest.err
1818   fi
1819   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1820   test $ac_status = 0; } > conftest.i && {
1821          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1822          test ! -s conftest.err
1823        }; then :
1824   ac_retval=0
1825 else
1826   $as_echo "$as_me: failed program was:" >&5
1827 sed 's/^/| /' conftest.$ac_ext >&5
1828
1829     ac_retval=1
1830 fi
1831   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1832   as_fn_set_status $ac_retval
1833
1834 } # ac_fn_c_try_cpp
1835
1836 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1837 # -------------------------------------------------------
1838 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1839 # the include files in INCLUDES and setting the cache variable VAR
1840 # accordingly.
1841 ac_fn_c_check_header_mongrel ()
1842 {
1843   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1844   if eval \${$3+:} false; then :
1845   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846 $as_echo_n "checking for $2... " >&6; }
1847 if eval \${$3+:} false; then :
1848   $as_echo_n "(cached) " >&6
1849 fi
1850 eval ac_res=\$$3
1851                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1852 $as_echo "$ac_res" >&6; }
1853 else
1854   # Is the header compilable?
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1856 $as_echo_n "checking $2 usability... " >&6; }
1857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1858 /* end confdefs.h.  */
1859 $4
1860 #include <$2>
1861 _ACEOF
1862 if ac_fn_c_try_compile "$LINENO"; then :
1863   ac_header_compiler=yes
1864 else
1865   ac_header_compiler=no
1866 fi
1867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1869 $as_echo "$ac_header_compiler" >&6; }
1870
1871 # Is the header present?
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1873 $as_echo_n "checking $2 presence... " >&6; }
1874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1875 /* end confdefs.h.  */
1876 #include <$2>
1877 _ACEOF
1878 if ac_fn_c_try_cpp "$LINENO"; then :
1879   ac_header_preproc=yes
1880 else
1881   ac_header_preproc=no
1882 fi
1883 rm -f conftest.err conftest.i conftest.$ac_ext
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1885 $as_echo "$ac_header_preproc" >&6; }
1886
1887 # So?  What about this header?
1888 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1889   yes:no: )
1890     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1891 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1892     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1893 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1894     ;;
1895   no:yes:* )
1896     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1897 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1898     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1899 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1900     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1901 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1902     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1903 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1904     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1905 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1906 ( $as_echo "## ---------------------------------------- ##
1907 ## Report this to pgsql-bugs@postgresql.org ##
1908 ## ---------------------------------------- ##"
1909      ) | sed "s/^/$as_me: WARNING:     /" >&2
1910     ;;
1911 esac
1912   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1913 $as_echo_n "checking for $2... " >&6; }
1914 if eval \${$3+:} false; then :
1915   $as_echo_n "(cached) " >&6
1916 else
1917   eval "$3=\$ac_header_compiler"
1918 fi
1919 eval ac_res=\$$3
1920                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1921 $as_echo "$ac_res" >&6; }
1922 fi
1923   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1924
1925 } # ac_fn_c_check_header_mongrel
1926
1927 # ac_fn_c_try_run LINENO
1928 # ----------------------
1929 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1930 # that executables *can* be run.
1931 ac_fn_c_try_run ()
1932 {
1933   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934   if { { ac_try="$ac_link"
1935 case "(($ac_try" in
1936   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1937   *) ac_try_echo=$ac_try;;
1938 esac
1939 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1940 $as_echo "$ac_try_echo"; } >&5
1941   (eval "$ac_link") 2>&5
1942   ac_status=$?
1943   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1944   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1945   { { case "(($ac_try" in
1946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1947   *) ac_try_echo=$ac_try;;
1948 esac
1949 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1950 $as_echo "$ac_try_echo"; } >&5
1951   (eval "$ac_try") 2>&5
1952   ac_status=$?
1953   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1954   test $ac_status = 0; }; }; then :
1955   ac_retval=0
1956 else
1957   $as_echo "$as_me: program exited with status $ac_status" >&5
1958        $as_echo "$as_me: failed program was:" >&5
1959 sed 's/^/| /' conftest.$ac_ext >&5
1960
1961        ac_retval=$ac_status
1962 fi
1963   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1964   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1965   as_fn_set_status $ac_retval
1966
1967 } # ac_fn_c_try_run
1968
1969 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1970 # -------------------------------------------------------
1971 # Tests whether HEADER exists and can be compiled using the include files in
1972 # INCLUDES, setting the cache variable VAR accordingly.
1973 ac_fn_c_check_header_compile ()
1974 {
1975   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1977 $as_echo_n "checking for $2... " >&6; }
1978 if eval \${$3+:} false; then :
1979   $as_echo_n "(cached) " >&6
1980 else
1981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982 /* end confdefs.h.  */
1983 $4
1984 #include <$2>
1985 _ACEOF
1986 if ac_fn_c_try_compile "$LINENO"; then :
1987   eval "$3=yes"
1988 else
1989   eval "$3=no"
1990 fi
1991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1992 fi
1993 eval ac_res=\$$3
1994                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1995 $as_echo "$ac_res" >&6; }
1996   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1997
1998 } # ac_fn_c_check_header_compile
1999
2000 # ac_fn_c_check_func LINENO FUNC VAR
2001 # ----------------------------------
2002 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2003 ac_fn_c_check_func ()
2004 {
2005   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2007 $as_echo_n "checking for $2... " >&6; }
2008 if eval \${$3+:} false; then :
2009   $as_echo_n "(cached) " >&6
2010 else
2011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012 /* end confdefs.h.  */
2013 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2014    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2015 #define $2 innocuous_$2
2016
2017 /* System header to define __stub macros and hopefully few prototypes,
2018     which can conflict with char $2 (); below.
2019     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2020     <limits.h> exists even on freestanding compilers.  */
2021
2022 #ifdef __STDC__
2023 # include <limits.h>
2024 #else
2025 # include <assert.h>
2026 #endif
2027
2028 #undef $2
2029
2030 /* Override any GCC internal prototype to avoid an error.
2031    Use char because int might match the return type of a GCC
2032    builtin and then its argument prototype would still apply.  */
2033 #ifdef __cplusplus
2034 extern "C"
2035 #endif
2036 char $2 ();
2037 /* The GNU C library defines this for functions which it implements
2038     to always fail with ENOSYS.  Some functions are actually named
2039     something starting with __ and the normal name is an alias.  */
2040 #if defined __stub_$2 || defined __stub___$2
2041 choke me
2042 #endif
2043
2044 int
2045 main ()
2046 {
2047 return $2 ();
2048   ;
2049   return 0;
2050 }
2051 _ACEOF
2052 if ac_fn_c_try_link "$LINENO"; then :
2053   eval "$3=yes"
2054 else
2055   eval "$3=no"
2056 fi
2057 rm -f core conftest.err conftest.$ac_objext \
2058     conftest$ac_exeext conftest.$ac_ext
2059 fi
2060 eval ac_res=\$$3
2061                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2062 $as_echo "$ac_res" >&6; }
2063   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2064
2065 } # ac_fn_c_check_func
2066
2067 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2068 # -------------------------------------------
2069 # Tests whether TYPE exists after having included INCLUDES, setting cache
2070 # variable VAR accordingly.
2071 ac_fn_c_check_type ()
2072 {
2073   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2074   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2075 $as_echo_n "checking for $2... " >&6; }
2076 if eval \${$3+:} false; then :
2077   $as_echo_n "(cached) " >&6
2078 else
2079   eval "$3=no"
2080   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081 /* end confdefs.h.  */
2082 $4
2083 int
2084 main ()
2085 {
2086 if (sizeof ($2))
2087          return 0;
2088   ;
2089   return 0;
2090 }
2091 _ACEOF
2092 if ac_fn_c_try_compile "$LINENO"; then :
2093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094 /* end confdefs.h.  */
2095 $4
2096 int
2097 main ()
2098 {
2099 if (sizeof (($2)))
2100             return 0;
2101   ;
2102   return 0;
2103 }
2104 _ACEOF
2105 if ac_fn_c_try_compile "$LINENO"; then :
2106
2107 else
2108   eval "$3=yes"
2109 fi
2110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111 fi
2112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113 fi
2114 eval ac_res=\$$3
2115                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2116 $as_echo "$ac_res" >&6; }
2117   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2118
2119 } # ac_fn_c_check_type
2120
2121 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2122 # ----------------------------------------------------
2123 # Tries to find if the field MEMBER exists in type AGGR, after including
2124 # INCLUDES, setting cache variable VAR accordingly.
2125 ac_fn_c_check_member ()
2126 {
2127   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2128   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2129 $as_echo_n "checking for $2.$3... " >&6; }
2130 if eval \${$4+:} false; then :
2131   $as_echo_n "(cached) " >&6
2132 else
2133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2134 /* end confdefs.h.  */
2135 $5
2136 int
2137 main ()
2138 {
2139 static $2 ac_aggr;
2140 if (ac_aggr.$3)
2141 return 0;
2142   ;
2143   return 0;
2144 }
2145 _ACEOF
2146 if ac_fn_c_try_compile "$LINENO"; then :
2147   eval "$4=yes"
2148 else
2149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150 /* end confdefs.h.  */
2151 $5
2152 int
2153 main ()
2154 {
2155 static $2 ac_aggr;
2156 if (sizeof ac_aggr.$3)
2157 return 0;
2158   ;
2159   return 0;
2160 }
2161 _ACEOF
2162 if ac_fn_c_try_compile "$LINENO"; then :
2163   eval "$4=yes"
2164 else
2165   eval "$4=no"
2166 fi
2167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2168 fi
2169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170 fi
2171 eval ac_res=\$$4
2172                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2173 $as_echo "$ac_res" >&6; }
2174   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2175
2176 } # ac_fn_c_check_member
2177
2178 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2179 # --------------------------------------------
2180 # Tries to find the compile-time value of EXPR in a program that includes
2181 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2182 # computed
2183 ac_fn_c_compute_int ()
2184 {
2185   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186   if test "$cross_compiling" = yes; then
2187     # Depending upon the size, compute the lo and hi bounds.
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189 /* end confdefs.h.  */
2190 $4
2191 int
2192 main ()
2193 {
2194 static int test_array [1 - 2 * !(($2) >= 0)];
2195 test_array [0] = 0;
2196 return test_array [0];
2197
2198   ;
2199   return 0;
2200 }
2201 _ACEOF
2202 if ac_fn_c_try_compile "$LINENO"; then :
2203   ac_lo=0 ac_mid=0
2204   while :; do
2205     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2206 /* end confdefs.h.  */
2207 $4
2208 int
2209 main ()
2210 {
2211 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2212 test_array [0] = 0;
2213 return test_array [0];
2214
2215   ;
2216   return 0;
2217 }
2218 _ACEOF
2219 if ac_fn_c_try_compile "$LINENO"; then :
2220   ac_hi=$ac_mid; break
2221 else
2222   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2223                         if test $ac_lo -le $ac_mid; then
2224                           ac_lo= ac_hi=
2225                           break
2226                         fi
2227                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2228 fi
2229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2230   done
2231 else
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_hi=-1 ac_mid=-1
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_lo=$ac_mid; break
2265 else
2266   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2267                         if test $ac_mid -le $ac_hi; then
2268                           ac_lo= ac_hi=
2269                           break
2270                         fi
2271                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2272 fi
2273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2274   done
2275 else
2276   ac_lo= ac_hi=
2277 fi
2278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279 fi
2280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281 # Binary search between lo and hi bounds.
2282 while test "x$ac_lo" != "x$ac_hi"; do
2283   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285 /* end confdefs.h.  */
2286 $4
2287 int
2288 main ()
2289 {
2290 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2291 test_array [0] = 0;
2292 return test_array [0];
2293
2294   ;
2295   return 0;
2296 }
2297 _ACEOF
2298 if ac_fn_c_try_compile "$LINENO"; then :
2299   ac_hi=$ac_mid
2300 else
2301   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2302 fi
2303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304 done
2305 case $ac_lo in #((
2306 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2307 '') ac_retval=1 ;;
2308 esac
2309   else
2310     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311 /* end confdefs.h.  */
2312 $4
2313 static long int longval () { return $2; }
2314 static unsigned long int ulongval () { return $2; }
2315 #include <stdio.h>
2316 #include <stdlib.h>
2317 int
2318 main ()
2319 {
2320
2321   FILE *f = fopen ("conftest.val", "w");
2322   if (! f)
2323     return 1;
2324   if (($2) < 0)
2325     {
2326       long int i = longval ();
2327       if (i != ($2))
2328         return 1;
2329       fprintf (f, "%ld", i);
2330     }
2331   else
2332     {
2333       unsigned long int i = ulongval ();
2334       if (i != ($2))
2335         return 1;
2336       fprintf (f, "%lu", i);
2337     }
2338   /* Do not output a trailing newline, as this causes \r\n confusion
2339      on some platforms.  */
2340   return ferror (f) || fclose (f) != 0;
2341
2342   ;
2343   return 0;
2344 }
2345 _ACEOF
2346 if ac_fn_c_try_run "$LINENO"; then :
2347   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2348 else
2349   ac_retval=1
2350 fi
2351 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2352   conftest.$ac_objext conftest.beam conftest.$ac_ext
2353 rm -f conftest.val
2354
2355   fi
2356   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2357   as_fn_set_status $ac_retval
2358
2359 } # ac_fn_c_compute_int
2360
2361 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2362 # ---------------------------------------------
2363 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2364 # accordingly.
2365 ac_fn_c_check_decl ()
2366 {
2367   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368   # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2369       as_decl_name=`echo $2|sed 's/ *(.*//'`
2370   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2371   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2372 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2373 if eval \${$3+:} false; then :
2374   $as_echo_n "(cached) " >&6
2375 else
2376   ac_save_werror_flag=$ac_c_werror_flag
2377   ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2378   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379 /* end confdefs.h.  */
2380 $4
2381 int
2382 main ()
2383 {
2384 #ifndef $as_decl_name
2385 #ifdef __cplusplus
2386   (void) $as_decl_use;
2387 #else
2388   (void) $as_decl_name;
2389 #endif
2390 #endif
2391
2392   ;
2393   return 0;
2394 }
2395 _ACEOF
2396 if ac_fn_c_try_compile "$LINENO"; then :
2397   eval "$3=yes"
2398 else
2399   eval "$3=no"
2400 fi
2401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2402   ac_c_werror_flag=$ac_save_werror_flag
2403 fi
2404 eval ac_res=\$$3
2405                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406 $as_echo "$ac_res" >&6; }
2407   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2408
2409 } # ac_fn_c_check_decl
2410 cat >config.log <<_ACEOF
2411 This file contains any messages produced by compilers while
2412 running configure, to aid debugging if configure makes a mistake.
2413
2414 It was created by PostgreSQL $as_me 11.5, which was
2415 generated by GNU Autoconf 2.69.  Invocation command line was
2416
2417   $ $0 $@
2418
2419 _ACEOF
2420 exec 5>>config.log
2421 {
2422 cat <<_ASUNAME
2423 ## --------- ##
2424 ## Platform. ##
2425 ## --------- ##
2426
2427 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2428 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2429 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2430 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2431 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2432
2433 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2434 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2435
2436 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2437 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2438 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2439 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2440 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2441 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2442 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2443
2444 _ASUNAME
2445
2446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2447 for as_dir in $PATH
2448 do
2449   IFS=$as_save_IFS
2450   test -z "$as_dir" && as_dir=.
2451     $as_echo "PATH: $as_dir"
2452   done
2453 IFS=$as_save_IFS
2454
2455 } >&5
2456
2457 cat >&5 <<_ACEOF
2458
2459
2460 ## ----------- ##
2461 ## Core tests. ##
2462 ## ----------- ##
2463
2464 _ACEOF
2465
2466
2467 # Keep a trace of the command line.
2468 # Strip out --no-create and --no-recursion so they do not pile up.
2469 # Strip out --silent because we don't want to record it for future runs.
2470 # Also quote any args containing shell meta-characters.
2471 # Make two passes to allow for proper duplicate-argument suppression.
2472 ac_configure_args=
2473 ac_configure_args0=
2474 ac_configure_args1=
2475 ac_must_keep_next=false
2476 for ac_pass in 1 2
2477 do
2478   for ac_arg
2479   do
2480     case $ac_arg in
2481     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2482     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2483     | -silent | --silent | --silen | --sile | --sil)
2484       continue ;;
2485     *\'*)
2486       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2487     esac
2488     case $ac_pass in
2489     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2490     2)
2491       as_fn_append ac_configure_args1 " '$ac_arg'"
2492       if test $ac_must_keep_next = true; then
2493         ac_must_keep_next=false # Got value, back to normal.
2494       else
2495         case $ac_arg in
2496           *=* | --config-cache | -C | -disable-* | --disable-* \
2497           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2498           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2499           | -with-* | --with-* | -without-* | --without-* | --x)
2500             case "$ac_configure_args0 " in
2501               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2502             esac
2503             ;;
2504           -* ) ac_must_keep_next=true ;;
2505         esac
2506       fi
2507       as_fn_append ac_configure_args " '$ac_arg'"
2508       ;;
2509     esac
2510   done
2511 done
2512 { ac_configure_args0=; unset ac_configure_args0;}
2513 { ac_configure_args1=; unset ac_configure_args1;}
2514
2515 # When interrupted or exit'd, cleanup temporary files, and complete
2516 # config.log.  We remove comments because anyway the quotes in there
2517 # would cause problems or look ugly.
2518 # WARNING: Use '\'' to represent an apostrophe within the trap.
2519 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2520 trap 'exit_status=$?
2521   # Save into config.log some information that might help in debugging.
2522   {
2523     echo
2524
2525     $as_echo "## ---------------- ##
2526 ## Cache variables. ##
2527 ## ---------------- ##"
2528     echo
2529     # The following way of writing the cache mishandles newlines in values,
2530 (
2531   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2532     eval ac_val=\$$ac_var
2533     case $ac_val in #(
2534     *${as_nl}*)
2535       case $ac_var in #(
2536       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2537 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2538       esac
2539       case $ac_var in #(
2540       _ | IFS | as_nl) ;; #(
2541       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2542       *) { eval $ac_var=; unset $ac_var;} ;;
2543       esac ;;
2544     esac
2545   done
2546   (set) 2>&1 |
2547     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2548     *${as_nl}ac_space=\ *)
2549       sed -n \
2550         "s/'\''/'\''\\\\'\'''\''/g;
2551           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2552       ;; #(
2553     *)
2554       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2555       ;;
2556     esac |
2557     sort
2558 )
2559     echo
2560
2561     $as_echo "## ----------------- ##
2562 ## Output variables. ##
2563 ## ----------------- ##"
2564     echo
2565     for ac_var in $ac_subst_vars
2566     do
2567       eval ac_val=\$$ac_var
2568       case $ac_val in
2569       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2570       esac
2571       $as_echo "$ac_var='\''$ac_val'\''"
2572     done | sort
2573     echo
2574
2575     if test -n "$ac_subst_files"; then
2576       $as_echo "## ------------------- ##
2577 ## File substitutions. ##
2578 ## ------------------- ##"
2579       echo
2580       for ac_var in $ac_subst_files
2581       do
2582         eval ac_val=\$$ac_var
2583         case $ac_val in
2584         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2585         esac
2586         $as_echo "$ac_var='\''$ac_val'\''"
2587       done | sort
2588       echo
2589     fi
2590
2591     if test -s confdefs.h; then
2592       $as_echo "## ----------- ##
2593 ## confdefs.h. ##
2594 ## ----------- ##"
2595       echo
2596       cat confdefs.h
2597       echo
2598     fi
2599     test "$ac_signal" != 0 &&
2600       $as_echo "$as_me: caught signal $ac_signal"
2601     $as_echo "$as_me: exit $exit_status"
2602   } >&5
2603   rm -f core *.core core.conftest.* &&
2604     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2605     exit $exit_status
2606 ' 0
2607 for ac_signal in 1 2 13 15; do
2608   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2609 done
2610 ac_signal=0
2611
2612 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2613 rm -f -r conftest* confdefs.h
2614
2615 $as_echo "/* confdefs.h */" > confdefs.h
2616
2617 # Predefined preprocessor variables.
2618
2619 cat >>confdefs.h <<_ACEOF
2620 #define PACKAGE_NAME "$PACKAGE_NAME"
2621 _ACEOF
2622
2623 cat >>confdefs.h <<_ACEOF
2624 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2625 _ACEOF
2626
2627 cat >>confdefs.h <<_ACEOF
2628 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2629 _ACEOF
2630
2631 cat >>confdefs.h <<_ACEOF
2632 #define PACKAGE_STRING "$PACKAGE_STRING"
2633 _ACEOF
2634
2635 cat >>confdefs.h <<_ACEOF
2636 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2637 _ACEOF
2638
2639 cat >>confdefs.h <<_ACEOF
2640 #define PACKAGE_URL "$PACKAGE_URL"
2641 _ACEOF
2642
2643
2644 # Let the site file select an alternate cache file if it wants to.
2645 # Prefer an explicitly selected file to automatically selected ones.
2646 ac_site_file1=NONE
2647 ac_site_file2=NONE
2648 if test -n "$CONFIG_SITE"; then
2649   # We do not want a PATH search for config.site.
2650   case $CONFIG_SITE in #((
2651     -*)  ac_site_file1=./$CONFIG_SITE;;
2652     */*) ac_site_file1=$CONFIG_SITE;;
2653     *)   ac_site_file1=./$CONFIG_SITE;;
2654   esac
2655 elif test "x$prefix" != xNONE; then
2656   ac_site_file1=$prefix/share/config.site
2657   ac_site_file2=$prefix/etc/config.site
2658 else
2659   ac_site_file1=$ac_default_prefix/share/config.site
2660   ac_site_file2=$ac_default_prefix/etc/config.site
2661 fi
2662 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2663 do
2664   test "x$ac_site_file" = xNONE && continue
2665   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2666     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2667 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2668     sed 's/^/| /' "$ac_site_file" >&5
2669     . "$ac_site_file" \
2670       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672 as_fn_error $? "failed to load site script $ac_site_file
2673 See \`config.log' for more details" "$LINENO" 5; }
2674   fi
2675 done
2676
2677 if test -r "$cache_file"; then
2678   # Some versions of bash will fail to source /dev/null (special files
2679   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2680   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2681     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2682 $as_echo "$as_me: loading cache $cache_file" >&6;}
2683     case $cache_file in
2684       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2685       *)                      . "./$cache_file";;
2686     esac
2687   fi
2688 else
2689   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2690 $as_echo "$as_me: creating cache $cache_file" >&6;}
2691   >$cache_file
2692 fi
2693
2694 # Check that the precious variables saved in the cache have kept the same
2695 # value.
2696 ac_cache_corrupted=false
2697 for ac_var in $ac_precious_vars; do
2698   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2699   eval ac_new_set=\$ac_env_${ac_var}_set
2700   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2701   eval ac_new_val=\$ac_env_${ac_var}_value
2702   case $ac_old_set,$ac_new_set in
2703     set,)
2704       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2705 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2706       ac_cache_corrupted=: ;;
2707     ,set)
2708       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2709 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2710       ac_cache_corrupted=: ;;
2711     ,);;
2712     *)
2713       if test "x$ac_old_val" != "x$ac_new_val"; then
2714         # differences in whitespace do not lead to failure.
2715         ac_old_val_w=`echo x $ac_old_val`
2716         ac_new_val_w=`echo x $ac_new_val`
2717         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2718           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2719 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2720           ac_cache_corrupted=:
2721         else
2722           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2723 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2724           eval $ac_var=\$ac_old_val
2725         fi
2726         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2727 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2728         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2729 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2730       fi;;
2731   esac
2732   # Pass precious variables to config.status.
2733   if test "$ac_new_set" = set; then
2734     case $ac_new_val in
2735     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2736     *) ac_arg=$ac_var=$ac_new_val ;;
2737     esac
2738     case " $ac_configure_args " in
2739       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2740       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2741     esac
2742   fi
2743 done
2744 if $ac_cache_corrupted; then
2745   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2746 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2747   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2748 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2749   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2750 fi
2751 ## -------------------- ##
2752 ## Main body of script. ##
2753 ## -------------------- ##
2754
2755 ac_ext=c
2756 ac_cpp='$CPP $CPPFLAGS'
2757 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2758 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2759 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2760
2761
2762
2763
2764
2765
2766 ac_aux_dir=
2767 for ac_dir in config "$srcdir"/config; do
2768   if test -f "$ac_dir/install-sh"; then
2769     ac_aux_dir=$ac_dir
2770     ac_install_sh="$ac_aux_dir/install-sh -c"
2771     break
2772   elif test -f "$ac_dir/install.sh"; then
2773     ac_aux_dir=$ac_dir
2774     ac_install_sh="$ac_aux_dir/install.sh -c"
2775     break
2776   elif test -f "$ac_dir/shtool"; then
2777     ac_aux_dir=$ac_dir
2778     ac_install_sh="$ac_aux_dir/shtool install -c"
2779     break
2780   fi
2781 done
2782 if test -z "$ac_aux_dir"; then
2783   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2784 fi
2785
2786 # These three variables are undocumented and unsupported,
2787 # and are intended to be withdrawn in a future Autoconf release.
2788 # They can cause serious problems if a builder's source tree is in a directory
2789 # whose full name contains unusual characters.
2790 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2791 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2792 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2793
2794
2795
2796 configure_args=$ac_configure_args
2797
2798
2799 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2800
2801
2802 cat >>confdefs.h <<_ACEOF
2803 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2804 _ACEOF
2805
2806
2807
2808
2809
2810 # Check whether --with-extra-version was given.
2811 if test "${with_extra_version+set}" = set; then :
2812   withval=$with_extra_version;
2813   case $withval in
2814     yes)
2815       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2816       ;;
2817     no)
2818       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2819       ;;
2820     *)
2821       PG_VERSION="$PACKAGE_VERSION$withval"
2822       ;;
2823   esac
2824
2825 else
2826   PG_VERSION="$PACKAGE_VERSION"
2827 fi
2828
2829
2830
2831 cat >>confdefs.h <<_ACEOF
2832 #define PG_VERSION "$PG_VERSION"
2833 _ACEOF
2834
2835
2836 # Make sure we can run config.sub.
2837 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2838   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2839
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2841 $as_echo_n "checking build system type... " >&6; }
2842 if ${ac_cv_build+:} false; then :
2843   $as_echo_n "(cached) " >&6
2844 else
2845   ac_build_alias=$build_alias
2846 test "x$ac_build_alias" = x &&
2847   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2848 test "x$ac_build_alias" = x &&
2849   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2850 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2851   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2852
2853 fi
2854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2855 $as_echo "$ac_cv_build" >&6; }
2856 case $ac_cv_build in
2857 *-*-*) ;;
2858 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2859 esac
2860 build=$ac_cv_build
2861 ac_save_IFS=$IFS; IFS='-'
2862 set x $ac_cv_build
2863 shift
2864 build_cpu=$1
2865 build_vendor=$2
2866 shift; shift
2867 # Remember, the first character of IFS is used to create $*,
2868 # except with old shells:
2869 build_os=$*
2870 IFS=$ac_save_IFS
2871 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2872
2873
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2875 $as_echo_n "checking host system type... " >&6; }
2876 if ${ac_cv_host+:} false; then :
2877   $as_echo_n "(cached) " >&6
2878 else
2879   if test "x$host_alias" = x; then
2880   ac_cv_host=$ac_cv_build
2881 else
2882   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2883     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2884 fi
2885
2886 fi
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2888 $as_echo "$ac_cv_host" >&6; }
2889 case $ac_cv_host in
2890 *-*-*) ;;
2891 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2892 esac
2893 host=$ac_cv_host
2894 ac_save_IFS=$IFS; IFS='-'
2895 set x $ac_cv_host
2896 shift
2897 host_cpu=$1
2898 host_vendor=$2
2899 shift; shift
2900 # Remember, the first character of IFS is used to create $*,
2901 # except with old shells:
2902 host_os=$*
2903 IFS=$ac_save_IFS
2904 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2905
2906
2907
2908 template=
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2910 $as_echo_n "checking which template to use... " >&6; }
2911
2912
2913
2914
2915 # Check whether --with-template was given.
2916 if test "${with_template+set}" = set; then :
2917   withval=$with_template;
2918   case $withval in
2919     yes)
2920       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2921       ;;
2922     no)
2923       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2924       ;;
2925     *)
2926
2927   case $withval in
2928     list)   echo; ls "$srcdir/src/template"; exit;;
2929     *)      if test -f "$srcdir/src/template/$with_template" ; then
2930               template=$withval
2931             else
2932               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2933             fi;;
2934   esac
2935
2936       ;;
2937   esac
2938
2939 else
2940
2941 # --with-template not given
2942
2943 case $host_os in
2944      aix*) template=aix ;;
2945   cygwin*) template=cygwin ;;
2946   darwin*) template=darwin ;;
2947 dragonfly*) template=netbsd ;;
2948  freebsd*) template=freebsd ;;
2949     hpux*) template=hpux ;;
2950  linux*|gnu*|k*bsd*-gnu)
2951            template=linux ;;
2952    mingw*) template=win32 ;;
2953   netbsd*) template=netbsd ;;
2954  openbsd*) template=openbsd ;;
2955  solaris*) template=solaris ;;
2956 esac
2957
2958   if test x"$template" = x"" ; then
2959     as_fn_error $? "
2960 *******************************************************************
2961 PostgreSQL has apparently not been ported to your platform yet.
2962 To try a manual configuration, look into the src/template directory
2963 for a similar platform and use the '--with-template=' option.
2964
2965 Please also contact <pgsql-bugs@postgresql.org> to see about
2966 rectifying this.  Include the above 'checking host system type...'
2967 line.
2968 *******************************************************************
2969 " "$LINENO" 5
2970   fi
2971
2972
2973 fi
2974
2975
2976
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2978 $as_echo "$template" >&6; }
2979
2980 PORTNAME=$template
2981
2982
2983 # Initialize default assumption that we do not need separate assembly code
2984 # for TAS (test-and-set).  This can be overridden by the template file
2985 # when it's executed.
2986 need_tas=no
2987 tas_file=dummy.s
2988
2989
2990
2991 ##
2992 ## Command line options
2993 ##
2994
2995 #
2996 # Add non-standard directories to the include path
2997 #
2998
2999
3000
3001 # Check whether --with-includes was given.
3002 if test "${with_includes+set}" = set; then :
3003   withval=$with_includes;
3004   case $withval in
3005     yes)
3006       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3007       ;;
3008     no)
3009       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3010       ;;
3011     *)
3012
3013       ;;
3014   esac
3015
3016 fi
3017
3018
3019
3020
3021 #
3022 # Add non-standard directories to the library search path
3023 #
3024
3025
3026
3027 # Check whether --with-libraries was given.
3028 if test "${with_libraries+set}" = set; then :
3029   withval=$with_libraries;
3030   case $withval in
3031     yes)
3032       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3033       ;;
3034     no)
3035       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3036       ;;
3037     *)
3038       LIBRARY_DIRS=$withval
3039       ;;
3040   esac
3041
3042 fi
3043
3044
3045
3046
3047
3048
3049 # Check whether --with-libs was given.
3050 if test "${with_libs+set}" = set; then :
3051   withval=$with_libs;
3052   case $withval in
3053     yes)
3054       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3055       ;;
3056     no)
3057       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3058       ;;
3059     *)
3060       LIBRARY_DIRS=$withval
3061       ;;
3062   esac
3063
3064 fi
3065
3066
3067
3068
3069 #
3070 # 64-bit integer date/time storage is now the only option, but to avoid
3071 # unnecessary breakage of build scripts, continue to accept an explicit
3072 # "--enable-integer-datetimes" switch.
3073 #
3074
3075
3076 # Check whether --enable-integer-datetimes was given.
3077 if test "${enable_integer_datetimes+set}" = set; then :
3078   enableval=$enable_integer_datetimes;
3079   case $enableval in
3080     yes)
3081       :
3082       ;;
3083     no)
3084       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3085       ;;
3086     *)
3087       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3088       ;;
3089   esac
3090
3091 else
3092   enable_integer_datetimes=yes
3093
3094 fi
3095
3096
3097
3098
3099 #
3100 # NLS
3101 #
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3103 $as_echo_n "checking whether NLS is wanted... " >&6; }
3104
3105
3106 # Check whether --enable-nls was given.
3107 if test "${enable_nls+set}" = set; then :
3108   enableval=$enable_nls;
3109   case $enableval in
3110     yes)
3111       :
3112       ;;
3113     no)
3114       :
3115       ;;
3116     *)
3117       enable_nls=yes
3118 WANTED_LANGUAGES=$enableval
3119       ;;
3120   esac
3121
3122 else
3123   enable_nls=no
3124 fi
3125
3126
3127
3128 if test "$enable_nls" = yes; then
3129
3130 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3131
3132 fi
3133
3134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3135 $as_echo "$enable_nls" >&6; }
3136
3137
3138
3139 #
3140 # Default port number (--with-pgport), default 5432
3141 #
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3143 $as_echo_n "checking for default port number... " >&6; }
3144
3145
3146
3147 # Check whether --with-pgport was given.
3148 if test "${with_pgport+set}" = set; then :
3149   withval=$with_pgport;
3150   case $withval in
3151     yes)
3152       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3153       ;;
3154     no)
3155       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3156       ;;
3157     *)
3158       default_port=$withval
3159       ;;
3160   esac
3161
3162 else
3163   default_port=5432
3164 fi
3165
3166
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3168 $as_echo "$default_port" >&6; }
3169 # Need both of these because some places want an integer and some a string
3170
3171 cat >>confdefs.h <<_ACEOF
3172 #define DEF_PGPORT ${default_port}
3173 _ACEOF
3174
3175
3176 cat >>confdefs.h <<_ACEOF
3177 #define DEF_PGPORT_STR "${default_port}"
3178 _ACEOF
3179
3180
3181
3182 # It's worth validating port; you can get very confusing errors otherwise
3183 if test x"$default_port" = x""; then
3184   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3185 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3186   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3187 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3188   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3189 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3190   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3191 fi
3192
3193 #
3194 # '-rpath'-like feature can be disabled
3195 #
3196
3197
3198 # Check whether --enable-rpath was given.
3199 if test "${enable_rpath+set}" = set; then :
3200   enableval=$enable_rpath;
3201   case $enableval in
3202     yes)
3203       :
3204       ;;
3205     no)
3206       :
3207       ;;
3208     *)
3209       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3210       ;;
3211   esac
3212
3213 else
3214   enable_rpath=yes
3215
3216 fi
3217
3218
3219
3220
3221 #
3222 # Spinlocks
3223 #
3224
3225
3226 # Check whether --enable-spinlocks was given.
3227 if test "${enable_spinlocks+set}" = set; then :
3228   enableval=$enable_spinlocks;
3229   case $enableval in
3230     yes)
3231       :
3232       ;;
3233     no)
3234       :
3235       ;;
3236     *)
3237       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3238       ;;
3239   esac
3240
3241 else
3242   enable_spinlocks=yes
3243
3244 fi
3245
3246
3247
3248 #
3249 # Atomic operations
3250 #
3251
3252
3253 # Check whether --enable-atomics was given.
3254 if test "${enable_atomics+set}" = set; then :
3255   enableval=$enable_atomics;
3256   case $enableval in
3257     yes)
3258       :
3259       ;;
3260     no)
3261       :
3262       ;;
3263     *)
3264       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3265       ;;
3266   esac
3267
3268 else
3269   enable_atomics=yes
3270
3271 fi
3272
3273
3274
3275 #
3276 # Random number generation
3277 #
3278
3279
3280 # Check whether --enable-strong-random was given.
3281 if test "${enable_strong_random+set}" = set; then :
3282   enableval=$enable_strong_random;
3283   case $enableval in
3284     yes)
3285       :
3286       ;;
3287     no)
3288       :
3289       ;;
3290     *)
3291       as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3292       ;;
3293   esac
3294
3295 else
3296   enable_strong_random=yes
3297
3298 fi
3299
3300
3301
3302
3303 #
3304 # --enable-debug adds -g to compiler flags
3305 #
3306
3307
3308 # Check whether --enable-debug was given.
3309 if test "${enable_debug+set}" = set; then :
3310   enableval=$enable_debug;
3311   case $enableval in
3312     yes)
3313       :
3314       ;;
3315     no)
3316       :
3317       ;;
3318     *)
3319       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3320       ;;
3321   esac
3322
3323 else
3324   enable_debug=no
3325
3326 fi
3327
3328
3329
3330
3331 #
3332 # --enable-profiling enables gcc profiling
3333 #
3334
3335
3336 # Check whether --enable-profiling was given.
3337 if test "${enable_profiling+set}" = set; then :
3338   enableval=$enable_profiling;
3339   case $enableval in
3340     yes)
3341       :
3342       ;;
3343     no)
3344       :
3345       ;;
3346     *)
3347       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3348       ;;
3349   esac
3350
3351 else
3352   enable_profiling=no
3353
3354 fi
3355
3356
3357
3358 #
3359 # --enable-coverage enables generation of code coverage metrics with gcov
3360 #
3361
3362
3363 # Check whether --enable-coverage was given.
3364 if test "${enable_coverage+set}" = set; then :
3365   enableval=$enable_coverage;
3366   case $enableval in
3367     yes)
3368       if test -z "$GCOV"; then
3369   for ac_prog in gcov
3370 do
3371   # Extract the first word of "$ac_prog", so it can be a program name with args.
3372 set dummy $ac_prog; ac_word=$2
3373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3374 $as_echo_n "checking for $ac_word... " >&6; }
3375 if ${ac_cv_path_GCOV+:} false; then :
3376   $as_echo_n "(cached) " >&6
3377 else
3378   case $GCOV in
3379   [\\/]* | ?:[\\/]*)
3380   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3381   ;;
3382   *)
3383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3384 for as_dir in $PATH
3385 do
3386   IFS=$as_save_IFS
3387   test -z "$as_dir" && as_dir=.
3388     for ac_exec_ext in '' $ac_executable_extensions; do
3389   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3390     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3392     break 2
3393   fi
3394 done
3395   done
3396 IFS=$as_save_IFS
3397
3398   ;;
3399 esac
3400 fi
3401 GCOV=$ac_cv_path_GCOV
3402 if test -n "$GCOV"; then
3403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3404 $as_echo "$GCOV" >&6; }
3405 else
3406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3407 $as_echo "no" >&6; }
3408 fi
3409
3410
3411   test -n "$GCOV" && break
3412 done
3413
3414 else
3415   # Report the value of GCOV in configure's output in all cases.
3416   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3417 $as_echo_n "checking for GCOV... " >&6; }
3418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3419 $as_echo "$GCOV" >&6; }
3420 fi
3421
3422 if test -z "$GCOV"; then
3423   as_fn_error $? "gcov not found" "$LINENO" 5
3424 fi
3425 if test -z "$LCOV"; then
3426   for ac_prog in lcov
3427 do
3428   # Extract the first word of "$ac_prog", so it can be a program name with args.
3429 set dummy $ac_prog; ac_word=$2
3430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3431 $as_echo_n "checking for $ac_word... " >&6; }
3432 if ${ac_cv_path_LCOV+:} false; then :
3433   $as_echo_n "(cached) " >&6
3434 else
3435   case $LCOV in
3436   [\\/]* | ?:[\\/]*)
3437   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3438   ;;
3439   *)
3440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3441 for as_dir in $PATH
3442 do
3443   IFS=$as_save_IFS
3444   test -z "$as_dir" && as_dir=.
3445     for ac_exec_ext in '' $ac_executable_extensions; do
3446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3447     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3449     break 2
3450   fi
3451 done
3452   done
3453 IFS=$as_save_IFS
3454
3455   ;;
3456 esac
3457 fi
3458 LCOV=$ac_cv_path_LCOV
3459 if test -n "$LCOV"; then
3460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3461 $as_echo "$LCOV" >&6; }
3462 else
3463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3464 $as_echo "no" >&6; }
3465 fi
3466
3467
3468   test -n "$LCOV" && break
3469 done
3470
3471 else
3472   # Report the value of LCOV in configure's output in all cases.
3473   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3474 $as_echo_n "checking for LCOV... " >&6; }
3475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3476 $as_echo "$LCOV" >&6; }
3477 fi
3478
3479 if test -z "$LCOV"; then
3480   as_fn_error $? "lcov not found" "$LINENO" 5
3481 fi
3482 if test -z "$GENHTML"; then
3483   for ac_prog in genhtml
3484 do
3485   # Extract the first word of "$ac_prog", so it can be a program name with args.
3486 set dummy $ac_prog; ac_word=$2
3487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3488 $as_echo_n "checking for $ac_word... " >&6; }
3489 if ${ac_cv_path_GENHTML+:} false; then :
3490   $as_echo_n "(cached) " >&6
3491 else
3492   case $GENHTML in
3493   [\\/]* | ?:[\\/]*)
3494   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3495   ;;
3496   *)
3497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3498 for as_dir in $PATH
3499 do
3500   IFS=$as_save_IFS
3501   test -z "$as_dir" && as_dir=.
3502     for ac_exec_ext in '' $ac_executable_extensions; do
3503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3504     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3506     break 2
3507   fi
3508 done
3509   done
3510 IFS=$as_save_IFS
3511
3512   ;;
3513 esac
3514 fi
3515 GENHTML=$ac_cv_path_GENHTML
3516 if test -n "$GENHTML"; then
3517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3518 $as_echo "$GENHTML" >&6; }
3519 else
3520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3521 $as_echo "no" >&6; }
3522 fi
3523
3524
3525   test -n "$GENHTML" && break
3526 done
3527
3528 else
3529   # Report the value of GENHTML in configure's output in all cases.
3530   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3531 $as_echo_n "checking for GENHTML... " >&6; }
3532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3533 $as_echo "$GENHTML" >&6; }
3534 fi
3535
3536 if test -z "$GENHTML"; then
3537   as_fn_error $? "genhtml not found" "$LINENO" 5
3538 fi
3539       ;;
3540     no)
3541       :
3542       ;;
3543     *)
3544       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3545       ;;
3546   esac
3547
3548 else
3549   enable_coverage=no
3550
3551 fi
3552
3553
3554
3555
3556 #
3557 # DTrace
3558 #
3559
3560
3561 # Check whether --enable-dtrace was given.
3562 if test "${enable_dtrace+set}" = set; then :
3563   enableval=$enable_dtrace;
3564   case $enableval in
3565     yes)
3566       if test -z "$DTRACE"; then
3567   for ac_prog in dtrace
3568 do
3569   # Extract the first word of "$ac_prog", so it can be a program name with args.
3570 set dummy $ac_prog; ac_word=$2
3571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3572 $as_echo_n "checking for $ac_word... " >&6; }
3573 if ${ac_cv_path_DTRACE+:} false; then :
3574   $as_echo_n "(cached) " >&6
3575 else
3576   case $DTRACE in
3577   [\\/]* | ?:[\\/]*)
3578   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3579   ;;
3580   *)
3581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3582 for as_dir in $PATH
3583 do
3584   IFS=$as_save_IFS
3585   test -z "$as_dir" && as_dir=.
3586     for ac_exec_ext in '' $ac_executable_extensions; do
3587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3588     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3590     break 2
3591   fi
3592 done
3593   done
3594 IFS=$as_save_IFS
3595
3596   ;;
3597 esac
3598 fi
3599 DTRACE=$ac_cv_path_DTRACE
3600 if test -n "$DTRACE"; then
3601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3602 $as_echo "$DTRACE" >&6; }
3603 else
3604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3605 $as_echo "no" >&6; }
3606 fi
3607
3608
3609   test -n "$DTRACE" && break
3610 done
3611
3612 else
3613   # Report the value of DTRACE in configure's output in all cases.
3614   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3615 $as_echo_n "checking for DTRACE... " >&6; }
3616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3617 $as_echo "$DTRACE" >&6; }
3618 fi
3619
3620 if test -z "$DTRACE"; then
3621   as_fn_error $? "dtrace not found" "$LINENO" 5
3622 fi
3623
3624       ;;
3625     no)
3626       :
3627       ;;
3628     *)
3629       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3630       ;;
3631   esac
3632
3633 else
3634   enable_dtrace=no
3635
3636 fi
3637
3638
3639
3640
3641 #
3642 # TAP tests
3643 #
3644
3645
3646 # Check whether --enable-tap-tests was given.
3647 if test "${enable_tap_tests+set}" = set; then :
3648   enableval=$enable_tap_tests;
3649   case $enableval in
3650     yes)
3651       :
3652       ;;
3653     no)
3654       :
3655       ;;
3656     *)
3657       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3658       ;;
3659   esac
3660
3661 else
3662   enable_tap_tests=no
3663
3664 fi
3665
3666
3667
3668
3669 #
3670 # Block size
3671 #
3672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3673 $as_echo_n "checking for block size... " >&6; }
3674
3675
3676
3677 # Check whether --with-blocksize was given.
3678 if test "${with_blocksize+set}" = set; then :
3679   withval=$with_blocksize;
3680   case $withval in
3681     yes)
3682       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3683       ;;
3684     no)
3685       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3686       ;;
3687     *)
3688       blocksize=$withval
3689       ;;
3690   esac
3691
3692 else
3693   blocksize=8
3694 fi
3695
3696
3697 case ${blocksize} in
3698   1) BLCKSZ=1024;;
3699   2) BLCKSZ=2048;;
3700   4) BLCKSZ=4096;;
3701   8) BLCKSZ=8192;;
3702  16) BLCKSZ=16384;;
3703  32) BLCKSZ=32768;;
3704   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3705 esac
3706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3707 $as_echo "${blocksize}kB" >&6; }
3708
3709
3710 cat >>confdefs.h <<_ACEOF
3711 #define BLCKSZ ${BLCKSZ}
3712 _ACEOF
3713
3714
3715 #
3716 # Relation segment size
3717 #
3718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3719 $as_echo_n "checking for segment size... " >&6; }
3720
3721
3722
3723 # Check whether --with-segsize was given.
3724 if test "${with_segsize+set}" = set; then :
3725   withval=$with_segsize;
3726   case $withval in
3727     yes)
3728       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3729       ;;
3730     no)
3731       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3732       ;;
3733     *)
3734       segsize=$withval
3735       ;;
3736   esac
3737
3738 else
3739   segsize=1
3740 fi
3741
3742
3743 # this expression is set up to avoid unnecessary integer overflow
3744 # blocksize is already guaranteed to be a factor of 1024
3745 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3746 test $? -eq 0 || exit 1
3747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3748 $as_echo "${segsize}GB" >&6; }
3749
3750
3751 cat >>confdefs.h <<_ACEOF
3752 #define RELSEG_SIZE ${RELSEG_SIZE}
3753 _ACEOF
3754
3755
3756 #
3757 # WAL block size
3758 #
3759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3760 $as_echo_n "checking for WAL block size... " >&6; }
3761
3762
3763
3764 # Check whether --with-wal-blocksize was given.
3765 if test "${with_wal_blocksize+set}" = set; then :
3766   withval=$with_wal_blocksize;
3767   case $withval in
3768     yes)
3769       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3770       ;;
3771     no)
3772       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3773       ;;
3774     *)
3775       wal_blocksize=$withval
3776       ;;
3777   esac
3778
3779 else
3780   wal_blocksize=8
3781 fi
3782
3783
3784 case ${wal_blocksize} in
3785   1) XLOG_BLCKSZ=1024;;
3786   2) XLOG_BLCKSZ=2048;;
3787   4) XLOG_BLCKSZ=4096;;
3788   8) XLOG_BLCKSZ=8192;;
3789  16) XLOG_BLCKSZ=16384;;
3790  32) XLOG_BLCKSZ=32768;;
3791  64) XLOG_BLCKSZ=65536;;
3792   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3793 esac
3794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3795 $as_echo "${wal_blocksize}kB" >&6; }
3796
3797
3798 cat >>confdefs.h <<_ACEOF
3799 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3800 _ACEOF
3801
3802
3803 #
3804 # C compiler
3805 #
3806
3807 # For historical reasons you can also use --with-CC to specify the C compiler
3808 # to use, although the standard way to do this is to set the CC environment
3809 # variable.
3810
3811
3812
3813 # Check whether --with-CC was given.
3814 if test "${with_CC+set}" = set; then :
3815   withval=$with_CC;
3816   case $withval in
3817     yes)
3818       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3819       ;;
3820     no)
3821       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3822       ;;
3823     *)
3824       CC=$with_CC
3825       ;;
3826   esac
3827
3828 fi
3829
3830
3831
3832 case $template in
3833   aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3834     *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3835 esac
3836
3837 ac_ext=c
3838 ac_cpp='$CPP $CPPFLAGS'
3839 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3840 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3841 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3842 if test -n "$ac_tool_prefix"; then
3843   for ac_prog in $pgac_cc_list
3844   do
3845     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3846 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848 $as_echo_n "checking for $ac_word... " >&6; }
3849 if ${ac_cv_prog_CC+:} false; then :
3850   $as_echo_n "(cached) " >&6
3851 else
3852   if test -n "$CC"; then
3853   ac_cv_prog_CC="$CC" # Let the user override the test.
3854 else
3855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856 for as_dir in $PATH
3857 do
3858   IFS=$as_save_IFS
3859   test -z "$as_dir" && as_dir=.
3860     for ac_exec_ext in '' $ac_executable_extensions; do
3861   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3862     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3863     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3864     break 2
3865   fi
3866 done
3867   done
3868 IFS=$as_save_IFS
3869
3870 fi
3871 fi
3872 CC=$ac_cv_prog_CC
3873 if test -n "$CC"; then
3874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3875 $as_echo "$CC" >&6; }
3876 else
3877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878 $as_echo "no" >&6; }
3879 fi
3880
3881
3882     test -n "$CC" && break
3883   done
3884 fi
3885 if test -z "$CC"; then
3886   ac_ct_CC=$CC
3887   for ac_prog in $pgac_cc_list
3888 do
3889   # Extract the first word of "$ac_prog", so it can be a program name with args.
3890 set dummy $ac_prog; ac_word=$2
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3892 $as_echo_n "checking for $ac_word... " >&6; }
3893 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3894   $as_echo_n "(cached) " >&6
3895 else
3896   if test -n "$ac_ct_CC"; then
3897   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3898 else
3899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3900 for as_dir in $PATH
3901 do
3902   IFS=$as_save_IFS
3903   test -z "$as_dir" && as_dir=.
3904     for ac_exec_ext in '' $ac_executable_extensions; do
3905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3906     ac_cv_prog_ac_ct_CC="$ac_prog"
3907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3908     break 2
3909   fi
3910 done
3911   done
3912 IFS=$as_save_IFS
3913
3914 fi
3915 fi
3916 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3917 if test -n "$ac_ct_CC"; then
3918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3919 $as_echo "$ac_ct_CC" >&6; }
3920 else
3921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3922 $as_echo "no" >&6; }
3923 fi
3924
3925
3926   test -n "$ac_ct_CC" && break
3927 done
3928
3929   if test "x$ac_ct_CC" = x; then
3930     CC=""
3931   else
3932     case $cross_compiling:$ac_tool_warned in
3933 yes:)
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3935 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3936 ac_tool_warned=yes ;;
3937 esac
3938     CC=$ac_ct_CC
3939   fi
3940 fi
3941
3942
3943 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3944 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3945 as_fn_error $? "no acceptable C compiler found in \$PATH
3946 See \`config.log' for more details" "$LINENO" 5; }
3947
3948 # Provide some information about the compiler.
3949 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3950 set X $ac_compile
3951 ac_compiler=$2
3952 for ac_option in --version -v -V -qversion; do
3953   { { ac_try="$ac_compiler $ac_option >&5"
3954 case "(($ac_try" in
3955   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956   *) ac_try_echo=$ac_try;;
3957 esac
3958 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959 $as_echo "$ac_try_echo"; } >&5
3960   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3961   ac_status=$?
3962   if test -s conftest.err; then
3963     sed '10a\
3964 ... rest of stderr output deleted ...
3965          10q' conftest.err >conftest.er1
3966     cat conftest.er1 >&5
3967   fi
3968   rm -f conftest.er1 conftest.err
3969   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3970   test $ac_status = 0; }
3971 done
3972
3973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3974 /* end confdefs.h.  */
3975
3976 int
3977 main ()
3978 {
3979
3980   ;
3981   return 0;
3982 }
3983 _ACEOF
3984 ac_clean_files_save=$ac_clean_files
3985 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3986 # Try to create an executable without -o first, disregard a.out.
3987 # It will help us diagnose broken compilers, and finding out an intuition
3988 # of exeext.
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3990 $as_echo_n "checking whether the C compiler works... " >&6; }
3991 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3992
3993 # The possible output files:
3994 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3995
3996 ac_rmfiles=
3997 for ac_file in $ac_files
3998 do
3999   case $ac_file in
4000     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4001     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4002   esac
4003 done
4004 rm -f $ac_rmfiles
4005
4006 if { { ac_try="$ac_link_default"
4007 case "(($ac_try" in
4008   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4009   *) ac_try_echo=$ac_try;;
4010 esac
4011 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4012 $as_echo "$ac_try_echo"; } >&5
4013   (eval "$ac_link_default") 2>&5
4014   ac_status=$?
4015   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4016   test $ac_status = 0; }; then :
4017   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4018 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4019 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4020 # so that the user can short-circuit this test for compilers unknown to
4021 # Autoconf.
4022 for ac_file in $ac_files ''
4023 do
4024   test -f "$ac_file" || continue
4025   case $ac_file in
4026     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4027         ;;
4028     [ab].out )
4029         # We found the default executable, but exeext='' is most
4030         # certainly right.
4031         break;;
4032     *.* )
4033         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4034         then :; else
4035            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4036         fi
4037         # We set ac_cv_exeext here because the later test for it is not
4038         # safe: cross compilers may not add the suffix if given an `-o'
4039         # argument, so we may need to know it at that point already.
4040         # Even if this section looks crufty: it has the advantage of
4041         # actually working.
4042         break;;
4043     * )
4044         break;;
4045   esac
4046 done
4047 test "$ac_cv_exeext" = no && ac_cv_exeext=
4048
4049 else
4050   ac_file=''
4051 fi
4052 if test -z "$ac_file"; then :
4053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4054 $as_echo "no" >&6; }
4055 $as_echo "$as_me: failed program was:" >&5
4056 sed 's/^/| /' conftest.$ac_ext >&5
4057
4058 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4059 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4060 as_fn_error 77 "C compiler cannot create executables
4061 See \`config.log' for more details" "$LINENO" 5; }
4062 else
4063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4064 $as_echo "yes" >&6; }
4065 fi
4066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4067 $as_echo_n "checking for C compiler default output file name... " >&6; }
4068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4069 $as_echo "$ac_file" >&6; }
4070 ac_exeext=$ac_cv_exeext
4071
4072 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4073 ac_clean_files=$ac_clean_files_save
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4075 $as_echo_n "checking for suffix of executables... " >&6; }
4076 if { { ac_try="$ac_link"
4077 case "(($ac_try" in
4078   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4079   *) ac_try_echo=$ac_try;;
4080 esac
4081 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4082 $as_echo "$ac_try_echo"; } >&5
4083   (eval "$ac_link") 2>&5
4084   ac_status=$?
4085   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4086   test $ac_status = 0; }; then :
4087   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4088 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4089 # work properly (i.e., refer to `conftest.exe'), while it won't with
4090 # `rm'.
4091 for ac_file in conftest.exe conftest conftest.*; do
4092   test -f "$ac_file" || continue
4093   case $ac_file in
4094     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4095     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4096           break;;
4097     * ) break;;
4098   esac
4099 done
4100 else
4101   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4102 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4103 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4104 See \`config.log' for more details" "$LINENO" 5; }
4105 fi
4106 rm -f conftest conftest$ac_cv_exeext
4107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4108 $as_echo "$ac_cv_exeext" >&6; }
4109
4110 rm -f conftest.$ac_ext
4111 EXEEXT=$ac_cv_exeext
4112 ac_exeext=$EXEEXT
4113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4114 /* end confdefs.h.  */
4115 #include <stdio.h>
4116 int
4117 main ()
4118 {
4119 FILE *f = fopen ("conftest.out", "w");
4120  return ferror (f) || fclose (f) != 0;
4121
4122   ;
4123   return 0;
4124 }
4125 _ACEOF
4126 ac_clean_files="$ac_clean_files conftest.out"
4127 # Check that the compiler produces executables we can run.  If not, either
4128 # the compiler is broken, or we cross compile.
4129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4130 $as_echo_n "checking whether we are cross compiling... " >&6; }
4131 if test "$cross_compiling" != yes; then
4132   { { ac_try="$ac_link"
4133 case "(($ac_try" in
4134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4135   *) ac_try_echo=$ac_try;;
4136 esac
4137 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4138 $as_echo "$ac_try_echo"; } >&5
4139   (eval "$ac_link") 2>&5
4140   ac_status=$?
4141   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4142   test $ac_status = 0; }
4143   if { ac_try='./conftest$ac_cv_exeext'
4144   { { case "(($ac_try" in
4145   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4146   *) ac_try_echo=$ac_try;;
4147 esac
4148 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4149 $as_echo "$ac_try_echo"; } >&5
4150   (eval "$ac_try") 2>&5
4151   ac_status=$?
4152   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4153   test $ac_status = 0; }; }; then
4154     cross_compiling=no
4155   else
4156     if test "$cross_compiling" = maybe; then
4157         cross_compiling=yes
4158     else
4159         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4160 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4161 as_fn_error $? "cannot run C compiled programs.
4162 If you meant to cross compile, use \`--host'.
4163 See \`config.log' for more details" "$LINENO" 5; }
4164     fi
4165   fi
4166 fi
4167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4168 $as_echo "$cross_compiling" >&6; }
4169
4170 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4171 ac_clean_files=$ac_clean_files_save
4172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4173 $as_echo_n "checking for suffix of object files... " >&6; }
4174 if ${ac_cv_objext+:} false; then :
4175   $as_echo_n "(cached) " >&6
4176 else
4177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4178 /* end confdefs.h.  */
4179
4180 int
4181 main ()
4182 {
4183
4184   ;
4185   return 0;
4186 }
4187 _ACEOF
4188 rm -f conftest.o conftest.obj
4189 if { { ac_try="$ac_compile"
4190 case "(($ac_try" in
4191   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4192   *) ac_try_echo=$ac_try;;
4193 esac
4194 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4195 $as_echo "$ac_try_echo"; } >&5
4196   (eval "$ac_compile") 2>&5
4197   ac_status=$?
4198   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4199   test $ac_status = 0; }; then :
4200   for ac_file in conftest.o conftest.obj conftest.*; do
4201   test -f "$ac_file" || continue;
4202   case $ac_file in
4203     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4204     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4205        break;;
4206   esac
4207 done
4208 else
4209   $as_echo "$as_me: failed program was:" >&5
4210 sed 's/^/| /' conftest.$ac_ext >&5
4211
4212 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4213 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4214 as_fn_error $? "cannot compute suffix of object files: cannot compile
4215 See \`config.log' for more details" "$LINENO" 5; }
4216 fi
4217 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4218 fi
4219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4220 $as_echo "$ac_cv_objext" >&6; }
4221 OBJEXT=$ac_cv_objext
4222 ac_objext=$OBJEXT
4223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4224 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4225 if ${ac_cv_c_compiler_gnu+:} false; then :
4226   $as_echo_n "(cached) " >&6
4227 else
4228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4229 /* end confdefs.h.  */
4230
4231 int
4232 main ()
4233 {
4234 #ifndef __GNUC__
4235        choke me
4236 #endif
4237
4238   ;
4239   return 0;
4240 }
4241 _ACEOF
4242 if ac_fn_c_try_compile "$LINENO"; then :
4243   ac_compiler_gnu=yes
4244 else
4245   ac_compiler_gnu=no
4246 fi
4247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4248 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4249
4250 fi
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4252 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4253 if test $ac_compiler_gnu = yes; then
4254   GCC=yes
4255 else
4256   GCC=
4257 fi
4258 ac_test_CFLAGS=${CFLAGS+set}
4259 ac_save_CFLAGS=$CFLAGS
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4261 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4262 if ${ac_cv_prog_cc_g+:} false; then :
4263   $as_echo_n "(cached) " >&6
4264 else
4265   ac_save_c_werror_flag=$ac_c_werror_flag
4266    ac_c_werror_flag=yes
4267    ac_cv_prog_cc_g=no
4268    CFLAGS="-g"
4269    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4270 /* end confdefs.h.  */
4271
4272 int
4273 main ()
4274 {
4275
4276   ;
4277   return 0;
4278 }
4279 _ACEOF
4280 if ac_fn_c_try_compile "$LINENO"; then :
4281   ac_cv_prog_cc_g=yes
4282 else
4283   CFLAGS=""
4284       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4285 /* end confdefs.h.  */
4286
4287 int
4288 main ()
4289 {
4290
4291   ;
4292   return 0;
4293 }
4294 _ACEOF
4295 if ac_fn_c_try_compile "$LINENO"; then :
4296
4297 else
4298   ac_c_werror_flag=$ac_save_c_werror_flag
4299          CFLAGS="-g"
4300          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4301 /* end confdefs.h.  */
4302
4303 int
4304 main ()
4305 {
4306
4307   ;
4308   return 0;
4309 }
4310 _ACEOF
4311 if ac_fn_c_try_compile "$LINENO"; then :
4312   ac_cv_prog_cc_g=yes
4313 fi
4314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4315 fi
4316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4317 fi
4318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4319    ac_c_werror_flag=$ac_save_c_werror_flag
4320 fi
4321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4322 $as_echo "$ac_cv_prog_cc_g" >&6; }
4323 if test "$ac_test_CFLAGS" = set; then
4324   CFLAGS=$ac_save_CFLAGS
4325 elif test $ac_cv_prog_cc_g = yes; then
4326   if test "$GCC" = yes; then
4327     CFLAGS="-g -O2"
4328   else
4329     CFLAGS="-g"
4330   fi
4331 else
4332   if test "$GCC" = yes; then
4333     CFLAGS="-O2"
4334   else
4335     CFLAGS=
4336   fi
4337 fi
4338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4339 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4340 if ${ac_cv_prog_cc_c89+:} false; then :
4341   $as_echo_n "(cached) " >&6
4342 else
4343   ac_cv_prog_cc_c89=no
4344 ac_save_CC=$CC
4345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4346 /* end confdefs.h.  */
4347 #include <stdarg.h>
4348 #include <stdio.h>
4349 struct stat;
4350 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4351 struct buf { int x; };
4352 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4353 static char *e (p, i)
4354      char **p;
4355      int i;
4356 {
4357   return p[i];
4358 }
4359 static char *f (char * (*g) (char **, int), char **p, ...)
4360 {
4361   char *s;
4362   va_list v;
4363   va_start (v,p);
4364   s = g (p, va_arg (v,int));
4365   va_end (v);
4366   return s;
4367 }
4368
4369 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4370    function prototypes and stuff, but not '\xHH' hex character constants.
4371    These don't provoke an error unfortunately, instead are silently treated
4372    as 'x'.  The following induces an error, until -std is added to get
4373    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4374    array size at least.  It's necessary to write '\x00'==0 to get something
4375    that's true only with -std.  */
4376 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4377
4378 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4379    inside strings and character constants.  */
4380 #define FOO(x) 'x'
4381 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4382
4383 int test (int i, double x);
4384 struct s1 {int (*f) (int a);};
4385 struct s2 {int (*f) (double a);};
4386 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4387 int argc;
4388 char **argv;
4389 int
4390 main ()
4391 {
4392 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4393   ;
4394   return 0;
4395 }
4396 _ACEOF
4397 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4398         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4399 do
4400   CC="$ac_save_CC $ac_arg"
4401   if ac_fn_c_try_compile "$LINENO"; then :
4402   ac_cv_prog_cc_c89=$ac_arg
4403 fi
4404 rm -f core conftest.err conftest.$ac_objext
4405   test "x$ac_cv_prog_cc_c89" != "xno" && break
4406 done
4407 rm -f conftest.$ac_ext
4408 CC=$ac_save_CC
4409
4410 fi
4411 # AC_CACHE_VAL
4412 case "x$ac_cv_prog_cc_c89" in
4413   x)
4414     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4415 $as_echo "none needed" >&6; } ;;
4416   xno)
4417     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4418 $as_echo "unsupported" >&6; } ;;
4419   *)
4420     CC="$CC $ac_cv_prog_cc_c89"
4421     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4422 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4423 esac
4424 if test "x$ac_cv_prog_cc_c89" != xno; then :
4425
4426 fi
4427
4428 ac_ext=c
4429 ac_cpp='$CPP $CPPFLAGS'
4430 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4431 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4432 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4433
4434 ac_ext=cpp
4435 ac_cpp='$CXXCPP $CPPFLAGS'
4436 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4437 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4438 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4439 if test -z "$CXX"; then
4440   if test -n "$CCC"; then
4441     CXX=$CCC
4442   else
4443     if test -n "$ac_tool_prefix"; then
4444   for ac_prog in $pgac_cxx_list
4445   do
4446     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4447 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4449 $as_echo_n "checking for $ac_word... " >&6; }
4450 if ${ac_cv_prog_CXX+:} false; then :
4451   $as_echo_n "(cached) " >&6
4452 else
4453   if test -n "$CXX"; then
4454   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4455 else
4456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4457 for as_dir in $PATH
4458 do
4459   IFS=$as_save_IFS
4460   test -z "$as_dir" && as_dir=.
4461     for ac_exec_ext in '' $ac_executable_extensions; do
4462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4463     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4465     break 2
4466   fi
4467 done
4468   done
4469 IFS=$as_save_IFS
4470
4471 fi
4472 fi
4473 CXX=$ac_cv_prog_CXX
4474 if test -n "$CXX"; then
4475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4476 $as_echo "$CXX" >&6; }
4477 else
4478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4479 $as_echo "no" >&6; }
4480 fi
4481
4482
4483     test -n "$CXX" && break
4484   done
4485 fi
4486 if test -z "$CXX"; then
4487   ac_ct_CXX=$CXX
4488   for ac_prog in $pgac_cxx_list
4489 do
4490   # Extract the first word of "$ac_prog", so it can be a program name with args.
4491 set dummy $ac_prog; ac_word=$2
4492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4493 $as_echo_n "checking for $ac_word... " >&6; }
4494 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4495   $as_echo_n "(cached) " >&6
4496 else
4497   if test -n "$ac_ct_CXX"; then
4498   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4499 else
4500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4501 for as_dir in $PATH
4502 do
4503   IFS=$as_save_IFS
4504   test -z "$as_dir" && as_dir=.
4505     for ac_exec_ext in '' $ac_executable_extensions; do
4506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4507     ac_cv_prog_ac_ct_CXX="$ac_prog"
4508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4509     break 2
4510   fi
4511 done
4512   done
4513 IFS=$as_save_IFS
4514
4515 fi
4516 fi
4517 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4518 if test -n "$ac_ct_CXX"; then
4519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4520 $as_echo "$ac_ct_CXX" >&6; }
4521 else
4522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4523 $as_echo "no" >&6; }
4524 fi
4525
4526
4527   test -n "$ac_ct_CXX" && break
4528 done
4529
4530   if test "x$ac_ct_CXX" = x; then
4531     CXX="g++"
4532   else
4533     case $cross_compiling:$ac_tool_warned in
4534 yes:)
4535 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4536 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4537 ac_tool_warned=yes ;;
4538 esac
4539     CXX=$ac_ct_CXX
4540   fi
4541 fi
4542
4543   fi
4544 fi
4545 # Provide some information about the compiler.
4546 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4547 set X $ac_compile
4548 ac_compiler=$2
4549 for ac_option in --version -v -V -qversion; do
4550   { { ac_try="$ac_compiler $ac_option >&5"
4551 case "(($ac_try" in
4552   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4553   *) ac_try_echo=$ac_try;;
4554 esac
4555 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4556 $as_echo "$ac_try_echo"; } >&5
4557   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4558   ac_status=$?
4559   if test -s conftest.err; then
4560     sed '10a\
4561 ... rest of stderr output deleted ...
4562          10q' conftest.err >conftest.er1
4563     cat conftest.er1 >&5
4564   fi
4565   rm -f conftest.er1 conftest.err
4566   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4567   test $ac_status = 0; }
4568 done
4569
4570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4571 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4572 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4573   $as_echo_n "(cached) " >&6
4574 else
4575   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4576 /* end confdefs.h.  */
4577
4578 int
4579 main ()
4580 {
4581 #ifndef __GNUC__
4582        choke me
4583 #endif
4584
4585   ;
4586   return 0;
4587 }
4588 _ACEOF
4589 if ac_fn_cxx_try_compile "$LINENO"; then :
4590   ac_compiler_gnu=yes
4591 else
4592   ac_compiler_gnu=no
4593 fi
4594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4595 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4596
4597 fi
4598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4599 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4600 if test $ac_compiler_gnu = yes; then
4601   GXX=yes
4602 else
4603   GXX=
4604 fi
4605 ac_test_CXXFLAGS=${CXXFLAGS+set}
4606 ac_save_CXXFLAGS=$CXXFLAGS
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4608 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4609 if ${ac_cv_prog_cxx_g+:} false; then :
4610   $as_echo_n "(cached) " >&6
4611 else
4612   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4613    ac_cxx_werror_flag=yes
4614    ac_cv_prog_cxx_g=no
4615    CXXFLAGS="-g"
4616    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4617 /* end confdefs.h.  */
4618
4619 int
4620 main ()
4621 {
4622
4623   ;
4624   return 0;
4625 }
4626 _ACEOF
4627 if ac_fn_cxx_try_compile "$LINENO"; then :
4628   ac_cv_prog_cxx_g=yes
4629 else
4630   CXXFLAGS=""
4631       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4632 /* end confdefs.h.  */
4633
4634 int
4635 main ()
4636 {
4637
4638   ;
4639   return 0;
4640 }
4641 _ACEOF
4642 if ac_fn_cxx_try_compile "$LINENO"; then :
4643
4644 else
4645   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4646          CXXFLAGS="-g"
4647          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4648 /* end confdefs.h.  */
4649
4650 int
4651 main ()
4652 {
4653
4654   ;
4655   return 0;
4656 }
4657 _ACEOF
4658 if ac_fn_cxx_try_compile "$LINENO"; then :
4659   ac_cv_prog_cxx_g=yes
4660 fi
4661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4662 fi
4663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4664 fi
4665 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4666    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4667 fi
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4669 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4670 if test "$ac_test_CXXFLAGS" = set; then
4671   CXXFLAGS=$ac_save_CXXFLAGS
4672 elif test $ac_cv_prog_cxx_g = yes; then
4673   if test "$GXX" = yes; then
4674     CXXFLAGS="-g -O2"
4675   else
4676     CXXFLAGS="-g"
4677   fi
4678 else
4679   if test "$GXX" = yes; then
4680     CXXFLAGS="-O2"
4681   else
4682     CXXFLAGS=
4683   fi
4684 fi
4685 ac_ext=c
4686 ac_cpp='$CPP $CPPFLAGS'
4687 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4688 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4689 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4690
4691
4692 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4693 # but has idiosyncrasies of its own.  We assume icc will define
4694 # __INTEL_COMPILER regardless of CFLAGS.
4695
4696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4697 /* end confdefs.h.  */
4698
4699 int
4700 main ()
4701 {
4702 #ifndef __INTEL_COMPILER
4703 choke me
4704 #endif
4705   ;
4706   return 0;
4707 }
4708 _ACEOF
4709 if ac_fn_c_try_compile "$LINENO"; then :
4710   ICC=yes
4711 else
4712   ICC=no
4713 fi
4714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4715
4716 # Check if it's Sun Studio compiler. We assume that
4717 # __SUNPRO_C will be defined for Sun Studio compilers
4718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4719 /* end confdefs.h.  */
4720
4721 int
4722 main ()
4723 {
4724 #ifndef __SUNPRO_C
4725 choke me
4726 #endif
4727   ;
4728   return 0;
4729 }
4730 _ACEOF
4731 if ac_fn_c_try_compile "$LINENO"; then :
4732   SUN_STUDIO_CC=yes
4733 else
4734   SUN_STUDIO_CC=no
4735 fi
4736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4737
4738
4739
4740
4741 #
4742 # LLVM
4743 #
4744 # Checked early because subsequent tests depend on it.
4745
4746
4747
4748 # Check whether --with-llvm was given.
4749 if test "${with_llvm+set}" = set; then :
4750   withval=$with_llvm;
4751   case $withval in
4752     yes)
4753
4754 $as_echo "#define USE_LLVM 1" >>confdefs.h
4755
4756       ;;
4757     no)
4758       :
4759       ;;
4760     *)
4761       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4762       ;;
4763   esac
4764
4765 else
4766   with_llvm=no
4767
4768 fi
4769
4770
4771
4772 for ac_prog in gawk mawk nawk awk
4773 do
4774   # Extract the first word of "$ac_prog", so it can be a program name with args.
4775 set dummy $ac_prog; ac_word=$2
4776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4777 $as_echo_n "checking for $ac_word... " >&6; }
4778 if ${ac_cv_prog_AWK+:} false; then :
4779   $as_echo_n "(cached) " >&6
4780 else
4781   if test -n "$AWK"; then
4782   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4783 else
4784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4785 for as_dir in $PATH
4786 do
4787   IFS=$as_save_IFS
4788   test -z "$as_dir" && as_dir=.
4789     for ac_exec_ext in '' $ac_executable_extensions; do
4790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4791     ac_cv_prog_AWK="$ac_prog"
4792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4793     break 2
4794   fi
4795 done
4796   done
4797 IFS=$as_save_IFS
4798
4799 fi
4800 fi
4801 AWK=$ac_cv_prog_AWK
4802 if test -n "$AWK"; then
4803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4804 $as_echo "$AWK" >&6; }
4805 else
4806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807 $as_echo "no" >&6; }
4808 fi
4809
4810
4811   test -n "$AWK" && break
4812 done
4813
4814 if test "$with_llvm" = yes; then :
4815
4816
4817
4818
4819
4820   if test -z "$LLVM_CONFIG"; then
4821   for ac_prog in llvm-config llvm-config-7 llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
4822 do
4823   # Extract the first word of "$ac_prog", so it can be a program name with args.
4824 set dummy $ac_prog; ac_word=$2
4825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826 $as_echo_n "checking for $ac_word... " >&6; }
4827 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4828   $as_echo_n "(cached) " >&6
4829 else
4830   case $LLVM_CONFIG in
4831   [\\/]* | ?:[\\/]*)
4832   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
4833   ;;
4834   *)
4835   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4836 for as_dir in $PATH
4837 do
4838   IFS=$as_save_IFS
4839   test -z "$as_dir" && as_dir=.
4840     for ac_exec_ext in '' $ac_executable_extensions; do
4841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4842     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4844     break 2
4845   fi
4846 done
4847   done
4848 IFS=$as_save_IFS
4849
4850   ;;
4851 esac
4852 fi
4853 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
4854 if test -n "$LLVM_CONFIG"; then
4855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
4856 $as_echo "$LLVM_CONFIG" >&6; }
4857 else
4858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4859 $as_echo "no" >&6; }
4860 fi
4861
4862
4863   test -n "$LLVM_CONFIG" && break
4864 done
4865
4866 else
4867   # Report the value of LLVM_CONFIG in configure's output in all cases.
4868   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
4869 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
4870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
4871 $as_echo "$LLVM_CONFIG" >&6; }
4872 fi
4873
4874
4875   # no point continuing if llvm wasn't found
4876   if test -z "$LLVM_CONFIG"; then
4877     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
4878   fi
4879   # check if detected $LLVM_CONFIG is executable
4880   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
4881   if test "x$pgac_llvm_version" = "xno"; then
4882     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
4883   fi
4884   # and whether the version is supported
4885   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
4886     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
4887   fi
4888
4889   # need clang to create some bitcode files
4890
4891   if test -z "$CLANG"; then
4892   for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
4893 do
4894   # Extract the first word of "$ac_prog", so it can be a program name with args.
4895 set dummy $ac_prog; ac_word=$2
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4897 $as_echo_n "checking for $ac_word... " >&6; }
4898 if ${ac_cv_path_CLANG+:} false; then :
4899   $as_echo_n "(cached) " >&6
4900 else
4901   case $CLANG in
4902   [\\/]* | ?:[\\/]*)
4903   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
4904   ;;
4905   *)
4906   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4907 for as_dir in $PATH
4908 do
4909   IFS=$as_save_IFS
4910   test -z "$as_dir" && as_dir=.
4911     for ac_exec_ext in '' $ac_executable_extensions; do
4912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4913     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
4914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4915     break 2
4916   fi
4917 done
4918   done
4919 IFS=$as_save_IFS
4920
4921   ;;
4922 esac
4923 fi
4924 CLANG=$ac_cv_path_CLANG
4925 if test -n "$CLANG"; then
4926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
4927 $as_echo "$CLANG" >&6; }
4928 else
4929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4930 $as_echo "no" >&6; }
4931 fi
4932
4933
4934   test -n "$CLANG" && break
4935 done
4936
4937 else
4938   # Report the value of CLANG in configure's output in all cases.
4939   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
4940 $as_echo_n "checking for CLANG... " >&6; }
4941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
4942 $as_echo "$CLANG" >&6; }
4943 fi
4944
4945   if test -z "$CLANG"; then
4946     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
4947   fi
4948   # make sure clang is executable
4949   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
4950     as_fn_error $? "$CLANG does not work" "$LINENO" 5
4951   fi
4952   # Could check clang version, but it doesn't seem that
4953   # important. Systems with a new enough LLVM version are usually
4954   # going to have a decent clang version too. It's also not entirely
4955   # clear what the minimum version is.
4956
4957   # Collect compiler flags necessary to build the LLVM dependent
4958   # shared library.
4959   for pgac_option in `$LLVM_CONFIG --cppflags`; do
4960     case $pgac_option in
4961       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
4962     esac
4963   done
4964
4965   for pgac_option in `$LLVM_CONFIG --ldflags`; do
4966     case $pgac_option in
4967       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
4968     esac
4969   done
4970
4971   # ABI influencing options, standard influencing options
4972   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
4973     case $pgac_option in
4974       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
4975       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
4976     esac
4977   done
4978
4979   # Look for components we're interested in, collect necessary
4980   # libs. As some components are optional, we can't just list all of
4981   # them as it'd raise an error.
4982   pgac_components='';
4983   for pgac_component in `$LLVM_CONFIG --components`; do
4984     case $pgac_component in
4985       engine) pgac_components="$pgac_components $pgac_component";;
4986       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
4987       orcjit) pgac_components="$pgac_components $pgac_component";;
4988       passes) pgac_components="$pgac_components $pgac_component";;
4989       perfjitevents) pgac_components="$pgac_components $pgac_component";;
4990     esac
4991   done;
4992
4993   # And then get the libraries that need to be linked in for the
4994   # selected components.  They're large libraries, we only want to
4995   # link them into the LLVM using shared library.
4996   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
4997     case $pgac_option in
4998       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
4999     esac
5000   done
5001
5002   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5003
5004   # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5005
5006
5007
5008
5009
5010
5011
5012
5013 fi # fi
5014
5015
5016 unset CFLAGS
5017 unset CXXFLAGS
5018
5019 #
5020 # Read the template
5021 #
5022 . "$srcdir/src/template/$template" || exit
5023
5024 # C[XX]FLAGS are selected so:
5025 # If the user specifies something in the environment, that is used.
5026 # else:  If the template file set something, that is used.
5027 # else:  If coverage was enabled, don't set anything.
5028 # else:  If the compiler is GCC, then we use -O2.
5029 # else:  If the compiler is something else, then we use -O, unless debugging.
5030
5031 if test "$ac_env_CFLAGS_set" = set; then
5032   CFLAGS=$ac_env_CFLAGS_value
5033 elif test "${CFLAGS+set}" = set; then
5034   : # (keep what template set)
5035 elif test "$enable_coverage" = yes; then
5036   : # no optimization by default
5037 elif test "$GCC" = yes; then
5038   CFLAGS="-O2"
5039 else
5040   # if the user selected debug mode, don't use -O
5041   if test "$enable_debug" != yes; then
5042     CFLAGS="-O"
5043   fi
5044 fi
5045
5046 if test "$ac_env_CXXFLAGS_set" = set; then
5047   CXXFLAGS=$ac_env_CXXFLAGS_value
5048 elif test "${CXXFLAGS+set}" = set; then
5049   : # (keep what template set)
5050 elif test "$enable_coverage" = yes; then
5051   : # no optimization by default
5052 elif test "$GCC" = yes; then
5053   CXXFLAGS="-O2"
5054 else
5055   # if the user selected debug mode, don't use -O
5056   if test "$enable_debug" != yes; then
5057     CXXFLAGS="-O"
5058   fi
5059 fi
5060
5061 # When generating bitcode (for inlining) we always want to use -O2
5062 # even when --enable-debug is specified. The bitcode it's not going to
5063 # be used for line-by-line debugging, and JIT inlining doesn't work
5064 # without at least -O1 (otherwise clang will emit 'noinline'
5065 # attributes everywhere), which is bad for testing.  Still allow the
5066 # environment to override if done explicitly.
5067 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5068   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5069 else
5070   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5071 fi
5072 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5073   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5074 else
5075   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5076 fi
5077
5078 # C[XX]FLAGS we determined above will be added back at the end
5079 user_CFLAGS=$CFLAGS
5080 CFLAGS=""
5081 user_CXXFLAGS=$CXXFLAGS
5082 CXXFLAGS=""
5083 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5084 BITCODE_CFLAGS=""
5085 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5086 BITCODE_CXXFLAGS=""
5087
5088 # set CFLAGS_VECTOR from the environment, if available
5089 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5090   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5091 fi
5092
5093 # Some versions of GCC support some additional useful warning flags.
5094 # Check whether they are supported, and add them to CFLAGS if so.
5095 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5096 # but has its own.  Also check other compiler-specific flags here.
5097
5098 if test "$GCC" = yes -a "$ICC" = no; then
5099   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5100   CXXFLAGS="-Wall -Wpointer-arith"
5101   # These work in some but not all gcc versions
5102
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5104 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5105 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5106   $as_echo_n "(cached) " >&6
5107 else
5108   pgac_save_CFLAGS=$CFLAGS
5109 pgac_save_CC=$CC
5110 CC=${CC}
5111 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5112 ac_save_c_werror_flag=$ac_c_werror_flag
5113 ac_c_werror_flag=yes
5114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5115 /* end confdefs.h.  */
5116
5117 int
5118 main ()
5119 {
5120
5121   ;
5122   return 0;
5123 }
5124 _ACEOF
5125 if ac_fn_c_try_compile "$LINENO"; then :
5126   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5127 else
5128   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5129 fi
5130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5131 ac_c_werror_flag=$ac_save_c_werror_flag
5132 CFLAGS="$pgac_save_CFLAGS"
5133 CC="$pgac_save_CC"
5134 fi
5135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5136 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5137 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5138   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5139 fi
5140
5141
5142   # -Wdeclaration-after-statement isn't applicable for C++
5143
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5145 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5146 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5147   $as_echo_n "(cached) " >&6
5148 else
5149   pgac_save_CFLAGS=$CFLAGS
5150 pgac_save_CC=$CC
5151 CC=${CC}
5152 CFLAGS="${CFLAGS} -Wendif-labels"
5153 ac_save_c_werror_flag=$ac_c_werror_flag
5154 ac_c_werror_flag=yes
5155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5156 /* end confdefs.h.  */
5157
5158 int
5159 main ()
5160 {
5161
5162   ;
5163   return 0;
5164 }
5165 _ACEOF
5166 if ac_fn_c_try_compile "$LINENO"; then :
5167   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5168 else
5169   pgac_cv_prog_CC_cflags__Wendif_labels=no
5170 fi
5171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5172 ac_c_werror_flag=$ac_save_c_werror_flag
5173 CFLAGS="$pgac_save_CFLAGS"
5174 CC="$pgac_save_CC"
5175 fi
5176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5177 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5178 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5179   CFLAGS="${CFLAGS} -Wendif-labels"
5180 fi
5181
5182
5183   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5184 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5185 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5186   $as_echo_n "(cached) " >&6
5187 else
5188   pgac_save_CXXFLAGS=$CXXFLAGS
5189 pgac_save_CXX=$CXX
5190 CXX=${CXX}
5191 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5192 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5193 ac_cxx_werror_flag=yes
5194 ac_ext=cpp
5195 ac_cpp='$CXXCPP $CPPFLAGS'
5196 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5197 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5198 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5199
5200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5201 /* end confdefs.h.  */
5202
5203 int
5204 main ()
5205 {
5206
5207   ;
5208   return 0;
5209 }
5210 _ACEOF
5211 if ac_fn_cxx_try_compile "$LINENO"; then :
5212   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5213 else
5214   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5215 fi
5216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5217 ac_ext=c
5218 ac_cpp='$CPP $CPPFLAGS'
5219 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5220 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5221 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5222
5223 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5224 CXXFLAGS="$pgac_save_CXXFLAGS"
5225 CXX="$pgac_save_CXX"
5226 fi
5227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5228 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5229 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5230   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5231 fi
5232
5233
5234
5235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5236 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5237 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5238   $as_echo_n "(cached) " >&6
5239 else
5240   pgac_save_CFLAGS=$CFLAGS
5241 pgac_save_CC=$CC
5242 CC=${CC}
5243 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5244 ac_save_c_werror_flag=$ac_c_werror_flag
5245 ac_c_werror_flag=yes
5246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5247 /* end confdefs.h.  */
5248
5249 int
5250 main ()
5251 {
5252
5253   ;
5254   return 0;
5255 }
5256 _ACEOF
5257 if ac_fn_c_try_compile "$LINENO"; then :
5258   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5259 else
5260   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5261 fi
5262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5263 ac_c_werror_flag=$ac_save_c_werror_flag
5264 CFLAGS="$pgac_save_CFLAGS"
5265 CC="$pgac_save_CC"
5266 fi
5267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5268 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5269 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5270   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5271 fi
5272
5273
5274   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5275 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5276 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5277   $as_echo_n "(cached) " >&6
5278 else
5279   pgac_save_CXXFLAGS=$CXXFLAGS
5280 pgac_save_CXX=$CXX
5281 CXX=${CXX}
5282 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5283 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5284 ac_cxx_werror_flag=yes
5285 ac_ext=cpp
5286 ac_cpp='$CXXCPP $CPPFLAGS'
5287 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5288 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5289 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5290
5291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5292 /* end confdefs.h.  */
5293
5294 int
5295 main ()
5296 {
5297
5298   ;
5299   return 0;
5300 }
5301 _ACEOF
5302 if ac_fn_cxx_try_compile "$LINENO"; then :
5303   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5304 else
5305   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5306 fi
5307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5308 ac_ext=c
5309 ac_cpp='$CPP $CPPFLAGS'
5310 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5311 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5312 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5313
5314 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5315 CXXFLAGS="$pgac_save_CXXFLAGS"
5316 CXX="$pgac_save_CXX"
5317 fi
5318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5319 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5320 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5321   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5322 fi
5323
5324
5325   # This was included in -Wall/-Wformat in older GCC versions
5326
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5328 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5329 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5330   $as_echo_n "(cached) " >&6
5331 else
5332   pgac_save_CFLAGS=$CFLAGS
5333 pgac_save_CC=$CC
5334 CC=${CC}
5335 CFLAGS="${CFLAGS} -Wformat-security"
5336 ac_save_c_werror_flag=$ac_c_werror_flag
5337 ac_c_werror_flag=yes
5338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5339 /* end confdefs.h.  */
5340
5341 int
5342 main ()
5343 {
5344
5345   ;
5346   return 0;
5347 }
5348 _ACEOF
5349 if ac_fn_c_try_compile "$LINENO"; then :
5350   pgac_cv_prog_CC_cflags__Wformat_security=yes
5351 else
5352   pgac_cv_prog_CC_cflags__Wformat_security=no
5353 fi
5354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5355 ac_c_werror_flag=$ac_save_c_werror_flag
5356 CFLAGS="$pgac_save_CFLAGS"
5357 CC="$pgac_save_CC"
5358 fi
5359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5360 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5361 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5362   CFLAGS="${CFLAGS} -Wformat-security"
5363 fi
5364
5365
5366   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5367 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5368 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5369   $as_echo_n "(cached) " >&6
5370 else
5371   pgac_save_CXXFLAGS=$CXXFLAGS
5372 pgac_save_CXX=$CXX
5373 CXX=${CXX}
5374 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5375 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5376 ac_cxx_werror_flag=yes
5377 ac_ext=cpp
5378 ac_cpp='$CXXCPP $CPPFLAGS'
5379 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5380 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5381 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5382
5383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5384 /* end confdefs.h.  */
5385
5386 int
5387 main ()
5388 {
5389
5390   ;
5391   return 0;
5392 }
5393 _ACEOF
5394 if ac_fn_cxx_try_compile "$LINENO"; then :
5395   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5396 else
5397   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5398 fi
5399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5400 ac_ext=c
5401 ac_cpp='$CPP $CPPFLAGS'
5402 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5403 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5404 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5405
5406 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5407 CXXFLAGS="$pgac_save_CXXFLAGS"
5408 CXX="$pgac_save_CXX"
5409 fi
5410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5411 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5412 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5413   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5414 fi
5415
5416
5417   # Disable strict-aliasing rules; needed for gcc 3.3+
5418
5419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5420 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5421 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5422   $as_echo_n "(cached) " >&6
5423 else
5424   pgac_save_CFLAGS=$CFLAGS
5425 pgac_save_CC=$CC
5426 CC=${CC}
5427 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5428 ac_save_c_werror_flag=$ac_c_werror_flag
5429 ac_c_werror_flag=yes
5430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5431 /* end confdefs.h.  */
5432
5433 int
5434 main ()
5435 {
5436
5437   ;
5438   return 0;
5439 }
5440 _ACEOF
5441 if ac_fn_c_try_compile "$LINENO"; then :
5442   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5443 else
5444   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5445 fi
5446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5447 ac_c_werror_flag=$ac_save_c_werror_flag
5448 CFLAGS="$pgac_save_CFLAGS"
5449 CC="$pgac_save_CC"
5450 fi
5451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5452 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5453 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5454   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5455 fi
5456
5457
5458   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5459 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5460 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5461   $as_echo_n "(cached) " >&6
5462 else
5463   pgac_save_CXXFLAGS=$CXXFLAGS
5464 pgac_save_CXX=$CXX
5465 CXX=${CXX}
5466 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5467 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5468 ac_cxx_werror_flag=yes
5469 ac_ext=cpp
5470 ac_cpp='$CXXCPP $CPPFLAGS'
5471 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5472 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5473 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5474
5475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476 /* end confdefs.h.  */
5477
5478 int
5479 main ()
5480 {
5481
5482   ;
5483   return 0;
5484 }
5485 _ACEOF
5486 if ac_fn_cxx_try_compile "$LINENO"; then :
5487   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5488 else
5489   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5490 fi
5491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5492 ac_ext=c
5493 ac_cpp='$CPP $CPPFLAGS'
5494 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5495 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5496 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5497
5498 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5499 CXXFLAGS="$pgac_save_CXXFLAGS"
5500 CXX="$pgac_save_CXX"
5501 fi
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5503 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5504 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5505   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5506 fi
5507
5508
5509   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5510
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5512 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5513 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5514   $as_echo_n "(cached) " >&6
5515 else
5516   pgac_save_CFLAGS=$CFLAGS
5517 pgac_save_CC=$CC
5518 CC=${CC}
5519 CFLAGS="${CFLAGS} -fwrapv"
5520 ac_save_c_werror_flag=$ac_c_werror_flag
5521 ac_c_werror_flag=yes
5522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5523 /* end confdefs.h.  */
5524
5525 int
5526 main ()
5527 {
5528
5529   ;
5530   return 0;
5531 }
5532 _ACEOF
5533 if ac_fn_c_try_compile "$LINENO"; then :
5534   pgac_cv_prog_CC_cflags__fwrapv=yes
5535 else
5536   pgac_cv_prog_CC_cflags__fwrapv=no
5537 fi
5538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5539 ac_c_werror_flag=$ac_save_c_werror_flag
5540 CFLAGS="$pgac_save_CFLAGS"
5541 CC="$pgac_save_CC"
5542 fi
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5544 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5545 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5546   CFLAGS="${CFLAGS} -fwrapv"
5547 fi
5548
5549
5550   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5551 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5552 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5553   $as_echo_n "(cached) " >&6
5554 else
5555   pgac_save_CXXFLAGS=$CXXFLAGS
5556 pgac_save_CXX=$CXX
5557 CXX=${CXX}
5558 CXXFLAGS="${CXXFLAGS} -fwrapv"
5559 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5560 ac_cxx_werror_flag=yes
5561 ac_ext=cpp
5562 ac_cpp='$CXXCPP $CPPFLAGS'
5563 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5564 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5565 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5566
5567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5568 /* end confdefs.h.  */
5569
5570 int
5571 main ()
5572 {
5573
5574   ;
5575   return 0;
5576 }
5577 _ACEOF
5578 if ac_fn_cxx_try_compile "$LINENO"; then :
5579   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5580 else
5581   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5582 fi
5583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5584 ac_ext=c
5585 ac_cpp='$CPP $CPPFLAGS'
5586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5589
5590 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5591 CXXFLAGS="$pgac_save_CXXFLAGS"
5592 CXX="$pgac_save_CXX"
5593 fi
5594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5595 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5596 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5597   CXXFLAGS="${CXXFLAGS} -fwrapv"
5598 fi
5599
5600
5601   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5602
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5604 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5605 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5606   $as_echo_n "(cached) " >&6
5607 else
5608   pgac_save_CFLAGS=$CFLAGS
5609 pgac_save_CC=$CC
5610 CC=${CC}
5611 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5612 ac_save_c_werror_flag=$ac_c_werror_flag
5613 ac_c_werror_flag=yes
5614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5615 /* end confdefs.h.  */
5616
5617 int
5618 main ()
5619 {
5620
5621   ;
5622   return 0;
5623 }
5624 _ACEOF
5625 if ac_fn_c_try_compile "$LINENO"; then :
5626   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5627 else
5628   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5629 fi
5630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5631 ac_c_werror_flag=$ac_save_c_werror_flag
5632 CFLAGS="$pgac_save_CFLAGS"
5633 CC="$pgac_save_CC"
5634 fi
5635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5636 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5637 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5638   CFLAGS="${CFLAGS} -fexcess-precision=standard"
5639 fi
5640
5641
5642   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5643 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5644 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5645   $as_echo_n "(cached) " >&6
5646 else
5647   pgac_save_CXXFLAGS=$CXXFLAGS
5648 pgac_save_CXX=$CXX
5649 CXX=${CXX}
5650 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5651 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5652 ac_cxx_werror_flag=yes
5653 ac_ext=cpp
5654 ac_cpp='$CXXCPP $CPPFLAGS'
5655 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5656 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5657 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5658
5659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5660 /* end confdefs.h.  */
5661
5662 int
5663 main ()
5664 {
5665
5666   ;
5667   return 0;
5668 }
5669 _ACEOF
5670 if ac_fn_cxx_try_compile "$LINENO"; then :
5671   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5672 else
5673   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5674 fi
5675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5676 ac_ext=c
5677 ac_cpp='$CPP $CPPFLAGS'
5678 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5679 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5680 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5681
5682 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5683 CXXFLAGS="$pgac_save_CXXFLAGS"
5684 CXX="$pgac_save_CXX"
5685 fi
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5687 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5688 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5689   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5690 fi
5691
5692
5693   # Optimization flags for specific files that benefit from vectorization
5694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5695 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5696 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5697   $as_echo_n "(cached) " >&6
5698 else
5699   pgac_save_CFLAGS=$CFLAGS
5700 pgac_save_CC=$CC
5701 CC=${CC}
5702 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5703 ac_save_c_werror_flag=$ac_c_werror_flag
5704 ac_c_werror_flag=yes
5705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5706 /* end confdefs.h.  */
5707
5708 int
5709 main ()
5710 {
5711
5712   ;
5713   return 0;
5714 }
5715 _ACEOF
5716 if ac_fn_c_try_compile "$LINENO"; then :
5717   pgac_cv_prog_CC_cflags__funroll_loops=yes
5718 else
5719   pgac_cv_prog_CC_cflags__funroll_loops=no
5720 fi
5721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5722 ac_c_werror_flag=$ac_save_c_werror_flag
5723 CFLAGS="$pgac_save_CFLAGS"
5724 CC="$pgac_save_CC"
5725 fi
5726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5727 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5728 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5729   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5730 fi
5731
5732
5733   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5734 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5735 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5736   $as_echo_n "(cached) " >&6
5737 else
5738   pgac_save_CFLAGS=$CFLAGS
5739 pgac_save_CC=$CC
5740 CC=${CC}
5741 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5742 ac_save_c_werror_flag=$ac_c_werror_flag
5743 ac_c_werror_flag=yes
5744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5745 /* end confdefs.h.  */
5746
5747 int
5748 main ()
5749 {
5750
5751   ;
5752   return 0;
5753 }
5754 _ACEOF
5755 if ac_fn_c_try_compile "$LINENO"; then :
5756   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5757 else
5758   pgac_cv_prog_CC_cflags__ftree_vectorize=no
5759 fi
5760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5761 ac_c_werror_flag=$ac_save_c_werror_flag
5762 CFLAGS="$pgac_save_CFLAGS"
5763 CC="$pgac_save_CC"
5764 fi
5765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5766 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5767 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5768   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5769 fi
5770
5771
5772   # We want to suppress clang's unhelpful unused-command-line-argument warnings
5773   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5774   # test for the positive form and if that works, add the negative form
5775   NOT_THE_CFLAGS=""
5776   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5777 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5778 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} 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="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
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__Wunused_command_line_argument=yes
5800 else
5801   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=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__Wunused_command_line_argument" >&5
5809 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
5810 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
5811   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5812 fi
5813
5814
5815   if test -n "$NOT_THE_CFLAGS"; then
5816     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
5817   fi
5818   # Similarly disable useless truncation warnings from gcc 8+
5819   NOT_THE_CFLAGS=""
5820   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
5821 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
5822 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
5823   $as_echo_n "(cached) " >&6
5824 else
5825   pgac_save_CFLAGS=$CFLAGS
5826 pgac_save_CC=$CC
5827 CC=${CC}
5828 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
5829 ac_save_c_werror_flag=$ac_c_werror_flag
5830 ac_c_werror_flag=yes
5831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5832 /* end confdefs.h.  */
5833
5834 int
5835 main ()
5836 {
5837
5838   ;
5839   return 0;
5840 }
5841 _ACEOF
5842 if ac_fn_c_try_compile "$LINENO"; then :
5843   pgac_cv_prog_CC_cflags__Wformat_truncation=yes
5844 else
5845   pgac_cv_prog_CC_cflags__Wformat_truncation=no
5846 fi
5847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5848 ac_c_werror_flag=$ac_save_c_werror_flag
5849 CFLAGS="$pgac_save_CFLAGS"
5850 CC="$pgac_save_CC"
5851 fi
5852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
5853 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
5854 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
5855   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
5856 fi
5857
5858
5859   if test -n "$NOT_THE_CFLAGS"; then
5860     CFLAGS="$CFLAGS -Wno-format-truncation"
5861   fi
5862   NOT_THE_CFLAGS=""
5863   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
5864 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
5865 if ${pgac_cv_prog_CC_cflags__Wstringop_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} -Wstringop-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__Wstringop_truncation=yes
5887 else
5888   pgac_cv_prog_CC_cflags__Wstringop_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__Wstringop_truncation" >&5
5896 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
5897 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
5898   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
5899 fi
5900
5901
5902   if test -n "$NOT_THE_CFLAGS"; then
5903     CFLAGS="$CFLAGS -Wno-stringop-truncation"
5904   fi
5905 elif test "$ICC" = yes; then
5906   # Intel's compiler has a bug/misoptimization in checking for
5907   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
5908
5909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
5910 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
5911 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
5912   $as_echo_n "(cached) " >&6
5913 else
5914   pgac_save_CFLAGS=$CFLAGS
5915 pgac_save_CC=$CC
5916 CC=${CC}
5917 CFLAGS="${CFLAGS} -mp1"
5918 ac_save_c_werror_flag=$ac_c_werror_flag
5919 ac_c_werror_flag=yes
5920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5921 /* end confdefs.h.  */
5922
5923 int
5924 main ()
5925 {
5926
5927   ;
5928   return 0;
5929 }
5930 _ACEOF
5931 if ac_fn_c_try_compile "$LINENO"; then :
5932   pgac_cv_prog_CC_cflags__mp1=yes
5933 else
5934   pgac_cv_prog_CC_cflags__mp1=no
5935 fi
5936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5937 ac_c_werror_flag=$ac_save_c_werror_flag
5938 CFLAGS="$pgac_save_CFLAGS"
5939 CC="$pgac_save_CC"
5940 fi
5941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
5942 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
5943 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
5944   CFLAGS="${CFLAGS} -mp1"
5945 fi
5946
5947
5948   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
5949 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
5950 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
5951   $as_echo_n "(cached) " >&6
5952 else
5953   pgac_save_CXXFLAGS=$CXXFLAGS
5954 pgac_save_CXX=$CXX
5955 CXX=${CXX}
5956 CXXFLAGS="${CXXFLAGS} -mp1"
5957 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5958 ac_cxx_werror_flag=yes
5959 ac_ext=cpp
5960 ac_cpp='$CXXCPP $CPPFLAGS'
5961 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5962 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5963 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5964
5965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5966 /* end confdefs.h.  */
5967
5968 int
5969 main ()
5970 {
5971
5972   ;
5973   return 0;
5974 }
5975 _ACEOF
5976 if ac_fn_cxx_try_compile "$LINENO"; then :
5977   pgac_cv_prog_CXX_cxxflags__mp1=yes
5978 else
5979   pgac_cv_prog_CXX_cxxflags__mp1=no
5980 fi
5981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5982 ac_ext=c
5983 ac_cpp='$CPP $CPPFLAGS'
5984 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5985 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5986 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5987
5988 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5989 CXXFLAGS="$pgac_save_CXXFLAGS"
5990 CXX="$pgac_save_CXX"
5991 fi
5992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
5993 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
5994 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
5995   CXXFLAGS="${CXXFLAGS} -mp1"
5996 fi
5997
5998
5999   # Make sure strict aliasing is off (though this is said to be the default)
6000
6001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6002 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6003 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6004   $as_echo_n "(cached) " >&6
6005 else
6006   pgac_save_CFLAGS=$CFLAGS
6007 pgac_save_CC=$CC
6008 CC=${CC}
6009 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6010 ac_save_c_werror_flag=$ac_c_werror_flag
6011 ac_c_werror_flag=yes
6012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6013 /* end confdefs.h.  */
6014
6015 int
6016 main ()
6017 {
6018
6019   ;
6020   return 0;
6021 }
6022 _ACEOF
6023 if ac_fn_c_try_compile "$LINENO"; then :
6024   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6025 else
6026   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6027 fi
6028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6029 ac_c_werror_flag=$ac_save_c_werror_flag
6030 CFLAGS="$pgac_save_CFLAGS"
6031 CC="$pgac_save_CC"
6032 fi
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6034 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6035 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6036   CFLAGS="${CFLAGS} -fno-strict-aliasing"
6037 fi
6038
6039
6040   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6041 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6042 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6043   $as_echo_n "(cached) " >&6
6044 else
6045   pgac_save_CXXFLAGS=$CXXFLAGS
6046 pgac_save_CXX=$CXX
6047 CXX=${CXX}
6048 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6049 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6050 ac_cxx_werror_flag=yes
6051 ac_ext=cpp
6052 ac_cpp='$CXXCPP $CPPFLAGS'
6053 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6054 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6055 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6056
6057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6058 /* end confdefs.h.  */
6059
6060 int
6061 main ()
6062 {
6063
6064   ;
6065   return 0;
6066 }
6067 _ACEOF
6068 if ac_fn_cxx_try_compile "$LINENO"; then :
6069   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6070 else
6071   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6072 fi
6073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6074 ac_ext=c
6075 ac_cpp='$CPP $CPPFLAGS'
6076 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6077 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6078 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6079
6080 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6081 CXXFLAGS="$pgac_save_CXXFLAGS"
6082 CXX="$pgac_save_CXX"
6083 fi
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6085 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6086 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6087   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6088 fi
6089
6090
6091 elif test "$PORTNAME" = "aix"; then
6092   # AIX's xlc has to have strict aliasing turned off too
6093
6094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6095 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6096 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6097   $as_echo_n "(cached) " >&6
6098 else
6099   pgac_save_CFLAGS=$CFLAGS
6100 pgac_save_CC=$CC
6101 CC=${CC}
6102 CFLAGS="${CFLAGS} -qnoansialias"
6103 ac_save_c_werror_flag=$ac_c_werror_flag
6104 ac_c_werror_flag=yes
6105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6106 /* end confdefs.h.  */
6107
6108 int
6109 main ()
6110 {
6111
6112   ;
6113   return 0;
6114 }
6115 _ACEOF
6116 if ac_fn_c_try_compile "$LINENO"; then :
6117   pgac_cv_prog_CC_cflags__qnoansialias=yes
6118 else
6119   pgac_cv_prog_CC_cflags__qnoansialias=no
6120 fi
6121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6122 ac_c_werror_flag=$ac_save_c_werror_flag
6123 CFLAGS="$pgac_save_CFLAGS"
6124 CC="$pgac_save_CC"
6125 fi
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6127 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6128 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6129   CFLAGS="${CFLAGS} -qnoansialias"
6130 fi
6131
6132
6133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6134 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6135 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6136   $as_echo_n "(cached) " >&6
6137 else
6138   pgac_save_CXXFLAGS=$CXXFLAGS
6139 pgac_save_CXX=$CXX
6140 CXX=${CXX}
6141 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6142 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6143 ac_cxx_werror_flag=yes
6144 ac_ext=cpp
6145 ac_cpp='$CXXCPP $CPPFLAGS'
6146 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6147 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6148 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6149
6150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6151 /* end confdefs.h.  */
6152
6153 int
6154 main ()
6155 {
6156
6157   ;
6158   return 0;
6159 }
6160 _ACEOF
6161 if ac_fn_cxx_try_compile "$LINENO"; then :
6162   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6163 else
6164   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6165 fi
6166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6167 ac_ext=c
6168 ac_cpp='$CPP $CPPFLAGS'
6169 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6170 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6171 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6172
6173 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6174 CXXFLAGS="$pgac_save_CXXFLAGS"
6175 CXX="$pgac_save_CXX"
6176 fi
6177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6178 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6179 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6180   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6181 fi
6182
6183
6184
6185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6186 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6187 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6188   $as_echo_n "(cached) " >&6
6189 else
6190   pgac_save_CFLAGS=$CFLAGS
6191 pgac_save_CC=$CC
6192 CC=${CC}
6193 CFLAGS="${CFLAGS} -qlonglong"
6194 ac_save_c_werror_flag=$ac_c_werror_flag
6195 ac_c_werror_flag=yes
6196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6197 /* end confdefs.h.  */
6198
6199 int
6200 main ()
6201 {
6202
6203   ;
6204   return 0;
6205 }
6206 _ACEOF
6207 if ac_fn_c_try_compile "$LINENO"; then :
6208   pgac_cv_prog_CC_cflags__qlonglong=yes
6209 else
6210   pgac_cv_prog_CC_cflags__qlonglong=no
6211 fi
6212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6213 ac_c_werror_flag=$ac_save_c_werror_flag
6214 CFLAGS="$pgac_save_CFLAGS"
6215 CC="$pgac_save_CC"
6216 fi
6217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6218 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6219 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6220   CFLAGS="${CFLAGS} -qlonglong"
6221 fi
6222
6223
6224   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6225 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6226 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6227   $as_echo_n "(cached) " >&6
6228 else
6229   pgac_save_CXXFLAGS=$CXXFLAGS
6230 pgac_save_CXX=$CXX
6231 CXX=${CXX}
6232 CXXFLAGS="${CXXFLAGS} -qlonglong"
6233 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6234 ac_cxx_werror_flag=yes
6235 ac_ext=cpp
6236 ac_cpp='$CXXCPP $CPPFLAGS'
6237 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6238 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6239 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6240
6241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6242 /* end confdefs.h.  */
6243
6244 int
6245 main ()
6246 {
6247
6248   ;
6249   return 0;
6250 }
6251 _ACEOF
6252 if ac_fn_cxx_try_compile "$LINENO"; then :
6253   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6254 else
6255   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6256 fi
6257 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6258 ac_ext=c
6259 ac_cpp='$CPP $CPPFLAGS'
6260 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6261 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6262 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6263
6264 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6265 CXXFLAGS="$pgac_save_CXXFLAGS"
6266 CXX="$pgac_save_CXX"
6267 fi
6268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6269 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6270 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6271   CXXFLAGS="${CXXFLAGS} -qlonglong"
6272 fi
6273
6274
6275 elif test "$PORTNAME" = "hpux"; then
6276   # On some versions of HP-UX, libm functions do not set errno by default.
6277   # Fix that by using +Olibmerrno if the compiler recognizes it.
6278
6279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6280 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6281 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6282   $as_echo_n "(cached) " >&6
6283 else
6284   pgac_save_CFLAGS=$CFLAGS
6285 pgac_save_CC=$CC
6286 CC=${CC}
6287 CFLAGS="${CFLAGS} +Olibmerrno"
6288 ac_save_c_werror_flag=$ac_c_werror_flag
6289 ac_c_werror_flag=yes
6290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6291 /* end confdefs.h.  */
6292
6293 int
6294 main ()
6295 {
6296
6297   ;
6298   return 0;
6299 }
6300 _ACEOF
6301 if ac_fn_c_try_compile "$LINENO"; then :
6302   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6303 else
6304   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6305 fi
6306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6307 ac_c_werror_flag=$ac_save_c_werror_flag
6308 CFLAGS="$pgac_save_CFLAGS"
6309 CC="$pgac_save_CC"
6310 fi
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6312 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6313 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6314   CFLAGS="${CFLAGS} +Olibmerrno"
6315 fi
6316
6317
6318   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6319 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6320 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6321   $as_echo_n "(cached) " >&6
6322 else
6323   pgac_save_CXXFLAGS=$CXXFLAGS
6324 pgac_save_CXX=$CXX
6325 CXX=${CXX}
6326 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6327 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6328 ac_cxx_werror_flag=yes
6329 ac_ext=cpp
6330 ac_cpp='$CXXCPP $CPPFLAGS'
6331 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6332 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6333 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6334
6335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6336 /* end confdefs.h.  */
6337
6338 int
6339 main ()
6340 {
6341
6342   ;
6343   return 0;
6344 }
6345 _ACEOF
6346 if ac_fn_cxx_try_compile "$LINENO"; then :
6347   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6348 else
6349   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6350 fi
6351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6352 ac_ext=c
6353 ac_cpp='$CPP $CPPFLAGS'
6354 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6355 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6356 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6357
6358 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6359 CXXFLAGS="$pgac_save_CXXFLAGS"
6360 CXX="$pgac_save_CXX"
6361 fi
6362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6363 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6364 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6365   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6366 fi
6367
6368
6369 fi
6370
6371 CFLAGS_VECTOR=$CFLAGS_VECTOR
6372
6373
6374 # Determine flags used to emit bitcode for JIT inlining. Need to test
6375 # for behaviour changing compiler flags, to keep compatibility with
6376 # compiler used for normal postgres code.
6377 if test "$with_llvm" = yes ; then
6378   CLANGXX="$CLANG -xc++"
6379
6380   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6381 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6382 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6383   $as_echo_n "(cached) " >&6
6384 else
6385   pgac_save_CFLAGS=$CFLAGS
6386 pgac_save_CC=$CC
6387 CC=${CLANG}
6388 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6389 ac_save_c_werror_flag=$ac_c_werror_flag
6390 ac_c_werror_flag=yes
6391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6392 /* end confdefs.h.  */
6393
6394 int
6395 main ()
6396 {
6397
6398   ;
6399   return 0;
6400 }
6401 _ACEOF
6402 if ac_fn_c_try_compile "$LINENO"; then :
6403   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6404 else
6405   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6406 fi
6407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6408 ac_c_werror_flag=$ac_save_c_werror_flag
6409 CFLAGS="$pgac_save_CFLAGS"
6410 CC="$pgac_save_CC"
6411 fi
6412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6413 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6414 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6415   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6416 fi
6417
6418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6419 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6420 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6421   $as_echo_n "(cached) " >&6
6422 else
6423   pgac_save_CXXFLAGS=$CXXFLAGS
6424 pgac_save_CXX=$CXX
6425 CXX=${CLANGXX}
6426 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6427 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6428 ac_cxx_werror_flag=yes
6429 ac_ext=cpp
6430 ac_cpp='$CXXCPP $CPPFLAGS'
6431 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6432 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6433 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6434
6435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6436 /* end confdefs.h.  */
6437
6438 int
6439 main ()
6440 {
6441
6442   ;
6443   return 0;
6444 }
6445 _ACEOF
6446 if ac_fn_cxx_try_compile "$LINENO"; then :
6447   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6448 else
6449   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6450 fi
6451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6452 ac_ext=c
6453 ac_cpp='$CPP $CPPFLAGS'
6454 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6455 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6456 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6457
6458 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6459 CXXFLAGS="$pgac_save_CXXFLAGS"
6460 CXX="$pgac_save_CXX"
6461 fi
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6463 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6464 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6465   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6466 fi
6467
6468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6469 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6470 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6471   $as_echo_n "(cached) " >&6
6472 else
6473   pgac_save_CFLAGS=$CFLAGS
6474 pgac_save_CC=$CC
6475 CC=${CLANG}
6476 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6477 ac_save_c_werror_flag=$ac_c_werror_flag
6478 ac_c_werror_flag=yes
6479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6480 /* end confdefs.h.  */
6481
6482 int
6483 main ()
6484 {
6485
6486   ;
6487   return 0;
6488 }
6489 _ACEOF
6490 if ac_fn_c_try_compile "$LINENO"; then :
6491   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6492 else
6493   pgac_cv_prog_CLANG_cflags__fwrapv=no
6494 fi
6495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6496 ac_c_werror_flag=$ac_save_c_werror_flag
6497 CFLAGS="$pgac_save_CFLAGS"
6498 CC="$pgac_save_CC"
6499 fi
6500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6501 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6502 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6503   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6504 fi
6505
6506   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6507 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6508 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6509   $as_echo_n "(cached) " >&6
6510 else
6511   pgac_save_CXXFLAGS=$CXXFLAGS
6512 pgac_save_CXX=$CXX
6513 CXX=${CLANGXX}
6514 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6515 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6516 ac_cxx_werror_flag=yes
6517 ac_ext=cpp
6518 ac_cpp='$CXXCPP $CPPFLAGS'
6519 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6520 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6521 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6522
6523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6524 /* end confdefs.h.  */
6525
6526 int
6527 main ()
6528 {
6529
6530   ;
6531   return 0;
6532 }
6533 _ACEOF
6534 if ac_fn_cxx_try_compile "$LINENO"; then :
6535   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6536 else
6537   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6538 fi
6539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6540 ac_ext=c
6541 ac_cpp='$CPP $CPPFLAGS'
6542 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6543 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6544 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6545
6546 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6547 CXXFLAGS="$pgac_save_CXXFLAGS"
6548 CXX="$pgac_save_CXX"
6549 fi
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6551 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6552 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6553   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6554 fi
6555
6556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6557 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6558 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6559   $as_echo_n "(cached) " >&6
6560 else
6561   pgac_save_CFLAGS=$CFLAGS
6562 pgac_save_CC=$CC
6563 CC=${CLANG}
6564 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6565 ac_save_c_werror_flag=$ac_c_werror_flag
6566 ac_c_werror_flag=yes
6567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6568 /* end confdefs.h.  */
6569
6570 int
6571 main ()
6572 {
6573
6574   ;
6575   return 0;
6576 }
6577 _ACEOF
6578 if ac_fn_c_try_compile "$LINENO"; then :
6579   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6580 else
6581   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6582 fi
6583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6584 ac_c_werror_flag=$ac_save_c_werror_flag
6585 CFLAGS="$pgac_save_CFLAGS"
6586 CC="$pgac_save_CC"
6587 fi
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6589 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6590 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6591   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6592 fi
6593
6594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6595 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6596 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6597   $as_echo_n "(cached) " >&6
6598 else
6599   pgac_save_CXXFLAGS=$CXXFLAGS
6600 pgac_save_CXX=$CXX
6601 CXX=${CLANGXX}
6602 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6603 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6604 ac_cxx_werror_flag=yes
6605 ac_ext=cpp
6606 ac_cpp='$CXXCPP $CPPFLAGS'
6607 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6608 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6609 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6610
6611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6612 /* end confdefs.h.  */
6613
6614 int
6615 main ()
6616 {
6617
6618   ;
6619   return 0;
6620 }
6621 _ACEOF
6622 if ac_fn_cxx_try_compile "$LINENO"; then :
6623   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6624 else
6625   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6626 fi
6627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6628 ac_ext=c
6629 ac_cpp='$CPP $CPPFLAGS'
6630 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6631 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6632 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6633
6634 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6635 CXXFLAGS="$pgac_save_CXXFLAGS"
6636 CXX="$pgac_save_CXX"
6637 fi
6638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6639 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6640 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6641   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6642 fi
6643
6644 fi
6645
6646 # supply -g if --enable-debug
6647 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6648   CFLAGS="$CFLAGS -g"
6649 fi
6650
6651 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6652   CXXFLAGS="$CXXFLAGS -g"
6653 fi
6654
6655 # enable code coverage if --enable-coverage
6656 if test "$enable_coverage" = yes; then
6657   if test "$GCC" = yes; then
6658     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6659     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6660   else
6661     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6662   fi
6663 fi
6664
6665 # enable profiling if --enable-profiling
6666 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6667   if test "$GCC" = yes; then
6668
6669 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6670
6671     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6672     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6673   else
6674     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6675   fi
6676 fi
6677
6678 # We already have this in Makefile.win32, but configure needs it too
6679 if test "$PORTNAME" = "win32"; then
6680   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6681 fi
6682
6683 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6684 # user-specified flags (if any) at the end.  This lets users override
6685 # the automatic additions.
6686 CFLAGS="$CFLAGS $user_CFLAGS"
6687 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6688 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6689 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6690
6691 BITCODE_CFLAGS=$BITCODE_CFLAGS
6692
6693 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6694
6695
6696 # Check if the compiler still works with the final flag settings
6697 # (note, we're not checking that for CXX, which is optional)
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6699 $as_echo_n "checking whether the C compiler still works... " >&6; }
6700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6701 /* end confdefs.h.  */
6702
6703 int
6704 main ()
6705 {
6706 return 0;
6707   ;
6708   return 0;
6709 }
6710 _ACEOF
6711 if ac_fn_c_try_link "$LINENO"; then :
6712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6713 $as_echo "yes" >&6; }
6714 else
6715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6716 $as_echo "no" >&6; }
6717    as_fn_error $? "cannot proceed" "$LINENO" 5
6718 fi
6719 rm -f core conftest.err conftest.$ac_objext \
6720     conftest$ac_exeext conftest.$ac_ext
6721
6722 # Defend against gcc -ffast-math
6723 if test "$GCC" = yes; then
6724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6725 /* end confdefs.h.  */
6726
6727 int
6728 main ()
6729 {
6730 #ifdef __FAST_MATH__
6731 choke me
6732 #endif
6733   ;
6734   return 0;
6735 }
6736 _ACEOF
6737 if ac_fn_c_try_compile "$LINENO"; then :
6738
6739 else
6740   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6741 fi
6742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6743 fi
6744
6745 # Defend against clang being used on x86-32 without SSE2 enabled.  As current
6746 # versions of clang do not understand -fexcess-precision=standard, the use of
6747 # x87 floating point operations leads to problems like isinf possibly returning
6748 # false for a value that is infinite when converted from the 80bit register to
6749 # the 8byte memory representation.
6750 #
6751 # Only perform the test if the compiler doesn't understand
6752 # -fexcess-precision=standard, that way a potentially fixed compiler will work
6753 # automatically.
6754 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
6755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6756 /* end confdefs.h.  */
6757
6758 int
6759 main ()
6760 {
6761
6762 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
6763 choke me
6764 #endif
6765
6766   ;
6767   return 0;
6768 }
6769 _ACEOF
6770 if ac_fn_c_try_compile "$LINENO"; then :
6771
6772 else
6773   as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
6774 fi
6775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6776 fi
6777
6778 ac_ext=c
6779 ac_cpp='$CPP $CPPFLAGS'
6780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6784 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6785 # On Suns, sometimes $CPP names a directory.
6786 if test -n "$CPP" && test -d "$CPP"; then
6787   CPP=
6788 fi
6789 if test -z "$CPP"; then
6790   if ${ac_cv_prog_CPP+:} false; then :
6791   $as_echo_n "(cached) " >&6
6792 else
6793       # Double quotes because CPP needs to be expanded
6794     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6795     do
6796       ac_preproc_ok=false
6797 for ac_c_preproc_warn_flag in '' yes
6798 do
6799   # Use a header file that comes with gcc, so configuring glibc
6800   # with a fresh cross-compiler works.
6801   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6802   # <limits.h> exists even on freestanding compilers.
6803   # On the NeXT, cc -E runs the code through the compiler's parser,
6804   # not just through cpp. "Syntax error" is here to catch this case.
6805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6806 /* end confdefs.h.  */
6807 #ifdef __STDC__
6808 # include <limits.h>
6809 #else
6810 # include <assert.h>
6811 #endif
6812                      Syntax error
6813 _ACEOF
6814 if ac_fn_c_try_cpp "$LINENO"; then :
6815
6816 else
6817   # Broken: fails on valid input.
6818 continue
6819 fi
6820 rm -f conftest.err conftest.i conftest.$ac_ext
6821
6822   # OK, works on sane cases.  Now check whether nonexistent headers
6823   # can be detected and how.
6824   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6825 /* end confdefs.h.  */
6826 #include <ac_nonexistent.h>
6827 _ACEOF
6828 if ac_fn_c_try_cpp "$LINENO"; then :
6829   # Broken: success on invalid input.
6830 continue
6831 else
6832   # Passes both tests.
6833 ac_preproc_ok=:
6834 break
6835 fi
6836 rm -f conftest.err conftest.i conftest.$ac_ext
6837
6838 done
6839 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6840 rm -f conftest.i conftest.err conftest.$ac_ext
6841 if $ac_preproc_ok; then :
6842   break
6843 fi
6844
6845     done
6846     ac_cv_prog_CPP=$CPP
6847
6848 fi
6849   CPP=$ac_cv_prog_CPP
6850 else
6851   ac_cv_prog_CPP=$CPP
6852 fi
6853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6854 $as_echo "$CPP" >&6; }
6855 ac_preproc_ok=false
6856 for ac_c_preproc_warn_flag in '' yes
6857 do
6858   # Use a header file that comes with gcc, so configuring glibc
6859   # with a fresh cross-compiler works.
6860   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6861   # <limits.h> exists even on freestanding compilers.
6862   # On the NeXT, cc -E runs the code through the compiler's parser,
6863   # not just through cpp. "Syntax error" is here to catch this case.
6864   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6865 /* end confdefs.h.  */
6866 #ifdef __STDC__
6867 # include <limits.h>
6868 #else
6869 # include <assert.h>
6870 #endif
6871                      Syntax error
6872 _ACEOF
6873 if ac_fn_c_try_cpp "$LINENO"; then :
6874
6875 else
6876   # Broken: fails on valid input.
6877 continue
6878 fi
6879 rm -f conftest.err conftest.i conftest.$ac_ext
6880
6881   # OK, works on sane cases.  Now check whether nonexistent headers
6882   # can be detected and how.
6883   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6884 /* end confdefs.h.  */
6885 #include <ac_nonexistent.h>
6886 _ACEOF
6887 if ac_fn_c_try_cpp "$LINENO"; then :
6888   # Broken: success on invalid input.
6889 continue
6890 else
6891   # Passes both tests.
6892 ac_preproc_ok=:
6893 break
6894 fi
6895 rm -f conftest.err conftest.i conftest.$ac_ext
6896
6897 done
6898 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6899 rm -f conftest.i conftest.err conftest.$ac_ext
6900 if $ac_preproc_ok; then :
6901
6902 else
6903   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6904 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6905 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6906 See \`config.log' for more details" "$LINENO" 5; }
6907 fi
6908
6909 ac_ext=c
6910 ac_cpp='$CPP $CPPFLAGS'
6911 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6912 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6913 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6914
6915
6916
6917
6918 #
6919 # Set up TAS assembly code if needed; the template file has now had its
6920 # chance to request this.
6921 #
6922 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
6923
6924
6925 if test "$need_tas" = yes ; then
6926   TAS=tas.o
6927 else
6928   TAS=""
6929 fi
6930
6931
6932
6933 #
6934 # Automatic dependency tracking
6935 #
6936
6937
6938 # Check whether --enable-depend was given.
6939 if test "${enable_depend+set}" = set; then :
6940   enableval=$enable_depend;
6941   case $enableval in
6942     yes)
6943       autodepend=yes
6944       ;;
6945     no)
6946       :
6947       ;;
6948     *)
6949       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
6950       ;;
6951   esac
6952
6953 else
6954   enable_depend=no
6955
6956 fi
6957
6958
6959
6960
6961
6962 #
6963 # Enable assert checks
6964 #
6965
6966
6967 # Check whether --enable-cassert was given.
6968 if test "${enable_cassert+set}" = set; then :
6969   enableval=$enable_cassert;
6970   case $enableval in
6971     yes)
6972
6973 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
6974
6975       ;;
6976     no)
6977       :
6978       ;;
6979     *)
6980       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
6981       ;;
6982   esac
6983
6984 else
6985   enable_cassert=no
6986
6987 fi
6988
6989
6990
6991
6992 #
6993 # Include directories
6994 #
6995 ac_save_IFS=$IFS
6996 IFS="${IFS}${PATH_SEPARATOR}"
6997 # SRCH_INC comes from the template file
6998 for dir in $with_includes $SRCH_INC; do
6999   if test -d "$dir"; then
7000     INCLUDES="$INCLUDES -I$dir"
7001   else
7002     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7003 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7004   fi
7005 done
7006 IFS=$ac_save_IFS
7007
7008
7009
7010 #
7011 # Library directories
7012 #
7013 ac_save_IFS=$IFS
7014 IFS="${IFS}${PATH_SEPARATOR}"
7015 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7016 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7017   if test -d "$dir"; then
7018     LIBDIRS="$LIBDIRS -L$dir"
7019   else
7020     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7021 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7022   fi
7023 done
7024 IFS=$ac_save_IFS
7025
7026 #
7027 # Enable thread-safe client libraries
7028 #
7029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7030 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7031
7032
7033 # Check whether --enable-thread-safety was given.
7034 if test "${enable_thread_safety+set}" = set; then :
7035   enableval=$enable_thread_safety;
7036   case $enableval in
7037     yes)
7038       :
7039       ;;
7040     no)
7041       :
7042       ;;
7043     *)
7044       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7045       ;;
7046   esac
7047
7048 else
7049   enable_thread_safety=yes
7050
7051 fi
7052
7053
7054 if test "$enable_thread_safety" = yes; then
7055
7056 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7057
7058 fi
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7060 $as_echo "$enable_thread_safety" >&6; }
7061
7062
7063 #
7064 # ICU
7065 #
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7067 $as_echo_n "checking whether to build with ICU support... " >&6; }
7068
7069
7070
7071 # Check whether --with-icu was given.
7072 if test "${with_icu+set}" = set; then :
7073   withval=$with_icu;
7074   case $withval in
7075     yes)
7076
7077 $as_echo "#define USE_ICU 1" >>confdefs.h
7078
7079       ;;
7080     no)
7081       :
7082       ;;
7083     *)
7084       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7085       ;;
7086   esac
7087
7088 else
7089   with_icu=no
7090
7091 fi
7092
7093
7094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7095 $as_echo "$with_icu" >&6; }
7096
7097
7098 if test "$with_icu" = yes; then
7099
7100
7101
7102
7103
7104
7105
7106 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7107         if test -n "$ac_tool_prefix"; then
7108   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7109 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7111 $as_echo_n "checking for $ac_word... " >&6; }
7112 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7113   $as_echo_n "(cached) " >&6
7114 else
7115   case $PKG_CONFIG in
7116   [\\/]* | ?:[\\/]*)
7117   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7118   ;;
7119   *)
7120   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7121 for as_dir in $PATH
7122 do
7123   IFS=$as_save_IFS
7124   test -z "$as_dir" && as_dir=.
7125     for ac_exec_ext in '' $ac_executable_extensions; do
7126   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7127     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7129     break 2
7130   fi
7131 done
7132   done
7133 IFS=$as_save_IFS
7134
7135   ;;
7136 esac
7137 fi
7138 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7139 if test -n "$PKG_CONFIG"; then
7140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7141 $as_echo "$PKG_CONFIG" >&6; }
7142 else
7143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7144 $as_echo "no" >&6; }
7145 fi
7146
7147
7148 fi
7149 if test -z "$ac_cv_path_PKG_CONFIG"; then
7150   ac_pt_PKG_CONFIG=$PKG_CONFIG
7151   # Extract the first word of "pkg-config", so it can be a program name with args.
7152 set dummy pkg-config; ac_word=$2
7153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7154 $as_echo_n "checking for $ac_word... " >&6; }
7155 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7156   $as_echo_n "(cached) " >&6
7157 else
7158   case $ac_pt_PKG_CONFIG in
7159   [\\/]* | ?:[\\/]*)
7160   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7161   ;;
7162   *)
7163   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7164 for as_dir in $PATH
7165 do
7166   IFS=$as_save_IFS
7167   test -z "$as_dir" && as_dir=.
7168     for ac_exec_ext in '' $ac_executable_extensions; do
7169   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7170     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7172     break 2
7173   fi
7174 done
7175   done
7176 IFS=$as_save_IFS
7177
7178   ;;
7179 esac
7180 fi
7181 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7182 if test -n "$ac_pt_PKG_CONFIG"; then
7183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7184 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7185 else
7186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7187 $as_echo "no" >&6; }
7188 fi
7189
7190   if test "x$ac_pt_PKG_CONFIG" = x; then
7191     PKG_CONFIG=""
7192   else
7193     case $cross_compiling:$ac_tool_warned in
7194 yes:)
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7196 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7197 ac_tool_warned=yes ;;
7198 esac
7199     PKG_CONFIG=$ac_pt_PKG_CONFIG
7200   fi
7201 else
7202   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7203 fi
7204
7205 fi
7206 if test -n "$PKG_CONFIG"; then
7207         _pkg_min_version=0.9.0
7208         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7209 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7210         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7211                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7212 $as_echo "yes" >&6; }
7213         else
7214                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7215 $as_echo "no" >&6; }
7216                 PKG_CONFIG=""
7217         fi
7218 fi
7219
7220 pkg_failed=no
7221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7222 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7223
7224 if test -n "$ICU_CFLAGS"; then
7225     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7226  elif test -n "$PKG_CONFIG"; then
7227     if test -n "$PKG_CONFIG" && \
7228     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7229   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7230   ac_status=$?
7231   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7232   test $ac_status = 0; }; then
7233   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7234                       test "x$?" != "x0" && pkg_failed=yes
7235 else
7236   pkg_failed=yes
7237 fi
7238  else
7239     pkg_failed=untried
7240 fi
7241 if test -n "$ICU_LIBS"; then
7242     pkg_cv_ICU_LIBS="$ICU_LIBS"
7243  elif test -n "$PKG_CONFIG"; then
7244     if test -n "$PKG_CONFIG" && \
7245     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7246   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7247   ac_status=$?
7248   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7249   test $ac_status = 0; }; then
7250   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7251                       test "x$?" != "x0" && pkg_failed=yes
7252 else
7253   pkg_failed=yes
7254 fi
7255  else
7256     pkg_failed=untried
7257 fi
7258
7259
7260
7261 if test $pkg_failed = yes; then
7262         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7263 $as_echo "no" >&6; }
7264
7265 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7266         _pkg_short_errors_supported=yes
7267 else
7268         _pkg_short_errors_supported=no
7269 fi
7270         if test $_pkg_short_errors_supported = yes; then
7271                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7272         else
7273                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7274         fi
7275         # Put the nasty error message in config.log where it belongs
7276         echo "$ICU_PKG_ERRORS" >&5
7277
7278         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7279
7280 $ICU_PKG_ERRORS
7281
7282 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7283 installed software in a non-standard prefix.
7284
7285 Alternatively, you may set the environment variables ICU_CFLAGS
7286 and ICU_LIBS to avoid the need to call pkg-config.
7287 See the pkg-config man page for more details." "$LINENO" 5
7288 elif test $pkg_failed = untried; then
7289         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7290 $as_echo "no" >&6; }
7291         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7292 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7293 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7294 is in your PATH or set the PKG_CONFIG environment variable to the full
7295 path to pkg-config.
7296
7297 Alternatively, you may set the environment variables ICU_CFLAGS
7298 and ICU_LIBS to avoid the need to call pkg-config.
7299 See the pkg-config man page for more details.
7300
7301 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7302 See \`config.log' for more details" "$LINENO" 5; }
7303 else
7304         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7305         ICU_LIBS=$pkg_cv_ICU_LIBS
7306         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7307 $as_echo "yes" >&6; }
7308
7309 fi
7310 fi
7311
7312 #
7313 # Optionally build Tcl modules (PL/Tcl)
7314 #
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7316 $as_echo_n "checking whether to build with Tcl... " >&6; }
7317
7318
7319
7320 # Check whether --with-tcl was given.
7321 if test "${with_tcl+set}" = set; then :
7322   withval=$with_tcl;
7323   case $withval in
7324     yes)
7325       :
7326       ;;
7327     no)
7328       :
7329       ;;
7330     *)
7331       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7332       ;;
7333   esac
7334
7335 else
7336   with_tcl=no
7337
7338 fi
7339
7340
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7342 $as_echo "$with_tcl" >&6; }
7343
7344
7345 # We see if the path to the Tcl/Tk configuration scripts is specified.
7346 # This will override the use of tclsh to find the paths to search.
7347
7348
7349
7350
7351 # Check whether --with-tclconfig was given.
7352 if test "${with_tclconfig+set}" = set; then :
7353   withval=$with_tclconfig;
7354   case $withval in
7355     yes)
7356       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7357       ;;
7358     no)
7359       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7360       ;;
7361     *)
7362
7363       ;;
7364   esac
7365
7366 fi
7367
7368
7369
7370 #
7371 # Optionally build Perl modules (PL/Perl)
7372 #
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7374 $as_echo_n "checking whether to build Perl modules... " >&6; }
7375
7376
7377
7378 # Check whether --with-perl was given.
7379 if test "${with_perl+set}" = set; then :
7380   withval=$with_perl;
7381   case $withval in
7382     yes)
7383       :
7384       ;;
7385     no)
7386       :
7387       ;;
7388     *)
7389       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7390       ;;
7391   esac
7392
7393 else
7394   with_perl=no
7395
7396 fi
7397
7398
7399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7400 $as_echo "$with_perl" >&6; }
7401
7402
7403 #
7404 # Optionally build Python modules (PL/Python)
7405 #
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7407 $as_echo_n "checking whether to build Python modules... " >&6; }
7408
7409
7410
7411 # Check whether --with-python was given.
7412 if test "${with_python+set}" = set; then :
7413   withval=$with_python;
7414   case $withval in
7415     yes)
7416       :
7417       ;;
7418     no)
7419       :
7420       ;;
7421     *)
7422       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7423       ;;
7424   esac
7425
7426 else
7427   with_python=no
7428
7429 fi
7430
7431
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7433 $as_echo "$with_python" >&6; }
7434
7435
7436 #
7437 # GSSAPI
7438 #
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7440 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7441
7442
7443
7444 # Check whether --with-gssapi was given.
7445 if test "${with_gssapi+set}" = set; then :
7446   withval=$with_gssapi;
7447   case $withval in
7448     yes)
7449
7450
7451 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7452
7453   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7454
7455       ;;
7456     no)
7457       :
7458       ;;
7459     *)
7460       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7461       ;;
7462   esac
7463
7464 else
7465   with_gssapi=no
7466
7467 fi
7468
7469
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7471 $as_echo "$with_gssapi" >&6; }
7472
7473
7474
7475
7476
7477
7478 #
7479 # Kerberos configuration parameters
7480 #
7481
7482
7483
7484 # Check whether --with-krb-srvnam was given.
7485 if test "${with_krb_srvnam+set}" = set; then :
7486   withval=$with_krb_srvnam;
7487   case $withval in
7488     yes)
7489       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7490       ;;
7491     no)
7492       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7493       ;;
7494     *)
7495
7496       ;;
7497   esac
7498
7499 else
7500   with_krb_srvnam="postgres"
7501 fi
7502
7503
7504
7505
7506 cat >>confdefs.h <<_ACEOF
7507 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7508 _ACEOF
7509
7510
7511
7512 #
7513 # PAM
7514 #
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7516 $as_echo_n "checking whether to build with PAM support... " >&6; }
7517
7518
7519
7520 # Check whether --with-pam was given.
7521 if test "${with_pam+set}" = set; then :
7522   withval=$with_pam;
7523   case $withval in
7524     yes)
7525
7526 $as_echo "#define USE_PAM 1" >>confdefs.h
7527
7528       ;;
7529     no)
7530       :
7531       ;;
7532     *)
7533       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7534       ;;
7535   esac
7536
7537 else
7538   with_pam=no
7539
7540 fi
7541
7542
7543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7544 $as_echo "$with_pam" >&6; }
7545
7546
7547 #
7548 # BSD AUTH
7549 #
7550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7551 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7552
7553
7554
7555 # Check whether --with-bsd-auth was given.
7556 if test "${with_bsd_auth+set}" = set; then :
7557   withval=$with_bsd_auth;
7558   case $withval in
7559     yes)
7560
7561 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7562
7563       ;;
7564     no)
7565       :
7566       ;;
7567     *)
7568       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7569       ;;
7570   esac
7571
7572 else
7573   with_bsd_auth=no
7574
7575 fi
7576
7577
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7579 $as_echo "$with_bsd_auth" >&6; }
7580
7581
7582 #
7583 # LDAP
7584 #
7585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7586 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7587
7588
7589
7590 # Check whether --with-ldap was given.
7591 if test "${with_ldap+set}" = set; then :
7592   withval=$with_ldap;
7593   case $withval in
7594     yes)
7595
7596 $as_echo "#define USE_LDAP 1" >>confdefs.h
7597
7598       ;;
7599     no)
7600       :
7601       ;;
7602     *)
7603       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7604       ;;
7605   esac
7606
7607 else
7608   with_ldap=no
7609
7610 fi
7611
7612
7613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7614 $as_echo "$with_ldap" >&6; }
7615
7616
7617
7618 #
7619 # Bonjour
7620 #
7621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7622 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7623
7624
7625
7626 # Check whether --with-bonjour was given.
7627 if test "${with_bonjour+set}" = set; then :
7628   withval=$with_bonjour;
7629   case $withval in
7630     yes)
7631
7632 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7633
7634       ;;
7635     no)
7636       :
7637       ;;
7638     *)
7639       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7640       ;;
7641   esac
7642
7643 else
7644   with_bonjour=no
7645
7646 fi
7647
7648
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7650 $as_echo "$with_bonjour" >&6; }
7651
7652
7653 #
7654 # OpenSSL
7655 #
7656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7657 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7658
7659
7660
7661 # Check whether --with-openssl was given.
7662 if test "${with_openssl+set}" = set; then :
7663   withval=$with_openssl;
7664   case $withval in
7665     yes)
7666
7667 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7668
7669       ;;
7670     no)
7671       :
7672       ;;
7673     *)
7674       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7675       ;;
7676   esac
7677
7678 else
7679   with_openssl=no
7680
7681 fi
7682
7683
7684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7685 $as_echo "$with_openssl" >&6; }
7686
7687
7688 #
7689 # SELinux
7690 #
7691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7692 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7693
7694
7695
7696 # Check whether --with-selinux was given.
7697 if test "${with_selinux+set}" = set; then :
7698   withval=$with_selinux;
7699   case $withval in
7700     yes)
7701       :
7702       ;;
7703     no)
7704       :
7705       ;;
7706     *)
7707       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7708       ;;
7709   esac
7710
7711 else
7712   with_selinux=no
7713
7714 fi
7715
7716
7717
7718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7719 $as_echo "$with_selinux" >&6; }
7720
7721 #
7722 # Systemd
7723 #
7724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7725 $as_echo_n "checking whether to build with systemd support... " >&6; }
7726
7727
7728
7729 # Check whether --with-systemd was given.
7730 if test "${with_systemd+set}" = set; then :
7731   withval=$with_systemd;
7732   case $withval in
7733     yes)
7734
7735 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7736
7737       ;;
7738     no)
7739       :
7740       ;;
7741     *)
7742       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7743       ;;
7744   esac
7745
7746 else
7747   with_systemd=no
7748
7749 fi
7750
7751
7752
7753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7754 $as_echo "$with_systemd" >&6; }
7755
7756 #
7757 # Readline
7758 #
7759
7760
7761
7762 # Check whether --with-readline was given.
7763 if test "${with_readline+set}" = set; then :
7764   withval=$with_readline;
7765   case $withval in
7766     yes)
7767       :
7768       ;;
7769     no)
7770       :
7771       ;;
7772     *)
7773       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7774       ;;
7775   esac
7776
7777 else
7778   with_readline=yes
7779
7780 fi
7781
7782
7783 # readline on MinGW has problems with backslashes in psql and other bugs.
7784 # This is particularly a problem with non-US code pages.
7785 # Therefore disable its use until we understand the cause. 2004-07-20
7786 if test "$PORTNAME" = "win32"; then
7787   if test "$with_readline" = yes; then
7788     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
7789 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
7790     with_readline=no
7791   fi
7792 fi
7793
7794
7795 #
7796 # Prefer libedit
7797 #
7798
7799
7800
7801 # Check whether --with-libedit-preferred was given.
7802 if test "${with_libedit_preferred+set}" = set; then :
7803   withval=$with_libedit_preferred;
7804   case $withval in
7805     yes)
7806       :
7807       ;;
7808     no)
7809       :
7810       ;;
7811     *)
7812       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
7813       ;;
7814   esac
7815
7816 else
7817   with_libedit_preferred=no
7818
7819 fi
7820
7821
7822
7823
7824 #
7825 # UUID library
7826 #
7827 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
7828 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
7829 # UUID library.  More than one of these might be present on a given platform,
7830 # so we make the user say which one she wants.
7831 #
7832
7833
7834
7835 # Check whether --with-uuid was given.
7836 if test "${with_uuid+set}" = set; then :
7837   withval=$with_uuid;
7838   case $withval in
7839     yes)
7840       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
7841       ;;
7842     no)
7843       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
7844       ;;
7845     *)
7846
7847       ;;
7848   esac
7849
7850 fi
7851
7852
7853 if test x"$with_uuid" = x"" ; then
7854   with_uuid=no
7855 fi
7856
7857
7858
7859 # Check whether --with-ossp-uuid was given.
7860 if test "${with_ossp_uuid+set}" = set; then :
7861   withval=$with_ossp_uuid;
7862   case $withval in
7863     yes)
7864       :
7865       ;;
7866     no)
7867       :
7868       ;;
7869     *)
7870       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
7871       ;;
7872   esac
7873
7874 else
7875   with_ossp_uuid=no
7876
7877 fi
7878
7879
7880 if test "$with_ossp_uuid" = yes ; then
7881   with_uuid=ossp
7882 fi
7883
7884 if test "$with_uuid" = bsd ; then
7885
7886 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
7887
7888   UUID_EXTRA_OBJS="md5.o sha1.o"
7889 elif test "$with_uuid" = e2fs ; then
7890
7891 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
7892
7893   UUID_EXTRA_OBJS="md5.o sha1.o"
7894 elif test "$with_uuid" = ossp ; then
7895
7896 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
7897
7898   UUID_EXTRA_OBJS=""
7899 elif test "$with_uuid" = no ; then
7900   UUID_EXTRA_OBJS=""
7901 else
7902   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
7903 fi
7904
7905
7906
7907
7908 #
7909 # XML
7910 #
7911
7912
7913
7914 # Check whether --with-libxml was given.
7915 if test "${with_libxml+set}" = set; then :
7916   withval=$with_libxml;
7917   case $withval in
7918     yes)
7919
7920 $as_echo "#define USE_LIBXML 1" >>confdefs.h
7921
7922       ;;
7923     no)
7924       :
7925       ;;
7926     *)
7927       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
7928       ;;
7929   esac
7930
7931 else
7932   with_libxml=no
7933
7934 fi
7935
7936
7937
7938 if test "$with_libxml" = yes ; then
7939   if test -z "$XML2_CONFIG"; then
7940   for ac_prog in xml2-config
7941 do
7942   # Extract the first word of "$ac_prog", so it can be a program name with args.
7943 set dummy $ac_prog; ac_word=$2
7944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7945 $as_echo_n "checking for $ac_word... " >&6; }
7946 if ${ac_cv_path_XML2_CONFIG+:} false; then :
7947   $as_echo_n "(cached) " >&6
7948 else
7949   case $XML2_CONFIG in
7950   [\\/]* | ?:[\\/]*)
7951   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
7952   ;;
7953   *)
7954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7955 for as_dir in $PATH
7956 do
7957   IFS=$as_save_IFS
7958   test -z "$as_dir" && as_dir=.
7959     for ac_exec_ext in '' $ac_executable_extensions; do
7960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7961     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7963     break 2
7964   fi
7965 done
7966   done
7967 IFS=$as_save_IFS
7968
7969   ;;
7970 esac
7971 fi
7972 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
7973 if test -n "$XML2_CONFIG"; then
7974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
7975 $as_echo "$XML2_CONFIG" >&6; }
7976 else
7977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7978 $as_echo "no" >&6; }
7979 fi
7980
7981
7982   test -n "$XML2_CONFIG" && break
7983 done
7984
7985 else
7986   # Report the value of XML2_CONFIG in configure's output in all cases.
7987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
7988 $as_echo_n "checking for XML2_CONFIG... " >&6; }
7989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
7990 $as_echo "$XML2_CONFIG" >&6; }
7991 fi
7992
7993   if test -n "$XML2_CONFIG"; then
7994     for pgac_option in `$XML2_CONFIG --cflags`; do
7995       case $pgac_option in
7996         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
7997       esac
7998     done
7999     for pgac_option in `$XML2_CONFIG --libs`; do
8000       case $pgac_option in
8001         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8002       esac
8003     done
8004   fi
8005 fi
8006
8007
8008
8009 #
8010 # XSLT
8011 #
8012
8013
8014
8015 # Check whether --with-libxslt was given.
8016 if test "${with_libxslt+set}" = set; then :
8017   withval=$with_libxslt;
8018   case $withval in
8019     yes)
8020
8021 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8022
8023       ;;
8024     no)
8025       :
8026       ;;
8027     *)
8028       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8029       ;;
8030   esac
8031
8032 else
8033   with_libxslt=no
8034
8035 fi
8036
8037
8038
8039
8040
8041
8042 #
8043 # tzdata
8044 #
8045
8046
8047
8048 # Check whether --with-system-tzdata was given.
8049 if test "${with_system_tzdata+set}" = set; then :
8050   withval=$with_system_tzdata;
8051   case $withval in
8052     yes)
8053       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8054       ;;
8055     no)
8056       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8057       ;;
8058     *)
8059
8060       ;;
8061   esac
8062
8063 fi
8064
8065
8066
8067
8068 #
8069 # Zlib
8070 #
8071
8072
8073
8074 # Check whether --with-zlib was given.
8075 if test "${with_zlib+set}" = set; then :
8076   withval=$with_zlib;
8077   case $withval in
8078     yes)
8079       :
8080       ;;
8081     no)
8082       :
8083       ;;
8084     *)
8085       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8086       ;;
8087   esac
8088
8089 else
8090   with_zlib=yes
8091
8092 fi
8093
8094
8095
8096
8097 #
8098 # Elf
8099 #
8100
8101 # Assume system is ELF if it predefines __ELF__ as 1,
8102 # otherwise believe host_os based default.
8103 case $host_os in
8104     freebsd1*|freebsd2*) elf=no;;
8105     freebsd3*|freebsd4*) elf=yes;;
8106 esac
8107
8108
8109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8110 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8111 if ${ac_cv_path_GREP+:} false; then :
8112   $as_echo_n "(cached) " >&6
8113 else
8114   if test -z "$GREP"; then
8115   ac_path_GREP_found=false
8116   # Loop through the user's path and test for each of PROGNAME-LIST
8117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8118 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8119 do
8120   IFS=$as_save_IFS
8121   test -z "$as_dir" && as_dir=.
8122     for ac_prog in grep ggrep; do
8123     for ac_exec_ext in '' $ac_executable_extensions; do
8124       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8125       as_fn_executable_p "$ac_path_GREP" || continue
8126 # Check for GNU ac_path_GREP and select it if it is found.
8127   # Check for GNU $ac_path_GREP
8128 case `"$ac_path_GREP" --version 2>&1` in
8129 *GNU*)
8130   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8131 *)
8132   ac_count=0
8133   $as_echo_n 0123456789 >"conftest.in"
8134   while :
8135   do
8136     cat "conftest.in" "conftest.in" >"conftest.tmp"
8137     mv "conftest.tmp" "conftest.in"
8138     cp "conftest.in" "conftest.nl"
8139     $as_echo 'GREP' >> "conftest.nl"
8140     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8141     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8142     as_fn_arith $ac_count + 1 && ac_count=$as_val
8143     if test $ac_count -gt ${ac_path_GREP_max-0}; then
8144       # Best one so far, save it but keep looking for a better one
8145       ac_cv_path_GREP="$ac_path_GREP"
8146       ac_path_GREP_max=$ac_count
8147     fi
8148     # 10*(2^10) chars as input seems more than enough
8149     test $ac_count -gt 10 && break
8150   done
8151   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8152 esac
8153
8154       $ac_path_GREP_found && break 3
8155     done
8156   done
8157   done
8158 IFS=$as_save_IFS
8159   if test -z "$ac_cv_path_GREP"; then
8160     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8161   fi
8162 else
8163   ac_cv_path_GREP=$GREP
8164 fi
8165
8166 fi
8167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8168 $as_echo "$ac_cv_path_GREP" >&6; }
8169  GREP="$ac_cv_path_GREP"
8170
8171
8172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8173 $as_echo_n "checking for egrep... " >&6; }
8174 if ${ac_cv_path_EGREP+:} false; then :
8175   $as_echo_n "(cached) " >&6
8176 else
8177   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8178    then ac_cv_path_EGREP="$GREP -E"
8179    else
8180      if test -z "$EGREP"; then
8181   ac_path_EGREP_found=false
8182   # Loop through the user's path and test for each of PROGNAME-LIST
8183   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8184 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8185 do
8186   IFS=$as_save_IFS
8187   test -z "$as_dir" && as_dir=.
8188     for ac_prog in egrep; do
8189     for ac_exec_ext in '' $ac_executable_extensions; do
8190       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8191       as_fn_executable_p "$ac_path_EGREP" || continue
8192 # Check for GNU ac_path_EGREP and select it if it is found.
8193   # Check for GNU $ac_path_EGREP
8194 case `"$ac_path_EGREP" --version 2>&1` in
8195 *GNU*)
8196   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8197 *)
8198   ac_count=0
8199   $as_echo_n 0123456789 >"conftest.in"
8200   while :
8201   do
8202     cat "conftest.in" "conftest.in" >"conftest.tmp"
8203     mv "conftest.tmp" "conftest.in"
8204     cp "conftest.in" "conftest.nl"
8205     $as_echo 'EGREP' >> "conftest.nl"
8206     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8207     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8208     as_fn_arith $ac_count + 1 && ac_count=$as_val
8209     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8210       # Best one so far, save it but keep looking for a better one
8211       ac_cv_path_EGREP="$ac_path_EGREP"
8212       ac_path_EGREP_max=$ac_count
8213     fi
8214     # 10*(2^10) chars as input seems more than enough
8215     test $ac_count -gt 10 && break
8216   done
8217   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8218 esac
8219
8220       $ac_path_EGREP_found && break 3
8221     done
8222   done
8223   done
8224 IFS=$as_save_IFS
8225   if test -z "$ac_cv_path_EGREP"; then
8226     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8227   fi
8228 else
8229   ac_cv_path_EGREP=$EGREP
8230 fi
8231
8232    fi
8233 fi
8234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8235 $as_echo "$ac_cv_path_EGREP" >&6; }
8236  EGREP="$ac_cv_path_EGREP"
8237
8238
8239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8240 /* end confdefs.h.  */
8241 #if __ELF__
8242   yes
8243 #endif
8244
8245 _ACEOF
8246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8247   $EGREP "yes" >/dev/null 2>&1; then :
8248   ELF_SYS=true
8249 else
8250   if test "X$elf" = "Xyes" ; then
8251   ELF_SYS=true
8252 else
8253   ELF_SYS=
8254 fi
8255 fi
8256 rm -f conftest*
8257
8258
8259
8260 #
8261 # Assignments
8262 #
8263
8264 CPPFLAGS="$CPPFLAGS $INCLUDES"
8265 LDFLAGS="$LDFLAGS $LIBDIRS"
8266
8267
8268
8269
8270
8271 # Check whether --with-gnu-ld was given.
8272 if test "${with_gnu_ld+set}" = set; then :
8273   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8274 else
8275   with_gnu_ld=no
8276 fi
8277
8278 ac_prog=ld
8279 if test "$GCC" = yes; then
8280   # Check if gcc -print-prog-name=ld gives a path.
8281   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8282 $as_echo_n "checking for ld used by GCC... " >&6; }
8283   case $host in
8284   *-*-mingw*)
8285     # gcc leaves a trailing carriage return which upsets mingw
8286     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8287   *)
8288     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8289   esac
8290   case "$ac_prog" in
8291     # Accept absolute paths.
8292     [\\/]* | [A-Za-z]:[\\/]*)
8293       re_direlt='/[^/][^/]*/\.\./'
8294       # Canonicalize the path of ld
8295       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8296       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8297         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8298       done
8299       test -z "$LD" && LD="$ac_prog"
8300       ;;
8301   "")
8302     # If it fails, then pretend we aren't using GCC.
8303     ac_prog=ld
8304     ;;
8305   *)
8306     # If it is relative, then search for the first ld in PATH.
8307     with_gnu_ld=unknown
8308     ;;
8309   esac
8310 elif test "$with_gnu_ld" = yes; then
8311   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8312 $as_echo_n "checking for GNU ld... " >&6; }
8313 else
8314   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8315 $as_echo_n "checking for non-GNU ld... " >&6; }
8316 fi
8317 if ${ac_cv_path_LD+:} false; then :
8318   $as_echo_n "(cached) " >&6
8319 else
8320   if test -z "$LD"; then
8321   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8322   for ac_dir in $PATH; do
8323     test -z "$ac_dir" && ac_dir=.
8324     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8325       ac_cv_path_LD="$ac_dir/$ac_prog"
8326       # Check to see if the program is GNU ld.  I'd rather use --version,
8327       # but apparently some GNU ld's only accept -v.
8328       # Break only if it was the GNU/non-GNU ld that we prefer.
8329       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8330         test "$with_gnu_ld" != no && break
8331       else
8332         test "$with_gnu_ld" != yes && break
8333       fi
8334     fi
8335   done
8336   IFS="$ac_save_ifs"
8337 else
8338   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8339 fi
8340 fi
8341
8342 LD="$ac_cv_path_LD"
8343 if test -n "$LD"; then
8344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8345 $as_echo "$LD" >&6; }
8346 else
8347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8348 $as_echo "no" >&6; }
8349 fi
8350 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8352 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8353 if ${ac_cv_prog_gnu_ld+:} false; then :
8354   $as_echo_n "(cached) " >&6
8355 else
8356   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8357 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8358   ac_cv_prog_gnu_ld=yes
8359 else
8360   ac_cv_prog_gnu_ld=no
8361 fi
8362 fi
8363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8364 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8365 with_gnu_ld=$ac_cv_prog_gnu_ld
8366
8367
8368
8369
8370 if test -n "$ac_tool_prefix"; then
8371   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8372 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8374 $as_echo_n "checking for $ac_word... " >&6; }
8375 if ${ac_cv_prog_RANLIB+:} false; then :
8376   $as_echo_n "(cached) " >&6
8377 else
8378   if test -n "$RANLIB"; then
8379   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8380 else
8381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8382 for as_dir in $PATH
8383 do
8384   IFS=$as_save_IFS
8385   test -z "$as_dir" && as_dir=.
8386     for ac_exec_ext in '' $ac_executable_extensions; do
8387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8388     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8390     break 2
8391   fi
8392 done
8393   done
8394 IFS=$as_save_IFS
8395
8396 fi
8397 fi
8398 RANLIB=$ac_cv_prog_RANLIB
8399 if test -n "$RANLIB"; then
8400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8401 $as_echo "$RANLIB" >&6; }
8402 else
8403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8404 $as_echo "no" >&6; }
8405 fi
8406
8407
8408 fi
8409 if test -z "$ac_cv_prog_RANLIB"; then
8410   ac_ct_RANLIB=$RANLIB
8411   # Extract the first word of "ranlib", so it can be a program name with args.
8412 set dummy ranlib; ac_word=$2
8413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8414 $as_echo_n "checking for $ac_word... " >&6; }
8415 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8416   $as_echo_n "(cached) " >&6
8417 else
8418   if test -n "$ac_ct_RANLIB"; then
8419   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8420 else
8421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8422 for as_dir in $PATH
8423 do
8424   IFS=$as_save_IFS
8425   test -z "$as_dir" && as_dir=.
8426     for ac_exec_ext in '' $ac_executable_extensions; do
8427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8428     ac_cv_prog_ac_ct_RANLIB="ranlib"
8429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8430     break 2
8431   fi
8432 done
8433   done
8434 IFS=$as_save_IFS
8435
8436 fi
8437 fi
8438 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8439 if test -n "$ac_ct_RANLIB"; then
8440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8441 $as_echo "$ac_ct_RANLIB" >&6; }
8442 else
8443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8444 $as_echo "no" >&6; }
8445 fi
8446
8447   if test "x$ac_ct_RANLIB" = x; then
8448     RANLIB=":"
8449   else
8450     case $cross_compiling:$ac_tool_warned in
8451 yes:)
8452 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8453 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8454 ac_tool_warned=yes ;;
8455 esac
8456     RANLIB=$ac_ct_RANLIB
8457   fi
8458 else
8459   RANLIB="$ac_cv_prog_RANLIB"
8460 fi
8461
8462
8463   if test -n "$ac_tool_prefix"; then
8464   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8465 set dummy ${ac_tool_prefix}strip; ac_word=$2
8466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8467 $as_echo_n "checking for $ac_word... " >&6; }
8468 if ${ac_cv_prog_STRIP+:} false; then :
8469   $as_echo_n "(cached) " >&6
8470 else
8471   if test -n "$STRIP"; then
8472   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8473 else
8474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8475 for as_dir in $PATH
8476 do
8477   IFS=$as_save_IFS
8478   test -z "$as_dir" && as_dir=.
8479     for ac_exec_ext in '' $ac_executable_extensions; do
8480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8481     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8483     break 2
8484   fi
8485 done
8486   done
8487 IFS=$as_save_IFS
8488
8489 fi
8490 fi
8491 STRIP=$ac_cv_prog_STRIP
8492 if test -n "$STRIP"; then
8493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8494 $as_echo "$STRIP" >&6; }
8495 else
8496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8497 $as_echo "no" >&6; }
8498 fi
8499
8500
8501 fi
8502 if test -z "$ac_cv_prog_STRIP"; then
8503   ac_ct_STRIP=$STRIP
8504   # Extract the first word of "strip", so it can be a program name with args.
8505 set dummy strip; ac_word=$2
8506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8507 $as_echo_n "checking for $ac_word... " >&6; }
8508 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8509   $as_echo_n "(cached) " >&6
8510 else
8511   if test -n "$ac_ct_STRIP"; then
8512   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8513 else
8514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8515 for as_dir in $PATH
8516 do
8517   IFS=$as_save_IFS
8518   test -z "$as_dir" && as_dir=.
8519     for ac_exec_ext in '' $ac_executable_extensions; do
8520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8521     ac_cv_prog_ac_ct_STRIP="strip"
8522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8523     break 2
8524   fi
8525 done
8526   done
8527 IFS=$as_save_IFS
8528
8529 fi
8530 fi
8531 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8532 if test -n "$ac_ct_STRIP"; then
8533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8534 $as_echo "$ac_ct_STRIP" >&6; }
8535 else
8536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8537 $as_echo "no" >&6; }
8538 fi
8539
8540   if test "x$ac_ct_STRIP" = x; then
8541     STRIP=":"
8542   else
8543     case $cross_compiling:$ac_tool_warned in
8544 yes:)
8545 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8546 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8547 ac_tool_warned=yes ;;
8548 esac
8549     STRIP=$ac_ct_STRIP
8550   fi
8551 else
8552   STRIP="$ac_cv_prog_STRIP"
8553 fi
8554
8555
8556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8557 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8558   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8559     STRIP_STATIC_LIB="$STRIP -x"
8560     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8561     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8562 $as_echo "yes" >&6; }
8563   else
8564     case $host_os in
8565       darwin*)
8566         STRIP="$STRIP -x"
8567         STRIP_STATIC_LIB=$STRIP
8568         STRIP_SHARED_LIB=$STRIP
8569         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8570 $as_echo "yes" >&6; }
8571         ;;
8572       *)
8573         STRIP_STATIC_LIB=:
8574         STRIP_SHARED_LIB=:
8575         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8576 $as_echo "no" >&6; }
8577         ;;
8578     esac
8579   fi
8580
8581
8582
8583 if test -n "$ac_tool_prefix"; then
8584   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8585 set dummy ${ac_tool_prefix}ar; ac_word=$2
8586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8587 $as_echo_n "checking for $ac_word... " >&6; }
8588 if ${ac_cv_prog_AR+:} false; then :
8589   $as_echo_n "(cached) " >&6
8590 else
8591   if test -n "$AR"; then
8592   ac_cv_prog_AR="$AR" # Let the user override the test.
8593 else
8594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8595 for as_dir in $PATH
8596 do
8597   IFS=$as_save_IFS
8598   test -z "$as_dir" && as_dir=.
8599     for ac_exec_ext in '' $ac_executable_extensions; do
8600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8601     ac_cv_prog_AR="${ac_tool_prefix}ar"
8602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8603     break 2
8604   fi
8605 done
8606   done
8607 IFS=$as_save_IFS
8608
8609 fi
8610 fi
8611 AR=$ac_cv_prog_AR
8612 if test -n "$AR"; then
8613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8614 $as_echo "$AR" >&6; }
8615 else
8616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8617 $as_echo "no" >&6; }
8618 fi
8619
8620
8621 fi
8622 if test -z "$ac_cv_prog_AR"; then
8623   ac_ct_AR=$AR
8624   # Extract the first word of "ar", so it can be a program name with args.
8625 set dummy ar; ac_word=$2
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8627 $as_echo_n "checking for $ac_word... " >&6; }
8628 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8629   $as_echo_n "(cached) " >&6
8630 else
8631   if test -n "$ac_ct_AR"; then
8632   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8633 else
8634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8635 for as_dir in $PATH
8636 do
8637   IFS=$as_save_IFS
8638   test -z "$as_dir" && as_dir=.
8639     for ac_exec_ext in '' $ac_executable_extensions; do
8640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8641     ac_cv_prog_ac_ct_AR="ar"
8642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8643     break 2
8644   fi
8645 done
8646   done
8647 IFS=$as_save_IFS
8648
8649 fi
8650 fi
8651 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8652 if test -n "$ac_ct_AR"; then
8653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8654 $as_echo "$ac_ct_AR" >&6; }
8655 else
8656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8657 $as_echo "no" >&6; }
8658 fi
8659
8660   if test "x$ac_ct_AR" = x; then
8661     AR="ar"
8662   else
8663     case $cross_compiling:$ac_tool_warned in
8664 yes:)
8665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8666 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8667 ac_tool_warned=yes ;;
8668 esac
8669     AR=$ac_ct_AR
8670   fi
8671 else
8672   AR="$ac_cv_prog_AR"
8673 fi
8674
8675 if test "$PORTNAME" = "win32"; then
8676   if test -n "$ac_tool_prefix"; then
8677   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8678 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8680 $as_echo_n "checking for $ac_word... " >&6; }
8681 if ${ac_cv_prog_DLLTOOL+:} false; then :
8682   $as_echo_n "(cached) " >&6
8683 else
8684   if test -n "$DLLTOOL"; then
8685   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8686 else
8687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8688 for as_dir in $PATH
8689 do
8690   IFS=$as_save_IFS
8691   test -z "$as_dir" && as_dir=.
8692     for ac_exec_ext in '' $ac_executable_extensions; do
8693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8694     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8696     break 2
8697   fi
8698 done
8699   done
8700 IFS=$as_save_IFS
8701
8702 fi
8703 fi
8704 DLLTOOL=$ac_cv_prog_DLLTOOL
8705 if test -n "$DLLTOOL"; then
8706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8707 $as_echo "$DLLTOOL" >&6; }
8708 else
8709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8710 $as_echo "no" >&6; }
8711 fi
8712
8713
8714 fi
8715 if test -z "$ac_cv_prog_DLLTOOL"; then
8716   ac_ct_DLLTOOL=$DLLTOOL
8717   # Extract the first word of "dlltool", so it can be a program name with args.
8718 set dummy dlltool; ac_word=$2
8719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8720 $as_echo_n "checking for $ac_word... " >&6; }
8721 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8722   $as_echo_n "(cached) " >&6
8723 else
8724   if test -n "$ac_ct_DLLTOOL"; then
8725   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8726 else
8727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8728 for as_dir in $PATH
8729 do
8730   IFS=$as_save_IFS
8731   test -z "$as_dir" && as_dir=.
8732     for ac_exec_ext in '' $ac_executable_extensions; do
8733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8734     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8736     break 2
8737   fi
8738 done
8739   done
8740 IFS=$as_save_IFS
8741
8742 fi
8743 fi
8744 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8745 if test -n "$ac_ct_DLLTOOL"; then
8746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8747 $as_echo "$ac_ct_DLLTOOL" >&6; }
8748 else
8749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8750 $as_echo "no" >&6; }
8751 fi
8752
8753   if test "x$ac_ct_DLLTOOL" = x; then
8754     DLLTOOL="dlltool"
8755   else
8756     case $cross_compiling:$ac_tool_warned in
8757 yes:)
8758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8759 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8760 ac_tool_warned=yes ;;
8761 esac
8762     DLLTOOL=$ac_ct_DLLTOOL
8763   fi
8764 else
8765   DLLTOOL="$ac_cv_prog_DLLTOOL"
8766 fi
8767
8768   if test -n "$ac_tool_prefix"; then
8769   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8770 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8772 $as_echo_n "checking for $ac_word... " >&6; }
8773 if ${ac_cv_prog_DLLWRAP+:} false; then :
8774   $as_echo_n "(cached) " >&6
8775 else
8776   if test -n "$DLLWRAP"; then
8777   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
8778 else
8779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8780 for as_dir in $PATH
8781 do
8782   IFS=$as_save_IFS
8783   test -z "$as_dir" && as_dir=.
8784     for ac_exec_ext in '' $ac_executable_extensions; do
8785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8786     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
8787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8788     break 2
8789   fi
8790 done
8791   done
8792 IFS=$as_save_IFS
8793
8794 fi
8795 fi
8796 DLLWRAP=$ac_cv_prog_DLLWRAP
8797 if test -n "$DLLWRAP"; then
8798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
8799 $as_echo "$DLLWRAP" >&6; }
8800 else
8801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8802 $as_echo "no" >&6; }
8803 fi
8804
8805
8806 fi
8807 if test -z "$ac_cv_prog_DLLWRAP"; then
8808   ac_ct_DLLWRAP=$DLLWRAP
8809   # Extract the first word of "dllwrap", so it can be a program name with args.
8810 set dummy dllwrap; ac_word=$2
8811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8812 $as_echo_n "checking for $ac_word... " >&6; }
8813 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
8814   $as_echo_n "(cached) " >&6
8815 else
8816   if test -n "$ac_ct_DLLWRAP"; then
8817   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
8818 else
8819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8820 for as_dir in $PATH
8821 do
8822   IFS=$as_save_IFS
8823   test -z "$as_dir" && as_dir=.
8824     for ac_exec_ext in '' $ac_executable_extensions; do
8825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8826     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
8827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8828     break 2
8829   fi
8830 done
8831   done
8832 IFS=$as_save_IFS
8833
8834 fi
8835 fi
8836 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
8837 if test -n "$ac_ct_DLLWRAP"; then
8838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
8839 $as_echo "$ac_ct_DLLWRAP" >&6; }
8840 else
8841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8842 $as_echo "no" >&6; }
8843 fi
8844
8845   if test "x$ac_ct_DLLWRAP" = x; then
8846     DLLWRAP="dllwrap"
8847   else
8848     case $cross_compiling:$ac_tool_warned in
8849 yes:)
8850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8851 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8852 ac_tool_warned=yes ;;
8853 esac
8854     DLLWRAP=$ac_ct_DLLWRAP
8855   fi
8856 else
8857   DLLWRAP="$ac_cv_prog_DLLWRAP"
8858 fi
8859
8860   if test -n "$ac_tool_prefix"; then
8861   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8862 set dummy ${ac_tool_prefix}windres; ac_word=$2
8863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8864 $as_echo_n "checking for $ac_word... " >&6; }
8865 if ${ac_cv_prog_WINDRES+:} false; then :
8866   $as_echo_n "(cached) " >&6
8867 else
8868   if test -n "$WINDRES"; then
8869   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8870 else
8871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8872 for as_dir in $PATH
8873 do
8874   IFS=$as_save_IFS
8875   test -z "$as_dir" && as_dir=.
8876     for ac_exec_ext in '' $ac_executable_extensions; do
8877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8878     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
8879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8880     break 2
8881   fi
8882 done
8883   done
8884 IFS=$as_save_IFS
8885
8886 fi
8887 fi
8888 WINDRES=$ac_cv_prog_WINDRES
8889 if test -n "$WINDRES"; then
8890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8891 $as_echo "$WINDRES" >&6; }
8892 else
8893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8894 $as_echo "no" >&6; }
8895 fi
8896
8897
8898 fi
8899 if test -z "$ac_cv_prog_WINDRES"; then
8900   ac_ct_WINDRES=$WINDRES
8901   # Extract the first word of "windres", so it can be a program name with args.
8902 set dummy windres; ac_word=$2
8903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8904 $as_echo_n "checking for $ac_word... " >&6; }
8905 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
8906   $as_echo_n "(cached) " >&6
8907 else
8908   if test -n "$ac_ct_WINDRES"; then
8909   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8910 else
8911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8912 for as_dir in $PATH
8913 do
8914   IFS=$as_save_IFS
8915   test -z "$as_dir" && as_dir=.
8916     for ac_exec_ext in '' $ac_executable_extensions; do
8917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8918     ac_cv_prog_ac_ct_WINDRES="windres"
8919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8920     break 2
8921   fi
8922 done
8923   done
8924 IFS=$as_save_IFS
8925
8926 fi
8927 fi
8928 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8929 if test -n "$ac_ct_WINDRES"; then
8930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8931 $as_echo "$ac_ct_WINDRES" >&6; }
8932 else
8933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8934 $as_echo "no" >&6; }
8935 fi
8936
8937   if test "x$ac_ct_WINDRES" = x; then
8938     WINDRES="windres"
8939   else
8940     case $cross_compiling:$ac_tool_warned in
8941 yes:)
8942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8943 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8944 ac_tool_warned=yes ;;
8945 esac
8946     WINDRES=$ac_ct_WINDRES
8947   fi
8948 else
8949   WINDRES="$ac_cv_prog_WINDRES"
8950 fi
8951
8952 fi
8953
8954 # Find a good install program.  We prefer a C program (faster),
8955 # so one script is as good as another.  But avoid the broken or
8956 # incompatible versions:
8957 # SysV /etc/install, /usr/sbin/install
8958 # SunOS /usr/etc/install
8959 # IRIX /sbin/install
8960 # AIX /bin/install
8961 # AmigaOS /C/install, which installs bootblocks on floppy discs
8962 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8963 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
8964 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8965 # OS/2's system install, which has a completely different semantic
8966 # ./install, which can be erroneously created by make from ./install.sh.
8967 # Reject install programs that cannot install multiple files.
8968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
8969 $as_echo_n "checking for a BSD-compatible install... " >&6; }
8970 if test -z "$INSTALL"; then
8971 if ${ac_cv_path_install+:} false; then :
8972   $as_echo_n "(cached) " >&6
8973 else
8974   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8975 for as_dir in $PATH
8976 do
8977   IFS=$as_save_IFS
8978   test -z "$as_dir" && as_dir=.
8979     # Account for people who put trailing slashes in PATH elements.
8980 case $as_dir/ in #((
8981   ./ | .// | /[cC]/* | \
8982   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8983   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
8984   /usr/ucb/* ) ;;
8985   *)
8986     # OSF1 and SCO ODT 3.0 have their own names for install.
8987     # Don't use installbsd from OSF since it installs stuff as root
8988     # by default.
8989     for ac_prog in ginstall scoinst install; do
8990       for ac_exec_ext in '' $ac_executable_extensions; do
8991         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
8992           if test $ac_prog = install &&
8993             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8994             # AIX install.  It has an incompatible calling convention.
8995             :
8996           elif test $ac_prog = install &&
8997             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8998             # program-specific install script used by HP pwplus--don't use.
8999             :
9000           else
9001             rm -rf conftest.one conftest.two conftest.dir
9002             echo one > conftest.one
9003             echo two > conftest.two
9004             mkdir conftest.dir
9005             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9006               test -s conftest.one && test -s conftest.two &&
9007               test -s conftest.dir/conftest.one &&
9008               test -s conftest.dir/conftest.two
9009             then
9010               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9011               break 3
9012             fi
9013           fi
9014         fi
9015       done
9016     done
9017     ;;
9018 esac
9019
9020   done
9021 IFS=$as_save_IFS
9022
9023 rm -rf conftest.one conftest.two conftest.dir
9024
9025 fi
9026   if test "${ac_cv_path_install+set}" = set; then
9027     INSTALL=$ac_cv_path_install
9028   else
9029     # As a last resort, use the slow shell script.  Don't cache a
9030     # value for INSTALL within a source directory, because that will
9031     # break other packages using the cache if that directory is
9032     # removed, or if the value is a relative name.
9033     INSTALL=$ac_install_sh
9034   fi
9035 fi
9036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9037 $as_echo "$INSTALL" >&6; }
9038
9039 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9040 # It thinks the first close brace ends the variable substitution.
9041 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9042
9043 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9044
9045 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9046
9047 # When Autoconf chooses install-sh as install program it tries to generate
9048 # a relative path to it in each makefile where it substitutes it. This clashes
9049 # with our Makefile.global concept. This workaround helps.
9050 case $INSTALL in
9051   *install-sh*) install_bin='';;
9052   *) install_bin=$INSTALL;;
9053 esac
9054
9055
9056 if test -z "$TAR"; then
9057   for ac_prog in tar
9058 do
9059   # Extract the first word of "$ac_prog", so it can be a program name with args.
9060 set dummy $ac_prog; ac_word=$2
9061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9062 $as_echo_n "checking for $ac_word... " >&6; }
9063 if ${ac_cv_path_TAR+:} false; then :
9064   $as_echo_n "(cached) " >&6
9065 else
9066   case $TAR in
9067   [\\/]* | ?:[\\/]*)
9068   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9069   ;;
9070   *)
9071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9072 for as_dir in $PATH
9073 do
9074   IFS=$as_save_IFS
9075   test -z "$as_dir" && as_dir=.
9076     for ac_exec_ext in '' $ac_executable_extensions; do
9077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9078     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9080     break 2
9081   fi
9082 done
9083   done
9084 IFS=$as_save_IFS
9085
9086   ;;
9087 esac
9088 fi
9089 TAR=$ac_cv_path_TAR
9090 if test -n "$TAR"; then
9091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9092 $as_echo "$TAR" >&6; }
9093 else
9094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9095 $as_echo "no" >&6; }
9096 fi
9097
9098
9099   test -n "$TAR" && break
9100 done
9101
9102 else
9103   # Report the value of TAR in configure's output in all cases.
9104   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9105 $as_echo_n "checking for TAR... " >&6; }
9106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9107 $as_echo "$TAR" >&6; }
9108 fi
9109
9110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9111 $as_echo_n "checking whether ln -s works... " >&6; }
9112 LN_S=$as_ln_s
9113 if test "$LN_S" = "ln -s"; then
9114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9115 $as_echo "yes" >&6; }
9116 else
9117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9118 $as_echo "no, using $LN_S" >&6; }
9119 fi
9120
9121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9122 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9123 if test -z "$MKDIR_P"; then
9124   if ${ac_cv_path_mkdir+:} false; then :
9125   $as_echo_n "(cached) " >&6
9126 else
9127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9128 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9129 do
9130   IFS=$as_save_IFS
9131   test -z "$as_dir" && as_dir=.
9132     for ac_prog in mkdir gmkdir; do
9133          for ac_exec_ext in '' $ac_executable_extensions; do
9134            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9135            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9136              'mkdir (GNU coreutils) '* | \
9137              'mkdir (coreutils) '* | \
9138              'mkdir (fileutils) '4.1*)
9139                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9140                break 3;;
9141            esac
9142          done
9143        done
9144   done
9145 IFS=$as_save_IFS
9146
9147 fi
9148
9149   test -d ./--version && rmdir ./--version
9150   if test "${ac_cv_path_mkdir+set}" = set; then
9151     MKDIR_P="$ac_cv_path_mkdir -p"
9152   else
9153     # As a last resort, use the slow shell script.  Don't cache a
9154     # value for MKDIR_P within a source directory, because that will
9155     # break other packages using the cache if that directory is
9156     # removed, or if the value is a relative name.
9157     MKDIR_P="$ac_install_sh -d"
9158   fi
9159 fi
9160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9161 $as_echo "$MKDIR_P" >&6; }
9162
9163 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9164 # a relative path to it in each makefile where it substitutes it. This clashes
9165 # with our Makefile.global concept. This workaround helps.
9166 case $MKDIR_P in
9167   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9168 esac
9169
9170 if test -z "$BISON"; then
9171   for ac_prog in bison
9172 do
9173   # Extract the first word of "$ac_prog", so it can be a program name with args.
9174 set dummy $ac_prog; ac_word=$2
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9176 $as_echo_n "checking for $ac_word... " >&6; }
9177 if ${ac_cv_path_BISON+:} false; then :
9178   $as_echo_n "(cached) " >&6
9179 else
9180   case $BISON in
9181   [\\/]* | ?:[\\/]*)
9182   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9183   ;;
9184   *)
9185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9186 for as_dir in $PATH
9187 do
9188   IFS=$as_save_IFS
9189   test -z "$as_dir" && as_dir=.
9190     for ac_exec_ext in '' $ac_executable_extensions; do
9191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9192     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9194     break 2
9195   fi
9196 done
9197   done
9198 IFS=$as_save_IFS
9199
9200   ;;
9201 esac
9202 fi
9203 BISON=$ac_cv_path_BISON
9204 if test -n "$BISON"; then
9205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9206 $as_echo "$BISON" >&6; }
9207 else
9208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9209 $as_echo "no" >&6; }
9210 fi
9211
9212
9213   test -n "$BISON" && break
9214 done
9215
9216 else
9217   # Report the value of BISON in configure's output in all cases.
9218   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9219 $as_echo_n "checking for BISON... " >&6; }
9220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9221 $as_echo "$BISON" >&6; }
9222 fi
9223
9224
9225 if test "$BISON"; then
9226   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9227   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9228 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9229   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9230   then
9231     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9232 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9233 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9234 $as_echo "$as_me: WARNING:
9235 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9236 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9237     BISON=""
9238   fi
9239   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9240   # of the now preferred %name-prefix "base_yy", but the latter
9241   # doesn't work with Bison 2.3 or less.  So for now we silence the
9242   # deprecation warnings.
9243   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9244   then
9245     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9246   fi
9247 fi
9248
9249 if test -z "$BISON"; then
9250   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9251 *** Without Bison you will not be able to build PostgreSQL from Git nor
9252 *** change any of the parser definition files.  You can obtain Bison from
9253 *** a GNU mirror site.  (If you are using the official distribution of
9254 *** PostgreSQL then you do not need to worry about this, because the Bison
9255 *** output is pre-generated.)" >&5
9256 $as_echo "$as_me: WARNING:
9257 *** Without Bison you will not be able to build PostgreSQL from Git nor
9258 *** change any of the parser definition files.  You can obtain Bison from
9259 *** a GNU mirror site.  (If you are using the official distribution of
9260 *** PostgreSQL then you do not need to worry about this, because the Bison
9261 *** output is pre-generated.)" >&2;}
9262 fi
9263 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9264
9265
9266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9267 $as_echo_n "checking for flex... " >&6; }
9268 if ${pgac_cv_path_flex+:} false; then :
9269   $as_echo_n "(cached) " >&6
9270 else
9271   # Let the user override the test
9272 if test -n "$FLEX"; then
9273   pgac_cv_path_flex=$FLEX
9274 else
9275   pgac_save_IFS=$IFS
9276   IFS=$PATH_SEPARATOR
9277   for pgac_dir in $PATH; do
9278     IFS=$pgac_save_IFS
9279     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9280       pgac_dir=`pwd`
9281     fi
9282     for pgac_prog in flex lex; do
9283       pgac_candidate="$pgac_dir/$pgac_prog"
9284       if test -f "$pgac_candidate" \
9285         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9286       then
9287         echo '%%'  > conftest.l
9288         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9289           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9290           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;}'
9291           then
9292             pgac_cv_path_flex=$pgac_candidate
9293             break 2
9294           else
9295             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9296 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9297 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9298 $as_echo "$as_me: WARNING:
9299 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9300 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9301           fi
9302         fi
9303       fi
9304     done
9305   done
9306   rm -f conftest.l lex.yy.c
9307   : ${pgac_cv_path_flex=no}
9308 fi
9309
9310 fi
9311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9312 $as_echo "$pgac_cv_path_flex" >&6; }
9313 if test x"$pgac_cv_path_flex" = x"no"; then
9314   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9315 *** Without Flex you will not be able to build PostgreSQL from Git nor
9316 *** change any of the scanner definition files.  You can obtain Flex from
9317 *** a GNU mirror site.  (If you are using the official distribution of
9318 *** PostgreSQL then you do not need to worry about this because the Flex
9319 *** output is pre-generated.)" >&5
9320 $as_echo "$as_me: WARNING:
9321 *** Without Flex you will not be able to build PostgreSQL from Git nor
9322 *** change any of the scanner definition files.  You can obtain Flex from
9323 *** a GNU mirror site.  (If you are using the official distribution of
9324 *** PostgreSQL then you do not need to worry about this because the Flex
9325 *** output is pre-generated.)" >&2;}
9326
9327   FLEX=
9328 else
9329   FLEX=$pgac_cv_path_flex
9330   pgac_flex_version=`$FLEX --version 2>/dev/null`
9331   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9332 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9333 fi
9334
9335
9336
9337
9338
9339 if test -z "$PERL"; then
9340   for ac_prog in perl
9341 do
9342   # Extract the first word of "$ac_prog", so it can be a program name with args.
9343 set dummy $ac_prog; ac_word=$2
9344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9345 $as_echo_n "checking for $ac_word... " >&6; }
9346 if ${ac_cv_path_PERL+:} false; then :
9347   $as_echo_n "(cached) " >&6
9348 else
9349   case $PERL in
9350   [\\/]* | ?:[\\/]*)
9351   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9352   ;;
9353   *)
9354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9355 for as_dir in $PATH
9356 do
9357   IFS=$as_save_IFS
9358   test -z "$as_dir" && as_dir=.
9359     for ac_exec_ext in '' $ac_executable_extensions; do
9360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9361     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9363     break 2
9364   fi
9365 done
9366   done
9367 IFS=$as_save_IFS
9368
9369   ;;
9370 esac
9371 fi
9372 PERL=$ac_cv_path_PERL
9373 if test -n "$PERL"; then
9374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9375 $as_echo "$PERL" >&6; }
9376 else
9377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9378 $as_echo "no" >&6; }
9379 fi
9380
9381
9382   test -n "$PERL" && break
9383 done
9384
9385 else
9386   # Report the value of PERL in configure's output in all cases.
9387   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9388 $as_echo_n "checking for PERL... " >&6; }
9389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9390 $as_echo "$PERL" >&6; }
9391 fi
9392
9393
9394 if test "$PERL"; then
9395   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'`
9396   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9397 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9398   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9399     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9400   then
9401     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9402 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9403 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9404 $as_echo "$as_me: WARNING:
9405 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9406 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9407     PERL=""
9408   fi
9409 fi
9410
9411 if test -z "$PERL"; then
9412   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9413 *** Without Perl you will not be able to build PostgreSQL from Git.
9414 *** You can obtain Perl from any CPAN mirror site.
9415 *** (If you are using the official distribution of PostgreSQL then you do not
9416 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9417 $as_echo "$as_me: WARNING:
9418 *** Without Perl you will not be able to build PostgreSQL from Git.
9419 *** You can obtain Perl from any CPAN mirror site.
9420 *** (If you are using the official distribution of PostgreSQL then you do not
9421 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9422 fi
9423
9424 if test "$with_perl" = yes; then
9425   if test -z "$PERL"; then
9426     as_fn_error $? "Perl not found" "$LINENO" 5
9427   fi
9428
9429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9430 $as_echo_n "checking for Perl archlibexp... " >&6; }
9431 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9432 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9434 $as_echo "$perl_archlibexp" >&6; }
9435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9436 $as_echo_n "checking for Perl privlibexp... " >&6; }
9437 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9438 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9440 $as_echo "$perl_privlibexp" >&6; }
9441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9442 $as_echo_n "checking for Perl useshrplib... " >&6; }
9443 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9444 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9446 $as_echo "$perl_useshrplib" >&6; }
9447   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9448     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9449 You might have to rebuild your Perl installation.  Refer to the
9450 documentation for details.  Use --without-perl to disable building
9451 PL/Perl." "$LINENO" 5
9452   fi
9453   # On most platforms, archlibexp is also where the Perl include files live ...
9454   perl_includespec="-I$perl_archlibexp/CORE"
9455   # ... but on newer macOS versions, we must use -iwithsysroot to look
9456   # under $PG_SYSROOT
9457   if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9458     if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9459       perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9460     fi
9461   fi
9462
9463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9464 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9465 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9467 $as_echo "$perl_ccflags" >&6; }
9468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9469 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9470 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9472 $as_echo "$perl_embed_ccflags" >&6; }
9473
9474
9475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9476 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9477 if test "$PORTNAME" = "win32" ; then
9478         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9479         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9480                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9481         else
9482                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9483                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9484                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9485                 fi
9486         fi
9487 else
9488         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9489         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9490         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9491 fi
9492 if test -z "$perl_embed_ldflags" ; then
9493         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9494 $as_echo "no" >&6; }
9495         as_fn_error $? "could not determine flags for linking embedded Perl.
9496 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9497 installed." "$LINENO" 5
9498 else
9499         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9500 $as_echo "$perl_embed_ldflags" >&6; }
9501 fi
9502
9503 fi
9504
9505 if test "$with_python" = yes; then
9506   if test -z "$PYTHON"; then
9507   for ac_prog in python python3 python2
9508 do
9509   # Extract the first word of "$ac_prog", so it can be a program name with args.
9510 set dummy $ac_prog; ac_word=$2
9511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9512 $as_echo_n "checking for $ac_word... " >&6; }
9513 if ${ac_cv_path_PYTHON+:} false; then :
9514   $as_echo_n "(cached) " >&6
9515 else
9516   case $PYTHON in
9517   [\\/]* | ?:[\\/]*)
9518   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9519   ;;
9520   *)
9521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9522 for as_dir in $PATH
9523 do
9524   IFS=$as_save_IFS
9525   test -z "$as_dir" && as_dir=.
9526     for ac_exec_ext in '' $ac_executable_extensions; do
9527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9528     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9530     break 2
9531   fi
9532 done
9533   done
9534 IFS=$as_save_IFS
9535
9536   ;;
9537 esac
9538 fi
9539 PYTHON=$ac_cv_path_PYTHON
9540 if test -n "$PYTHON"; then
9541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9542 $as_echo "$PYTHON" >&6; }
9543 else
9544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9545 $as_echo "no" >&6; }
9546 fi
9547
9548
9549   test -n "$PYTHON" && break
9550 done
9551
9552 else
9553   # Report the value of PYTHON in configure's output in all cases.
9554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9555 $as_echo_n "checking for PYTHON... " >&6; }
9556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9557 $as_echo "$PYTHON" >&6; }
9558 fi
9559
9560 if test x"$PYTHON" = x""; then
9561   as_fn_error $? "Python not found" "$LINENO" 5
9562 fi
9563
9564
9565 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9566 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9567 $as_echo "$as_me: using python $python_fullversion" >&6;}
9568 # python_fullversion is typically n.n.n plus some trailing junk
9569 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9570 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9571 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9572 # Reject unsupported Python versions as soon as practical.
9573 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9574   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9575 fi
9576
9577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9578 $as_echo_n "checking for Python distutils module... " >&6; }
9579 if "${PYTHON}" -c 'import distutils' 2>&5
9580 then
9581     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9582 $as_echo "yes" >&6; }
9583 else
9584     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9585 $as_echo "no" >&6; }
9586     as_fn_error $? "distutils module not found" "$LINENO" 5
9587 fi
9588
9589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9590 $as_echo_n "checking Python configuration directory... " >&6; }
9591 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9593 $as_echo "$python_configdir" >&6; }
9594
9595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9596 $as_echo_n "checking Python include directories... " >&6; }
9597 python_includespec=`${PYTHON} -c "
9598 import distutils.sysconfig
9599 a = '-I' + distutils.sysconfig.get_python_inc(False)
9600 b = '-I' + distutils.sysconfig.get_python_inc(True)
9601 if a == b:
9602     print(a)
9603 else:
9604     print(a + ' ' + b)"`
9605 if test "$PORTNAME" = win32 ; then
9606     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9607 fi
9608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9609 $as_echo "$python_includespec" >&6; }
9610
9611
9612
9613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9614 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9615
9616 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9617 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9618
9619 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9620 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9621 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9622 then
9623         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9624         found_shlib=1
9625 else
9626         # Otherwise, guess the base name of the shlib.
9627         # LDVERSION was added in Python 3.2, before that use VERSION,
9628         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9629         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9630         if test x"${python_ldversion}" != x""; then
9631                 ldlibrary="python${python_ldversion}"
9632         else
9633                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9634                 if test x"${python_version_var}" != x""; then
9635                         ldlibrary="python${python_version_var}"
9636                 else
9637                         ldlibrary="python${python_version}"
9638                 fi
9639         fi
9640         # Search for a likely-looking file.
9641         found_shlib=0
9642         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9643         do
9644                 # We don't know the platform DLSUFFIX here, so check 'em all.
9645                 for e in .so .dll .dylib .sl; do
9646                         if test -e "$d/lib${ldlibrary}$e"; then
9647                                 python_libdir="$d"
9648                                 found_shlib=1
9649                                 break 2
9650                         fi
9651                 done
9652         done
9653         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9654         # (".so.n.n") as well. However, check this only after failing to find
9655         # ".so" anywhere, because yet other platforms (Debian) put the .so
9656         # symlink in a different directory from the underlying versioned shlib.
9657         if test "$found_shlib" != 1; then
9658                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9659                 do
9660                         for f in "$d/lib${ldlibrary}.so."* ; do
9661                                 if test -e "$f"; then
9662                                         python_libdir="$d"
9663                                         found_shlib=1
9664                                         break 2
9665                                 fi
9666                         done
9667                 done
9668         fi
9669         # As usual, Windows has its own ideas.  Possible default library
9670         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9671         # and the "lib" prefix might not be there.
9672         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9673                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9674                 do
9675                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9676                                 if test -e "$f"; then
9677                                         python_libdir="$d"
9678                                         found_shlib=1
9679                                         break 2
9680                                 fi
9681                         done
9682                 done
9683         fi
9684 fi
9685 if test "$found_shlib" != 1; then
9686         as_fn_error $? "could not find shared library for Python
9687 You might have to rebuild your Python installation.  Refer to the
9688 documentation for details.  Use --without-python to disable building
9689 PL/Python." "$LINENO" 5
9690 fi
9691 python_libspec="-L${python_libdir} -l${ldlibrary}"
9692
9693 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9694
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9696 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9697
9698
9699
9700 fi
9701
9702 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9703   if test -z "$ZIC"; then
9704   for ac_prog in zic
9705 do
9706   # Extract the first word of "$ac_prog", so it can be a program name with args.
9707 set dummy $ac_prog; ac_word=$2
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9709 $as_echo_n "checking for $ac_word... " >&6; }
9710 if ${ac_cv_path_ZIC+:} false; then :
9711   $as_echo_n "(cached) " >&6
9712 else
9713   case $ZIC in
9714   [\\/]* | ?:[\\/]*)
9715   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9716   ;;
9717   *)
9718   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9719 for as_dir in $PATH
9720 do
9721   IFS=$as_save_IFS
9722   test -z "$as_dir" && as_dir=.
9723     for ac_exec_ext in '' $ac_executable_extensions; do
9724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9725     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9727     break 2
9728   fi
9729 done
9730   done
9731 IFS=$as_save_IFS
9732
9733   ;;
9734 esac
9735 fi
9736 ZIC=$ac_cv_path_ZIC
9737 if test -n "$ZIC"; then
9738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9739 $as_echo "$ZIC" >&6; }
9740 else
9741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9742 $as_echo "no" >&6; }
9743 fi
9744
9745
9746   test -n "$ZIC" && break
9747 done
9748
9749 else
9750   # Report the value of ZIC in configure's output in all cases.
9751   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9752 $as_echo_n "checking for ZIC... " >&6; }
9753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9754 $as_echo "$ZIC" >&6; }
9755 fi
9756
9757   if test -z "$ZIC"; then
9758     as_fn_error $? "
9759 When cross-compiling, either use the option --with-system-tzdata to use
9760 existing time-zone data, or set the environment variable ZIC to a zic
9761 program to use during the build." "$LINENO" 5
9762   fi
9763 fi
9764
9765 #
9766 # Pthreads
9767 #
9768 # For each platform, we need to know about any special compile and link
9769 # libraries, and whether the normal C function names are thread-safe.
9770 # See the comment at the top of src/port/thread.c for more information.
9771 # WIN32 doesn't need the pthread tests;  it always uses threads
9772 #
9773 # These tests are run before the library-tests, because linking with the
9774 # other libraries can pull in the pthread functions as a side-effect.  We
9775 # want to use the -pthread or similar flags directly, and not rely on
9776 # the side-effects of linking with some other library.
9777 #
9778 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
9779 # invocation below is the first one in the script, and autoconf generates
9780 # additional code for that, which must not be inside the if-block. AS_IF
9781 # knows how to do that.
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9783 $as_echo_n "checking for ANSI C header files... " >&6; }
9784 if ${ac_cv_header_stdc+:} false; then :
9785   $as_echo_n "(cached) " >&6
9786 else
9787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9788 /* end confdefs.h.  */
9789 #include <stdlib.h>
9790 #include <stdarg.h>
9791 #include <string.h>
9792 #include <float.h>
9793
9794 int
9795 main ()
9796 {
9797
9798   ;
9799   return 0;
9800 }
9801 _ACEOF
9802 if ac_fn_c_try_compile "$LINENO"; then :
9803   ac_cv_header_stdc=yes
9804 else
9805   ac_cv_header_stdc=no
9806 fi
9807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9808
9809 if test $ac_cv_header_stdc = yes; then
9810   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9812 /* end confdefs.h.  */
9813 #include <string.h>
9814
9815 _ACEOF
9816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9817   $EGREP "memchr" >/dev/null 2>&1; then :
9818
9819 else
9820   ac_cv_header_stdc=no
9821 fi
9822 rm -f conftest*
9823
9824 fi
9825
9826 if test $ac_cv_header_stdc = yes; then
9827   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9829 /* end confdefs.h.  */
9830 #include <stdlib.h>
9831
9832 _ACEOF
9833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9834   $EGREP "free" >/dev/null 2>&1; then :
9835
9836 else
9837   ac_cv_header_stdc=no
9838 fi
9839 rm -f conftest*
9840
9841 fi
9842
9843 if test $ac_cv_header_stdc = yes; then
9844   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9845   if test "$cross_compiling" = yes; then :
9846   :
9847 else
9848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9849 /* end confdefs.h.  */
9850 #include <ctype.h>
9851 #include <stdlib.h>
9852 #if ((' ' & 0x0FF) == 0x020)
9853 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9854 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9855 #else
9856 # define ISLOWER(c) \
9857                    (('a' <= (c) && (c) <= 'i') \
9858                      || ('j' <= (c) && (c) <= 'r') \
9859                      || ('s' <= (c) && (c) <= 'z'))
9860 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9861 #endif
9862
9863 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9864 int
9865 main ()
9866 {
9867   int i;
9868   for (i = 0; i < 256; i++)
9869     if (XOR (islower (i), ISLOWER (i))
9870         || toupper (i) != TOUPPER (i))
9871       return 2;
9872   return 0;
9873 }
9874 _ACEOF
9875 if ac_fn_c_try_run "$LINENO"; then :
9876
9877 else
9878   ac_cv_header_stdc=no
9879 fi
9880 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9881   conftest.$ac_objext conftest.beam conftest.$ac_ext
9882 fi
9883
9884 fi
9885 fi
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9887 $as_echo "$ac_cv_header_stdc" >&6; }
9888 if test $ac_cv_header_stdc = yes; then
9889
9890 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9891
9892 fi
9893
9894 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9895 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9896                   inttypes.h stdint.h unistd.h
9897 do :
9898   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9899 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9900 "
9901 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9902   cat >>confdefs.h <<_ACEOF
9903 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9904 _ACEOF
9905
9906 fi
9907
9908 done
9909
9910
9911 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
9912    # then
9913
9914
9915
9916 ac_ext=c
9917 ac_cpp='$CPP $CPPFLAGS'
9918 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9919 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9920 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9921
9922 ax_pthread_ok=no
9923
9924 # We used to check for pthread.h first, but this fails if pthread.h
9925 # requires special compiler flags (e.g. on Tru64 or Sequent).
9926 # It gets checked for in the link test anyway.
9927
9928 # First of all, check if the user has set any of the PTHREAD_LIBS,
9929 # etcetera environment variables, and if threads linking works using
9930 # them:
9931 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
9932         save_CFLAGS="$CFLAGS"
9933         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9934         save_LIBS="$LIBS"
9935         LIBS="$PTHREAD_LIBS $LIBS"
9936         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
9937 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
9938         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9939 /* end confdefs.h.  */
9940
9941 /* Override any GCC internal prototype to avoid an error.
9942    Use char because int might match the return type of a GCC
9943    builtin and then its argument prototype would still apply.  */
9944 #ifdef __cplusplus
9945 extern "C"
9946 #endif
9947 char pthread_join ();
9948 int
9949 main ()
9950 {
9951 return pthread_join ();
9952   ;
9953   return 0;
9954 }
9955 _ACEOF
9956 if ac_fn_c_try_link "$LINENO"; then :
9957   ax_pthread_ok=yes
9958 fi
9959 rm -f core conftest.err conftest.$ac_objext \
9960     conftest$ac_exeext conftest.$ac_ext
9961         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
9962 $as_echo "$ax_pthread_ok" >&6; }
9963         if test x"$ax_pthread_ok" = xno; then
9964                 PTHREAD_LIBS=""
9965                 PTHREAD_CFLAGS=""
9966         fi
9967         LIBS="$save_LIBS"
9968         CFLAGS="$save_CFLAGS"
9969 fi
9970
9971 # We must check for the threads library under a number of different
9972 # names; the ordering is very important because some systems
9973 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
9974 # libraries is broken (non-POSIX).
9975
9976 # Create a list of thread flags to try.  Items starting with a "-" are
9977 # C compiler flags, and other items are library names, except for "none"
9978 # which indicates that we try without any flags at all, and "pthread-config"
9979 # which is a program returning the flags for the Pth emulation library.
9980
9981 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
9982
9983 # The ordering *is* (sometimes) important.  Some notes on the
9984 # individual items follow:
9985
9986 # pthreads: AIX (must check this before -lpthread)
9987 # none: in case threads are in libc; should be tried before -Kthread and
9988 #       other compiler flags to prevent continual compiler warnings
9989 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
9990 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
9991 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
9992 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
9993 # -pthreads: Solaris/gcc
9994 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
9995 #      doesn't hurt to check since this sometimes defines pthreads and
9996 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
9997 #      is present but should not be used directly)
9998 # -mthreads: Mingw32/gcc, Lynx/gcc
9999 # pthread: Linux, etcetera
10000 # --thread-safe: KAI C++
10001 # pthread-config: use pthread-config program (for GNU Pth library)
10002
10003 case $host_os in
10004
10005         hpux*)
10006
10007         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10008         # multi-threading and also sets -lpthread."
10009
10010         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10011         ;;
10012
10013         openedition*)
10014
10015         # IBM z/OS requires a feature-test macro to be defined in order to
10016         # enable POSIX threads at all, so give the user a hint if this is
10017         # not set. (We don't define these ourselves, as they can affect
10018         # other portions of the system API in unpredictable ways.)
10019
10020         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10021 /* end confdefs.h.  */
10022
10023 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10024              AX_PTHREAD_ZOS_MISSING
10025 #            endif
10026
10027 _ACEOF
10028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10029   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10030   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10031 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10032 fi
10033 rm -f conftest*
10034
10035         ;;
10036
10037         solaris*)
10038
10039         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
10040         # check that first.  On some older versions, libc contains stubbed
10041         # (non-functional) versions of the pthreads routines, so link-based
10042         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
10043         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
10044         # a function called by this macro, so we could check for that, but
10045         # who knows whether they'll stub that too in a future libc.)  So
10046         # we'll look for -pthreads and -lpthread shortly thereafter.
10047
10048         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
10049         ;;
10050 esac
10051
10052 # Older versions of Clang only give a warning instead of an error for an
10053 # unrecognized option, unless we specify -Werror. (We throw in some extra
10054 # Clang warning flags for good measure.)
10055
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
10057 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
10058 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
10059   $as_echo_n "(cached) " >&6
10060 else
10061   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
10062      save_CFLAGS="$CFLAGS"
10063      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
10064      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
10065      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10066 /* end confdefs.h.  */
10067 int foo(void);
10068 int
10069 main ()
10070 {
10071 foo()
10072   ;
10073   return 0;
10074 }
10075 _ACEOF
10076 if ac_fn_c_try_compile "$LINENO"; then :
10077   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
10078 else
10079   ax_cv_PTHREAD_REJECT_UNKNOWN=no
10080 fi
10081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10082      CFLAGS="$save_CFLAGS"
10083
10084 fi
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
10086 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
10087 ax_pthread_extra_flags=
10088 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
10089   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
10090 fi
10091
10092 if test x"$ax_pthread_ok" = xno; then
10093 for flag in $ax_pthread_flags; do
10094
10095         case $flag in
10096                 none)
10097                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10098 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10099                 ;;
10100
10101                 -mt,pthread)
10102                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10103 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10104                 PTHREAD_CFLAGS="-mt"
10105                 PTHREAD_LIBS="-lpthread"
10106                 ;;
10107
10108                 -*)
10109                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
10110 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
10111                 PTHREAD_CFLAGS="$flag"
10112                 ;;
10113
10114                 pthread-config)
10115                 # Extract the first word of "pthread-config", so it can be a program name with args.
10116 set dummy pthread-config; ac_word=$2
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10118 $as_echo_n "checking for $ac_word... " >&6; }
10119 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10120   $as_echo_n "(cached) " >&6
10121 else
10122   if test -n "$ax_pthread_config"; then
10123   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10124 else
10125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10126 for as_dir in $PATH
10127 do
10128   IFS=$as_save_IFS
10129   test -z "$as_dir" && as_dir=.
10130     for ac_exec_ext in '' $ac_executable_extensions; do
10131   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10132     ac_cv_prog_ax_pthread_config="yes"
10133     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10134     break 2
10135   fi
10136 done
10137   done
10138 IFS=$as_save_IFS
10139
10140   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10141 fi
10142 fi
10143 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10144 if test -n "$ax_pthread_config"; then
10145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10146 $as_echo "$ax_pthread_config" >&6; }
10147 else
10148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10149 $as_echo "no" >&6; }
10150 fi
10151
10152
10153                 if test x"$ax_pthread_config" = xno; then continue; fi
10154                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10155                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10156                 ;;
10157
10158                 *)
10159                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
10160 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
10161                 PTHREAD_LIBS="-l$flag"
10162                 ;;
10163         esac
10164
10165         save_LIBS="$LIBS"
10166         save_CFLAGS="$CFLAGS"
10167         LIBS="$PTHREAD_LIBS $LIBS"
10168         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
10169
10170         # Check for various functions.  We must include pthread.h,
10171         # since some functions may be macros.  (On the Sequent, we
10172         # need a special flag -Kthread to make this header compile.)
10173         # We check for pthread_join because it is in -lpthread on IRIX
10174         # while pthread_create is in libc.  We check for pthread_attr_init
10175         # due to DEC craziness with -lpthreads.  We check for
10176         # pthread_cleanup_push because it is one of the few pthread
10177         # functions on Solaris that doesn't have a non-functional libc stub.
10178         # We try pthread_create on general principles.
10179         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10180 /* end confdefs.h.  */
10181 #include <pthread.h>
10182                         static void routine(void *a) { a = 0; }
10183                         static void *start_routine(void *a) { return a; }
10184 int
10185 main ()
10186 {
10187 pthread_t th; pthread_attr_t attr;
10188                         pthread_create(&th, 0, start_routine, 0);
10189                         pthread_join(th, 0);
10190                         pthread_attr_init(&attr);
10191                         pthread_cleanup_push(routine, 0);
10192                         pthread_cleanup_pop(0) /* ; */
10193   ;
10194   return 0;
10195 }
10196 _ACEOF
10197 if ac_fn_c_try_link "$LINENO"; then :
10198   ax_pthread_ok=yes
10199 fi
10200 rm -f core conftest.err conftest.$ac_objext \
10201     conftest$ac_exeext conftest.$ac_ext
10202
10203         LIBS="$save_LIBS"
10204         CFLAGS="$save_CFLAGS"
10205
10206         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10207 $as_echo "$ax_pthread_ok" >&6; }
10208         if test "x$ax_pthread_ok" = xyes; then
10209                 break;
10210         fi
10211
10212         PTHREAD_LIBS=""
10213         PTHREAD_CFLAGS=""
10214 done
10215 fi
10216
10217 # Various other checks:
10218 if test "x$ax_pthread_ok" = xyes; then
10219         save_LIBS="$LIBS"
10220         LIBS="$PTHREAD_LIBS $LIBS"
10221         save_CFLAGS="$CFLAGS"
10222         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10223
10224         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10225         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10226 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10227 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10228   $as_echo_n "(cached) " >&6
10229 else
10230   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10231              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10232                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10233 /* end confdefs.h.  */
10234 #include <pthread.h>
10235 int
10236 main ()
10237 {
10238 int attr = $attr; return attr /* ; */
10239   ;
10240   return 0;
10241 }
10242 _ACEOF
10243 if ac_fn_c_try_link "$LINENO"; then :
10244   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
10245 fi
10246 rm -f core conftest.err conftest.$ac_objext \
10247     conftest$ac_exeext conftest.$ac_ext
10248              done
10249
10250 fi
10251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10252 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10253         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
10254                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
10255
10256 cat >>confdefs.h <<_ACEOF
10257 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10258 _ACEOF
10259
10260 fi
10261
10262         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
10263 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
10264 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10265   $as_echo_n "(cached) " >&6
10266 else
10267   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10268              ax_pthread_special_flags_added=no
10269              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10270 /* end confdefs.h.  */
10271
10272 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
10273                   AX_PTHREAD_NEED_SPECIAL_FLAG
10274 #                 endif
10275
10276 _ACEOF
10277 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10278   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
10279   case $host_os in
10280                   aix* | freebsd*)
10281                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
10282                   ;;
10283                   darwin* | hpux* | osf* | solaris*)
10284                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
10285                   ;;
10286                   esac
10287
10288 fi
10289 rm -f conftest*
10290
10291
10292 fi
10293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10294 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10295         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10296                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10297   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10298                ax_pthread_special_flags_added=yes
10299 fi
10300
10301         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10302 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10303 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10304   $as_echo_n "(cached) " >&6
10305 else
10306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10307 /* end confdefs.h.  */
10308 #include <pthread.h>
10309 int
10310 main ()
10311 {
10312 int i = PTHREAD_PRIO_INHERIT;
10313   ;
10314   return 0;
10315 }
10316 _ACEOF
10317 if ac_fn_c_try_link "$LINENO"; then :
10318   ax_cv_PTHREAD_PRIO_INHERIT=yes
10319 else
10320   ax_cv_PTHREAD_PRIO_INHERIT=no
10321 fi
10322 rm -f core conftest.err conftest.$ac_objext \
10323     conftest$ac_exeext conftest.$ac_ext
10324
10325 fi
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10327 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10328         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
10329
10330 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10331
10332 fi
10333
10334         LIBS="$save_LIBS"
10335         CFLAGS="$save_CFLAGS"
10336
10337         # More AIX lossage: compile with *_r variant
10338         if test "x$GCC" != xyes; then
10339             case $host_os in
10340                 aix*)
10341                 case "x/$CC" in #(
10342   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10343     #handle absolute path differently from PATH based program lookup
10344                    case "x$CC" in #(
10345   x/*) :
10346     if as_fn_executable_p ${CC}_r; then :
10347   PTHREAD_CC="${CC}_r"
10348 fi ;; #(
10349   *) :
10350     for ac_prog in ${CC}_r
10351 do
10352   # Extract the first word of "$ac_prog", so it can be a program name with args.
10353 set dummy $ac_prog; ac_word=$2
10354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10355 $as_echo_n "checking for $ac_word... " >&6; }
10356 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10357   $as_echo_n "(cached) " >&6
10358 else
10359   if test -n "$PTHREAD_CC"; then
10360   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10361 else
10362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10363 for as_dir in $PATH
10364 do
10365   IFS=$as_save_IFS
10366   test -z "$as_dir" && as_dir=.
10367     for ac_exec_ext in '' $ac_executable_extensions; do
10368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10369     ac_cv_prog_PTHREAD_CC="$ac_prog"
10370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10371     break 2
10372   fi
10373 done
10374   done
10375 IFS=$as_save_IFS
10376
10377 fi
10378 fi
10379 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10380 if test -n "$PTHREAD_CC"; then
10381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10382 $as_echo "$PTHREAD_CC" >&6; }
10383 else
10384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10385 $as_echo "no" >&6; }
10386 fi
10387
10388
10389   test -n "$PTHREAD_CC" && break
10390 done
10391 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10392  ;;
10393 esac ;; #(
10394   *) :
10395      ;;
10396 esac
10397                 ;;
10398             esac
10399         fi
10400 fi
10401
10402 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10403
10404
10405
10406
10407
10408 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10409 if test x"$ax_pthread_ok" = xyes; then
10410
10411 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10412
10413         :
10414 else
10415         ax_pthread_ok=no
10416
10417 fi
10418 ac_ext=c
10419 ac_cpp='$CPP $CPPFLAGS'
10420 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10421 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10422 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10423
10424         # set thread flags
10425
10426 # Some platforms use these, so just define them.  They can't hurt if they
10427 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10428 # enables 5-arg getpwuid_r, among other things.
10429 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10430
10431 # Check for *_r functions
10432 _CFLAGS="$CFLAGS"
10433 _LIBS="$LIBS"
10434 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10435 LIBS="$LIBS $PTHREAD_LIBS"
10436
10437 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10438 if test "x$ac_cv_header_pthread_h" = xyes; then :
10439
10440 else
10441   as_fn_error $? "
10442 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10443 fi
10444
10445
10446
10447 for ac_func in strerror_r getpwuid_r gethostbyname_r
10448 do :
10449   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10450 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10451 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10452   cat >>confdefs.h <<_ACEOF
10453 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10454 _ACEOF
10455
10456 fi
10457 done
10458
10459
10460 # Do test here with the proper thread flags
10461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10462 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10463 if ${pgac_cv_func_strerror_r_int+:} false; then :
10464   $as_echo_n "(cached) " >&6
10465 else
10466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10467 /* end confdefs.h.  */
10468 #include <string.h>
10469 int
10470 main ()
10471 {
10472 char buf[100];
10473   switch (strerror_r(1, buf, sizeof(buf)))
10474   { case 0: break; default: break; }
10475
10476   ;
10477   return 0;
10478 }
10479 _ACEOF
10480 if ac_fn_c_try_compile "$LINENO"; then :
10481   pgac_cv_func_strerror_r_int=yes
10482 else
10483   pgac_cv_func_strerror_r_int=no
10484 fi
10485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10486 fi
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10488 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10489 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10490
10491 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10492
10493 fi
10494
10495
10496 CFLAGS="$_CFLAGS"
10497 LIBS="$_LIBS"
10498
10499
10500 else
10501    # else
10502 # do not use values from template file
10503 PTHREAD_CFLAGS=
10504 PTHREAD_LIBS=
10505
10506 fi # fi
10507
10508
10509
10510
10511
10512 ##
10513 ## Libraries
10514 ##
10515 ## Most libraries are included only if they demonstrably provide a function
10516 ## we need, but libm is an exception: always include it, because there are
10517 ## too many compilers that play cute optimization games that will break
10518 ## probes for standard functions such as pow().
10519 ##
10520
10521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10522 $as_echo_n "checking for main in -lm... " >&6; }
10523 if ${ac_cv_lib_m_main+:} false; then :
10524   $as_echo_n "(cached) " >&6
10525 else
10526   ac_check_lib_save_LIBS=$LIBS
10527 LIBS="-lm  $LIBS"
10528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10529 /* end confdefs.h.  */
10530
10531
10532 int
10533 main ()
10534 {
10535 return main ();
10536   ;
10537   return 0;
10538 }
10539 _ACEOF
10540 if ac_fn_c_try_link "$LINENO"; then :
10541   ac_cv_lib_m_main=yes
10542 else
10543   ac_cv_lib_m_main=no
10544 fi
10545 rm -f core conftest.err conftest.$ac_objext \
10546     conftest$ac_exeext conftest.$ac_ext
10547 LIBS=$ac_check_lib_save_LIBS
10548 fi
10549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10550 $as_echo "$ac_cv_lib_m_main" >&6; }
10551 if test "x$ac_cv_lib_m_main" = xyes; then :
10552   cat >>confdefs.h <<_ACEOF
10553 #define HAVE_LIBM 1
10554 _ACEOF
10555
10556   LIBS="-lm $LIBS"
10557
10558 fi
10559
10560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10561 $as_echo_n "checking for library containing setproctitle... " >&6; }
10562 if ${ac_cv_search_setproctitle+:} false; then :
10563   $as_echo_n "(cached) " >&6
10564 else
10565   ac_func_search_save_LIBS=$LIBS
10566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10567 /* end confdefs.h.  */
10568
10569 /* Override any GCC internal prototype to avoid an error.
10570    Use char because int might match the return type of a GCC
10571    builtin and then its argument prototype would still apply.  */
10572 #ifdef __cplusplus
10573 extern "C"
10574 #endif
10575 char setproctitle ();
10576 int
10577 main ()
10578 {
10579 return setproctitle ();
10580   ;
10581   return 0;
10582 }
10583 _ACEOF
10584 for ac_lib in '' util; do
10585   if test -z "$ac_lib"; then
10586     ac_res="none required"
10587   else
10588     ac_res=-l$ac_lib
10589     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10590   fi
10591   if ac_fn_c_try_link "$LINENO"; then :
10592   ac_cv_search_setproctitle=$ac_res
10593 fi
10594 rm -f core conftest.err conftest.$ac_objext \
10595     conftest$ac_exeext
10596   if ${ac_cv_search_setproctitle+:} false; then :
10597   break
10598 fi
10599 done
10600 if ${ac_cv_search_setproctitle+:} false; then :
10601
10602 else
10603   ac_cv_search_setproctitle=no
10604 fi
10605 rm conftest.$ac_ext
10606 LIBS=$ac_func_search_save_LIBS
10607 fi
10608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
10609 $as_echo "$ac_cv_search_setproctitle" >&6; }
10610 ac_res=$ac_cv_search_setproctitle
10611 if test "$ac_res" != no; then :
10612   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10613
10614 fi
10615
10616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10617 $as_echo_n "checking for library containing dlopen... " >&6; }
10618 if ${ac_cv_search_dlopen+:} false; then :
10619   $as_echo_n "(cached) " >&6
10620 else
10621   ac_func_search_save_LIBS=$LIBS
10622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10623 /* end confdefs.h.  */
10624
10625 /* Override any GCC internal prototype to avoid an error.
10626    Use char because int might match the return type of a GCC
10627    builtin and then its argument prototype would still apply.  */
10628 #ifdef __cplusplus
10629 extern "C"
10630 #endif
10631 char dlopen ();
10632 int
10633 main ()
10634 {
10635 return dlopen ();
10636   ;
10637   return 0;
10638 }
10639 _ACEOF
10640 for ac_lib in '' dl; do
10641   if test -z "$ac_lib"; then
10642     ac_res="none required"
10643   else
10644     ac_res=-l$ac_lib
10645     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10646   fi
10647   if ac_fn_c_try_link "$LINENO"; then :
10648   ac_cv_search_dlopen=$ac_res
10649 fi
10650 rm -f core conftest.err conftest.$ac_objext \
10651     conftest$ac_exeext
10652   if ${ac_cv_search_dlopen+:} false; then :
10653   break
10654 fi
10655 done
10656 if ${ac_cv_search_dlopen+:} false; then :
10657
10658 else
10659   ac_cv_search_dlopen=no
10660 fi
10661 rm conftest.$ac_ext
10662 LIBS=$ac_func_search_save_LIBS
10663 fi
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10665 $as_echo "$ac_cv_search_dlopen" >&6; }
10666 ac_res=$ac_cv_search_dlopen
10667 if test "$ac_res" != no; then :
10668   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10669
10670 fi
10671
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
10673 $as_echo_n "checking for library containing socket... " >&6; }
10674 if ${ac_cv_search_socket+:} false; then :
10675   $as_echo_n "(cached) " >&6
10676 else
10677   ac_func_search_save_LIBS=$LIBS
10678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10679 /* end confdefs.h.  */
10680
10681 /* Override any GCC internal prototype to avoid an error.
10682    Use char because int might match the return type of a GCC
10683    builtin and then its argument prototype would still apply.  */
10684 #ifdef __cplusplus
10685 extern "C"
10686 #endif
10687 char socket ();
10688 int
10689 main ()
10690 {
10691 return socket ();
10692   ;
10693   return 0;
10694 }
10695 _ACEOF
10696 for ac_lib in '' socket ws2_32; do
10697   if test -z "$ac_lib"; then
10698     ac_res="none required"
10699   else
10700     ac_res=-l$ac_lib
10701     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10702   fi
10703   if ac_fn_c_try_link "$LINENO"; then :
10704   ac_cv_search_socket=$ac_res
10705 fi
10706 rm -f core conftest.err conftest.$ac_objext \
10707     conftest$ac_exeext
10708   if ${ac_cv_search_socket+:} false; then :
10709   break
10710 fi
10711 done
10712 if ${ac_cv_search_socket+:} false; then :
10713
10714 else
10715   ac_cv_search_socket=no
10716 fi
10717 rm conftest.$ac_ext
10718 LIBS=$ac_func_search_save_LIBS
10719 fi
10720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
10721 $as_echo "$ac_cv_search_socket" >&6; }
10722 ac_res=$ac_cv_search_socket
10723 if test "$ac_res" != no; then :
10724   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10725
10726 fi
10727
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
10729 $as_echo_n "checking for library containing shl_load... " >&6; }
10730 if ${ac_cv_search_shl_load+:} false; then :
10731   $as_echo_n "(cached) " >&6
10732 else
10733   ac_func_search_save_LIBS=$LIBS
10734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10735 /* end confdefs.h.  */
10736
10737 /* Override any GCC internal prototype to avoid an error.
10738    Use char because int might match the return type of a GCC
10739    builtin and then its argument prototype would still apply.  */
10740 #ifdef __cplusplus
10741 extern "C"
10742 #endif
10743 char shl_load ();
10744 int
10745 main ()
10746 {
10747 return shl_load ();
10748   ;
10749   return 0;
10750 }
10751 _ACEOF
10752 for ac_lib in '' dld; do
10753   if test -z "$ac_lib"; then
10754     ac_res="none required"
10755   else
10756     ac_res=-l$ac_lib
10757     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10758   fi
10759   if ac_fn_c_try_link "$LINENO"; then :
10760   ac_cv_search_shl_load=$ac_res
10761 fi
10762 rm -f core conftest.err conftest.$ac_objext \
10763     conftest$ac_exeext
10764   if ${ac_cv_search_shl_load+:} false; then :
10765   break
10766 fi
10767 done
10768 if ${ac_cv_search_shl_load+:} false; then :
10769
10770 else
10771   ac_cv_search_shl_load=no
10772 fi
10773 rm conftest.$ac_ext
10774 LIBS=$ac_func_search_save_LIBS
10775 fi
10776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
10777 $as_echo "$ac_cv_search_shl_load" >&6; }
10778 ac_res=$ac_cv_search_shl_load
10779 if test "$ac_res" != no; then :
10780   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10781
10782 fi
10783
10784 # We only use libld in port/dynloader/aix.c
10785 case $host_os in
10786      aix*)
10787         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
10788 $as_echo_n "checking for library containing ldopen... " >&6; }
10789 if ${ac_cv_search_ldopen+:} false; then :
10790   $as_echo_n "(cached) " >&6
10791 else
10792   ac_func_search_save_LIBS=$LIBS
10793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10794 /* end confdefs.h.  */
10795
10796 /* Override any GCC internal prototype to avoid an error.
10797    Use char because int might match the return type of a GCC
10798    builtin and then its argument prototype would still apply.  */
10799 #ifdef __cplusplus
10800 extern "C"
10801 #endif
10802 char ldopen ();
10803 int
10804 main ()
10805 {
10806 return ldopen ();
10807   ;
10808   return 0;
10809 }
10810 _ACEOF
10811 for ac_lib in '' ld; do
10812   if test -z "$ac_lib"; then
10813     ac_res="none required"
10814   else
10815     ac_res=-l$ac_lib
10816     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10817   fi
10818   if ac_fn_c_try_link "$LINENO"; then :
10819   ac_cv_search_ldopen=$ac_res
10820 fi
10821 rm -f core conftest.err conftest.$ac_objext \
10822     conftest$ac_exeext
10823   if ${ac_cv_search_ldopen+:} false; then :
10824   break
10825 fi
10826 done
10827 if ${ac_cv_search_ldopen+:} false; then :
10828
10829 else
10830   ac_cv_search_ldopen=no
10831 fi
10832 rm conftest.$ac_ext
10833 LIBS=$ac_func_search_save_LIBS
10834 fi
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
10836 $as_echo "$ac_cv_search_ldopen" >&6; }
10837 ac_res=$ac_cv_search_ldopen
10838 if test "$ac_res" != no; then :
10839   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10840
10841 fi
10842
10843         ;;
10844 esac
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
10846 $as_echo_n "checking for library containing getopt_long... " >&6; }
10847 if ${ac_cv_search_getopt_long+:} false; then :
10848   $as_echo_n "(cached) " >&6
10849 else
10850   ac_func_search_save_LIBS=$LIBS
10851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10852 /* end confdefs.h.  */
10853
10854 /* Override any GCC internal prototype to avoid an error.
10855    Use char because int might match the return type of a GCC
10856    builtin and then its argument prototype would still apply.  */
10857 #ifdef __cplusplus
10858 extern "C"
10859 #endif
10860 char getopt_long ();
10861 int
10862 main ()
10863 {
10864 return getopt_long ();
10865   ;
10866   return 0;
10867 }
10868 _ACEOF
10869 for ac_lib in '' getopt gnugetopt; do
10870   if test -z "$ac_lib"; then
10871     ac_res="none required"
10872   else
10873     ac_res=-l$ac_lib
10874     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10875   fi
10876   if ac_fn_c_try_link "$LINENO"; then :
10877   ac_cv_search_getopt_long=$ac_res
10878 fi
10879 rm -f core conftest.err conftest.$ac_objext \
10880     conftest$ac_exeext
10881   if ${ac_cv_search_getopt_long+:} false; then :
10882   break
10883 fi
10884 done
10885 if ${ac_cv_search_getopt_long+:} false; then :
10886
10887 else
10888   ac_cv_search_getopt_long=no
10889 fi
10890 rm conftest.$ac_ext
10891 LIBS=$ac_func_search_save_LIBS
10892 fi
10893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
10894 $as_echo "$ac_cv_search_getopt_long" >&6; }
10895 ac_res=$ac_cv_search_getopt_long
10896 if test "$ac_res" != no; then :
10897   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10898
10899 fi
10900
10901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
10902 $as_echo_n "checking for library containing crypt... " >&6; }
10903 if ${ac_cv_search_crypt+:} false; then :
10904   $as_echo_n "(cached) " >&6
10905 else
10906   ac_func_search_save_LIBS=$LIBS
10907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10908 /* end confdefs.h.  */
10909
10910 /* Override any GCC internal prototype to avoid an error.
10911    Use char because int might match the return type of a GCC
10912    builtin and then its argument prototype would still apply.  */
10913 #ifdef __cplusplus
10914 extern "C"
10915 #endif
10916 char crypt ();
10917 int
10918 main ()
10919 {
10920 return crypt ();
10921   ;
10922   return 0;
10923 }
10924 _ACEOF
10925 for ac_lib in '' crypt; do
10926   if test -z "$ac_lib"; then
10927     ac_res="none required"
10928   else
10929     ac_res=-l$ac_lib
10930     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10931   fi
10932   if ac_fn_c_try_link "$LINENO"; then :
10933   ac_cv_search_crypt=$ac_res
10934 fi
10935 rm -f core conftest.err conftest.$ac_objext \
10936     conftest$ac_exeext
10937   if ${ac_cv_search_crypt+:} false; then :
10938   break
10939 fi
10940 done
10941 if ${ac_cv_search_crypt+:} false; then :
10942
10943 else
10944   ac_cv_search_crypt=no
10945 fi
10946 rm conftest.$ac_ext
10947 LIBS=$ac_func_search_save_LIBS
10948 fi
10949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
10950 $as_echo "$ac_cv_search_crypt" >&6; }
10951 ac_res=$ac_cv_search_crypt
10952 if test "$ac_res" != no; then :
10953   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10954
10955 fi
10956
10957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
10958 $as_echo_n "checking for library containing shm_open... " >&6; }
10959 if ${ac_cv_search_shm_open+:} false; then :
10960   $as_echo_n "(cached) " >&6
10961 else
10962   ac_func_search_save_LIBS=$LIBS
10963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10964 /* end confdefs.h.  */
10965
10966 /* Override any GCC internal prototype to avoid an error.
10967    Use char because int might match the return type of a GCC
10968    builtin and then its argument prototype would still apply.  */
10969 #ifdef __cplusplus
10970 extern "C"
10971 #endif
10972 char shm_open ();
10973 int
10974 main ()
10975 {
10976 return shm_open ();
10977   ;
10978   return 0;
10979 }
10980 _ACEOF
10981 for ac_lib in '' rt; do
10982   if test -z "$ac_lib"; then
10983     ac_res="none required"
10984   else
10985     ac_res=-l$ac_lib
10986     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10987   fi
10988   if ac_fn_c_try_link "$LINENO"; then :
10989   ac_cv_search_shm_open=$ac_res
10990 fi
10991 rm -f core conftest.err conftest.$ac_objext \
10992     conftest$ac_exeext
10993   if ${ac_cv_search_shm_open+:} false; then :
10994   break
10995 fi
10996 done
10997 if ${ac_cv_search_shm_open+:} false; then :
10998
10999 else
11000   ac_cv_search_shm_open=no
11001 fi
11002 rm conftest.$ac_ext
11003 LIBS=$ac_func_search_save_LIBS
11004 fi
11005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11006 $as_echo "$ac_cv_search_shm_open" >&6; }
11007 ac_res=$ac_cv_search_shm_open
11008 if test "$ac_res" != no; then :
11009   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11010
11011 fi
11012
11013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11014 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11015 if ${ac_cv_search_shm_unlink+:} false; then :
11016   $as_echo_n "(cached) " >&6
11017 else
11018   ac_func_search_save_LIBS=$LIBS
11019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11020 /* end confdefs.h.  */
11021
11022 /* Override any GCC internal prototype to avoid an error.
11023    Use char because int might match the return type of a GCC
11024    builtin and then its argument prototype would still apply.  */
11025 #ifdef __cplusplus
11026 extern "C"
11027 #endif
11028 char shm_unlink ();
11029 int
11030 main ()
11031 {
11032 return shm_unlink ();
11033   ;
11034   return 0;
11035 }
11036 _ACEOF
11037 for ac_lib in '' rt; do
11038   if test -z "$ac_lib"; then
11039     ac_res="none required"
11040   else
11041     ac_res=-l$ac_lib
11042     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11043   fi
11044   if ac_fn_c_try_link "$LINENO"; then :
11045   ac_cv_search_shm_unlink=$ac_res
11046 fi
11047 rm -f core conftest.err conftest.$ac_objext \
11048     conftest$ac_exeext
11049   if ${ac_cv_search_shm_unlink+:} false; then :
11050   break
11051 fi
11052 done
11053 if ${ac_cv_search_shm_unlink+:} false; then :
11054
11055 else
11056   ac_cv_search_shm_unlink=no
11057 fi
11058 rm conftest.$ac_ext
11059 LIBS=$ac_func_search_save_LIBS
11060 fi
11061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11062 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11063 ac_res=$ac_cv_search_shm_unlink
11064 if test "$ac_res" != no; then :
11065   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11066
11067 fi
11068
11069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11070 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11071 if ${ac_cv_search_clock_gettime+:} false; then :
11072   $as_echo_n "(cached) " >&6
11073 else
11074   ac_func_search_save_LIBS=$LIBS
11075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11076 /* end confdefs.h.  */
11077
11078 /* Override any GCC internal prototype to avoid an error.
11079    Use char because int might match the return type of a GCC
11080    builtin and then its argument prototype would still apply.  */
11081 #ifdef __cplusplus
11082 extern "C"
11083 #endif
11084 char clock_gettime ();
11085 int
11086 main ()
11087 {
11088 return clock_gettime ();
11089   ;
11090   return 0;
11091 }
11092 _ACEOF
11093 for ac_lib in '' rt posix4; do
11094   if test -z "$ac_lib"; then
11095     ac_res="none required"
11096   else
11097     ac_res=-l$ac_lib
11098     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11099   fi
11100   if ac_fn_c_try_link "$LINENO"; then :
11101   ac_cv_search_clock_gettime=$ac_res
11102 fi
11103 rm -f core conftest.err conftest.$ac_objext \
11104     conftest$ac_exeext
11105   if ${ac_cv_search_clock_gettime+:} false; then :
11106   break
11107 fi
11108 done
11109 if ${ac_cv_search_clock_gettime+:} false; then :
11110
11111 else
11112   ac_cv_search_clock_gettime=no
11113 fi
11114 rm conftest.$ac_ext
11115 LIBS=$ac_func_search_save_LIBS
11116 fi
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11118 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11119 ac_res=$ac_cv_search_clock_gettime
11120 if test "$ac_res" != no; then :
11121   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11122
11123 fi
11124
11125 # Solaris:
11126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11127 $as_echo_n "checking for library containing fdatasync... " >&6; }
11128 if ${ac_cv_search_fdatasync+:} false; then :
11129   $as_echo_n "(cached) " >&6
11130 else
11131   ac_func_search_save_LIBS=$LIBS
11132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11133 /* end confdefs.h.  */
11134
11135 /* Override any GCC internal prototype to avoid an error.
11136    Use char because int might match the return type of a GCC
11137    builtin and then its argument prototype would still apply.  */
11138 #ifdef __cplusplus
11139 extern "C"
11140 #endif
11141 char fdatasync ();
11142 int
11143 main ()
11144 {
11145 return fdatasync ();
11146   ;
11147   return 0;
11148 }
11149 _ACEOF
11150 for ac_lib in '' rt posix4; do
11151   if test -z "$ac_lib"; then
11152     ac_res="none required"
11153   else
11154     ac_res=-l$ac_lib
11155     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11156   fi
11157   if ac_fn_c_try_link "$LINENO"; then :
11158   ac_cv_search_fdatasync=$ac_res
11159 fi
11160 rm -f core conftest.err conftest.$ac_objext \
11161     conftest$ac_exeext
11162   if ${ac_cv_search_fdatasync+:} false; then :
11163   break
11164 fi
11165 done
11166 if ${ac_cv_search_fdatasync+:} false; then :
11167
11168 else
11169   ac_cv_search_fdatasync=no
11170 fi
11171 rm conftest.$ac_ext
11172 LIBS=$ac_func_search_save_LIBS
11173 fi
11174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11175 $as_echo "$ac_cv_search_fdatasync" >&6; }
11176 ac_res=$ac_cv_search_fdatasync
11177 if test "$ac_res" != no; then :
11178   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11179
11180 fi
11181
11182 # Required for thread_test.c on Solaris
11183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11184 $as_echo_n "checking for library containing sched_yield... " >&6; }
11185 if ${ac_cv_search_sched_yield+:} false; then :
11186   $as_echo_n "(cached) " >&6
11187 else
11188   ac_func_search_save_LIBS=$LIBS
11189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11190 /* end confdefs.h.  */
11191
11192 /* Override any GCC internal prototype to avoid an error.
11193    Use char because int might match the return type of a GCC
11194    builtin and then its argument prototype would still apply.  */
11195 #ifdef __cplusplus
11196 extern "C"
11197 #endif
11198 char sched_yield ();
11199 int
11200 main ()
11201 {
11202 return sched_yield ();
11203   ;
11204   return 0;
11205 }
11206 _ACEOF
11207 for ac_lib in '' rt; do
11208   if test -z "$ac_lib"; then
11209     ac_res="none required"
11210   else
11211     ac_res=-l$ac_lib
11212     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11213   fi
11214   if ac_fn_c_try_link "$LINENO"; then :
11215   ac_cv_search_sched_yield=$ac_res
11216 fi
11217 rm -f core conftest.err conftest.$ac_objext \
11218     conftest$ac_exeext
11219   if ${ac_cv_search_sched_yield+:} false; then :
11220   break
11221 fi
11222 done
11223 if ${ac_cv_search_sched_yield+:} false; then :
11224
11225 else
11226   ac_cv_search_sched_yield=no
11227 fi
11228 rm conftest.$ac_ext
11229 LIBS=$ac_func_search_save_LIBS
11230 fi
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11232 $as_echo "$ac_cv_search_sched_yield" >&6; }
11233 ac_res=$ac_cv_search_sched_yield
11234 if test "$ac_res" != no; then :
11235   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11236
11237 fi
11238
11239 # Required for thread_test.c on Solaris 2.5:
11240 # Other ports use it too (HP-UX) so test unconditionally
11241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11242 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11243 if ${ac_cv_search_gethostbyname_r+:} false; then :
11244   $as_echo_n "(cached) " >&6
11245 else
11246   ac_func_search_save_LIBS=$LIBS
11247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11248 /* end confdefs.h.  */
11249
11250 /* Override any GCC internal prototype to avoid an error.
11251    Use char because int might match the return type of a GCC
11252    builtin and then its argument prototype would still apply.  */
11253 #ifdef __cplusplus
11254 extern "C"
11255 #endif
11256 char gethostbyname_r ();
11257 int
11258 main ()
11259 {
11260 return gethostbyname_r ();
11261   ;
11262   return 0;
11263 }
11264 _ACEOF
11265 for ac_lib in '' nsl; do
11266   if test -z "$ac_lib"; then
11267     ac_res="none required"
11268   else
11269     ac_res=-l$ac_lib
11270     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11271   fi
11272   if ac_fn_c_try_link "$LINENO"; then :
11273   ac_cv_search_gethostbyname_r=$ac_res
11274 fi
11275 rm -f core conftest.err conftest.$ac_objext \
11276     conftest$ac_exeext
11277   if ${ac_cv_search_gethostbyname_r+:} false; then :
11278   break
11279 fi
11280 done
11281 if ${ac_cv_search_gethostbyname_r+:} false; then :
11282
11283 else
11284   ac_cv_search_gethostbyname_r=no
11285 fi
11286 rm conftest.$ac_ext
11287 LIBS=$ac_func_search_save_LIBS
11288 fi
11289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11290 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11291 ac_res=$ac_cv_search_gethostbyname_r
11292 if test "$ac_res" != no; then :
11293   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11294
11295 fi
11296
11297 # Cygwin:
11298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11299 $as_echo_n "checking for library containing shmget... " >&6; }
11300 if ${ac_cv_search_shmget+:} false; then :
11301   $as_echo_n "(cached) " >&6
11302 else
11303   ac_func_search_save_LIBS=$LIBS
11304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11305 /* end confdefs.h.  */
11306
11307 /* Override any GCC internal prototype to avoid an error.
11308    Use char because int might match the return type of a GCC
11309    builtin and then its argument prototype would still apply.  */
11310 #ifdef __cplusplus
11311 extern "C"
11312 #endif
11313 char shmget ();
11314 int
11315 main ()
11316 {
11317 return shmget ();
11318   ;
11319   return 0;
11320 }
11321 _ACEOF
11322 for ac_lib in '' cygipc; do
11323   if test -z "$ac_lib"; then
11324     ac_res="none required"
11325   else
11326     ac_res=-l$ac_lib
11327     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11328   fi
11329   if ac_fn_c_try_link "$LINENO"; then :
11330   ac_cv_search_shmget=$ac_res
11331 fi
11332 rm -f core conftest.err conftest.$ac_objext \
11333     conftest$ac_exeext
11334   if ${ac_cv_search_shmget+:} false; then :
11335   break
11336 fi
11337 done
11338 if ${ac_cv_search_shmget+:} false; then :
11339
11340 else
11341   ac_cv_search_shmget=no
11342 fi
11343 rm conftest.$ac_ext
11344 LIBS=$ac_func_search_save_LIBS
11345 fi
11346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11347 $as_echo "$ac_cv_search_shmget" >&6; }
11348 ac_res=$ac_cv_search_shmget
11349 if test "$ac_res" != no; then :
11350   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11351
11352 fi
11353
11354
11355 if test "$with_readline" = yes; then
11356
11357
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11359 $as_echo_n "checking for library containing readline... " >&6; }
11360 if ${pgac_cv_check_readline+:} false; then :
11361   $as_echo_n "(cached) " >&6
11362 else
11363   pgac_cv_check_readline=no
11364 pgac_save_LIBS=$LIBS
11365 if test x"$with_libedit_preferred" != x"yes"
11366 then    READLINE_ORDER="-lreadline -ledit"
11367 else    READLINE_ORDER="-ledit -lreadline"
11368 fi
11369 for pgac_rllib in $READLINE_ORDER ; do
11370   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11371     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11372     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11373 /* end confdefs.h.  */
11374
11375 /* Override any GCC internal prototype to avoid an error.
11376    Use char because int might match the return type of a GCC
11377    builtin and then its argument prototype would still apply.  */
11378 #ifdef __cplusplus
11379 extern "C"
11380 #endif
11381 char readline ();
11382 int
11383 main ()
11384 {
11385 return readline ();
11386   ;
11387   return 0;
11388 }
11389 _ACEOF
11390 if ac_fn_c_try_link "$LINENO"; then :
11391
11392       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11393       # recognize dependent libraries; assume curses is needed if we didn't
11394       # find any dependency.
11395       case $host_os in
11396         netbsd* | openbsd* | irix*)
11397           if test x"$pgac_lib" = x"" ; then
11398             pgac_lib=" -lcurses"
11399           fi ;;
11400       esac
11401
11402       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11403       break
11404
11405 fi
11406 rm -f core conftest.err conftest.$ac_objext \
11407     conftest$ac_exeext conftest.$ac_ext
11408   done
11409   if test "$pgac_cv_check_readline" != no ; then
11410     break
11411   fi
11412 done
11413 LIBS=$pgac_save_LIBS
11414
11415 fi
11416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11417 $as_echo "$pgac_cv_check_readline" >&6; }
11418 if test "$pgac_cv_check_readline" != no ; then
11419   LIBS="$pgac_cv_check_readline $LIBS"
11420
11421 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11422
11423 fi
11424
11425
11426   if test x"$pgac_cv_check_readline" = x"no"; then
11427     as_fn_error $? "readline library not found
11428 If you have readline already installed, see config.log for details on the
11429 failure.  It is possible the compiler isn't looking in the proper directory.
11430 Use --without-readline to disable readline support." "$LINENO" 5
11431   fi
11432 fi
11433
11434 if test "$with_zlib" = yes; then
11435   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11436 $as_echo_n "checking for inflate in -lz... " >&6; }
11437 if ${ac_cv_lib_z_inflate+:} false; then :
11438   $as_echo_n "(cached) " >&6
11439 else
11440   ac_check_lib_save_LIBS=$LIBS
11441 LIBS="-lz  $LIBS"
11442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11443 /* end confdefs.h.  */
11444
11445 /* Override any GCC internal prototype to avoid an error.
11446    Use char because int might match the return type of a GCC
11447    builtin and then its argument prototype would still apply.  */
11448 #ifdef __cplusplus
11449 extern "C"
11450 #endif
11451 char inflate ();
11452 int
11453 main ()
11454 {
11455 return inflate ();
11456   ;
11457   return 0;
11458 }
11459 _ACEOF
11460 if ac_fn_c_try_link "$LINENO"; then :
11461   ac_cv_lib_z_inflate=yes
11462 else
11463   ac_cv_lib_z_inflate=no
11464 fi
11465 rm -f core conftest.err conftest.$ac_objext \
11466     conftest$ac_exeext conftest.$ac_ext
11467 LIBS=$ac_check_lib_save_LIBS
11468 fi
11469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11470 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11471 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11472   cat >>confdefs.h <<_ACEOF
11473 #define HAVE_LIBZ 1
11474 _ACEOF
11475
11476   LIBS="-lz $LIBS"
11477
11478 else
11479   as_fn_error $? "zlib library not found
11480 If you have zlib already installed, see config.log for details on the
11481 failure.  It is possible the compiler isn't looking in the proper directory.
11482 Use --without-zlib to disable zlib support." "$LINENO" 5
11483 fi
11484
11485 fi
11486
11487 if test "$enable_spinlocks" = yes; then
11488
11489 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11490
11491 else
11492   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11493 *** Not using spinlocks will cause poor performance." >&5
11494 $as_echo "$as_me: WARNING:
11495 *** Not using spinlocks will cause poor performance." >&2;}
11496 fi
11497
11498 if test "$enable_atomics" = yes; then
11499
11500 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11501
11502 else
11503   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11504 *** Not using atomic operations will cause poor performance." >&5
11505 $as_echo "$as_me: WARNING:
11506 *** Not using atomic operations will cause poor performance." >&2;}
11507 fi
11508
11509 if test "$with_gssapi" = yes ; then
11510   if test "$PORTNAME" != "win32"; then
11511     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11512 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11513 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11514   $as_echo_n "(cached) " >&6
11515 else
11516   ac_func_search_save_LIBS=$LIBS
11517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11518 /* end confdefs.h.  */
11519
11520 /* Override any GCC internal prototype to avoid an error.
11521    Use char because int might match the return type of a GCC
11522    builtin and then its argument prototype would still apply.  */
11523 #ifdef __cplusplus
11524 extern "C"
11525 #endif
11526 char gss_init_sec_context ();
11527 int
11528 main ()
11529 {
11530 return gss_init_sec_context ();
11531   ;
11532   return 0;
11533 }
11534 _ACEOF
11535 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11536   if test -z "$ac_lib"; then
11537     ac_res="none required"
11538   else
11539     ac_res=-l$ac_lib
11540     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11541   fi
11542   if ac_fn_c_try_link "$LINENO"; then :
11543   ac_cv_search_gss_init_sec_context=$ac_res
11544 fi
11545 rm -f core conftest.err conftest.$ac_objext \
11546     conftest$ac_exeext
11547   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11548   break
11549 fi
11550 done
11551 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11552
11553 else
11554   ac_cv_search_gss_init_sec_context=no
11555 fi
11556 rm conftest.$ac_ext
11557 LIBS=$ac_func_search_save_LIBS
11558 fi
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11560 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11561 ac_res=$ac_cv_search_gss_init_sec_context
11562 if test "$ac_res" != no; then :
11563   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11564
11565 else
11566   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11567 fi
11568
11569   else
11570     LIBS="$LIBS -lgssapi32"
11571   fi
11572 fi
11573
11574 if test "$with_openssl" = yes ; then
11575     if test "$PORTNAME" != "win32"; then
11576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11577 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11578 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11579   $as_echo_n "(cached) " >&6
11580 else
11581   ac_check_lib_save_LIBS=$LIBS
11582 LIBS="-lcrypto  $LIBS"
11583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11584 /* end confdefs.h.  */
11585
11586 /* Override any GCC internal prototype to avoid an error.
11587    Use char because int might match the return type of a GCC
11588    builtin and then its argument prototype would still apply.  */
11589 #ifdef __cplusplus
11590 extern "C"
11591 #endif
11592 char CRYPTO_new_ex_data ();
11593 int
11594 main ()
11595 {
11596 return CRYPTO_new_ex_data ();
11597   ;
11598   return 0;
11599 }
11600 _ACEOF
11601 if ac_fn_c_try_link "$LINENO"; then :
11602   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11603 else
11604   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11605 fi
11606 rm -f core conftest.err conftest.$ac_objext \
11607     conftest$ac_exeext conftest.$ac_ext
11608 LIBS=$ac_check_lib_save_LIBS
11609 fi
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11611 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11612 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11613   cat >>confdefs.h <<_ACEOF
11614 #define HAVE_LIBCRYPTO 1
11615 _ACEOF
11616
11617   LIBS="-lcrypto $LIBS"
11618
11619 else
11620   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11621 fi
11622
11623      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11624 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11625 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11626   $as_echo_n "(cached) " >&6
11627 else
11628   ac_check_lib_save_LIBS=$LIBS
11629 LIBS="-lssl  $LIBS"
11630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11631 /* end confdefs.h.  */
11632
11633 /* Override any GCC internal prototype to avoid an error.
11634    Use char because int might match the return type of a GCC
11635    builtin and then its argument prototype would still apply.  */
11636 #ifdef __cplusplus
11637 extern "C"
11638 #endif
11639 char SSL_new ();
11640 int
11641 main ()
11642 {
11643 return SSL_new ();
11644   ;
11645   return 0;
11646 }
11647 _ACEOF
11648 if ac_fn_c_try_link "$LINENO"; then :
11649   ac_cv_lib_ssl_SSL_new=yes
11650 else
11651   ac_cv_lib_ssl_SSL_new=no
11652 fi
11653 rm -f core conftest.err conftest.$ac_objext \
11654     conftest$ac_exeext conftest.$ac_ext
11655 LIBS=$ac_check_lib_save_LIBS
11656 fi
11657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
11658 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
11659 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
11660   cat >>confdefs.h <<_ACEOF
11661 #define HAVE_LIBSSL 1
11662 _ACEOF
11663
11664   LIBS="-lssl $LIBS"
11665
11666 else
11667   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
11668 fi
11669
11670   else
11671      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
11672 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
11673 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11674   $as_echo_n "(cached) " >&6
11675 else
11676   ac_func_search_save_LIBS=$LIBS
11677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11678 /* end confdefs.h.  */
11679
11680 /* Override any GCC internal prototype to avoid an error.
11681    Use char because int might match the return type of a GCC
11682    builtin and then its argument prototype would still apply.  */
11683 #ifdef __cplusplus
11684 extern "C"
11685 #endif
11686 char CRYPTO_new_ex_data ();
11687 int
11688 main ()
11689 {
11690 return CRYPTO_new_ex_data ();
11691   ;
11692   return 0;
11693 }
11694 _ACEOF
11695 for ac_lib in '' eay32 crypto; do
11696   if test -z "$ac_lib"; then
11697     ac_res="none required"
11698   else
11699     ac_res=-l$ac_lib
11700     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11701   fi
11702   if ac_fn_c_try_link "$LINENO"; then :
11703   ac_cv_search_CRYPTO_new_ex_data=$ac_res
11704 fi
11705 rm -f core conftest.err conftest.$ac_objext \
11706     conftest$ac_exeext
11707   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11708   break
11709 fi
11710 done
11711 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11712
11713 else
11714   ac_cv_search_CRYPTO_new_ex_data=no
11715 fi
11716 rm conftest.$ac_ext
11717 LIBS=$ac_func_search_save_LIBS
11718 fi
11719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
11720 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
11721 ac_res=$ac_cv_search_CRYPTO_new_ex_data
11722 if test "$ac_res" != no; then :
11723   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11724
11725 else
11726   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
11727 fi
11728
11729      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
11730 $as_echo_n "checking for library containing SSL_new... " >&6; }
11731 if ${ac_cv_search_SSL_new+:} false; then :
11732   $as_echo_n "(cached) " >&6
11733 else
11734   ac_func_search_save_LIBS=$LIBS
11735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11736 /* end confdefs.h.  */
11737
11738 /* Override any GCC internal prototype to avoid an error.
11739    Use char because int might match the return type of a GCC
11740    builtin and then its argument prototype would still apply.  */
11741 #ifdef __cplusplus
11742 extern "C"
11743 #endif
11744 char SSL_new ();
11745 int
11746 main ()
11747 {
11748 return SSL_new ();
11749   ;
11750   return 0;
11751 }
11752 _ACEOF
11753 for ac_lib in '' ssleay32 ssl; do
11754   if test -z "$ac_lib"; then
11755     ac_res="none required"
11756   else
11757     ac_res=-l$ac_lib
11758     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11759   fi
11760   if ac_fn_c_try_link "$LINENO"; then :
11761   ac_cv_search_SSL_new=$ac_res
11762 fi
11763 rm -f core conftest.err conftest.$ac_objext \
11764     conftest$ac_exeext
11765   if ${ac_cv_search_SSL_new+:} false; then :
11766   break
11767 fi
11768 done
11769 if ${ac_cv_search_SSL_new+:} false; then :
11770
11771 else
11772   ac_cv_search_SSL_new=no
11773 fi
11774 rm conftest.$ac_ext
11775 LIBS=$ac_func_search_save_LIBS
11776 fi
11777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
11778 $as_echo "$ac_cv_search_SSL_new" >&6; }
11779 ac_res=$ac_cv_search_SSL_new
11780 if test "$ac_res" != no; then :
11781   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11782
11783 else
11784   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
11785 fi
11786
11787   fi
11788   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
11789 do :
11790   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11791 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11792 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11793   cat >>confdefs.h <<_ACEOF
11794 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11795 _ACEOF
11796
11797 fi
11798 done
11799
11800   # Functions introduced in OpenSSL 1.1.0. We used to check for
11801   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
11802   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
11803   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
11804   # functions.
11805   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
11806 do :
11807   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11808 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11809 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11810   cat >>confdefs.h <<_ACEOF
11811 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11812 _ACEOF
11813
11814 fi
11815 done
11816
11817   # OpenSSL versions before 1.1.0 required setting callback functions, for
11818   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
11819   # function was removed.
11820   for ac_func in CRYPTO_lock
11821 do :
11822   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
11823 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
11824   cat >>confdefs.h <<_ACEOF
11825 #define HAVE_CRYPTO_LOCK 1
11826 _ACEOF
11827
11828 fi
11829 done
11830
11831 fi
11832
11833 if test "$with_pam" = yes ; then
11834   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
11835 $as_echo_n "checking for pam_start in -lpam... " >&6; }
11836 if ${ac_cv_lib_pam_pam_start+:} false; then :
11837   $as_echo_n "(cached) " >&6
11838 else
11839   ac_check_lib_save_LIBS=$LIBS
11840 LIBS="-lpam  $LIBS"
11841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11842 /* end confdefs.h.  */
11843
11844 /* Override any GCC internal prototype to avoid an error.
11845    Use char because int might match the return type of a GCC
11846    builtin and then its argument prototype would still apply.  */
11847 #ifdef __cplusplus
11848 extern "C"
11849 #endif
11850 char pam_start ();
11851 int
11852 main ()
11853 {
11854 return pam_start ();
11855   ;
11856   return 0;
11857 }
11858 _ACEOF
11859 if ac_fn_c_try_link "$LINENO"; then :
11860   ac_cv_lib_pam_pam_start=yes
11861 else
11862   ac_cv_lib_pam_pam_start=no
11863 fi
11864 rm -f core conftest.err conftest.$ac_objext \
11865     conftest$ac_exeext conftest.$ac_ext
11866 LIBS=$ac_check_lib_save_LIBS
11867 fi
11868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
11869 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
11870 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
11871   cat >>confdefs.h <<_ACEOF
11872 #define HAVE_LIBPAM 1
11873 _ACEOF
11874
11875   LIBS="-lpam $LIBS"
11876
11877 else
11878   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
11879 fi
11880
11881 fi
11882
11883 if test "$with_libxml" = yes ; then
11884   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
11885 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
11886 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
11887   $as_echo_n "(cached) " >&6
11888 else
11889   ac_check_lib_save_LIBS=$LIBS
11890 LIBS="-lxml2  $LIBS"
11891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11892 /* end confdefs.h.  */
11893
11894 /* Override any GCC internal prototype to avoid an error.
11895    Use char because int might match the return type of a GCC
11896    builtin and then its argument prototype would still apply.  */
11897 #ifdef __cplusplus
11898 extern "C"
11899 #endif
11900 char xmlSaveToBuffer ();
11901 int
11902 main ()
11903 {
11904 return xmlSaveToBuffer ();
11905   ;
11906   return 0;
11907 }
11908 _ACEOF
11909 if ac_fn_c_try_link "$LINENO"; then :
11910   ac_cv_lib_xml2_xmlSaveToBuffer=yes
11911 else
11912   ac_cv_lib_xml2_xmlSaveToBuffer=no
11913 fi
11914 rm -f core conftest.err conftest.$ac_objext \
11915     conftest$ac_exeext conftest.$ac_ext
11916 LIBS=$ac_check_lib_save_LIBS
11917 fi
11918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
11919 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
11920 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
11921   cat >>confdefs.h <<_ACEOF
11922 #define HAVE_LIBXML2 1
11923 _ACEOF
11924
11925   LIBS="-lxml2 $LIBS"
11926
11927 else
11928   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
11929 fi
11930
11931 fi
11932
11933 if test "$with_libxslt" = yes ; then
11934   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
11935 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
11936 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
11937   $as_echo_n "(cached) " >&6
11938 else
11939   ac_check_lib_save_LIBS=$LIBS
11940 LIBS="-lxslt  $LIBS"
11941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11942 /* end confdefs.h.  */
11943
11944 /* Override any GCC internal prototype to avoid an error.
11945    Use char because int might match the return type of a GCC
11946    builtin and then its argument prototype would still apply.  */
11947 #ifdef __cplusplus
11948 extern "C"
11949 #endif
11950 char xsltCleanupGlobals ();
11951 int
11952 main ()
11953 {
11954 return xsltCleanupGlobals ();
11955   ;
11956   return 0;
11957 }
11958 _ACEOF
11959 if ac_fn_c_try_link "$LINENO"; then :
11960   ac_cv_lib_xslt_xsltCleanupGlobals=yes
11961 else
11962   ac_cv_lib_xslt_xsltCleanupGlobals=no
11963 fi
11964 rm -f core conftest.err conftest.$ac_objext \
11965     conftest$ac_exeext conftest.$ac_ext
11966 LIBS=$ac_check_lib_save_LIBS
11967 fi
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
11969 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
11970 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
11971   cat >>confdefs.h <<_ACEOF
11972 #define HAVE_LIBXSLT 1
11973 _ACEOF
11974
11975   LIBS="-lxslt $LIBS"
11976
11977 else
11978   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
11979 fi
11980
11981 fi
11982
11983 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
11984 if test "$with_ldap" = yes ; then
11985   _LIBS="$LIBS"
11986   if test "$PORTNAME" != "win32"; then
11987     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
11988 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
11989 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
11990   $as_echo_n "(cached) " >&6
11991 else
11992   ac_check_lib_save_LIBS=$LIBS
11993 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
11994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11995 /* end confdefs.h.  */
11996
11997 /* Override any GCC internal prototype to avoid an error.
11998    Use char because int might match the return type of a GCC
11999    builtin and then its argument prototype would still apply.  */
12000 #ifdef __cplusplus
12001 extern "C"
12002 #endif
12003 char ldap_bind ();
12004 int
12005 main ()
12006 {
12007 return ldap_bind ();
12008   ;
12009   return 0;
12010 }
12011 _ACEOF
12012 if ac_fn_c_try_link "$LINENO"; then :
12013   ac_cv_lib_ldap_ldap_bind=yes
12014 else
12015   ac_cv_lib_ldap_ldap_bind=no
12016 fi
12017 rm -f core conftest.err conftest.$ac_objext \
12018     conftest$ac_exeext conftest.$ac_ext
12019 LIBS=$ac_check_lib_save_LIBS
12020 fi
12021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12022 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12023 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12024   cat >>confdefs.h <<_ACEOF
12025 #define HAVE_LIBLDAP 1
12026 _ACEOF
12027
12028   LIBS="-lldap $LIBS"
12029
12030 else
12031   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12032 fi
12033
12034     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12035     if test "$enable_thread_safety" = yes; then
12036       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12037       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12038 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12039 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12040   $as_echo_n "(cached) " >&6
12041 else
12042   ac_check_lib_save_LIBS=$LIBS
12043 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12045 /* end confdefs.h.  */
12046
12047 /* Override any GCC internal prototype to avoid an error.
12048    Use char because int might match the return type of a GCC
12049    builtin and then its argument prototype would still apply.  */
12050 #ifdef __cplusplus
12051 extern "C"
12052 #endif
12053 char ldap_simple_bind ();
12054 int
12055 main ()
12056 {
12057 return ldap_simple_bind ();
12058   ;
12059   return 0;
12060 }
12061 _ACEOF
12062 if ac_fn_c_try_link "$LINENO"; then :
12063   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12064 else
12065   ac_cv_lib_ldap_r_ldap_simple_bind=no
12066 fi
12067 rm -f core conftest.err conftest.$ac_objext \
12068     conftest$ac_exeext conftest.$ac_ext
12069 LIBS=$ac_check_lib_save_LIBS
12070 fi
12071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12072 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12073 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12074   cat >>confdefs.h <<_ACEOF
12075 #define HAVE_LIBLDAP_R 1
12076 _ACEOF
12077
12078   LIBS="-lldap_r $LIBS"
12079
12080 else
12081   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12082 fi
12083
12084       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12085     else
12086       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12087     fi
12088     for ac_func in ldap_initialize
12089 do :
12090   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12091 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12092   cat >>confdefs.h <<_ACEOF
12093 #define HAVE_LDAP_INITIALIZE 1
12094 _ACEOF
12095
12096 fi
12097 done
12098
12099   else
12100     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12101 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12102 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12103   $as_echo_n "(cached) " >&6
12104 else
12105   ac_check_lib_save_LIBS=$LIBS
12106 LIBS="-lwldap32  $LIBS"
12107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12108 /* end confdefs.h.  */
12109
12110 /* Override any GCC internal prototype to avoid an error.
12111    Use char because int might match the return type of a GCC
12112    builtin and then its argument prototype would still apply.  */
12113 #ifdef __cplusplus
12114 extern "C"
12115 #endif
12116 char ldap_bind ();
12117 int
12118 main ()
12119 {
12120 return ldap_bind ();
12121   ;
12122   return 0;
12123 }
12124 _ACEOF
12125 if ac_fn_c_try_link "$LINENO"; then :
12126   ac_cv_lib_wldap32_ldap_bind=yes
12127 else
12128   ac_cv_lib_wldap32_ldap_bind=no
12129 fi
12130 rm -f core conftest.err conftest.$ac_objext \
12131     conftest$ac_exeext conftest.$ac_ext
12132 LIBS=$ac_check_lib_save_LIBS
12133 fi
12134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12135 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12136 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12137   cat >>confdefs.h <<_ACEOF
12138 #define HAVE_LIBWLDAP32 1
12139 _ACEOF
12140
12141   LIBS="-lwldap32 $LIBS"
12142
12143 else
12144   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12145 fi
12146
12147     LDAP_LIBS_FE="-lwldap32"
12148     LDAP_LIBS_BE="-lwldap32"
12149   fi
12150   LIBS="$_LIBS"
12151 fi
12152
12153
12154
12155 # for contrib/sepgsql
12156 if test "$with_selinux" = yes; then
12157   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12158 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12159 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12160   $as_echo_n "(cached) " >&6
12161 else
12162   ac_check_lib_save_LIBS=$LIBS
12163 LIBS="-lselinux  $LIBS"
12164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12165 /* end confdefs.h.  */
12166
12167 /* Override any GCC internal prototype to avoid an error.
12168    Use char because int might match the return type of a GCC
12169    builtin and then its argument prototype would still apply.  */
12170 #ifdef __cplusplus
12171 extern "C"
12172 #endif
12173 char security_compute_create_name ();
12174 int
12175 main ()
12176 {
12177 return security_compute_create_name ();
12178   ;
12179   return 0;
12180 }
12181 _ACEOF
12182 if ac_fn_c_try_link "$LINENO"; then :
12183   ac_cv_lib_selinux_security_compute_create_name=yes
12184 else
12185   ac_cv_lib_selinux_security_compute_create_name=no
12186 fi
12187 rm -f core conftest.err conftest.$ac_objext \
12188     conftest$ac_exeext conftest.$ac_ext
12189 LIBS=$ac_check_lib_save_LIBS
12190 fi
12191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12192 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12193 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12194   cat >>confdefs.h <<_ACEOF
12195 #define HAVE_LIBSELINUX 1
12196 _ACEOF
12197
12198   LIBS="-lselinux $LIBS"
12199
12200 else
12201   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12202 fi
12203
12204 fi
12205
12206 # for contrib/uuid-ossp
12207 if test "$with_uuid" = bsd ; then
12208   # On BSD, the UUID functions are in libc
12209   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12210 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12211   UUID_LIBS=""
12212 else
12213   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12214 fi
12215
12216 elif test "$with_uuid" = e2fs ; then
12217   # On macOS, the UUID functions are in libc
12218   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12219 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12220   UUID_LIBS=""
12221 else
12222   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12223 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12224 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12225   $as_echo_n "(cached) " >&6
12226 else
12227   ac_check_lib_save_LIBS=$LIBS
12228 LIBS="-luuid  $LIBS"
12229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12230 /* end confdefs.h.  */
12231
12232 /* Override any GCC internal prototype to avoid an error.
12233    Use char because int might match the return type of a GCC
12234    builtin and then its argument prototype would still apply.  */
12235 #ifdef __cplusplus
12236 extern "C"
12237 #endif
12238 char uuid_generate ();
12239 int
12240 main ()
12241 {
12242 return uuid_generate ();
12243   ;
12244   return 0;
12245 }
12246 _ACEOF
12247 if ac_fn_c_try_link "$LINENO"; then :
12248   ac_cv_lib_uuid_uuid_generate=yes
12249 else
12250   ac_cv_lib_uuid_uuid_generate=no
12251 fi
12252 rm -f core conftest.err conftest.$ac_objext \
12253     conftest$ac_exeext conftest.$ac_ext
12254 LIBS=$ac_check_lib_save_LIBS
12255 fi
12256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12257 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12258 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12259   UUID_LIBS="-luuid"
12260 else
12261   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12262 fi
12263
12264 fi
12265
12266 elif test "$with_uuid" = ossp ; then
12267   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12268 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12269 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12270   $as_echo_n "(cached) " >&6
12271 else
12272   ac_check_lib_save_LIBS=$LIBS
12273 LIBS="-lossp-uuid  $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_export ();
12284 int
12285 main ()
12286 {
12287 return uuid_export ();
12288   ;
12289   return 0;
12290 }
12291 _ACEOF
12292 if ac_fn_c_try_link "$LINENO"; then :
12293   ac_cv_lib_ossp_uuid_uuid_export=yes
12294 else
12295   ac_cv_lib_ossp_uuid_uuid_export=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_ossp_uuid_uuid_export" >&5
12302 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12303 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12304   UUID_LIBS="-lossp-uuid"
12305 else
12306   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12307 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12308 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12309   $as_echo_n "(cached) " >&6
12310 else
12311   ac_check_lib_save_LIBS=$LIBS
12312 LIBS="-luuid  $LIBS"
12313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12314 /* end confdefs.h.  */
12315
12316 /* Override any GCC internal prototype to avoid an error.
12317    Use char because int might match the return type of a GCC
12318    builtin and then its argument prototype would still apply.  */
12319 #ifdef __cplusplus
12320 extern "C"
12321 #endif
12322 char uuid_export ();
12323 int
12324 main ()
12325 {
12326 return uuid_export ();
12327   ;
12328   return 0;
12329 }
12330 _ACEOF
12331 if ac_fn_c_try_link "$LINENO"; then :
12332   ac_cv_lib_uuid_uuid_export=yes
12333 else
12334   ac_cv_lib_uuid_uuid_export=no
12335 fi
12336 rm -f core conftest.err conftest.$ac_objext \
12337     conftest$ac_exeext conftest.$ac_ext
12338 LIBS=$ac_check_lib_save_LIBS
12339 fi
12340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12341 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12342 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12343   UUID_LIBS="-luuid"
12344 else
12345   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12346 fi
12347
12348 fi
12349
12350 fi
12351
12352
12353
12354 ##
12355 ## Header files
12356 ##
12357
12358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12359 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12360 if ${ac_cv_header_stdbool_h+:} false; then :
12361   $as_echo_n "(cached) " >&6
12362 else
12363   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12364 /* end confdefs.h.  */
12365
12366              #include <stdbool.h>
12367              #ifndef bool
12368               "error: bool is not defined"
12369              #endif
12370              #ifndef false
12371               "error: false is not defined"
12372              #endif
12373              #if false
12374               "error: false is not 0"
12375              #endif
12376              #ifndef true
12377               "error: true is not defined"
12378              #endif
12379              #if true != 1
12380               "error: true is not 1"
12381              #endif
12382              #ifndef __bool_true_false_are_defined
12383               "error: __bool_true_false_are_defined is not defined"
12384              #endif
12385
12386              struct s { _Bool s: 1; _Bool t; } s;
12387
12388              char a[true == 1 ? 1 : -1];
12389              char b[false == 0 ? 1 : -1];
12390              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12391              char d[(bool) 0.5 == true ? 1 : -1];
12392              /* See body of main program for 'e'.  */
12393              char f[(_Bool) 0.0 == false ? 1 : -1];
12394              char g[true];
12395              char h[sizeof (_Bool)];
12396              char i[sizeof s.t];
12397              enum { j = false, k = true, l = false * true, m = true * 256 };
12398              /* The following fails for
12399                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12400              _Bool n[m];
12401              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12402              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12403              /* Catch a bug in an HP-UX C compiler.  See
12404                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12405                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12406               */
12407              _Bool q = true;
12408              _Bool *pq = &q;
12409
12410 int
12411 main ()
12412 {
12413
12414              bool e = &s;
12415              *pq |= q;
12416              *pq |= ! q;
12417              /* Refer to every declared value, to avoid compiler optimizations.  */
12418              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12419                      + !m + !n + !o + !p + !q + !pq);
12420
12421   ;
12422   return 0;
12423 }
12424 _ACEOF
12425 if ac_fn_c_try_compile "$LINENO"; then :
12426   ac_cv_header_stdbool_h=yes
12427 else
12428   ac_cv_header_stdbool_h=no
12429 fi
12430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12431 fi
12432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12433 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12434    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12435 if test "x$ac_cv_type__Bool" = xyes; then :
12436
12437 cat >>confdefs.h <<_ACEOF
12438 #define HAVE__BOOL 1
12439 _ACEOF
12440
12441
12442 fi
12443
12444
12445 if test $ac_cv_header_stdbool_h = yes; then
12446
12447 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12448
12449 fi
12450
12451
12452 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
12453 do :
12454   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12455 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12456 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12457   cat >>confdefs.h <<_ACEOF
12458 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12459 _ACEOF
12460
12461 fi
12462
12463 done
12464
12465
12466 # On BSD, test for net/if.h will fail unless sys/socket.h
12467 # is included first.
12468 for ac_header in net/if.h
12469 do :
12470   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12471 #include <sys/socket.h>
12472
12473 "
12474 if test "x$ac_cv_header_net_if_h" = xyes; then :
12475   cat >>confdefs.h <<_ACEOF
12476 #define HAVE_NET_IF_H 1
12477 _ACEOF
12478
12479 fi
12480
12481 done
12482
12483
12484 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12485 # is included first.
12486 for ac_header in sys/ucred.h
12487 do :
12488   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12489 #include <sys/param.h>
12490
12491 "
12492 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12493   cat >>confdefs.h <<_ACEOF
12494 #define HAVE_SYS_UCRED_H 1
12495 _ACEOF
12496
12497 fi
12498
12499 done
12500
12501
12502 # At least on IRIX, test for netinet/tcp.h will fail unless
12503 # netinet/in.h is included first.
12504 for ac_header in netinet/tcp.h
12505 do :
12506   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12507 #include <netinet/in.h>
12508
12509 "
12510 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12511   cat >>confdefs.h <<_ACEOF
12512 #define HAVE_NETINET_TCP_H 1
12513 _ACEOF
12514
12515 fi
12516
12517 done
12518
12519
12520 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12521   for ac_header in readline/readline.h
12522 do :
12523   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12524 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12525   cat >>confdefs.h <<_ACEOF
12526 #define HAVE_READLINE_READLINE_H 1
12527 _ACEOF
12528
12529 else
12530   for ac_header in readline.h
12531 do :
12532   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12533 if test "x$ac_cv_header_readline_h" = xyes; then :
12534   cat >>confdefs.h <<_ACEOF
12535 #define HAVE_READLINE_H 1
12536 _ACEOF
12537
12538 else
12539   as_fn_error $? "readline header not found
12540 If you have readline already installed, see config.log for details on the
12541 failure.  It is possible the compiler isn't looking in the proper directory.
12542 Use --without-readline to disable readline support." "$LINENO" 5
12543 fi
12544
12545 done
12546
12547 fi
12548
12549 done
12550
12551   for ac_header in readline/history.h
12552 do :
12553   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12554 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12555   cat >>confdefs.h <<_ACEOF
12556 #define HAVE_READLINE_HISTORY_H 1
12557 _ACEOF
12558
12559 else
12560   for ac_header in history.h
12561 do :
12562   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12563 if test "x$ac_cv_header_history_h" = xyes; then :
12564   cat >>confdefs.h <<_ACEOF
12565 #define HAVE_HISTORY_H 1
12566 _ACEOF
12567
12568 else
12569   as_fn_error $? "history header not found
12570 If you have readline already installed, see config.log for details on the
12571 failure.  It is possible the compiler isn't looking in the proper directory.
12572 Use --without-readline to disable readline support." "$LINENO" 5
12573 fi
12574
12575 done
12576
12577 fi
12578
12579 done
12580
12581 fi
12582
12583 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12584 # Some installations of libedit usurp /usr/include/readline/, which seems
12585 # bad practice, since in combined installations readline will have its headers
12586 # there.  We might have to resort to AC_EGREP checks to make sure we found
12587 # the proper header...
12588   for ac_header in editline/readline.h
12589 do :
12590   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12591 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12592   cat >>confdefs.h <<_ACEOF
12593 #define HAVE_EDITLINE_READLINE_H 1
12594 _ACEOF
12595
12596 else
12597   for ac_header in readline.h
12598 do :
12599   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12600 if test "x$ac_cv_header_readline_h" = xyes; then :
12601   cat >>confdefs.h <<_ACEOF
12602 #define HAVE_READLINE_H 1
12603 _ACEOF
12604
12605 else
12606   for ac_header in readline/readline.h
12607 do :
12608   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12609 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12610   cat >>confdefs.h <<_ACEOF
12611 #define HAVE_READLINE_READLINE_H 1
12612 _ACEOF
12613
12614 else
12615   as_fn_error $? "readline header not found
12616 If you have libedit already installed, see config.log for details on the
12617 failure.  It is possible the compiler isn't looking in the proper directory.
12618 Use --without-readline to disable libedit support." "$LINENO" 5
12619 fi
12620
12621 done
12622
12623 fi
12624
12625 done
12626
12627 fi
12628
12629 done
12630
12631 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12632 # not be there at all.  Hence, don't complain if not found.  We must check
12633 # though, since in yet other versions it is an independent header.
12634   for ac_header in editline/history.h
12635 do :
12636   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12637 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12638   cat >>confdefs.h <<_ACEOF
12639 #define HAVE_EDITLINE_HISTORY_H 1
12640 _ACEOF
12641
12642 else
12643   for ac_header in history.h
12644 do :
12645   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12646 if test "x$ac_cv_header_history_h" = xyes; then :
12647   cat >>confdefs.h <<_ACEOF
12648 #define HAVE_HISTORY_H 1
12649 _ACEOF
12650
12651 else
12652   for ac_header in readline/history.h
12653 do :
12654   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12655 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12656   cat >>confdefs.h <<_ACEOF
12657 #define HAVE_READLINE_HISTORY_H 1
12658 _ACEOF
12659
12660 fi
12661
12662 done
12663
12664 fi
12665
12666 done
12667
12668 fi
12669
12670 done
12671
12672 fi
12673
12674 if test "$with_zlib" = yes; then
12675   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
12676 if test "x$ac_cv_header_zlib_h" = xyes; then :
12677
12678 else
12679   as_fn_error $? "zlib header not found
12680 If you have zlib already installed, see config.log for details on the
12681 failure.  It is possible the compiler isn't looking in the proper directory.
12682 Use --without-zlib to disable zlib support." "$LINENO" 5
12683 fi
12684
12685
12686 fi
12687
12688 if test "$with_gssapi" = yes ; then
12689   for ac_header in gssapi/gssapi.h
12690 do :
12691   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
12692 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
12693   cat >>confdefs.h <<_ACEOF
12694 #define HAVE_GSSAPI_GSSAPI_H 1
12695 _ACEOF
12696
12697 else
12698   for ac_header in gssapi.h
12699 do :
12700   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
12701 if test "x$ac_cv_header_gssapi_h" = xyes; then :
12702   cat >>confdefs.h <<_ACEOF
12703 #define HAVE_GSSAPI_H 1
12704 _ACEOF
12705
12706 else
12707   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
12708 fi
12709
12710 done
12711
12712 fi
12713
12714 done
12715
12716 fi
12717
12718 if test "$with_openssl" = yes ; then
12719   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
12720 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
12721
12722 else
12723   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
12724 fi
12725
12726
12727   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
12728 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
12729
12730 else
12731   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
12732 fi
12733
12734
12735 fi
12736
12737 if test "$with_pam" = yes ; then
12738   for ac_header in security/pam_appl.h
12739 do :
12740   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
12741 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
12742   cat >>confdefs.h <<_ACEOF
12743 #define HAVE_SECURITY_PAM_APPL_H 1
12744 _ACEOF
12745
12746 else
12747   for ac_header in pam/pam_appl.h
12748 do :
12749   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
12750 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
12751   cat >>confdefs.h <<_ACEOF
12752 #define HAVE_PAM_PAM_APPL_H 1
12753 _ACEOF
12754
12755 else
12756   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
12757 fi
12758
12759 done
12760
12761 fi
12762
12763 done
12764
12765 fi
12766
12767 if test "$with_bsd_auth" = yes ; then
12768   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
12769 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
12770
12771 else
12772   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
12773 fi
12774
12775
12776 fi
12777
12778 if test "$with_systemd" = yes ; then
12779   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
12780 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
12781
12782 else
12783   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
12784 fi
12785
12786
12787 fi
12788
12789 if test "$with_libxml" = yes ; then
12790   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
12791 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
12792
12793 else
12794   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
12795 fi
12796
12797
12798 fi
12799
12800 if test "$with_libxslt" = yes ; then
12801   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
12802 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
12803
12804 else
12805   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
12806 fi
12807
12808
12809 fi
12810
12811 if test "$with_ldap" = yes ; then
12812   if test "$PORTNAME" != "win32"; then
12813      for ac_header in ldap.h
12814 do :
12815   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
12816 if test "x$ac_cv_header_ldap_h" = xyes; then :
12817   cat >>confdefs.h <<_ACEOF
12818 #define HAVE_LDAP_H 1
12819 _ACEOF
12820
12821 else
12822   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
12823 fi
12824
12825 done
12826
12827      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
12828 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
12829 if ${pgac_cv_ldap_safe+:} false; then :
12830   $as_echo_n "(cached) " >&6
12831 else
12832   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12833 /* end confdefs.h.  */
12834 #include <ldap.h>
12835 #if !defined(LDAP_VENDOR_VERSION) || \
12836      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
12837       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
12838 choke me
12839 #endif
12840 int
12841 main ()
12842 {
12843
12844   ;
12845   return 0;
12846 }
12847 _ACEOF
12848 if ac_fn_c_try_compile "$LINENO"; then :
12849   pgac_cv_ldap_safe=yes
12850 else
12851   pgac_cv_ldap_safe=no
12852 fi
12853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12854 fi
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
12856 $as_echo "$pgac_cv_ldap_safe" >&6; }
12857
12858 if test "$pgac_cv_ldap_safe" != yes; then
12859   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12860 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
12861 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
12862 *** also uses LDAP will crash on exit." >&5
12863 $as_echo "$as_me: WARNING:
12864 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
12865 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
12866 *** also uses LDAP will crash on exit." >&2;}
12867 fi
12868   else
12869      for ac_header in winldap.h
12870 do :
12871   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
12872 #include <windows.h>
12873
12874 "
12875 if test "x$ac_cv_header_winldap_h" = xyes; then :
12876   cat >>confdefs.h <<_ACEOF
12877 #define HAVE_WINLDAP_H 1
12878 _ACEOF
12879
12880 else
12881   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
12882 fi
12883
12884 done
12885
12886   fi
12887 fi
12888
12889 if test "$with_bonjour" = yes ; then
12890   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
12891 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
12892
12893 else
12894   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
12895 fi
12896
12897
12898 fi
12899
12900 # for contrib/uuid-ossp
12901 if test "$with_uuid" = bsd ; then
12902   for ac_header in uuid.h
12903 do :
12904   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
12905 if test "x$ac_cv_header_uuid_h" = xyes; then :
12906   cat >>confdefs.h <<_ACEOF
12907 #define HAVE_UUID_H 1
12908 _ACEOF
12909  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12910 /* end confdefs.h.  */
12911 #include <uuid.h>
12912
12913 _ACEOF
12914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12915   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
12916
12917 else
12918   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
12919 fi
12920 rm -f conftest*
12921
12922 else
12923   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
12924 fi
12925
12926 done
12927
12928 elif test "$with_uuid" = e2fs ; then
12929   for ac_header in uuid/uuid.h
12930 do :
12931   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
12932 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
12933   cat >>confdefs.h <<_ACEOF
12934 #define HAVE_UUID_UUID_H 1
12935 _ACEOF
12936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12937 /* end confdefs.h.  */
12938 #include <uuid/uuid.h>
12939
12940 _ACEOF
12941 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12942   $EGREP "uuid_generate" >/dev/null 2>&1; then :
12943
12944 else
12945   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
12946 fi
12947 rm -f conftest*
12948
12949 else
12950   for ac_header in uuid.h
12951 do :
12952   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
12953 if test "x$ac_cv_header_uuid_h" = xyes; then :
12954   cat >>confdefs.h <<_ACEOF
12955 #define HAVE_UUID_H 1
12956 _ACEOF
12957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12958 /* end confdefs.h.  */
12959 #include <uuid.h>
12960
12961 _ACEOF
12962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12963   $EGREP "uuid_generate" >/dev/null 2>&1; then :
12964
12965 else
12966   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
12967 fi
12968 rm -f conftest*
12969
12970 else
12971   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
12972 fi
12973
12974 done
12975
12976 fi
12977
12978 done
12979
12980 elif test "$with_uuid" = ossp ; then
12981   for ac_header in ossp/uuid.h
12982 do :
12983   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
12984 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
12985   cat >>confdefs.h <<_ACEOF
12986 #define HAVE_OSSP_UUID_H 1
12987 _ACEOF
12988  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12989 /* end confdefs.h.  */
12990 #include <ossp/uuid.h>
12991
12992 _ACEOF
12993 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12994   $EGREP "uuid_export" >/dev/null 2>&1; then :
12995
12996 else
12997   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
12998 fi
12999 rm -f conftest*
13000
13001 else
13002   for ac_header in uuid.h
13003 do :
13004   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13005 if test "x$ac_cv_header_uuid_h" = xyes; then :
13006   cat >>confdefs.h <<_ACEOF
13007 #define HAVE_UUID_H 1
13008 _ACEOF
13009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13010 /* end confdefs.h.  */
13011 #include <uuid.h>
13012
13013 _ACEOF
13014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13015   $EGREP "uuid_export" >/dev/null 2>&1; then :
13016
13017 else
13018   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13019 fi
13020 rm -f conftest*
13021
13022 else
13023   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13024 fi
13025
13026 done
13027
13028 fi
13029
13030 done
13031
13032 fi
13033
13034 if test "$PORTNAME" = "win32" ; then
13035    for ac_header in crtdefs.h
13036 do :
13037   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13038 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13039   cat >>confdefs.h <<_ACEOF
13040 #define HAVE_CRTDEFS_H 1
13041 _ACEOF
13042
13043 fi
13044
13045 done
13046
13047 fi
13048
13049 ##
13050 ## Types, structures, compiler characteristics
13051 ##
13052
13053   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13054 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13055 if ${ac_cv_c_bigendian+:} false; then :
13056   $as_echo_n "(cached) " >&6
13057 else
13058   ac_cv_c_bigendian=unknown
13059     # See if we're dealing with a universal compiler.
13060     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13061 /* end confdefs.h.  */
13062 #ifndef __APPLE_CC__
13063                not a universal capable compiler
13064              #endif
13065              typedef int dummy;
13066
13067 _ACEOF
13068 if ac_fn_c_try_compile "$LINENO"; then :
13069
13070         # Check for potential -arch flags.  It is not universal unless
13071         # there are at least two -arch flags with different values.
13072         ac_arch=
13073         ac_prev=
13074         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13075          if test -n "$ac_prev"; then
13076            case $ac_word in
13077              i?86 | x86_64 | ppc | ppc64)
13078                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13079                  ac_arch=$ac_word
13080                else
13081                  ac_cv_c_bigendian=universal
13082                  break
13083                fi
13084                ;;
13085            esac
13086            ac_prev=
13087          elif test "x$ac_word" = "x-arch"; then
13088            ac_prev=arch
13089          fi
13090        done
13091 fi
13092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13093     if test $ac_cv_c_bigendian = unknown; then
13094       # See if sys/param.h defines the BYTE_ORDER macro.
13095       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13096 /* end confdefs.h.  */
13097 #include <sys/types.h>
13098              #include <sys/param.h>
13099
13100 int
13101 main ()
13102 {
13103 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13104                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13105                      && LITTLE_ENDIAN)
13106               bogus endian macros
13107              #endif
13108
13109   ;
13110   return 0;
13111 }
13112 _ACEOF
13113 if ac_fn_c_try_compile "$LINENO"; then :
13114   # It does; now see whether it defined to BIG_ENDIAN or not.
13115          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13116 /* end confdefs.h.  */
13117 #include <sys/types.h>
13118                 #include <sys/param.h>
13119
13120 int
13121 main ()
13122 {
13123 #if BYTE_ORDER != BIG_ENDIAN
13124                  not big endian
13125                 #endif
13126
13127   ;
13128   return 0;
13129 }
13130 _ACEOF
13131 if ac_fn_c_try_compile "$LINENO"; then :
13132   ac_cv_c_bigendian=yes
13133 else
13134   ac_cv_c_bigendian=no
13135 fi
13136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13137 fi
13138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13139     fi
13140     if test $ac_cv_c_bigendian = unknown; then
13141       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13142       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13143 /* end confdefs.h.  */
13144 #include <limits.h>
13145
13146 int
13147 main ()
13148 {
13149 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13150               bogus endian macros
13151              #endif
13152
13153   ;
13154   return 0;
13155 }
13156 _ACEOF
13157 if ac_fn_c_try_compile "$LINENO"; then :
13158   # It does; now see whether it defined to _BIG_ENDIAN or not.
13159          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13160 /* end confdefs.h.  */
13161 #include <limits.h>
13162
13163 int
13164 main ()
13165 {
13166 #ifndef _BIG_ENDIAN
13167                  not big endian
13168                 #endif
13169
13170   ;
13171   return 0;
13172 }
13173 _ACEOF
13174 if ac_fn_c_try_compile "$LINENO"; then :
13175   ac_cv_c_bigendian=yes
13176 else
13177   ac_cv_c_bigendian=no
13178 fi
13179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13180 fi
13181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13182     fi
13183     if test $ac_cv_c_bigendian = unknown; then
13184       # Compile a test program.
13185       if test "$cross_compiling" = yes; then :
13186   # Try to guess by grepping values from an object file.
13187          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13188 /* end confdefs.h.  */
13189 short int ascii_mm[] =
13190                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13191                 short int ascii_ii[] =
13192                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13193                 int use_ascii (int i) {
13194                   return ascii_mm[i] + ascii_ii[i];
13195                 }
13196                 short int ebcdic_ii[] =
13197                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13198                 short int ebcdic_mm[] =
13199                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13200                 int use_ebcdic (int i) {
13201                   return ebcdic_mm[i] + ebcdic_ii[i];
13202                 }
13203                 extern int foo;
13204
13205 int
13206 main ()
13207 {
13208 return use_ascii (foo) == use_ebcdic (foo);
13209   ;
13210   return 0;
13211 }
13212 _ACEOF
13213 if ac_fn_c_try_compile "$LINENO"; then :
13214   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13215               ac_cv_c_bigendian=yes
13216             fi
13217             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13218               if test "$ac_cv_c_bigendian" = unknown; then
13219                 ac_cv_c_bigendian=no
13220               else
13221                 # finding both strings is unlikely to happen, but who knows?
13222                 ac_cv_c_bigendian=unknown
13223               fi
13224             fi
13225 fi
13226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13227 else
13228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13229 /* end confdefs.h.  */
13230 $ac_includes_default
13231 int
13232 main ()
13233 {
13234
13235              /* Are we little or big endian?  From Harbison&Steele.  */
13236              union
13237              {
13238                long int l;
13239                char c[sizeof (long int)];
13240              } u;
13241              u.l = 1;
13242              return u.c[sizeof (long int) - 1] == 1;
13243
13244   ;
13245   return 0;
13246 }
13247 _ACEOF
13248 if ac_fn_c_try_run "$LINENO"; then :
13249   ac_cv_c_bigendian=no
13250 else
13251   ac_cv_c_bigendian=yes
13252 fi
13253 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13254   conftest.$ac_objext conftest.beam conftest.$ac_ext
13255 fi
13256
13257     fi
13258 fi
13259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13260 $as_echo "$ac_cv_c_bigendian" >&6; }
13261  case $ac_cv_c_bigendian in #(
13262    yes)
13263      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13264 ;; #(
13265    no)
13266       ;; #(
13267    universal)
13268
13269 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13270
13271      ;; #(
13272    *)
13273      as_fn_error $? "unknown endianness
13274  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13275  esac
13276
13277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13278 $as_echo_n "checking for inline... " >&6; }
13279 if ${ac_cv_c_inline+:} false; then :
13280   $as_echo_n "(cached) " >&6
13281 else
13282   ac_cv_c_inline=no
13283 for ac_kw in inline __inline__ __inline; do
13284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13285 /* end confdefs.h.  */
13286 #ifndef __cplusplus
13287 typedef int foo_t;
13288 static $ac_kw foo_t static_foo () {return 0; }
13289 $ac_kw foo_t foo () {return 0; }
13290 #endif
13291
13292 _ACEOF
13293 if ac_fn_c_try_compile "$LINENO"; then :
13294   ac_cv_c_inline=$ac_kw
13295 fi
13296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13297   test "$ac_cv_c_inline" != no && break
13298 done
13299
13300 fi
13301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13302 $as_echo "$ac_cv_c_inline" >&6; }
13303
13304 case $ac_cv_c_inline in
13305   inline | yes) ;;
13306   *)
13307     case $ac_cv_c_inline in
13308       no) ac_val=;;
13309       *) ac_val=$ac_cv_c_inline;;
13310     esac
13311     cat >>confdefs.h <<_ACEOF
13312 #ifndef __cplusplus
13313 #define inline $ac_val
13314 #endif
13315 _ACEOF
13316     ;;
13317 esac
13318
13319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13320 $as_echo_n "checking for printf format archetype... " >&6; }
13321 if ${pgac_cv_printf_archetype+:} false; then :
13322   $as_echo_n "(cached) " >&6
13323 else
13324   ac_save_c_werror_flag=$ac_c_werror_flag
13325 ac_c_werror_flag=yes
13326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13327 /* end confdefs.h.  */
13328 extern int
13329 pgac_write(int ignore, const char *fmt,...)
13330 __attribute__((format(gnu_printf, 2, 3)));
13331 int
13332 main ()
13333 {
13334
13335   ;
13336   return 0;
13337 }
13338 _ACEOF
13339 if ac_fn_c_try_compile "$LINENO"; then :
13340   pgac_cv_printf_archetype=gnu_printf
13341 else
13342   pgac_cv_printf_archetype=printf
13343 fi
13344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13345 ac_c_werror_flag=$ac_save_c_werror_flag
13346 fi
13347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13348 $as_echo "$pgac_cv_printf_archetype" >&6; }
13349
13350 cat >>confdefs.h <<_ACEOF
13351 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13352 _ACEOF
13353
13354
13355
13356   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13357 $as_echo_n "checking for flexible array members... " >&6; }
13358 if ${ac_cv_c_flexmember+:} false; then :
13359   $as_echo_n "(cached) " >&6
13360 else
13361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13362 /* end confdefs.h.  */
13363 #include <stdlib.h>
13364             #include <stdio.h>
13365             #include <stddef.h>
13366             struct s { int n; double d[]; };
13367 int
13368 main ()
13369 {
13370 int m = getchar ();
13371             struct s *p = malloc (offsetof (struct s, d)
13372                                   + m * sizeof (double));
13373             p->d[0] = 0.0;
13374             return p->d != (double *) NULL;
13375   ;
13376   return 0;
13377 }
13378 _ACEOF
13379 if ac_fn_c_try_compile "$LINENO"; then :
13380   ac_cv_c_flexmember=yes
13381 else
13382   ac_cv_c_flexmember=no
13383 fi
13384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13385 fi
13386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13387 $as_echo "$ac_cv_c_flexmember" >&6; }
13388   if test $ac_cv_c_flexmember = yes; then
13389
13390 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13391
13392   else
13393     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13394
13395   fi
13396
13397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13398 $as_echo_n "checking for signed types... " >&6; }
13399 if ${pgac_cv_c_signed+:} false; then :
13400   $as_echo_n "(cached) " >&6
13401 else
13402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13403 /* end confdefs.h.  */
13404
13405 int
13406 main ()
13407 {
13408 signed char c; signed short s; signed int i;
13409   ;
13410   return 0;
13411 }
13412 _ACEOF
13413 if ac_fn_c_try_compile "$LINENO"; then :
13414   pgac_cv_c_signed=yes
13415 else
13416   pgac_cv_c_signed=no
13417 fi
13418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13419 fi
13420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13421 $as_echo "$pgac_cv_c_signed" >&6; }
13422 if test x"$pgac_cv_c_signed" = xno ; then
13423
13424 $as_echo "#define signed /**/" >>confdefs.h
13425
13426 fi
13427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13428 $as_echo_n "checking for __func__... " >&6; }
13429 if ${pgac_cv_funcname_func_support+:} false; then :
13430   $as_echo_n "(cached) " >&6
13431 else
13432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13433 /* end confdefs.h.  */
13434 #include <stdio.h>
13435 int
13436 main ()
13437 {
13438 printf("%s\n", __func__);
13439   ;
13440   return 0;
13441 }
13442 _ACEOF
13443 if ac_fn_c_try_compile "$LINENO"; then :
13444   pgac_cv_funcname_func_support=yes
13445 else
13446   pgac_cv_funcname_func_support=no
13447 fi
13448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13449 fi
13450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13451 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13452 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13453
13454 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13455
13456 else
13457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13458 $as_echo_n "checking for __FUNCTION__... " >&6; }
13459 if ${pgac_cv_funcname_function_support+:} false; then :
13460   $as_echo_n "(cached) " >&6
13461 else
13462   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13463 /* end confdefs.h.  */
13464 #include <stdio.h>
13465 int
13466 main ()
13467 {
13468 printf("%s\n", __FUNCTION__);
13469   ;
13470   return 0;
13471 }
13472 _ACEOF
13473 if ac_fn_c_try_compile "$LINENO"; then :
13474   pgac_cv_funcname_function_support=yes
13475 else
13476   pgac_cv_funcname_function_support=no
13477 fi
13478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13479 fi
13480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13481 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13482 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13483
13484 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13485
13486 fi
13487 fi
13488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13489 $as_echo_n "checking for _Static_assert... " >&6; }
13490 if ${pgac_cv__static_assert+:} false; then :
13491   $as_echo_n "(cached) " >&6
13492 else
13493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13494 /* end confdefs.h.  */
13495
13496 int
13497 main ()
13498 {
13499 ({ _Static_assert(1, "foo"); })
13500   ;
13501   return 0;
13502 }
13503 _ACEOF
13504 if ac_fn_c_try_link "$LINENO"; then :
13505   pgac_cv__static_assert=yes
13506 else
13507   pgac_cv__static_assert=no
13508 fi
13509 rm -f core conftest.err conftest.$ac_objext \
13510     conftest$ac_exeext conftest.$ac_ext
13511 fi
13512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13513 $as_echo "$pgac_cv__static_assert" >&6; }
13514 if test x"$pgac_cv__static_assert" = xyes ; then
13515
13516 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13517
13518 fi
13519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13520 $as_echo_n "checking for typeof... " >&6; }
13521 if ${pgac_cv_c_typeof+:} false; then :
13522   $as_echo_n "(cached) " >&6
13523 else
13524   pgac_cv_c_typeof=no
13525 for pgac_kw in typeof __typeof__ decltype; do
13526   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13527 /* end confdefs.h.  */
13528
13529 int
13530 main ()
13531 {
13532 int x = 0;
13533 $pgac_kw(x) y;
13534 y = x;
13535 return y;
13536   ;
13537   return 0;
13538 }
13539 _ACEOF
13540 if ac_fn_c_try_compile "$LINENO"; then :
13541   pgac_cv_c_typeof=$pgac_kw
13542 fi
13543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13544   test "$pgac_cv_c_typeof" != no && break
13545 done
13546 fi
13547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13548 $as_echo "$pgac_cv_c_typeof" >&6; }
13549 if test "$pgac_cv_c_typeof" != no; then
13550
13551 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13552
13553   if test "$pgac_cv_c_typeof" != typeof; then
13554
13555 cat >>confdefs.h <<_ACEOF
13556 #define typeof $pgac_cv_c_typeof
13557 _ACEOF
13558
13559   fi
13560 fi
13561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13562 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13563 if ${pgac_cv__types_compatible+:} false; then :
13564   $as_echo_n "(cached) " >&6
13565 else
13566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13567 /* end confdefs.h.  */
13568
13569 int
13570 main ()
13571 {
13572  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13573   ;
13574   return 0;
13575 }
13576 _ACEOF
13577 if ac_fn_c_try_compile "$LINENO"; then :
13578   pgac_cv__types_compatible=yes
13579 else
13580   pgac_cv__types_compatible=no
13581 fi
13582 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13583 fi
13584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13585 $as_echo "$pgac_cv__types_compatible" >&6; }
13586 if test x"$pgac_cv__types_compatible" = xyes ; then
13587
13588 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13589
13590 fi
13591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13592 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13593 if ${pgac_cv__builtin_bswap16+:} false; then :
13594   $as_echo_n "(cached) " >&6
13595 else
13596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13597 /* end confdefs.h.  */
13598 static unsigned long int x = __builtin_bswap16(0xaabb);
13599
13600 _ACEOF
13601 if ac_fn_c_try_compile "$LINENO"; then :
13602   pgac_cv__builtin_bswap16=yes
13603 else
13604   pgac_cv__builtin_bswap16=no
13605 fi
13606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13607 fi
13608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13609 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13610 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13611
13612 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13613
13614 fi
13615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13616 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13617 if ${pgac_cv__builtin_bswap32+:} false; then :
13618   $as_echo_n "(cached) " >&6
13619 else
13620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13621 /* end confdefs.h.  */
13622 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13623
13624 _ACEOF
13625 if ac_fn_c_try_compile "$LINENO"; then :
13626   pgac_cv__builtin_bswap32=yes
13627 else
13628   pgac_cv__builtin_bswap32=no
13629 fi
13630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13631 fi
13632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
13633 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
13634 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
13635
13636 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
13637
13638 fi
13639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
13640 $as_echo_n "checking for __builtin_bswap64... " >&6; }
13641 if ${pgac_cv__builtin_bswap64+:} false; then :
13642   $as_echo_n "(cached) " >&6
13643 else
13644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13645 /* end confdefs.h.  */
13646 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
13647
13648 _ACEOF
13649 if ac_fn_c_try_compile "$LINENO"; then :
13650   pgac_cv__builtin_bswap64=yes
13651 else
13652   pgac_cv__builtin_bswap64=no
13653 fi
13654 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13655 fi
13656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
13657 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
13658 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
13659
13660 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
13661
13662 fi
13663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
13664 $as_echo_n "checking for __builtin_constant_p... " >&6; }
13665 if ${pgac_cv__builtin_constant_p+:} false; then :
13666   $as_echo_n "(cached) " >&6
13667 else
13668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13669 /* end confdefs.h.  */
13670 static int x;
13671   static int y[__builtin_constant_p(x) ? x : 1];
13672   static int z[__builtin_constant_p("string literal") ? 1 : x];
13673
13674
13675 _ACEOF
13676 if ac_fn_c_try_compile "$LINENO"; then :
13677   pgac_cv__builtin_constant_p=yes
13678 else
13679   pgac_cv__builtin_constant_p=no
13680 fi
13681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13682 fi
13683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
13684 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
13685 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
13686
13687 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
13688
13689 fi
13690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
13691 $as_echo_n "checking for __builtin_unreachable... " >&6; }
13692 if ${pgac_cv__builtin_unreachable+:} false; then :
13693   $as_echo_n "(cached) " >&6
13694 else
13695   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13696 /* end confdefs.h.  */
13697
13698 int
13699 main ()
13700 {
13701 __builtin_unreachable();
13702   ;
13703   return 0;
13704 }
13705 _ACEOF
13706 if ac_fn_c_try_link "$LINENO"; then :
13707   pgac_cv__builtin_unreachable=yes
13708 else
13709   pgac_cv__builtin_unreachable=no
13710 fi
13711 rm -f core conftest.err conftest.$ac_objext \
13712     conftest$ac_exeext conftest.$ac_ext
13713 fi
13714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
13715 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
13716 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
13717
13718 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
13719
13720 fi
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
13722 $as_echo_n "checking for computed goto support... " >&6; }
13723 if ${pgac_cv_computed_goto+:} false; then :
13724   $as_echo_n "(cached) " >&6
13725 else
13726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13727 /* end confdefs.h.  */
13728
13729 int
13730 main ()
13731 {
13732 void *labeladdrs[] = {&&my_label};
13733   goto *labeladdrs[0];
13734   my_label:
13735   return 1;
13736
13737   ;
13738   return 0;
13739 }
13740 _ACEOF
13741 if ac_fn_c_try_compile "$LINENO"; then :
13742   pgac_cv_computed_goto=yes
13743 else
13744   pgac_cv_computed_goto=no
13745 fi
13746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13747 fi
13748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
13749 $as_echo "$pgac_cv_computed_goto" >&6; }
13750 if test x"$pgac_cv_computed_goto" = xyes ; then
13751
13752 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
13753
13754 fi
13755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
13756 $as_echo_n "checking for __VA_ARGS__... " >&6; }
13757 if ${pgac_cv__va_args+:} false; then :
13758   $as_echo_n "(cached) " >&6
13759 else
13760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13761 /* end confdefs.h.  */
13762 #include <stdio.h>
13763 int
13764 main ()
13765 {
13766 #define debug(...) fprintf(stderr, __VA_ARGS__)
13767 debug("%s", "blarg");
13768
13769   ;
13770   return 0;
13771 }
13772 _ACEOF
13773 if ac_fn_c_try_compile "$LINENO"; then :
13774   pgac_cv__va_args=yes
13775 else
13776   pgac_cv__va_args=no
13777 fi
13778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13779 fi
13780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
13781 $as_echo "$pgac_cv__va_args" >&6; }
13782 if test x"$pgac_cv__va_args" = xyes ; then
13783
13784 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
13785
13786 fi
13787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13788 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13789 if ${ac_cv_struct_tm+:} false; then :
13790   $as_echo_n "(cached) " >&6
13791 else
13792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13793 /* end confdefs.h.  */
13794 #include <sys/types.h>
13795 #include <time.h>
13796
13797 int
13798 main ()
13799 {
13800 struct tm tm;
13801                                      int *p = &tm.tm_sec;
13802                                      return !p;
13803   ;
13804   return 0;
13805 }
13806 _ACEOF
13807 if ac_fn_c_try_compile "$LINENO"; then :
13808   ac_cv_struct_tm=time.h
13809 else
13810   ac_cv_struct_tm=sys/time.h
13811 fi
13812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13813 fi
13814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13815 $as_echo "$ac_cv_struct_tm" >&6; }
13816 if test $ac_cv_struct_tm = sys/time.h; then
13817
13818 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
13819
13820 fi
13821
13822 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
13823 #include <$ac_cv_struct_tm>
13824
13825 "
13826 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
13827
13828 cat >>confdefs.h <<_ACEOF
13829 #define HAVE_STRUCT_TM_TM_ZONE 1
13830 _ACEOF
13831
13832
13833 fi
13834
13835 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13836
13837 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
13838
13839 fi
13840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13841 $as_echo_n "checking for tzname... " >&6; }
13842 if ${ac_cv_var_tzname+:} false; then :
13843   $as_echo_n "(cached) " >&6
13844 else
13845   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13846 /* end confdefs.h.  */
13847 #include <stdlib.h>
13848 #include <time.h>
13849 #ifndef tzname /* For SGI.  */
13850 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
13851 #endif
13852
13853 int
13854 main ()
13855 {
13856 atoi(*tzname);
13857   ;
13858   return 0;
13859 }
13860 _ACEOF
13861 if ac_fn_c_try_link "$LINENO"; then :
13862   ac_cv_var_tzname=yes
13863 else
13864   ac_cv_var_tzname=no
13865 fi
13866 rm -f core conftest.err conftest.$ac_objext \
13867     conftest$ac_exeext conftest.$ac_ext
13868 fi
13869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13870 $as_echo "$ac_cv_var_tzname" >&6; }
13871 if test $ac_cv_var_tzname = yes; then
13872
13873 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
13874
13875 fi
13876
13877 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
13878 #ifdef HAVE_SYS_IPC_H
13879 #include <sys/ipc.h>
13880 #endif
13881 #ifdef HAVE_SYS_SEM_H
13882 #include <sys/sem.h>
13883 #endif
13884 "
13885 if test "x$ac_cv_type_union_semun" = xyes; then :
13886
13887 cat >>confdefs.h <<_ACEOF
13888 #define HAVE_UNION_SEMUN 1
13889 _ACEOF
13890
13891
13892 fi
13893
13894 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
13895 #ifdef HAVE_SYS_UN_H
13896 #include <sys/un.h>
13897 #endif
13898
13899 "
13900 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
13901
13902 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
13903
13904 fi
13905
13906 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
13907 #include <sys/socket.h>
13908
13909 "
13910 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
13911
13912 cat >>confdefs.h <<_ACEOF
13913 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
13914 _ACEOF
13915
13916
13917 fi
13918
13919 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
13920 #include <sys/socket.h>
13921
13922 "
13923 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
13924
13925 cat >>confdefs.h <<_ACEOF
13926 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
13927 _ACEOF
13928
13929
13930 fi
13931 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
13932 #include <sys/socket.h>
13933
13934 "
13935 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
13936
13937 cat >>confdefs.h <<_ACEOF
13938 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
13939 _ACEOF
13940
13941
13942 fi
13943 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
13944 #include <sys/socket.h>
13945
13946 "
13947 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
13948
13949 cat >>confdefs.h <<_ACEOF
13950 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
13951 _ACEOF
13952
13953
13954 fi
13955 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
13956 #include <sys/socket.h>
13957
13958 "
13959 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
13960
13961 cat >>confdefs.h <<_ACEOF
13962 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
13963 _ACEOF
13964
13965
13966 fi
13967 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
13968 #include <sys/socket.h>
13969
13970 "
13971 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
13972
13973 cat >>confdefs.h <<_ACEOF
13974 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
13975 _ACEOF
13976
13977
13978 fi
13979
13980 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
13981 #include <sys/socket.h>
13982 #include <netdb.h>
13983
13984 "
13985 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
13986
13987 cat >>confdefs.h <<_ACEOF
13988 #define HAVE_STRUCT_ADDRINFO 1
13989 _ACEOF
13990
13991
13992 fi
13993
13994
13995   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
13996 if test "x$ac_cv_type_intptr_t" = xyes; then :
13997
13998 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
13999
14000 else
14001   for ac_type in 'int' 'long int' 'long long int'; do
14002        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14003 /* end confdefs.h.  */
14004 $ac_includes_default
14005 int
14006 main ()
14007 {
14008 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14009 test_array [0] = 0;
14010 return test_array [0];
14011
14012   ;
14013   return 0;
14014 }
14015 _ACEOF
14016 if ac_fn_c_try_compile "$LINENO"; then :
14017
14018 cat >>confdefs.h <<_ACEOF
14019 #define intptr_t $ac_type
14020 _ACEOF
14021
14022           ac_type=
14023 fi
14024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14025        test -z "$ac_type" && break
14026      done
14027 fi
14028
14029
14030
14031   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14032 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14033
14034 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14035
14036 else
14037   for ac_type in 'unsigned int' 'unsigned long int' \
14038         'unsigned long long int'; do
14039        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14040 /* end confdefs.h.  */
14041 $ac_includes_default
14042 int
14043 main ()
14044 {
14045 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14046 test_array [0] = 0;
14047 return test_array [0];
14048
14049   ;
14050   return 0;
14051 }
14052 _ACEOF
14053 if ac_fn_c_try_compile "$LINENO"; then :
14054
14055 cat >>confdefs.h <<_ACEOF
14056 #define uintptr_t $ac_type
14057 _ACEOF
14058
14059           ac_type=
14060 fi
14061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14062        test -z "$ac_type" && break
14063      done
14064 fi
14065
14066
14067
14068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14069 $as_echo_n "checking for unsigned long long int... " >&6; }
14070 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14071   $as_echo_n "(cached) " >&6
14072 else
14073   ac_cv_type_unsigned_long_long_int=yes
14074      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14075        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14076 /* end confdefs.h.  */
14077
14078   /* For now, do not test the preprocessor; as of 2007 there are too many
14079          implementations with broken preprocessors.  Perhaps this can
14080          be revisited in 2012.  In the meantime, code should not expect
14081          #if to work with literals wider than 32 bits.  */
14082       /* Test literals.  */
14083       long long int ll = 9223372036854775807ll;
14084       long long int nll = -9223372036854775807LL;
14085       unsigned long long int ull = 18446744073709551615ULL;
14086       /* Test constant expressions.   */
14087       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14088                      ? 1 : -1)];
14089       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14090                      ? 1 : -1)];
14091       int i = 63;
14092 int
14093 main ()
14094 {
14095 /* Test availability of runtime routines for shift and division.  */
14096       long long int llmax = 9223372036854775807ll;
14097       unsigned long long int ullmax = 18446744073709551615ull;
14098       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14099               | (llmax / ll) | (llmax % ll)
14100               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14101               | (ullmax / ull) | (ullmax % ull));
14102   ;
14103   return 0;
14104 }
14105
14106 _ACEOF
14107 if ac_fn_c_try_link "$LINENO"; then :
14108
14109 else
14110   ac_cv_type_unsigned_long_long_int=no
14111 fi
14112 rm -f core conftest.err conftest.$ac_objext \
14113     conftest$ac_exeext conftest.$ac_ext
14114      fi
14115 fi
14116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14117 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14118   if test $ac_cv_type_unsigned_long_long_int = yes; then
14119
14120 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14121
14122   fi
14123
14124
14125
14126   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14127 $as_echo_n "checking for long long int... " >&6; }
14128 if ${ac_cv_type_long_long_int+:} false; then :
14129   $as_echo_n "(cached) " >&6
14130 else
14131   ac_cv_type_long_long_int=yes
14132       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14133         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14134         if test $ac_cv_type_long_long_int = yes; then
14135                                   if test "$cross_compiling" = yes; then :
14136   :
14137 else
14138   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14139 /* end confdefs.h.  */
14140 #include <limits.h>
14141                  #ifndef LLONG_MAX
14142                  # define HALF \
14143                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14144                  # define LLONG_MAX (HALF - 1 + HALF)
14145                  #endif
14146 int
14147 main ()
14148 {
14149 long long int n = 1;
14150                  int i;
14151                  for (i = 0; ; i++)
14152                    {
14153                      long long int m = n << i;
14154                      if (m >> i != n)
14155                        return 1;
14156                      if (LLONG_MAX / 2 < m)
14157                        break;
14158                    }
14159                  return 0;
14160   ;
14161   return 0;
14162 }
14163 _ACEOF
14164 if ac_fn_c_try_run "$LINENO"; then :
14165
14166 else
14167   ac_cv_type_long_long_int=no
14168 fi
14169 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14170   conftest.$ac_objext conftest.beam conftest.$ac_ext
14171 fi
14172
14173         fi
14174       fi
14175 fi
14176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14177 $as_echo "$ac_cv_type_long_long_int" >&6; }
14178   if test $ac_cv_type_long_long_int = yes; then
14179
14180 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14181
14182   fi
14183
14184
14185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14186 $as_echo_n "checking for locale_t... " >&6; }
14187 if ${pgac_cv_type_locale_t+:} false; then :
14188   $as_echo_n "(cached) " >&6
14189 else
14190   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14191 /* end confdefs.h.  */
14192 #include <locale.h>
14193 locale_t x;
14194 int
14195 main ()
14196 {
14197
14198   ;
14199   return 0;
14200 }
14201 _ACEOF
14202 if ac_fn_c_try_compile "$LINENO"; then :
14203   pgac_cv_type_locale_t=yes
14204 else
14205   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14206 /* end confdefs.h.  */
14207 #include <xlocale.h>
14208 locale_t x;
14209 int
14210 main ()
14211 {
14212
14213   ;
14214   return 0;
14215 }
14216 _ACEOF
14217 if ac_fn_c_try_compile "$LINENO"; then :
14218   pgac_cv_type_locale_t='yes (in xlocale.h)'
14219 else
14220   pgac_cv_type_locale_t=no
14221 fi
14222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14223 fi
14224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14225 fi
14226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14227 $as_echo "$pgac_cv_type_locale_t" >&6; }
14228 if test "$pgac_cv_type_locale_t" != no; then
14229
14230 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14231
14232 fi
14233 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14234
14235 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14236
14237 fi
14238
14239 # MSVC doesn't cope well with defining restrict to __restrict, the
14240 # spelling it understands, because it conflicts with
14241 # __declspec(restrict). Therefore we define pg_restrict to the
14242 # appropriate definition, which presumably won't conflict.
14243 #
14244 # Allow platforms with buggy compilers to force restrict to not be
14245 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14246 # template.
14247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14248 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14249 if ${ac_cv_c_restrict+:} false; then :
14250   $as_echo_n "(cached) " >&6
14251 else
14252   ac_cv_c_restrict=no
14253    # The order here caters to the fact that C++ does not require restrict.
14254    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14255      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14256 /* end confdefs.h.  */
14257 typedef int * int_ptr;
14258         int foo (int_ptr $ac_kw ip) {
14259         return ip[0];
14260        }
14261 int
14262 main ()
14263 {
14264 int s[1];
14265         int * $ac_kw t = s;
14266         t[0] = 0;
14267         return foo(t)
14268   ;
14269   return 0;
14270 }
14271 _ACEOF
14272 if ac_fn_c_try_compile "$LINENO"; then :
14273   ac_cv_c_restrict=$ac_kw
14274 fi
14275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14276      test "$ac_cv_c_restrict" != no && break
14277    done
14278
14279 fi
14280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14281 $as_echo "$ac_cv_c_restrict" >&6; }
14282
14283  case $ac_cv_c_restrict in
14284    restrict) ;;
14285    no) $as_echo "#define restrict /**/" >>confdefs.h
14286  ;;
14287    *)  cat >>confdefs.h <<_ACEOF
14288 #define restrict $ac_cv_c_restrict
14289 _ACEOF
14290  ;;
14291  esac
14292
14293 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14294   pg_restrict=""
14295 else
14296   pg_restrict="$ac_cv_c_restrict"
14297 fi
14298
14299 cat >>confdefs.h <<_ACEOF
14300 #define pg_restrict $pg_restrict
14301 _ACEOF
14302
14303
14304 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14305 #include <sys/param.h>
14306 #ifdef HAVE_SYS_UCRED_H
14307 #include <sys/ucred.h>
14308 #endif
14309 "
14310 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14311
14312 cat >>confdefs.h <<_ACEOF
14313 #define HAVE_STRUCT_CMSGCRED 1
14314 _ACEOF
14315
14316
14317 fi
14318
14319
14320 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14321 #include <getopt.h>
14322 #endif
14323 "
14324 if test "x$ac_cv_type_struct_option" = xyes; then :
14325
14326 cat >>confdefs.h <<_ACEOF
14327 #define HAVE_STRUCT_OPTION 1
14328 _ACEOF
14329
14330
14331 fi
14332
14333
14334 if test "$with_zlib" = yes; then
14335   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14336   # did not).  While we could work around the lack of z_streamp, it
14337   # seems unwise to encourage people to use such old zlib versions...
14338   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14339 "
14340 if test "x$ac_cv_type_z_streamp" = xyes; then :
14341
14342 else
14343   as_fn_error $? "zlib version is too old
14344 Use --without-zlib to disable zlib support." "$LINENO" 5
14345 fi
14346
14347 fi
14348
14349 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14350 case $host_cpu in
14351   ppc*|powerpc*)
14352     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14353 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14354     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14355 /* end confdefs.h.  */
14356
14357 int
14358 main ()
14359 {
14360 int a = 0; int *p = &a; int r;
14361          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14362   ;
14363   return 0;
14364 }
14365 _ACEOF
14366 if ac_fn_c_try_compile "$LINENO"; then :
14367   pgac_cv_have_ppc_mutex_hint=yes
14368 else
14369   pgac_cv_have_ppc_mutex_hint=no
14370 fi
14371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14372     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14373 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14374     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14375
14376 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14377
14378     fi
14379   ;;
14380 esac
14381
14382 # Check largefile support.  You might think this is a system service not a
14383 # compiler characteristic, but you'd be wrong.  We must check this before
14384 # probing existence of related functions such as fseeko, since the largefile
14385 # defines can affect what is generated for that.
14386 if test "$PORTNAME" != "win32"; then
14387    # Check whether --enable-largefile was given.
14388 if test "${enable_largefile+set}" = set; then :
14389   enableval=$enable_largefile;
14390 fi
14391
14392 if test "$enable_largefile" != no; then
14393
14394   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14395 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14396 if ${ac_cv_sys_largefile_CC+:} false; then :
14397   $as_echo_n "(cached) " >&6
14398 else
14399   ac_cv_sys_largefile_CC=no
14400      if test "$GCC" != yes; then
14401        ac_save_CC=$CC
14402        while :; do
14403          # IRIX 6.2 and later do not support large files by default,
14404          # so use the C compiler's -n32 option if that helps.
14405          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14406 /* end confdefs.h.  */
14407 #include <sys/types.h>
14408  /* Check that off_t can represent 2**63 - 1 correctly.
14409     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14410     since some C++ compilers masquerading as C compilers
14411     incorrectly reject 9223372036854775807.  */
14412 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14413   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14414                        && LARGE_OFF_T % 2147483647 == 1)
14415                       ? 1 : -1];
14416 int
14417 main ()
14418 {
14419
14420   ;
14421   return 0;
14422 }
14423 _ACEOF
14424          if ac_fn_c_try_compile "$LINENO"; then :
14425   break
14426 fi
14427 rm -f core conftest.err conftest.$ac_objext
14428          CC="$CC -n32"
14429          if ac_fn_c_try_compile "$LINENO"; then :
14430   ac_cv_sys_largefile_CC=' -n32'; break
14431 fi
14432 rm -f core conftest.err conftest.$ac_objext
14433          break
14434        done
14435        CC=$ac_save_CC
14436        rm -f conftest.$ac_ext
14437     fi
14438 fi
14439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14440 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14441   if test "$ac_cv_sys_largefile_CC" != no; then
14442     CC=$CC$ac_cv_sys_largefile_CC
14443   fi
14444
14445   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14446 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14447 if ${ac_cv_sys_file_offset_bits+:} false; then :
14448   $as_echo_n "(cached) " >&6
14449 else
14450   while :; do
14451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14452 /* end confdefs.h.  */
14453 #include <sys/types.h>
14454  /* Check that off_t can represent 2**63 - 1 correctly.
14455     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14456     since some C++ compilers masquerading as C compilers
14457     incorrectly reject 9223372036854775807.  */
14458 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14459   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14460                        && LARGE_OFF_T % 2147483647 == 1)
14461                       ? 1 : -1];
14462 int
14463 main ()
14464 {
14465
14466   ;
14467   return 0;
14468 }
14469 _ACEOF
14470 if ac_fn_c_try_compile "$LINENO"; then :
14471   ac_cv_sys_file_offset_bits=no; break
14472 fi
14473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14474   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14475 /* end confdefs.h.  */
14476 #define _FILE_OFFSET_BITS 64
14477 #include <sys/types.h>
14478  /* Check that off_t can represent 2**63 - 1 correctly.
14479     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14480     since some C++ compilers masquerading as C compilers
14481     incorrectly reject 9223372036854775807.  */
14482 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14483   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14484                        && LARGE_OFF_T % 2147483647 == 1)
14485                       ? 1 : -1];
14486 int
14487 main ()
14488 {
14489
14490   ;
14491   return 0;
14492 }
14493 _ACEOF
14494 if ac_fn_c_try_compile "$LINENO"; then :
14495   ac_cv_sys_file_offset_bits=64; break
14496 fi
14497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14498   ac_cv_sys_file_offset_bits=unknown
14499   break
14500 done
14501 fi
14502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14503 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14504 case $ac_cv_sys_file_offset_bits in #(
14505   no | unknown) ;;
14506   *)
14507 cat >>confdefs.h <<_ACEOF
14508 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14509 _ACEOF
14510 ;;
14511 esac
14512 rm -rf conftest*
14513   if test $ac_cv_sys_file_offset_bits = unknown; then
14514     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14515 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14516 if ${ac_cv_sys_large_files+:} false; then :
14517   $as_echo_n "(cached) " >&6
14518 else
14519   while :; do
14520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14521 /* end confdefs.h.  */
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_large_files=no; break
14541 fi
14542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14543   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14544 /* end confdefs.h.  */
14545 #define _LARGE_FILES 1
14546 #include <sys/types.h>
14547  /* Check that off_t can represent 2**63 - 1 correctly.
14548     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14549     since some C++ compilers masquerading as C compilers
14550     incorrectly reject 9223372036854775807.  */
14551 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14552   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14553                        && LARGE_OFF_T % 2147483647 == 1)
14554                       ? 1 : -1];
14555 int
14556 main ()
14557 {
14558
14559   ;
14560   return 0;
14561 }
14562 _ACEOF
14563 if ac_fn_c_try_compile "$LINENO"; then :
14564   ac_cv_sys_large_files=1; break
14565 fi
14566 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14567   ac_cv_sys_large_files=unknown
14568   break
14569 done
14570 fi
14571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14572 $as_echo "$ac_cv_sys_large_files" >&6; }
14573 case $ac_cv_sys_large_files in #(
14574   no | unknown) ;;
14575   *)
14576 cat >>confdefs.h <<_ACEOF
14577 #define _LARGE_FILES $ac_cv_sys_large_files
14578 _ACEOF
14579 ;;
14580 esac
14581 rm -rf conftest*
14582   fi
14583
14584
14585 fi
14586
14587
14588 fi
14589
14590 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14591 # The cast to long int works around a bug in the HP C Compiler
14592 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14593 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14594 # This bug is HP SR number 8606223364.
14595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14596 $as_echo_n "checking size of off_t... " >&6; }
14597 if ${ac_cv_sizeof_off_t+:} false; then :
14598   $as_echo_n "(cached) " >&6
14599 else
14600   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14601
14602 else
14603   if test "$ac_cv_type_off_t" = yes; then
14604      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14605 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14606 as_fn_error 77 "cannot compute sizeof (off_t)
14607 See \`config.log' for more details" "$LINENO" 5; }
14608    else
14609      ac_cv_sizeof_off_t=0
14610    fi
14611 fi
14612
14613 fi
14614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14615 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14616
14617
14618
14619 cat >>confdefs.h <<_ACEOF
14620 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14621 _ACEOF
14622
14623
14624
14625 # If we don't have largefile support, can't handle segsize >= 2GB.
14626 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14627    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14628 fi
14629
14630 # The cast to long int works around a bug in the HP C Compiler
14631 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14632 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14633 # This bug is HP SR number 8606223364.
14634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14635 $as_echo_n "checking size of bool... " >&6; }
14636 if ${ac_cv_sizeof_bool+:} false; then :
14637   $as_echo_n "(cached) " >&6
14638 else
14639   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
14640 #include <stdbool.h>
14641 #endif
14642 "; then :
14643
14644 else
14645   if test "$ac_cv_type_bool" = yes; then
14646      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14647 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14648 as_fn_error 77 "cannot compute sizeof (bool)
14649 See \`config.log' for more details" "$LINENO" 5; }
14650    else
14651      ac_cv_sizeof_bool=0
14652    fi
14653 fi
14654
14655 fi
14656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14657 $as_echo "$ac_cv_sizeof_bool" >&6; }
14658
14659
14660
14661 cat >>confdefs.h <<_ACEOF
14662 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14663 _ACEOF
14664
14665
14666
14667
14668 ##
14669 ## Functions, global variables
14670 ##
14671
14672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14673 $as_echo_n "checking for int timezone... " >&6; }
14674 if ${pgac_cv_var_int_timezone+:} false; then :
14675   $as_echo_n "(cached) " >&6
14676 else
14677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14678 /* end confdefs.h.  */
14679 #include <time.h>
14680 int res;
14681 int
14682 main ()
14683 {
14684 #ifndef __CYGWIN__
14685 res = timezone / 60;
14686 #else
14687 res = _timezone / 60;
14688 #endif
14689   ;
14690   return 0;
14691 }
14692 _ACEOF
14693 if ac_fn_c_try_link "$LINENO"; then :
14694   pgac_cv_var_int_timezone=yes
14695 else
14696   pgac_cv_var_int_timezone=no
14697 fi
14698 rm -f core conftest.err conftest.$ac_objext \
14699     conftest$ac_exeext conftest.$ac_ext
14700 fi
14701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
14702 $as_echo "$pgac_cv_var_int_timezone" >&6; }
14703 if test x"$pgac_cv_var_int_timezone" = xyes ; then
14704
14705 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
14706
14707 fi
14708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
14709 $as_echo_n "checking types of arguments for accept()... " >&6; }
14710  if ${ac_cv_func_accept_return+:} false; then :
14711   $as_echo_n "(cached) " >&6
14712 else
14713    if ${ac_cv_func_accept_arg1+:} false; then :
14714   $as_echo_n "(cached) " >&6
14715 else
14716     if ${ac_cv_func_accept_arg2+:} false; then :
14717   $as_echo_n "(cached) " >&6
14718 else
14719      if ${ac_cv_func_accept_arg3+:} false; then :
14720   $as_echo_n "(cached) " >&6
14721 else
14722       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
14723       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
14724        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
14725         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
14726          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14727 /* end confdefs.h.  */
14728 #include <sys/types.h>
14729 #include <sys/socket.h>
14730 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
14731 _ACEOF
14732 if ac_fn_c_try_compile "$LINENO"; then :
14733   ac_not_found=no; break 4
14734 else
14735   ac_not_found=yes
14736 fi
14737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14738        done
14739       done
14740      done
14741     done
14742     if test "$ac_not_found" = yes; then
14743       as_fn_error $? "could not determine argument types" "$LINENO" 5
14744     fi
14745     if test "$ac_cv_func_accept_arg3" = "void"; then
14746       ac_cv_func_accept_arg3=int
14747     fi
14748
14749 fi
14750
14751 fi
14752
14753 fi
14754
14755 fi
14756  { $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
14757 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
14758
14759 cat >>confdefs.h <<_ACEOF
14760 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
14761 _ACEOF
14762
14763
14764 cat >>confdefs.h <<_ACEOF
14765 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
14766 _ACEOF
14767
14768
14769 cat >>confdefs.h <<_ACEOF
14770 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
14771 _ACEOF
14772
14773
14774 cat >>confdefs.h <<_ACEOF
14775 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
14776 _ACEOF
14777
14778
14779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
14780 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
14781 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
14782   $as_echo_n "(cached) " >&6
14783 else
14784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14785 /* end confdefs.h.  */
14786 #include <sys/time.h>
14787 int
14788 main ()
14789 {
14790 struct timeval *tp;
14791 struct timezone *tzp;
14792 gettimeofday(tp,tzp);
14793   ;
14794   return 0;
14795 }
14796 _ACEOF
14797 if ac_fn_c_try_compile "$LINENO"; then :
14798   pgac_cv_func_gettimeofday_1arg=no
14799 else
14800   pgac_cv_func_gettimeofday_1arg=yes
14801 fi
14802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14803 fi
14804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
14805 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
14806 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
14807
14808 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
14809
14810 fi
14811
14812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
14813 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
14814 if ${pgac_cv_func_wcstombs_l+:} false; then :
14815   $as_echo_n "(cached) " >&6
14816 else
14817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14818 /* end confdefs.h.  */
14819 #include <stdlib.h>
14820 #include <locale.h>
14821 int
14822 main ()
14823 {
14824 #ifndef wcstombs_l
14825 (void) wcstombs_l;
14826 #endif
14827   ;
14828   return 0;
14829 }
14830 _ACEOF
14831 if ac_fn_c_try_compile "$LINENO"; then :
14832   pgac_cv_func_wcstombs_l='yes'
14833 else
14834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14835 /* end confdefs.h.  */
14836 #include <stdlib.h>
14837 #include <locale.h>
14838 #include <xlocale.h>
14839 int
14840 main ()
14841 {
14842 #ifndef wcstombs_l
14843 (void) wcstombs_l;
14844 #endif
14845   ;
14846   return 0;
14847 }
14848 _ACEOF
14849 if ac_fn_c_try_compile "$LINENO"; then :
14850   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
14851 else
14852   pgac_cv_func_wcstombs_l='no'
14853 fi
14854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14855 fi
14856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14857 fi
14858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
14859 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
14860 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
14861
14862 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
14863
14864 fi
14865
14866 # Some versions of libedit contain strlcpy(), setproctitle(), and other
14867 # symbols that that library has no business exposing to the world.  Pending
14868 # acquisition of a clue by those developers, ignore libedit (including its
14869 # possible alias of libreadline) while checking for everything else.
14870 LIBS_including_readline="$LIBS"
14871 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
14872
14873 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 uselocale utime utimes wcstombs_l
14874 do :
14875   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14876 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14877 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14878   cat >>confdefs.h <<_ACEOF
14879 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14880 _ACEOF
14881
14882 fi
14883 done
14884
14885
14886 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
14887 if test "x$ac_cv_func_fseeko" = xyes; then :
14888   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14889
14890 else
14891   case " $LIBOBJS " in
14892   *" fseeko.$ac_objext "* ) ;;
14893   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
14894  ;;
14895 esac
14896
14897 fi
14898
14899
14900 case $host_os in
14901         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
14902         # Mingw uses macros to access Win32 API calls
14903         netbsd*|mingw*)
14904
14905 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14906
14907                 ac_cv_func_fseeko=yes;;
14908         *)
14909                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14910 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14911 if ${ac_cv_sys_largefile_source+:} false; then :
14912   $as_echo_n "(cached) " >&6
14913 else
14914   while :; do
14915   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14916 /* end confdefs.h.  */
14917 #include <sys/types.h> /* for off_t */
14918      #include <stdio.h>
14919 int
14920 main ()
14921 {
14922 int (*fp) (FILE *, off_t, int) = fseeko;
14923      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14924   ;
14925   return 0;
14926 }
14927 _ACEOF
14928 if ac_fn_c_try_link "$LINENO"; then :
14929   ac_cv_sys_largefile_source=no; break
14930 fi
14931 rm -f core conftest.err conftest.$ac_objext \
14932     conftest$ac_exeext conftest.$ac_ext
14933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14934 /* end confdefs.h.  */
14935 #define _LARGEFILE_SOURCE 1
14936 #include <sys/types.h> /* for off_t */
14937      #include <stdio.h>
14938 int
14939 main ()
14940 {
14941 int (*fp) (FILE *, off_t, int) = fseeko;
14942      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14943   ;
14944   return 0;
14945 }
14946 _ACEOF
14947 if ac_fn_c_try_link "$LINENO"; then :
14948   ac_cv_sys_largefile_source=1; break
14949 fi
14950 rm -f core conftest.err conftest.$ac_objext \
14951     conftest$ac_exeext conftest.$ac_ext
14952   ac_cv_sys_largefile_source=unknown
14953   break
14954 done
14955 fi
14956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14957 $as_echo "$ac_cv_sys_largefile_source" >&6; }
14958 case $ac_cv_sys_largefile_source in #(
14959   no | unknown) ;;
14960   *)
14961 cat >>confdefs.h <<_ACEOF
14962 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14963 _ACEOF
14964 ;;
14965 esac
14966 rm -rf conftest*
14967
14968 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14969 # in glibc 2.1.3, but that breaks too many other things.
14970 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14971 if test $ac_cv_sys_largefile_source != unknown; then
14972
14973 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14974
14975 fi
14976 ;;
14977 esac
14978
14979 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
14980 # by calling it, 2009-04-02
14981 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
14982 # The Clang compiler raises a warning for an undeclared identifier that matches
14983 # a compiler builtin function.  All extant Clang versions are affected, as of
14984 # Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
14985 # C and Objective C languages, but Clang does report an error under C++ and
14986 # Objective C++.
14987 #
14988 # Passing -fno-builtin to the compiler would suppress this problem.  That
14989 # strategy would have the advantage of being insensitive to stray warnings, but
14990 # it would make tests less realistic.
14991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
14992 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
14993 if ${ac_cv_c_decl_report+:} false; then :
14994   $as_echo_n "(cached) " >&6
14995 else
14996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14997 /* end confdefs.h.  */
14998
14999 int
15000 main ()
15001 {
15002 (void) strchr;
15003   ;
15004   return 0;
15005 }
15006 _ACEOF
15007 if ac_fn_c_try_compile "$LINENO"; then :
15008   if test -s conftest.err; then :
15009       # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15010     # valid AC_CHECK_DECL input.  No library function is consistently available
15011     # on freestanding implementations, so test against a dummy declaration.
15012     # Include always-available headers on the off chance that they somehow
15013     # elicit warnings.
15014     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15015 /* end confdefs.h.  */
15016 #include <float.h>
15017 #include <limits.h>
15018 #include <stdarg.h>
15019 #include <stddef.h>
15020 extern void ac_decl (int, char *);
15021 int
15022 main ()
15023 {
15024 #ifdef __cplusplus
15025   (void) ac_decl ((int) 0, (char *) 0);
15026   (void) ac_decl;
15027 #else
15028   (void) ac_decl;
15029 #endif
15030
15031   ;
15032   return 0;
15033 }
15034 _ACEOF
15035 if ac_fn_c_try_compile "$LINENO"; then :
15036   if test -s conftest.err; then :
15037   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15039 as_fn_error $? "cannot detect from compiler exit status or warnings
15040 See \`config.log' for more details" "$LINENO" 5; }
15041 else
15042   ac_cv_c_decl_report=warning
15043 fi
15044 else
15045   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15046 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15047 as_fn_error $? "cannot compile a simple declaration test
15048 See \`config.log' for more details" "$LINENO" 5; }
15049 fi
15050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15051 else
15052   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15053 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15054 as_fn_error $? "compiler does not report undeclared identifiers
15055 See \`config.log' for more details" "$LINENO" 5; }
15056 fi
15057 else
15058   ac_cv_c_decl_report=error
15059 fi
15060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15061 fi
15062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15063 $as_echo "$ac_cv_c_decl_report" >&6; }
15064
15065 case $ac_cv_c_decl_report in
15066   warning) ac_c_decl_warn_flag=yes ;;
15067   *) ac_c_decl_warn_flag= ;;
15068 esac
15069
15070 if test "$PORTNAME" != "solaris"; then :
15071
15072 for ac_func in posix_fadvise
15073 do :
15074   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15075 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15076   cat >>confdefs.h <<_ACEOF
15077 #define HAVE_POSIX_FADVISE 1
15078 _ACEOF
15079
15080 fi
15081 done
15082
15083 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15084 "
15085 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15086   ac_have_decl=1
15087 else
15088   ac_have_decl=0
15089 fi
15090
15091 cat >>confdefs.h <<_ACEOF
15092 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15093 _ACEOF
15094
15095
15096 fi # fi
15097
15098 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15099 "
15100 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15101   ac_have_decl=1
15102 else
15103   ac_have_decl=0
15104 fi
15105
15106 cat >>confdefs.h <<_ACEOF
15107 #define HAVE_DECL_FDATASYNC $ac_have_decl
15108 _ACEOF
15109
15110 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15111 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15112   ac_have_decl=1
15113 else
15114   ac_have_decl=0
15115 fi
15116
15117 cat >>confdefs.h <<_ACEOF
15118 #define HAVE_DECL_STRLCAT $ac_have_decl
15119 _ACEOF
15120 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15121 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15122   ac_have_decl=1
15123 else
15124   ac_have_decl=0
15125 fi
15126
15127 cat >>confdefs.h <<_ACEOF
15128 #define HAVE_DECL_STRLCPY $ac_have_decl
15129 _ACEOF
15130 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15131 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15132   ac_have_decl=1
15133 else
15134   ac_have_decl=0
15135 fi
15136
15137 cat >>confdefs.h <<_ACEOF
15138 #define HAVE_DECL_STRNLEN $ac_have_decl
15139 _ACEOF
15140
15141 # This is probably only present on macOS, but may as well check always
15142 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15143 "
15144 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15145   ac_have_decl=1
15146 else
15147   ac_have_decl=0
15148 fi
15149
15150 cat >>confdefs.h <<_ACEOF
15151 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15152 _ACEOF
15153
15154
15155 HAVE_IPV6=no
15156 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15157 #include <netinet/in.h>
15158 "
15159 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15160
15161 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15162
15163          HAVE_IPV6=yes
15164 fi
15165
15166
15167
15168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15169 $as_echo_n "checking for PS_STRINGS... " >&6; }
15170 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15171   $as_echo_n "(cached) " >&6
15172 else
15173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15174 /* end confdefs.h.  */
15175 #include <machine/vmparam.h>
15176 #include <sys/exec.h>
15177
15178 int
15179 main ()
15180 {
15181 PS_STRINGS->ps_nargvstr = 1;
15182 PS_STRINGS->ps_argvstr = "foo";
15183   ;
15184   return 0;
15185 }
15186 _ACEOF
15187 if ac_fn_c_try_link "$LINENO"; then :
15188   pgac_cv_var_PS_STRINGS=yes
15189 else
15190   pgac_cv_var_PS_STRINGS=no
15191 fi
15192 rm -f core conftest.err conftest.$ac_objext \
15193     conftest$ac_exeext conftest.$ac_ext
15194 fi
15195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15196 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15197 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15198
15199 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15200
15201 fi
15202
15203
15204 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
15205 # is missing.  Yes, there are machines that have only one.  We may
15206 # also decide to use snprintf.c if snprintf() is present but does not
15207 # have all the features we need --- see below.
15208
15209 if test "$PORTNAME" = "win32"; then
15210   # Win32 gets snprintf.c built unconditionally.
15211   #
15212   # To properly translate all NLS languages strings, we must support the
15213   # *printf() %$ format, which allows *printf() arguments to be selected
15214   # by position in the translated string.
15215   #
15216   # libintl versions < 0.13 use the native *printf() functions, and Win32
15217   # *printf() doesn't understand %$, so we must use our /port versions,
15218   # which do understand %$. libintl versions >= 0.13 include their own
15219   # *printf versions on Win32.  The libintl 0.13 release note text is:
15220   #
15221   #   C format strings with positions, as they arise when a translator
15222   #   needs to reorder a sentence, are now supported on all platforms.
15223   #   On those few platforms (NetBSD and Woe32) for which the native
15224   #   printf()/fprintf()/... functions don't support such format
15225   #   strings, replacements are provided through <libintl.h>.
15226   #
15227   # We could use libintl >= 0.13's *printf() if we were sure that we had
15228   # a libintl >= 0.13 at runtime, but seeing that there is no clean way
15229   # to guarantee that, it is best to just use our own, so we are sure to
15230   # get %$ support. In include/port.h we disable the *printf() macros
15231   # that might have been defined by libintl.
15232   #
15233   # We do this unconditionally whether NLS is used or not so we are sure
15234   # that all Win32 libraries and binaries behave the same.
15235   pgac_need_repl_snprintf=yes
15236 else
15237   pgac_need_repl_snprintf=no
15238   for ac_func in snprintf
15239 do :
15240   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15241 if test "x$ac_cv_func_snprintf" = xyes; then :
15242   cat >>confdefs.h <<_ACEOF
15243 #define HAVE_SNPRINTF 1
15244 _ACEOF
15245
15246 else
15247   pgac_need_repl_snprintf=yes
15248 fi
15249 done
15250
15251   for ac_func in vsnprintf
15252 do :
15253   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
15254 if test "x$ac_cv_func_vsnprintf" = xyes; then :
15255   cat >>confdefs.h <<_ACEOF
15256 #define HAVE_VSNPRINTF 1
15257 _ACEOF
15258
15259 else
15260   pgac_need_repl_snprintf=yes
15261 fi
15262 done
15263
15264 fi
15265
15266
15267 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
15268 # include/c.h will provide declarations.  Note this is a separate test
15269 # from whether the functions exist in the C library --- there are
15270 # systems that have the functions but don't bother to declare them :-(
15271
15272 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15273 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15274   ac_have_decl=1
15275 else
15276   ac_have_decl=0
15277 fi
15278
15279 cat >>confdefs.h <<_ACEOF
15280 #define HAVE_DECL_SNPRINTF $ac_have_decl
15281 _ACEOF
15282 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
15283 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
15284   ac_have_decl=1
15285 else
15286   ac_have_decl=0
15287 fi
15288
15289 cat >>confdefs.h <<_ACEOF
15290 #define HAVE_DECL_VSNPRINTF $ac_have_decl
15291 _ACEOF
15292
15293
15294
15295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15296 $as_echo_n "checking for isinf... " >&6; }
15297 if ${ac_cv_func_isinf+:} false; then :
15298   $as_echo_n "(cached) " >&6
15299 else
15300   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15301 /* end confdefs.h.  */
15302
15303 #include <math.h>
15304 double glob_double;
15305
15306 int
15307 main ()
15308 {
15309 return isinf(glob_double) ? 0 : 1;
15310   ;
15311   return 0;
15312 }
15313 _ACEOF
15314 if ac_fn_c_try_link "$LINENO"; then :
15315   ac_cv_func_isinf=yes
15316 else
15317   ac_cv_func_isinf=no
15318 fi
15319 rm -f core conftest.err conftest.$ac_objext \
15320     conftest$ac_exeext conftest.$ac_ext
15321 fi
15322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15323 $as_echo "$ac_cv_func_isinf" >&6; }
15324
15325 if test $ac_cv_func_isinf = yes ; then
15326
15327 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15328
15329 else
15330   case " $LIBOBJS " in
15331   *" isinf.$ac_objext "* ) ;;
15332   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15333  ;;
15334 esac
15335
15336   # Look for a way to implement a substitute for isinf()
15337   for ac_func in fpclass fp_class fp_class_d class
15338 do :
15339   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15340 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15341 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15342   cat >>confdefs.h <<_ACEOF
15343 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15344 _ACEOF
15345  break
15346 fi
15347 done
15348
15349 fi
15350
15351 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15352 if test "x$ac_cv_func_crypt" = xyes; then :
15353   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15354
15355 else
15356   case " $LIBOBJS " in
15357   *" crypt.$ac_objext "* ) ;;
15358   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15359  ;;
15360 esac
15361
15362 fi
15363
15364 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15365 if test "x$ac_cv_func_fls" = xyes; then :
15366   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15367
15368 else
15369   case " $LIBOBJS " in
15370   *" fls.$ac_objext "* ) ;;
15371   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15372  ;;
15373 esac
15374
15375 fi
15376
15377 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15378 if test "x$ac_cv_func_getopt" = xyes; then :
15379   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15380
15381 else
15382   case " $LIBOBJS " in
15383   *" getopt.$ac_objext "* ) ;;
15384   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15385  ;;
15386 esac
15387
15388 fi
15389
15390 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15391 if test "x$ac_cv_func_getrusage" = xyes; then :
15392   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15393
15394 else
15395   case " $LIBOBJS " in
15396   *" getrusage.$ac_objext "* ) ;;
15397   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15398  ;;
15399 esac
15400
15401 fi
15402
15403 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15404 if test "x$ac_cv_func_inet_aton" = xyes; then :
15405   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15406
15407 else
15408   case " $LIBOBJS " in
15409   *" inet_aton.$ac_objext "* ) ;;
15410   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15411  ;;
15412 esac
15413
15414 fi
15415
15416 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15417 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15418   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15419
15420 else
15421   case " $LIBOBJS " in
15422   *" mkdtemp.$ac_objext "* ) ;;
15423   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15424  ;;
15425 esac
15426
15427 fi
15428
15429 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15430 if test "x$ac_cv_func_random" = xyes; then :
15431   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15432
15433 else
15434   case " $LIBOBJS " in
15435   *" random.$ac_objext "* ) ;;
15436   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15437  ;;
15438 esac
15439
15440 fi
15441
15442 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15443 if test "x$ac_cv_func_rint" = xyes; then :
15444   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15445
15446 else
15447   case " $LIBOBJS " in
15448   *" rint.$ac_objext "* ) ;;
15449   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15450  ;;
15451 esac
15452
15453 fi
15454
15455 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15456 if test "x$ac_cv_func_srandom" = xyes; then :
15457   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15458
15459 else
15460   case " $LIBOBJS " in
15461   *" srandom.$ac_objext "* ) ;;
15462   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15463  ;;
15464 esac
15465
15466 fi
15467
15468 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
15469 if test "x$ac_cv_func_strerror" = xyes; then :
15470   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
15471
15472 else
15473   case " $LIBOBJS " in
15474   *" strerror.$ac_objext "* ) ;;
15475   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
15476  ;;
15477 esac
15478
15479 fi
15480
15481 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15482 if test "x$ac_cv_func_strlcat" = xyes; then :
15483   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15484
15485 else
15486   case " $LIBOBJS " in
15487   *" strlcat.$ac_objext "* ) ;;
15488   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15489  ;;
15490 esac
15491
15492 fi
15493
15494 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15495 if test "x$ac_cv_func_strlcpy" = xyes; then :
15496   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15497
15498 else
15499   case " $LIBOBJS " in
15500   *" strlcpy.$ac_objext "* ) ;;
15501   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15502  ;;
15503 esac
15504
15505 fi
15506
15507 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15508 if test "x$ac_cv_func_strnlen" = xyes; then :
15509   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15510
15511 else
15512   case " $LIBOBJS " in
15513   *" strnlen.$ac_objext "* ) ;;
15514   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15515  ;;
15516 esac
15517
15518 fi
15519
15520
15521
15522 case $host_os in
15523
15524         # Windows uses a specialised env handler
15525         # and doesn't need a replacement getpeereid because it doesn't use
15526         # Unix sockets.
15527         mingw*)
15528
15529 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15530
15531
15532 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15533
15534                 ac_cv_func_unsetenv=yes
15535                 ac_cv_func_getpeereid=yes;;
15536         *)
15537                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15538 if test "x$ac_cv_func_unsetenv" = xyes; then :
15539   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15540
15541 else
15542   case " $LIBOBJS " in
15543   *" unsetenv.$ac_objext "* ) ;;
15544   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15545  ;;
15546 esac
15547
15548 fi
15549
15550 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15551 if test "x$ac_cv_func_getpeereid" = xyes; then :
15552   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15553
15554 else
15555   case " $LIBOBJS " in
15556   *" getpeereid.$ac_objext "* ) ;;
15557   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15558  ;;
15559 esac
15560
15561 fi
15562
15563
15564                 ;;
15565 esac
15566
15567 # System's version of getaddrinfo(), if any, may be used only if we found
15568 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15569 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15570 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15571    test "$PORTNAME" != "win32"; then
15572   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15573 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15574   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15575
15576 else
15577   case " $LIBOBJS " in
15578   *" getaddrinfo.$ac_objext "* ) ;;
15579   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15580  ;;
15581 esac
15582
15583 fi
15584
15585
15586 else
15587   case " $LIBOBJS " in
15588   *" getaddrinfo.$ac_objext "* ) ;;
15589   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15590  ;;
15591 esac
15592
15593 fi
15594
15595 # Similarly, use system's getopt_long() only if system provides struct option.
15596 if test x"$ac_cv_type_struct_option" = xyes ; then
15597   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15598 if test "x$ac_cv_func_getopt_long" = xyes; then :
15599   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15600
15601 else
15602   case " $LIBOBJS " in
15603   *" getopt_long.$ac_objext "* ) ;;
15604   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15605  ;;
15606 esac
15607
15608 fi
15609
15610
15611 else
15612   case " $LIBOBJS " in
15613   *" getopt_long.$ac_objext "* ) ;;
15614   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15615  ;;
15616 esac
15617
15618 fi
15619
15620 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15621 # (i.e., allow '-' as a flag character), so use our version on those platforms.
15622 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
15623   case " $LIBOBJS " in
15624   *" getopt.$ac_objext "* ) ;;
15625   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15626  ;;
15627 esac
15628
15629 fi
15630
15631 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15632 # so always use our version on Windows.
15633 if test "$PORTNAME" = "win32"; then
15634   case " $LIBOBJS " in
15635   *" getopt.$ac_objext "* ) ;;
15636   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15637  ;;
15638 esac
15639
15640   case " $LIBOBJS " in
15641   *" getopt_long.$ac_objext "* ) ;;
15642   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15643  ;;
15644 esac
15645
15646 fi
15647
15648 # Win32 (really MinGW) support
15649 if test "$PORTNAME" = "win32"; then
15650   for ac_func in _configthreadlocale
15651 do :
15652   ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
15653 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
15654   cat >>confdefs.h <<_ACEOF
15655 #define HAVE__CONFIGTHREADLOCALE 1
15656 _ACEOF
15657
15658 fi
15659 done
15660
15661   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15662 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15663   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15664
15665 else
15666   case " $LIBOBJS " in
15667   *" gettimeofday.$ac_objext "* ) ;;
15668   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15669  ;;
15670 esac
15671
15672 fi
15673
15674
15675   case " $LIBOBJS " in
15676   *" dirmod.$ac_objext "* ) ;;
15677   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15678  ;;
15679 esac
15680
15681   case " $LIBOBJS " in
15682   *" kill.$ac_objext "* ) ;;
15683   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15684  ;;
15685 esac
15686
15687   case " $LIBOBJS " in
15688   *" open.$ac_objext "* ) ;;
15689   *) LIBOBJS="$LIBOBJS open.$ac_objext"
15690  ;;
15691 esac
15692
15693   case " $LIBOBJS " in
15694   *" system.$ac_objext "* ) ;;
15695   *) LIBOBJS="$LIBOBJS system.$ac_objext"
15696  ;;
15697 esac
15698
15699   case " $LIBOBJS " in
15700   *" win32env.$ac_objext "* ) ;;
15701   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15702  ;;
15703 esac
15704
15705   case " $LIBOBJS " in
15706   *" win32error.$ac_objext "* ) ;;
15707   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15708  ;;
15709 esac
15710
15711   case " $LIBOBJS " in
15712   *" win32security.$ac_objext "* ) ;;
15713   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15714  ;;
15715 esac
15716
15717   case " $LIBOBJS " in
15718   *" win32setlocale.$ac_objext "* ) ;;
15719   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15720  ;;
15721 esac
15722
15723
15724 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
15725
15726   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
15727 #define WIN32_LEAN_AND_MEAN
15728 #include <windows.h>
15729 #include <string.h>
15730 #include <dbghelp.h>
15731 "
15732 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
15733
15734 cat >>confdefs.h <<_ACEOF
15735 #define HAVE_MINIDUMP_TYPE 1
15736 _ACEOF
15737
15738 pgac_minidump_type=yes
15739 else
15740   pgac_minidump_type=no
15741 fi
15742
15743 fi
15744 if test x"$pgac_minidump_type" = x"yes" ; then
15745   have_win32_dbghelp=yes
15746
15747 else
15748   have_win32_dbghelp=no
15749
15750 fi
15751
15752 # Cygwin needs only a bit of that
15753 if test "$PORTNAME" = "cygwin"; then
15754   case " $LIBOBJS " in
15755   *" dirmod.$ac_objext "* ) ;;
15756   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15757  ;;
15758 esac
15759
15760 fi
15761
15762 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
15763 /* NetBSD declares sys_siglist in unistd.h.  */
15764 #ifdef HAVE_UNISTD_H
15765 # include <unistd.h>
15766 #endif
15767
15768 "
15769 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
15770   ac_have_decl=1
15771 else
15772   ac_have_decl=0
15773 fi
15774
15775 cat >>confdefs.h <<_ACEOF
15776 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
15777 _ACEOF
15778
15779
15780 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15781 if test "x$ac_cv_func_syslog" = xyes; then :
15782   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15783 if test "x$ac_cv_header_syslog_h" = xyes; then :
15784
15785 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15786
15787 fi
15788
15789
15790 fi
15791
15792
15793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15794 $as_echo_n "checking for opterr... " >&6; }
15795 if ${pgac_cv_var_int_opterr+:} false; then :
15796   $as_echo_n "(cached) " >&6
15797 else
15798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15799 /* end confdefs.h.  */
15800 #include <unistd.h>
15801 int
15802 main ()
15803 {
15804 extern int opterr; opterr = 1;
15805   ;
15806   return 0;
15807 }
15808 _ACEOF
15809 if ac_fn_c_try_link "$LINENO"; then :
15810   pgac_cv_var_int_opterr=yes
15811 else
15812   pgac_cv_var_int_opterr=no
15813 fi
15814 rm -f core conftest.err conftest.$ac_objext \
15815     conftest$ac_exeext conftest.$ac_ext
15816 fi
15817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15818 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15819 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15820
15821 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15822
15823 fi
15824
15825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15826 $as_echo_n "checking for optreset... " >&6; }
15827 if ${pgac_cv_var_int_optreset+:} false; then :
15828   $as_echo_n "(cached) " >&6
15829 else
15830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15831 /* end confdefs.h.  */
15832 #include <unistd.h>
15833 int
15834 main ()
15835 {
15836 extern int optreset; optreset = 1;
15837   ;
15838   return 0;
15839 }
15840 _ACEOF
15841 if ac_fn_c_try_link "$LINENO"; then :
15842   pgac_cv_var_int_optreset=yes
15843 else
15844   pgac_cv_var_int_optreset=no
15845 fi
15846 rm -f core conftest.err conftest.$ac_objext \
15847     conftest$ac_exeext conftest.$ac_ext
15848 fi
15849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
15850 $as_echo "$pgac_cv_var_int_optreset" >&6; }
15851 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15852
15853 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
15854
15855 fi
15856
15857 for ac_func in strtoll __strtoll strtoq
15858 do :
15859   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15860 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15861 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15862   cat >>confdefs.h <<_ACEOF
15863 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15864 _ACEOF
15865  break
15866 fi
15867 done
15868
15869 for ac_func in strtoull __strtoull strtouq
15870 do :
15871   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15872 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15873 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15874   cat >>confdefs.h <<_ACEOF
15875 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15876 _ACEOF
15877  break
15878 fi
15879 done
15880
15881 # strto[u]ll may exist but not be declared
15882 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
15883 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
15884   ac_have_decl=1
15885 else
15886   ac_have_decl=0
15887 fi
15888
15889 cat >>confdefs.h <<_ACEOF
15890 #define HAVE_DECL_STRTOLL $ac_have_decl
15891 _ACEOF
15892 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
15893 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
15894   ac_have_decl=1
15895 else
15896   ac_have_decl=0
15897 fi
15898
15899 cat >>confdefs.h <<_ACEOF
15900 #define HAVE_DECL_STRTOULL $ac_have_decl
15901 _ACEOF
15902
15903
15904 if test "$with_icu" = yes; then
15905   ac_save_CPPFLAGS=$CPPFLAGS
15906   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
15907
15908   # Verify we have ICU's header files
15909   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
15910 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
15911
15912 else
15913   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
15914 fi
15915
15916
15917
15918   CPPFLAGS=$ac_save_CPPFLAGS
15919 fi
15920
15921 if test "$with_llvm" = yes; then
15922
15923   # Check which functionality is present
15924   SAVE_CPPFLAGS="$CPPFLAGS"
15925   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
15926   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
15927 "
15928 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
15929   ac_have_decl=1
15930 else
15931   ac_have_decl=0
15932 fi
15933
15934 cat >>confdefs.h <<_ACEOF
15935 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
15936 _ACEOF
15937
15938   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
15939 "
15940 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
15941   ac_have_decl=1
15942 else
15943   ac_have_decl=0
15944 fi
15945
15946 cat >>confdefs.h <<_ACEOF
15947 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
15948 _ACEOF
15949 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
15950 "
15951 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
15952   ac_have_decl=1
15953 else
15954   ac_have_decl=0
15955 fi
15956
15957 cat >>confdefs.h <<_ACEOF
15958 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
15959 _ACEOF
15960
15961   ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
15962 "
15963 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
15964   ac_have_decl=1
15965 else
15966   ac_have_decl=0
15967 fi
15968
15969 cat >>confdefs.h <<_ACEOF
15970 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
15971 _ACEOF
15972 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
15973 "
15974 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
15975   ac_have_decl=1
15976 else
15977   ac_have_decl=0
15978 fi
15979
15980 cat >>confdefs.h <<_ACEOF
15981 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
15982 _ACEOF
15983
15984   CPPFLAGS="$SAVE_CPPFLAGS"
15985
15986 fi
15987
15988 # Lastly, restore full LIBS list and check for readline/libedit symbols
15989 LIBS="$LIBS_including_readline"
15990
15991 if test "$with_readline" = yes; then
15992   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
15993 $as_echo_n "checking for rl_completion_append_character... " >&6; }
15994 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
15995   $as_echo_n "(cached) " >&6
15996 else
15997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15998 /* end confdefs.h.  */
15999 #include <stdio.h>
16000 #ifdef HAVE_READLINE_READLINE_H
16001 # include <readline/readline.h>
16002 #elif defined(HAVE_READLINE_H)
16003 # include <readline.h>
16004 #endif
16005
16006 int
16007 main ()
16008 {
16009 rl_completion_append_character = 'x';
16010   ;
16011   return 0;
16012 }
16013 _ACEOF
16014 if ac_fn_c_try_link "$LINENO"; then :
16015   pgac_cv_var_rl_completion_append_character=yes
16016 else
16017   pgac_cv_var_rl_completion_append_character=no
16018 fi
16019 rm -f core conftest.err conftest.$ac_objext \
16020     conftest$ac_exeext conftest.$ac_ext
16021 fi
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16023 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16024 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16025
16026 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16027
16028 fi
16029   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16030 do :
16031   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16032 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16033 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16034   cat >>confdefs.h <<_ACEOF
16035 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16036 _ACEOF
16037
16038 fi
16039 done
16040
16041   for ac_func in append_history history_truncate_file
16042 do :
16043   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16044 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16045 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16046   cat >>confdefs.h <<_ACEOF
16047 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16048 _ACEOF
16049
16050 fi
16051 done
16052
16053 fi
16054
16055
16056 # This test makes sure that run tests work at all.  Sometimes a shared
16057 # library is found by the linker, but the runtime linker can't find it.
16058 # This check should come after all modifications of compiler or linker
16059 # variables, and before any other run tests.
16060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16061 $as_echo_n "checking test program... " >&6; }
16062 if test "$cross_compiling" = yes; then :
16063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16064 $as_echo "cross-compiling" >&6; }
16065 else
16066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16067 /* end confdefs.h.  */
16068 int main() { return 0; }
16069 _ACEOF
16070 if ac_fn_c_try_run "$LINENO"; then :
16071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16072 $as_echo "ok" >&6; }
16073 else
16074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16075 $as_echo "failed" >&6; }
16076 as_fn_error $? "
16077 Could not execute a simple test program.  This may be a problem
16078 related to locating shared libraries.  Check the file 'config.log'
16079 for the exact reason." "$LINENO" 5
16080 fi
16081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16082   conftest.$ac_objext conftest.beam conftest.$ac_ext
16083 fi
16084
16085
16086 # --------------------
16087 # Run tests below here
16088 # --------------------
16089
16090 # Force use of our snprintf if system's doesn't do arg control
16091 # See comment above at snprintf test for details.
16092 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
16093   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
16094 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
16095 if ${pgac_cv_snprintf_arg_control+:} false; then :
16096   $as_echo_n "(cached) " >&6
16097 else
16098   if test "$cross_compiling" = yes; then :
16099   pgac_cv_snprintf_arg_control=cross
16100 else
16101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16102 /* end confdefs.h.  */
16103 #include <stdio.h>
16104 #include <string.h>
16105
16106 int main()
16107 {
16108   char buf[100];
16109
16110   /* can it swap arguments? */
16111   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
16112   if (strcmp(buf, "4 3") != 0)
16113     return 1;
16114   return 0;
16115 }
16116 _ACEOF
16117 if ac_fn_c_try_run "$LINENO"; then :
16118   pgac_cv_snprintf_arg_control=yes
16119 else
16120   pgac_cv_snprintf_arg_control=no
16121 fi
16122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16123   conftest.$ac_objext conftest.beam conftest.$ac_ext
16124 fi
16125
16126
16127 fi
16128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
16129 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
16130
16131   if test $pgac_cv_snprintf_arg_control != yes ; then
16132     pgac_need_repl_snprintf=yes
16133   fi
16134 fi
16135
16136
16137
16138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16139 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16140 if ${pgac_cv_type_long_int_64+:} false; then :
16141   $as_echo_n "(cached) " >&6
16142 else
16143   if test "$cross_compiling" = yes; then :
16144   # If cross-compiling, check the size reported by the compiler and
16145 # trust that the arithmetic works.
16146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16147 /* end confdefs.h.  */
16148
16149 int
16150 main ()
16151 {
16152 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16153 test_array [0] = 0;
16154 return test_array [0];
16155
16156   ;
16157   return 0;
16158 }
16159 _ACEOF
16160 if ac_fn_c_try_compile "$LINENO"; then :
16161   pgac_cv_type_long_int_64=yes
16162 else
16163   pgac_cv_type_long_int_64=no
16164 fi
16165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16166 else
16167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16168 /* end confdefs.h.  */
16169 typedef long int ac_int64;
16170
16171 /*
16172  * These are globals to discourage the compiler from folding all the
16173  * arithmetic tests down to compile-time constants.
16174  */
16175 ac_int64 a = 20000001;
16176 ac_int64 b = 40000005;
16177
16178 int does_int64_work()
16179 {
16180   ac_int64 c,d;
16181
16182   if (sizeof(ac_int64) != 8)
16183     return 0;                   /* definitely not the right size */
16184
16185   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16186   c = a * b;
16187   d = (c + b) / b;
16188   if (d != a+1)
16189     return 0;
16190   return 1;
16191 }
16192
16193 int
16194 main() {
16195   return (! does_int64_work());
16196 }
16197 _ACEOF
16198 if ac_fn_c_try_run "$LINENO"; then :
16199   pgac_cv_type_long_int_64=yes
16200 else
16201   pgac_cv_type_long_int_64=no
16202 fi
16203 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16204   conftest.$ac_objext conftest.beam conftest.$ac_ext
16205 fi
16206
16207 fi
16208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16209 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16210
16211 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16212 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16213
16214 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16215
16216 fi
16217
16218
16219 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16220   pg_int64_type="long int"
16221 else
16222   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16223 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16224 if ${pgac_cv_type_long_long_int_64+:} false; then :
16225   $as_echo_n "(cached) " >&6
16226 else
16227   if test "$cross_compiling" = yes; then :
16228   # If cross-compiling, check the size reported by the compiler and
16229 # trust that the arithmetic works.
16230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16231 /* end confdefs.h.  */
16232
16233 int
16234 main ()
16235 {
16236 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16237 test_array [0] = 0;
16238 return test_array [0];
16239
16240   ;
16241   return 0;
16242 }
16243 _ACEOF
16244 if ac_fn_c_try_compile "$LINENO"; then :
16245   pgac_cv_type_long_long_int_64=yes
16246 else
16247   pgac_cv_type_long_long_int_64=no
16248 fi
16249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16250 else
16251   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16252 /* end confdefs.h.  */
16253 typedef long long int ac_int64;
16254
16255 /*
16256  * These are globals to discourage the compiler from folding all the
16257  * arithmetic tests down to compile-time constants.
16258  */
16259 ac_int64 a = 20000001;
16260 ac_int64 b = 40000005;
16261
16262 int does_int64_work()
16263 {
16264   ac_int64 c,d;
16265
16266   if (sizeof(ac_int64) != 8)
16267     return 0;                   /* definitely not the right size */
16268
16269   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16270   c = a * b;
16271   d = (c + b) / b;
16272   if (d != a+1)
16273     return 0;
16274   return 1;
16275 }
16276
16277 int
16278 main() {
16279   return (! does_int64_work());
16280 }
16281 _ACEOF
16282 if ac_fn_c_try_run "$LINENO"; then :
16283   pgac_cv_type_long_long_int_64=yes
16284 else
16285   pgac_cv_type_long_long_int_64=no
16286 fi
16287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16288   conftest.$ac_objext conftest.beam conftest.$ac_ext
16289 fi
16290
16291 fi
16292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16293 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16294
16295 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16296 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16297
16298 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16299
16300 fi
16301
16302   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16303     pg_int64_type="long long int"
16304   else
16305     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16306   fi
16307 fi
16308
16309
16310 cat >>confdefs.h <<_ACEOF
16311 #define PG_INT64_TYPE $pg_int64_type
16312 _ACEOF
16313
16314
16315 # Select the printf length modifier that goes with that, too.
16316 # (This used to be bound up with replacement-snprintf selection, but now
16317 # we assume that the native *printf functions use standard length modifiers.)
16318 if test x"$pg_int64_type" = x"long long int" ; then
16319   INT64_MODIFIER='"ll"'
16320 else
16321   INT64_MODIFIER='"l"'
16322 fi
16323
16324
16325 cat >>confdefs.h <<_ACEOF
16326 #define INT64_MODIFIER $INT64_MODIFIER
16327 _ACEOF
16328
16329
16330 # Force use of our snprintf if the system's doesn't support the %z flag.
16331 # (Note this test uses PG_INT64_TYPE and INT64_MODIFIER.)
16332 if test "$pgac_need_repl_snprintf" = no; then
16333   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
16334 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
16335 if ${pgac_cv_snprintf_size_t_support+:} false; then :
16336   $as_echo_n "(cached) " >&6
16337 else
16338   if test "$cross_compiling" = yes; then :
16339   pgac_cv_snprintf_size_t_support=cross
16340 else
16341   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16342 /* end confdefs.h.  */
16343 #include <stdio.h>
16344 #include <string.h>
16345
16346 int main()
16347 {
16348   char bufz[100];
16349   char buf64[100];
16350
16351   /*
16352    * Print the largest unsigned number fitting in a size_t using both %zu
16353    * and the previously-determined format for 64-bit integers.  Note that
16354    * we don't run this code unless we know snprintf handles 64-bit ints.
16355    */
16356   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
16357   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
16358   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
16359     (unsigned PG_INT64_TYPE) ~((size_t) 0));
16360   if (strcmp(bufz, buf64) != 0)
16361     return 1;
16362   return 0;
16363 }
16364 _ACEOF
16365 if ac_fn_c_try_run "$LINENO"; then :
16366   pgac_cv_snprintf_size_t_support=yes
16367 else
16368   pgac_cv_snprintf_size_t_support=no
16369 fi
16370 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16371   conftest.$ac_objext conftest.beam conftest.$ac_ext
16372 fi
16373
16374
16375 fi
16376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
16377 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
16378
16379   if test "$pgac_cv_snprintf_size_t_support" != yes; then
16380     pgac_need_repl_snprintf=yes
16381   fi
16382 fi
16383
16384 # Now we have checked all the reasons to replace snprintf
16385 if test $pgac_need_repl_snprintf = yes; then
16386
16387 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
16388
16389   case " $LIBOBJS " in
16390   *" snprintf.$ac_objext "* ) ;;
16391   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
16392  ;;
16393 esac
16394
16395 fi
16396
16397 # has to be down here, rather than with the other builtins, because
16398 # the test uses PG_INT64_TYPE.
16399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16400 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16401 if ${pgac_cv__builtin_op_overflow+:} false; then :
16402   $as_echo_n "(cached) " >&6
16403 else
16404   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16405 /* end confdefs.h.  */
16406
16407 PG_INT64_TYPE a = 1;
16408 PG_INT64_TYPE b = 1;
16409 PG_INT64_TYPE result;
16410 int oflo;
16411
16412 int
16413 main ()
16414 {
16415 oflo = __builtin_mul_overflow(a, b, &result);
16416   ;
16417   return 0;
16418 }
16419 _ACEOF
16420 if ac_fn_c_try_link "$LINENO"; then :
16421   pgac_cv__builtin_op_overflow=yes
16422 else
16423   pgac_cv__builtin_op_overflow=no
16424 fi
16425 rm -f core conftest.err conftest.$ac_objext \
16426     conftest$ac_exeext conftest.$ac_ext
16427 fi
16428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16429 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16430 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16431
16432 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16433
16434 fi
16435
16436 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16437 # The cast to long int works around a bug in the HP C Compiler
16438 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16439 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16440 # This bug is HP SR number 8606223364.
16441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16442 $as_echo_n "checking size of void *... " >&6; }
16443 if ${ac_cv_sizeof_void_p+:} false; then :
16444   $as_echo_n "(cached) " >&6
16445 else
16446   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16447
16448 else
16449   if test "$ac_cv_type_void_p" = yes; then
16450      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16451 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16452 as_fn_error 77 "cannot compute sizeof (void *)
16453 See \`config.log' for more details" "$LINENO" 5; }
16454    else
16455      ac_cv_sizeof_void_p=0
16456    fi
16457 fi
16458
16459 fi
16460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16461 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16462
16463
16464
16465 cat >>confdefs.h <<_ACEOF
16466 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16467 _ACEOF
16468
16469
16470 # The cast to long int works around a bug in the HP C Compiler
16471 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16472 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16473 # This bug is HP SR number 8606223364.
16474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16475 $as_echo_n "checking size of size_t... " >&6; }
16476 if ${ac_cv_sizeof_size_t+:} false; then :
16477   $as_echo_n "(cached) " >&6
16478 else
16479   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16480
16481 else
16482   if test "$ac_cv_type_size_t" = yes; then
16483      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16484 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16485 as_fn_error 77 "cannot compute sizeof (size_t)
16486 See \`config.log' for more details" "$LINENO" 5; }
16487    else
16488      ac_cv_sizeof_size_t=0
16489    fi
16490 fi
16491
16492 fi
16493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16494 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16495
16496
16497
16498 cat >>confdefs.h <<_ACEOF
16499 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16500 _ACEOF
16501
16502
16503 # The cast to long int works around a bug in the HP C Compiler
16504 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16505 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16506 # This bug is HP SR number 8606223364.
16507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16508 $as_echo_n "checking size of long... " >&6; }
16509 if ${ac_cv_sizeof_long+:} false; then :
16510   $as_echo_n "(cached) " >&6
16511 else
16512   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16513
16514 else
16515   if test "$ac_cv_type_long" = yes; then
16516      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16517 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16518 as_fn_error 77 "cannot compute sizeof (long)
16519 See \`config.log' for more details" "$LINENO" 5; }
16520    else
16521      ac_cv_sizeof_long=0
16522    fi
16523 fi
16524
16525 fi
16526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16527 $as_echo "$ac_cv_sizeof_long" >&6; }
16528
16529
16530
16531 cat >>confdefs.h <<_ACEOF
16532 #define SIZEOF_LONG $ac_cv_sizeof_long
16533 _ACEOF
16534
16535
16536
16537 # Decide whether float4 is passed by value: user-selectable, enabled by default
16538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16539 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16540
16541
16542 # Check whether --enable-float4-byval was given.
16543 if test "${enable_float4_byval+set}" = set; then :
16544   enableval=$enable_float4_byval;
16545   case $enableval in
16546     yes)
16547
16548 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16549
16550                float4passbyval=true
16551       ;;
16552     no)
16553       float4passbyval=false
16554       ;;
16555     *)
16556       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16557       ;;
16558   esac
16559
16560 else
16561   enable_float4_byval=yes
16562
16563 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16564
16565                float4passbyval=true
16566 fi
16567
16568
16569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16570 $as_echo "$enable_float4_byval" >&6; }
16571
16572 cat >>confdefs.h <<_ACEOF
16573 #define FLOAT4PASSBYVAL $float4passbyval
16574 _ACEOF
16575
16576
16577 # Decide whether float8 is passed by value.
16578 # Note: this setting also controls int8 and related types such as timestamp.
16579 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16580 # If not, trying to select it is an error.
16581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16582 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16583 if test $ac_cv_sizeof_void_p -ge 8 ; then
16584
16585
16586 # Check whether --enable-float8-byval was given.
16587 if test "${enable_float8_byval+set}" = set; then :
16588   enableval=$enable_float8_byval;
16589   case $enableval in
16590     yes)
16591       :
16592       ;;
16593     no)
16594       :
16595       ;;
16596     *)
16597       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16598       ;;
16599   esac
16600
16601 else
16602   enable_float8_byval=yes
16603
16604 fi
16605
16606
16607 else
16608
16609
16610 # Check whether --enable-float8-byval was given.
16611 if test "${enable_float8_byval+set}" = set; then :
16612   enableval=$enable_float8_byval;
16613   case $enableval in
16614     yes)
16615       :
16616       ;;
16617     no)
16618       :
16619       ;;
16620     *)
16621       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16622       ;;
16623   esac
16624
16625 else
16626   enable_float8_byval=no
16627
16628 fi
16629
16630
16631   if test "$enable_float8_byval" = yes ; then
16632     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16633   fi
16634 fi
16635 if test "$enable_float8_byval" = yes ; then
16636
16637 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16638
16639   float8passbyval=true
16640 else
16641   float8passbyval=false
16642 fi
16643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16644 $as_echo "$enable_float8_byval" >&6; }
16645
16646 cat >>confdefs.h <<_ACEOF
16647 #define FLOAT8PASSBYVAL $float8passbyval
16648 _ACEOF
16649
16650
16651 # Determine memory alignment requirements for the basic C data types.
16652
16653 # The cast to long int works around a bug in the HP C Compiler,
16654 # see AC_CHECK_SIZEOF for more information.
16655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16656 $as_echo_n "checking alignment of short... " >&6; }
16657 if ${ac_cv_alignof_short+:} false; then :
16658   $as_echo_n "(cached) " >&6
16659 else
16660   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16661 #ifndef offsetof
16662 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16663 #endif
16664 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16665
16666 else
16667   if test "$ac_cv_type_short" = yes; then
16668      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16669 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16670 as_fn_error 77 "cannot compute alignment of short
16671 See \`config.log' for more details" "$LINENO" 5; }
16672    else
16673      ac_cv_alignof_short=0
16674    fi
16675 fi
16676
16677 fi
16678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16679 $as_echo "$ac_cv_alignof_short" >&6; }
16680
16681
16682
16683 cat >>confdefs.h <<_ACEOF
16684 #define ALIGNOF_SHORT $ac_cv_alignof_short
16685 _ACEOF
16686
16687
16688 # The cast to long int works around a bug in the HP C Compiler,
16689 # see AC_CHECK_SIZEOF for more information.
16690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16691 $as_echo_n "checking alignment of int... " >&6; }
16692 if ${ac_cv_alignof_int+:} false; then :
16693   $as_echo_n "(cached) " >&6
16694 else
16695   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16696 #ifndef offsetof
16697 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16698 #endif
16699 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16700
16701 else
16702   if test "$ac_cv_type_int" = yes; then
16703      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16704 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16705 as_fn_error 77 "cannot compute alignment of int
16706 See \`config.log' for more details" "$LINENO" 5; }
16707    else
16708      ac_cv_alignof_int=0
16709    fi
16710 fi
16711
16712 fi
16713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16714 $as_echo "$ac_cv_alignof_int" >&6; }
16715
16716
16717
16718 cat >>confdefs.h <<_ACEOF
16719 #define ALIGNOF_INT $ac_cv_alignof_int
16720 _ACEOF
16721
16722
16723 # The cast to long int works around a bug in the HP C Compiler,
16724 # see AC_CHECK_SIZEOF for more information.
16725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16726 $as_echo_n "checking alignment of long... " >&6; }
16727 if ${ac_cv_alignof_long+:} false; then :
16728   $as_echo_n "(cached) " >&6
16729 else
16730   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16731 #ifndef offsetof
16732 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16733 #endif
16734 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16735
16736 else
16737   if test "$ac_cv_type_long" = yes; then
16738      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16739 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16740 as_fn_error 77 "cannot compute alignment of long
16741 See \`config.log' for more details" "$LINENO" 5; }
16742    else
16743      ac_cv_alignof_long=0
16744    fi
16745 fi
16746
16747 fi
16748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16749 $as_echo "$ac_cv_alignof_long" >&6; }
16750
16751
16752
16753 cat >>confdefs.h <<_ACEOF
16754 #define ALIGNOF_LONG $ac_cv_alignof_long
16755 _ACEOF
16756
16757
16758 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16759   # The cast to long int works around a bug in the HP C Compiler,
16760 # see AC_CHECK_SIZEOF for more information.
16761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16762 $as_echo_n "checking alignment of long long int... " >&6; }
16763 if ${ac_cv_alignof_long_long_int+:} false; then :
16764   $as_echo_n "(cached) " >&6
16765 else
16766   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
16767 #ifndef offsetof
16768 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16769 #endif
16770 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16771
16772 else
16773   if test "$ac_cv_type_long_long_int" = yes; then
16774      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16775 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16776 as_fn_error 77 "cannot compute alignment of long long int
16777 See \`config.log' for more details" "$LINENO" 5; }
16778    else
16779      ac_cv_alignof_long_long_int=0
16780    fi
16781 fi
16782
16783 fi
16784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16785 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16786
16787
16788
16789 cat >>confdefs.h <<_ACEOF
16790 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16791 _ACEOF
16792
16793
16794 fi
16795 # The cast to long int works around a bug in the HP C Compiler,
16796 # see AC_CHECK_SIZEOF for more information.
16797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16798 $as_echo_n "checking alignment of double... " >&6; }
16799 if ${ac_cv_alignof_double+:} false; then :
16800   $as_echo_n "(cached) " >&6
16801 else
16802   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
16803 #ifndef offsetof
16804 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16805 #endif
16806 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16807
16808 else
16809   if test "$ac_cv_type_double" = yes; then
16810      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16811 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16812 as_fn_error 77 "cannot compute alignment of double
16813 See \`config.log' for more details" "$LINENO" 5; }
16814    else
16815      ac_cv_alignof_double=0
16816    fi
16817 fi
16818
16819 fi
16820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16821 $as_echo "$ac_cv_alignof_double" >&6; }
16822
16823
16824
16825 cat >>confdefs.h <<_ACEOF
16826 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16827 _ACEOF
16828
16829
16830
16831 # Compute maximum alignment of any basic type.
16832 # We assume long's alignment is at least as strong as char, short, or int;
16833 # but we must check long long (if it is being used for int64) and double.
16834 # Note that we intentionally do not consider any types wider than 64 bits,
16835 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
16836 # for disk and memory space.
16837
16838 MAX_ALIGNOF=$ac_cv_alignof_long
16839 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
16840   MAX_ALIGNOF=$ac_cv_alignof_double
16841 fi
16842 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
16843   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
16844 fi
16845
16846 cat >>confdefs.h <<_ACEOF
16847 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16848 _ACEOF
16849
16850
16851
16852 # Some platforms predefine the types int8, int16, etc.  Only check
16853 # a (hopefully) representative subset.
16854 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16855 "
16856 if test "x$ac_cv_type_int8" = xyes; then :
16857
16858 cat >>confdefs.h <<_ACEOF
16859 #define HAVE_INT8 1
16860 _ACEOF
16861
16862
16863 fi
16864 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16865 "
16866 if test "x$ac_cv_type_uint8" = xyes; then :
16867
16868 cat >>confdefs.h <<_ACEOF
16869 #define HAVE_UINT8 1
16870 _ACEOF
16871
16872
16873 fi
16874 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
16875 "
16876 if test "x$ac_cv_type_int64" = xyes; then :
16877
16878 cat >>confdefs.h <<_ACEOF
16879 #define HAVE_INT64 1
16880 _ACEOF
16881
16882
16883 fi
16884 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
16885 "
16886 if test "x$ac_cv_type_uint64" = xyes; then :
16887
16888 cat >>confdefs.h <<_ACEOF
16889 #define HAVE_UINT64 1
16890 _ACEOF
16891
16892
16893 fi
16894
16895
16896 # Some compilers offer a 128-bit integer scalar type.
16897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16898 $as_echo_n "checking for __int128... " >&6; }
16899 if ${pgac_cv__128bit_int+:} false; then :
16900   $as_echo_n "(cached) " >&6
16901 else
16902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16903 /* end confdefs.h.  */
16904
16905 /*
16906  * We don't actually run this test, just link it to verify that any support
16907  * functions needed for __int128 are present.
16908  *
16909  * These are globals to discourage the compiler from folding all the
16910  * arithmetic tests down to compile-time constants.  We do not have
16911  * convenient support for 128bit literals at this point...
16912  */
16913 __int128 a = 48828125;
16914 __int128 b = 97656250;
16915
16916 int
16917 main ()
16918 {
16919
16920 __int128 c,d;
16921 a = (a << 12) + 1; /* 200000000001 */
16922 b = (b << 12) + 5; /* 400000000005 */
16923 /* try the most relevant arithmetic ops */
16924 c = a * b;
16925 d = (c + b) / b;
16926 /* must use the results, else compiler may optimize arithmetic away */
16927 if (d != a+1)
16928   return 1;
16929
16930   ;
16931   return 0;
16932 }
16933 _ACEOF
16934 if ac_fn_c_try_link "$LINENO"; then :
16935   pgac_cv__128bit_int=yes
16936 else
16937   pgac_cv__128bit_int=no
16938 fi
16939 rm -f core conftest.err conftest.$ac_objext \
16940     conftest$ac_exeext conftest.$ac_ext
16941 fi
16942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
16943 $as_echo "$pgac_cv__128bit_int" >&6; }
16944 if test x"$pgac_cv__128bit_int" = xyes ; then
16945   # Use of non-default alignment with __int128 tickles bugs in some compilers.
16946   # If not cross-compiling, we can test for bugs and disable use of __int128
16947   # with buggy compilers.  If cross-compiling, hope for the best.
16948   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
16949   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
16950 $as_echo_n "checking for __int128 alignment bug... " >&6; }
16951 if ${pgac_cv__128bit_int_bug+:} false; then :
16952   $as_echo_n "(cached) " >&6
16953 else
16954   if test "$cross_compiling" = yes; then :
16955   pgac_cv__128bit_int_bug="assuming ok"
16956 else
16957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16958 /* end confdefs.h.  */
16959
16960 /* This must match the corresponding code in c.h: */
16961 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
16962 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
16963 #endif
16964 typedef __int128 int128a
16965 #if defined(pg_attribute_aligned)
16966 pg_attribute_aligned(8)
16967 #endif
16968 ;
16969 int128a holder;
16970 void pass_by_val(void *buffer, int128a par) { holder = par; }
16971
16972 int
16973 main ()
16974 {
16975
16976 long int i64 = 97656225L << 12;
16977 int128a q;
16978 pass_by_val(main, (int128a) i64);
16979 q = (int128a) i64;
16980 if (q != holder)
16981   return 1;
16982
16983   ;
16984   return 0;
16985 }
16986 _ACEOF
16987 if ac_fn_c_try_run "$LINENO"; then :
16988   pgac_cv__128bit_int_bug=ok
16989 else
16990   pgac_cv__128bit_int_bug=broken
16991 fi
16992 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16993   conftest.$ac_objext conftest.beam conftest.$ac_ext
16994 fi
16995
16996 fi
16997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
16998 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
16999   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17000
17001 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17002
17003     # The cast to long int works around a bug in the HP C Compiler,
17004 # see AC_CHECK_SIZEOF for more information.
17005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17006 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17007 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17008   $as_echo_n "(cached) " >&6
17009 else
17010   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
17011 #ifndef offsetof
17012 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17013 #endif
17014 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17015
17016 else
17017   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17018      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17019 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17020 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17021 See \`config.log' for more details" "$LINENO" 5; }
17022    else
17023      ac_cv_alignof_PG_INT128_TYPE=0
17024    fi
17025 fi
17026
17027 fi
17028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17029 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17030
17031
17032
17033 cat >>confdefs.h <<_ACEOF
17034 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17035 _ACEOF
17036
17037
17038   fi
17039 fi
17040
17041 # Check for various atomic operations now that we have checked how to declare
17042 # 64bit integers.
17043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17044 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17045 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17046   $as_echo_n "(cached) " >&6
17047 else
17048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17049 /* end confdefs.h.  */
17050
17051 int
17052 main ()
17053 {
17054 char lock = 0;
17055    __sync_lock_test_and_set(&lock, 1);
17056    __sync_lock_release(&lock);
17057   ;
17058   return 0;
17059 }
17060 _ACEOF
17061 if ac_fn_c_try_link "$LINENO"; then :
17062   pgac_cv_gcc_sync_char_tas="yes"
17063 else
17064   pgac_cv_gcc_sync_char_tas="no"
17065 fi
17066 rm -f core conftest.err conftest.$ac_objext \
17067     conftest$ac_exeext conftest.$ac_ext
17068 fi
17069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17070 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17071 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17072
17073 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17074
17075 fi
17076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17077 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17078 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17079   $as_echo_n "(cached) " >&6
17080 else
17081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17082 /* end confdefs.h.  */
17083
17084 int
17085 main ()
17086 {
17087 int lock = 0;
17088    __sync_lock_test_and_set(&lock, 1);
17089    __sync_lock_release(&lock);
17090   ;
17091   return 0;
17092 }
17093 _ACEOF
17094 if ac_fn_c_try_link "$LINENO"; then :
17095   pgac_cv_gcc_sync_int32_tas="yes"
17096 else
17097   pgac_cv_gcc_sync_int32_tas="no"
17098 fi
17099 rm -f core conftest.err conftest.$ac_objext \
17100     conftest$ac_exeext conftest.$ac_ext
17101 fi
17102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17103 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17104 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17105
17106 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17107
17108 fi
17109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17110 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17111 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17112   $as_echo_n "(cached) " >&6
17113 else
17114   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17115 /* end confdefs.h.  */
17116
17117 int
17118 main ()
17119 {
17120 int val = 0;
17121    __sync_val_compare_and_swap(&val, 0, 37);
17122   ;
17123   return 0;
17124 }
17125 _ACEOF
17126 if ac_fn_c_try_link "$LINENO"; then :
17127   pgac_cv_gcc_sync_int32_cas="yes"
17128 else
17129   pgac_cv_gcc_sync_int32_cas="no"
17130 fi
17131 rm -f core conftest.err conftest.$ac_objext \
17132     conftest$ac_exeext conftest.$ac_ext
17133 fi
17134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17135 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17136 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17137
17138 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17139
17140 fi
17141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17142 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17143 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17144   $as_echo_n "(cached) " >&6
17145 else
17146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17147 /* end confdefs.h.  */
17148
17149 int
17150 main ()
17151 {
17152 PG_INT64_TYPE lock = 0;
17153    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17154   ;
17155   return 0;
17156 }
17157 _ACEOF
17158 if ac_fn_c_try_link "$LINENO"; then :
17159   pgac_cv_gcc_sync_int64_cas="yes"
17160 else
17161   pgac_cv_gcc_sync_int64_cas="no"
17162 fi
17163 rm -f core conftest.err conftest.$ac_objext \
17164     conftest$ac_exeext conftest.$ac_ext
17165 fi
17166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17167 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17168 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17169
17170 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17171
17172 fi
17173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17174 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17175 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17176   $as_echo_n "(cached) " >&6
17177 else
17178   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17179 /* end confdefs.h.  */
17180
17181 int
17182 main ()
17183 {
17184 int val = 0;
17185    int expect = 0;
17186    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17187   ;
17188   return 0;
17189 }
17190 _ACEOF
17191 if ac_fn_c_try_link "$LINENO"; then :
17192   pgac_cv_gcc_atomic_int32_cas="yes"
17193 else
17194   pgac_cv_gcc_atomic_int32_cas="no"
17195 fi
17196 rm -f core conftest.err conftest.$ac_objext \
17197     conftest$ac_exeext conftest.$ac_ext
17198 fi
17199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17200 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17201 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17202
17203 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17204
17205 fi
17206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17207 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17208 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17209   $as_echo_n "(cached) " >&6
17210 else
17211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17212 /* end confdefs.h.  */
17213
17214 int
17215 main ()
17216 {
17217 PG_INT64_TYPE val = 0;
17218    PG_INT64_TYPE expect = 0;
17219    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17220   ;
17221   return 0;
17222 }
17223 _ACEOF
17224 if ac_fn_c_try_link "$LINENO"; then :
17225   pgac_cv_gcc_atomic_int64_cas="yes"
17226 else
17227   pgac_cv_gcc_atomic_int64_cas="no"
17228 fi
17229 rm -f core conftest.err conftest.$ac_objext \
17230     conftest$ac_exeext conftest.$ac_ext
17231 fi
17232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17233 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17234 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17235
17236 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17237
17238 fi
17239
17240
17241 # Check for x86 cpuid instruction
17242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17243 $as_echo_n "checking for __get_cpuid... " >&6; }
17244 if ${pgac_cv__get_cpuid+:} false; then :
17245   $as_echo_n "(cached) " >&6
17246 else
17247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17248 /* end confdefs.h.  */
17249 #include <cpuid.h>
17250 int
17251 main ()
17252 {
17253 unsigned int exx[4] = {0, 0, 0, 0};
17254   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17255
17256   ;
17257   return 0;
17258 }
17259 _ACEOF
17260 if ac_fn_c_try_link "$LINENO"; then :
17261   pgac_cv__get_cpuid="yes"
17262 else
17263   pgac_cv__get_cpuid="no"
17264 fi
17265 rm -f core conftest.err conftest.$ac_objext \
17266     conftest$ac_exeext conftest.$ac_ext
17267 fi
17268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17269 $as_echo "$pgac_cv__get_cpuid" >&6; }
17270 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17271
17272 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17273
17274 fi
17275
17276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17277 $as_echo_n "checking for __cpuid... " >&6; }
17278 if ${pgac_cv__cpuid+:} false; then :
17279   $as_echo_n "(cached) " >&6
17280 else
17281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17282 /* end confdefs.h.  */
17283 #include <intrin.h>
17284 int
17285 main ()
17286 {
17287 unsigned int exx[4] = {0, 0, 0, 0};
17288   __get_cpuid(exx[0], 1);
17289
17290   ;
17291   return 0;
17292 }
17293 _ACEOF
17294 if ac_fn_c_try_link "$LINENO"; then :
17295   pgac_cv__cpuid="yes"
17296 else
17297   pgac_cv__cpuid="no"
17298 fi
17299 rm -f core conftest.err conftest.$ac_objext \
17300     conftest$ac_exeext conftest.$ac_ext
17301 fi
17302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17303 $as_echo "$pgac_cv__cpuid" >&6; }
17304 if test x"$pgac_cv__cpuid" = x"yes"; then
17305
17306 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17307
17308 fi
17309
17310 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17311 #
17312 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17313 # with the default compiler flags. If not, check if adding the -msse4.2
17314 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17316 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17317 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17318   $as_echo_n "(cached) " >&6
17319 else
17320   pgac_save_CFLAGS=$CFLAGS
17321 CFLAGS="$pgac_save_CFLAGS "
17322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17323 /* end confdefs.h.  */
17324 #include <nmmintrin.h>
17325 int
17326 main ()
17327 {
17328 unsigned int crc = 0;
17329    crc = _mm_crc32_u8(crc, 0);
17330    crc = _mm_crc32_u32(crc, 0);
17331    /* return computed value, to prevent the above being optimized away */
17332    return crc == 0;
17333   ;
17334   return 0;
17335 }
17336 _ACEOF
17337 if ac_fn_c_try_link "$LINENO"; then :
17338   pgac_cv_sse42_crc32_intrinsics_=yes
17339 else
17340   pgac_cv_sse42_crc32_intrinsics_=no
17341 fi
17342 rm -f core conftest.err conftest.$ac_objext \
17343     conftest$ac_exeext conftest.$ac_ext
17344 CFLAGS="$pgac_save_CFLAGS"
17345 fi
17346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17347 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17348 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17349   CFLAGS_SSE42=""
17350   pgac_sse42_crc32_intrinsics=yes
17351 fi
17352
17353 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17354   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17355 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17356 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17357   $as_echo_n "(cached) " >&6
17358 else
17359   pgac_save_CFLAGS=$CFLAGS
17360 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17362 /* end confdefs.h.  */
17363 #include <nmmintrin.h>
17364 int
17365 main ()
17366 {
17367 unsigned int crc = 0;
17368    crc = _mm_crc32_u8(crc, 0);
17369    crc = _mm_crc32_u32(crc, 0);
17370    /* return computed value, to prevent the above being optimized away */
17371    return crc == 0;
17372   ;
17373   return 0;
17374 }
17375 _ACEOF
17376 if ac_fn_c_try_link "$LINENO"; then :
17377   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17378 else
17379   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17380 fi
17381 rm -f core conftest.err conftest.$ac_objext \
17382     conftest$ac_exeext conftest.$ac_ext
17383 CFLAGS="$pgac_save_CFLAGS"
17384 fi
17385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17386 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17387 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17388   CFLAGS_SSE42="-msse4.2"
17389   pgac_sse42_crc32_intrinsics=yes
17390 fi
17391
17392 fi
17393
17394
17395 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17396 # define __SSE4_2__ in that case.
17397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17398 /* end confdefs.h.  */
17399
17400 int
17401 main ()
17402 {
17403
17404 #ifndef __SSE4_2__
17405 #error __SSE4_2__ not defined
17406 #endif
17407
17408   ;
17409   return 0;
17410 }
17411 _ACEOF
17412 if ac_fn_c_try_compile "$LINENO"; then :
17413   SSE4_2_TARGETED=1
17414 fi
17415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17416
17417 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17418 #
17419 # First check if __crc32c* intrinsics can be used with the default compiler
17420 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17421 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17423 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17424 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17425   $as_echo_n "(cached) " >&6
17426 else
17427   pgac_save_CFLAGS=$CFLAGS
17428 CFLAGS="$pgac_save_CFLAGS "
17429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17430 /* end confdefs.h.  */
17431 #include <arm_acle.h>
17432 int
17433 main ()
17434 {
17435 unsigned int crc = 0;
17436    crc = __crc32cb(crc, 0);
17437    crc = __crc32ch(crc, 0);
17438    crc = __crc32cw(crc, 0);
17439    crc = __crc32cd(crc, 0);
17440    /* return computed value, to prevent the above being optimized away */
17441    return crc == 0;
17442   ;
17443   return 0;
17444 }
17445 _ACEOF
17446 if ac_fn_c_try_link "$LINENO"; then :
17447   pgac_cv_armv8_crc32c_intrinsics_=yes
17448 else
17449   pgac_cv_armv8_crc32c_intrinsics_=no
17450 fi
17451 rm -f core conftest.err conftest.$ac_objext \
17452     conftest$ac_exeext conftest.$ac_ext
17453 CFLAGS="$pgac_save_CFLAGS"
17454 fi
17455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17456 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17457 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17458   CFLAGS_ARMV8_CRC32C=""
17459   pgac_armv8_crc32c_intrinsics=yes
17460 fi
17461
17462 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17463   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17464 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17465 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17466   $as_echo_n "(cached) " >&6
17467 else
17468   pgac_save_CFLAGS=$CFLAGS
17469 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17471 /* end confdefs.h.  */
17472 #include <arm_acle.h>
17473 int
17474 main ()
17475 {
17476 unsigned int crc = 0;
17477    crc = __crc32cb(crc, 0);
17478    crc = __crc32ch(crc, 0);
17479    crc = __crc32cw(crc, 0);
17480    crc = __crc32cd(crc, 0);
17481    /* return computed value, to prevent the above being optimized away */
17482    return crc == 0;
17483   ;
17484   return 0;
17485 }
17486 _ACEOF
17487 if ac_fn_c_try_link "$LINENO"; then :
17488   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17489 else
17490   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17491 fi
17492 rm -f core conftest.err conftest.$ac_objext \
17493     conftest$ac_exeext conftest.$ac_ext
17494 CFLAGS="$pgac_save_CFLAGS"
17495 fi
17496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17497 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17498 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17499   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17500   pgac_armv8_crc32c_intrinsics=yes
17501 fi
17502
17503 fi
17504
17505
17506 # Select CRC-32C implementation.
17507 #
17508 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17509 # use the special CRC instructions for calculating CRC-32C. If we're not
17510 # targeting such a processor, but we can nevertheless produce code that uses
17511 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17512 # implementations and select which one to use at runtime, depending on whether
17513 # SSE 4.2 is supported by the processor we're running on.
17514 #
17515 # Similarly, if we are targeting an ARM processor that has the CRC
17516 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17517 # we're not targeting such a processor, but can nevertheless produce code that
17518 # uses the CRC instructions, compile both, and select at runtime.
17519 #
17520 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17521 # in the template or configure command line.
17522 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
17523   # Use Intel SSE 4.2 if available.
17524   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17525     USE_SSE42_CRC32C=1
17526   else
17527     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17528     # the runtime check.
17529     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
17530       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17531     else
17532       # Use ARM CRC Extension if available.
17533       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17534         USE_ARMV8_CRC32C=1
17535       else
17536         # ARM CRC Extension, with runtime check?
17537         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17538           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17539         else
17540           # fall back to slicing-by-8 algorithm, which doesn't require any
17541           # special CPU support.
17542           USE_SLICING_BY_8_CRC32C=1
17543         fi
17544       fi
17545     fi
17546   fi
17547 fi
17548
17549 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17551 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17552 if test x"$USE_SSE42_CRC32C" = x"1"; then
17553
17554 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17555
17556   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17558 $as_echo "SSE 4.2" >&6; }
17559 else
17560   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17561
17562 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17563
17564     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17565     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17566 $as_echo "SSE 4.2 with runtime check" >&6; }
17567   else
17568     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17569
17570 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17571
17572       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17573       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17574 $as_echo "ARMv8 CRC instructions" >&6; }
17575     else
17576       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17577
17578 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17579
17580         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17581         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17582 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17583       else
17584
17585 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17586
17587         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17588         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17589 $as_echo "slicing-by-8" >&6; }
17590       fi
17591     fi
17592   fi
17593 fi
17594
17595
17596
17597 # Select semaphore implementation type.
17598 if test "$PORTNAME" != "win32"; then
17599   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17600     # Need sem_open for this
17601     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17602 $as_echo_n "checking for library containing sem_open... " >&6; }
17603 if ${ac_cv_search_sem_open+:} false; then :
17604   $as_echo_n "(cached) " >&6
17605 else
17606   ac_func_search_save_LIBS=$LIBS
17607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17608 /* end confdefs.h.  */
17609
17610 /* Override any GCC internal prototype to avoid an error.
17611    Use char because int might match the return type of a GCC
17612    builtin and then its argument prototype would still apply.  */
17613 #ifdef __cplusplus
17614 extern "C"
17615 #endif
17616 char sem_open ();
17617 int
17618 main ()
17619 {
17620 return sem_open ();
17621   ;
17622   return 0;
17623 }
17624 _ACEOF
17625 for ac_lib in '' rt pthread; do
17626   if test -z "$ac_lib"; then
17627     ac_res="none required"
17628   else
17629     ac_res=-l$ac_lib
17630     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17631   fi
17632   if ac_fn_c_try_link "$LINENO"; then :
17633   ac_cv_search_sem_open=$ac_res
17634 fi
17635 rm -f core conftest.err conftest.$ac_objext \
17636     conftest$ac_exeext
17637   if ${ac_cv_search_sem_open+:} false; then :
17638   break
17639 fi
17640 done
17641 if ${ac_cv_search_sem_open+:} false; then :
17642
17643 else
17644   ac_cv_search_sem_open=no
17645 fi
17646 rm conftest.$ac_ext
17647 LIBS=$ac_func_search_save_LIBS
17648 fi
17649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17650 $as_echo "$ac_cv_search_sem_open" >&6; }
17651 ac_res=$ac_cv_search_sem_open
17652 if test "$ac_res" != no; then :
17653   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17654   USE_NAMED_POSIX_SEMAPHORES=1
17655 fi
17656
17657   fi
17658   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17659     # Need sem_init for this
17660     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17661 $as_echo_n "checking for library containing sem_init... " >&6; }
17662 if ${ac_cv_search_sem_init+:} false; then :
17663   $as_echo_n "(cached) " >&6
17664 else
17665   ac_func_search_save_LIBS=$LIBS
17666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17667 /* end confdefs.h.  */
17668
17669 /* Override any GCC internal prototype to avoid an error.
17670    Use char because int might match the return type of a GCC
17671    builtin and then its argument prototype would still apply.  */
17672 #ifdef __cplusplus
17673 extern "C"
17674 #endif
17675 char sem_init ();
17676 int
17677 main ()
17678 {
17679 return sem_init ();
17680   ;
17681   return 0;
17682 }
17683 _ACEOF
17684 for ac_lib in '' rt pthread; do
17685   if test -z "$ac_lib"; then
17686     ac_res="none required"
17687   else
17688     ac_res=-l$ac_lib
17689     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17690   fi
17691   if ac_fn_c_try_link "$LINENO"; then :
17692   ac_cv_search_sem_init=$ac_res
17693 fi
17694 rm -f core conftest.err conftest.$ac_objext \
17695     conftest$ac_exeext
17696   if ${ac_cv_search_sem_init+:} false; then :
17697   break
17698 fi
17699 done
17700 if ${ac_cv_search_sem_init+:} false; then :
17701
17702 else
17703   ac_cv_search_sem_init=no
17704 fi
17705 rm conftest.$ac_ext
17706 LIBS=$ac_func_search_save_LIBS
17707 fi
17708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17709 $as_echo "$ac_cv_search_sem_init" >&6; }
17710 ac_res=$ac_cv_search_sem_init
17711 if test "$ac_res" != no; then :
17712   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17713   USE_UNNAMED_POSIX_SEMAPHORES=1
17714 fi
17715
17716   fi
17717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17718 $as_echo_n "checking which semaphore API to use... " >&6; }
17719   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17720
17721 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17722
17723     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17724     sematype="named POSIX"
17725   else
17726     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17727
17728 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17729
17730       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17731       sematype="unnamed POSIX"
17732     else
17733
17734 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17735
17736       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17737       sematype="System V"
17738     fi
17739   fi
17740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17741 $as_echo "$sematype" >&6; }
17742 else
17743
17744 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17745
17746   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17747 fi
17748
17749
17750 # Select shared-memory implementation type.
17751 if test "$PORTNAME" != "win32"; then
17752
17753 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17754
17755   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17756 else
17757
17758 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17759
17760   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17761 fi
17762
17763 # Select random number source
17764 #
17765 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17766 # in the template or configure command line.
17767
17768 # If not selected manually, try to select a source automatically.
17769 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
17770   if test x"$with_openssl" = x"yes" ; then
17771     USE_OPENSSL_RANDOM=1
17772   elif test "$PORTNAME" = "win32" ; then
17773     USE_WIN32_RANDOM=1
17774   else
17775     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17776 $as_echo_n "checking for /dev/urandom... " >&6; }
17777 if ${ac_cv_file__dev_urandom+:} false; then :
17778   $as_echo_n "(cached) " >&6
17779 else
17780   test "$cross_compiling" = yes &&
17781   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17782 if test -r "/dev/urandom"; then
17783   ac_cv_file__dev_urandom=yes
17784 else
17785   ac_cv_file__dev_urandom=no
17786 fi
17787 fi
17788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17789 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17790 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17791
17792 fi
17793
17794
17795     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17796       USE_DEV_URANDOM=1
17797     fi
17798   fi
17799 fi
17800
17801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17802 $as_echo_n "checking which random number source to use... " >&6; }
17803 if test "$enable_strong_random" = yes ; then
17804   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17805
17806 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17807
17808     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17809 $as_echo "OpenSSL" >&6; }
17810   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
17811
17812 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
17813
17814     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17815 $as_echo "Windows native" >&6; }
17816   elif test x"$USE_DEV_URANDOM" = x"1" ; then
17817
17818 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
17819
17820     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17821 $as_echo "/dev/urandom" >&6; }
17822   else
17823     as_fn_error $? "
17824 no source of strong random numbers was found
17825 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
17826 for authentication protocols. You can use --disable-strong-random to use a
17827 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
17828   fi
17829
17830 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
17831
17832 else
17833     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
17834 $as_echo "weak builtin PRNG" >&6; }
17835     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17836 *** Not using a strong random number source may be insecure." >&5
17837 $as_echo "$as_me: WARNING:
17838 *** Not using a strong random number source may be insecure." >&2;}
17839 fi
17840
17841 # If not set in template file, set bytes to use libc memset()
17842 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17843   MEMSET_LOOP_LIMIT=1024
17844 fi
17845
17846 cat >>confdefs.h <<_ACEOF
17847 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17848 _ACEOF
17849
17850
17851
17852 if test "$enable_nls" = yes ; then
17853
17854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17855 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17856 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17857   $as_echo_n "(cached) " >&6
17858 else
17859   ac_func_search_save_LIBS=$LIBS
17860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17861 /* end confdefs.h.  */
17862
17863 /* Override any GCC internal prototype to avoid an error.
17864    Use char because int might match the return type of a GCC
17865    builtin and then its argument prototype would still apply.  */
17866 #ifdef __cplusplus
17867 extern "C"
17868 #endif
17869 char bind_textdomain_codeset ();
17870 int
17871 main ()
17872 {
17873 return bind_textdomain_codeset ();
17874   ;
17875   return 0;
17876 }
17877 _ACEOF
17878 for ac_lib in '' intl; do
17879   if test -z "$ac_lib"; then
17880     ac_res="none required"
17881   else
17882     ac_res=-l$ac_lib
17883     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17884   fi
17885   if ac_fn_c_try_link "$LINENO"; then :
17886   ac_cv_search_bind_textdomain_codeset=$ac_res
17887 fi
17888 rm -f core conftest.err conftest.$ac_objext \
17889     conftest$ac_exeext
17890   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17891   break
17892 fi
17893 done
17894 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17895
17896 else
17897   ac_cv_search_bind_textdomain_codeset=no
17898 fi
17899 rm conftest.$ac_ext
17900 LIBS=$ac_func_search_save_LIBS
17901 fi
17902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
17903 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
17904 ac_res=$ac_cv_search_bind_textdomain_codeset
17905 if test "$ac_res" != no; then :
17906   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17907
17908 else
17909   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
17910 fi
17911
17912   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
17913 if test "x$ac_cv_header_libintl_h" = xyes; then :
17914
17915 else
17916   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
17917 fi
17918
17919
17920   if test -z "$MSGFMT"; then
17921   for ac_prog in msgfmt
17922 do
17923   # Extract the first word of "$ac_prog", so it can be a program name with args.
17924 set dummy $ac_prog; ac_word=$2
17925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17926 $as_echo_n "checking for $ac_word... " >&6; }
17927 if ${ac_cv_path_MSGFMT+:} false; then :
17928   $as_echo_n "(cached) " >&6
17929 else
17930   case $MSGFMT in
17931   [\\/]* | ?:[\\/]*)
17932   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
17933   ;;
17934   *)
17935   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17936 for as_dir in $PATH
17937 do
17938   IFS=$as_save_IFS
17939   test -z "$as_dir" && as_dir=.
17940     for ac_exec_ext in '' $ac_executable_extensions; do
17941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17942     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
17943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17944     break 2
17945   fi
17946 done
17947   done
17948 IFS=$as_save_IFS
17949
17950   ;;
17951 esac
17952 fi
17953 MSGFMT=$ac_cv_path_MSGFMT
17954 if test -n "$MSGFMT"; then
17955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17956 $as_echo "$MSGFMT" >&6; }
17957 else
17958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17959 $as_echo "no" >&6; }
17960 fi
17961
17962
17963   test -n "$MSGFMT" && break
17964 done
17965
17966 else
17967   # Report the value of MSGFMT in configure's output in all cases.
17968   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
17969 $as_echo_n "checking for MSGFMT... " >&6; }
17970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17971 $as_echo "$MSGFMT" >&6; }
17972 fi
17973
17974   if test -z "$MSGFMT"; then
17975     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
17976   fi
17977   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
17978 $as_echo_n "checking for msgfmt flags... " >&6; }
17979 if ${pgac_cv_msgfmt_flags+:} false; then :
17980   $as_echo_n "(cached) " >&6
17981 else
17982   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
17983     pgac_cv_msgfmt_flags=-c
17984 fi
17985 fi
17986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
17987 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
17988   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
17989
17990   if test -z "$MSGMERGE"; then
17991   for ac_prog in msgmerge
17992 do
17993   # Extract the first word of "$ac_prog", so it can be a program name with args.
17994 set dummy $ac_prog; ac_word=$2
17995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17996 $as_echo_n "checking for $ac_word... " >&6; }
17997 if ${ac_cv_path_MSGMERGE+:} false; then :
17998   $as_echo_n "(cached) " >&6
17999 else
18000   case $MSGMERGE in
18001   [\\/]* | ?:[\\/]*)
18002   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18003   ;;
18004   *)
18005   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18006 for as_dir in $PATH
18007 do
18008   IFS=$as_save_IFS
18009   test -z "$as_dir" && as_dir=.
18010     for ac_exec_ext in '' $ac_executable_extensions; do
18011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18012     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18014     break 2
18015   fi
18016 done
18017   done
18018 IFS=$as_save_IFS
18019
18020   ;;
18021 esac
18022 fi
18023 MSGMERGE=$ac_cv_path_MSGMERGE
18024 if test -n "$MSGMERGE"; then
18025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18026 $as_echo "$MSGMERGE" >&6; }
18027 else
18028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18029 $as_echo "no" >&6; }
18030 fi
18031
18032
18033   test -n "$MSGMERGE" && break
18034 done
18035
18036 else
18037   # Report the value of MSGMERGE in configure's output in all cases.
18038   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18039 $as_echo_n "checking for MSGMERGE... " >&6; }
18040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18041 $as_echo "$MSGMERGE" >&6; }
18042 fi
18043
18044   if test -z "$XGETTEXT"; then
18045   for ac_prog in xgettext
18046 do
18047   # Extract the first word of "$ac_prog", so it can be a program name with args.
18048 set dummy $ac_prog; ac_word=$2
18049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18050 $as_echo_n "checking for $ac_word... " >&6; }
18051 if ${ac_cv_path_XGETTEXT+:} false; then :
18052   $as_echo_n "(cached) " >&6
18053 else
18054   case $XGETTEXT in
18055   [\\/]* | ?:[\\/]*)
18056   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18057   ;;
18058   *)
18059   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18060 for as_dir in $PATH
18061 do
18062   IFS=$as_save_IFS
18063   test -z "$as_dir" && as_dir=.
18064     for ac_exec_ext in '' $ac_executable_extensions; do
18065   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18066     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18067     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18068     break 2
18069   fi
18070 done
18071   done
18072 IFS=$as_save_IFS
18073
18074   ;;
18075 esac
18076 fi
18077 XGETTEXT=$ac_cv_path_XGETTEXT
18078 if test -n "$XGETTEXT"; then
18079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18080 $as_echo "$XGETTEXT" >&6; }
18081 else
18082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18083 $as_echo "no" >&6; }
18084 fi
18085
18086
18087   test -n "$XGETTEXT" && break
18088 done
18089
18090 else
18091   # Report the value of XGETTEXT in configure's output in all cases.
18092   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18093 $as_echo_n "checking for XGETTEXT... " >&6; }
18094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18095 $as_echo "$XGETTEXT" >&6; }
18096 fi
18097
18098
18099 fi
18100
18101 # Check for Tcl configuration script tclConfig.sh
18102 if test "$with_tcl" = yes; then
18103     if test -z "$TCLSH"; then
18104   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18105 do
18106   # Extract the first word of "$ac_prog", so it can be a program name with args.
18107 set dummy $ac_prog; ac_word=$2
18108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18109 $as_echo_n "checking for $ac_word... " >&6; }
18110 if ${ac_cv_path_TCLSH+:} false; then :
18111   $as_echo_n "(cached) " >&6
18112 else
18113   case $TCLSH in
18114   [\\/]* | ?:[\\/]*)
18115   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18116   ;;
18117   *)
18118   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18119 for as_dir in $PATH
18120 do
18121   IFS=$as_save_IFS
18122   test -z "$as_dir" && as_dir=.
18123     for ac_exec_ext in '' $ac_executable_extensions; do
18124   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18125     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18127     break 2
18128   fi
18129 done
18130   done
18131 IFS=$as_save_IFS
18132
18133   ;;
18134 esac
18135 fi
18136 TCLSH=$ac_cv_path_TCLSH
18137 if test -n "$TCLSH"; then
18138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18139 $as_echo "$TCLSH" >&6; }
18140 else
18141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18142 $as_echo "no" >&6; }
18143 fi
18144
18145
18146   test -n "$TCLSH" && break
18147 done
18148
18149 else
18150   # Report the value of TCLSH in configure's output in all cases.
18151   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18152 $as_echo_n "checking for TCLSH... " >&6; }
18153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18154 $as_echo "$TCLSH" >&6; }
18155 fi
18156
18157 if test x"$TCLSH" = x""; then
18158   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18159 fi
18160
18161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18162 $as_echo_n "checking for tclConfig.sh... " >&6; }
18163 # Let user override test
18164 if test -z "$TCL_CONFIG_SH"; then
18165     pgac_test_dirs="$with_tclconfig"
18166
18167     set X $pgac_test_dirs; shift
18168     if test $# -eq 0; then
18169         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18170         pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18171         # On newer macOS, $auto_path frequently doesn't include the place
18172         # where tclConfig.sh actually lives.  Append that to the end, so as not
18173         # to break cases where a non-default Tcl installation is being used.
18174         if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18175             pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18176         fi
18177         set X $pgac_test_dirs; shift
18178     fi
18179
18180     for pgac_dir do
18181         if test -r "$pgac_dir/tclConfig.sh"; then
18182             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18183             break
18184         fi
18185     done
18186 fi
18187
18188 if test -z "$TCL_CONFIG_SH"; then
18189     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18190 $as_echo "no" >&6; }
18191     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18192 else
18193     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18194 $as_echo "$TCL_CONFIG_SH" >&6; }
18195 fi
18196
18197
18198
18199     . "$TCL_CONFIG_SH"
18200 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18201 eval TCL_LIBS=\"$TCL_LIBS\"
18202 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18203 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18204
18205         if test "$TCL_SHARED_BUILD" != 1; then
18206       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18207 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18208     fi
18209     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18210     ac_save_CPPFLAGS=$CPPFLAGS
18211     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18212     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18213 if test "x$ac_cv_header_tcl_h" = xyes; then :
18214
18215 else
18216   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18217 fi
18218
18219
18220     CPPFLAGS=$ac_save_CPPFLAGS
18221 fi
18222
18223 # check for <perl.h>
18224 if test "$with_perl" = yes; then
18225   ac_save_CPPFLAGS=$CPPFLAGS
18226   CPPFLAGS="$CPPFLAGS $perl_includespec"
18227   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18228 "
18229 if test "x$ac_cv_header_perl_h" = xyes; then :
18230
18231 else
18232   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18233 fi
18234
18235
18236   # While we're at it, check that we can link to libperl.
18237   # On most platforms, if perl.h is there then libperl.so will be too, but at
18238   # this writing Debian packages them separately.  There is no known reason to
18239   # waste cycles on separate probes for the Tcl or Python libraries, though.
18240   pgac_save_LIBS=$LIBS
18241   LIBS="$perl_embed_ldflags"
18242   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18243 $as_echo_n "checking for libperl... " >&6; }
18244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18245 /* end confdefs.h.  */
18246
18247 #include <EXTERN.h>
18248 #include <perl.h>
18249
18250 int
18251 main ()
18252 {
18253 perl_alloc();
18254   ;
18255   return 0;
18256 }
18257 _ACEOF
18258 if ac_fn_c_try_link "$LINENO"; then :
18259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18260 $as_echo "yes" >&6; }
18261 else
18262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18263 $as_echo "no" >&6; }
18264      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18265 fi
18266 rm -f core conftest.err conftest.$ac_objext \
18267     conftest$ac_exeext conftest.$ac_ext
18268   LIBS=$pgac_save_LIBS
18269   CPPFLAGS=$ac_save_CPPFLAGS
18270 fi
18271
18272 # check for <Python.h>
18273 if test "$with_python" = yes; then
18274   ac_save_CPPFLAGS=$CPPFLAGS
18275   CPPFLAGS="$python_includespec $CPPFLAGS"
18276   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18277 if test "x$ac_cv_header_Python_h" = xyes; then :
18278
18279 else
18280   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18281 fi
18282
18283
18284   CPPFLAGS=$ac_save_CPPFLAGS
18285 fi
18286
18287 #
18288 # Check for DocBook and tools
18289 #
18290 if test -z "$XMLLINT"; then
18291   for ac_prog in xmllint
18292 do
18293   # Extract the first word of "$ac_prog", so it can be a program name with args.
18294 set dummy $ac_prog; ac_word=$2
18295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18296 $as_echo_n "checking for $ac_word... " >&6; }
18297 if ${ac_cv_path_XMLLINT+:} false; then :
18298   $as_echo_n "(cached) " >&6
18299 else
18300   case $XMLLINT in
18301   [\\/]* | ?:[\\/]*)
18302   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18303   ;;
18304   *)
18305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18306 for as_dir in $PATH
18307 do
18308   IFS=$as_save_IFS
18309   test -z "$as_dir" && as_dir=.
18310     for ac_exec_ext in '' $ac_executable_extensions; do
18311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18312     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18314     break 2
18315   fi
18316 done
18317   done
18318 IFS=$as_save_IFS
18319
18320   ;;
18321 esac
18322 fi
18323 XMLLINT=$ac_cv_path_XMLLINT
18324 if test -n "$XMLLINT"; then
18325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18326 $as_echo "$XMLLINT" >&6; }
18327 else
18328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18329 $as_echo "no" >&6; }
18330 fi
18331
18332
18333   test -n "$XMLLINT" && break
18334 done
18335
18336 else
18337   # Report the value of XMLLINT in configure's output in all cases.
18338   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18339 $as_echo_n "checking for XMLLINT... " >&6; }
18340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18341 $as_echo "$XMLLINT" >&6; }
18342 fi
18343
18344
18345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18346 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18347 if ${pgac_cv_check_docbook+:} false; then :
18348   $as_echo_n "(cached) " >&6
18349 else
18350   cat >conftest.xml <<EOF
18351 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18352 <book>
18353  <title>test</title>
18354  <chapter>
18355   <title>random</title>
18356    <sect1>
18357     <title>testsect</title>
18358     <para>text</para>
18359   </sect1>
18360  </chapter>
18361 </book>
18362 EOF
18363
18364 pgac_cv_check_docbook=no
18365
18366 if test -n "$XMLLINT"; then
18367   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18368   if test $? -eq 0; then
18369     pgac_cv_check_docbook=yes
18370   fi
18371 fi
18372 rm -f conftest.xml
18373 fi
18374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18375 $as_echo "$pgac_cv_check_docbook" >&6; }
18376
18377 have_docbook=$pgac_cv_check_docbook
18378
18379
18380 if test -z "$DBTOEPUB"; then
18381   for ac_prog in dbtoepub
18382 do
18383   # Extract the first word of "$ac_prog", so it can be a program name with args.
18384 set dummy $ac_prog; ac_word=$2
18385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18386 $as_echo_n "checking for $ac_word... " >&6; }
18387 if ${ac_cv_path_DBTOEPUB+:} false; then :
18388   $as_echo_n "(cached) " >&6
18389 else
18390   case $DBTOEPUB in
18391   [\\/]* | ?:[\\/]*)
18392   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18393   ;;
18394   *)
18395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18396 for as_dir in $PATH
18397 do
18398   IFS=$as_save_IFS
18399   test -z "$as_dir" && as_dir=.
18400     for ac_exec_ext in '' $ac_executable_extensions; do
18401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18402     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18404     break 2
18405   fi
18406 done
18407   done
18408 IFS=$as_save_IFS
18409
18410   ;;
18411 esac
18412 fi
18413 DBTOEPUB=$ac_cv_path_DBTOEPUB
18414 if test -n "$DBTOEPUB"; then
18415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18416 $as_echo "$DBTOEPUB" >&6; }
18417 else
18418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18419 $as_echo "no" >&6; }
18420 fi
18421
18422
18423   test -n "$DBTOEPUB" && break
18424 done
18425
18426 else
18427   # Report the value of DBTOEPUB in configure's output in all cases.
18428   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18429 $as_echo_n "checking for DBTOEPUB... " >&6; }
18430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18431 $as_echo "$DBTOEPUB" >&6; }
18432 fi
18433
18434 if test -z "$XSLTPROC"; then
18435   for ac_prog in xsltproc
18436 do
18437   # Extract the first word of "$ac_prog", so it can be a program name with args.
18438 set dummy $ac_prog; ac_word=$2
18439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18440 $as_echo_n "checking for $ac_word... " >&6; }
18441 if ${ac_cv_path_XSLTPROC+:} false; then :
18442   $as_echo_n "(cached) " >&6
18443 else
18444   case $XSLTPROC in
18445   [\\/]* | ?:[\\/]*)
18446   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18447   ;;
18448   *)
18449   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18450 for as_dir in $PATH
18451 do
18452   IFS=$as_save_IFS
18453   test -z "$as_dir" && as_dir=.
18454     for ac_exec_ext in '' $ac_executable_extensions; do
18455   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18456     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18458     break 2
18459   fi
18460 done
18461   done
18462 IFS=$as_save_IFS
18463
18464   ;;
18465 esac
18466 fi
18467 XSLTPROC=$ac_cv_path_XSLTPROC
18468 if test -n "$XSLTPROC"; then
18469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18470 $as_echo "$XSLTPROC" >&6; }
18471 else
18472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18473 $as_echo "no" >&6; }
18474 fi
18475
18476
18477   test -n "$XSLTPROC" && break
18478 done
18479
18480 else
18481   # Report the value of XSLTPROC in configure's output in all cases.
18482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18483 $as_echo_n "checking for XSLTPROC... " >&6; }
18484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18485 $as_echo "$XSLTPROC" >&6; }
18486 fi
18487
18488 if test -z "$FOP"; then
18489   for ac_prog in fop
18490 do
18491   # Extract the first word of "$ac_prog", so it can be a program name with args.
18492 set dummy $ac_prog; ac_word=$2
18493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18494 $as_echo_n "checking for $ac_word... " >&6; }
18495 if ${ac_cv_path_FOP+:} false; then :
18496   $as_echo_n "(cached) " >&6
18497 else
18498   case $FOP in
18499   [\\/]* | ?:[\\/]*)
18500   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18501   ;;
18502   *)
18503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18504 for as_dir in $PATH
18505 do
18506   IFS=$as_save_IFS
18507   test -z "$as_dir" && as_dir=.
18508     for ac_exec_ext in '' $ac_executable_extensions; do
18509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18510     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18512     break 2
18513   fi
18514 done
18515   done
18516 IFS=$as_save_IFS
18517
18518   ;;
18519 esac
18520 fi
18521 FOP=$ac_cv_path_FOP
18522 if test -n "$FOP"; then
18523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18524 $as_echo "$FOP" >&6; }
18525 else
18526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18527 $as_echo "no" >&6; }
18528 fi
18529
18530
18531   test -n "$FOP" && break
18532 done
18533
18534 else
18535   # Report the value of FOP in configure's output in all cases.
18536   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18537 $as_echo_n "checking for FOP... " >&6; }
18538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18539 $as_echo "$FOP" >&6; }
18540 fi
18541
18542
18543 #
18544 # Check for test tools
18545 #
18546 if test "$enable_tap_tests" = yes; then
18547   # Check for necessary modules, unless user has specified the "prove" to use;
18548   # in that case it's her responsibility to have a working configuration.
18549   # (prove might be part of a different Perl installation than perl, eg on
18550   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18551   if test -z "$PROVE"; then
18552     # Test::More and Time::HiRes are supposed to be part of core Perl,
18553     # but some distros omit them in a minimal installation.
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564 # Make sure we have perl
18565 if test -z "$PERL"; then
18566 # Extract the first word of "perl", so it can be a program name with args.
18567 set dummy perl; ac_word=$2
18568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18569 $as_echo_n "checking for $ac_word... " >&6; }
18570 if ${ac_cv_prog_PERL+:} false; then :
18571   $as_echo_n "(cached) " >&6
18572 else
18573   if test -n "$PERL"; then
18574   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18575 else
18576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18577 for as_dir in $PATH
18578 do
18579   IFS=$as_save_IFS
18580   test -z "$as_dir" && as_dir=.
18581     for ac_exec_ext in '' $ac_executable_extensions; do
18582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18583     ac_cv_prog_PERL="perl"
18584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18585     break 2
18586   fi
18587 done
18588   done
18589 IFS=$as_save_IFS
18590
18591 fi
18592 fi
18593 PERL=$ac_cv_prog_PERL
18594 if test -n "$PERL"; then
18595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18596 $as_echo "$PERL" >&6; }
18597 else
18598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18599 $as_echo "no" >&6; }
18600 fi
18601
18602
18603 fi
18604
18605 if test "x$PERL" != x; then
18606   ax_perl_modules_failed=0
18607   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18608     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18609 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18610
18611     # Would be nice to log result here, but can't rely on autoconf internals
18612     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18613     if test $? -ne 0; then
18614       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18615 $as_echo "no" >&6; };
18616       ax_perl_modules_failed=1
18617    else
18618       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18619 $as_echo "ok" >&6; };
18620     fi
18621   done
18622
18623   # Run optional shell commands
18624   if test "$ax_perl_modules_failed" = 0; then
18625     :
18626
18627   else
18628     :
18629     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18630   fi
18631 else
18632   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18633 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18634 fi
18635   fi
18636   # Now make sure we know where prove is
18637   if test -z "$PROVE"; then
18638   for ac_prog in prove
18639 do
18640   # Extract the first word of "$ac_prog", so it can be a program name with args.
18641 set dummy $ac_prog; ac_word=$2
18642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18643 $as_echo_n "checking for $ac_word... " >&6; }
18644 if ${ac_cv_path_PROVE+:} false; then :
18645   $as_echo_n "(cached) " >&6
18646 else
18647   case $PROVE in
18648   [\\/]* | ?:[\\/]*)
18649   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18650   ;;
18651   *)
18652   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18653 for as_dir in $PATH
18654 do
18655   IFS=$as_save_IFS
18656   test -z "$as_dir" && as_dir=.
18657     for ac_exec_ext in '' $ac_executable_extensions; do
18658   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18659     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18660     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18661     break 2
18662   fi
18663 done
18664   done
18665 IFS=$as_save_IFS
18666
18667   ;;
18668 esac
18669 fi
18670 PROVE=$ac_cv_path_PROVE
18671 if test -n "$PROVE"; then
18672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18673 $as_echo "$PROVE" >&6; }
18674 else
18675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18676 $as_echo "no" >&6; }
18677 fi
18678
18679
18680   test -n "$PROVE" && break
18681 done
18682
18683 else
18684   # Report the value of PROVE in configure's output in all cases.
18685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18686 $as_echo_n "checking for PROVE... " >&6; }
18687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18688 $as_echo "$PROVE" >&6; }
18689 fi
18690
18691   if test -z "$PROVE"; then
18692     as_fn_error $? "prove not found" "$LINENO" 5
18693   fi
18694 fi
18695
18696 # Thread testing
18697
18698 # We have to run the thread test near the end so we have all our symbols
18699 # defined.  Cross compiling throws a warning.
18700 #
18701 if test "$enable_thread_safety" = yes; then
18702 if test "$PORTNAME" != "win32"
18703 then
18704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18705 $as_echo_n "checking thread safety of required library functions... " >&6; }
18706
18707 _CFLAGS="$CFLAGS"
18708 _LIBS="$LIBS"
18709 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18710 LIBS="$LIBS $PTHREAD_LIBS"
18711 if test "$cross_compiling" = yes; then :
18712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18713 $as_echo "maybe" >&6; }
18714   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18715 *** Skipping thread test program because of cross-compile build.
18716 *** Run the program in src/test/thread on the target machine.
18717 " >&5
18718 $as_echo "$as_me: WARNING:
18719 *** Skipping thread test program because of cross-compile build.
18720 *** Run the program in src/test/thread on the target machine.
18721 " >&2;}
18722 else
18723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18724 /* end confdefs.h.  */
18725 #include "$srcdir/src/test/thread/thread_test.c"
18726 _ACEOF
18727 if ac_fn_c_try_run "$LINENO"; then :
18728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18729 $as_echo "yes" >&6; }
18730 else
18731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18732 $as_echo "no" >&6; }
18733   as_fn_error $? "thread test program failed
18734 This platform is not thread-safe.  Check the file 'config.log' or compile
18735 and run src/test/thread/thread_test for the exact reason.
18736 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18737 fi
18738 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18739   conftest.$ac_objext conftest.beam conftest.$ac_ext
18740 fi
18741
18742 CFLAGS="$_CFLAGS"
18743 LIBS="$_LIBS"
18744 else
18745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18746 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18747 fi
18748 fi
18749
18750 # If compiler will take -Wl,--as-needed (or various platform-specific
18751 # spellings thereof) then add that to LDFLAGS.  This is much easier than
18752 # trying to filter LIBS to the minimum for each executable.
18753 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18754 # libreadline; therefore we postpone testing it until we know what library
18755 # dependencies readline has.  The test code will try to link with $LIBS.
18756 if test "$with_readline" = yes; then
18757   link_test_func=readline
18758 else
18759   link_test_func=exit
18760 fi
18761
18762 if test "$PORTNAME" = "darwin"; then
18763   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18764 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18765 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18766   $as_echo_n "(cached) " >&6
18767 else
18768   pgac_save_LDFLAGS=$LDFLAGS
18769 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18770 if test "$cross_compiling" = yes; then :
18771   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18772 else
18773   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18774 /* end confdefs.h.  */
18775 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18776 int
18777 main ()
18778 {
18779
18780   ;
18781   return 0;
18782 }
18783 _ACEOF
18784 if ac_fn_c_try_run "$LINENO"; then :
18785   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18786 else
18787   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18788 fi
18789 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18790   conftest.$ac_objext conftest.beam conftest.$ac_ext
18791 fi
18792
18793 LDFLAGS="$pgac_save_LDFLAGS"
18794 fi
18795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18796 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18797 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18798   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18799 fi
18800
18801 elif test "$PORTNAME" = "openbsd"; then
18802   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18803 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18804 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18805   $as_echo_n "(cached) " >&6
18806 else
18807   pgac_save_LDFLAGS=$LDFLAGS
18808 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18809 if test "$cross_compiling" = yes; then :
18810   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18811 else
18812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18813 /* end confdefs.h.  */
18814 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18815 int
18816 main ()
18817 {
18818
18819   ;
18820   return 0;
18821 }
18822 _ACEOF
18823 if ac_fn_c_try_run "$LINENO"; then :
18824   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
18825 else
18826   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
18827 fi
18828 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18829   conftest.$ac_objext conftest.beam conftest.$ac_ext
18830 fi
18831
18832 LDFLAGS="$pgac_save_LDFLAGS"
18833 fi
18834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
18835 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
18836 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
18837   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
18838 fi
18839
18840 else
18841   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
18842 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
18843 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
18844   $as_echo_n "(cached) " >&6
18845 else
18846   pgac_save_LDFLAGS=$LDFLAGS
18847 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18848 if test "$cross_compiling" = yes; then :
18849   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
18850 else
18851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18852 /* end confdefs.h.  */
18853 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18854 int
18855 main ()
18856 {
18857
18858   ;
18859   return 0;
18860 }
18861 _ACEOF
18862 if ac_fn_c_try_run "$LINENO"; then :
18863   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
18864 else
18865   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
18866 fi
18867 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18868   conftest.$ac_objext conftest.beam conftest.$ac_ext
18869 fi
18870
18871 LDFLAGS="$pgac_save_LDFLAGS"
18872 fi
18873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
18874 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
18875 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
18876   LDFLAGS="$LDFLAGS -Wl,--as-needed"
18877 fi
18878
18879 fi
18880
18881 # Create compiler version string
18882 if test x"$GCC" = x"yes" ; then
18883   cc_string=`${CC} --version | sed q`
18884   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18885 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18886   cc_string=`${CC} -V 2>&1 | sed q`
18887 else
18888   cc_string=$CC
18889 fi
18890
18891
18892 cat >>confdefs.h <<_ACEOF
18893 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18894 _ACEOF
18895
18896
18897 # Supply a numeric version string for use by 3rd party add-ons
18898 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18899 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
18900 tr '.' '        ' |
18901 $AWK '{printf "%d%04d", $1, $2}'`"
18902
18903 cat >>confdefs.h <<_ACEOF
18904 #define PG_VERSION_NUM $PG_VERSION_NUM
18905 _ACEOF
18906
18907
18908
18909 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
18910 # literally, so that it's possible to override it at build time using
18911 # a command like "make ... PG_SYSROOT=path".  This has to be done after
18912 # we've finished all configure checks that depend on CPPFLAGS.
18913 if test x"$PG_SYSROOT" != x; then
18914   CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18915 fi
18916
18917
18918
18919 # Begin output steps
18920
18921 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
18922 $as_echo "$as_me: using compiler=$cc_string" >&6;}
18923 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
18924 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
18925 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
18926 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
18927 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
18928 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
18929 # Currently only used when LLVM is used
18930 if test "$with_llvm" = yes ; then
18931    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
18932 $as_echo "$as_me: using CXX=$CXX" >&6;}
18933    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
18934 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
18935    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
18936 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
18937    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
18938 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
18939    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
18940 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
18941 fi
18942
18943 # prepare build tree if outside source tree
18944 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18945 # Note 2: /bin/pwd might be better than shell's built-in at getting
18946 #         a symlink-free name.
18947 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18948   vpath_build=no
18949 else
18950   vpath_build=yes
18951   if test "$no_create" != yes; then
18952     $as_echo_n "preparing build tree... " >&6
18953     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
18954     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
18955       || as_fn_error $? "failed" "$LINENO" 5
18956     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
18957 $as_echo "done" >&6; }
18958   fi
18959 fi
18960
18961
18962
18963 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
18964
18965
18966 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}"
18967
18968
18969 if test "$PORTNAME" = "win32"; then
18970 ac_config_commands="$ac_config_commands check_win32_symlinks"
18971
18972 fi
18973
18974 ac_config_headers="$ac_config_headers src/include/pg_config.h"
18975
18976
18977 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
18978
18979
18980 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
18981
18982
18983 cat >confcache <<\_ACEOF
18984 # This file is a shell script that caches the results of configure
18985 # tests run on this system so they can be shared between configure
18986 # scripts and configure runs, see configure's option --config-cache.
18987 # It is not useful on other systems.  If it contains results you don't
18988 # want to keep, you may remove or edit it.
18989 #
18990 # config.status only pays attention to the cache file if you give it
18991 # the --recheck option to rerun configure.
18992 #
18993 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18994 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18995 # following values.
18996
18997 _ACEOF
18998
18999 # The following way of writing the cache mishandles newlines in values,
19000 # but we know of no workaround that is simple, portable, and efficient.
19001 # So, we kill variables containing newlines.
19002 # Ultrix sh set writes to stderr and can't be redirected directly,
19003 # and sets the high bit in the cache file unless we assign to the vars.
19004 (
19005   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19006     eval ac_val=\$$ac_var
19007     case $ac_val in #(
19008     *${as_nl}*)
19009       case $ac_var in #(
19010       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19011 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19012       esac
19013       case $ac_var in #(
19014       _ | IFS | as_nl) ;; #(
19015       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19016       *) { eval $ac_var=; unset $ac_var;} ;;
19017       esac ;;
19018     esac
19019   done
19020
19021   (set) 2>&1 |
19022     case $as_nl`(ac_space=' '; set) 2>&1` in #(
19023     *${as_nl}ac_space=\ *)
19024       # `set' does not quote correctly, so add quotes: double-quote
19025       # substitution turns \\\\ into \\, and sed turns \\ into \.
19026       sed -n \
19027         "s/'/'\\\\''/g;
19028           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19029       ;; #(
19030     *)
19031       # `set' quotes correctly as required by POSIX, so do not add quotes.
19032       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19033       ;;
19034     esac |
19035     sort
19036 ) |
19037   sed '
19038      /^ac_cv_env_/b end
19039      t clear
19040      :clear
19041      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19042      t end
19043      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19044      :end' >>confcache
19045 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19046   if test -w "$cache_file"; then
19047     if test "x$cache_file" != "x/dev/null"; then
19048       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19049 $as_echo "$as_me: updating cache $cache_file" >&6;}
19050       if test ! -f "$cache_file" || test -h "$cache_file"; then
19051         cat confcache >"$cache_file"
19052       else
19053         case $cache_file in #(
19054         */* | ?:*)
19055           mv -f confcache "$cache_file"$$ &&
19056           mv -f "$cache_file"$$ "$cache_file" ;; #(
19057         *)
19058           mv -f confcache "$cache_file" ;;
19059         esac
19060       fi
19061     fi
19062   else
19063     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19064 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19065   fi
19066 fi
19067 rm -f confcache
19068
19069 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19070 # Let make expand exec_prefix.
19071 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19072
19073 DEFS=-DHAVE_CONFIG_H
19074
19075 ac_libobjs=
19076 ac_ltlibobjs=
19077 U=
19078 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19079   # 1. Remove the extension, and $U if already installed.
19080   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19081   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19082   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19083   #    will be set to the directory where LIBOBJS objects are built.
19084   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19085   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19086 done
19087 LIBOBJS=$ac_libobjs
19088
19089 LTLIBOBJS=$ac_ltlibobjs
19090
19091
19092
19093
19094 : "${CONFIG_STATUS=./config.status}"
19095 ac_write_fail=0
19096 ac_clean_files_save=$ac_clean_files
19097 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19098 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19099 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19100 as_write_fail=0
19101 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19102 #! $SHELL
19103 # Generated by $as_me.
19104 # Run this file to recreate the current configuration.
19105 # Compiler output produced by configure, useful for debugging
19106 # configure, is in config.log if it exists.
19107
19108 debug=false
19109 ac_cs_recheck=false
19110 ac_cs_silent=false
19111
19112 SHELL=\${CONFIG_SHELL-$SHELL}
19113 export SHELL
19114 _ASEOF
19115 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19116 ## -------------------- ##
19117 ## M4sh Initialization. ##
19118 ## -------------------- ##
19119
19120 # Be more Bourne compatible
19121 DUALCASE=1; export DUALCASE # for MKS sh
19122 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19123   emulate sh
19124   NULLCMD=:
19125   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19126   # is contrary to our usage.  Disable this feature.
19127   alias -g '${1+"$@"}'='"$@"'
19128   setopt NO_GLOB_SUBST
19129 else
19130   case `(set -o) 2>/dev/null` in #(
19131   *posix*) :
19132     set -o posix ;; #(
19133   *) :
19134      ;;
19135 esac
19136 fi
19137
19138
19139 as_nl='
19140 '
19141 export as_nl
19142 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19143 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19144 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19145 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19146 # Prefer a ksh shell builtin over an external printf program on Solaris,
19147 # but without wasting forks for bash or zsh.
19148 if test -z "$BASH_VERSION$ZSH_VERSION" \
19149     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19150   as_echo='print -r --'
19151   as_echo_n='print -rn --'
19152 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19153   as_echo='printf %s\n'
19154   as_echo_n='printf %s'
19155 else
19156   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19157     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19158     as_echo_n='/usr/ucb/echo -n'
19159   else
19160     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19161     as_echo_n_body='eval
19162       arg=$1;
19163       case $arg in #(
19164       *"$as_nl"*)
19165         expr "X$arg" : "X\\(.*\\)$as_nl";
19166         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19167       esac;
19168       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19169     '
19170     export as_echo_n_body
19171     as_echo_n='sh -c $as_echo_n_body as_echo'
19172   fi
19173   export as_echo_body
19174   as_echo='sh -c $as_echo_body as_echo'
19175 fi
19176
19177 # The user is always right.
19178 if test "${PATH_SEPARATOR+set}" != set; then
19179   PATH_SEPARATOR=:
19180   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19181     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19182       PATH_SEPARATOR=';'
19183   }
19184 fi
19185
19186
19187 # IFS
19188 # We need space, tab and new line, in precisely that order.  Quoting is
19189 # there to prevent editors from complaining about space-tab.
19190 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19191 # splitting by setting IFS to empty value.)
19192 IFS=" ""        $as_nl"
19193
19194 # Find who we are.  Look in the path if we contain no directory separator.
19195 as_myself=
19196 case $0 in #((
19197   *[\\/]* ) as_myself=$0 ;;
19198   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19199 for as_dir in $PATH
19200 do
19201   IFS=$as_save_IFS
19202   test -z "$as_dir" && as_dir=.
19203     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19204   done
19205 IFS=$as_save_IFS
19206
19207      ;;
19208 esac
19209 # We did not find ourselves, most probably we were run as `sh COMMAND'
19210 # in which case we are not to be found in the path.
19211 if test "x$as_myself" = x; then
19212   as_myself=$0
19213 fi
19214 if test ! -f "$as_myself"; then
19215   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19216   exit 1
19217 fi
19218
19219 # Unset variables that we do not need and which cause bugs (e.g. in
19220 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19221 # suppresses any "Segmentation fault" message there.  '((' could
19222 # trigger a bug in pdksh 5.2.14.
19223 for as_var in BASH_ENV ENV MAIL MAILPATH
19224 do eval test x\${$as_var+set} = xset \
19225   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19226 done
19227 PS1='$ '
19228 PS2='> '
19229 PS4='+ '
19230
19231 # NLS nuisances.
19232 LC_ALL=C
19233 export LC_ALL
19234 LANGUAGE=C
19235 export LANGUAGE
19236
19237 # CDPATH.
19238 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19239
19240
19241 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19242 # ----------------------------------------
19243 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19244 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19245 # script with STATUS, using 1 if that was 0.
19246 as_fn_error ()
19247 {
19248   as_status=$1; test $as_status -eq 0 && as_status=1
19249   if test "$4"; then
19250     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19251     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19252   fi
19253   $as_echo "$as_me: error: $2" >&2
19254   as_fn_exit $as_status
19255 } # as_fn_error
19256
19257
19258 # as_fn_set_status STATUS
19259 # -----------------------
19260 # Set $? to STATUS, without forking.
19261 as_fn_set_status ()
19262 {
19263   return $1
19264 } # as_fn_set_status
19265
19266 # as_fn_exit STATUS
19267 # -----------------
19268 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19269 as_fn_exit ()
19270 {
19271   set +e
19272   as_fn_set_status $1
19273   exit $1
19274 } # as_fn_exit
19275
19276 # as_fn_unset VAR
19277 # ---------------
19278 # Portably unset VAR.
19279 as_fn_unset ()
19280 {
19281   { eval $1=; unset $1;}
19282 }
19283 as_unset=as_fn_unset
19284 # as_fn_append VAR VALUE
19285 # ----------------------
19286 # Append the text in VALUE to the end of the definition contained in VAR. Take
19287 # advantage of any shell optimizations that allow amortized linear growth over
19288 # repeated appends, instead of the typical quadratic growth present in naive
19289 # implementations.
19290 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19291   eval 'as_fn_append ()
19292   {
19293     eval $1+=\$2
19294   }'
19295 else
19296   as_fn_append ()
19297   {
19298     eval $1=\$$1\$2
19299   }
19300 fi # as_fn_append
19301
19302 # as_fn_arith ARG...
19303 # ------------------
19304 # Perform arithmetic evaluation on the ARGs, and store the result in the
19305 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19306 # must be portable across $(()) and expr.
19307 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19308   eval 'as_fn_arith ()
19309   {
19310     as_val=$(( $* ))
19311   }'
19312 else
19313   as_fn_arith ()
19314   {
19315     as_val=`expr "$@" || test $? -eq 1`
19316   }
19317 fi # as_fn_arith
19318
19319
19320 if expr a : '\(a\)' >/dev/null 2>&1 &&
19321    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19322   as_expr=expr
19323 else
19324   as_expr=false
19325 fi
19326
19327 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19328   as_basename=basename
19329 else
19330   as_basename=false
19331 fi
19332
19333 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19334   as_dirname=dirname
19335 else
19336   as_dirname=false
19337 fi
19338
19339 as_me=`$as_basename -- "$0" ||
19340 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19341          X"$0" : 'X\(//\)$' \| \
19342          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19343 $as_echo X/"$0" |
19344     sed '/^.*\/\([^/][^/]*\)\/*$/{
19345             s//\1/
19346             q
19347           }
19348           /^X\/\(\/\/\)$/{
19349             s//\1/
19350             q
19351           }
19352           /^X\/\(\/\).*/{
19353             s//\1/
19354             q
19355           }
19356           s/.*/./; q'`
19357
19358 # Avoid depending upon Character Ranges.
19359 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19360 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19361 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19362 as_cr_digits='0123456789'
19363 as_cr_alnum=$as_cr_Letters$as_cr_digits
19364
19365 ECHO_C= ECHO_N= ECHO_T=
19366 case `echo -n x` in #(((((
19367 -n*)
19368   case `echo 'xy\c'` in
19369   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19370   xy)  ECHO_C='\c';;
19371   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19372        ECHO_T=' ';;
19373   esac;;
19374 *)
19375   ECHO_N='-n';;
19376 esac
19377
19378 rm -f conf$$ conf$$.exe conf$$.file
19379 if test -d conf$$.dir; then
19380   rm -f conf$$.dir/conf$$.file
19381 else
19382   rm -f conf$$.dir
19383   mkdir conf$$.dir 2>/dev/null
19384 fi
19385 if (echo >conf$$.file) 2>/dev/null; then
19386   if ln -s conf$$.file conf$$ 2>/dev/null; then
19387     as_ln_s='ln -s'
19388     # ... but there are two gotchas:
19389     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19390     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19391     # In both cases, we have to default to `cp -pR'.
19392     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19393       as_ln_s='cp -pR'
19394   elif ln conf$$.file conf$$ 2>/dev/null; then
19395     as_ln_s=ln
19396   else
19397     as_ln_s='cp -pR'
19398   fi
19399 else
19400   as_ln_s='cp -pR'
19401 fi
19402 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19403 rmdir conf$$.dir 2>/dev/null
19404
19405
19406 # as_fn_mkdir_p
19407 # -------------
19408 # Create "$as_dir" as a directory, including parents if necessary.
19409 as_fn_mkdir_p ()
19410 {
19411
19412   case $as_dir in #(
19413   -*) as_dir=./$as_dir;;
19414   esac
19415   test -d "$as_dir" || eval $as_mkdir_p || {
19416     as_dirs=
19417     while :; do
19418       case $as_dir in #(
19419       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19420       *) as_qdir=$as_dir;;
19421       esac
19422       as_dirs="'$as_qdir' $as_dirs"
19423       as_dir=`$as_dirname -- "$as_dir" ||
19424 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19425          X"$as_dir" : 'X\(//\)[^/]' \| \
19426          X"$as_dir" : 'X\(//\)$' \| \
19427          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19428 $as_echo X"$as_dir" |
19429     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19430             s//\1/
19431             q
19432           }
19433           /^X\(\/\/\)[^/].*/{
19434             s//\1/
19435             q
19436           }
19437           /^X\(\/\/\)$/{
19438             s//\1/
19439             q
19440           }
19441           /^X\(\/\).*/{
19442             s//\1/
19443             q
19444           }
19445           s/.*/./; q'`
19446       test -d "$as_dir" && break
19447     done
19448     test -z "$as_dirs" || eval "mkdir $as_dirs"
19449   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19450
19451
19452 } # as_fn_mkdir_p
19453 if mkdir -p . 2>/dev/null; then
19454   as_mkdir_p='mkdir -p "$as_dir"'
19455 else
19456   test -d ./-p && rmdir ./-p
19457   as_mkdir_p=false
19458 fi
19459
19460
19461 # as_fn_executable_p FILE
19462 # -----------------------
19463 # Test if FILE is an executable regular file.
19464 as_fn_executable_p ()
19465 {
19466   test -f "$1" && test -x "$1"
19467 } # as_fn_executable_p
19468 as_test_x='test -x'
19469 as_executable_p=as_fn_executable_p
19470
19471 # Sed expression to map a string onto a valid CPP name.
19472 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19473
19474 # Sed expression to map a string onto a valid variable name.
19475 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19476
19477
19478 exec 6>&1
19479 ## ----------------------------------- ##
19480 ## Main body of $CONFIG_STATUS script. ##
19481 ## ----------------------------------- ##
19482 _ASEOF
19483 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19484
19485 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19486 # Save the log message, to keep $0 and so on meaningful, and to
19487 # report actual input values of CONFIG_FILES etc. instead of their
19488 # values after options handling.
19489 ac_log="
19490 This file was extended by PostgreSQL $as_me 11.5, which was
19491 generated by GNU Autoconf 2.69.  Invocation command line was
19492
19493   CONFIG_FILES    = $CONFIG_FILES
19494   CONFIG_HEADERS  = $CONFIG_HEADERS
19495   CONFIG_LINKS    = $CONFIG_LINKS
19496   CONFIG_COMMANDS = $CONFIG_COMMANDS
19497   $ $0 $@
19498
19499 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19500 "
19501
19502 _ACEOF
19503
19504 case $ac_config_files in *"
19505 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19506 esac
19507
19508 case $ac_config_headers in *"
19509 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19510 esac
19511
19512
19513 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19514 # Files that config.status was made for.
19515 config_files="$ac_config_files"
19516 config_headers="$ac_config_headers"
19517 config_links="$ac_config_links"
19518 config_commands="$ac_config_commands"
19519
19520 _ACEOF
19521
19522 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19523 ac_cs_usage="\
19524 \`$as_me' instantiates files and other configuration actions
19525 from templates according to the current configuration.  Unless the files
19526 and actions are specified as TAGs, all are instantiated by default.
19527
19528 Usage: $0 [OPTION]... [TAG]...
19529
19530   -h, --help       print this help, then exit
19531   -V, --version    print version number and configuration settings, then exit
19532       --config     print configuration, then exit
19533   -q, --quiet, --silent
19534                    do not print progress messages
19535   -d, --debug      don't remove temporary files
19536       --recheck    update $as_me by reconfiguring in the same conditions
19537       --file=FILE[:TEMPLATE]
19538                    instantiate the configuration file FILE
19539       --header=FILE[:TEMPLATE]
19540                    instantiate the configuration header FILE
19541
19542 Configuration files:
19543 $config_files
19544
19545 Configuration headers:
19546 $config_headers
19547
19548 Configuration links:
19549 $config_links
19550
19551 Configuration commands:
19552 $config_commands
19553
19554 Report bugs to <pgsql-bugs@postgresql.org>."
19555
19556 _ACEOF
19557 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19558 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19559 ac_cs_version="\\
19560 PostgreSQL config.status 11.5
19561 configured by $0, generated by GNU Autoconf 2.69,
19562   with options \\"\$ac_cs_config\\"
19563
19564 Copyright (C) 2012 Free Software Foundation, Inc.
19565 This config.status script is free software; the Free Software Foundation
19566 gives unlimited permission to copy, distribute and modify it."
19567
19568 ac_pwd='$ac_pwd'
19569 srcdir='$srcdir'
19570 INSTALL='$INSTALL'
19571 MKDIR_P='$MKDIR_P'
19572 AWK='$AWK'
19573 test -n "\$AWK" || AWK=awk
19574 _ACEOF
19575
19576 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19577 # The default lists apply if the user does not specify any file.
19578 ac_need_defaults=:
19579 while test $# != 0
19580 do
19581   case $1 in
19582   --*=?*)
19583     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19584     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19585     ac_shift=:
19586     ;;
19587   --*=)
19588     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19589     ac_optarg=
19590     ac_shift=:
19591     ;;
19592   *)
19593     ac_option=$1
19594     ac_optarg=$2
19595     ac_shift=shift
19596     ;;
19597   esac
19598
19599   case $ac_option in
19600   # Handling of the options.
19601   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19602     ac_cs_recheck=: ;;
19603   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19604     $as_echo "$ac_cs_version"; exit ;;
19605   --config | --confi | --conf | --con | --co | --c )
19606     $as_echo "$ac_cs_config"; exit ;;
19607   --debug | --debu | --deb | --de | --d | -d )
19608     debug=: ;;
19609   --file | --fil | --fi | --f )
19610     $ac_shift
19611     case $ac_optarg in
19612     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19613     '') as_fn_error $? "missing file argument" ;;
19614     esac
19615     as_fn_append CONFIG_FILES " '$ac_optarg'"
19616     ac_need_defaults=false;;
19617   --header | --heade | --head | --hea )
19618     $ac_shift
19619     case $ac_optarg in
19620     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19621     esac
19622     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19623     ac_need_defaults=false;;
19624   --he | --h)
19625     # Conflict between --help and --header
19626     as_fn_error $? "ambiguous option: \`$1'
19627 Try \`$0 --help' for more information.";;
19628   --help | --hel | -h )
19629     $as_echo "$ac_cs_usage"; exit ;;
19630   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19631   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19632     ac_cs_silent=: ;;
19633
19634   # This is an error.
19635   -*) as_fn_error $? "unrecognized option: \`$1'
19636 Try \`$0 --help' for more information." ;;
19637
19638   *) as_fn_append ac_config_targets " $1"
19639      ac_need_defaults=false ;;
19640
19641   esac
19642   shift
19643 done
19644
19645 ac_configure_extra_args=
19646
19647 if $ac_cs_silent; then
19648   exec 6>/dev/null
19649   ac_configure_extra_args="$ac_configure_extra_args --silent"
19650 fi
19651
19652 _ACEOF
19653 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19654 if \$ac_cs_recheck; then
19655   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19656   shift
19657   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19658   CONFIG_SHELL='$SHELL'
19659   export CONFIG_SHELL
19660   exec "\$@"
19661 fi
19662
19663 _ACEOF
19664 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19665 exec 5>>config.log
19666 {
19667   echo
19668   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19669 ## Running $as_me. ##
19670 _ASBOX
19671   $as_echo "$ac_log"
19672 } >&5
19673
19674 _ACEOF
19675 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19676 _ACEOF
19677
19678 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19679
19680 # Handling of arguments.
19681 for ac_config_target in $ac_config_targets
19682 do
19683   case $ac_config_target in
19684     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19685     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19686     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19687     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
19688     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19689     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19690     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
19691     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19692     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19693     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19694     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19695     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19696     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19697
19698   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19699   esac
19700 done
19701
19702
19703 # If the user did not use the arguments to specify the items to instantiate,
19704 # then the envvar interface is used.  Set only those that are not.
19705 # We use the long form for the default assignment because of an extremely
19706 # bizarre bug on SunOS 4.1.3.
19707 if $ac_need_defaults; then
19708   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19709   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19710   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19711   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19712 fi
19713
19714 # Have a temporary directory for convenience.  Make it in the build tree
19715 # simply because there is no reason against having it here, and in addition,
19716 # creating and moving files from /tmp can sometimes cause problems.
19717 # Hook for its removal unless debugging.
19718 # Note that there is a small window in which the directory will not be cleaned:
19719 # after its creation but before its name has been assigned to `$tmp'.
19720 $debug ||
19721 {
19722   tmp= ac_tmp=
19723   trap 'exit_status=$?
19724   : "${ac_tmp:=$tmp}"
19725   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19726 ' 0
19727   trap 'as_fn_exit 1' 1 2 13 15
19728 }
19729 # Create a (secure) tmp directory for tmp files.
19730
19731 {
19732   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19733   test -d "$tmp"
19734 }  ||
19735 {
19736   tmp=./conf$$-$RANDOM
19737   (umask 077 && mkdir "$tmp")
19738 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19739 ac_tmp=$tmp
19740
19741 # Set up the scripts for CONFIG_FILES section.
19742 # No need to generate them if there are no CONFIG_FILES.
19743 # This happens for instance with `./config.status config.h'.
19744 if test -n "$CONFIG_FILES"; then
19745
19746
19747 ac_cr=`echo X | tr X '\015'`
19748 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19749 # But we know of no other shell where ac_cr would be empty at this
19750 # point, so we can use a bashism as a fallback.
19751 if test "x$ac_cr" = x; then
19752   eval ac_cr=\$\'\\r\'
19753 fi
19754 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19755 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19756   ac_cs_awk_cr='\\r'
19757 else
19758   ac_cs_awk_cr=$ac_cr
19759 fi
19760
19761 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19762 _ACEOF
19763
19764
19765 {
19766   echo "cat >conf$$subs.awk <<_ACEOF" &&
19767   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19768   echo "_ACEOF"
19769 } >conf$$subs.sh ||
19770   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19771 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19772 ac_delim='%!_!# '
19773 for ac_last_try in false false false false false :; do
19774   . ./conf$$subs.sh ||
19775     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19776
19777   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19778   if test $ac_delim_n = $ac_delim_num; then
19779     break
19780   elif $ac_last_try; then
19781     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19782   else
19783     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19784   fi
19785 done
19786 rm -f conf$$subs.sh
19787
19788 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19789 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19790 _ACEOF
19791 sed -n '
19792 h
19793 s/^/S["/; s/!.*/"]=/
19794 p
19795 g
19796 s/^[^!]*!//
19797 :repl
19798 t repl
19799 s/'"$ac_delim"'$//
19800 t delim
19801 :nl
19802 h
19803 s/\(.\{148\}\)..*/\1/
19804 t more1
19805 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19806 p
19807 n
19808 b repl
19809 :more1
19810 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19811 p
19812 g
19813 s/.\{148\}//
19814 t nl
19815 :delim
19816 h
19817 s/\(.\{148\}\)..*/\1/
19818 t more2
19819 s/["\\]/\\&/g; s/^/"/; s/$/"/
19820 p
19821 b
19822 :more2
19823 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19824 p
19825 g
19826 s/.\{148\}//
19827 t delim
19828 ' <conf$$subs.awk | sed '
19829 /^[^""]/{
19830   N
19831   s/\n//
19832 }
19833 ' >>$CONFIG_STATUS || ac_write_fail=1
19834 rm -f conf$$subs.awk
19835 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19836 _ACAWK
19837 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19838   for (key in S) S_is_set[key] = 1
19839   FS = "\a"
19840
19841 }
19842 {
19843   line = $ 0
19844   nfields = split(line, field, "@")
19845   substed = 0
19846   len = length(field[1])
19847   for (i = 2; i < nfields; i++) {
19848     key = field[i]
19849     keylen = length(key)
19850     if (S_is_set[key]) {
19851       value = S[key]
19852       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19853       len += length(value) + length(field[++i])
19854       substed = 1
19855     } else
19856       len += 1 + keylen
19857   }
19858
19859   print line
19860 }
19861
19862 _ACAWK
19863 _ACEOF
19864 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19865 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19866   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19867 else
19868   cat
19869 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19870   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19871 _ACEOF
19872
19873 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19874 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19875 # trailing colons and then remove the whole line if VPATH becomes empty
19876 # (actually we leave an empty line to preserve line numbers).
19877 if test "x$srcdir" = x.; then
19878   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
19879 h
19880 s///
19881 s/^/:/
19882 s/[      ]*$/:/
19883 s/:\$(srcdir):/:/g
19884 s/:\${srcdir}:/:/g
19885 s/:@srcdir@:/:/g
19886 s/^:*//
19887 s/:*$//
19888 x
19889 s/\(=[   ]*\).*/\1/
19890 G
19891 s/\n//
19892 s/^[^=]*=[       ]*$//
19893 }'
19894 fi
19895
19896 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19897 fi # test -n "$CONFIG_FILES"
19898
19899 # Set up the scripts for CONFIG_HEADERS section.
19900 # No need to generate them if there are no CONFIG_HEADERS.
19901 # This happens for instance with `./config.status Makefile'.
19902 if test -n "$CONFIG_HEADERS"; then
19903 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19904 BEGIN {
19905 _ACEOF
19906
19907 # Transform confdefs.h into an awk script `defines.awk', embedded as
19908 # here-document in config.status, that substitutes the proper values into
19909 # config.h.in to produce config.h.
19910
19911 # Create a delimiter string that does not exist in confdefs.h, to ease
19912 # handling of long lines.
19913 ac_delim='%!_!# '
19914 for ac_last_try in false false :; do
19915   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19916   if test -z "$ac_tt"; then
19917     break
19918   elif $ac_last_try; then
19919     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19920   else
19921     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19922   fi
19923 done
19924
19925 # For the awk script, D is an array of macro values keyed by name,
19926 # likewise P contains macro parameters if any.  Preserve backslash
19927 # newline sequences.
19928
19929 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19930 sed -n '
19931 s/.\{148\}/&'"$ac_delim"'/g
19932 t rset
19933 :rset
19934 s/^[     ]*#[    ]*define[       ][      ]*/ /
19935 t def
19936 d
19937 :def
19938 s/\\$//
19939 t bsnl
19940 s/["\\]/\\&/g
19941 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19942 D["\1"]=" \3"/p
19943 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
19944 d
19945 :bsnl
19946 s/["\\]/\\&/g
19947 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19948 D["\1"]=" \3\\\\\\n"\\/p
19949 t cont
19950 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19951 t cont
19952 d
19953 :cont
19954 n
19955 s/.\{148\}/&'"$ac_delim"'/g
19956 t clear
19957 :clear
19958 s/\\$//
19959 t bsnlc
19960 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19961 d
19962 :bsnlc
19963 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19964 b cont
19965 ' <confdefs.h | sed '
19966 s/'"$ac_delim"'/"\\\
19967 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19968
19969 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19970   for (key in D) D_is_set[key] = 1
19971   FS = "\a"
19972 }
19973 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19974   line = \$ 0
19975   split(line, arg, " ")
19976   if (arg[1] == "#") {
19977     defundef = arg[2]
19978     mac1 = arg[3]
19979   } else {
19980     defundef = substr(arg[1], 2)
19981     mac1 = arg[2]
19982   }
19983   split(mac1, mac2, "(") #)
19984   macro = mac2[1]
19985   prefix = substr(line, 1, index(line, defundef) - 1)
19986   if (D_is_set[macro]) {
19987     # Preserve the white space surrounding the "#".
19988     print prefix "define", macro P[macro] D[macro]
19989     next
19990   } else {
19991     # Replace #undef with comments.  This is necessary, for example,
19992     # in the case of _POSIX_SOURCE, which is predefined and required
19993     # on some systems where configure will not decide to define it.
19994     if (defundef == "undef") {
19995       print "/*", prefix defundef, macro, "*/"
19996       next
19997     }
19998   }
19999 }
20000 { print }
20001 _ACAWK
20002 _ACEOF
20003 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20004   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20005 fi # test -n "$CONFIG_HEADERS"
20006
20007
20008 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
20009 shift
20010 for ac_tag
20011 do
20012   case $ac_tag in
20013   :[FHLC]) ac_mode=$ac_tag; continue;;
20014   esac
20015   case $ac_mode$ac_tag in
20016   :[FHL]*:*);;
20017   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20018   :[FH]-) ac_tag=-:-;;
20019   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20020   esac
20021   ac_save_IFS=$IFS
20022   IFS=:
20023   set x $ac_tag
20024   IFS=$ac_save_IFS
20025   shift
20026   ac_file=$1
20027   shift
20028
20029   case $ac_mode in
20030   :L) ac_source=$1;;
20031   :[FH])
20032     ac_file_inputs=
20033     for ac_f
20034     do
20035       case $ac_f in
20036       -) ac_f="$ac_tmp/stdin";;
20037       *) # Look for the file first in the build tree, then in the source tree
20038          # (if the path is not absolute).  The absolute path cannot be DOS-style,
20039          # because $ac_f cannot contain `:'.
20040          test -f "$ac_f" ||
20041            case $ac_f in
20042            [\\/$]*) false;;
20043            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20044            esac ||
20045            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20046       esac
20047       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20048       as_fn_append ac_file_inputs " '$ac_f'"
20049     done
20050
20051     # Let's still pretend it is `configure' which instantiates (i.e., don't
20052     # use $as_me), people would be surprised to read:
20053     #    /* config.h.  Generated by config.status.  */
20054     configure_input='Generated from '`
20055           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20056         `' by configure.'
20057     if test x"$ac_file" != x-; then
20058       configure_input="$ac_file.  $configure_input"
20059       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20060 $as_echo "$as_me: creating $ac_file" >&6;}
20061     fi
20062     # Neutralize special characters interpreted by sed in replacement strings.
20063     case $configure_input in #(
20064     *\&* | *\|* | *\\* )
20065        ac_sed_conf_input=`$as_echo "$configure_input" |
20066        sed 's/[\\\\&|]/\\\\&/g'`;; #(
20067     *) ac_sed_conf_input=$configure_input;;
20068     esac
20069
20070     case $ac_tag in
20071     *:-:* | *:-) cat >"$ac_tmp/stdin" \
20072       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20073     esac
20074     ;;
20075   esac
20076
20077   ac_dir=`$as_dirname -- "$ac_file" ||
20078 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20079          X"$ac_file" : 'X\(//\)[^/]' \| \
20080          X"$ac_file" : 'X\(//\)$' \| \
20081          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20082 $as_echo X"$ac_file" |
20083     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20084             s//\1/
20085             q
20086           }
20087           /^X\(\/\/\)[^/].*/{
20088             s//\1/
20089             q
20090           }
20091           /^X\(\/\/\)$/{
20092             s//\1/
20093             q
20094           }
20095           /^X\(\/\).*/{
20096             s//\1/
20097             q
20098           }
20099           s/.*/./; q'`
20100   as_dir="$ac_dir"; as_fn_mkdir_p
20101   ac_builddir=.
20102
20103 case "$ac_dir" in
20104 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20105 *)
20106   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20107   # A ".." for each directory in $ac_dir_suffix.
20108   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20109   case $ac_top_builddir_sub in
20110   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20111   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20112   esac ;;
20113 esac
20114 ac_abs_top_builddir=$ac_pwd
20115 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20116 # for backward compatibility:
20117 ac_top_builddir=$ac_top_build_prefix
20118
20119 case $srcdir in
20120   .)  # We are building in place.
20121     ac_srcdir=.
20122     ac_top_srcdir=$ac_top_builddir_sub
20123     ac_abs_top_srcdir=$ac_pwd ;;
20124   [\\/]* | ?:[\\/]* )  # Absolute name.
20125     ac_srcdir=$srcdir$ac_dir_suffix;
20126     ac_top_srcdir=$srcdir
20127     ac_abs_top_srcdir=$srcdir ;;
20128   *) # Relative name.
20129     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20130     ac_top_srcdir=$ac_top_build_prefix$srcdir
20131     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20132 esac
20133 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20134
20135
20136   case $ac_mode in
20137   :F)
20138   #
20139   # CONFIG_FILE
20140   #
20141
20142   case $INSTALL in
20143   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20144   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20145   esac
20146   ac_MKDIR_P=$MKDIR_P
20147   case $MKDIR_P in
20148   [\\/$]* | ?:[\\/]* ) ;;
20149   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20150   esac
20151 _ACEOF
20152
20153 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20154 # If the template does not know about datarootdir, expand it.
20155 # FIXME: This hack should be removed a few years after 2.60.
20156 ac_datarootdir_hack=; ac_datarootdir_seen=
20157 ac_sed_dataroot='
20158 /datarootdir/ {
20159   p
20160   q
20161 }
20162 /@datadir@/p
20163 /@docdir@/p
20164 /@infodir@/p
20165 /@localedir@/p
20166 /@mandir@/p'
20167 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20168 *datarootdir*) ac_datarootdir_seen=yes;;
20169 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20170   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20171 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20172 _ACEOF
20173 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20174   ac_datarootdir_hack='
20175   s&@datadir@&$datadir&g
20176   s&@docdir@&$docdir&g
20177   s&@infodir@&$infodir&g
20178   s&@localedir@&$localedir&g
20179   s&@mandir@&$mandir&g
20180   s&\\\${datarootdir}&$datarootdir&g' ;;
20181 esac
20182 _ACEOF
20183
20184 # Neutralize VPATH when `$srcdir' = `.'.
20185 # Shell code in configure.ac might set extrasub.
20186 # FIXME: do we really want to maintain this feature?
20187 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20188 ac_sed_extra="$ac_vpsub
20189 $extrasub
20190 _ACEOF
20191 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20192 :t
20193 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20194 s|@configure_input@|$ac_sed_conf_input|;t t
20195 s&@top_builddir@&$ac_top_builddir_sub&;t t
20196 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20197 s&@srcdir@&$ac_srcdir&;t t
20198 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20199 s&@top_srcdir@&$ac_top_srcdir&;t t
20200 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20201 s&@builddir@&$ac_builddir&;t t
20202 s&@abs_builddir@&$ac_abs_builddir&;t t
20203 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20204 s&@INSTALL@&$ac_INSTALL&;t t
20205 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20206 $ac_datarootdir_hack
20207 "
20208 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20209   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20210
20211 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20212   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20213   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20214       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20215   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20216 which seems to be undefined.  Please make sure it is defined" >&5
20217 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20218 which seems to be undefined.  Please make sure it is defined" >&2;}
20219
20220   rm -f "$ac_tmp/stdin"
20221   case $ac_file in
20222   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20223   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20224   esac \
20225   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20226  ;;
20227   :H)
20228   #
20229   # CONFIG_HEADER
20230   #
20231   if test x"$ac_file" != x-; then
20232     {
20233       $as_echo "/* $configure_input  */" \
20234       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20235     } >"$ac_tmp/config.h" \
20236       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20237     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20238       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20239 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20240     else
20241       rm -f "$ac_file"
20242       mv "$ac_tmp/config.h" "$ac_file" \
20243         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20244     fi
20245   else
20246     $as_echo "/* $configure_input  */" \
20247       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20248       || as_fn_error $? "could not create -" "$LINENO" 5
20249   fi
20250  ;;
20251   :L)
20252   #
20253   # CONFIG_LINK
20254   #
20255
20256   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20257     :
20258   else
20259     # Prefer the file from the source tree if names are identical.
20260     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20261       ac_source=$srcdir/$ac_source
20262     fi
20263
20264     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20265 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20266
20267     if test ! -r "$ac_source"; then
20268       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20269     fi
20270     rm -f "$ac_file"
20271
20272     # Try a relative symlink, then a hard link, then a copy.
20273     case $ac_source in
20274     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20275         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20276     esac
20277     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20278       ln "$ac_source" "$ac_file" 2>/dev/null ||
20279       cp -p "$ac_source" "$ac_file" ||
20280       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20281   fi
20282  ;;
20283   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20284 $as_echo "$as_me: executing $ac_file commands" >&6;}
20285  ;;
20286   esac
20287
20288
20289   case $ac_file$ac_mode in
20290     "check_win32_symlinks":C)
20291 # Links sometimes fail undetected on Mingw -
20292 # so here we detect it and warn the user
20293 for FILE in $CONFIG_LINKS
20294  do
20295         # test -e works for symlinks in the MinGW console
20296         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20297 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20298  done
20299  ;;
20300     "src/include/pg_config.h":H)
20301 # Update timestamp for pg_config.h (see Makefile.global)
20302 echo >src/include/stamp-h
20303  ;;
20304     "src/include/pg_config_ext.h":H)
20305 # Update timestamp for pg_config_ext.h (see Makefile.global)
20306 echo >src/include/stamp-ext-h
20307  ;;
20308     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20309
20310   esac
20311 done # for ac_tag
20312
20313
20314 as_fn_exit 0
20315 _ACEOF
20316 ac_clean_files=$ac_clean_files_save
20317
20318 test $ac_write_fail = 0 ||
20319   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20320
20321
20322 # configure is writing to config.log, and then calls config.status.
20323 # config.status does its own redirection, appending to config.log.
20324 # Unfortunately, on DOS this fails, as config.log is still kept open
20325 # by configure, so config.status won't be able to write to it; its
20326 # output is simply discarded.  So we exec the FD to /dev/null,
20327 # effectively closing config.log, so it can be properly (re)opened and
20328 # appended to by config.status.  When coming back to configure, we
20329 # need to make the FD available again.
20330 if test "$no_create" != yes; then
20331   ac_cs_success=:
20332   ac_config_status_args=
20333   test "$silent" = yes &&
20334     ac_config_status_args="$ac_config_status_args --quiet"
20335   exec 5>/dev/null
20336   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20337   exec 5>>config.log
20338   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20339   # would make configure fail if this is the last instruction.
20340   $ac_cs_success || as_fn_exit 1
20341 fi
20342 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20343   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20344 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20345 fi
20346