]> granicus.if.org Git - postgresql/blob - configure
Remove obsolete linux dynloader code
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 12devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 #
14 # Copyright (c) 1996-2018, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else
29   case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='print -r --'
50   as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in #(
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order.  Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" ""        $as_nl"
92
93 # Find who we are.  Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96   *[\\/]* ) as_myself=$0 ;;
97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100   IFS=$as_save_IFS
101   test -z "$as_dir" && as_dir=.
102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103   done
104 IFS=$as_save_IFS
105
106      ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111   as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115   exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there.  '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 # Use a proper internal environment variable to ensure we don't fall
140   # into an infinite loop, continuously re-executing ourselves.
141   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142     _as_can_reexec=no; export _as_can_reexec;
143     # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151   *v*x* | *x*v* ) as_opts=-vx ;;
152   *v* ) as_opts=-v ;;
153   *x* ) as_opts=-x ;;
154   * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
161   fi
162   # We don't want this to propagate to other subprocesses.
163           { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166   emulate sh
167   NULLCMD=:
168   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169   # is contrary to our usage.  Disable this feature.
170   alias -g '\${1+\"\$@\"}'='\"\$@\"'
171   setopt NO_GLOB_SUBST
172 else
173   case \`(set -o) 2>/dev/null\` in #(
174   *posix*) :
175     set -o posix ;; #(
176   *) :
177      ;;
178 esac
179 fi
180 "
181   as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
186
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194 else
195   exitcode=1; echo positional parameters were not saved.
196 fi
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204   if (eval "$as_required") 2>/dev/null; then :
205   as_have_required=yes
206 else
207   as_have_required=no
208 fi
209   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211 else
212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 do
216   IFS=$as_save_IFS
217   test -z "$as_dir" && as_dir=.
218   as_found=:
219   case $as_dir in #(
220          /*)
221            for as_base in sh bash ksh sh5; do
222              # Try only shells that exist, to save several forks.
223              as_shell=$as_dir/$as_base
224              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   CONFIG_SHELL=$as_shell as_have_required=yes
227                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228   break 2
229 fi
230 fi
231            done;;
232        esac
233   as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237   CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
240
241
242       if test "x$CONFIG_SHELL" != x; then :
243   export CONFIG_SHELL
244              # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252   *v*x* | *x*v* ) as_opts=-vx ;;
253   *v* ) as_opts=-v ;;
254   *x* ) as_opts=-x ;;
255   * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
262 fi
263
264     if test x$as_have_required = xno; then :
265   $as_echo "$0: This script requires a shell more modern than all"
266   $as_echo "$0: the shells that I found on your system."
267   if test x${ZSH_VERSION+set} = xset ; then
268     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270   else
271     $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@postgresql.org about your system, including
273 $0: any error possibly output before this message. Then
274 $0: install a modern shell, or manually run the script
275 $0: under such a shell if you do have one."
276   fi
277   exit 1
278 fi
279 fi
280 fi
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
286
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
294 {
295   { eval $1=; unset $1;}
296 }
297 as_unset=as_fn_unset
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304   return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312   set +e
313   as_fn_set_status $1
314   exit $1
315 } # as_fn_exit
316
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
321 {
322
323   case $as_dir in #(
324   -*) as_dir=./$as_dir;;
325   esac
326   test -d "$as_dir" || eval $as_mkdir_p || {
327     as_dirs=
328     while :; do
329       case $as_dir in #(
330       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331       *) as_qdir=$as_dir;;
332       esac
333       as_dirs="'$as_qdir' $as_dirs"
334       as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336          X"$as_dir" : 'X\(//\)[^/]' \| \
337          X"$as_dir" : 'X\(//\)$' \| \
338          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341             s//\1/
342             q
343           }
344           /^X\(\/\/\)[^/].*/{
345             s//\1/
346             q
347           }
348           /^X\(\/\/\)$/{
349             s//\1/
350             q
351           }
352           /^X\(\/\).*/{
353             s//\1/
354             q
355           }
356           s/.*/./; q'`
357       test -d "$as_dir" && break
358     done
359     test -z "$as_dirs" || eval "mkdir $as_dirs"
360   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363 } # as_fn_mkdir_p
364
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
369 {
370   test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379   eval 'as_fn_append ()
380   {
381     eval $1+=\$2
382   }'
383 else
384   as_fn_append ()
385   {
386     eval $1=\$$1\$2
387   }
388 fi # as_fn_append
389
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396   eval 'as_fn_arith ()
397   {
398     as_val=$(( $* ))
399   }'
400 else
401   as_fn_arith ()
402   {
403     as_val=`expr "$@" || test $? -eq 1`
404   }
405 fi # as_fn_arith
406
407
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
414 {
415   as_status=$1; test $as_status -eq 0 && as_status=1
416   if test "$4"; then
417     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419   fi
420   $as_echo "$as_me: error: $2" >&2
421   as_fn_exit $as_status
422 } # as_fn_error
423
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425    test "X`expr 00001 : '.*\(...\)'`" = X001; then
426   as_expr=expr
427 else
428   as_expr=false
429 fi
430
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432   as_basename=basename
433 else
434   as_basename=false
435 fi
436
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438   as_dirname=dirname
439 else
440   as_dirname=false
441 fi
442
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445          X"$0" : 'X\(//\)$' \| \
446          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448     sed '/^.*\/\([^/][^/]*\)\/*$/{
449             s//\1/
450             q
451           }
452           /^X\/\(\/\/\)$/{
453             s//\1/
454             q
455           }
456           /^X\/\(\/\).*/{
457             s//\1/
458             q
459           }
460           s/.*/./; q'`
461
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
468
469
470   as_lineno_1=$LINENO as_lineno_1a=$LINENO
471   as_lineno_2=$LINENO as_lineno_2a=$LINENO
472   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
475   sed -n '
476     p
477     /[$]LINENO/=
478   ' <$as_myself |
479     sed '
480       s/[$]LINENO.*/&-/
481       t lineno
482       b
483       :lineno
484       N
485       :loop
486       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487       t loop
488       s/-\n.*//
489     ' >$as_me.lineno &&
490   chmod +x "$as_me.lineno" ||
491     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
492
493   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494   # already done that, so ensure we don't try to do so again and fall
495   # in an infinite loop.  This has already happened in practice.
496   _as_can_reexec=no; export _as_can_reexec
497   # Don't try to exec as it changes $[0], causing all sort of problems
498   # (the dirname of $[0] is not the place where we might find the
499   # original and so on.  Autoconf is especially sensitive to this).
500   . "./$as_me.lineno"
501   # Exit status is that of the last command.
502   exit
503 }
504
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508   case `echo 'xy\c'` in
509   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
510   xy)  ECHO_C='\c';;
511   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
512        ECHO_T=' ';;
513   esac;;
514 *)
515   ECHO_N='-n';;
516 esac
517
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520   rm -f conf$$.dir/conf$$.file
521 else
522   rm -f conf$$.dir
523   mkdir conf$$.dir 2>/dev/null
524 fi
525 if (echo >conf$$.file) 2>/dev/null; then
526   if ln -s conf$$.file conf$$ 2>/dev/null; then
527     as_ln_s='ln -s'
528     # ... but there are two gotchas:
529     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531     # In both cases, we have to default to `cp -pR'.
532     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533       as_ln_s='cp -pR'
534   elif ln conf$$.file conf$$ 2>/dev/null; then
535     as_ln_s=ln
536   else
537     as_ln_s='cp -pR'
538   fi
539 else
540   as_ln_s='cp -pR'
541 fi
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
544
545 if mkdir -p . 2>/dev/null; then
546   as_mkdir_p='mkdir -p "$as_dir"'
547 else
548   test -d ./-p && rmdir ./-p
549   as_mkdir_p=false
550 fi
551
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
554
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
564
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
569
570 #
571 # Initializations.
572 #
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
581
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='12devel'
586 PACKAGE_STRING='PostgreSQL 12devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
588 PACKAGE_URL=''
589
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 #  include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 #  include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
627
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_VERSION_NUM
631 PROVE
632 FOP
633 XSLTPROC
634 DBTOEPUB
635 have_docbook
636 XMLLINT
637 TCL_SHLIB_LD_LIBS
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_ARMV8_CRC32C
650 CFLAGS_SSE42
651 have_win32_dbghelp
652 HAVE_IPV6
653 LIBOBJS
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 PTHREAD_CFLAGS
658 PTHREAD_LIBS
659 PTHREAD_CC
660 ax_pthread_config
661 ZIC
662 python_additional_libs
663 python_libspec
664 python_libdir
665 python_includespec
666 python_version
667 python_majorversion
668 PYTHON
669 perl_embed_ldflags
670 perl_embed_ccflags
671 perl_useshrplib
672 perl_privlibexp
673 perl_archlibexp
674 PERL
675 FLEXFLAGS
676 FLEX
677 BISONFLAGS
678 BISON
679 MKDIR_P
680 LN_S
681 TAR
682 install_bin
683 INSTALL_DATA
684 INSTALL_SCRIPT
685 INSTALL_PROGRAM
686 WINDRES
687 DLLWRAP
688 DLLTOOL
689 AR
690 STRIP_SHARED_LIB
691 STRIP_STATIC_LIB
692 STRIP
693 RANLIB
694 with_gnu_ld
695 LD
696 LDFLAGS_SL
697 LDFLAGS_EX
698 ELF_SYS
699 EGREP
700 GREP
701 with_zlib
702 with_system_tzdata
703 with_libxslt
704 with_libxml
705 XML2_CONFIG
706 UUID_EXTRA_OBJS
707 with_uuid
708 with_systemd
709 with_selinux
710 with_openssl
711 with_ldap
712 with_krb_srvnam
713 krb_srvtab
714 with_gssapi
715 with_python
716 with_perl
717 with_tcl
718 ICU_LIBS
719 ICU_CFLAGS
720 PKG_CONFIG_LIBDIR
721 PKG_CONFIG_PATH
722 PKG_CONFIG
723 with_icu
724 enable_thread_safety
725 INCLUDES
726 autodepend
727 TAS
728 GCC
729 CPP
730 BITCODE_CXXFLAGS
731 BITCODE_CFLAGS
732 CFLAGS_VECTOR
733 LLVM_BINPATH
734 LLVM_CXXFLAGS
735 LLVM_CFLAGS
736 LLVM_CPPFLAGS
737 LLVM_LIBS
738 CLANG
739 LLVM_CONFIG
740 AWK
741 with_llvm
742 SUN_STUDIO_CC
743 ac_ct_CXX
744 CXXFLAGS
745 CXX
746 OBJEXT
747 EXEEXT
748 ac_ct_CC
749 CPPFLAGS
750 LDFLAGS
751 CFLAGS
752 CC
753 enable_tap_tests
754 enable_dtrace
755 DTRACEFLAGS
756 DTRACE
757 enable_coverage
758 GENHTML
759 LCOV
760 GCOV
761 enable_debug
762 enable_strong_random
763 enable_rpath
764 default_port
765 WANTED_LANGUAGES
766 enable_nls
767 PORTNAME
768 host_os
769 host_vendor
770 host_cpu
771 host
772 build_os
773 build_vendor
774 build_cpu
775 build
776 PG_MAJORVERSION
777 configure_args
778 target_alias
779 host_alias
780 build_alias
781 LIBS
782 ECHO_T
783 ECHO_N
784 ECHO_C
785 DEFS
786 mandir
787 localedir
788 libdir
789 psdir
790 pdfdir
791 dvidir
792 htmldir
793 infodir
794 docdir
795 oldincludedir
796 includedir
797 localstatedir
798 sharedstatedir
799 sysconfdir
800 datadir
801 datarootdir
802 libexecdir
803 sbindir
804 bindir
805 program_transform_name
806 prefix
807 exec_prefix
808 PACKAGE_URL
809 PACKAGE_BUGREPORT
810 PACKAGE_STRING
811 PACKAGE_VERSION
812 PACKAGE_TARNAME
813 PACKAGE_NAME
814 PATH_SEPARATOR
815 SHELL'
816 ac_subst_files=''
817 ac_user_opts='
818 enable_option_checking
819 with_extra_version
820 with_template
821 with_includes
822 with_libraries
823 with_libs
824 enable_integer_datetimes
825 enable_nls
826 with_pgport
827 enable_rpath
828 enable_spinlocks
829 enable_atomics
830 enable_strong_random
831 enable_debug
832 enable_profiling
833 enable_coverage
834 enable_dtrace
835 enable_tap_tests
836 with_blocksize
837 with_segsize
838 with_wal_blocksize
839 with_CC
840 with_llvm
841 enable_depend
842 enable_cassert
843 enable_thread_safety
844 with_icu
845 with_tcl
846 with_tclconfig
847 with_perl
848 with_python
849 with_gssapi
850 with_krb_srvnam
851 with_pam
852 with_bsd_auth
853 with_ldap
854 with_bonjour
855 with_openssl
856 with_selinux
857 with_systemd
858 with_readline
859 with_libedit_preferred
860 with_uuid
861 with_ossp_uuid
862 with_libxml
863 with_libxslt
864 with_system_tzdata
865 with_zlib
866 with_gnu_ld
867 enable_largefile
868 enable_float4_byval
869 enable_float8_byval
870 '
871       ac_precious_vars='build_alias
872 host_alias
873 target_alias
874 CC
875 CFLAGS
876 LDFLAGS
877 LIBS
878 CPPFLAGS
879 CXX
880 CXXFLAGS
881 CCC
882 LLVM_CONFIG
883 CLANG
884 CPP
885 PKG_CONFIG
886 PKG_CONFIG_PATH
887 PKG_CONFIG_LIBDIR
888 ICU_CFLAGS
889 ICU_LIBS
890 LDFLAGS_EX
891 LDFLAGS_SL'
892
893
894 # Initialize some variables set by options.
895 ac_init_help=
896 ac_init_version=false
897 ac_unrecognized_opts=
898 ac_unrecognized_sep=
899 # The variables have the same names as the options, with
900 # dashes changed to underlines.
901 cache_file=/dev/null
902 exec_prefix=NONE
903 no_create=
904 no_recursion=
905 prefix=NONE
906 program_prefix=NONE
907 program_suffix=NONE
908 program_transform_name=s,x,x,
909 silent=
910 site=
911 srcdir=
912 verbose=
913 x_includes=NONE
914 x_libraries=NONE
915
916 # Installation directory options.
917 # These are left unexpanded so users can "make install exec_prefix=/foo"
918 # and all the variables that are supposed to be based on exec_prefix
919 # by default will actually change.
920 # Use braces instead of parens because sh, perl, etc. also accept them.
921 # (The list follows the same order as the GNU Coding Standards.)
922 bindir='${exec_prefix}/bin'
923 sbindir='${exec_prefix}/sbin'
924 libexecdir='${exec_prefix}/libexec'
925 datarootdir='${prefix}/share'
926 datadir='${datarootdir}'
927 sysconfdir='${prefix}/etc'
928 sharedstatedir='${prefix}/com'
929 localstatedir='${prefix}/var'
930 includedir='${prefix}/include'
931 oldincludedir='/usr/include'
932 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
933 infodir='${datarootdir}/info'
934 htmldir='${docdir}'
935 dvidir='${docdir}'
936 pdfdir='${docdir}'
937 psdir='${docdir}'
938 libdir='${exec_prefix}/lib'
939 localedir='${datarootdir}/locale'
940 mandir='${datarootdir}/man'
941
942 ac_prev=
943 ac_dashdash=
944 for ac_option
945 do
946   # If the previous option needs an argument, assign it.
947   if test -n "$ac_prev"; then
948     eval $ac_prev=\$ac_option
949     ac_prev=
950     continue
951   fi
952
953   case $ac_option in
954   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
955   *=)   ac_optarg= ;;
956   *)    ac_optarg=yes ;;
957   esac
958
959   # Accept the important Cygnus configure options, so we can diagnose typos.
960
961   case $ac_dashdash$ac_option in
962   --)
963     ac_dashdash=yes ;;
964
965   -bindir | --bindir | --bindi | --bind | --bin | --bi)
966     ac_prev=bindir ;;
967   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
968     bindir=$ac_optarg ;;
969
970   -build | --build | --buil | --bui | --bu)
971     ac_prev=build_alias ;;
972   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
973     build_alias=$ac_optarg ;;
974
975   -cache-file | --cache-file | --cache-fil | --cache-fi \
976   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
977     ac_prev=cache_file ;;
978   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
979   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
980     cache_file=$ac_optarg ;;
981
982   --config-cache | -C)
983     cache_file=config.cache ;;
984
985   -datadir | --datadir | --datadi | --datad)
986     ac_prev=datadir ;;
987   -datadir=* | --datadir=* | --datadi=* | --datad=*)
988     datadir=$ac_optarg ;;
989
990   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
991   | --dataroo | --dataro | --datar)
992     ac_prev=datarootdir ;;
993   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
994   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
995     datarootdir=$ac_optarg ;;
996
997   -disable-* | --disable-*)
998     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
999     # Reject names that are not valid shell variable names.
1000     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1001       as_fn_error $? "invalid feature name: $ac_useropt"
1002     ac_useropt_orig=$ac_useropt
1003     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1004     case $ac_user_opts in
1005       *"
1006 "enable_$ac_useropt"
1007 "*) ;;
1008       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1009          ac_unrecognized_sep=', ';;
1010     esac
1011     eval enable_$ac_useropt=no ;;
1012
1013   -docdir | --docdir | --docdi | --doc | --do)
1014     ac_prev=docdir ;;
1015   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1016     docdir=$ac_optarg ;;
1017
1018   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1019     ac_prev=dvidir ;;
1020   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1021     dvidir=$ac_optarg ;;
1022
1023   -enable-* | --enable-*)
1024     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1025     # Reject names that are not valid shell variable names.
1026     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1027       as_fn_error $? "invalid feature name: $ac_useropt"
1028     ac_useropt_orig=$ac_useropt
1029     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1030     case $ac_user_opts in
1031       *"
1032 "enable_$ac_useropt"
1033 "*) ;;
1034       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1035          ac_unrecognized_sep=', ';;
1036     esac
1037     eval enable_$ac_useropt=\$ac_optarg ;;
1038
1039   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1040   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1041   | --exec | --exe | --ex)
1042     ac_prev=exec_prefix ;;
1043   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1044   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1045   | --exec=* | --exe=* | --ex=*)
1046     exec_prefix=$ac_optarg ;;
1047
1048   -gas | --gas | --ga | --g)
1049     # Obsolete; use --with-gas.
1050     with_gas=yes ;;
1051
1052   -help | --help | --hel | --he | -h)
1053     ac_init_help=long ;;
1054   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1055     ac_init_help=recursive ;;
1056   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1057     ac_init_help=short ;;
1058
1059   -host | --host | --hos | --ho)
1060     ac_prev=host_alias ;;
1061   -host=* | --host=* | --hos=* | --ho=*)
1062     host_alias=$ac_optarg ;;
1063
1064   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1065     ac_prev=htmldir ;;
1066   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1067   | --ht=*)
1068     htmldir=$ac_optarg ;;
1069
1070   -includedir | --includedir | --includedi | --included | --include \
1071   | --includ | --inclu | --incl | --inc)
1072     ac_prev=includedir ;;
1073   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1074   | --includ=* | --inclu=* | --incl=* | --inc=*)
1075     includedir=$ac_optarg ;;
1076
1077   -infodir | --infodir | --infodi | --infod | --info | --inf)
1078     ac_prev=infodir ;;
1079   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1080     infodir=$ac_optarg ;;
1081
1082   -libdir | --libdir | --libdi | --libd)
1083     ac_prev=libdir ;;
1084   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1085     libdir=$ac_optarg ;;
1086
1087   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1088   | --libexe | --libex | --libe)
1089     ac_prev=libexecdir ;;
1090   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1091   | --libexe=* | --libex=* | --libe=*)
1092     libexecdir=$ac_optarg ;;
1093
1094   -localedir | --localedir | --localedi | --localed | --locale)
1095     ac_prev=localedir ;;
1096   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1097     localedir=$ac_optarg ;;
1098
1099   -localstatedir | --localstatedir | --localstatedi | --localstated \
1100   | --localstate | --localstat | --localsta | --localst | --locals)
1101     ac_prev=localstatedir ;;
1102   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1103   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1104     localstatedir=$ac_optarg ;;
1105
1106   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1107     ac_prev=mandir ;;
1108   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1109     mandir=$ac_optarg ;;
1110
1111   -nfp | --nfp | --nf)
1112     # Obsolete; use --without-fp.
1113     with_fp=no ;;
1114
1115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1116   | --no-cr | --no-c | -n)
1117     no_create=yes ;;
1118
1119   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1120   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1121     no_recursion=yes ;;
1122
1123   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1124   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1125   | --oldin | --oldi | --old | --ol | --o)
1126     ac_prev=oldincludedir ;;
1127   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1128   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1129   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1130     oldincludedir=$ac_optarg ;;
1131
1132   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1133     ac_prev=prefix ;;
1134   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1135     prefix=$ac_optarg ;;
1136
1137   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1138   | --program-pre | --program-pr | --program-p)
1139     ac_prev=program_prefix ;;
1140   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1141   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1142     program_prefix=$ac_optarg ;;
1143
1144   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1145   | --program-suf | --program-su | --program-s)
1146     ac_prev=program_suffix ;;
1147   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1148   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1149     program_suffix=$ac_optarg ;;
1150
1151   -program-transform-name | --program-transform-name \
1152   | --program-transform-nam | --program-transform-na \
1153   | --program-transform-n | --program-transform- \
1154   | --program-transform | --program-transfor \
1155   | --program-transfo | --program-transf \
1156   | --program-trans | --program-tran \
1157   | --progr-tra | --program-tr | --program-t)
1158     ac_prev=program_transform_name ;;
1159   -program-transform-name=* | --program-transform-name=* \
1160   | --program-transform-nam=* | --program-transform-na=* \
1161   | --program-transform-n=* | --program-transform-=* \
1162   | --program-transform=* | --program-transfor=* \
1163   | --program-transfo=* | --program-transf=* \
1164   | --program-trans=* | --program-tran=* \
1165   | --progr-tra=* | --program-tr=* | --program-t=*)
1166     program_transform_name=$ac_optarg ;;
1167
1168   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1169     ac_prev=pdfdir ;;
1170   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1171     pdfdir=$ac_optarg ;;
1172
1173   -psdir | --psdir | --psdi | --psd | --ps)
1174     ac_prev=psdir ;;
1175   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1176     psdir=$ac_optarg ;;
1177
1178   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1179   | -silent | --silent | --silen | --sile | --sil)
1180     silent=yes ;;
1181
1182   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1183     ac_prev=sbindir ;;
1184   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1185   | --sbi=* | --sb=*)
1186     sbindir=$ac_optarg ;;
1187
1188   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1189   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1190   | --sharedst | --shareds | --shared | --share | --shar \
1191   | --sha | --sh)
1192     ac_prev=sharedstatedir ;;
1193   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1194   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1195   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1196   | --sha=* | --sh=*)
1197     sharedstatedir=$ac_optarg ;;
1198
1199   -site | --site | --sit)
1200     ac_prev=site ;;
1201   -site=* | --site=* | --sit=*)
1202     site=$ac_optarg ;;
1203
1204   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1205     ac_prev=srcdir ;;
1206   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1207     srcdir=$ac_optarg ;;
1208
1209   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1210   | --syscon | --sysco | --sysc | --sys | --sy)
1211     ac_prev=sysconfdir ;;
1212   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1213   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1214     sysconfdir=$ac_optarg ;;
1215
1216   -target | --target | --targe | --targ | --tar | --ta | --t)
1217     ac_prev=target_alias ;;
1218   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1219     target_alias=$ac_optarg ;;
1220
1221   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1222     verbose=yes ;;
1223
1224   -version | --version | --versio | --versi | --vers | -V)
1225     ac_init_version=: ;;
1226
1227   -with-* | --with-*)
1228     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1229     # Reject names that are not valid shell variable names.
1230     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1231       as_fn_error $? "invalid package name: $ac_useropt"
1232     ac_useropt_orig=$ac_useropt
1233     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1234     case $ac_user_opts in
1235       *"
1236 "with_$ac_useropt"
1237 "*) ;;
1238       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1239          ac_unrecognized_sep=', ';;
1240     esac
1241     eval with_$ac_useropt=\$ac_optarg ;;
1242
1243   -without-* | --without-*)
1244     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1245     # Reject names that are not valid shell variable names.
1246     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1247       as_fn_error $? "invalid package name: $ac_useropt"
1248     ac_useropt_orig=$ac_useropt
1249     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1250     case $ac_user_opts in
1251       *"
1252 "with_$ac_useropt"
1253 "*) ;;
1254       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1255          ac_unrecognized_sep=', ';;
1256     esac
1257     eval with_$ac_useropt=no ;;
1258
1259   --x)
1260     # Obsolete; use --with-x.
1261     with_x=yes ;;
1262
1263   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1264   | --x-incl | --x-inc | --x-in | --x-i)
1265     ac_prev=x_includes ;;
1266   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1267   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1268     x_includes=$ac_optarg ;;
1269
1270   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1271   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1272     ac_prev=x_libraries ;;
1273   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1274   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1275     x_libraries=$ac_optarg ;;
1276
1277   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1278 Try \`$0 --help' for more information"
1279     ;;
1280
1281   *=*)
1282     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1283     # Reject names that are not valid shell variable names.
1284     case $ac_envvar in #(
1285       '' | [0-9]* | *[!_$as_cr_alnum]* )
1286       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1287     esac
1288     eval $ac_envvar=\$ac_optarg
1289     export $ac_envvar ;;
1290
1291   *)
1292     # FIXME: should be removed in autoconf 3.0.
1293     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1294     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1295       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1296     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1297     ;;
1298
1299   esac
1300 done
1301
1302 if test -n "$ac_prev"; then
1303   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1304   as_fn_error $? "missing argument to $ac_option"
1305 fi
1306
1307 if test -n "$ac_unrecognized_opts"; then
1308   case $enable_option_checking in
1309     no) ;;
1310     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1311     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1312   esac
1313 fi
1314
1315 # Check all directory arguments for consistency.
1316 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1317                 datadir sysconfdir sharedstatedir localstatedir includedir \
1318                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1319                 libdir localedir mandir
1320 do
1321   eval ac_val=\$$ac_var
1322   # Remove trailing slashes.
1323   case $ac_val in
1324     */ )
1325       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1326       eval $ac_var=\$ac_val;;
1327   esac
1328   # Be sure to have absolute directory names.
1329   case $ac_val in
1330     [\\/$]* | ?:[\\/]* )  continue;;
1331     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1332   esac
1333   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1334 done
1335
1336 # There might be people who depend on the old broken behavior: `$host'
1337 # used to hold the argument of --host etc.
1338 # FIXME: To remove some day.
1339 build=$build_alias
1340 host=$host_alias
1341 target=$target_alias
1342
1343 # FIXME: To remove some day.
1344 if test "x$host_alias" != x; then
1345   if test "x$build_alias" = x; then
1346     cross_compiling=maybe
1347   elif test "x$build_alias" != "x$host_alias"; then
1348     cross_compiling=yes
1349   fi
1350 fi
1351
1352 ac_tool_prefix=
1353 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1354
1355 test "$silent" = yes && exec 6>/dev/null
1356
1357
1358 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1359 ac_ls_di=`ls -di .` &&
1360 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1361   as_fn_error $? "working directory cannot be determined"
1362 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1363   as_fn_error $? "pwd does not report name of working directory"
1364
1365
1366 # Find the source files, if location was not specified.
1367 if test -z "$srcdir"; then
1368   ac_srcdir_defaulted=yes
1369   # Try the directory containing this script, then the parent directory.
1370   ac_confdir=`$as_dirname -- "$as_myself" ||
1371 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1372          X"$as_myself" : 'X\(//\)[^/]' \| \
1373          X"$as_myself" : 'X\(//\)$' \| \
1374          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1375 $as_echo X"$as_myself" |
1376     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1377             s//\1/
1378             q
1379           }
1380           /^X\(\/\/\)[^/].*/{
1381             s//\1/
1382             q
1383           }
1384           /^X\(\/\/\)$/{
1385             s//\1/
1386             q
1387           }
1388           /^X\(\/\).*/{
1389             s//\1/
1390             q
1391           }
1392           s/.*/./; q'`
1393   srcdir=$ac_confdir
1394   if test ! -r "$srcdir/$ac_unique_file"; then
1395     srcdir=..
1396   fi
1397 else
1398   ac_srcdir_defaulted=no
1399 fi
1400 if test ! -r "$srcdir/$ac_unique_file"; then
1401   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1402   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1403 fi
1404 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1405 ac_abs_confdir=`(
1406         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1407         pwd)`
1408 # When building in place, set srcdir=.
1409 if test "$ac_abs_confdir" = "$ac_pwd"; then
1410   srcdir=.
1411 fi
1412 # Remove unnecessary trailing slashes from srcdir.
1413 # Double slashes in file names in object file debugging info
1414 # mess up M-x gdb in Emacs.
1415 case $srcdir in
1416 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1417 esac
1418 for ac_var in $ac_precious_vars; do
1419   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1420   eval ac_env_${ac_var}_value=\$${ac_var}
1421   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1422   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1423 done
1424
1425 #
1426 # Report the --help message.
1427 #
1428 if test "$ac_init_help" = "long"; then
1429   # Omit some internal or obsolete options to make the list less imposing.
1430   # This message is too long to be a string in the A/UX 3.1 sh.
1431   cat <<_ACEOF
1432 \`configure' configures PostgreSQL 12devel to adapt to many kinds of systems.
1433
1434 Usage: $0 [OPTION]... [VAR=VALUE]...
1435
1436 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1437 VAR=VALUE.  See below for descriptions of some of the useful variables.
1438
1439 Defaults for the options are specified in brackets.
1440
1441 Configuration:
1442   -h, --help              display this help and exit
1443       --help=short        display options specific to this package
1444       --help=recursive    display the short help of all the included packages
1445   -V, --version           display version information and exit
1446   -q, --quiet, --silent   do not print \`checking ...' messages
1447       --cache-file=FILE   cache test results in FILE [disabled]
1448   -C, --config-cache      alias for \`--cache-file=config.cache'
1449   -n, --no-create         do not create output files
1450       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1451
1452 Installation directories:
1453   --prefix=PREFIX         install architecture-independent files in PREFIX
1454                           [$ac_default_prefix]
1455   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1456                           [PREFIX]
1457
1458 By default, \`make install' will install all the files in
1459 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1460 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1461 for instance \`--prefix=\$HOME'.
1462
1463 For better control, use the options below.
1464
1465 Fine tuning of the installation directories:
1466   --bindir=DIR            user executables [EPREFIX/bin]
1467   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1468   --libexecdir=DIR        program executables [EPREFIX/libexec]
1469   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1470   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1471   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1472   --libdir=DIR            object code libraries [EPREFIX/lib]
1473   --includedir=DIR        C header files [PREFIX/include]
1474   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1475   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1476   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1477   --infodir=DIR           info documentation [DATAROOTDIR/info]
1478   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1479   --mandir=DIR            man documentation [DATAROOTDIR/man]
1480   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1481   --htmldir=DIR           html documentation [DOCDIR]
1482   --dvidir=DIR            dvi documentation [DOCDIR]
1483   --pdfdir=DIR            pdf documentation [DOCDIR]
1484   --psdir=DIR             ps documentation [DOCDIR]
1485 _ACEOF
1486
1487   cat <<\_ACEOF
1488
1489 System types:
1490   --build=BUILD     configure for building on BUILD [guessed]
1491   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1492 _ACEOF
1493 fi
1494
1495 if test -n "$ac_init_help"; then
1496   case $ac_init_help in
1497      short | recursive ) echo "Configuration of PostgreSQL 12devel:";;
1498    esac
1499   cat <<\_ACEOF
1500
1501 Optional Features:
1502   --disable-option-checking  ignore unrecognized --enable/--with options
1503   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1504   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1505   --disable-integer-datetimes
1506                           obsolete option, no longer supported
1507   --enable-nls[=LANGUAGES]
1508                           enable Native Language Support
1509   --disable-rpath         do not embed shared library search path in
1510                           executables
1511   --disable-spinlocks     do not use spinlocks
1512   --disable-atomics       do not use atomic operations
1513   --disable-strong-random do not use a strong random number source
1514   --enable-debug          build with debugging symbols (-g)
1515   --enable-profiling      build with profiling enabled
1516   --enable-coverage       build with coverage testing instrumentation
1517   --enable-dtrace         build with DTrace support
1518   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1519   --enable-depend         turn on automatic dependency tracking
1520   --enable-cassert        enable assertion checks (for debugging)
1521   --disable-thread-safety disable thread-safety in client libraries
1522   --disable-largefile     omit support for large files
1523   --disable-float4-byval  disable float4 passed by value
1524   --disable-float8-byval  disable float8 passed by value
1525
1526 Optional Packages:
1527   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1528   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1529   --with-extra-version=STRING
1530                           append STRING to version
1531   --with-template=NAME    override operating system template
1532   --with-includes=DIRS    look for additional header files in DIRS
1533   --with-libraries=DIRS   look for additional libraries in DIRS
1534   --with-libs=DIRS        alternative spelling of --with-libraries
1535   --with-pgport=PORTNUM   set default port number [5432]
1536   --with-blocksize=BLOCKSIZE
1537                           set table block size in kB [8]
1538   --with-segsize=SEGSIZE  set table segment size in GB [1]
1539   --with-wal-blocksize=BLOCKSIZE
1540                           set WAL block size in kB [8]
1541   --with-CC=CMD           set compiler (deprecated)
1542   --with-llvm             build with LLVM based JIT support
1543   --with-icu              build with ICU support
1544   --with-tcl              build Tcl modules (PL/Tcl)
1545   --with-tclconfig=DIR    tclConfig.sh is in DIR
1546   --with-perl             build Perl modules (PL/Perl)
1547   --with-python           build Python modules (PL/Python)
1548   --with-gssapi           build with GSSAPI support
1549   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1550                           [postgres]
1551   --with-pam              build with PAM support
1552   --with-bsd-auth         build with BSD Authentication support
1553   --with-ldap             build with LDAP support
1554   --with-bonjour          build with Bonjour support
1555   --with-openssl          build with OpenSSL support
1556   --with-selinux          build with SELinux support
1557   --with-systemd          build with systemd support
1558   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1559   --with-libedit-preferred
1560                           prefer BSD Libedit over GNU Readline
1561   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1562   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1563   --with-libxml           build with XML support
1564   --with-libxslt          use XSLT support when building contrib/xml2
1565   --with-system-tzdata=DIR
1566                           use system time zone data in DIR
1567   --without-zlib          do not use Zlib
1568   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1569
1570 Some influential environment variables:
1571   CC          C compiler command
1572   CFLAGS      C compiler flags
1573   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1574               nonstandard directory <lib dir>
1575   LIBS        libraries to pass to the linker, e.g. -l<library>
1576   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1577               you have headers in a nonstandard directory <include dir>
1578   CXX         C++ compiler command
1579   CXXFLAGS    C++ compiler flags
1580   LLVM_CONFIG path to llvm-config command
1581   CLANG       path to clang compiler to generate bitcode
1582   CPP         C preprocessor
1583   PKG_CONFIG  path to pkg-config utility
1584   PKG_CONFIG_PATH
1585               directories to add to pkg-config's search path
1586   PKG_CONFIG_LIBDIR
1587               path overriding pkg-config's built-in search path
1588   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1589   ICU_LIBS    linker flags for ICU, overriding pkg-config
1590   LDFLAGS_EX  extra linker flags for linking executables only
1591   LDFLAGS_SL  extra linker flags for linking shared libraries only
1592
1593 Use these variables to override the choices made by `configure' or to help
1594 it to find libraries and programs with nonstandard names/locations.
1595
1596 Report bugs to <pgsql-bugs@postgresql.org>.
1597 _ACEOF
1598 ac_status=$?
1599 fi
1600
1601 if test "$ac_init_help" = "recursive"; then
1602   # If there are subdirs, report their specific --help.
1603   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1604     test -d "$ac_dir" ||
1605       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1606       continue
1607     ac_builddir=.
1608
1609 case "$ac_dir" in
1610 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1611 *)
1612   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1613   # A ".." for each directory in $ac_dir_suffix.
1614   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1615   case $ac_top_builddir_sub in
1616   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1617   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1618   esac ;;
1619 esac
1620 ac_abs_top_builddir=$ac_pwd
1621 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1622 # for backward compatibility:
1623 ac_top_builddir=$ac_top_build_prefix
1624
1625 case $srcdir in
1626   .)  # We are building in place.
1627     ac_srcdir=.
1628     ac_top_srcdir=$ac_top_builddir_sub
1629     ac_abs_top_srcdir=$ac_pwd ;;
1630   [\\/]* | ?:[\\/]* )  # Absolute name.
1631     ac_srcdir=$srcdir$ac_dir_suffix;
1632     ac_top_srcdir=$srcdir
1633     ac_abs_top_srcdir=$srcdir ;;
1634   *) # Relative name.
1635     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1636     ac_top_srcdir=$ac_top_build_prefix$srcdir
1637     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1638 esac
1639 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1640
1641     cd "$ac_dir" || { ac_status=$?; continue; }
1642     # Check for guested configure.
1643     if test -f "$ac_srcdir/configure.gnu"; then
1644       echo &&
1645       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1646     elif test -f "$ac_srcdir/configure"; then
1647       echo &&
1648       $SHELL "$ac_srcdir/configure" --help=recursive
1649     else
1650       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1651     fi || ac_status=$?
1652     cd "$ac_pwd" || { ac_status=$?; break; }
1653   done
1654 fi
1655
1656 test -n "$ac_init_help" && exit $ac_status
1657 if $ac_init_version; then
1658   cat <<\_ACEOF
1659 PostgreSQL configure 12devel
1660 generated by GNU Autoconf 2.69
1661
1662 Copyright (C) 2012 Free Software Foundation, Inc.
1663 This configure script is free software; the Free Software Foundation
1664 gives unlimited permission to copy, distribute and modify it.
1665
1666 Copyright (c) 1996-2018, PostgreSQL Global Development Group
1667 _ACEOF
1668   exit
1669 fi
1670
1671 ## ------------------------ ##
1672 ## Autoconf initialization. ##
1673 ## ------------------------ ##
1674
1675 # ac_fn_c_try_compile LINENO
1676 # --------------------------
1677 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1678 ac_fn_c_try_compile ()
1679 {
1680   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1681   rm -f conftest.$ac_objext
1682   if { { ac_try="$ac_compile"
1683 case "(($ac_try" in
1684   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685   *) ac_try_echo=$ac_try;;
1686 esac
1687 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688 $as_echo "$ac_try_echo"; } >&5
1689   (eval "$ac_compile") 2>conftest.err
1690   ac_status=$?
1691   if test -s conftest.err; then
1692     grep -v '^ *+' conftest.err >conftest.er1
1693     cat conftest.er1 >&5
1694     mv -f conftest.er1 conftest.err
1695   fi
1696   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697   test $ac_status = 0; } && {
1698          test -z "$ac_c_werror_flag" ||
1699          test ! -s conftest.err
1700        } && test -s conftest.$ac_objext; then :
1701   ac_retval=0
1702 else
1703   $as_echo "$as_me: failed program was:" >&5
1704 sed 's/^/| /' conftest.$ac_ext >&5
1705
1706         ac_retval=1
1707 fi
1708   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709   as_fn_set_status $ac_retval
1710
1711 } # ac_fn_c_try_compile
1712
1713 # ac_fn_cxx_try_compile LINENO
1714 # ----------------------------
1715 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1716 ac_fn_cxx_try_compile ()
1717 {
1718   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719   rm -f conftest.$ac_objext
1720   if { { ac_try="$ac_compile"
1721 case "(($ac_try" in
1722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723   *) ac_try_echo=$ac_try;;
1724 esac
1725 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726 $as_echo "$ac_try_echo"; } >&5
1727   (eval "$ac_compile") 2>conftest.err
1728   ac_status=$?
1729   if test -s conftest.err; then
1730     grep -v '^ *+' conftest.err >conftest.er1
1731     cat conftest.er1 >&5
1732     mv -f conftest.er1 conftest.err
1733   fi
1734   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735   test $ac_status = 0; } && {
1736          test -z "$ac_cxx_werror_flag" ||
1737          test ! -s conftest.err
1738        } && test -s conftest.$ac_objext; then :
1739   ac_retval=0
1740 else
1741   $as_echo "$as_me: failed program was:" >&5
1742 sed 's/^/| /' conftest.$ac_ext >&5
1743
1744         ac_retval=1
1745 fi
1746   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1747   as_fn_set_status $ac_retval
1748
1749 } # ac_fn_cxx_try_compile
1750
1751 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1752 # ---------------------------------------------
1753 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1754 # accordingly.
1755 ac_fn_c_check_decl ()
1756 {
1757   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1758   as_decl_name=`echo $2|sed 's/ *(.*//'`
1759   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1761 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1762 if eval \${$3+:} false; then :
1763   $as_echo_n "(cached) " >&6
1764 else
1765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1766 /* end confdefs.h.  */
1767 $4
1768 int
1769 main ()
1770 {
1771 #ifndef $as_decl_name
1772 #ifdef __cplusplus
1773   (void) $as_decl_use;
1774 #else
1775   (void) $as_decl_name;
1776 #endif
1777 #endif
1778
1779   ;
1780   return 0;
1781 }
1782 _ACEOF
1783 if ac_fn_c_try_compile "$LINENO"; then :
1784   eval "$3=yes"
1785 else
1786   eval "$3=no"
1787 fi
1788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1789 fi
1790 eval ac_res=\$$3
1791                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1792 $as_echo "$ac_res" >&6; }
1793   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1794
1795 } # ac_fn_c_check_decl
1796
1797 # ac_fn_c_try_link LINENO
1798 # -----------------------
1799 # Try to link conftest.$ac_ext, and return whether this succeeded.
1800 ac_fn_c_try_link ()
1801 {
1802   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1803   rm -f conftest.$ac_objext conftest$ac_exeext
1804   if { { ac_try="$ac_link"
1805 case "(($ac_try" in
1806   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1807   *) ac_try_echo=$ac_try;;
1808 esac
1809 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1810 $as_echo "$ac_try_echo"; } >&5
1811   (eval "$ac_link") 2>conftest.err
1812   ac_status=$?
1813   if test -s conftest.err; then
1814     grep -v '^ *+' conftest.err >conftest.er1
1815     cat conftest.er1 >&5
1816     mv -f conftest.er1 conftest.err
1817   fi
1818   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1819   test $ac_status = 0; } && {
1820          test -z "$ac_c_werror_flag" ||
1821          test ! -s conftest.err
1822        } && test -s conftest$ac_exeext && {
1823          test "$cross_compiling" = yes ||
1824          test -x conftest$ac_exeext
1825        }; then :
1826   ac_retval=0
1827 else
1828   $as_echo "$as_me: failed program was:" >&5
1829 sed 's/^/| /' conftest.$ac_ext >&5
1830
1831         ac_retval=1
1832 fi
1833   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1834   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1835   # interfere with the next link command; also delete a directory that is
1836   # left behind by Apple's compiler.  We do this before executing the actions.
1837   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1838   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1839   as_fn_set_status $ac_retval
1840
1841 } # ac_fn_c_try_link
1842
1843 # ac_fn_c_try_cpp LINENO
1844 # ----------------------
1845 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1846 ac_fn_c_try_cpp ()
1847 {
1848   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1849   if { { ac_try="$ac_cpp conftest.$ac_ext"
1850 case "(($ac_try" in
1851   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1852   *) ac_try_echo=$ac_try;;
1853 esac
1854 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1855 $as_echo "$ac_try_echo"; } >&5
1856   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1857   ac_status=$?
1858   if test -s conftest.err; then
1859     grep -v '^ *+' conftest.err >conftest.er1
1860     cat conftest.er1 >&5
1861     mv -f conftest.er1 conftest.err
1862   fi
1863   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1864   test $ac_status = 0; } > conftest.i && {
1865          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1866          test ! -s conftest.err
1867        }; then :
1868   ac_retval=0
1869 else
1870   $as_echo "$as_me: failed program was:" >&5
1871 sed 's/^/| /' conftest.$ac_ext >&5
1872
1873     ac_retval=1
1874 fi
1875   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1876   as_fn_set_status $ac_retval
1877
1878 } # ac_fn_c_try_cpp
1879
1880 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1881 # -------------------------------------------------------
1882 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1883 # the include files in INCLUDES and setting the cache variable VAR
1884 # accordingly.
1885 ac_fn_c_check_header_mongrel ()
1886 {
1887   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1888   if eval \${$3+:} false; then :
1889   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1890 $as_echo_n "checking for $2... " >&6; }
1891 if eval \${$3+:} false; then :
1892   $as_echo_n "(cached) " >&6
1893 fi
1894 eval ac_res=\$$3
1895                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1896 $as_echo "$ac_res" >&6; }
1897 else
1898   # Is the header compilable?
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1900 $as_echo_n "checking $2 usability... " >&6; }
1901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1902 /* end confdefs.h.  */
1903 $4
1904 #include <$2>
1905 _ACEOF
1906 if ac_fn_c_try_compile "$LINENO"; then :
1907   ac_header_compiler=yes
1908 else
1909   ac_header_compiler=no
1910 fi
1911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1913 $as_echo "$ac_header_compiler" >&6; }
1914
1915 # Is the header present?
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1917 $as_echo_n "checking $2 presence... " >&6; }
1918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1919 /* end confdefs.h.  */
1920 #include <$2>
1921 _ACEOF
1922 if ac_fn_c_try_cpp "$LINENO"; then :
1923   ac_header_preproc=yes
1924 else
1925   ac_header_preproc=no
1926 fi
1927 rm -f conftest.err conftest.i conftest.$ac_ext
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1929 $as_echo "$ac_header_preproc" >&6; }
1930
1931 # So?  What about this header?
1932 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1933   yes:no: )
1934     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1935 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1936     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1937 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1938     ;;
1939   no:yes:* )
1940     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1941 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1942     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1943 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1944     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1945 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1946     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1947 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1948     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1949 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1950 ( $as_echo "## ---------------------------------------- ##
1951 ## Report this to pgsql-bugs@postgresql.org ##
1952 ## ---------------------------------------- ##"
1953      ) | sed "s/^/$as_me: WARNING:     /" >&2
1954     ;;
1955 esac
1956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1957 $as_echo_n "checking for $2... " >&6; }
1958 if eval \${$3+:} false; then :
1959   $as_echo_n "(cached) " >&6
1960 else
1961   eval "$3=\$ac_header_compiler"
1962 fi
1963 eval ac_res=\$$3
1964                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1965 $as_echo "$ac_res" >&6; }
1966 fi
1967   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1968
1969 } # ac_fn_c_check_header_mongrel
1970
1971 # ac_fn_c_try_run LINENO
1972 # ----------------------
1973 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1974 # that executables *can* be run.
1975 ac_fn_c_try_run ()
1976 {
1977   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1978   if { { ac_try="$ac_link"
1979 case "(($ac_try" in
1980   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1981   *) ac_try_echo=$ac_try;;
1982 esac
1983 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1984 $as_echo "$ac_try_echo"; } >&5
1985   (eval "$ac_link") 2>&5
1986   ac_status=$?
1987   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1988   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1989   { { case "(($ac_try" in
1990   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1991   *) ac_try_echo=$ac_try;;
1992 esac
1993 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1994 $as_echo "$ac_try_echo"; } >&5
1995   (eval "$ac_try") 2>&5
1996   ac_status=$?
1997   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1998   test $ac_status = 0; }; }; then :
1999   ac_retval=0
2000 else
2001   $as_echo "$as_me: program exited with status $ac_status" >&5
2002        $as_echo "$as_me: failed program was:" >&5
2003 sed 's/^/| /' conftest.$ac_ext >&5
2004
2005        ac_retval=$ac_status
2006 fi
2007   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2008   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2009   as_fn_set_status $ac_retval
2010
2011 } # ac_fn_c_try_run
2012
2013 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2014 # -------------------------------------------------------
2015 # Tests whether HEADER exists and can be compiled using the include files in
2016 # INCLUDES, setting the cache variable VAR accordingly.
2017 ac_fn_c_check_header_compile ()
2018 {
2019   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2020   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2021 $as_echo_n "checking for $2... " >&6; }
2022 if eval \${$3+:} false; then :
2023   $as_echo_n "(cached) " >&6
2024 else
2025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026 /* end confdefs.h.  */
2027 $4
2028 #include <$2>
2029 _ACEOF
2030 if ac_fn_c_try_compile "$LINENO"; then :
2031   eval "$3=yes"
2032 else
2033   eval "$3=no"
2034 fi
2035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036 fi
2037 eval ac_res=\$$3
2038                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2039 $as_echo "$ac_res" >&6; }
2040   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2041
2042 } # ac_fn_c_check_header_compile
2043
2044 # ac_fn_c_check_func LINENO FUNC VAR
2045 # ----------------------------------
2046 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2047 ac_fn_c_check_func ()
2048 {
2049   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2050   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2051 $as_echo_n "checking for $2... " >&6; }
2052 if eval \${$3+:} false; then :
2053   $as_echo_n "(cached) " >&6
2054 else
2055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056 /* end confdefs.h.  */
2057 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2058    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2059 #define $2 innocuous_$2
2060
2061 /* System header to define __stub macros and hopefully few prototypes,
2062     which can conflict with char $2 (); below.
2063     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2064     <limits.h> exists even on freestanding compilers.  */
2065
2066 #ifdef __STDC__
2067 # include <limits.h>
2068 #else
2069 # include <assert.h>
2070 #endif
2071
2072 #undef $2
2073
2074 /* Override any GCC internal prototype to avoid an error.
2075    Use char because int might match the return type of a GCC
2076    builtin and then its argument prototype would still apply.  */
2077 #ifdef __cplusplus
2078 extern "C"
2079 #endif
2080 char $2 ();
2081 /* The GNU C library defines this for functions which it implements
2082     to always fail with ENOSYS.  Some functions are actually named
2083     something starting with __ and the normal name is an alias.  */
2084 #if defined __stub_$2 || defined __stub___$2
2085 choke me
2086 #endif
2087
2088 int
2089 main ()
2090 {
2091 return $2 ();
2092   ;
2093   return 0;
2094 }
2095 _ACEOF
2096 if ac_fn_c_try_link "$LINENO"; then :
2097   eval "$3=yes"
2098 else
2099   eval "$3=no"
2100 fi
2101 rm -f core conftest.err conftest.$ac_objext \
2102     conftest$ac_exeext conftest.$ac_ext
2103 fi
2104 eval ac_res=\$$3
2105                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2106 $as_echo "$ac_res" >&6; }
2107   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2108
2109 } # ac_fn_c_check_func
2110
2111 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2112 # -------------------------------------------
2113 # Tests whether TYPE exists after having included INCLUDES, setting cache
2114 # variable VAR accordingly.
2115 ac_fn_c_check_type ()
2116 {
2117   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2118   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2119 $as_echo_n "checking for $2... " >&6; }
2120 if eval \${$3+:} false; then :
2121   $as_echo_n "(cached) " >&6
2122 else
2123   eval "$3=no"
2124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125 /* end confdefs.h.  */
2126 $4
2127 int
2128 main ()
2129 {
2130 if (sizeof ($2))
2131          return 0;
2132   ;
2133   return 0;
2134 }
2135 _ACEOF
2136 if ac_fn_c_try_compile "$LINENO"; then :
2137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138 /* end confdefs.h.  */
2139 $4
2140 int
2141 main ()
2142 {
2143 if (sizeof (($2)))
2144             return 0;
2145   ;
2146   return 0;
2147 }
2148 _ACEOF
2149 if ac_fn_c_try_compile "$LINENO"; then :
2150
2151 else
2152   eval "$3=yes"
2153 fi
2154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155 fi
2156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157 fi
2158 eval ac_res=\$$3
2159                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2160 $as_echo "$ac_res" >&6; }
2161   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2162
2163 } # ac_fn_c_check_type
2164
2165 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2166 # ----------------------------------------------------
2167 # Tries to find if the field MEMBER exists in type AGGR, after including
2168 # INCLUDES, setting cache variable VAR accordingly.
2169 ac_fn_c_check_member ()
2170 {
2171   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2173 $as_echo_n "checking for $2.$3... " >&6; }
2174 if eval \${$4+:} false; then :
2175   $as_echo_n "(cached) " >&6
2176 else
2177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178 /* end confdefs.h.  */
2179 $5
2180 int
2181 main ()
2182 {
2183 static $2 ac_aggr;
2184 if (ac_aggr.$3)
2185 return 0;
2186   ;
2187   return 0;
2188 }
2189 _ACEOF
2190 if ac_fn_c_try_compile "$LINENO"; then :
2191   eval "$4=yes"
2192 else
2193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194 /* end confdefs.h.  */
2195 $5
2196 int
2197 main ()
2198 {
2199 static $2 ac_aggr;
2200 if (sizeof ac_aggr.$3)
2201 return 0;
2202   ;
2203   return 0;
2204 }
2205 _ACEOF
2206 if ac_fn_c_try_compile "$LINENO"; then :
2207   eval "$4=yes"
2208 else
2209   eval "$4=no"
2210 fi
2211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2212 fi
2213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214 fi
2215 eval ac_res=\$$4
2216                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2217 $as_echo "$ac_res" >&6; }
2218   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2219
2220 } # ac_fn_c_check_member
2221
2222 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2223 # --------------------------------------------
2224 # Tries to find the compile-time value of EXPR in a program that includes
2225 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2226 # computed
2227 ac_fn_c_compute_int ()
2228 {
2229   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2230   if test "$cross_compiling" = yes; then
2231     # Depending upon the size, compute the lo and hi bounds.
2232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233 /* end confdefs.h.  */
2234 $4
2235 int
2236 main ()
2237 {
2238 static int test_array [1 - 2 * !(($2) >= 0)];
2239 test_array [0] = 0;
2240 return test_array [0];
2241
2242   ;
2243   return 0;
2244 }
2245 _ACEOF
2246 if ac_fn_c_try_compile "$LINENO"; then :
2247   ac_lo=0 ac_mid=0
2248   while :; do
2249     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250 /* end confdefs.h.  */
2251 $4
2252 int
2253 main ()
2254 {
2255 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2256 test_array [0] = 0;
2257 return test_array [0];
2258
2259   ;
2260   return 0;
2261 }
2262 _ACEOF
2263 if ac_fn_c_try_compile "$LINENO"; then :
2264   ac_hi=$ac_mid; break
2265 else
2266   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2267                         if test $ac_lo -le $ac_mid; then
2268                           ac_lo= ac_hi=
2269                           break
2270                         fi
2271                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2272 fi
2273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2274   done
2275 else
2276   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277 /* end confdefs.h.  */
2278 $4
2279 int
2280 main ()
2281 {
2282 static int test_array [1 - 2 * !(($2) < 0)];
2283 test_array [0] = 0;
2284 return test_array [0];
2285
2286   ;
2287   return 0;
2288 }
2289 _ACEOF
2290 if ac_fn_c_try_compile "$LINENO"; then :
2291   ac_hi=-1 ac_mid=-1
2292   while :; do
2293     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294 /* end confdefs.h.  */
2295 $4
2296 int
2297 main ()
2298 {
2299 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2300 test_array [0] = 0;
2301 return test_array [0];
2302
2303   ;
2304   return 0;
2305 }
2306 _ACEOF
2307 if ac_fn_c_try_compile "$LINENO"; then :
2308   ac_lo=$ac_mid; break
2309 else
2310   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2311                         if test $ac_mid -le $ac_hi; then
2312                           ac_lo= ac_hi=
2313                           break
2314                         fi
2315                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2316 fi
2317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318   done
2319 else
2320   ac_lo= ac_hi=
2321 fi
2322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323 fi
2324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325 # Binary search between lo and hi bounds.
2326 while test "x$ac_lo" != "x$ac_hi"; do
2327   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2328   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329 /* end confdefs.h.  */
2330 $4
2331 int
2332 main ()
2333 {
2334 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2335 test_array [0] = 0;
2336 return test_array [0];
2337
2338   ;
2339   return 0;
2340 }
2341 _ACEOF
2342 if ac_fn_c_try_compile "$LINENO"; then :
2343   ac_hi=$ac_mid
2344 else
2345   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2346 fi
2347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348 done
2349 case $ac_lo in #((
2350 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2351 '') ac_retval=1 ;;
2352 esac
2353   else
2354     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355 /* end confdefs.h.  */
2356 $4
2357 static long int longval () { return $2; }
2358 static unsigned long int ulongval () { return $2; }
2359 #include <stdio.h>
2360 #include <stdlib.h>
2361 int
2362 main ()
2363 {
2364
2365   FILE *f = fopen ("conftest.val", "w");
2366   if (! f)
2367     return 1;
2368   if (($2) < 0)
2369     {
2370       long int i = longval ();
2371       if (i != ($2))
2372         return 1;
2373       fprintf (f, "%ld", i);
2374     }
2375   else
2376     {
2377       unsigned long int i = ulongval ();
2378       if (i != ($2))
2379         return 1;
2380       fprintf (f, "%lu", i);
2381     }
2382   /* Do not output a trailing newline, as this causes \r\n confusion
2383      on some platforms.  */
2384   return ferror (f) || fclose (f) != 0;
2385
2386   ;
2387   return 0;
2388 }
2389 _ACEOF
2390 if ac_fn_c_try_run "$LINENO"; then :
2391   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2392 else
2393   ac_retval=1
2394 fi
2395 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2396   conftest.$ac_objext conftest.beam conftest.$ac_ext
2397 rm -f conftest.val
2398
2399   fi
2400   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2401   as_fn_set_status $ac_retval
2402
2403 } # ac_fn_c_compute_int
2404 cat >config.log <<_ACEOF
2405 This file contains any messages produced by compilers while
2406 running configure, to aid debugging if configure makes a mistake.
2407
2408 It was created by PostgreSQL $as_me 12devel, which was
2409 generated by GNU Autoconf 2.69.  Invocation command line was
2410
2411   $ $0 $@
2412
2413 _ACEOF
2414 exec 5>>config.log
2415 {
2416 cat <<_ASUNAME
2417 ## --------- ##
2418 ## Platform. ##
2419 ## --------- ##
2420
2421 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2422 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2423 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2424 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2425 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2426
2427 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2428 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2429
2430 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2431 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2432 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2433 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2434 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2435 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2436 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2437
2438 _ASUNAME
2439
2440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2441 for as_dir in $PATH
2442 do
2443   IFS=$as_save_IFS
2444   test -z "$as_dir" && as_dir=.
2445     $as_echo "PATH: $as_dir"
2446   done
2447 IFS=$as_save_IFS
2448
2449 } >&5
2450
2451 cat >&5 <<_ACEOF
2452
2453
2454 ## ----------- ##
2455 ## Core tests. ##
2456 ## ----------- ##
2457
2458 _ACEOF
2459
2460
2461 # Keep a trace of the command line.
2462 # Strip out --no-create and --no-recursion so they do not pile up.
2463 # Strip out --silent because we don't want to record it for future runs.
2464 # Also quote any args containing shell meta-characters.
2465 # Make two passes to allow for proper duplicate-argument suppression.
2466 ac_configure_args=
2467 ac_configure_args0=
2468 ac_configure_args1=
2469 ac_must_keep_next=false
2470 for ac_pass in 1 2
2471 do
2472   for ac_arg
2473   do
2474     case $ac_arg in
2475     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2476     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2477     | -silent | --silent | --silen | --sile | --sil)
2478       continue ;;
2479     *\'*)
2480       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2481     esac
2482     case $ac_pass in
2483     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2484     2)
2485       as_fn_append ac_configure_args1 " '$ac_arg'"
2486       if test $ac_must_keep_next = true; then
2487         ac_must_keep_next=false # Got value, back to normal.
2488       else
2489         case $ac_arg in
2490           *=* | --config-cache | -C | -disable-* | --disable-* \
2491           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2492           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2493           | -with-* | --with-* | -without-* | --without-* | --x)
2494             case "$ac_configure_args0 " in
2495               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2496             esac
2497             ;;
2498           -* ) ac_must_keep_next=true ;;
2499         esac
2500       fi
2501       as_fn_append ac_configure_args " '$ac_arg'"
2502       ;;
2503     esac
2504   done
2505 done
2506 { ac_configure_args0=; unset ac_configure_args0;}
2507 { ac_configure_args1=; unset ac_configure_args1;}
2508
2509 # When interrupted or exit'd, cleanup temporary files, and complete
2510 # config.log.  We remove comments because anyway the quotes in there
2511 # would cause problems or look ugly.
2512 # WARNING: Use '\'' to represent an apostrophe within the trap.
2513 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2514 trap 'exit_status=$?
2515   # Save into config.log some information that might help in debugging.
2516   {
2517     echo
2518
2519     $as_echo "## ---------------- ##
2520 ## Cache variables. ##
2521 ## ---------------- ##"
2522     echo
2523     # The following way of writing the cache mishandles newlines in values,
2524 (
2525   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2526     eval ac_val=\$$ac_var
2527     case $ac_val in #(
2528     *${as_nl}*)
2529       case $ac_var in #(
2530       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2531 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2532       esac
2533       case $ac_var in #(
2534       _ | IFS | as_nl) ;; #(
2535       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2536       *) { eval $ac_var=; unset $ac_var;} ;;
2537       esac ;;
2538     esac
2539   done
2540   (set) 2>&1 |
2541     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2542     *${as_nl}ac_space=\ *)
2543       sed -n \
2544         "s/'\''/'\''\\\\'\'''\''/g;
2545           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2546       ;; #(
2547     *)
2548       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2549       ;;
2550     esac |
2551     sort
2552 )
2553     echo
2554
2555     $as_echo "## ----------------- ##
2556 ## Output variables. ##
2557 ## ----------------- ##"
2558     echo
2559     for ac_var in $ac_subst_vars
2560     do
2561       eval ac_val=\$$ac_var
2562       case $ac_val in
2563       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2564       esac
2565       $as_echo "$ac_var='\''$ac_val'\''"
2566     done | sort
2567     echo
2568
2569     if test -n "$ac_subst_files"; then
2570       $as_echo "## ------------------- ##
2571 ## File substitutions. ##
2572 ## ------------------- ##"
2573       echo
2574       for ac_var in $ac_subst_files
2575       do
2576         eval ac_val=\$$ac_var
2577         case $ac_val in
2578         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2579         esac
2580         $as_echo "$ac_var='\''$ac_val'\''"
2581       done | sort
2582       echo
2583     fi
2584
2585     if test -s confdefs.h; then
2586       $as_echo "## ----------- ##
2587 ## confdefs.h. ##
2588 ## ----------- ##"
2589       echo
2590       cat confdefs.h
2591       echo
2592     fi
2593     test "$ac_signal" != 0 &&
2594       $as_echo "$as_me: caught signal $ac_signal"
2595     $as_echo "$as_me: exit $exit_status"
2596   } >&5
2597   rm -f core *.core core.conftest.* &&
2598     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2599     exit $exit_status
2600 ' 0
2601 for ac_signal in 1 2 13 15; do
2602   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2603 done
2604 ac_signal=0
2605
2606 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2607 rm -f -r conftest* confdefs.h
2608
2609 $as_echo "/* confdefs.h */" > confdefs.h
2610
2611 # Predefined preprocessor variables.
2612
2613 cat >>confdefs.h <<_ACEOF
2614 #define PACKAGE_NAME "$PACKAGE_NAME"
2615 _ACEOF
2616
2617 cat >>confdefs.h <<_ACEOF
2618 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2619 _ACEOF
2620
2621 cat >>confdefs.h <<_ACEOF
2622 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2623 _ACEOF
2624
2625 cat >>confdefs.h <<_ACEOF
2626 #define PACKAGE_STRING "$PACKAGE_STRING"
2627 _ACEOF
2628
2629 cat >>confdefs.h <<_ACEOF
2630 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2631 _ACEOF
2632
2633 cat >>confdefs.h <<_ACEOF
2634 #define PACKAGE_URL "$PACKAGE_URL"
2635 _ACEOF
2636
2637
2638 # Let the site file select an alternate cache file if it wants to.
2639 # Prefer an explicitly selected file to automatically selected ones.
2640 ac_site_file1=NONE
2641 ac_site_file2=NONE
2642 if test -n "$CONFIG_SITE"; then
2643   # We do not want a PATH search for config.site.
2644   case $CONFIG_SITE in #((
2645     -*)  ac_site_file1=./$CONFIG_SITE;;
2646     */*) ac_site_file1=$CONFIG_SITE;;
2647     *)   ac_site_file1=./$CONFIG_SITE;;
2648   esac
2649 elif test "x$prefix" != xNONE; then
2650   ac_site_file1=$prefix/share/config.site
2651   ac_site_file2=$prefix/etc/config.site
2652 else
2653   ac_site_file1=$ac_default_prefix/share/config.site
2654   ac_site_file2=$ac_default_prefix/etc/config.site
2655 fi
2656 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2657 do
2658   test "x$ac_site_file" = xNONE && continue
2659   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2660     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2661 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2662     sed 's/^/| /' "$ac_site_file" >&5
2663     . "$ac_site_file" \
2664       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 as_fn_error $? "failed to load site script $ac_site_file
2667 See \`config.log' for more details" "$LINENO" 5; }
2668   fi
2669 done
2670
2671 if test -r "$cache_file"; then
2672   # Some versions of bash will fail to source /dev/null (special files
2673   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2674   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2675     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2676 $as_echo "$as_me: loading cache $cache_file" >&6;}
2677     case $cache_file in
2678       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2679       *)                      . "./$cache_file";;
2680     esac
2681   fi
2682 else
2683   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2684 $as_echo "$as_me: creating cache $cache_file" >&6;}
2685   >$cache_file
2686 fi
2687
2688 # Check that the precious variables saved in the cache have kept the same
2689 # value.
2690 ac_cache_corrupted=false
2691 for ac_var in $ac_precious_vars; do
2692   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2693   eval ac_new_set=\$ac_env_${ac_var}_set
2694   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2695   eval ac_new_val=\$ac_env_${ac_var}_value
2696   case $ac_old_set,$ac_new_set in
2697     set,)
2698       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2699 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2700       ac_cache_corrupted=: ;;
2701     ,set)
2702       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2703 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2704       ac_cache_corrupted=: ;;
2705     ,);;
2706     *)
2707       if test "x$ac_old_val" != "x$ac_new_val"; then
2708         # differences in whitespace do not lead to failure.
2709         ac_old_val_w=`echo x $ac_old_val`
2710         ac_new_val_w=`echo x $ac_new_val`
2711         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2712           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2713 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2714           ac_cache_corrupted=:
2715         else
2716           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2717 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2718           eval $ac_var=\$ac_old_val
2719         fi
2720         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2721 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2722         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2723 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2724       fi;;
2725   esac
2726   # Pass precious variables to config.status.
2727   if test "$ac_new_set" = set; then
2728     case $ac_new_val in
2729     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2730     *) ac_arg=$ac_var=$ac_new_val ;;
2731     esac
2732     case " $ac_configure_args " in
2733       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2734       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2735     esac
2736   fi
2737 done
2738 if $ac_cache_corrupted; then
2739   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2740 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2741   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2742 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2743   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2744 fi
2745 ## -------------------- ##
2746 ## Main body of script. ##
2747 ## -------------------- ##
2748
2749 ac_ext=c
2750 ac_cpp='$CPP $CPPFLAGS'
2751 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2752 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2753 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2754
2755
2756
2757
2758
2759
2760 ac_aux_dir=
2761 for ac_dir in config "$srcdir"/config; do
2762   if test -f "$ac_dir/install-sh"; then
2763     ac_aux_dir=$ac_dir
2764     ac_install_sh="$ac_aux_dir/install-sh -c"
2765     break
2766   elif test -f "$ac_dir/install.sh"; then
2767     ac_aux_dir=$ac_dir
2768     ac_install_sh="$ac_aux_dir/install.sh -c"
2769     break
2770   elif test -f "$ac_dir/shtool"; then
2771     ac_aux_dir=$ac_dir
2772     ac_install_sh="$ac_aux_dir/shtool install -c"
2773     break
2774   fi
2775 done
2776 if test -z "$ac_aux_dir"; then
2777   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2778 fi
2779
2780 # These three variables are undocumented and unsupported,
2781 # and are intended to be withdrawn in a future Autoconf release.
2782 # They can cause serious problems if a builder's source tree is in a directory
2783 # whose full name contains unusual characters.
2784 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2785 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2786 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2787
2788
2789
2790 configure_args=$ac_configure_args
2791
2792
2793 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2794
2795
2796 cat >>confdefs.h <<_ACEOF
2797 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2798 _ACEOF
2799
2800
2801
2802
2803
2804 # Check whether --with-extra-version was given.
2805 if test "${with_extra_version+set}" = set; then :
2806   withval=$with_extra_version;
2807   case $withval in
2808     yes)
2809       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2810       ;;
2811     no)
2812       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2813       ;;
2814     *)
2815       PG_VERSION="$PACKAGE_VERSION$withval"
2816       ;;
2817   esac
2818
2819 else
2820   PG_VERSION="$PACKAGE_VERSION"
2821 fi
2822
2823
2824
2825 cat >>confdefs.h <<_ACEOF
2826 #define PG_VERSION "$PG_VERSION"
2827 _ACEOF
2828
2829
2830 # Make sure we can run config.sub.
2831 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2832   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2833
2834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2835 $as_echo_n "checking build system type... " >&6; }
2836 if ${ac_cv_build+:} false; then :
2837   $as_echo_n "(cached) " >&6
2838 else
2839   ac_build_alias=$build_alias
2840 test "x$ac_build_alias" = x &&
2841   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2842 test "x$ac_build_alias" = x &&
2843   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2844 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2845   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2846
2847 fi
2848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2849 $as_echo "$ac_cv_build" >&6; }
2850 case $ac_cv_build in
2851 *-*-*) ;;
2852 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2853 esac
2854 build=$ac_cv_build
2855 ac_save_IFS=$IFS; IFS='-'
2856 set x $ac_cv_build
2857 shift
2858 build_cpu=$1
2859 build_vendor=$2
2860 shift; shift
2861 # Remember, the first character of IFS is used to create $*,
2862 # except with old shells:
2863 build_os=$*
2864 IFS=$ac_save_IFS
2865 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2866
2867
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2869 $as_echo_n "checking host system type... " >&6; }
2870 if ${ac_cv_host+:} false; then :
2871   $as_echo_n "(cached) " >&6
2872 else
2873   if test "x$host_alias" = x; then
2874   ac_cv_host=$ac_cv_build
2875 else
2876   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2877     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2878 fi
2879
2880 fi
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2882 $as_echo "$ac_cv_host" >&6; }
2883 case $ac_cv_host in
2884 *-*-*) ;;
2885 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2886 esac
2887 host=$ac_cv_host
2888 ac_save_IFS=$IFS; IFS='-'
2889 set x $ac_cv_host
2890 shift
2891 host_cpu=$1
2892 host_vendor=$2
2893 shift; shift
2894 # Remember, the first character of IFS is used to create $*,
2895 # except with old shells:
2896 host_os=$*
2897 IFS=$ac_save_IFS
2898 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2899
2900
2901
2902 template=
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2904 $as_echo_n "checking which template to use... " >&6; }
2905
2906
2907
2908
2909 # Check whether --with-template was given.
2910 if test "${with_template+set}" = set; then :
2911   withval=$with_template;
2912   case $withval in
2913     yes)
2914       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2915       ;;
2916     no)
2917       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2918       ;;
2919     *)
2920
2921   case $withval in
2922     list)   echo; ls "$srcdir/src/template"; exit;;
2923     *)      if test -f "$srcdir/src/template/$with_template" ; then
2924               template=$withval
2925             else
2926               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2927             fi;;
2928   esac
2929
2930       ;;
2931   esac
2932
2933 else
2934
2935 # --with-template not given
2936
2937 case $host_os in
2938      aix*) template=aix ;;
2939   cygwin*) template=cygwin ;;
2940   darwin*) template=darwin ;;
2941 dragonfly*) template=netbsd ;;
2942  freebsd*) template=freebsd ;;
2943     hpux*) template=hpux ;;
2944  linux*|gnu*|k*bsd*-gnu)
2945            template=linux ;;
2946    mingw*) template=win32 ;;
2947   netbsd*) template=netbsd ;;
2948  openbsd*) template=openbsd ;;
2949  solaris*) template=solaris ;;
2950 esac
2951
2952   if test x"$template" = x"" ; then
2953     as_fn_error $? "
2954 *******************************************************************
2955 PostgreSQL has apparently not been ported to your platform yet.
2956 To try a manual configuration, look into the src/template directory
2957 for a similar platform and use the '--with-template=' option.
2958
2959 Please also contact <pgsql-bugs@postgresql.org> to see about
2960 rectifying this.  Include the above 'checking host system type...'
2961 line.
2962 *******************************************************************
2963 " "$LINENO" 5
2964   fi
2965
2966
2967 fi
2968
2969
2970
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2972 $as_echo "$template" >&6; }
2973
2974 PORTNAME=$template
2975
2976
2977 # Initialize default assumption that we do not need separate assembly code
2978 # for TAS (test-and-set).  This can be overridden by the template file
2979 # when it's executed.
2980 need_tas=no
2981 tas_file=dummy.s
2982
2983
2984
2985 ##
2986 ## Command line options
2987 ##
2988
2989 #
2990 # Add non-standard directories to the include path
2991 #
2992
2993
2994
2995 # Check whether --with-includes was given.
2996 if test "${with_includes+set}" = set; then :
2997   withval=$with_includes;
2998   case $withval in
2999     yes)
3000       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3001       ;;
3002     no)
3003       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3004       ;;
3005     *)
3006
3007       ;;
3008   esac
3009
3010 fi
3011
3012
3013
3014
3015 #
3016 # Add non-standard directories to the library search path
3017 #
3018
3019
3020
3021 # Check whether --with-libraries was given.
3022 if test "${with_libraries+set}" = set; then :
3023   withval=$with_libraries;
3024   case $withval in
3025     yes)
3026       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3027       ;;
3028     no)
3029       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3030       ;;
3031     *)
3032       LIBRARY_DIRS=$withval
3033       ;;
3034   esac
3035
3036 fi
3037
3038
3039
3040
3041
3042
3043 # Check whether --with-libs was given.
3044 if test "${with_libs+set}" = set; then :
3045   withval=$with_libs;
3046   case $withval in
3047     yes)
3048       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3049       ;;
3050     no)
3051       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3052       ;;
3053     *)
3054       LIBRARY_DIRS=$withval
3055       ;;
3056   esac
3057
3058 fi
3059
3060
3061
3062
3063 #
3064 # 64-bit integer date/time storage is now the only option, but to avoid
3065 # unnecessary breakage of build scripts, continue to accept an explicit
3066 # "--enable-integer-datetimes" switch.
3067 #
3068
3069
3070 # Check whether --enable-integer-datetimes was given.
3071 if test "${enable_integer_datetimes+set}" = set; then :
3072   enableval=$enable_integer_datetimes;
3073   case $enableval in
3074     yes)
3075       :
3076       ;;
3077     no)
3078       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3079       ;;
3080     *)
3081       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3082       ;;
3083   esac
3084
3085 else
3086   enable_integer_datetimes=yes
3087
3088 fi
3089
3090
3091
3092
3093 #
3094 # NLS
3095 #
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3097 $as_echo_n "checking whether NLS is wanted... " >&6; }
3098
3099
3100 # Check whether --enable-nls was given.
3101 if test "${enable_nls+set}" = set; then :
3102   enableval=$enable_nls;
3103   case $enableval in
3104     yes)
3105       :
3106       ;;
3107     no)
3108       :
3109       ;;
3110     *)
3111       enable_nls=yes
3112 WANTED_LANGUAGES=$enableval
3113       ;;
3114   esac
3115
3116 else
3117   enable_nls=no
3118 fi
3119
3120
3121
3122 if test "$enable_nls" = yes; then
3123
3124 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3125
3126 fi
3127
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3129 $as_echo "$enable_nls" >&6; }
3130
3131
3132
3133 #
3134 # Default port number (--with-pgport), default 5432
3135 #
3136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3137 $as_echo_n "checking for default port number... " >&6; }
3138
3139
3140
3141 # Check whether --with-pgport was given.
3142 if test "${with_pgport+set}" = set; then :
3143   withval=$with_pgport;
3144   case $withval in
3145     yes)
3146       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3147       ;;
3148     no)
3149       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3150       ;;
3151     *)
3152       default_port=$withval
3153       ;;
3154   esac
3155
3156 else
3157   default_port=5432
3158 fi
3159
3160
3161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3162 $as_echo "$default_port" >&6; }
3163 # Need both of these because some places want an integer and some a string
3164
3165 cat >>confdefs.h <<_ACEOF
3166 #define DEF_PGPORT ${default_port}
3167 _ACEOF
3168
3169
3170 cat >>confdefs.h <<_ACEOF
3171 #define DEF_PGPORT_STR "${default_port}"
3172 _ACEOF
3173
3174
3175
3176 # It's worth validating port; you can get very confusing errors otherwise
3177 if test x"$default_port" = x""; then
3178   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3179 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3180   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3181 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3182   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3183 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3184   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3185 fi
3186
3187 #
3188 # '-rpath'-like feature can be disabled
3189 #
3190
3191
3192 # Check whether --enable-rpath was given.
3193 if test "${enable_rpath+set}" = set; then :
3194   enableval=$enable_rpath;
3195   case $enableval in
3196     yes)
3197       :
3198       ;;
3199     no)
3200       :
3201       ;;
3202     *)
3203       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3204       ;;
3205   esac
3206
3207 else
3208   enable_rpath=yes
3209
3210 fi
3211
3212
3213
3214
3215 #
3216 # Spinlocks
3217 #
3218
3219
3220 # Check whether --enable-spinlocks was given.
3221 if test "${enable_spinlocks+set}" = set; then :
3222   enableval=$enable_spinlocks;
3223   case $enableval in
3224     yes)
3225       :
3226       ;;
3227     no)
3228       :
3229       ;;
3230     *)
3231       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3232       ;;
3233   esac
3234
3235 else
3236   enable_spinlocks=yes
3237
3238 fi
3239
3240
3241
3242 #
3243 # Atomic operations
3244 #
3245
3246
3247 # Check whether --enable-atomics was given.
3248 if test "${enable_atomics+set}" = set; then :
3249   enableval=$enable_atomics;
3250   case $enableval in
3251     yes)
3252       :
3253       ;;
3254     no)
3255       :
3256       ;;
3257     *)
3258       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3259       ;;
3260   esac
3261
3262 else
3263   enable_atomics=yes
3264
3265 fi
3266
3267
3268
3269 #
3270 # Random number generation
3271 #
3272
3273
3274 # Check whether --enable-strong-random was given.
3275 if test "${enable_strong_random+set}" = set; then :
3276   enableval=$enable_strong_random;
3277   case $enableval in
3278     yes)
3279       :
3280       ;;
3281     no)
3282       :
3283       ;;
3284     *)
3285       as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3286       ;;
3287   esac
3288
3289 else
3290   enable_strong_random=yes
3291
3292 fi
3293
3294
3295
3296
3297 #
3298 # --enable-debug adds -g to compiler flags
3299 #
3300
3301
3302 # Check whether --enable-debug was given.
3303 if test "${enable_debug+set}" = set; then :
3304   enableval=$enable_debug;
3305   case $enableval in
3306     yes)
3307       :
3308       ;;
3309     no)
3310       :
3311       ;;
3312     *)
3313       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3314       ;;
3315   esac
3316
3317 else
3318   enable_debug=no
3319
3320 fi
3321
3322
3323
3324
3325 #
3326 # --enable-profiling enables gcc profiling
3327 #
3328
3329
3330 # Check whether --enable-profiling was given.
3331 if test "${enable_profiling+set}" = set; then :
3332   enableval=$enable_profiling;
3333   case $enableval in
3334     yes)
3335       :
3336       ;;
3337     no)
3338       :
3339       ;;
3340     *)
3341       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3342       ;;
3343   esac
3344
3345 else
3346   enable_profiling=no
3347
3348 fi
3349
3350
3351
3352 #
3353 # --enable-coverage enables generation of code coverage metrics with gcov
3354 #
3355
3356
3357 # Check whether --enable-coverage was given.
3358 if test "${enable_coverage+set}" = set; then :
3359   enableval=$enable_coverage;
3360   case $enableval in
3361     yes)
3362       if test -z "$GCOV"; then
3363   for ac_prog in gcov
3364 do
3365   # Extract the first word of "$ac_prog", so it can be a program name with args.
3366 set dummy $ac_prog; ac_word=$2
3367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3368 $as_echo_n "checking for $ac_word... " >&6; }
3369 if ${ac_cv_path_GCOV+:} false; then :
3370   $as_echo_n "(cached) " >&6
3371 else
3372   case $GCOV in
3373   [\\/]* | ?:[\\/]*)
3374   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3375   ;;
3376   *)
3377   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3378 for as_dir in $PATH
3379 do
3380   IFS=$as_save_IFS
3381   test -z "$as_dir" && as_dir=.
3382     for ac_exec_ext in '' $ac_executable_extensions; do
3383   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3384     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3386     break 2
3387   fi
3388 done
3389   done
3390 IFS=$as_save_IFS
3391
3392   ;;
3393 esac
3394 fi
3395 GCOV=$ac_cv_path_GCOV
3396 if test -n "$GCOV"; then
3397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3398 $as_echo "$GCOV" >&6; }
3399 else
3400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3401 $as_echo "no" >&6; }
3402 fi
3403
3404
3405   test -n "$GCOV" && break
3406 done
3407
3408 else
3409   # Report the value of GCOV in configure's output in all cases.
3410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3411 $as_echo_n "checking for GCOV... " >&6; }
3412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3413 $as_echo "$GCOV" >&6; }
3414 fi
3415
3416 if test -z "$GCOV"; then
3417   as_fn_error $? "gcov not found" "$LINENO" 5
3418 fi
3419 if test -z "$LCOV"; then
3420   for ac_prog in lcov
3421 do
3422   # Extract the first word of "$ac_prog", so it can be a program name with args.
3423 set dummy $ac_prog; ac_word=$2
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3425 $as_echo_n "checking for $ac_word... " >&6; }
3426 if ${ac_cv_path_LCOV+:} false; then :
3427   $as_echo_n "(cached) " >&6
3428 else
3429   case $LCOV in
3430   [\\/]* | ?:[\\/]*)
3431   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3432   ;;
3433   *)
3434   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3435 for as_dir in $PATH
3436 do
3437   IFS=$as_save_IFS
3438   test -z "$as_dir" && as_dir=.
3439     for ac_exec_ext in '' $ac_executable_extensions; do
3440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3441     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3442     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3443     break 2
3444   fi
3445 done
3446   done
3447 IFS=$as_save_IFS
3448
3449   ;;
3450 esac
3451 fi
3452 LCOV=$ac_cv_path_LCOV
3453 if test -n "$LCOV"; then
3454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3455 $as_echo "$LCOV" >&6; }
3456 else
3457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3458 $as_echo "no" >&6; }
3459 fi
3460
3461
3462   test -n "$LCOV" && break
3463 done
3464
3465 else
3466   # Report the value of LCOV in configure's output in all cases.
3467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3468 $as_echo_n "checking for LCOV... " >&6; }
3469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3470 $as_echo "$LCOV" >&6; }
3471 fi
3472
3473 if test -z "$LCOV"; then
3474   as_fn_error $? "lcov not found" "$LINENO" 5
3475 fi
3476 if test -z "$GENHTML"; then
3477   for ac_prog in genhtml
3478 do
3479   # Extract the first word of "$ac_prog", so it can be a program name with args.
3480 set dummy $ac_prog; ac_word=$2
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3482 $as_echo_n "checking for $ac_word... " >&6; }
3483 if ${ac_cv_path_GENHTML+:} false; then :
3484   $as_echo_n "(cached) " >&6
3485 else
3486   case $GENHTML in
3487   [\\/]* | ?:[\\/]*)
3488   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3489   ;;
3490   *)
3491   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3492 for as_dir in $PATH
3493 do
3494   IFS=$as_save_IFS
3495   test -z "$as_dir" && as_dir=.
3496     for ac_exec_ext in '' $ac_executable_extensions; do
3497   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3498     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3500     break 2
3501   fi
3502 done
3503   done
3504 IFS=$as_save_IFS
3505
3506   ;;
3507 esac
3508 fi
3509 GENHTML=$ac_cv_path_GENHTML
3510 if test -n "$GENHTML"; then
3511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3512 $as_echo "$GENHTML" >&6; }
3513 else
3514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3515 $as_echo "no" >&6; }
3516 fi
3517
3518
3519   test -n "$GENHTML" && break
3520 done
3521
3522 else
3523   # Report the value of GENHTML in configure's output in all cases.
3524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3525 $as_echo_n "checking for GENHTML... " >&6; }
3526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3527 $as_echo "$GENHTML" >&6; }
3528 fi
3529
3530 if test -z "$GENHTML"; then
3531   as_fn_error $? "genhtml not found" "$LINENO" 5
3532 fi
3533       ;;
3534     no)
3535       :
3536       ;;
3537     *)
3538       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3539       ;;
3540   esac
3541
3542 else
3543   enable_coverage=no
3544
3545 fi
3546
3547
3548
3549
3550 #
3551 # DTrace
3552 #
3553
3554
3555 # Check whether --enable-dtrace was given.
3556 if test "${enable_dtrace+set}" = set; then :
3557   enableval=$enable_dtrace;
3558   case $enableval in
3559     yes)
3560       if test -z "$DTRACE"; then
3561   for ac_prog in dtrace
3562 do
3563   # Extract the first word of "$ac_prog", so it can be a program name with args.
3564 set dummy $ac_prog; ac_word=$2
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3566 $as_echo_n "checking for $ac_word... " >&6; }
3567 if ${ac_cv_path_DTRACE+:} false; then :
3568   $as_echo_n "(cached) " >&6
3569 else
3570   case $DTRACE in
3571   [\\/]* | ?:[\\/]*)
3572   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3573   ;;
3574   *)
3575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3576 for as_dir in $PATH
3577 do
3578   IFS=$as_save_IFS
3579   test -z "$as_dir" && as_dir=.
3580     for ac_exec_ext in '' $ac_executable_extensions; do
3581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3582     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3584     break 2
3585   fi
3586 done
3587   done
3588 IFS=$as_save_IFS
3589
3590   ;;
3591 esac
3592 fi
3593 DTRACE=$ac_cv_path_DTRACE
3594 if test -n "$DTRACE"; then
3595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3596 $as_echo "$DTRACE" >&6; }
3597 else
3598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3599 $as_echo "no" >&6; }
3600 fi
3601
3602
3603   test -n "$DTRACE" && break
3604 done
3605
3606 else
3607   # Report the value of DTRACE in configure's output in all cases.
3608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3609 $as_echo_n "checking for DTRACE... " >&6; }
3610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3611 $as_echo "$DTRACE" >&6; }
3612 fi
3613
3614 if test -z "$DTRACE"; then
3615   as_fn_error $? "dtrace not found" "$LINENO" 5
3616 fi
3617
3618       ;;
3619     no)
3620       :
3621       ;;
3622     *)
3623       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3624       ;;
3625   esac
3626
3627 else
3628   enable_dtrace=no
3629
3630 fi
3631
3632
3633
3634
3635 #
3636 # TAP tests
3637 #
3638
3639
3640 # Check whether --enable-tap-tests was given.
3641 if test "${enable_tap_tests+set}" = set; then :
3642   enableval=$enable_tap_tests;
3643   case $enableval in
3644     yes)
3645       :
3646       ;;
3647     no)
3648       :
3649       ;;
3650     *)
3651       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3652       ;;
3653   esac
3654
3655 else
3656   enable_tap_tests=no
3657
3658 fi
3659
3660
3661
3662
3663 #
3664 # Block size
3665 #
3666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3667 $as_echo_n "checking for block size... " >&6; }
3668
3669
3670
3671 # Check whether --with-blocksize was given.
3672 if test "${with_blocksize+set}" = set; then :
3673   withval=$with_blocksize;
3674   case $withval in
3675     yes)
3676       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3677       ;;
3678     no)
3679       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3680       ;;
3681     *)
3682       blocksize=$withval
3683       ;;
3684   esac
3685
3686 else
3687   blocksize=8
3688 fi
3689
3690
3691 case ${blocksize} in
3692   1) BLCKSZ=1024;;
3693   2) BLCKSZ=2048;;
3694   4) BLCKSZ=4096;;
3695   8) BLCKSZ=8192;;
3696  16) BLCKSZ=16384;;
3697  32) BLCKSZ=32768;;
3698   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3699 esac
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3701 $as_echo "${blocksize}kB" >&6; }
3702
3703
3704 cat >>confdefs.h <<_ACEOF
3705 #define BLCKSZ ${BLCKSZ}
3706 _ACEOF
3707
3708
3709 #
3710 # Relation segment size
3711 #
3712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3713 $as_echo_n "checking for segment size... " >&6; }
3714
3715
3716
3717 # Check whether --with-segsize was given.
3718 if test "${with_segsize+set}" = set; then :
3719   withval=$with_segsize;
3720   case $withval in
3721     yes)
3722       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3723       ;;
3724     no)
3725       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3726       ;;
3727     *)
3728       segsize=$withval
3729       ;;
3730   esac
3731
3732 else
3733   segsize=1
3734 fi
3735
3736
3737 # this expression is set up to avoid unnecessary integer overflow
3738 # blocksize is already guaranteed to be a factor of 1024
3739 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3740 test $? -eq 0 || exit 1
3741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3742 $as_echo "${segsize}GB" >&6; }
3743
3744
3745 cat >>confdefs.h <<_ACEOF
3746 #define RELSEG_SIZE ${RELSEG_SIZE}
3747 _ACEOF
3748
3749
3750 #
3751 # WAL block size
3752 #
3753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3754 $as_echo_n "checking for WAL block size... " >&6; }
3755
3756
3757
3758 # Check whether --with-wal-blocksize was given.
3759 if test "${with_wal_blocksize+set}" = set; then :
3760   withval=$with_wal_blocksize;
3761   case $withval in
3762     yes)
3763       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3764       ;;
3765     no)
3766       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3767       ;;
3768     *)
3769       wal_blocksize=$withval
3770       ;;
3771   esac
3772
3773 else
3774   wal_blocksize=8
3775 fi
3776
3777
3778 case ${wal_blocksize} in
3779   1) XLOG_BLCKSZ=1024;;
3780   2) XLOG_BLCKSZ=2048;;
3781   4) XLOG_BLCKSZ=4096;;
3782   8) XLOG_BLCKSZ=8192;;
3783  16) XLOG_BLCKSZ=16384;;
3784  32) XLOG_BLCKSZ=32768;;
3785  64) XLOG_BLCKSZ=65536;;
3786   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3787 esac
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3789 $as_echo "${wal_blocksize}kB" >&6; }
3790
3791
3792 cat >>confdefs.h <<_ACEOF
3793 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3794 _ACEOF
3795
3796
3797 #
3798 # C compiler
3799 #
3800
3801 # For historical reasons you can also use --with-CC to specify the C compiler
3802 # to use, although the standard way to do this is to set the CC environment
3803 # variable.
3804
3805
3806
3807 # Check whether --with-CC was given.
3808 if test "${with_CC+set}" = set; then :
3809   withval=$with_CC;
3810   case $withval in
3811     yes)
3812       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3813       ;;
3814     no)
3815       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3816       ;;
3817     *)
3818       CC=$with_CC
3819       ;;
3820   esac
3821
3822 fi
3823
3824
3825
3826 case $template in
3827   aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3828     *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3829 esac
3830
3831 ac_ext=c
3832 ac_cpp='$CPP $CPPFLAGS'
3833 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3834 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3835 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3836 if test -n "$ac_tool_prefix"; then
3837   for ac_prog in $pgac_cc_list
3838   do
3839     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3840 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3842 $as_echo_n "checking for $ac_word... " >&6; }
3843 if ${ac_cv_prog_CC+:} false; then :
3844   $as_echo_n "(cached) " >&6
3845 else
3846   if test -n "$CC"; then
3847   ac_cv_prog_CC="$CC" # Let the user override the test.
3848 else
3849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3850 for as_dir in $PATH
3851 do
3852   IFS=$as_save_IFS
3853   test -z "$as_dir" && as_dir=.
3854     for ac_exec_ext in '' $ac_executable_extensions; do
3855   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3856     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3857     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3858     break 2
3859   fi
3860 done
3861   done
3862 IFS=$as_save_IFS
3863
3864 fi
3865 fi
3866 CC=$ac_cv_prog_CC
3867 if test -n "$CC"; then
3868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3869 $as_echo "$CC" >&6; }
3870 else
3871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3872 $as_echo "no" >&6; }
3873 fi
3874
3875
3876     test -n "$CC" && break
3877   done
3878 fi
3879 if test -z "$CC"; then
3880   ac_ct_CC=$CC
3881   for ac_prog in $pgac_cc_list
3882 do
3883   # Extract the first word of "$ac_prog", so it can be a program name with args.
3884 set dummy $ac_prog; ac_word=$2
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3886 $as_echo_n "checking for $ac_word... " >&6; }
3887 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3888   $as_echo_n "(cached) " >&6
3889 else
3890   if test -n "$ac_ct_CC"; then
3891   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3892 else
3893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3894 for as_dir in $PATH
3895 do
3896   IFS=$as_save_IFS
3897   test -z "$as_dir" && as_dir=.
3898     for ac_exec_ext in '' $ac_executable_extensions; do
3899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3900     ac_cv_prog_ac_ct_CC="$ac_prog"
3901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3902     break 2
3903   fi
3904 done
3905   done
3906 IFS=$as_save_IFS
3907
3908 fi
3909 fi
3910 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3911 if test -n "$ac_ct_CC"; then
3912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3913 $as_echo "$ac_ct_CC" >&6; }
3914 else
3915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3916 $as_echo "no" >&6; }
3917 fi
3918
3919
3920   test -n "$ac_ct_CC" && break
3921 done
3922
3923   if test "x$ac_ct_CC" = x; then
3924     CC=""
3925   else
3926     case $cross_compiling:$ac_tool_warned in
3927 yes:)
3928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3929 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3930 ac_tool_warned=yes ;;
3931 esac
3932     CC=$ac_ct_CC
3933   fi
3934 fi
3935
3936
3937 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3938 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3939 as_fn_error $? "no acceptable C compiler found in \$PATH
3940 See \`config.log' for more details" "$LINENO" 5; }
3941
3942 # Provide some information about the compiler.
3943 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3944 set X $ac_compile
3945 ac_compiler=$2
3946 for ac_option in --version -v -V -qversion; do
3947   { { ac_try="$ac_compiler $ac_option >&5"
3948 case "(($ac_try" in
3949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3950   *) ac_try_echo=$ac_try;;
3951 esac
3952 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3953 $as_echo "$ac_try_echo"; } >&5
3954   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3955   ac_status=$?
3956   if test -s conftest.err; then
3957     sed '10a\
3958 ... rest of stderr output deleted ...
3959          10q' conftest.err >conftest.er1
3960     cat conftest.er1 >&5
3961   fi
3962   rm -f conftest.er1 conftest.err
3963   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3964   test $ac_status = 0; }
3965 done
3966
3967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3968 /* end confdefs.h.  */
3969
3970 int
3971 main ()
3972 {
3973
3974   ;
3975   return 0;
3976 }
3977 _ACEOF
3978 ac_clean_files_save=$ac_clean_files
3979 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3980 # Try to create an executable without -o first, disregard a.out.
3981 # It will help us diagnose broken compilers, and finding out an intuition
3982 # of exeext.
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3984 $as_echo_n "checking whether the C compiler works... " >&6; }
3985 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3986
3987 # The possible output files:
3988 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3989
3990 ac_rmfiles=
3991 for ac_file in $ac_files
3992 do
3993   case $ac_file in
3994     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3995     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3996   esac
3997 done
3998 rm -f $ac_rmfiles
3999
4000 if { { ac_try="$ac_link_default"
4001 case "(($ac_try" in
4002   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003   *) ac_try_echo=$ac_try;;
4004 esac
4005 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4006 $as_echo "$ac_try_echo"; } >&5
4007   (eval "$ac_link_default") 2>&5
4008   ac_status=$?
4009   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4010   test $ac_status = 0; }; then :
4011   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4012 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4013 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4014 # so that the user can short-circuit this test for compilers unknown to
4015 # Autoconf.
4016 for ac_file in $ac_files ''
4017 do
4018   test -f "$ac_file" || continue
4019   case $ac_file in
4020     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4021         ;;
4022     [ab].out )
4023         # We found the default executable, but exeext='' is most
4024         # certainly right.
4025         break;;
4026     *.* )
4027         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4028         then :; else
4029            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4030         fi
4031         # We set ac_cv_exeext here because the later test for it is not
4032         # safe: cross compilers may not add the suffix if given an `-o'
4033         # argument, so we may need to know it at that point already.
4034         # Even if this section looks crufty: it has the advantage of
4035         # actually working.
4036         break;;
4037     * )
4038         break;;
4039   esac
4040 done
4041 test "$ac_cv_exeext" = no && ac_cv_exeext=
4042
4043 else
4044   ac_file=''
4045 fi
4046 if test -z "$ac_file"; then :
4047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4048 $as_echo "no" >&6; }
4049 $as_echo "$as_me: failed program was:" >&5
4050 sed 's/^/| /' conftest.$ac_ext >&5
4051
4052 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4053 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4054 as_fn_error 77 "C compiler cannot create executables
4055 See \`config.log' for more details" "$LINENO" 5; }
4056 else
4057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4058 $as_echo "yes" >&6; }
4059 fi
4060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4061 $as_echo_n "checking for C compiler default output file name... " >&6; }
4062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4063 $as_echo "$ac_file" >&6; }
4064 ac_exeext=$ac_cv_exeext
4065
4066 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4067 ac_clean_files=$ac_clean_files_save
4068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4069 $as_echo_n "checking for suffix of executables... " >&6; }
4070 if { { ac_try="$ac_link"
4071 case "(($ac_try" in
4072   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073   *) ac_try_echo=$ac_try;;
4074 esac
4075 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076 $as_echo "$ac_try_echo"; } >&5
4077   (eval "$ac_link") 2>&5
4078   ac_status=$?
4079   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080   test $ac_status = 0; }; then :
4081   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4082 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4083 # work properly (i.e., refer to `conftest.exe'), while it won't with
4084 # `rm'.
4085 for ac_file in conftest.exe conftest conftest.*; do
4086   test -f "$ac_file" || continue
4087   case $ac_file in
4088     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4089     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4090           break;;
4091     * ) break;;
4092   esac
4093 done
4094 else
4095   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4096 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4097 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4098 See \`config.log' for more details" "$LINENO" 5; }
4099 fi
4100 rm -f conftest conftest$ac_cv_exeext
4101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4102 $as_echo "$ac_cv_exeext" >&6; }
4103
4104 rm -f conftest.$ac_ext
4105 EXEEXT=$ac_cv_exeext
4106 ac_exeext=$EXEEXT
4107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4108 /* end confdefs.h.  */
4109 #include <stdio.h>
4110 int
4111 main ()
4112 {
4113 FILE *f = fopen ("conftest.out", "w");
4114  return ferror (f) || fclose (f) != 0;
4115
4116   ;
4117   return 0;
4118 }
4119 _ACEOF
4120 ac_clean_files="$ac_clean_files conftest.out"
4121 # Check that the compiler produces executables we can run.  If not, either
4122 # the compiler is broken, or we cross compile.
4123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4124 $as_echo_n "checking whether we are cross compiling... " >&6; }
4125 if test "$cross_compiling" != yes; then
4126   { { ac_try="$ac_link"
4127 case "(($ac_try" in
4128   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4129   *) ac_try_echo=$ac_try;;
4130 esac
4131 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4132 $as_echo "$ac_try_echo"; } >&5
4133   (eval "$ac_link") 2>&5
4134   ac_status=$?
4135   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4136   test $ac_status = 0; }
4137   if { ac_try='./conftest$ac_cv_exeext'
4138   { { case "(($ac_try" in
4139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4140   *) ac_try_echo=$ac_try;;
4141 esac
4142 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4143 $as_echo "$ac_try_echo"; } >&5
4144   (eval "$ac_try") 2>&5
4145   ac_status=$?
4146   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4147   test $ac_status = 0; }; }; then
4148     cross_compiling=no
4149   else
4150     if test "$cross_compiling" = maybe; then
4151         cross_compiling=yes
4152     else
4153         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4154 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4155 as_fn_error $? "cannot run C compiled programs.
4156 If you meant to cross compile, use \`--host'.
4157 See \`config.log' for more details" "$LINENO" 5; }
4158     fi
4159   fi
4160 fi
4161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4162 $as_echo "$cross_compiling" >&6; }
4163
4164 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4165 ac_clean_files=$ac_clean_files_save
4166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4167 $as_echo_n "checking for suffix of object files... " >&6; }
4168 if ${ac_cv_objext+:} false; then :
4169   $as_echo_n "(cached) " >&6
4170 else
4171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4172 /* end confdefs.h.  */
4173
4174 int
4175 main ()
4176 {
4177
4178   ;
4179   return 0;
4180 }
4181 _ACEOF
4182 rm -f conftest.o conftest.obj
4183 if { { ac_try="$ac_compile"
4184 case "(($ac_try" in
4185   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4186   *) ac_try_echo=$ac_try;;
4187 esac
4188 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4189 $as_echo "$ac_try_echo"; } >&5
4190   (eval "$ac_compile") 2>&5
4191   ac_status=$?
4192   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4193   test $ac_status = 0; }; then :
4194   for ac_file in conftest.o conftest.obj conftest.*; do
4195   test -f "$ac_file" || continue;
4196   case $ac_file in
4197     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4198     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4199        break;;
4200   esac
4201 done
4202 else
4203   $as_echo "$as_me: failed program was:" >&5
4204 sed 's/^/| /' conftest.$ac_ext >&5
4205
4206 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4207 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4208 as_fn_error $? "cannot compute suffix of object files: cannot compile
4209 See \`config.log' for more details" "$LINENO" 5; }
4210 fi
4211 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4212 fi
4213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4214 $as_echo "$ac_cv_objext" >&6; }
4215 OBJEXT=$ac_cv_objext
4216 ac_objext=$OBJEXT
4217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4218 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4219 if ${ac_cv_c_compiler_gnu+:} false; then :
4220   $as_echo_n "(cached) " >&6
4221 else
4222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4223 /* end confdefs.h.  */
4224
4225 int
4226 main ()
4227 {
4228 #ifndef __GNUC__
4229        choke me
4230 #endif
4231
4232   ;
4233   return 0;
4234 }
4235 _ACEOF
4236 if ac_fn_c_try_compile "$LINENO"; then :
4237   ac_compiler_gnu=yes
4238 else
4239   ac_compiler_gnu=no
4240 fi
4241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4242 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4243
4244 fi
4245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4246 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4247 if test $ac_compiler_gnu = yes; then
4248   GCC=yes
4249 else
4250   GCC=
4251 fi
4252 ac_test_CFLAGS=${CFLAGS+set}
4253 ac_save_CFLAGS=$CFLAGS
4254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4255 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4256 if ${ac_cv_prog_cc_g+:} false; then :
4257   $as_echo_n "(cached) " >&6
4258 else
4259   ac_save_c_werror_flag=$ac_c_werror_flag
4260    ac_c_werror_flag=yes
4261    ac_cv_prog_cc_g=no
4262    CFLAGS="-g"
4263    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4264 /* end confdefs.h.  */
4265
4266 int
4267 main ()
4268 {
4269
4270   ;
4271   return 0;
4272 }
4273 _ACEOF
4274 if ac_fn_c_try_compile "$LINENO"; then :
4275   ac_cv_prog_cc_g=yes
4276 else
4277   CFLAGS=""
4278       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4279 /* end confdefs.h.  */
4280
4281 int
4282 main ()
4283 {
4284
4285   ;
4286   return 0;
4287 }
4288 _ACEOF
4289 if ac_fn_c_try_compile "$LINENO"; then :
4290
4291 else
4292   ac_c_werror_flag=$ac_save_c_werror_flag
4293          CFLAGS="-g"
4294          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4295 /* end confdefs.h.  */
4296
4297 int
4298 main ()
4299 {
4300
4301   ;
4302   return 0;
4303 }
4304 _ACEOF
4305 if ac_fn_c_try_compile "$LINENO"; then :
4306   ac_cv_prog_cc_g=yes
4307 fi
4308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4309 fi
4310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4311 fi
4312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4313    ac_c_werror_flag=$ac_save_c_werror_flag
4314 fi
4315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4316 $as_echo "$ac_cv_prog_cc_g" >&6; }
4317 if test "$ac_test_CFLAGS" = set; then
4318   CFLAGS=$ac_save_CFLAGS
4319 elif test $ac_cv_prog_cc_g = yes; then
4320   if test "$GCC" = yes; then
4321     CFLAGS="-g -O2"
4322   else
4323     CFLAGS="-g"
4324   fi
4325 else
4326   if test "$GCC" = yes; then
4327     CFLAGS="-O2"
4328   else
4329     CFLAGS=
4330   fi
4331 fi
4332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4333 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4334 if ${ac_cv_prog_cc_c89+:} false; then :
4335   $as_echo_n "(cached) " >&6
4336 else
4337   ac_cv_prog_cc_c89=no
4338 ac_save_CC=$CC
4339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4340 /* end confdefs.h.  */
4341 #include <stdarg.h>
4342 #include <stdio.h>
4343 struct stat;
4344 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4345 struct buf { int x; };
4346 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4347 static char *e (p, i)
4348      char **p;
4349      int i;
4350 {
4351   return p[i];
4352 }
4353 static char *f (char * (*g) (char **, int), char **p, ...)
4354 {
4355   char *s;
4356   va_list v;
4357   va_start (v,p);
4358   s = g (p, va_arg (v,int));
4359   va_end (v);
4360   return s;
4361 }
4362
4363 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4364    function prototypes and stuff, but not '\xHH' hex character constants.
4365    These don't provoke an error unfortunately, instead are silently treated
4366    as 'x'.  The following induces an error, until -std is added to get
4367    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4368    array size at least.  It's necessary to write '\x00'==0 to get something
4369    that's true only with -std.  */
4370 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4371
4372 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4373    inside strings and character constants.  */
4374 #define FOO(x) 'x'
4375 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4376
4377 int test (int i, double x);
4378 struct s1 {int (*f) (int a);};
4379 struct s2 {int (*f) (double a);};
4380 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4381 int argc;
4382 char **argv;
4383 int
4384 main ()
4385 {
4386 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4387   ;
4388   return 0;
4389 }
4390 _ACEOF
4391 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4392         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4393 do
4394   CC="$ac_save_CC $ac_arg"
4395   if ac_fn_c_try_compile "$LINENO"; then :
4396   ac_cv_prog_cc_c89=$ac_arg
4397 fi
4398 rm -f core conftest.err conftest.$ac_objext
4399   test "x$ac_cv_prog_cc_c89" != "xno" && break
4400 done
4401 rm -f conftest.$ac_ext
4402 CC=$ac_save_CC
4403
4404 fi
4405 # AC_CACHE_VAL
4406 case "x$ac_cv_prog_cc_c89" in
4407   x)
4408     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4409 $as_echo "none needed" >&6; } ;;
4410   xno)
4411     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4412 $as_echo "unsupported" >&6; } ;;
4413   *)
4414     CC="$CC $ac_cv_prog_cc_c89"
4415     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4416 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4417 esac
4418 if test "x$ac_cv_prog_cc_c89" != xno; then :
4419
4420 fi
4421
4422 ac_ext=c
4423 ac_cpp='$CPP $CPPFLAGS'
4424 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4425 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4426 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4427
4428 ac_ext=cpp
4429 ac_cpp='$CXXCPP $CPPFLAGS'
4430 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4431 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4432 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4433 if test -z "$CXX"; then
4434   if test -n "$CCC"; then
4435     CXX=$CCC
4436   else
4437     if test -n "$ac_tool_prefix"; then
4438   for ac_prog in $pgac_cxx_list
4439   do
4440     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4441 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4443 $as_echo_n "checking for $ac_word... " >&6; }
4444 if ${ac_cv_prog_CXX+:} false; then :
4445   $as_echo_n "(cached) " >&6
4446 else
4447   if test -n "$CXX"; then
4448   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4449 else
4450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4451 for as_dir in $PATH
4452 do
4453   IFS=$as_save_IFS
4454   test -z "$as_dir" && as_dir=.
4455     for ac_exec_ext in '' $ac_executable_extensions; do
4456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4457     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4459     break 2
4460   fi
4461 done
4462   done
4463 IFS=$as_save_IFS
4464
4465 fi
4466 fi
4467 CXX=$ac_cv_prog_CXX
4468 if test -n "$CXX"; then
4469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4470 $as_echo "$CXX" >&6; }
4471 else
4472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4473 $as_echo "no" >&6; }
4474 fi
4475
4476
4477     test -n "$CXX" && break
4478   done
4479 fi
4480 if test -z "$CXX"; then
4481   ac_ct_CXX=$CXX
4482   for ac_prog in $pgac_cxx_list
4483 do
4484   # Extract the first word of "$ac_prog", so it can be a program name with args.
4485 set dummy $ac_prog; ac_word=$2
4486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4487 $as_echo_n "checking for $ac_word... " >&6; }
4488 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4489   $as_echo_n "(cached) " >&6
4490 else
4491   if test -n "$ac_ct_CXX"; then
4492   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4493 else
4494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4495 for as_dir in $PATH
4496 do
4497   IFS=$as_save_IFS
4498   test -z "$as_dir" && as_dir=.
4499     for ac_exec_ext in '' $ac_executable_extensions; do
4500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4501     ac_cv_prog_ac_ct_CXX="$ac_prog"
4502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4503     break 2
4504   fi
4505 done
4506   done
4507 IFS=$as_save_IFS
4508
4509 fi
4510 fi
4511 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4512 if test -n "$ac_ct_CXX"; then
4513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4514 $as_echo "$ac_ct_CXX" >&6; }
4515 else
4516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4517 $as_echo "no" >&6; }
4518 fi
4519
4520
4521   test -n "$ac_ct_CXX" && break
4522 done
4523
4524   if test "x$ac_ct_CXX" = x; then
4525     CXX="g++"
4526   else
4527     case $cross_compiling:$ac_tool_warned in
4528 yes:)
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4530 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4531 ac_tool_warned=yes ;;
4532 esac
4533     CXX=$ac_ct_CXX
4534   fi
4535 fi
4536
4537   fi
4538 fi
4539 # Provide some information about the compiler.
4540 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4541 set X $ac_compile
4542 ac_compiler=$2
4543 for ac_option in --version -v -V -qversion; do
4544   { { ac_try="$ac_compiler $ac_option >&5"
4545 case "(($ac_try" in
4546   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4547   *) ac_try_echo=$ac_try;;
4548 esac
4549 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4550 $as_echo "$ac_try_echo"; } >&5
4551   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4552   ac_status=$?
4553   if test -s conftest.err; then
4554     sed '10a\
4555 ... rest of stderr output deleted ...
4556          10q' conftest.err >conftest.er1
4557     cat conftest.er1 >&5
4558   fi
4559   rm -f conftest.er1 conftest.err
4560   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4561   test $ac_status = 0; }
4562 done
4563
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4565 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4566 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4567   $as_echo_n "(cached) " >&6
4568 else
4569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4570 /* end confdefs.h.  */
4571
4572 int
4573 main ()
4574 {
4575 #ifndef __GNUC__
4576        choke me
4577 #endif
4578
4579   ;
4580   return 0;
4581 }
4582 _ACEOF
4583 if ac_fn_cxx_try_compile "$LINENO"; then :
4584   ac_compiler_gnu=yes
4585 else
4586   ac_compiler_gnu=no
4587 fi
4588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4589 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4590
4591 fi
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4593 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4594 if test $ac_compiler_gnu = yes; then
4595   GXX=yes
4596 else
4597   GXX=
4598 fi
4599 ac_test_CXXFLAGS=${CXXFLAGS+set}
4600 ac_save_CXXFLAGS=$CXXFLAGS
4601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4602 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4603 if ${ac_cv_prog_cxx_g+:} false; then :
4604   $as_echo_n "(cached) " >&6
4605 else
4606   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4607    ac_cxx_werror_flag=yes
4608    ac_cv_prog_cxx_g=no
4609    CXXFLAGS="-g"
4610    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611 /* end confdefs.h.  */
4612
4613 int
4614 main ()
4615 {
4616
4617   ;
4618   return 0;
4619 }
4620 _ACEOF
4621 if ac_fn_cxx_try_compile "$LINENO"; then :
4622   ac_cv_prog_cxx_g=yes
4623 else
4624   CXXFLAGS=""
4625       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4626 /* end confdefs.h.  */
4627
4628 int
4629 main ()
4630 {
4631
4632   ;
4633   return 0;
4634 }
4635 _ACEOF
4636 if ac_fn_cxx_try_compile "$LINENO"; then :
4637
4638 else
4639   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4640          CXXFLAGS="-g"
4641          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4642 /* end confdefs.h.  */
4643
4644 int
4645 main ()
4646 {
4647
4648   ;
4649   return 0;
4650 }
4651 _ACEOF
4652 if ac_fn_cxx_try_compile "$LINENO"; then :
4653   ac_cv_prog_cxx_g=yes
4654 fi
4655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4656 fi
4657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4658 fi
4659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4660    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4661 fi
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4663 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4664 if test "$ac_test_CXXFLAGS" = set; then
4665   CXXFLAGS=$ac_save_CXXFLAGS
4666 elif test $ac_cv_prog_cxx_g = yes; then
4667   if test "$GXX" = yes; then
4668     CXXFLAGS="-g -O2"
4669   else
4670     CXXFLAGS="-g"
4671   fi
4672 else
4673   if test "$GXX" = yes; then
4674     CXXFLAGS="-O2"
4675   else
4676     CXXFLAGS=
4677   fi
4678 fi
4679 ac_ext=c
4680 ac_cpp='$CPP $CPPFLAGS'
4681 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4682 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4683 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4684
4685
4686 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4687 # but has idiosyncrasies of its own.  We assume icc will define
4688 # __INTEL_COMPILER regardless of CFLAGS.
4689
4690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4691 /* end confdefs.h.  */
4692
4693 int
4694 main ()
4695 {
4696 #ifndef __INTEL_COMPILER
4697 choke me
4698 #endif
4699   ;
4700   return 0;
4701 }
4702 _ACEOF
4703 if ac_fn_c_try_compile "$LINENO"; then :
4704   ICC=yes
4705 else
4706   ICC=no
4707 fi
4708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4709
4710 # Check if it's Sun Studio compiler. We assume that
4711 # __SUNPRO_C will be defined for Sun Studio compilers
4712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4713 /* end confdefs.h.  */
4714
4715 int
4716 main ()
4717 {
4718 #ifndef __SUNPRO_C
4719 choke me
4720 #endif
4721   ;
4722   return 0;
4723 }
4724 _ACEOF
4725 if ac_fn_c_try_compile "$LINENO"; then :
4726   SUN_STUDIO_CC=yes
4727 else
4728   SUN_STUDIO_CC=no
4729 fi
4730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4731
4732
4733
4734
4735 #
4736 # LLVM
4737 #
4738 # Checked early because subsequent tests depend on it.
4739
4740
4741
4742 # Check whether --with-llvm was given.
4743 if test "${with_llvm+set}" = set; then :
4744   withval=$with_llvm;
4745   case $withval in
4746     yes)
4747
4748 $as_echo "#define USE_LLVM 1" >>confdefs.h
4749
4750       ;;
4751     no)
4752       :
4753       ;;
4754     *)
4755       as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4756       ;;
4757   esac
4758
4759 else
4760   with_llvm=no
4761
4762 fi
4763
4764
4765
4766 if test "$with_llvm" = yes ; then
4767    for ac_prog in gawk mawk nawk awk
4768 do
4769   # Extract the first word of "$ac_prog", so it can be a program name with args.
4770 set dummy $ac_prog; ac_word=$2
4771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4772 $as_echo_n "checking for $ac_word... " >&6; }
4773 if ${ac_cv_prog_AWK+:} false; then :
4774   $as_echo_n "(cached) " >&6
4775 else
4776   if test -n "$AWK"; then
4777   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4778 else
4779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780 for as_dir in $PATH
4781 do
4782   IFS=$as_save_IFS
4783   test -z "$as_dir" && as_dir=.
4784     for ac_exec_ext in '' $ac_executable_extensions; do
4785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4786     ac_cv_prog_AWK="$ac_prog"
4787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4788     break 2
4789   fi
4790 done
4791   done
4792 IFS=$as_save_IFS
4793
4794 fi
4795 fi
4796 AWK=$ac_cv_prog_AWK
4797 if test -n "$AWK"; then
4798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4799 $as_echo "$AWK" >&6; }
4800 else
4801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802 $as_echo "no" >&6; }
4803 fi
4804
4805
4806   test -n "$AWK" && break
4807 done
4808
4809
4810
4811
4812
4813   if test -z "$LLVM_CONFIG"; then
4814   for ac_prog in llvm-config llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
4815 do
4816   # Extract the first word of "$ac_prog", so it can be a program name with args.
4817 set dummy $ac_prog; ac_word=$2
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4819 $as_echo_n "checking for $ac_word... " >&6; }
4820 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4821   $as_echo_n "(cached) " >&6
4822 else
4823   case $LLVM_CONFIG in
4824   [\\/]* | ?:[\\/]*)
4825   ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
4826   ;;
4827   *)
4828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4829 for as_dir in $PATH
4830 do
4831   IFS=$as_save_IFS
4832   test -z "$as_dir" && as_dir=.
4833     for ac_exec_ext in '' $ac_executable_extensions; do
4834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4835     ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4837     break 2
4838   fi
4839 done
4840   done
4841 IFS=$as_save_IFS
4842
4843   ;;
4844 esac
4845 fi
4846 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
4847 if test -n "$LLVM_CONFIG"; then
4848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
4849 $as_echo "$LLVM_CONFIG" >&6; }
4850 else
4851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4852 $as_echo "no" >&6; }
4853 fi
4854
4855
4856   test -n "$LLVM_CONFIG" && break
4857 done
4858
4859 else
4860   # Report the value of LLVM_CONFIG in configure's output in all cases.
4861   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
4862 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
4863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
4864 $as_echo "$LLVM_CONFIG" >&6; }
4865 fi
4866
4867
4868   # no point continuing if llvm wasn't found
4869   if test -z "$LLVM_CONFIG"; then
4870     as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
4871   fi
4872   # check if detected $LLVM_CONFIG is executable
4873   pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
4874   if test "x$pgac_llvm_version" = "xno"; then
4875     as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
4876   fi
4877   # and whether the version is supported
4878   if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
4879     as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
4880   fi
4881
4882   # need clang to create some bitcode files
4883
4884   if test -z "$CLANG"; then
4885   for ac_prog in clang clang-6.0 clang-5.0 clang-4.0 clang-3.9
4886 do
4887   # Extract the first word of "$ac_prog", so it can be a program name with args.
4888 set dummy $ac_prog; ac_word=$2
4889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4890 $as_echo_n "checking for $ac_word... " >&6; }
4891 if ${ac_cv_path_CLANG+:} false; then :
4892   $as_echo_n "(cached) " >&6
4893 else
4894   case $CLANG in
4895   [\\/]* | ?:[\\/]*)
4896   ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
4897   ;;
4898   *)
4899   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4900 for as_dir in $PATH
4901 do
4902   IFS=$as_save_IFS
4903   test -z "$as_dir" && as_dir=.
4904     for ac_exec_ext in '' $ac_executable_extensions; do
4905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4906     ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
4907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4908     break 2
4909   fi
4910 done
4911   done
4912 IFS=$as_save_IFS
4913
4914   ;;
4915 esac
4916 fi
4917 CLANG=$ac_cv_path_CLANG
4918 if test -n "$CLANG"; then
4919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
4920 $as_echo "$CLANG" >&6; }
4921 else
4922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4923 $as_echo "no" >&6; }
4924 fi
4925
4926
4927   test -n "$CLANG" && break
4928 done
4929
4930 else
4931   # Report the value of CLANG in configure's output in all cases.
4932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
4933 $as_echo_n "checking for CLANG... " >&6; }
4934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
4935 $as_echo "$CLANG" >&6; }
4936 fi
4937
4938   if test -z "$CLANG"; then
4939     as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
4940   fi
4941   # make sure clang is executable
4942   if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
4943     as_fn_error $? "$CLANG does not work" "$LINENO" 5
4944   fi
4945   # Could check clang version, but it doesn't seem that
4946   # important. Systems with a new enough LLVM version are usually
4947   # going to have a decent clang version too. It's also not entirely
4948   # clear what the minimum version is.
4949
4950   # Collect compiler flags necessary to build the LLVM dependent
4951   # shared library.
4952   for pgac_option in `$LLVM_CONFIG --cppflags`; do
4953     case $pgac_option in
4954       -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
4955     esac
4956   done
4957
4958   for pgac_option in `$LLVM_CONFIG --ldflags`; do
4959     case $pgac_option in
4960       -L*) LDFLAGS="$LDFLAGS $pgac_option";;
4961     esac
4962   done
4963
4964   # ABI influencing options, standard influencing options
4965   for pgac_option in `$LLVM_CONFIG --cxxflags`; do
4966     case $pgac_option in
4967       -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
4968       -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
4969     esac
4970   done
4971
4972   # Look for components we're interested in, collect necessary
4973   # libs. As some components are optional, we can't just list all of
4974   # them as it'd raise an error.
4975   pgac_components='';
4976   for pgac_component in `$LLVM_CONFIG --components`; do
4977     case $pgac_component in
4978       engine) pgac_components="$pgac_components $pgac_component";;
4979       debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
4980       orcjit) pgac_components="$pgac_components $pgac_component";;
4981       passes) pgac_components="$pgac_components $pgac_component";;
4982       perfjitevents) pgac_components="$pgac_components $pgac_component";;
4983     esac
4984   done;
4985
4986   # And then get the libraries that need to be linked in for the
4987   # selected components.  They're large libraries, we only want to
4988   # link them into the LLVM using shared library.
4989   for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
4990     case $pgac_option in
4991       -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
4992     esac
4993   done
4994
4995   LLVM_BINPATH=`$LLVM_CONFIG --bindir`
4996
4997   # Check which functionality is present
4998   SAVE_CPPFLAGS="$CPPFLAGS"
4999   CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
5000   ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
5001 "
5002 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
5003   ac_have_decl=1
5004 else
5005   ac_have_decl=0
5006 fi
5007
5008 cat >>confdefs.h <<_ACEOF
5009 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
5010 _ACEOF
5011
5012   ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
5013 "
5014 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
5015   ac_have_decl=1
5016 else
5017   ac_have_decl=0
5018 fi
5019
5020 cat >>confdefs.h <<_ACEOF
5021 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
5022 _ACEOF
5023
5024   ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
5025 "
5026 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
5027   ac_have_decl=1
5028 else
5029   ac_have_decl=0
5030 fi
5031
5032 cat >>confdefs.h <<_ACEOF
5033 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
5034 _ACEOF
5035 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
5036 "
5037 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
5038   ac_have_decl=1
5039 else
5040   ac_have_decl=0
5041 fi
5042
5043 cat >>confdefs.h <<_ACEOF
5044 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
5045 _ACEOF
5046
5047   CPPFLAGS="$SAVE_CPPFLAGS"
5048
5049   # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5050
5051
5052
5053
5054
5055
5056
5057 fi
5058
5059
5060 unset CFLAGS
5061 unset CXXFLAGS
5062
5063 #
5064 # Read the template
5065 #
5066 . "$srcdir/src/template/$template" || exit
5067
5068 # C[XX]FLAGS are selected so:
5069 # If the user specifies something in the environment, that is used.
5070 # else:  If the template file set something, that is used.
5071 # else:  If coverage was enabled, don't set anything.
5072 # else:  If the compiler is GCC, then we use -O2.
5073 # else:  If the compiler is something else, then we use -O, unless debugging.
5074
5075 if test "$ac_env_CFLAGS_set" = set; then
5076   CFLAGS=$ac_env_CFLAGS_value
5077 elif test "${CFLAGS+set}" = set; then
5078   : # (keep what template set)
5079 elif test "$enable_coverage" = yes; then
5080   : # no optimization by default
5081 elif test "$GCC" = yes; then
5082   CFLAGS="-O2"
5083 else
5084   # if the user selected debug mode, don't use -O
5085   if test "$enable_debug" != yes; then
5086     CFLAGS="-O"
5087   fi
5088 fi
5089
5090 if test "$ac_env_CXXFLAGS_set" = set; then
5091   CXXFLAGS=$ac_env_CXXFLAGS_value
5092 elif test "${CXXFLAGS+set}" = set; then
5093   : # (keep what template set)
5094 elif test "$enable_coverage" = yes; then
5095   : # no optimization by default
5096 elif test "$GCC" = yes; then
5097   CXXFLAGS="-O2"
5098 else
5099   # if the user selected debug mode, don't use -O
5100   if test "$enable_debug" != yes; then
5101     CXXFLAGS="-O"
5102   fi
5103 fi
5104
5105 # When generating bitcode (for inlining) we always want to use -O2
5106 # even when --enable-debug is specified. The bitcode it's not going to
5107 # be used for line-by-line debugging, and JIT inlining doesn't work
5108 # without at least -O1 (otherwise clang will emit 'noinline'
5109 # attributes everywhere), which is bad for testing.  Still allow the
5110 # environment to override if done explicitly.
5111 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5112   BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5113 else
5114   BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5115 fi
5116 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5117   BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5118 else
5119   BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5120 fi
5121
5122 # C[XX]FLAGS we determined above will be added back at the end
5123 user_CFLAGS=$CFLAGS
5124 CFLAGS=""
5125 user_CXXFLAGS=$CXXFLAGS
5126 CXXFLAGS=""
5127 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5128 BITCODE_CFLAGS=""
5129 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5130 BITCODE_CXXFLAGS=""
5131
5132 # set CFLAGS_VECTOR from the environment, if available
5133 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5134   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5135 fi
5136
5137 # Some versions of GCC support some additional useful warning flags.
5138 # Check whether they are supported, and add them to CFLAGS if so.
5139 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5140 # but has its own.  Also check other compiler-specific flags here.
5141
5142 if test "$GCC" = yes -a "$ICC" = no; then
5143   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5144   CXXFLAGS="-Wall -Wpointer-arith"
5145   # These work in some but not all gcc versions
5146
5147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5148 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5149 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5150   $as_echo_n "(cached) " >&6
5151 else
5152   pgac_save_CFLAGS=$CFLAGS
5153 pgac_save_CC=$CC
5154 CC=${CC}
5155 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5156 ac_save_c_werror_flag=$ac_c_werror_flag
5157 ac_c_werror_flag=yes
5158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5159 /* end confdefs.h.  */
5160
5161 int
5162 main ()
5163 {
5164
5165   ;
5166   return 0;
5167 }
5168 _ACEOF
5169 if ac_fn_c_try_compile "$LINENO"; then :
5170   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5171 else
5172   pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5173 fi
5174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5175 ac_c_werror_flag=$ac_save_c_werror_flag
5176 CFLAGS="$pgac_save_CFLAGS"
5177 CC="$pgac_save_CC"
5178 fi
5179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5180 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5181 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5182   CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5183 fi
5184
5185
5186   # -Wdeclaration-after-statement isn't applicable for C++
5187
5188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5189 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5190 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5191   $as_echo_n "(cached) " >&6
5192 else
5193   pgac_save_CFLAGS=$CFLAGS
5194 pgac_save_CC=$CC
5195 CC=${CC}
5196 CFLAGS="${CFLAGS} -Wendif-labels"
5197 ac_save_c_werror_flag=$ac_c_werror_flag
5198 ac_c_werror_flag=yes
5199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5200 /* end confdefs.h.  */
5201
5202 int
5203 main ()
5204 {
5205
5206   ;
5207   return 0;
5208 }
5209 _ACEOF
5210 if ac_fn_c_try_compile "$LINENO"; then :
5211   pgac_cv_prog_CC_cflags__Wendif_labels=yes
5212 else
5213   pgac_cv_prog_CC_cflags__Wendif_labels=no
5214 fi
5215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5216 ac_c_werror_flag=$ac_save_c_werror_flag
5217 CFLAGS="$pgac_save_CFLAGS"
5218 CC="$pgac_save_CC"
5219 fi
5220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5221 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5222 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5223   CFLAGS="${CFLAGS} -Wendif-labels"
5224 fi
5225
5226
5227   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5228 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5229 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5230   $as_echo_n "(cached) " >&6
5231 else
5232   pgac_save_CXXFLAGS=$CXXFLAGS
5233 pgac_save_CXX=$CXX
5234 CXX=${CXX}
5235 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5236 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5237 ac_cxx_werror_flag=yes
5238 ac_ext=cpp
5239 ac_cpp='$CXXCPP $CPPFLAGS'
5240 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5241 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5242 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5243
5244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5245 /* end confdefs.h.  */
5246
5247 int
5248 main ()
5249 {
5250
5251   ;
5252   return 0;
5253 }
5254 _ACEOF
5255 if ac_fn_cxx_try_compile "$LINENO"; then :
5256   pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5257 else
5258   pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5259 fi
5260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5261 ac_ext=c
5262 ac_cpp='$CPP $CPPFLAGS'
5263 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5264 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5265 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5266
5267 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5268 CXXFLAGS="$pgac_save_CXXFLAGS"
5269 CXX="$pgac_save_CXX"
5270 fi
5271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5272 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5273 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5274   CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5275 fi
5276
5277
5278
5279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5280 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5281 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5282   $as_echo_n "(cached) " >&6
5283 else
5284   pgac_save_CFLAGS=$CFLAGS
5285 pgac_save_CC=$CC
5286 CC=${CC}
5287 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5288 ac_save_c_werror_flag=$ac_c_werror_flag
5289 ac_c_werror_flag=yes
5290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5291 /* end confdefs.h.  */
5292
5293 int
5294 main ()
5295 {
5296
5297   ;
5298   return 0;
5299 }
5300 _ACEOF
5301 if ac_fn_c_try_compile "$LINENO"; then :
5302   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5303 else
5304   pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5305 fi
5306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5307 ac_c_werror_flag=$ac_save_c_werror_flag
5308 CFLAGS="$pgac_save_CFLAGS"
5309 CC="$pgac_save_CC"
5310 fi
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5312 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5313 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5314   CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5315 fi
5316
5317
5318   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5319 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5320 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5321   $as_echo_n "(cached) " >&6
5322 else
5323   pgac_save_CXXFLAGS=$CXXFLAGS
5324 pgac_save_CXX=$CXX
5325 CXX=${CXX}
5326 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5327 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5328 ac_cxx_werror_flag=yes
5329 ac_ext=cpp
5330 ac_cpp='$CXXCPP $CPPFLAGS'
5331 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5332 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5333 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5334
5335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5336 /* end confdefs.h.  */
5337
5338 int
5339 main ()
5340 {
5341
5342   ;
5343   return 0;
5344 }
5345 _ACEOF
5346 if ac_fn_cxx_try_compile "$LINENO"; then :
5347   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5348 else
5349   pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5350 fi
5351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5352 ac_ext=c
5353 ac_cpp='$CPP $CPPFLAGS'
5354 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5355 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5356 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5357
5358 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5359 CXXFLAGS="$pgac_save_CXXFLAGS"
5360 CXX="$pgac_save_CXX"
5361 fi
5362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5363 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5364 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5365   CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5366 fi
5367
5368
5369   # This was included in -Wall/-Wformat in older GCC versions
5370
5371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5372 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5373 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5374   $as_echo_n "(cached) " >&6
5375 else
5376   pgac_save_CFLAGS=$CFLAGS
5377 pgac_save_CC=$CC
5378 CC=${CC}
5379 CFLAGS="${CFLAGS} -Wformat-security"
5380 ac_save_c_werror_flag=$ac_c_werror_flag
5381 ac_c_werror_flag=yes
5382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5383 /* end confdefs.h.  */
5384
5385 int
5386 main ()
5387 {
5388
5389   ;
5390   return 0;
5391 }
5392 _ACEOF
5393 if ac_fn_c_try_compile "$LINENO"; then :
5394   pgac_cv_prog_CC_cflags__Wformat_security=yes
5395 else
5396   pgac_cv_prog_CC_cflags__Wformat_security=no
5397 fi
5398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5399 ac_c_werror_flag=$ac_save_c_werror_flag
5400 CFLAGS="$pgac_save_CFLAGS"
5401 CC="$pgac_save_CC"
5402 fi
5403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5404 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5405 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5406   CFLAGS="${CFLAGS} -Wformat-security"
5407 fi
5408
5409
5410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5411 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5412 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5413   $as_echo_n "(cached) " >&6
5414 else
5415   pgac_save_CXXFLAGS=$CXXFLAGS
5416 pgac_save_CXX=$CXX
5417 CXX=${CXX}
5418 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5419 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5420 ac_cxx_werror_flag=yes
5421 ac_ext=cpp
5422 ac_cpp='$CXXCPP $CPPFLAGS'
5423 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5424 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5425 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5426
5427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5428 /* end confdefs.h.  */
5429
5430 int
5431 main ()
5432 {
5433
5434   ;
5435   return 0;
5436 }
5437 _ACEOF
5438 if ac_fn_cxx_try_compile "$LINENO"; then :
5439   pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5440 else
5441   pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5442 fi
5443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5444 ac_ext=c
5445 ac_cpp='$CPP $CPPFLAGS'
5446 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5447 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5448 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5449
5450 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5451 CXXFLAGS="$pgac_save_CXXFLAGS"
5452 CXX="$pgac_save_CXX"
5453 fi
5454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5455 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5456 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5457   CXXFLAGS="${CXXFLAGS} -Wformat-security"
5458 fi
5459
5460
5461   # Disable strict-aliasing rules; needed for gcc 3.3+
5462
5463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5464 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5465 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5466   $as_echo_n "(cached) " >&6
5467 else
5468   pgac_save_CFLAGS=$CFLAGS
5469 pgac_save_CC=$CC
5470 CC=${CC}
5471 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5472 ac_save_c_werror_flag=$ac_c_werror_flag
5473 ac_c_werror_flag=yes
5474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5475 /* end confdefs.h.  */
5476
5477 int
5478 main ()
5479 {
5480
5481   ;
5482   return 0;
5483 }
5484 _ACEOF
5485 if ac_fn_c_try_compile "$LINENO"; then :
5486   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5487 else
5488   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5489 fi
5490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5491 ac_c_werror_flag=$ac_save_c_werror_flag
5492 CFLAGS="$pgac_save_CFLAGS"
5493 CC="$pgac_save_CC"
5494 fi
5495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5496 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5497 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5498   CFLAGS="${CFLAGS} -fno-strict-aliasing"
5499 fi
5500
5501
5502   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5503 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5504 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5505   $as_echo_n "(cached) " >&6
5506 else
5507   pgac_save_CXXFLAGS=$CXXFLAGS
5508 pgac_save_CXX=$CXX
5509 CXX=${CXX}
5510 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5511 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5512 ac_cxx_werror_flag=yes
5513 ac_ext=cpp
5514 ac_cpp='$CXXCPP $CPPFLAGS'
5515 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5516 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5517 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5518
5519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5520 /* end confdefs.h.  */
5521
5522 int
5523 main ()
5524 {
5525
5526   ;
5527   return 0;
5528 }
5529 _ACEOF
5530 if ac_fn_cxx_try_compile "$LINENO"; then :
5531   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5532 else
5533   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5534 fi
5535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5536 ac_ext=c
5537 ac_cpp='$CPP $CPPFLAGS'
5538 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5539 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5540 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5541
5542 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5543 CXXFLAGS="$pgac_save_CXXFLAGS"
5544 CXX="$pgac_save_CXX"
5545 fi
5546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5547 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5548 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5549   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5550 fi
5551
5552
5553   # Disable optimizations that assume no overflow; needed for gcc 4.3+
5554
5555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5556 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5557 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5558   $as_echo_n "(cached) " >&6
5559 else
5560   pgac_save_CFLAGS=$CFLAGS
5561 pgac_save_CC=$CC
5562 CC=${CC}
5563 CFLAGS="${CFLAGS} -fwrapv"
5564 ac_save_c_werror_flag=$ac_c_werror_flag
5565 ac_c_werror_flag=yes
5566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5567 /* end confdefs.h.  */
5568
5569 int
5570 main ()
5571 {
5572
5573   ;
5574   return 0;
5575 }
5576 _ACEOF
5577 if ac_fn_c_try_compile "$LINENO"; then :
5578   pgac_cv_prog_CC_cflags__fwrapv=yes
5579 else
5580   pgac_cv_prog_CC_cflags__fwrapv=no
5581 fi
5582 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5583 ac_c_werror_flag=$ac_save_c_werror_flag
5584 CFLAGS="$pgac_save_CFLAGS"
5585 CC="$pgac_save_CC"
5586 fi
5587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5588 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5589 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5590   CFLAGS="${CFLAGS} -fwrapv"
5591 fi
5592
5593
5594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5595 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5596 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5597   $as_echo_n "(cached) " >&6
5598 else
5599   pgac_save_CXXFLAGS=$CXXFLAGS
5600 pgac_save_CXX=$CXX
5601 CXX=${CXX}
5602 CXXFLAGS="${CXXFLAGS} -fwrapv"
5603 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5604 ac_cxx_werror_flag=yes
5605 ac_ext=cpp
5606 ac_cpp='$CXXCPP $CPPFLAGS'
5607 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5608 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5609 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5610
5611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5612 /* end confdefs.h.  */
5613
5614 int
5615 main ()
5616 {
5617
5618   ;
5619   return 0;
5620 }
5621 _ACEOF
5622 if ac_fn_cxx_try_compile "$LINENO"; then :
5623   pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5624 else
5625   pgac_cv_prog_CXX_cxxflags__fwrapv=no
5626 fi
5627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5628 ac_ext=c
5629 ac_cpp='$CPP $CPPFLAGS'
5630 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5631 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5632 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5633
5634 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5635 CXXFLAGS="$pgac_save_CXXFLAGS"
5636 CXX="$pgac_save_CXX"
5637 fi
5638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5639 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5640 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5641   CXXFLAGS="${CXXFLAGS} -fwrapv"
5642 fi
5643
5644
5645   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5646
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5648 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5649 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5650   $as_echo_n "(cached) " >&6
5651 else
5652   pgac_save_CFLAGS=$CFLAGS
5653 pgac_save_CC=$CC
5654 CC=${CC}
5655 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5656 ac_save_c_werror_flag=$ac_c_werror_flag
5657 ac_c_werror_flag=yes
5658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5659 /* end confdefs.h.  */
5660
5661 int
5662 main ()
5663 {
5664
5665   ;
5666   return 0;
5667 }
5668 _ACEOF
5669 if ac_fn_c_try_compile "$LINENO"; then :
5670   pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5671 else
5672   pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5673 fi
5674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5675 ac_c_werror_flag=$ac_save_c_werror_flag
5676 CFLAGS="$pgac_save_CFLAGS"
5677 CC="$pgac_save_CC"
5678 fi
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5680 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5681 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5682   CFLAGS="${CFLAGS} -fexcess-precision=standard"
5683 fi
5684
5685
5686   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5687 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5688 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5689   $as_echo_n "(cached) " >&6
5690 else
5691   pgac_save_CXXFLAGS=$CXXFLAGS
5692 pgac_save_CXX=$CXX
5693 CXX=${CXX}
5694 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5695 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5696 ac_cxx_werror_flag=yes
5697 ac_ext=cpp
5698 ac_cpp='$CXXCPP $CPPFLAGS'
5699 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5700 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5701 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5702
5703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5704 /* end confdefs.h.  */
5705
5706 int
5707 main ()
5708 {
5709
5710   ;
5711   return 0;
5712 }
5713 _ACEOF
5714 if ac_fn_cxx_try_compile "$LINENO"; then :
5715   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5716 else
5717   pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5718 fi
5719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5720 ac_ext=c
5721 ac_cpp='$CPP $CPPFLAGS'
5722 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5723 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5724 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5725
5726 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5727 CXXFLAGS="$pgac_save_CXXFLAGS"
5728 CXX="$pgac_save_CXX"
5729 fi
5730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5731 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5732 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5733   CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5734 fi
5735
5736
5737   # Optimization flags for specific files that benefit from vectorization
5738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5739 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5740 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5741   $as_echo_n "(cached) " >&6
5742 else
5743   pgac_save_CFLAGS=$CFLAGS
5744 pgac_save_CC=$CC
5745 CC=${CC}
5746 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5747 ac_save_c_werror_flag=$ac_c_werror_flag
5748 ac_c_werror_flag=yes
5749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5750 /* end confdefs.h.  */
5751
5752 int
5753 main ()
5754 {
5755
5756   ;
5757   return 0;
5758 }
5759 _ACEOF
5760 if ac_fn_c_try_compile "$LINENO"; then :
5761   pgac_cv_prog_CC_cflags__funroll_loops=yes
5762 else
5763   pgac_cv_prog_CC_cflags__funroll_loops=no
5764 fi
5765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5766 ac_c_werror_flag=$ac_save_c_werror_flag
5767 CFLAGS="$pgac_save_CFLAGS"
5768 CC="$pgac_save_CC"
5769 fi
5770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5771 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5772 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5773   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5774 fi
5775
5776
5777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5778 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5779 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5780   $as_echo_n "(cached) " >&6
5781 else
5782   pgac_save_CFLAGS=$CFLAGS
5783 pgac_save_CC=$CC
5784 CC=${CC}
5785 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5786 ac_save_c_werror_flag=$ac_c_werror_flag
5787 ac_c_werror_flag=yes
5788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5789 /* end confdefs.h.  */
5790
5791 int
5792 main ()
5793 {
5794
5795   ;
5796   return 0;
5797 }
5798 _ACEOF
5799 if ac_fn_c_try_compile "$LINENO"; then :
5800   pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5801 else
5802   pgac_cv_prog_CC_cflags__ftree_vectorize=no
5803 fi
5804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5805 ac_c_werror_flag=$ac_save_c_werror_flag
5806 CFLAGS="$pgac_save_CFLAGS"
5807 CC="$pgac_save_CC"
5808 fi
5809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5810 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5811 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5812   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5813 fi
5814
5815
5816   # We want to suppress clang's unhelpful unused-command-line-argument warnings
5817   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5818   # test for the positive form and if that works, add the negative form
5819   NOT_THE_CFLAGS=""
5820   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5821 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5822 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} 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} -Wunused-command-line-argument"
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__Wunused_command_line_argument=yes
5844 else
5845   pgac_cv_prog_CC_cflags__Wunused_command_line_argument=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__Wunused_command_line_argument" >&5
5853 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
5854 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
5855   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5856 fi
5857
5858
5859   if test -n "$NOT_THE_CFLAGS"; then
5860     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
5861   fi
5862   # Similarly disable useless truncation warnings from gcc 8+
5863   NOT_THE_CFLAGS=""
5864   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
5865 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
5866 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
5867   $as_echo_n "(cached) " >&6
5868 else
5869   pgac_save_CFLAGS=$CFLAGS
5870 pgac_save_CC=$CC
5871 CC=${CC}
5872 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
5873 ac_save_c_werror_flag=$ac_c_werror_flag
5874 ac_c_werror_flag=yes
5875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5876 /* end confdefs.h.  */
5877
5878 int
5879 main ()
5880 {
5881
5882   ;
5883   return 0;
5884 }
5885 _ACEOF
5886 if ac_fn_c_try_compile "$LINENO"; then :
5887   pgac_cv_prog_CC_cflags__Wformat_truncation=yes
5888 else
5889   pgac_cv_prog_CC_cflags__Wformat_truncation=no
5890 fi
5891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5892 ac_c_werror_flag=$ac_save_c_werror_flag
5893 CFLAGS="$pgac_save_CFLAGS"
5894 CC="$pgac_save_CC"
5895 fi
5896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
5897 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
5898 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
5899   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
5900 fi
5901
5902
5903   if test -n "$NOT_THE_CFLAGS"; then
5904     CFLAGS="$CFLAGS -Wno-format-truncation"
5905   fi
5906   NOT_THE_CFLAGS=""
5907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
5908 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
5909 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
5910   $as_echo_n "(cached) " >&6
5911 else
5912   pgac_save_CFLAGS=$CFLAGS
5913 pgac_save_CC=$CC
5914 CC=${CC}
5915 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
5916 ac_save_c_werror_flag=$ac_c_werror_flag
5917 ac_c_werror_flag=yes
5918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5919 /* end confdefs.h.  */
5920
5921 int
5922 main ()
5923 {
5924
5925   ;
5926   return 0;
5927 }
5928 _ACEOF
5929 if ac_fn_c_try_compile "$LINENO"; then :
5930   pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
5931 else
5932   pgac_cv_prog_CC_cflags__Wstringop_truncation=no
5933 fi
5934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5935 ac_c_werror_flag=$ac_save_c_werror_flag
5936 CFLAGS="$pgac_save_CFLAGS"
5937 CC="$pgac_save_CC"
5938 fi
5939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
5940 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
5941 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
5942   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
5943 fi
5944
5945
5946   if test -n "$NOT_THE_CFLAGS"; then
5947     CFLAGS="$CFLAGS -Wno-stringop-truncation"
5948   fi
5949 elif test "$ICC" = yes; then
5950   # Intel's compiler has a bug/misoptimization in checking for
5951   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
5952
5953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
5954 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
5955 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
5956   $as_echo_n "(cached) " >&6
5957 else
5958   pgac_save_CFLAGS=$CFLAGS
5959 pgac_save_CC=$CC
5960 CC=${CC}
5961 CFLAGS="${CFLAGS} -mp1"
5962 ac_save_c_werror_flag=$ac_c_werror_flag
5963 ac_c_werror_flag=yes
5964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5965 /* end confdefs.h.  */
5966
5967 int
5968 main ()
5969 {
5970
5971   ;
5972   return 0;
5973 }
5974 _ACEOF
5975 if ac_fn_c_try_compile "$LINENO"; then :
5976   pgac_cv_prog_CC_cflags__mp1=yes
5977 else
5978   pgac_cv_prog_CC_cflags__mp1=no
5979 fi
5980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5981 ac_c_werror_flag=$ac_save_c_werror_flag
5982 CFLAGS="$pgac_save_CFLAGS"
5983 CC="$pgac_save_CC"
5984 fi
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
5986 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
5987 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
5988   CFLAGS="${CFLAGS} -mp1"
5989 fi
5990
5991
5992   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
5993 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
5994 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
5995   $as_echo_n "(cached) " >&6
5996 else
5997   pgac_save_CXXFLAGS=$CXXFLAGS
5998 pgac_save_CXX=$CXX
5999 CXX=${CXX}
6000 CXXFLAGS="${CXXFLAGS} -mp1"
6001 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6002 ac_cxx_werror_flag=yes
6003 ac_ext=cpp
6004 ac_cpp='$CXXCPP $CPPFLAGS'
6005 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6006 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6007 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6008
6009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6010 /* end confdefs.h.  */
6011
6012 int
6013 main ()
6014 {
6015
6016   ;
6017   return 0;
6018 }
6019 _ACEOF
6020 if ac_fn_cxx_try_compile "$LINENO"; then :
6021   pgac_cv_prog_CXX_cxxflags__mp1=yes
6022 else
6023   pgac_cv_prog_CXX_cxxflags__mp1=no
6024 fi
6025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6026 ac_ext=c
6027 ac_cpp='$CPP $CPPFLAGS'
6028 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6029 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6030 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6031
6032 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6033 CXXFLAGS="$pgac_save_CXXFLAGS"
6034 CXX="$pgac_save_CXX"
6035 fi
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6037 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6038 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6039   CXXFLAGS="${CXXFLAGS} -mp1"
6040 fi
6041
6042
6043   # Make sure strict aliasing is off (though this is said to be the default)
6044
6045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6046 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6047 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6048   $as_echo_n "(cached) " >&6
6049 else
6050   pgac_save_CFLAGS=$CFLAGS
6051 pgac_save_CC=$CC
6052 CC=${CC}
6053 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6054 ac_save_c_werror_flag=$ac_c_werror_flag
6055 ac_c_werror_flag=yes
6056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6057 /* end confdefs.h.  */
6058
6059 int
6060 main ()
6061 {
6062
6063   ;
6064   return 0;
6065 }
6066 _ACEOF
6067 if ac_fn_c_try_compile "$LINENO"; then :
6068   pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6069 else
6070   pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6071 fi
6072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6073 ac_c_werror_flag=$ac_save_c_werror_flag
6074 CFLAGS="$pgac_save_CFLAGS"
6075 CC="$pgac_save_CC"
6076 fi
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6078 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6079 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6080   CFLAGS="${CFLAGS} -fno-strict-aliasing"
6081 fi
6082
6083
6084   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6085 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6086 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6087   $as_echo_n "(cached) " >&6
6088 else
6089   pgac_save_CXXFLAGS=$CXXFLAGS
6090 pgac_save_CXX=$CXX
6091 CXX=${CXX}
6092 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6093 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6094 ac_cxx_werror_flag=yes
6095 ac_ext=cpp
6096 ac_cpp='$CXXCPP $CPPFLAGS'
6097 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6098 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6099 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6100
6101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6102 /* end confdefs.h.  */
6103
6104 int
6105 main ()
6106 {
6107
6108   ;
6109   return 0;
6110 }
6111 _ACEOF
6112 if ac_fn_cxx_try_compile "$LINENO"; then :
6113   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6114 else
6115   pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6116 fi
6117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6118 ac_ext=c
6119 ac_cpp='$CPP $CPPFLAGS'
6120 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6121 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6122 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6123
6124 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6125 CXXFLAGS="$pgac_save_CXXFLAGS"
6126 CXX="$pgac_save_CXX"
6127 fi
6128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6129 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6130 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6131   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6132 fi
6133
6134
6135 elif test "$PORTNAME" = "aix"; then
6136   # AIX's xlc has to have strict aliasing turned off too
6137
6138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6139 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6140 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6141   $as_echo_n "(cached) " >&6
6142 else
6143   pgac_save_CFLAGS=$CFLAGS
6144 pgac_save_CC=$CC
6145 CC=${CC}
6146 CFLAGS="${CFLAGS} -qnoansialias"
6147 ac_save_c_werror_flag=$ac_c_werror_flag
6148 ac_c_werror_flag=yes
6149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6150 /* end confdefs.h.  */
6151
6152 int
6153 main ()
6154 {
6155
6156   ;
6157   return 0;
6158 }
6159 _ACEOF
6160 if ac_fn_c_try_compile "$LINENO"; then :
6161   pgac_cv_prog_CC_cflags__qnoansialias=yes
6162 else
6163   pgac_cv_prog_CC_cflags__qnoansialias=no
6164 fi
6165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6166 ac_c_werror_flag=$ac_save_c_werror_flag
6167 CFLAGS="$pgac_save_CFLAGS"
6168 CC="$pgac_save_CC"
6169 fi
6170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6171 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6172 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6173   CFLAGS="${CFLAGS} -qnoansialias"
6174 fi
6175
6176
6177   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6178 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6179 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6180   $as_echo_n "(cached) " >&6
6181 else
6182   pgac_save_CXXFLAGS=$CXXFLAGS
6183 pgac_save_CXX=$CXX
6184 CXX=${CXX}
6185 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6186 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6187 ac_cxx_werror_flag=yes
6188 ac_ext=cpp
6189 ac_cpp='$CXXCPP $CPPFLAGS'
6190 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6191 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6192 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6193
6194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6195 /* end confdefs.h.  */
6196
6197 int
6198 main ()
6199 {
6200
6201   ;
6202   return 0;
6203 }
6204 _ACEOF
6205 if ac_fn_cxx_try_compile "$LINENO"; then :
6206   pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6207 else
6208   pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6209 fi
6210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6211 ac_ext=c
6212 ac_cpp='$CPP $CPPFLAGS'
6213 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6214 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6215 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6216
6217 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6218 CXXFLAGS="$pgac_save_CXXFLAGS"
6219 CXX="$pgac_save_CXX"
6220 fi
6221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6222 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6223 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6224   CXXFLAGS="${CXXFLAGS} -qnoansialias"
6225 fi
6226
6227
6228
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6230 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6231 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6232   $as_echo_n "(cached) " >&6
6233 else
6234   pgac_save_CFLAGS=$CFLAGS
6235 pgac_save_CC=$CC
6236 CC=${CC}
6237 CFLAGS="${CFLAGS} -qlonglong"
6238 ac_save_c_werror_flag=$ac_c_werror_flag
6239 ac_c_werror_flag=yes
6240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6241 /* end confdefs.h.  */
6242
6243 int
6244 main ()
6245 {
6246
6247   ;
6248   return 0;
6249 }
6250 _ACEOF
6251 if ac_fn_c_try_compile "$LINENO"; then :
6252   pgac_cv_prog_CC_cflags__qlonglong=yes
6253 else
6254   pgac_cv_prog_CC_cflags__qlonglong=no
6255 fi
6256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6257 ac_c_werror_flag=$ac_save_c_werror_flag
6258 CFLAGS="$pgac_save_CFLAGS"
6259 CC="$pgac_save_CC"
6260 fi
6261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6262 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6263 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6264   CFLAGS="${CFLAGS} -qlonglong"
6265 fi
6266
6267
6268   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6269 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6270 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6271   $as_echo_n "(cached) " >&6
6272 else
6273   pgac_save_CXXFLAGS=$CXXFLAGS
6274 pgac_save_CXX=$CXX
6275 CXX=${CXX}
6276 CXXFLAGS="${CXXFLAGS} -qlonglong"
6277 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6278 ac_cxx_werror_flag=yes
6279 ac_ext=cpp
6280 ac_cpp='$CXXCPP $CPPFLAGS'
6281 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6282 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6283 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6284
6285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6286 /* end confdefs.h.  */
6287
6288 int
6289 main ()
6290 {
6291
6292   ;
6293   return 0;
6294 }
6295 _ACEOF
6296 if ac_fn_cxx_try_compile "$LINENO"; then :
6297   pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6298 else
6299   pgac_cv_prog_CXX_cxxflags__qlonglong=no
6300 fi
6301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6302 ac_ext=c
6303 ac_cpp='$CPP $CPPFLAGS'
6304 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6305 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6306 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6307
6308 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6309 CXXFLAGS="$pgac_save_CXXFLAGS"
6310 CXX="$pgac_save_CXX"
6311 fi
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6313 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6314 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6315   CXXFLAGS="${CXXFLAGS} -qlonglong"
6316 fi
6317
6318
6319 elif test "$PORTNAME" = "hpux"; then
6320   # On some versions of HP-UX, libm functions do not set errno by default.
6321   # Fix that by using +Olibmerrno if the compiler recognizes it.
6322
6323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6324 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6325 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6326   $as_echo_n "(cached) " >&6
6327 else
6328   pgac_save_CFLAGS=$CFLAGS
6329 pgac_save_CC=$CC
6330 CC=${CC}
6331 CFLAGS="${CFLAGS} +Olibmerrno"
6332 ac_save_c_werror_flag=$ac_c_werror_flag
6333 ac_c_werror_flag=yes
6334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6335 /* end confdefs.h.  */
6336
6337 int
6338 main ()
6339 {
6340
6341   ;
6342   return 0;
6343 }
6344 _ACEOF
6345 if ac_fn_c_try_compile "$LINENO"; then :
6346   pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6347 else
6348   pgac_cv_prog_CC_cflags_pOlibmerrno=no
6349 fi
6350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6351 ac_c_werror_flag=$ac_save_c_werror_flag
6352 CFLAGS="$pgac_save_CFLAGS"
6353 CC="$pgac_save_CC"
6354 fi
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6356 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6357 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6358   CFLAGS="${CFLAGS} +Olibmerrno"
6359 fi
6360
6361
6362   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6363 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6364 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6365   $as_echo_n "(cached) " >&6
6366 else
6367   pgac_save_CXXFLAGS=$CXXFLAGS
6368 pgac_save_CXX=$CXX
6369 CXX=${CXX}
6370 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6371 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6372 ac_cxx_werror_flag=yes
6373 ac_ext=cpp
6374 ac_cpp='$CXXCPP $CPPFLAGS'
6375 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6376 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6377 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6378
6379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6380 /* end confdefs.h.  */
6381
6382 int
6383 main ()
6384 {
6385
6386   ;
6387   return 0;
6388 }
6389 _ACEOF
6390 if ac_fn_cxx_try_compile "$LINENO"; then :
6391   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6392 else
6393   pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6394 fi
6395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6396 ac_ext=c
6397 ac_cpp='$CPP $CPPFLAGS'
6398 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6399 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6400 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6401
6402 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6403 CXXFLAGS="$pgac_save_CXXFLAGS"
6404 CXX="$pgac_save_CXX"
6405 fi
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6407 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6408 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6409   CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6410 fi
6411
6412
6413 fi
6414
6415 CFLAGS_VECTOR=$CFLAGS_VECTOR
6416
6417
6418 # Determine flags used to emit bitcode for JIT inlining. Need to test
6419 # for behaviour changing compiler flags, to keep compatibility with
6420 # compiler used for normal postgres code.
6421 if test "$with_llvm" = yes ; then
6422   CLANGXX="$CLANG -xc++"
6423
6424   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6425 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6426 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6427   $as_echo_n "(cached) " >&6
6428 else
6429   pgac_save_CFLAGS=$CFLAGS
6430 pgac_save_CC=$CC
6431 CC=${CLANG}
6432 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6433 ac_save_c_werror_flag=$ac_c_werror_flag
6434 ac_c_werror_flag=yes
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_c_try_compile "$LINENO"; then :
6447   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6448 else
6449   pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6450 fi
6451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6452 ac_c_werror_flag=$ac_save_c_werror_flag
6453 CFLAGS="$pgac_save_CFLAGS"
6454 CC="$pgac_save_CC"
6455 fi
6456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6457 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6458 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6459   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6460 fi
6461
6462   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6463 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6464 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6465   $as_echo_n "(cached) " >&6
6466 else
6467   pgac_save_CXXFLAGS=$CXXFLAGS
6468 pgac_save_CXX=$CXX
6469 CXX=${CLANGXX}
6470 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6471 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6472 ac_cxx_werror_flag=yes
6473 ac_ext=cpp
6474 ac_cpp='$CXXCPP $CPPFLAGS'
6475 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6476 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6477 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6478
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_cxx_try_compile "$LINENO"; then :
6491   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6492 else
6493   pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6494 fi
6495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6496 ac_ext=c
6497 ac_cpp='$CPP $CPPFLAGS'
6498 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6499 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6500 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6501
6502 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6503 CXXFLAGS="$pgac_save_CXXFLAGS"
6504 CXX="$pgac_save_CXX"
6505 fi
6506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6507 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6508 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6509   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6510 fi
6511
6512   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6513 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6514 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6515   $as_echo_n "(cached) " >&6
6516 else
6517   pgac_save_CFLAGS=$CFLAGS
6518 pgac_save_CC=$CC
6519 CC=${CLANG}
6520 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6521 ac_save_c_werror_flag=$ac_c_werror_flag
6522 ac_c_werror_flag=yes
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_c_try_compile "$LINENO"; then :
6535   pgac_cv_prog_CLANG_cflags__fwrapv=yes
6536 else
6537   pgac_cv_prog_CLANG_cflags__fwrapv=no
6538 fi
6539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6540 ac_c_werror_flag=$ac_save_c_werror_flag
6541 CFLAGS="$pgac_save_CFLAGS"
6542 CC="$pgac_save_CC"
6543 fi
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6545 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6546 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6547   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6548 fi
6549
6550   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6551 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6552 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6553   $as_echo_n "(cached) " >&6
6554 else
6555   pgac_save_CXXFLAGS=$CXXFLAGS
6556 pgac_save_CXX=$CXX
6557 CXX=${CLANGXX}
6558 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6559 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6560 ac_cxx_werror_flag=yes
6561 ac_ext=cpp
6562 ac_cpp='$CXXCPP $CPPFLAGS'
6563 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6564 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6565 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6566
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_cxx_try_compile "$LINENO"; then :
6579   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6580 else
6581   pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6582 fi
6583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6584 ac_ext=c
6585 ac_cpp='$CPP $CPPFLAGS'
6586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6589
6590 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6591 CXXFLAGS="$pgac_save_CXXFLAGS"
6592 CXX="$pgac_save_CXX"
6593 fi
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6595 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6596 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6597   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6598 fi
6599
6600   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6601 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6602 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6603   $as_echo_n "(cached) " >&6
6604 else
6605   pgac_save_CFLAGS=$CFLAGS
6606 pgac_save_CC=$CC
6607 CC=${CLANG}
6608 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6609 ac_save_c_werror_flag=$ac_c_werror_flag
6610 ac_c_werror_flag=yes
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_c_try_compile "$LINENO"; then :
6623   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6624 else
6625   pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6626 fi
6627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6628 ac_c_werror_flag=$ac_save_c_werror_flag
6629 CFLAGS="$pgac_save_CFLAGS"
6630 CC="$pgac_save_CC"
6631 fi
6632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6633 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6634 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6635   BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6636 fi
6637
6638   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6639 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6640 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6641   $as_echo_n "(cached) " >&6
6642 else
6643   pgac_save_CXXFLAGS=$CXXFLAGS
6644 pgac_save_CXX=$CXX
6645 CXX=${CLANGXX}
6646 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6647 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6648 ac_cxx_werror_flag=yes
6649 ac_ext=cpp
6650 ac_cpp='$CXXCPP $CPPFLAGS'
6651 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6652 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6653 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6654
6655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6656 /* end confdefs.h.  */
6657
6658 int
6659 main ()
6660 {
6661
6662   ;
6663   return 0;
6664 }
6665 _ACEOF
6666 if ac_fn_cxx_try_compile "$LINENO"; then :
6667   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6668 else
6669   pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6670 fi
6671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6672 ac_ext=c
6673 ac_cpp='$CPP $CPPFLAGS'
6674 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6675 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6676 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6677
6678 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6679 CXXFLAGS="$pgac_save_CXXFLAGS"
6680 CXX="$pgac_save_CXX"
6681 fi
6682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6683 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6684 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6685   BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6686 fi
6687
6688 fi
6689
6690 # supply -g if --enable-debug
6691 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6692   CFLAGS="$CFLAGS -g"
6693 fi
6694
6695 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6696   CXXFLAGS="$CXXFLAGS -g"
6697 fi
6698
6699 # enable code coverage if --enable-coverage
6700 if test "$enable_coverage" = yes; then
6701   if test "$GCC" = yes; then
6702     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6703     CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6704   else
6705     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6706   fi
6707 fi
6708
6709 # enable profiling if --enable-profiling
6710 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6711   if test "$GCC" = yes; then
6712
6713 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6714
6715     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6716     CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6717   else
6718     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6719   fi
6720 fi
6721
6722 # We already have this in Makefile.win32, but configure needs it too
6723 if test "$PORTNAME" = "win32"; then
6724   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6725 fi
6726
6727 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6728 # user-specified flags (if any) at the end.  This lets users override
6729 # the automatic additions.
6730 CFLAGS="$CFLAGS $user_CFLAGS"
6731 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6732 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6733 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6734
6735 BITCODE_CFLAGS=$BITCODE_CFLAGS
6736
6737 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6738
6739
6740 # Check if the compiler still works with the final flag settings
6741 # (note, we're not checking that for CXX, which is optional)
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6743 $as_echo_n "checking whether the C compiler still works... " >&6; }
6744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6745 /* end confdefs.h.  */
6746
6747 int
6748 main ()
6749 {
6750 return 0;
6751   ;
6752   return 0;
6753 }
6754 _ACEOF
6755 if ac_fn_c_try_link "$LINENO"; then :
6756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6757 $as_echo "yes" >&6; }
6758 else
6759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6760 $as_echo "no" >&6; }
6761    as_fn_error $? "cannot proceed" "$LINENO" 5
6762 fi
6763 rm -f core conftest.err conftest.$ac_objext \
6764     conftest$ac_exeext conftest.$ac_ext
6765
6766 # Defend against gcc -ffast-math
6767 if test "$GCC" = yes; then
6768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6769 /* end confdefs.h.  */
6770
6771 int
6772 main ()
6773 {
6774 #ifdef __FAST_MATH__
6775 choke me
6776 #endif
6777   ;
6778   return 0;
6779 }
6780 _ACEOF
6781 if ac_fn_c_try_compile "$LINENO"; then :
6782
6783 else
6784   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6785 fi
6786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6787 fi
6788
6789 ac_ext=c
6790 ac_cpp='$CPP $CPPFLAGS'
6791 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6792 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6793 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6795 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6796 # On Suns, sometimes $CPP names a directory.
6797 if test -n "$CPP" && test -d "$CPP"; then
6798   CPP=
6799 fi
6800 if test -z "$CPP"; then
6801   if ${ac_cv_prog_CPP+:} false; then :
6802   $as_echo_n "(cached) " >&6
6803 else
6804       # Double quotes because CPP needs to be expanded
6805     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6806     do
6807       ac_preproc_ok=false
6808 for ac_c_preproc_warn_flag in '' yes
6809 do
6810   # Use a header file that comes with gcc, so configuring glibc
6811   # with a fresh cross-compiler works.
6812   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6813   # <limits.h> exists even on freestanding compilers.
6814   # On the NeXT, cc -E runs the code through the compiler's parser,
6815   # not just through cpp. "Syntax error" is here to catch this case.
6816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6817 /* end confdefs.h.  */
6818 #ifdef __STDC__
6819 # include <limits.h>
6820 #else
6821 # include <assert.h>
6822 #endif
6823                      Syntax error
6824 _ACEOF
6825 if ac_fn_c_try_cpp "$LINENO"; then :
6826
6827 else
6828   # Broken: fails on valid input.
6829 continue
6830 fi
6831 rm -f conftest.err conftest.i conftest.$ac_ext
6832
6833   # OK, works on sane cases.  Now check whether nonexistent headers
6834   # can be detected and how.
6835   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6836 /* end confdefs.h.  */
6837 #include <ac_nonexistent.h>
6838 _ACEOF
6839 if ac_fn_c_try_cpp "$LINENO"; then :
6840   # Broken: success on invalid input.
6841 continue
6842 else
6843   # Passes both tests.
6844 ac_preproc_ok=:
6845 break
6846 fi
6847 rm -f conftest.err conftest.i conftest.$ac_ext
6848
6849 done
6850 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6851 rm -f conftest.i conftest.err conftest.$ac_ext
6852 if $ac_preproc_ok; then :
6853   break
6854 fi
6855
6856     done
6857     ac_cv_prog_CPP=$CPP
6858
6859 fi
6860   CPP=$ac_cv_prog_CPP
6861 else
6862   ac_cv_prog_CPP=$CPP
6863 fi
6864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6865 $as_echo "$CPP" >&6; }
6866 ac_preproc_ok=false
6867 for ac_c_preproc_warn_flag in '' yes
6868 do
6869   # Use a header file that comes with gcc, so configuring glibc
6870   # with a fresh cross-compiler works.
6871   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6872   # <limits.h> exists even on freestanding compilers.
6873   # On the NeXT, cc -E runs the code through the compiler's parser,
6874   # not just through cpp. "Syntax error" is here to catch this case.
6875   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6876 /* end confdefs.h.  */
6877 #ifdef __STDC__
6878 # include <limits.h>
6879 #else
6880 # include <assert.h>
6881 #endif
6882                      Syntax error
6883 _ACEOF
6884 if ac_fn_c_try_cpp "$LINENO"; then :
6885
6886 else
6887   # Broken: fails on valid input.
6888 continue
6889 fi
6890 rm -f conftest.err conftest.i conftest.$ac_ext
6891
6892   # OK, works on sane cases.  Now check whether nonexistent headers
6893   # can be detected and how.
6894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6895 /* end confdefs.h.  */
6896 #include <ac_nonexistent.h>
6897 _ACEOF
6898 if ac_fn_c_try_cpp "$LINENO"; then :
6899   # Broken: success on invalid input.
6900 continue
6901 else
6902   # Passes both tests.
6903 ac_preproc_ok=:
6904 break
6905 fi
6906 rm -f conftest.err conftest.i conftest.$ac_ext
6907
6908 done
6909 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6910 rm -f conftest.i conftest.err conftest.$ac_ext
6911 if $ac_preproc_ok; then :
6912
6913 else
6914   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6915 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6916 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6917 See \`config.log' for more details" "$LINENO" 5; }
6918 fi
6919
6920 ac_ext=c
6921 ac_cpp='$CPP $CPPFLAGS'
6922 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6923 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6924 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6925
6926
6927
6928
6929 #
6930 # Set up TAS assembly code if needed; the template file has now had its
6931 # chance to request this.
6932 #
6933 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
6934
6935
6936 if test "$need_tas" = yes ; then
6937   TAS=tas.o
6938 else
6939   TAS=""
6940 fi
6941
6942
6943
6944 #
6945 # Automatic dependency tracking
6946 #
6947
6948
6949 # Check whether --enable-depend was given.
6950 if test "${enable_depend+set}" = set; then :
6951   enableval=$enable_depend;
6952   case $enableval in
6953     yes)
6954       autodepend=yes
6955       ;;
6956     no)
6957       :
6958       ;;
6959     *)
6960       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
6961       ;;
6962   esac
6963
6964 else
6965   enable_depend=no
6966
6967 fi
6968
6969
6970
6971
6972
6973 #
6974 # Enable assert checks
6975 #
6976
6977
6978 # Check whether --enable-cassert was given.
6979 if test "${enable_cassert+set}" = set; then :
6980   enableval=$enable_cassert;
6981   case $enableval in
6982     yes)
6983
6984 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
6985
6986       ;;
6987     no)
6988       :
6989       ;;
6990     *)
6991       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
6992       ;;
6993   esac
6994
6995 else
6996   enable_cassert=no
6997
6998 fi
6999
7000
7001
7002
7003 #
7004 # Include directories
7005 #
7006 ac_save_IFS=$IFS
7007 IFS="${IFS}${PATH_SEPARATOR}"
7008 # SRCH_INC comes from the template file
7009 for dir in $with_includes $SRCH_INC; do
7010   if test -d "$dir"; then
7011     INCLUDES="$INCLUDES -I$dir"
7012   else
7013     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7014 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7015   fi
7016 done
7017 IFS=$ac_save_IFS
7018
7019
7020
7021 #
7022 # Library directories
7023 #
7024 ac_save_IFS=$IFS
7025 IFS="${IFS}${PATH_SEPARATOR}"
7026 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7027 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7028   if test -d "$dir"; then
7029     LIBDIRS="$LIBDIRS -L$dir"
7030   else
7031     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7032 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7033   fi
7034 done
7035 IFS=$ac_save_IFS
7036
7037 #
7038 # Enable thread-safe client libraries
7039 #
7040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7041 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7042
7043
7044 # Check whether --enable-thread-safety was given.
7045 if test "${enable_thread_safety+set}" = set; then :
7046   enableval=$enable_thread_safety;
7047   case $enableval in
7048     yes)
7049       :
7050       ;;
7051     no)
7052       :
7053       ;;
7054     *)
7055       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7056       ;;
7057   esac
7058
7059 else
7060   enable_thread_safety=yes
7061
7062 fi
7063
7064
7065 if test "$enable_thread_safety" = yes; then
7066
7067 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7068
7069 fi
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7071 $as_echo "$enable_thread_safety" >&6; }
7072
7073
7074 #
7075 # ICU
7076 #
7077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7078 $as_echo_n "checking whether to build with ICU support... " >&6; }
7079
7080
7081
7082 # Check whether --with-icu was given.
7083 if test "${with_icu+set}" = set; then :
7084   withval=$with_icu;
7085   case $withval in
7086     yes)
7087
7088 $as_echo "#define USE_ICU 1" >>confdefs.h
7089
7090       ;;
7091     no)
7092       :
7093       ;;
7094     *)
7095       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7096       ;;
7097   esac
7098
7099 else
7100   with_icu=no
7101
7102 fi
7103
7104
7105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7106 $as_echo "$with_icu" >&6; }
7107
7108
7109 if test "$with_icu" = yes; then
7110
7111
7112
7113
7114
7115
7116
7117 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7118         if test -n "$ac_tool_prefix"; then
7119   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7120 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7122 $as_echo_n "checking for $ac_word... " >&6; }
7123 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7124   $as_echo_n "(cached) " >&6
7125 else
7126   case $PKG_CONFIG in
7127   [\\/]* | ?:[\\/]*)
7128   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7129   ;;
7130   *)
7131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7132 for as_dir in $PATH
7133 do
7134   IFS=$as_save_IFS
7135   test -z "$as_dir" && as_dir=.
7136     for ac_exec_ext in '' $ac_executable_extensions; do
7137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7138     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7140     break 2
7141   fi
7142 done
7143   done
7144 IFS=$as_save_IFS
7145
7146   ;;
7147 esac
7148 fi
7149 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7150 if test -n "$PKG_CONFIG"; then
7151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7152 $as_echo "$PKG_CONFIG" >&6; }
7153 else
7154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7155 $as_echo "no" >&6; }
7156 fi
7157
7158
7159 fi
7160 if test -z "$ac_cv_path_PKG_CONFIG"; then
7161   ac_pt_PKG_CONFIG=$PKG_CONFIG
7162   # Extract the first word of "pkg-config", so it can be a program name with args.
7163 set dummy pkg-config; ac_word=$2
7164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7165 $as_echo_n "checking for $ac_word... " >&6; }
7166 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7167   $as_echo_n "(cached) " >&6
7168 else
7169   case $ac_pt_PKG_CONFIG in
7170   [\\/]* | ?:[\\/]*)
7171   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7172   ;;
7173   *)
7174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7175 for as_dir in $PATH
7176 do
7177   IFS=$as_save_IFS
7178   test -z "$as_dir" && as_dir=.
7179     for ac_exec_ext in '' $ac_executable_extensions; do
7180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7181     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7183     break 2
7184   fi
7185 done
7186   done
7187 IFS=$as_save_IFS
7188
7189   ;;
7190 esac
7191 fi
7192 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7193 if test -n "$ac_pt_PKG_CONFIG"; then
7194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7195 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7196 else
7197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7198 $as_echo "no" >&6; }
7199 fi
7200
7201   if test "x$ac_pt_PKG_CONFIG" = x; then
7202     PKG_CONFIG=""
7203   else
7204     case $cross_compiling:$ac_tool_warned in
7205 yes:)
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7207 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7208 ac_tool_warned=yes ;;
7209 esac
7210     PKG_CONFIG=$ac_pt_PKG_CONFIG
7211   fi
7212 else
7213   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7214 fi
7215
7216 fi
7217 if test -n "$PKG_CONFIG"; then
7218         _pkg_min_version=0.9.0
7219         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7220 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7221         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7222                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7223 $as_echo "yes" >&6; }
7224         else
7225                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7226 $as_echo "no" >&6; }
7227                 PKG_CONFIG=""
7228         fi
7229 fi
7230
7231 pkg_failed=no
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7233 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7234
7235 if test -n "$ICU_CFLAGS"; then
7236     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7237  elif test -n "$PKG_CONFIG"; then
7238     if test -n "$PKG_CONFIG" && \
7239     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7240   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7241   ac_status=$?
7242   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7243   test $ac_status = 0; }; then
7244   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7245                       test "x$?" != "x0" && pkg_failed=yes
7246 else
7247   pkg_failed=yes
7248 fi
7249  else
7250     pkg_failed=untried
7251 fi
7252 if test -n "$ICU_LIBS"; then
7253     pkg_cv_ICU_LIBS="$ICU_LIBS"
7254  elif test -n "$PKG_CONFIG"; then
7255     if test -n "$PKG_CONFIG" && \
7256     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7257   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7258   ac_status=$?
7259   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7260   test $ac_status = 0; }; then
7261   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7262                       test "x$?" != "x0" && pkg_failed=yes
7263 else
7264   pkg_failed=yes
7265 fi
7266  else
7267     pkg_failed=untried
7268 fi
7269
7270
7271
7272 if test $pkg_failed = yes; then
7273         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7274 $as_echo "no" >&6; }
7275
7276 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7277         _pkg_short_errors_supported=yes
7278 else
7279         _pkg_short_errors_supported=no
7280 fi
7281         if test $_pkg_short_errors_supported = yes; then
7282                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7283         else
7284                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7285         fi
7286         # Put the nasty error message in config.log where it belongs
7287         echo "$ICU_PKG_ERRORS" >&5
7288
7289         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7290
7291 $ICU_PKG_ERRORS
7292
7293 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7294 installed software in a non-standard prefix.
7295
7296 Alternatively, you may set the environment variables ICU_CFLAGS
7297 and ICU_LIBS to avoid the need to call pkg-config.
7298 See the pkg-config man page for more details." "$LINENO" 5
7299 elif test $pkg_failed = untried; then
7300         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7301 $as_echo "no" >&6; }
7302         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7303 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7304 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7305 is in your PATH or set the PKG_CONFIG environment variable to the full
7306 path to pkg-config.
7307
7308 Alternatively, you may set the environment variables ICU_CFLAGS
7309 and ICU_LIBS to avoid the need to call pkg-config.
7310 See the pkg-config man page for more details.
7311
7312 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7313 See \`config.log' for more details" "$LINENO" 5; }
7314 else
7315         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7316         ICU_LIBS=$pkg_cv_ICU_LIBS
7317         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7318 $as_echo "yes" >&6; }
7319
7320 fi
7321 fi
7322
7323 #
7324 # Optionally build Tcl modules (PL/Tcl)
7325 #
7326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7327 $as_echo_n "checking whether to build with Tcl... " >&6; }
7328
7329
7330
7331 # Check whether --with-tcl was given.
7332 if test "${with_tcl+set}" = set; then :
7333   withval=$with_tcl;
7334   case $withval in
7335     yes)
7336       :
7337       ;;
7338     no)
7339       :
7340       ;;
7341     *)
7342       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7343       ;;
7344   esac
7345
7346 else
7347   with_tcl=no
7348
7349 fi
7350
7351
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7353 $as_echo "$with_tcl" >&6; }
7354
7355
7356 # We see if the path to the Tcl/Tk configuration scripts is specified.
7357 # This will override the use of tclsh to find the paths to search.
7358
7359
7360
7361
7362 # Check whether --with-tclconfig was given.
7363 if test "${with_tclconfig+set}" = set; then :
7364   withval=$with_tclconfig;
7365   case $withval in
7366     yes)
7367       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7368       ;;
7369     no)
7370       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7371       ;;
7372     *)
7373
7374       ;;
7375   esac
7376
7377 fi
7378
7379
7380
7381 #
7382 # Optionally build Perl modules (PL/Perl)
7383 #
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7385 $as_echo_n "checking whether to build Perl modules... " >&6; }
7386
7387
7388
7389 # Check whether --with-perl was given.
7390 if test "${with_perl+set}" = set; then :
7391   withval=$with_perl;
7392   case $withval in
7393     yes)
7394       :
7395       ;;
7396     no)
7397       :
7398       ;;
7399     *)
7400       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7401       ;;
7402   esac
7403
7404 else
7405   with_perl=no
7406
7407 fi
7408
7409
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7411 $as_echo "$with_perl" >&6; }
7412
7413
7414 #
7415 # Optionally build Python modules (PL/Python)
7416 #
7417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7418 $as_echo_n "checking whether to build Python modules... " >&6; }
7419
7420
7421
7422 # Check whether --with-python was given.
7423 if test "${with_python+set}" = set; then :
7424   withval=$with_python;
7425   case $withval in
7426     yes)
7427       :
7428       ;;
7429     no)
7430       :
7431       ;;
7432     *)
7433       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7434       ;;
7435   esac
7436
7437 else
7438   with_python=no
7439
7440 fi
7441
7442
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7444 $as_echo "$with_python" >&6; }
7445
7446
7447 #
7448 # GSSAPI
7449 #
7450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7451 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7452
7453
7454
7455 # Check whether --with-gssapi was given.
7456 if test "${with_gssapi+set}" = set; then :
7457   withval=$with_gssapi;
7458   case $withval in
7459     yes)
7460
7461
7462 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7463
7464   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7465
7466       ;;
7467     no)
7468       :
7469       ;;
7470     *)
7471       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7472       ;;
7473   esac
7474
7475 else
7476   with_gssapi=no
7477
7478 fi
7479
7480
7481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7482 $as_echo "$with_gssapi" >&6; }
7483
7484
7485
7486
7487
7488
7489 #
7490 # Kerberos configuration parameters
7491 #
7492
7493
7494
7495 # Check whether --with-krb-srvnam was given.
7496 if test "${with_krb_srvnam+set}" = set; then :
7497   withval=$with_krb_srvnam;
7498   case $withval in
7499     yes)
7500       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7501       ;;
7502     no)
7503       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7504       ;;
7505     *)
7506
7507       ;;
7508   esac
7509
7510 else
7511   with_krb_srvnam="postgres"
7512 fi
7513
7514
7515
7516
7517 cat >>confdefs.h <<_ACEOF
7518 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7519 _ACEOF
7520
7521
7522
7523 #
7524 # PAM
7525 #
7526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7527 $as_echo_n "checking whether to build with PAM support... " >&6; }
7528
7529
7530
7531 # Check whether --with-pam was given.
7532 if test "${with_pam+set}" = set; then :
7533   withval=$with_pam;
7534   case $withval in
7535     yes)
7536
7537 $as_echo "#define USE_PAM 1" >>confdefs.h
7538
7539       ;;
7540     no)
7541       :
7542       ;;
7543     *)
7544       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7545       ;;
7546   esac
7547
7548 else
7549   with_pam=no
7550
7551 fi
7552
7553
7554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7555 $as_echo "$with_pam" >&6; }
7556
7557
7558 #
7559 # BSD AUTH
7560 #
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7562 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7563
7564
7565
7566 # Check whether --with-bsd-auth was given.
7567 if test "${with_bsd_auth+set}" = set; then :
7568   withval=$with_bsd_auth;
7569   case $withval in
7570     yes)
7571
7572 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7573
7574       ;;
7575     no)
7576       :
7577       ;;
7578     *)
7579       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7580       ;;
7581   esac
7582
7583 else
7584   with_bsd_auth=no
7585
7586 fi
7587
7588
7589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7590 $as_echo "$with_bsd_auth" >&6; }
7591
7592
7593 #
7594 # LDAP
7595 #
7596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7597 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7598
7599
7600
7601 # Check whether --with-ldap was given.
7602 if test "${with_ldap+set}" = set; then :
7603   withval=$with_ldap;
7604   case $withval in
7605     yes)
7606
7607 $as_echo "#define USE_LDAP 1" >>confdefs.h
7608
7609       ;;
7610     no)
7611       :
7612       ;;
7613     *)
7614       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7615       ;;
7616   esac
7617
7618 else
7619   with_ldap=no
7620
7621 fi
7622
7623
7624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7625 $as_echo "$with_ldap" >&6; }
7626
7627
7628
7629 #
7630 # Bonjour
7631 #
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7633 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7634
7635
7636
7637 # Check whether --with-bonjour was given.
7638 if test "${with_bonjour+set}" = set; then :
7639   withval=$with_bonjour;
7640   case $withval in
7641     yes)
7642
7643 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7644
7645       ;;
7646     no)
7647       :
7648       ;;
7649     *)
7650       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7651       ;;
7652   esac
7653
7654 else
7655   with_bonjour=no
7656
7657 fi
7658
7659
7660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7661 $as_echo "$with_bonjour" >&6; }
7662
7663
7664 #
7665 # OpenSSL
7666 #
7667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7668 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7669
7670
7671
7672 # Check whether --with-openssl was given.
7673 if test "${with_openssl+set}" = set; then :
7674   withval=$with_openssl;
7675   case $withval in
7676     yes)
7677
7678 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7679
7680       ;;
7681     no)
7682       :
7683       ;;
7684     *)
7685       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7686       ;;
7687   esac
7688
7689 else
7690   with_openssl=no
7691
7692 fi
7693
7694
7695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7696 $as_echo "$with_openssl" >&6; }
7697
7698
7699 #
7700 # SELinux
7701 #
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7703 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7704
7705
7706
7707 # Check whether --with-selinux was given.
7708 if test "${with_selinux+set}" = set; then :
7709   withval=$with_selinux;
7710   case $withval in
7711     yes)
7712       :
7713       ;;
7714     no)
7715       :
7716       ;;
7717     *)
7718       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7719       ;;
7720   esac
7721
7722 else
7723   with_selinux=no
7724
7725 fi
7726
7727
7728
7729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7730 $as_echo "$with_selinux" >&6; }
7731
7732 #
7733 # Systemd
7734 #
7735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7736 $as_echo_n "checking whether to build with systemd support... " >&6; }
7737
7738
7739
7740 # Check whether --with-systemd was given.
7741 if test "${with_systemd+set}" = set; then :
7742   withval=$with_systemd;
7743   case $withval in
7744     yes)
7745
7746 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7747
7748       ;;
7749     no)
7750       :
7751       ;;
7752     *)
7753       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7754       ;;
7755   esac
7756
7757 else
7758   with_systemd=no
7759
7760 fi
7761
7762
7763
7764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7765 $as_echo "$with_systemd" >&6; }
7766
7767 #
7768 # Readline
7769 #
7770
7771
7772
7773 # Check whether --with-readline was given.
7774 if test "${with_readline+set}" = set; then :
7775   withval=$with_readline;
7776   case $withval in
7777     yes)
7778       :
7779       ;;
7780     no)
7781       :
7782       ;;
7783     *)
7784       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7785       ;;
7786   esac
7787
7788 else
7789   with_readline=yes
7790
7791 fi
7792
7793
7794 # readline on MinGW has problems with backslashes in psql and other bugs.
7795 # This is particularly a problem with non-US code pages.
7796 # Therefore disable its use until we understand the cause. 2004-07-20
7797 if test "$PORTNAME" = "win32"; then
7798   if test "$with_readline" = yes; then
7799     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
7800 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
7801     with_readline=no
7802   fi
7803 fi
7804
7805
7806 #
7807 # Prefer libedit
7808 #
7809
7810
7811
7812 # Check whether --with-libedit-preferred was given.
7813 if test "${with_libedit_preferred+set}" = set; then :
7814   withval=$with_libedit_preferred;
7815   case $withval in
7816     yes)
7817       :
7818       ;;
7819     no)
7820       :
7821       ;;
7822     *)
7823       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
7824       ;;
7825   esac
7826
7827 else
7828   with_libedit_preferred=no
7829
7830 fi
7831
7832
7833
7834
7835 #
7836 # UUID library
7837 #
7838 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
7839 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
7840 # UUID library.  More than one of these might be present on a given platform,
7841 # so we make the user say which one she wants.
7842 #
7843
7844
7845
7846 # Check whether --with-uuid was given.
7847 if test "${with_uuid+set}" = set; then :
7848   withval=$with_uuid;
7849   case $withval in
7850     yes)
7851       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
7852       ;;
7853     no)
7854       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
7855       ;;
7856     *)
7857
7858       ;;
7859   esac
7860
7861 fi
7862
7863
7864 if test x"$with_uuid" = x"" ; then
7865   with_uuid=no
7866 fi
7867
7868
7869
7870 # Check whether --with-ossp-uuid was given.
7871 if test "${with_ossp_uuid+set}" = set; then :
7872   withval=$with_ossp_uuid;
7873   case $withval in
7874     yes)
7875       :
7876       ;;
7877     no)
7878       :
7879       ;;
7880     *)
7881       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
7882       ;;
7883   esac
7884
7885 else
7886   with_ossp_uuid=no
7887
7888 fi
7889
7890
7891 if test "$with_ossp_uuid" = yes ; then
7892   with_uuid=ossp
7893 fi
7894
7895 if test "$with_uuid" = bsd ; then
7896
7897 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
7898
7899   UUID_EXTRA_OBJS="md5.o sha1.o"
7900 elif test "$with_uuid" = e2fs ; then
7901
7902 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
7903
7904   UUID_EXTRA_OBJS="md5.o sha1.o"
7905 elif test "$with_uuid" = ossp ; then
7906
7907 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
7908
7909   UUID_EXTRA_OBJS=""
7910 elif test "$with_uuid" = no ; then
7911   UUID_EXTRA_OBJS=""
7912 else
7913   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
7914 fi
7915
7916
7917
7918
7919 #
7920 # XML
7921 #
7922
7923
7924
7925 # Check whether --with-libxml was given.
7926 if test "${with_libxml+set}" = set; then :
7927   withval=$with_libxml;
7928   case $withval in
7929     yes)
7930
7931 $as_echo "#define USE_LIBXML 1" >>confdefs.h
7932
7933       ;;
7934     no)
7935       :
7936       ;;
7937     *)
7938       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
7939       ;;
7940   esac
7941
7942 else
7943   with_libxml=no
7944
7945 fi
7946
7947
7948
7949 if test "$with_libxml" = yes ; then
7950   if test -z "$XML2_CONFIG"; then
7951   for ac_prog in xml2-config
7952 do
7953   # Extract the first word of "$ac_prog", so it can be a program name with args.
7954 set dummy $ac_prog; ac_word=$2
7955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7956 $as_echo_n "checking for $ac_word... " >&6; }
7957 if ${ac_cv_path_XML2_CONFIG+:} false; then :
7958   $as_echo_n "(cached) " >&6
7959 else
7960   case $XML2_CONFIG in
7961   [\\/]* | ?:[\\/]*)
7962   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
7963   ;;
7964   *)
7965   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7966 for as_dir in $PATH
7967 do
7968   IFS=$as_save_IFS
7969   test -z "$as_dir" && as_dir=.
7970     for ac_exec_ext in '' $ac_executable_extensions; do
7971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7972     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7974     break 2
7975   fi
7976 done
7977   done
7978 IFS=$as_save_IFS
7979
7980   ;;
7981 esac
7982 fi
7983 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
7984 if test -n "$XML2_CONFIG"; then
7985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
7986 $as_echo "$XML2_CONFIG" >&6; }
7987 else
7988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7989 $as_echo "no" >&6; }
7990 fi
7991
7992
7993   test -n "$XML2_CONFIG" && break
7994 done
7995
7996 else
7997   # Report the value of XML2_CONFIG in configure's output in all cases.
7998   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
7999 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8001 $as_echo "$XML2_CONFIG" >&6; }
8002 fi
8003
8004   if test -n "$XML2_CONFIG"; then
8005     for pgac_option in `$XML2_CONFIG --cflags`; do
8006       case $pgac_option in
8007         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8008       esac
8009     done
8010     for pgac_option in `$XML2_CONFIG --libs`; do
8011       case $pgac_option in
8012         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8013       esac
8014     done
8015   fi
8016 fi
8017
8018
8019
8020 #
8021 # XSLT
8022 #
8023
8024
8025
8026 # Check whether --with-libxslt was given.
8027 if test "${with_libxslt+set}" = set; then :
8028   withval=$with_libxslt;
8029   case $withval in
8030     yes)
8031
8032 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8033
8034       ;;
8035     no)
8036       :
8037       ;;
8038     *)
8039       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8040       ;;
8041   esac
8042
8043 else
8044   with_libxslt=no
8045
8046 fi
8047
8048
8049
8050
8051
8052
8053 #
8054 # tzdata
8055 #
8056
8057
8058
8059 # Check whether --with-system-tzdata was given.
8060 if test "${with_system_tzdata+set}" = set; then :
8061   withval=$with_system_tzdata;
8062   case $withval in
8063     yes)
8064       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8065       ;;
8066     no)
8067       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8068       ;;
8069     *)
8070
8071       ;;
8072   esac
8073
8074 fi
8075
8076
8077
8078
8079 #
8080 # Zlib
8081 #
8082
8083
8084
8085 # Check whether --with-zlib was given.
8086 if test "${with_zlib+set}" = set; then :
8087   withval=$with_zlib;
8088   case $withval in
8089     yes)
8090       :
8091       ;;
8092     no)
8093       :
8094       ;;
8095     *)
8096       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8097       ;;
8098   esac
8099
8100 else
8101   with_zlib=yes
8102
8103 fi
8104
8105
8106
8107
8108 #
8109 # Elf
8110 #
8111
8112 # Assume system is ELF if it predefines __ELF__ as 1,
8113 # otherwise believe host_os based default.
8114 case $host_os in
8115     freebsd1*|freebsd2*) elf=no;;
8116     freebsd3*|freebsd4*) elf=yes;;
8117 esac
8118
8119
8120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8121 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8122 if ${ac_cv_path_GREP+:} false; then :
8123   $as_echo_n "(cached) " >&6
8124 else
8125   if test -z "$GREP"; then
8126   ac_path_GREP_found=false
8127   # Loop through the user's path and test for each of PROGNAME-LIST
8128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8129 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8130 do
8131   IFS=$as_save_IFS
8132   test -z "$as_dir" && as_dir=.
8133     for ac_prog in grep ggrep; do
8134     for ac_exec_ext in '' $ac_executable_extensions; do
8135       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8136       as_fn_executable_p "$ac_path_GREP" || continue
8137 # Check for GNU ac_path_GREP and select it if it is found.
8138   # Check for GNU $ac_path_GREP
8139 case `"$ac_path_GREP" --version 2>&1` in
8140 *GNU*)
8141   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8142 *)
8143   ac_count=0
8144   $as_echo_n 0123456789 >"conftest.in"
8145   while :
8146   do
8147     cat "conftest.in" "conftest.in" >"conftest.tmp"
8148     mv "conftest.tmp" "conftest.in"
8149     cp "conftest.in" "conftest.nl"
8150     $as_echo 'GREP' >> "conftest.nl"
8151     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8152     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8153     as_fn_arith $ac_count + 1 && ac_count=$as_val
8154     if test $ac_count -gt ${ac_path_GREP_max-0}; then
8155       # Best one so far, save it but keep looking for a better one
8156       ac_cv_path_GREP="$ac_path_GREP"
8157       ac_path_GREP_max=$ac_count
8158     fi
8159     # 10*(2^10) chars as input seems more than enough
8160     test $ac_count -gt 10 && break
8161   done
8162   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8163 esac
8164
8165       $ac_path_GREP_found && break 3
8166     done
8167   done
8168   done
8169 IFS=$as_save_IFS
8170   if test -z "$ac_cv_path_GREP"; then
8171     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8172   fi
8173 else
8174   ac_cv_path_GREP=$GREP
8175 fi
8176
8177 fi
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8179 $as_echo "$ac_cv_path_GREP" >&6; }
8180  GREP="$ac_cv_path_GREP"
8181
8182
8183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8184 $as_echo_n "checking for egrep... " >&6; }
8185 if ${ac_cv_path_EGREP+:} false; then :
8186   $as_echo_n "(cached) " >&6
8187 else
8188   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8189    then ac_cv_path_EGREP="$GREP -E"
8190    else
8191      if test -z "$EGREP"; then
8192   ac_path_EGREP_found=false
8193   # Loop through the user's path and test for each of PROGNAME-LIST
8194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8195 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8196 do
8197   IFS=$as_save_IFS
8198   test -z "$as_dir" && as_dir=.
8199     for ac_prog in egrep; do
8200     for ac_exec_ext in '' $ac_executable_extensions; do
8201       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8202       as_fn_executable_p "$ac_path_EGREP" || continue
8203 # Check for GNU ac_path_EGREP and select it if it is found.
8204   # Check for GNU $ac_path_EGREP
8205 case `"$ac_path_EGREP" --version 2>&1` in
8206 *GNU*)
8207   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8208 *)
8209   ac_count=0
8210   $as_echo_n 0123456789 >"conftest.in"
8211   while :
8212   do
8213     cat "conftest.in" "conftest.in" >"conftest.tmp"
8214     mv "conftest.tmp" "conftest.in"
8215     cp "conftest.in" "conftest.nl"
8216     $as_echo 'EGREP' >> "conftest.nl"
8217     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8218     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8219     as_fn_arith $ac_count + 1 && ac_count=$as_val
8220     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8221       # Best one so far, save it but keep looking for a better one
8222       ac_cv_path_EGREP="$ac_path_EGREP"
8223       ac_path_EGREP_max=$ac_count
8224     fi
8225     # 10*(2^10) chars as input seems more than enough
8226     test $ac_count -gt 10 && break
8227   done
8228   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8229 esac
8230
8231       $ac_path_EGREP_found && break 3
8232     done
8233   done
8234   done
8235 IFS=$as_save_IFS
8236   if test -z "$ac_cv_path_EGREP"; then
8237     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8238   fi
8239 else
8240   ac_cv_path_EGREP=$EGREP
8241 fi
8242
8243    fi
8244 fi
8245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8246 $as_echo "$ac_cv_path_EGREP" >&6; }
8247  EGREP="$ac_cv_path_EGREP"
8248
8249
8250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8251 /* end confdefs.h.  */
8252 #if __ELF__
8253   yes
8254 #endif
8255
8256 _ACEOF
8257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8258   $EGREP "yes" >/dev/null 2>&1; then :
8259   ELF_SYS=true
8260 else
8261   if test "X$elf" = "Xyes" ; then
8262   ELF_SYS=true
8263 else
8264   ELF_SYS=
8265 fi
8266 fi
8267 rm -f conftest*
8268
8269
8270
8271 #
8272 # Assignments
8273 #
8274
8275 CPPFLAGS="$CPPFLAGS $INCLUDES"
8276 LDFLAGS="$LDFLAGS $LIBDIRS"
8277
8278
8279
8280
8281
8282 # Check whether --with-gnu-ld was given.
8283 if test "${with_gnu_ld+set}" = set; then :
8284   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8285 else
8286   with_gnu_ld=no
8287 fi
8288
8289 ac_prog=ld
8290 if test "$GCC" = yes; then
8291   # Check if gcc -print-prog-name=ld gives a path.
8292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8293 $as_echo_n "checking for ld used by GCC... " >&6; }
8294   case $host in
8295   *-*-mingw*)
8296     # gcc leaves a trailing carriage return which upsets mingw
8297     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8298   *)
8299     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8300   esac
8301   case "$ac_prog" in
8302     # Accept absolute paths.
8303     [\\/]* | [A-Za-z]:[\\/]*)
8304       re_direlt='/[^/][^/]*/\.\./'
8305       # Canonicalize the path of ld
8306       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8307       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8308         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8309       done
8310       test -z "$LD" && LD="$ac_prog"
8311       ;;
8312   "")
8313     # If it fails, then pretend we aren't using GCC.
8314     ac_prog=ld
8315     ;;
8316   *)
8317     # If it is relative, then search for the first ld in PATH.
8318     with_gnu_ld=unknown
8319     ;;
8320   esac
8321 elif test "$with_gnu_ld" = yes; then
8322   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8323 $as_echo_n "checking for GNU ld... " >&6; }
8324 else
8325   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8326 $as_echo_n "checking for non-GNU ld... " >&6; }
8327 fi
8328 if ${ac_cv_path_LD+:} false; then :
8329   $as_echo_n "(cached) " >&6
8330 else
8331   if test -z "$LD"; then
8332   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8333   for ac_dir in $PATH; do
8334     test -z "$ac_dir" && ac_dir=.
8335     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8336       ac_cv_path_LD="$ac_dir/$ac_prog"
8337       # Check to see if the program is GNU ld.  I'd rather use --version,
8338       # but apparently some GNU ld's only accept -v.
8339       # Break only if it was the GNU/non-GNU ld that we prefer.
8340       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8341         test "$with_gnu_ld" != no && break
8342       else
8343         test "$with_gnu_ld" != yes && break
8344       fi
8345     fi
8346   done
8347   IFS="$ac_save_ifs"
8348 else
8349   ac_cv_path_LD="$LD" # Let the user override the test with a path.
8350 fi
8351 fi
8352
8353 LD="$ac_cv_path_LD"
8354 if test -n "$LD"; then
8355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8356 $as_echo "$LD" >&6; }
8357 else
8358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8359 $as_echo "no" >&6; }
8360 fi
8361 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8363 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8364 if ${ac_cv_prog_gnu_ld+:} false; then :
8365   $as_echo_n "(cached) " >&6
8366 else
8367   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8368 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8369   ac_cv_prog_gnu_ld=yes
8370 else
8371   ac_cv_prog_gnu_ld=no
8372 fi
8373 fi
8374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8375 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8376 with_gnu_ld=$ac_cv_prog_gnu_ld
8377
8378
8379
8380
8381 if test -n "$ac_tool_prefix"; then
8382   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8383 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8385 $as_echo_n "checking for $ac_word... " >&6; }
8386 if ${ac_cv_prog_RANLIB+:} false; then :
8387   $as_echo_n "(cached) " >&6
8388 else
8389   if test -n "$RANLIB"; then
8390   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8391 else
8392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8393 for as_dir in $PATH
8394 do
8395   IFS=$as_save_IFS
8396   test -z "$as_dir" && as_dir=.
8397     for ac_exec_ext in '' $ac_executable_extensions; do
8398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8399     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8401     break 2
8402   fi
8403 done
8404   done
8405 IFS=$as_save_IFS
8406
8407 fi
8408 fi
8409 RANLIB=$ac_cv_prog_RANLIB
8410 if test -n "$RANLIB"; then
8411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8412 $as_echo "$RANLIB" >&6; }
8413 else
8414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8415 $as_echo "no" >&6; }
8416 fi
8417
8418
8419 fi
8420 if test -z "$ac_cv_prog_RANLIB"; then
8421   ac_ct_RANLIB=$RANLIB
8422   # Extract the first word of "ranlib", so it can be a program name with args.
8423 set dummy ranlib; ac_word=$2
8424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8425 $as_echo_n "checking for $ac_word... " >&6; }
8426 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8427   $as_echo_n "(cached) " >&6
8428 else
8429   if test -n "$ac_ct_RANLIB"; then
8430   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8431 else
8432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8433 for as_dir in $PATH
8434 do
8435   IFS=$as_save_IFS
8436   test -z "$as_dir" && as_dir=.
8437     for ac_exec_ext in '' $ac_executable_extensions; do
8438   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8439     ac_cv_prog_ac_ct_RANLIB="ranlib"
8440     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8441     break 2
8442   fi
8443 done
8444   done
8445 IFS=$as_save_IFS
8446
8447 fi
8448 fi
8449 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8450 if test -n "$ac_ct_RANLIB"; then
8451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8452 $as_echo "$ac_ct_RANLIB" >&6; }
8453 else
8454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8455 $as_echo "no" >&6; }
8456 fi
8457
8458   if test "x$ac_ct_RANLIB" = x; then
8459     RANLIB=":"
8460   else
8461     case $cross_compiling:$ac_tool_warned in
8462 yes:)
8463 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8464 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8465 ac_tool_warned=yes ;;
8466 esac
8467     RANLIB=$ac_ct_RANLIB
8468   fi
8469 else
8470   RANLIB="$ac_cv_prog_RANLIB"
8471 fi
8472
8473
8474   if test -n "$ac_tool_prefix"; then
8475   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8476 set dummy ${ac_tool_prefix}strip; ac_word=$2
8477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8478 $as_echo_n "checking for $ac_word... " >&6; }
8479 if ${ac_cv_prog_STRIP+:} false; then :
8480   $as_echo_n "(cached) " >&6
8481 else
8482   if test -n "$STRIP"; then
8483   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8484 else
8485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8486 for as_dir in $PATH
8487 do
8488   IFS=$as_save_IFS
8489   test -z "$as_dir" && as_dir=.
8490     for ac_exec_ext in '' $ac_executable_extensions; do
8491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8492     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8494     break 2
8495   fi
8496 done
8497   done
8498 IFS=$as_save_IFS
8499
8500 fi
8501 fi
8502 STRIP=$ac_cv_prog_STRIP
8503 if test -n "$STRIP"; then
8504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8505 $as_echo "$STRIP" >&6; }
8506 else
8507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8508 $as_echo "no" >&6; }
8509 fi
8510
8511
8512 fi
8513 if test -z "$ac_cv_prog_STRIP"; then
8514   ac_ct_STRIP=$STRIP
8515   # Extract the first word of "strip", so it can be a program name with args.
8516 set dummy strip; ac_word=$2
8517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8518 $as_echo_n "checking for $ac_word... " >&6; }
8519 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8520   $as_echo_n "(cached) " >&6
8521 else
8522   if test -n "$ac_ct_STRIP"; then
8523   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8524 else
8525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8526 for as_dir in $PATH
8527 do
8528   IFS=$as_save_IFS
8529   test -z "$as_dir" && as_dir=.
8530     for ac_exec_ext in '' $ac_executable_extensions; do
8531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8532     ac_cv_prog_ac_ct_STRIP="strip"
8533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8534     break 2
8535   fi
8536 done
8537   done
8538 IFS=$as_save_IFS
8539
8540 fi
8541 fi
8542 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8543 if test -n "$ac_ct_STRIP"; then
8544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8545 $as_echo "$ac_ct_STRIP" >&6; }
8546 else
8547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8548 $as_echo "no" >&6; }
8549 fi
8550
8551   if test "x$ac_ct_STRIP" = x; then
8552     STRIP=":"
8553   else
8554     case $cross_compiling:$ac_tool_warned in
8555 yes:)
8556 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8557 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8558 ac_tool_warned=yes ;;
8559 esac
8560     STRIP=$ac_ct_STRIP
8561   fi
8562 else
8563   STRIP="$ac_cv_prog_STRIP"
8564 fi
8565
8566
8567   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8568 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8569   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8570     STRIP_STATIC_LIB="$STRIP -x"
8571     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8572     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8573 $as_echo "yes" >&6; }
8574   else
8575     case $host_os in
8576       darwin*)
8577         STRIP="$STRIP -x"
8578         STRIP_STATIC_LIB=$STRIP
8579         STRIP_SHARED_LIB=$STRIP
8580         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8581 $as_echo "yes" >&6; }
8582         ;;
8583       *)
8584         STRIP_STATIC_LIB=:
8585         STRIP_SHARED_LIB=:
8586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8587 $as_echo "no" >&6; }
8588         ;;
8589     esac
8590   fi
8591
8592
8593
8594 if test -n "$ac_tool_prefix"; then
8595   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8596 set dummy ${ac_tool_prefix}ar; ac_word=$2
8597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8598 $as_echo_n "checking for $ac_word... " >&6; }
8599 if ${ac_cv_prog_AR+:} false; then :
8600   $as_echo_n "(cached) " >&6
8601 else
8602   if test -n "$AR"; then
8603   ac_cv_prog_AR="$AR" # Let the user override the test.
8604 else
8605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8606 for as_dir in $PATH
8607 do
8608   IFS=$as_save_IFS
8609   test -z "$as_dir" && as_dir=.
8610     for ac_exec_ext in '' $ac_executable_extensions; do
8611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8612     ac_cv_prog_AR="${ac_tool_prefix}ar"
8613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8614     break 2
8615   fi
8616 done
8617   done
8618 IFS=$as_save_IFS
8619
8620 fi
8621 fi
8622 AR=$ac_cv_prog_AR
8623 if test -n "$AR"; then
8624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8625 $as_echo "$AR" >&6; }
8626 else
8627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8628 $as_echo "no" >&6; }
8629 fi
8630
8631
8632 fi
8633 if test -z "$ac_cv_prog_AR"; then
8634   ac_ct_AR=$AR
8635   # Extract the first word of "ar", so it can be a program name with args.
8636 set dummy ar; ac_word=$2
8637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8638 $as_echo_n "checking for $ac_word... " >&6; }
8639 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8640   $as_echo_n "(cached) " >&6
8641 else
8642   if test -n "$ac_ct_AR"; then
8643   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8644 else
8645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8646 for as_dir in $PATH
8647 do
8648   IFS=$as_save_IFS
8649   test -z "$as_dir" && as_dir=.
8650     for ac_exec_ext in '' $ac_executable_extensions; do
8651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8652     ac_cv_prog_ac_ct_AR="ar"
8653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8654     break 2
8655   fi
8656 done
8657   done
8658 IFS=$as_save_IFS
8659
8660 fi
8661 fi
8662 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8663 if test -n "$ac_ct_AR"; then
8664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8665 $as_echo "$ac_ct_AR" >&6; }
8666 else
8667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8668 $as_echo "no" >&6; }
8669 fi
8670
8671   if test "x$ac_ct_AR" = x; then
8672     AR="ar"
8673   else
8674     case $cross_compiling:$ac_tool_warned in
8675 yes:)
8676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8677 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8678 ac_tool_warned=yes ;;
8679 esac
8680     AR=$ac_ct_AR
8681   fi
8682 else
8683   AR="$ac_cv_prog_AR"
8684 fi
8685
8686 if test "$PORTNAME" = "win32"; then
8687   if test -n "$ac_tool_prefix"; then
8688   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8689 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8691 $as_echo_n "checking for $ac_word... " >&6; }
8692 if ${ac_cv_prog_DLLTOOL+:} false; then :
8693   $as_echo_n "(cached) " >&6
8694 else
8695   if test -n "$DLLTOOL"; then
8696   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8697 else
8698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8699 for as_dir in $PATH
8700 do
8701   IFS=$as_save_IFS
8702   test -z "$as_dir" && as_dir=.
8703     for ac_exec_ext in '' $ac_executable_extensions; do
8704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8705     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8707     break 2
8708   fi
8709 done
8710   done
8711 IFS=$as_save_IFS
8712
8713 fi
8714 fi
8715 DLLTOOL=$ac_cv_prog_DLLTOOL
8716 if test -n "$DLLTOOL"; then
8717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8718 $as_echo "$DLLTOOL" >&6; }
8719 else
8720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8721 $as_echo "no" >&6; }
8722 fi
8723
8724
8725 fi
8726 if test -z "$ac_cv_prog_DLLTOOL"; then
8727   ac_ct_DLLTOOL=$DLLTOOL
8728   # Extract the first word of "dlltool", so it can be a program name with args.
8729 set dummy dlltool; ac_word=$2
8730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8731 $as_echo_n "checking for $ac_word... " >&6; }
8732 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8733   $as_echo_n "(cached) " >&6
8734 else
8735   if test -n "$ac_ct_DLLTOOL"; then
8736   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8737 else
8738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8739 for as_dir in $PATH
8740 do
8741   IFS=$as_save_IFS
8742   test -z "$as_dir" && as_dir=.
8743     for ac_exec_ext in '' $ac_executable_extensions; do
8744   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8745     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8747     break 2
8748   fi
8749 done
8750   done
8751 IFS=$as_save_IFS
8752
8753 fi
8754 fi
8755 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8756 if test -n "$ac_ct_DLLTOOL"; then
8757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8758 $as_echo "$ac_ct_DLLTOOL" >&6; }
8759 else
8760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8761 $as_echo "no" >&6; }
8762 fi
8763
8764   if test "x$ac_ct_DLLTOOL" = x; then
8765     DLLTOOL="dlltool"
8766   else
8767     case $cross_compiling:$ac_tool_warned in
8768 yes:)
8769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8770 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8771 ac_tool_warned=yes ;;
8772 esac
8773     DLLTOOL=$ac_ct_DLLTOOL
8774   fi
8775 else
8776   DLLTOOL="$ac_cv_prog_DLLTOOL"
8777 fi
8778
8779   if test -n "$ac_tool_prefix"; then
8780   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8781 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8783 $as_echo_n "checking for $ac_word... " >&6; }
8784 if ${ac_cv_prog_DLLWRAP+:} false; then :
8785   $as_echo_n "(cached) " >&6
8786 else
8787   if test -n "$DLLWRAP"; then
8788   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
8789 else
8790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8791 for as_dir in $PATH
8792 do
8793   IFS=$as_save_IFS
8794   test -z "$as_dir" && as_dir=.
8795     for ac_exec_ext in '' $ac_executable_extensions; do
8796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8797     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
8798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8799     break 2
8800   fi
8801 done
8802   done
8803 IFS=$as_save_IFS
8804
8805 fi
8806 fi
8807 DLLWRAP=$ac_cv_prog_DLLWRAP
8808 if test -n "$DLLWRAP"; then
8809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
8810 $as_echo "$DLLWRAP" >&6; }
8811 else
8812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8813 $as_echo "no" >&6; }
8814 fi
8815
8816
8817 fi
8818 if test -z "$ac_cv_prog_DLLWRAP"; then
8819   ac_ct_DLLWRAP=$DLLWRAP
8820   # Extract the first word of "dllwrap", so it can be a program name with args.
8821 set dummy dllwrap; ac_word=$2
8822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8823 $as_echo_n "checking for $ac_word... " >&6; }
8824 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
8825   $as_echo_n "(cached) " >&6
8826 else
8827   if test -n "$ac_ct_DLLWRAP"; then
8828   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
8829 else
8830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8831 for as_dir in $PATH
8832 do
8833   IFS=$as_save_IFS
8834   test -z "$as_dir" && as_dir=.
8835     for ac_exec_ext in '' $ac_executable_extensions; do
8836   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8837     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
8838     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8839     break 2
8840   fi
8841 done
8842   done
8843 IFS=$as_save_IFS
8844
8845 fi
8846 fi
8847 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
8848 if test -n "$ac_ct_DLLWRAP"; then
8849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
8850 $as_echo "$ac_ct_DLLWRAP" >&6; }
8851 else
8852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8853 $as_echo "no" >&6; }
8854 fi
8855
8856   if test "x$ac_ct_DLLWRAP" = x; then
8857     DLLWRAP="dllwrap"
8858   else
8859     case $cross_compiling:$ac_tool_warned in
8860 yes:)
8861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8862 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8863 ac_tool_warned=yes ;;
8864 esac
8865     DLLWRAP=$ac_ct_DLLWRAP
8866   fi
8867 else
8868   DLLWRAP="$ac_cv_prog_DLLWRAP"
8869 fi
8870
8871   if test -n "$ac_tool_prefix"; then
8872   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8873 set dummy ${ac_tool_prefix}windres; ac_word=$2
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8875 $as_echo_n "checking for $ac_word... " >&6; }
8876 if ${ac_cv_prog_WINDRES+:} false; then :
8877   $as_echo_n "(cached) " >&6
8878 else
8879   if test -n "$WINDRES"; then
8880   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8881 else
8882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8883 for as_dir in $PATH
8884 do
8885   IFS=$as_save_IFS
8886   test -z "$as_dir" && as_dir=.
8887     for ac_exec_ext in '' $ac_executable_extensions; do
8888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8889     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
8890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8891     break 2
8892   fi
8893 done
8894   done
8895 IFS=$as_save_IFS
8896
8897 fi
8898 fi
8899 WINDRES=$ac_cv_prog_WINDRES
8900 if test -n "$WINDRES"; then
8901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8902 $as_echo "$WINDRES" >&6; }
8903 else
8904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8905 $as_echo "no" >&6; }
8906 fi
8907
8908
8909 fi
8910 if test -z "$ac_cv_prog_WINDRES"; then
8911   ac_ct_WINDRES=$WINDRES
8912   # Extract the first word of "windres", so it can be a program name with args.
8913 set dummy windres; ac_word=$2
8914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8915 $as_echo_n "checking for $ac_word... " >&6; }
8916 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
8917   $as_echo_n "(cached) " >&6
8918 else
8919   if test -n "$ac_ct_WINDRES"; then
8920   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
8921 else
8922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8923 for as_dir in $PATH
8924 do
8925   IFS=$as_save_IFS
8926   test -z "$as_dir" && as_dir=.
8927     for ac_exec_ext in '' $ac_executable_extensions; do
8928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8929     ac_cv_prog_ac_ct_WINDRES="windres"
8930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8931     break 2
8932   fi
8933 done
8934   done
8935 IFS=$as_save_IFS
8936
8937 fi
8938 fi
8939 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
8940 if test -n "$ac_ct_WINDRES"; then
8941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
8942 $as_echo "$ac_ct_WINDRES" >&6; }
8943 else
8944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8945 $as_echo "no" >&6; }
8946 fi
8947
8948   if test "x$ac_ct_WINDRES" = x; then
8949     WINDRES="windres"
8950   else
8951     case $cross_compiling:$ac_tool_warned in
8952 yes:)
8953 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8954 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8955 ac_tool_warned=yes ;;
8956 esac
8957     WINDRES=$ac_ct_WINDRES
8958   fi
8959 else
8960   WINDRES="$ac_cv_prog_WINDRES"
8961 fi
8962
8963 fi
8964
8965 # Find a good install program.  We prefer a C program (faster),
8966 # so one script is as good as another.  But avoid the broken or
8967 # incompatible versions:
8968 # SysV /etc/install, /usr/sbin/install
8969 # SunOS /usr/etc/install
8970 # IRIX /sbin/install
8971 # AIX /bin/install
8972 # AmigaOS /C/install, which installs bootblocks on floppy discs
8973 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8974 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
8975 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8976 # OS/2's system install, which has a completely different semantic
8977 # ./install, which can be erroneously created by make from ./install.sh.
8978 # Reject install programs that cannot install multiple files.
8979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
8980 $as_echo_n "checking for a BSD-compatible install... " >&6; }
8981 if test -z "$INSTALL"; then
8982 if ${ac_cv_path_install+:} false; then :
8983   $as_echo_n "(cached) " >&6
8984 else
8985   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8986 for as_dir in $PATH
8987 do
8988   IFS=$as_save_IFS
8989   test -z "$as_dir" && as_dir=.
8990     # Account for people who put trailing slashes in PATH elements.
8991 case $as_dir/ in #((
8992   ./ | .// | /[cC]/* | \
8993   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8994   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
8995   /usr/ucb/* ) ;;
8996   *)
8997     # OSF1 and SCO ODT 3.0 have their own names for install.
8998     # Don't use installbsd from OSF since it installs stuff as root
8999     # by default.
9000     for ac_prog in ginstall scoinst install; do
9001       for ac_exec_ext in '' $ac_executable_extensions; do
9002         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9003           if test $ac_prog = install &&
9004             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9005             # AIX install.  It has an incompatible calling convention.
9006             :
9007           elif test $ac_prog = install &&
9008             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9009             # program-specific install script used by HP pwplus--don't use.
9010             :
9011           else
9012             rm -rf conftest.one conftest.two conftest.dir
9013             echo one > conftest.one
9014             echo two > conftest.two
9015             mkdir conftest.dir
9016             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9017               test -s conftest.one && test -s conftest.two &&
9018               test -s conftest.dir/conftest.one &&
9019               test -s conftest.dir/conftest.two
9020             then
9021               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9022               break 3
9023             fi
9024           fi
9025         fi
9026       done
9027     done
9028     ;;
9029 esac
9030
9031   done
9032 IFS=$as_save_IFS
9033
9034 rm -rf conftest.one conftest.two conftest.dir
9035
9036 fi
9037   if test "${ac_cv_path_install+set}" = set; then
9038     INSTALL=$ac_cv_path_install
9039   else
9040     # As a last resort, use the slow shell script.  Don't cache a
9041     # value for INSTALL within a source directory, because that will
9042     # break other packages using the cache if that directory is
9043     # removed, or if the value is a relative name.
9044     INSTALL=$ac_install_sh
9045   fi
9046 fi
9047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9048 $as_echo "$INSTALL" >&6; }
9049
9050 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9051 # It thinks the first close brace ends the variable substitution.
9052 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9053
9054 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9055
9056 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9057
9058 # When Autoconf chooses install-sh as install program it tries to generate
9059 # a relative path to it in each makefile where it substitutes it. This clashes
9060 # with our Makefile.global concept. This workaround helps.
9061 case $INSTALL in
9062   *install-sh*) install_bin='';;
9063   *) install_bin=$INSTALL;;
9064 esac
9065
9066
9067 if test -z "$TAR"; then
9068   for ac_prog in tar
9069 do
9070   # Extract the first word of "$ac_prog", so it can be a program name with args.
9071 set dummy $ac_prog; ac_word=$2
9072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9073 $as_echo_n "checking for $ac_word... " >&6; }
9074 if ${ac_cv_path_TAR+:} false; then :
9075   $as_echo_n "(cached) " >&6
9076 else
9077   case $TAR in
9078   [\\/]* | ?:[\\/]*)
9079   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9080   ;;
9081   *)
9082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9083 for as_dir in $PATH
9084 do
9085   IFS=$as_save_IFS
9086   test -z "$as_dir" && as_dir=.
9087     for ac_exec_ext in '' $ac_executable_extensions; do
9088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9089     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9091     break 2
9092   fi
9093 done
9094   done
9095 IFS=$as_save_IFS
9096
9097   ;;
9098 esac
9099 fi
9100 TAR=$ac_cv_path_TAR
9101 if test -n "$TAR"; then
9102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9103 $as_echo "$TAR" >&6; }
9104 else
9105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9106 $as_echo "no" >&6; }
9107 fi
9108
9109
9110   test -n "$TAR" && break
9111 done
9112
9113 else
9114   # Report the value of TAR in configure's output in all cases.
9115   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9116 $as_echo_n "checking for TAR... " >&6; }
9117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9118 $as_echo "$TAR" >&6; }
9119 fi
9120
9121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9122 $as_echo_n "checking whether ln -s works... " >&6; }
9123 LN_S=$as_ln_s
9124 if test "$LN_S" = "ln -s"; then
9125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9126 $as_echo "yes" >&6; }
9127 else
9128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9129 $as_echo "no, using $LN_S" >&6; }
9130 fi
9131
9132 for ac_prog in gawk mawk nawk awk
9133 do
9134   # Extract the first word of "$ac_prog", so it can be a program name with args.
9135 set dummy $ac_prog; ac_word=$2
9136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9137 $as_echo_n "checking for $ac_word... " >&6; }
9138 if ${ac_cv_prog_AWK+:} false; then :
9139   $as_echo_n "(cached) " >&6
9140 else
9141   if test -n "$AWK"; then
9142   ac_cv_prog_AWK="$AWK" # Let the user override the test.
9143 else
9144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9145 for as_dir in $PATH
9146 do
9147   IFS=$as_save_IFS
9148   test -z "$as_dir" && as_dir=.
9149     for ac_exec_ext in '' $ac_executable_extensions; do
9150   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9151     ac_cv_prog_AWK="$ac_prog"
9152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9153     break 2
9154   fi
9155 done
9156   done
9157 IFS=$as_save_IFS
9158
9159 fi
9160 fi
9161 AWK=$ac_cv_prog_AWK
9162 if test -n "$AWK"; then
9163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9164 $as_echo "$AWK" >&6; }
9165 else
9166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9167 $as_echo "no" >&6; }
9168 fi
9169
9170
9171   test -n "$AWK" && break
9172 done
9173
9174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9175 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9176 if test -z "$MKDIR_P"; then
9177   if ${ac_cv_path_mkdir+:} false; then :
9178   $as_echo_n "(cached) " >&6
9179 else
9180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9181 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9182 do
9183   IFS=$as_save_IFS
9184   test -z "$as_dir" && as_dir=.
9185     for ac_prog in mkdir gmkdir; do
9186          for ac_exec_ext in '' $ac_executable_extensions; do
9187            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9188            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9189              'mkdir (GNU coreutils) '* | \
9190              'mkdir (coreutils) '* | \
9191              'mkdir (fileutils) '4.1*)
9192                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9193                break 3;;
9194            esac
9195          done
9196        done
9197   done
9198 IFS=$as_save_IFS
9199
9200 fi
9201
9202   test -d ./--version && rmdir ./--version
9203   if test "${ac_cv_path_mkdir+set}" = set; then
9204     MKDIR_P="$ac_cv_path_mkdir -p"
9205   else
9206     # As a last resort, use the slow shell script.  Don't cache a
9207     # value for MKDIR_P within a source directory, because that will
9208     # break other packages using the cache if that directory is
9209     # removed, or if the value is a relative name.
9210     MKDIR_P="$ac_install_sh -d"
9211   fi
9212 fi
9213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9214 $as_echo "$MKDIR_P" >&6; }
9215
9216 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9217 # a relative path to it in each makefile where it substitutes it. This clashes
9218 # with our Makefile.global concept. This workaround helps.
9219 case $MKDIR_P in
9220   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9221 esac
9222
9223 if test -z "$BISON"; then
9224   for ac_prog in bison
9225 do
9226   # Extract the first word of "$ac_prog", so it can be a program name with args.
9227 set dummy $ac_prog; ac_word=$2
9228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9229 $as_echo_n "checking for $ac_word... " >&6; }
9230 if ${ac_cv_path_BISON+:} false; then :
9231   $as_echo_n "(cached) " >&6
9232 else
9233   case $BISON in
9234   [\\/]* | ?:[\\/]*)
9235   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9236   ;;
9237   *)
9238   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9239 for as_dir in $PATH
9240 do
9241   IFS=$as_save_IFS
9242   test -z "$as_dir" && as_dir=.
9243     for ac_exec_ext in '' $ac_executable_extensions; do
9244   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9245     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9247     break 2
9248   fi
9249 done
9250   done
9251 IFS=$as_save_IFS
9252
9253   ;;
9254 esac
9255 fi
9256 BISON=$ac_cv_path_BISON
9257 if test -n "$BISON"; then
9258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9259 $as_echo "$BISON" >&6; }
9260 else
9261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9262 $as_echo "no" >&6; }
9263 fi
9264
9265
9266   test -n "$BISON" && break
9267 done
9268
9269 else
9270   # Report the value of BISON in configure's output in all cases.
9271   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9272 $as_echo_n "checking for BISON... " >&6; }
9273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9274 $as_echo "$BISON" >&6; }
9275 fi
9276
9277
9278 if test "$BISON"; then
9279   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9280   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9281 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9282   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9283   then
9284     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9285 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9286 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9287 $as_echo "$as_me: WARNING:
9288 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9289 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9290     BISON=""
9291   fi
9292   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9293   # of the now preferred %name-prefix "base_yy", but the latter
9294   # doesn't work with Bison 2.3 or less.  So for now we silence the
9295   # deprecation warnings.
9296   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9297   then
9298     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9299   fi
9300 fi
9301
9302 if test -z "$BISON"; then
9303   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9304 *** Without Bison you will not be able to build PostgreSQL from Git nor
9305 *** change any of the parser definition files.  You can obtain Bison from
9306 *** a GNU mirror site.  (If you are using the official distribution of
9307 *** PostgreSQL then you do not need to worry about this, because the Bison
9308 *** output is pre-generated.)" >&5
9309 $as_echo "$as_me: WARNING:
9310 *** Without Bison you will not be able to build PostgreSQL from Git nor
9311 *** change any of the parser definition files.  You can obtain Bison from
9312 *** a GNU mirror site.  (If you are using the official distribution of
9313 *** PostgreSQL then you do not need to worry about this, because the Bison
9314 *** output is pre-generated.)" >&2;}
9315 fi
9316 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9317
9318
9319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9320 $as_echo_n "checking for flex... " >&6; }
9321 if ${pgac_cv_path_flex+:} false; then :
9322   $as_echo_n "(cached) " >&6
9323 else
9324   # Let the user override the test
9325 if test -n "$FLEX"; then
9326   pgac_cv_path_flex=$FLEX
9327 else
9328   pgac_save_IFS=$IFS
9329   IFS=$PATH_SEPARATOR
9330   for pgac_dir in $PATH; do
9331     IFS=$pgac_save_IFS
9332     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9333       pgac_dir=`pwd`
9334     fi
9335     for pgac_prog in flex lex; do
9336       pgac_candidate="$pgac_dir/$pgac_prog"
9337       if test -f "$pgac_candidate" \
9338         && $pgac_candidate --version </dev/null >/dev/null 2>&1
9339       then
9340         echo '%%'  > conftest.l
9341         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9342           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9343           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;}'
9344           then
9345             pgac_cv_path_flex=$pgac_candidate
9346             break 2
9347           else
9348             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9349 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9350 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9351 $as_echo "$as_me: WARNING:
9352 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9353 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9354           fi
9355         fi
9356       fi
9357     done
9358   done
9359   rm -f conftest.l lex.yy.c
9360   : ${pgac_cv_path_flex=no}
9361 fi
9362
9363 fi
9364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9365 $as_echo "$pgac_cv_path_flex" >&6; }
9366 if test x"$pgac_cv_path_flex" = x"no"; then
9367   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9368 *** Without Flex you will not be able to build PostgreSQL from Git nor
9369 *** change any of the scanner definition files.  You can obtain Flex from
9370 *** a GNU mirror site.  (If you are using the official distribution of
9371 *** PostgreSQL then you do not need to worry about this because the Flex
9372 *** output is pre-generated.)" >&5
9373 $as_echo "$as_me: WARNING:
9374 *** Without Flex you will not be able to build PostgreSQL from Git nor
9375 *** change any of the scanner definition files.  You can obtain Flex from
9376 *** a GNU mirror site.  (If you are using the official distribution of
9377 *** PostgreSQL then you do not need to worry about this because the Flex
9378 *** output is pre-generated.)" >&2;}
9379
9380   FLEX=
9381 else
9382   FLEX=$pgac_cv_path_flex
9383   pgac_flex_version=`$FLEX --version 2>/dev/null`
9384   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9385 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9386 fi
9387
9388
9389
9390
9391
9392 if test -z "$PERL"; then
9393   for ac_prog in perl
9394 do
9395   # Extract the first word of "$ac_prog", so it can be a program name with args.
9396 set dummy $ac_prog; ac_word=$2
9397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9398 $as_echo_n "checking for $ac_word... " >&6; }
9399 if ${ac_cv_path_PERL+:} false; then :
9400   $as_echo_n "(cached) " >&6
9401 else
9402   case $PERL in
9403   [\\/]* | ?:[\\/]*)
9404   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9405   ;;
9406   *)
9407   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9408 for as_dir in $PATH
9409 do
9410   IFS=$as_save_IFS
9411   test -z "$as_dir" && as_dir=.
9412     for ac_exec_ext in '' $ac_executable_extensions; do
9413   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9414     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9416     break 2
9417   fi
9418 done
9419   done
9420 IFS=$as_save_IFS
9421
9422   ;;
9423 esac
9424 fi
9425 PERL=$ac_cv_path_PERL
9426 if test -n "$PERL"; then
9427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9428 $as_echo "$PERL" >&6; }
9429 else
9430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9431 $as_echo "no" >&6; }
9432 fi
9433
9434
9435   test -n "$PERL" && break
9436 done
9437
9438 else
9439   # Report the value of PERL in configure's output in all cases.
9440   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9441 $as_echo_n "checking for PERL... " >&6; }
9442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9443 $as_echo "$PERL" >&6; }
9444 fi
9445
9446
9447 if test "$PERL"; then
9448   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'`
9449   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9450 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9451   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9452     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9453   then
9454     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9455 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9456 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9457 $as_echo "$as_me: WARNING:
9458 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9459 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9460     PERL=""
9461   fi
9462 fi
9463
9464 if test -z "$PERL"; then
9465   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9466 *** Without Perl you will not be able to build PostgreSQL from Git.
9467 *** You can obtain Perl from any CPAN mirror site.
9468 *** (If you are using the official distribution of PostgreSQL then you do not
9469 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9470 $as_echo "$as_me: WARNING:
9471 *** Without Perl you will not be able to build PostgreSQL from Git.
9472 *** You can obtain Perl from any CPAN mirror site.
9473 *** (If you are using the official distribution of PostgreSQL then you do not
9474 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9475 fi
9476
9477 if test "$with_perl" = yes; then
9478   if test -z "$PERL"; then
9479     as_fn_error $? "Perl not found" "$LINENO" 5
9480   fi
9481
9482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9483 $as_echo_n "checking for Perl archlibexp... " >&6; }
9484 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9485 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9487 $as_echo "$perl_archlibexp" >&6; }
9488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9489 $as_echo_n "checking for Perl privlibexp... " >&6; }
9490 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9491 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9493 $as_echo "$perl_privlibexp" >&6; }
9494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9495 $as_echo_n "checking for Perl useshrplib... " >&6; }
9496 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9497 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9499 $as_echo "$perl_useshrplib" >&6; }
9500   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9501     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9502 You might have to rebuild your Perl installation.  Refer to the
9503 documentation for details.  Use --without-perl to disable building
9504 PL/Perl." "$LINENO" 5
9505   fi
9506
9507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9508 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9509 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9511 $as_echo "$perl_ccflags" >&6; }
9512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9513 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9514 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9516 $as_echo "$perl_embed_ccflags" >&6; }
9517
9518
9519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9520 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9521 if test "$PORTNAME" = "win32" ; then
9522         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9523         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9524                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9525         else
9526                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9527                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9528                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9529                 fi
9530         fi
9531 else
9532         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9533         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9534         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9535 fi
9536 if test -z "$perl_embed_ldflags" ; then
9537         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538 $as_echo "no" >&6; }
9539         as_fn_error $? "could not determine flags for linking embedded Perl.
9540 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9541 installed." "$LINENO" 5
9542 else
9543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9544 $as_echo "$perl_embed_ldflags" >&6; }
9545 fi
9546
9547 fi
9548
9549 if test "$with_python" = yes; then
9550   if test -z "$PYTHON"; then
9551   for ac_prog in python
9552 do
9553   # Extract the first word of "$ac_prog", so it can be a program name with args.
9554 set dummy $ac_prog; ac_word=$2
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9556 $as_echo_n "checking for $ac_word... " >&6; }
9557 if ${ac_cv_path_PYTHON+:} false; then :
9558   $as_echo_n "(cached) " >&6
9559 else
9560   case $PYTHON in
9561   [\\/]* | ?:[\\/]*)
9562   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9563   ;;
9564   *)
9565   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9566 for as_dir in $PATH
9567 do
9568   IFS=$as_save_IFS
9569   test -z "$as_dir" && as_dir=.
9570     for ac_exec_ext in '' $ac_executable_extensions; do
9571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9572     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9574     break 2
9575   fi
9576 done
9577   done
9578 IFS=$as_save_IFS
9579
9580   ;;
9581 esac
9582 fi
9583 PYTHON=$ac_cv_path_PYTHON
9584 if test -n "$PYTHON"; then
9585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9586 $as_echo "$PYTHON" >&6; }
9587 else
9588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9589 $as_echo "no" >&6; }
9590 fi
9591
9592
9593   test -n "$PYTHON" && break
9594 done
9595
9596 else
9597   # Report the value of PYTHON in configure's output in all cases.
9598   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9599 $as_echo_n "checking for PYTHON... " >&6; }
9600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9601 $as_echo "$PYTHON" >&6; }
9602 fi
9603
9604 if test x"$PYTHON" = x""; then
9605   as_fn_error $? "Python not found" "$LINENO" 5
9606 fi
9607
9608
9609 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9610 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9611 $as_echo "$as_me: using python $python_fullversion" >&6;}
9612 # python_fullversion is typically n.n.n plus some trailing junk
9613 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9614 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9615 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9616 # Reject unsupported Python versions as soon as practical.
9617 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9618   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9619 fi
9620
9621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9622 $as_echo_n "checking for Python distutils module... " >&6; }
9623 if "${PYTHON}" -c 'import distutils' 2>&5
9624 then
9625     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9626 $as_echo "yes" >&6; }
9627 else
9628     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629 $as_echo "no" >&6; }
9630     as_fn_error $? "distutils module not found" "$LINENO" 5
9631 fi
9632
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9634 $as_echo_n "checking Python configuration directory... " >&6; }
9635 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9637 $as_echo "$python_configdir" >&6; }
9638
9639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9640 $as_echo_n "checking Python include directories... " >&6; }
9641 python_includespec=`${PYTHON} -c "
9642 import distutils.sysconfig
9643 a = '-I' + distutils.sysconfig.get_python_inc(False)
9644 b = '-I' + distutils.sysconfig.get_python_inc(True)
9645 if a == b:
9646     print(a)
9647 else:
9648     print(a + ' ' + b)"`
9649 if test "$PORTNAME" = win32 ; then
9650     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9651 fi
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9653 $as_echo "$python_includespec" >&6; }
9654
9655
9656
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9658 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9659
9660 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9661 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9662
9663 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9664 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9665 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9666 then
9667         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9668         found_shlib=1
9669 else
9670         # Otherwise, guess the base name of the shlib.
9671         # LDVERSION was added in Python 3.2, before that use VERSION,
9672         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9673         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9674         if test x"${python_ldversion}" != x""; then
9675                 ldlibrary="python${python_ldversion}"
9676         else
9677                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9678                 if test x"${python_version_var}" != x""; then
9679                         ldlibrary="python${python_version_var}"
9680                 else
9681                         ldlibrary="python${python_version}"
9682                 fi
9683         fi
9684         # Search for a likely-looking file.
9685         found_shlib=0
9686         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9687         do
9688                 # We don't know the platform DLSUFFIX here, so check 'em all.
9689                 for e in .so .dll .dylib .sl; do
9690                         if test -e "$d/lib${ldlibrary}$e"; then
9691                                 python_libdir="$d"
9692                                 found_shlib=1
9693                                 break 2
9694                         fi
9695                 done
9696         done
9697         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9698         # (".so.n.n") as well. However, check this only after failing to find
9699         # ".so" anywhere, because yet other platforms (Debian) put the .so
9700         # symlink in a different directory from the underlying versioned shlib.
9701         if test "$found_shlib" != 1; then
9702                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9703                 do
9704                         for f in "$d/lib${ldlibrary}.so."* ; do
9705                                 if test -e "$f"; then
9706                                         python_libdir="$d"
9707                                         found_shlib=1
9708                                         break 2
9709                                 fi
9710                         done
9711                 done
9712         fi
9713         # As usual, Windows has its own ideas.  Possible default library
9714         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9715         # and the "lib" prefix might not be there.
9716         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9717                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9718                 do
9719                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9720                                 if test -e "$f"; then
9721                                         python_libdir="$d"
9722                                         found_shlib=1
9723                                         break 2
9724                                 fi
9725                         done
9726                 done
9727         fi
9728 fi
9729 if test "$found_shlib" != 1; then
9730         as_fn_error $? "could not find shared library for Python
9731 You might have to rebuild your Python installation.  Refer to the
9732 documentation for details.  Use --without-python to disable building
9733 PL/Python." "$LINENO" 5
9734 fi
9735 python_libspec="-L${python_libdir} -l${ldlibrary}"
9736
9737 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9738
9739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9740 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9741
9742
9743
9744 fi
9745
9746 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9747   if test -z "$ZIC"; then
9748   for ac_prog in zic
9749 do
9750   # Extract the first word of "$ac_prog", so it can be a program name with args.
9751 set dummy $ac_prog; ac_word=$2
9752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9753 $as_echo_n "checking for $ac_word... " >&6; }
9754 if ${ac_cv_path_ZIC+:} false; then :
9755   $as_echo_n "(cached) " >&6
9756 else
9757   case $ZIC in
9758   [\\/]* | ?:[\\/]*)
9759   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9760   ;;
9761   *)
9762   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9763 for as_dir in $PATH
9764 do
9765   IFS=$as_save_IFS
9766   test -z "$as_dir" && as_dir=.
9767     for ac_exec_ext in '' $ac_executable_extensions; do
9768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9769     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9771     break 2
9772   fi
9773 done
9774   done
9775 IFS=$as_save_IFS
9776
9777   ;;
9778 esac
9779 fi
9780 ZIC=$ac_cv_path_ZIC
9781 if test -n "$ZIC"; then
9782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9783 $as_echo "$ZIC" >&6; }
9784 else
9785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9786 $as_echo "no" >&6; }
9787 fi
9788
9789
9790   test -n "$ZIC" && break
9791 done
9792
9793 else
9794   # Report the value of ZIC in configure's output in all cases.
9795   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9796 $as_echo_n "checking for ZIC... " >&6; }
9797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9798 $as_echo "$ZIC" >&6; }
9799 fi
9800
9801   if test -z "$ZIC"; then
9802     as_fn_error $? "
9803 When cross-compiling, either use the option --with-system-tzdata to use
9804 existing time-zone data, or set the environment variable ZIC to a zic
9805 program to use during the build." "$LINENO" 5
9806   fi
9807 fi
9808
9809 #
9810 # Pthreads
9811 #
9812 # For each platform, we need to know about any special compile and link
9813 # libraries, and whether the normal C function names are thread-safe.
9814 # See the comment at the top of src/port/thread.c for more information.
9815 # WIN32 doesn't need the pthread tests;  it always uses threads
9816 #
9817 # These tests are run before the library-tests, because linking with the
9818 # other libraries can pull in the pthread functions as a side-effect.  We
9819 # want to use the -pthread or similar flags directly, and not rely on
9820 # the side-effects of linking with some other library.
9821 #
9822 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
9823 # invocation below is the first one in the script, and autoconf generates
9824 # additional code for that, which must not be inside the if-block. AS_IF
9825 # knows how to do that.
9826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9827 $as_echo_n "checking for ANSI C header files... " >&6; }
9828 if ${ac_cv_header_stdc+:} false; then :
9829   $as_echo_n "(cached) " >&6
9830 else
9831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9832 /* end confdefs.h.  */
9833 #include <stdlib.h>
9834 #include <stdarg.h>
9835 #include <string.h>
9836 #include <float.h>
9837
9838 int
9839 main ()
9840 {
9841
9842   ;
9843   return 0;
9844 }
9845 _ACEOF
9846 if ac_fn_c_try_compile "$LINENO"; then :
9847   ac_cv_header_stdc=yes
9848 else
9849   ac_cv_header_stdc=no
9850 fi
9851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9852
9853 if test $ac_cv_header_stdc = yes; then
9854   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9856 /* end confdefs.h.  */
9857 #include <string.h>
9858
9859 _ACEOF
9860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9861   $EGREP "memchr" >/dev/null 2>&1; then :
9862
9863 else
9864   ac_cv_header_stdc=no
9865 fi
9866 rm -f conftest*
9867
9868 fi
9869
9870 if test $ac_cv_header_stdc = yes; then
9871   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9873 /* end confdefs.h.  */
9874 #include <stdlib.h>
9875
9876 _ACEOF
9877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9878   $EGREP "free" >/dev/null 2>&1; then :
9879
9880 else
9881   ac_cv_header_stdc=no
9882 fi
9883 rm -f conftest*
9884
9885 fi
9886
9887 if test $ac_cv_header_stdc = yes; then
9888   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9889   if test "$cross_compiling" = yes; then :
9890   :
9891 else
9892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9893 /* end confdefs.h.  */
9894 #include <ctype.h>
9895 #include <stdlib.h>
9896 #if ((' ' & 0x0FF) == 0x020)
9897 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9898 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9899 #else
9900 # define ISLOWER(c) \
9901                    (('a' <= (c) && (c) <= 'i') \
9902                      || ('j' <= (c) && (c) <= 'r') \
9903                      || ('s' <= (c) && (c) <= 'z'))
9904 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9905 #endif
9906
9907 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9908 int
9909 main ()
9910 {
9911   int i;
9912   for (i = 0; i < 256; i++)
9913     if (XOR (islower (i), ISLOWER (i))
9914         || toupper (i) != TOUPPER (i))
9915       return 2;
9916   return 0;
9917 }
9918 _ACEOF
9919 if ac_fn_c_try_run "$LINENO"; then :
9920
9921 else
9922   ac_cv_header_stdc=no
9923 fi
9924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9925   conftest.$ac_objext conftest.beam conftest.$ac_ext
9926 fi
9927
9928 fi
9929 fi
9930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9931 $as_echo "$ac_cv_header_stdc" >&6; }
9932 if test $ac_cv_header_stdc = yes; then
9933
9934 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9935
9936 fi
9937
9938 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9939 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9940                   inttypes.h stdint.h unistd.h
9941 do :
9942   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9943 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9944 "
9945 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9946   cat >>confdefs.h <<_ACEOF
9947 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9948 _ACEOF
9949
9950 fi
9951
9952 done
9953
9954
9955 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
9956    # then
9957
9958
9959
9960 ac_ext=c
9961 ac_cpp='$CPP $CPPFLAGS'
9962 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9963 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9964 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9965
9966 ax_pthread_ok=no
9967
9968 # We used to check for pthread.h first, but this fails if pthread.h
9969 # requires special compiler flags (e.g. on Tru64 or Sequent).
9970 # It gets checked for in the link test anyway.
9971
9972 # First of all, check if the user has set any of the PTHREAD_LIBS,
9973 # etcetera environment variables, and if threads linking works using
9974 # them:
9975 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
9976         save_CFLAGS="$CFLAGS"
9977         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9978         save_LIBS="$LIBS"
9979         LIBS="$PTHREAD_LIBS $LIBS"
9980         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
9981 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
9982         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9983 /* end confdefs.h.  */
9984
9985 /* Override any GCC internal prototype to avoid an error.
9986    Use char because int might match the return type of a GCC
9987    builtin and then its argument prototype would still apply.  */
9988 #ifdef __cplusplus
9989 extern "C"
9990 #endif
9991 char pthread_join ();
9992 int
9993 main ()
9994 {
9995 return pthread_join ();
9996   ;
9997   return 0;
9998 }
9999 _ACEOF
10000 if ac_fn_c_try_link "$LINENO"; then :
10001   ax_pthread_ok=yes
10002 fi
10003 rm -f core conftest.err conftest.$ac_objext \
10004     conftest$ac_exeext conftest.$ac_ext
10005         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10006 $as_echo "$ax_pthread_ok" >&6; }
10007         if test x"$ax_pthread_ok" = xno; then
10008                 PTHREAD_LIBS=""
10009                 PTHREAD_CFLAGS=""
10010         fi
10011         LIBS="$save_LIBS"
10012         CFLAGS="$save_CFLAGS"
10013 fi
10014
10015 # We must check for the threads library under a number of different
10016 # names; the ordering is very important because some systems
10017 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10018 # libraries is broken (non-POSIX).
10019
10020 # Create a list of thread flags to try.  Items starting with a "-" are
10021 # C compiler flags, and other items are library names, except for "none"
10022 # which indicates that we try without any flags at all, and "pthread-config"
10023 # which is a program returning the flags for the Pth emulation library.
10024
10025 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
10026
10027 # The ordering *is* (sometimes) important.  Some notes on the
10028 # individual items follow:
10029
10030 # pthreads: AIX (must check this before -lpthread)
10031 # none: in case threads are in libc; should be tried before -Kthread and
10032 #       other compiler flags to prevent continual compiler warnings
10033 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10034 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10035 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10036 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10037 # -pthreads: Solaris/gcc
10038 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10039 #      doesn't hurt to check since this sometimes defines pthreads and
10040 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10041 #      is present but should not be used directly)
10042 # -mthreads: Mingw32/gcc, Lynx/gcc
10043 # pthread: Linux, etcetera
10044 # --thread-safe: KAI C++
10045 # pthread-config: use pthread-config program (for GNU Pth library)
10046
10047 case $host_os in
10048
10049         hpux*)
10050
10051         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10052         # multi-threading and also sets -lpthread."
10053
10054         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10055         ;;
10056
10057         openedition*)
10058
10059         # IBM z/OS requires a feature-test macro to be defined in order to
10060         # enable POSIX threads at all, so give the user a hint if this is
10061         # not set. (We don't define these ourselves, as they can affect
10062         # other portions of the system API in unpredictable ways.)
10063
10064         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10065 /* end confdefs.h.  */
10066
10067 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10068              AX_PTHREAD_ZOS_MISSING
10069 #            endif
10070
10071 _ACEOF
10072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10073   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10074   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10075 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10076 fi
10077 rm -f conftest*
10078
10079         ;;
10080
10081         solaris*)
10082
10083         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
10084         # check that first.  On some older versions, libc contains stubbed
10085         # (non-functional) versions of the pthreads routines, so link-based
10086         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
10087         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
10088         # a function called by this macro, so we could check for that, but
10089         # who knows whether they'll stub that too in a future libc.)  So
10090         # we'll look for -pthreads and -lpthread shortly thereafter.
10091
10092         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
10093         ;;
10094 esac
10095
10096 # Older versions of Clang only give a warning instead of an error for an
10097 # unrecognized option, unless we specify -Werror. (We throw in some extra
10098 # Clang warning flags for good measure.)
10099
10100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
10101 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
10102 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
10103   $as_echo_n "(cached) " >&6
10104 else
10105   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
10106      save_CFLAGS="$CFLAGS"
10107      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
10108      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
10109      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10110 /* end confdefs.h.  */
10111 int foo(void);
10112 int
10113 main ()
10114 {
10115 foo()
10116   ;
10117   return 0;
10118 }
10119 _ACEOF
10120 if ac_fn_c_try_compile "$LINENO"; then :
10121   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
10122 else
10123   ax_cv_PTHREAD_REJECT_UNKNOWN=no
10124 fi
10125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10126      CFLAGS="$save_CFLAGS"
10127
10128 fi
10129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
10130 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
10131 ax_pthread_extra_flags=
10132 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
10133   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
10134 fi
10135
10136 if test x"$ax_pthread_ok" = xno; then
10137 for flag in $ax_pthread_flags; do
10138
10139         case $flag in
10140                 none)
10141                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10142 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10143                 ;;
10144
10145                 -mt,pthread)
10146                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10147 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10148                 PTHREAD_CFLAGS="-mt"
10149                 PTHREAD_LIBS="-lpthread"
10150                 ;;
10151
10152                 -*)
10153                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
10154 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
10155                 PTHREAD_CFLAGS="$flag"
10156                 ;;
10157
10158                 pthread-config)
10159                 # Extract the first word of "pthread-config", so it can be a program name with args.
10160 set dummy pthread-config; ac_word=$2
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10162 $as_echo_n "checking for $ac_word... " >&6; }
10163 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10164   $as_echo_n "(cached) " >&6
10165 else
10166   if test -n "$ax_pthread_config"; then
10167   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10168 else
10169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10170 for as_dir in $PATH
10171 do
10172   IFS=$as_save_IFS
10173   test -z "$as_dir" && as_dir=.
10174     for ac_exec_ext in '' $ac_executable_extensions; do
10175   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10176     ac_cv_prog_ax_pthread_config="yes"
10177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10178     break 2
10179   fi
10180 done
10181   done
10182 IFS=$as_save_IFS
10183
10184   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10185 fi
10186 fi
10187 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10188 if test -n "$ax_pthread_config"; then
10189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10190 $as_echo "$ax_pthread_config" >&6; }
10191 else
10192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193 $as_echo "no" >&6; }
10194 fi
10195
10196
10197                 if test x"$ax_pthread_config" = xno; then continue; fi
10198                 PTHREAD_CFLAGS="`pthread-config --cflags`"
10199                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10200                 ;;
10201
10202                 *)
10203                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
10204 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
10205                 PTHREAD_LIBS="-l$flag"
10206                 ;;
10207         esac
10208
10209         save_LIBS="$LIBS"
10210         save_CFLAGS="$CFLAGS"
10211         LIBS="$PTHREAD_LIBS $LIBS"
10212         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
10213
10214         # Check for various functions.  We must include pthread.h,
10215         # since some functions may be macros.  (On the Sequent, we
10216         # need a special flag -Kthread to make this header compile.)
10217         # We check for pthread_join because it is in -lpthread on IRIX
10218         # while pthread_create is in libc.  We check for pthread_attr_init
10219         # due to DEC craziness with -lpthreads.  We check for
10220         # pthread_cleanup_push because it is one of the few pthread
10221         # functions on Solaris that doesn't have a non-functional libc stub.
10222         # We try pthread_create on general principles.
10223         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10224 /* end confdefs.h.  */
10225 #include <pthread.h>
10226                         static void routine(void *a) { a = 0; }
10227                         static void *start_routine(void *a) { return a; }
10228 int
10229 main ()
10230 {
10231 pthread_t th; pthread_attr_t attr;
10232                         pthread_create(&th, 0, start_routine, 0);
10233                         pthread_join(th, 0);
10234                         pthread_attr_init(&attr);
10235                         pthread_cleanup_push(routine, 0);
10236                         pthread_cleanup_pop(0) /* ; */
10237   ;
10238   return 0;
10239 }
10240 _ACEOF
10241 if ac_fn_c_try_link "$LINENO"; then :
10242   ax_pthread_ok=yes
10243 fi
10244 rm -f core conftest.err conftest.$ac_objext \
10245     conftest$ac_exeext conftest.$ac_ext
10246
10247         LIBS="$save_LIBS"
10248         CFLAGS="$save_CFLAGS"
10249
10250         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10251 $as_echo "$ax_pthread_ok" >&6; }
10252         if test "x$ax_pthread_ok" = xyes; then
10253                 break;
10254         fi
10255
10256         PTHREAD_LIBS=""
10257         PTHREAD_CFLAGS=""
10258 done
10259 fi
10260
10261 # Various other checks:
10262 if test "x$ax_pthread_ok" = xyes; then
10263         save_LIBS="$LIBS"
10264         LIBS="$PTHREAD_LIBS $LIBS"
10265         save_CFLAGS="$CFLAGS"
10266         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10267
10268         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10269         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10270 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10271 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10272   $as_echo_n "(cached) " >&6
10273 else
10274   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10275              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10276                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10277 /* end confdefs.h.  */
10278 #include <pthread.h>
10279 int
10280 main ()
10281 {
10282 int attr = $attr; return attr /* ; */
10283   ;
10284   return 0;
10285 }
10286 _ACEOF
10287 if ac_fn_c_try_link "$LINENO"; then :
10288   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
10289 fi
10290 rm -f core conftest.err conftest.$ac_objext \
10291     conftest$ac_exeext conftest.$ac_ext
10292              done
10293
10294 fi
10295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10296 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10297         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
10298                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
10299
10300 cat >>confdefs.h <<_ACEOF
10301 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10302 _ACEOF
10303
10304 fi
10305
10306         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
10307 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
10308 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10309   $as_echo_n "(cached) " >&6
10310 else
10311   ax_cv_PTHREAD_SPECIAL_FLAGS=no
10312              ax_pthread_special_flags_added=no
10313              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10314 /* end confdefs.h.  */
10315
10316 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
10317                   AX_PTHREAD_NEED_SPECIAL_FLAG
10318 #                 endif
10319
10320 _ACEOF
10321 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10322   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
10323   case $host_os in
10324                   aix* | freebsd*)
10325                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
10326                   ;;
10327                   darwin* | hpux* | osf* | solaris*)
10328                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
10329                   ;;
10330                   esac
10331
10332 fi
10333 rm -f conftest*
10334
10335
10336 fi
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10338 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10339         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10340                test "x$ax_pthread_special_flags_added" != "xyes"; then :
10341   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10342                ax_pthread_special_flags_added=yes
10343 fi
10344
10345         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10346 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10347 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10348   $as_echo_n "(cached) " >&6
10349 else
10350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10351 /* end confdefs.h.  */
10352 #include <pthread.h>
10353 int
10354 main ()
10355 {
10356 int i = PTHREAD_PRIO_INHERIT;
10357   ;
10358   return 0;
10359 }
10360 _ACEOF
10361 if ac_fn_c_try_link "$LINENO"; then :
10362   ax_cv_PTHREAD_PRIO_INHERIT=yes
10363 else
10364   ax_cv_PTHREAD_PRIO_INHERIT=no
10365 fi
10366 rm -f core conftest.err conftest.$ac_objext \
10367     conftest$ac_exeext conftest.$ac_ext
10368
10369 fi
10370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10371 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10372         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
10373
10374 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10375
10376 fi
10377
10378         LIBS="$save_LIBS"
10379         CFLAGS="$save_CFLAGS"
10380
10381         # More AIX lossage: compile with *_r variant
10382         if test "x$GCC" != xyes; then
10383             case $host_os in
10384                 aix*)
10385                 case "x/$CC" in #(
10386   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10387     #handle absolute path differently from PATH based program lookup
10388                    case "x$CC" in #(
10389   x/*) :
10390     if as_fn_executable_p ${CC}_r; then :
10391   PTHREAD_CC="${CC}_r"
10392 fi ;; #(
10393   *) :
10394     for ac_prog in ${CC}_r
10395 do
10396   # Extract the first word of "$ac_prog", so it can be a program name with args.
10397 set dummy $ac_prog; ac_word=$2
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10399 $as_echo_n "checking for $ac_word... " >&6; }
10400 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10401   $as_echo_n "(cached) " >&6
10402 else
10403   if test -n "$PTHREAD_CC"; then
10404   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10405 else
10406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10407 for as_dir in $PATH
10408 do
10409   IFS=$as_save_IFS
10410   test -z "$as_dir" && as_dir=.
10411     for ac_exec_ext in '' $ac_executable_extensions; do
10412   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10413     ac_cv_prog_PTHREAD_CC="$ac_prog"
10414     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10415     break 2
10416   fi
10417 done
10418   done
10419 IFS=$as_save_IFS
10420
10421 fi
10422 fi
10423 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10424 if test -n "$PTHREAD_CC"; then
10425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10426 $as_echo "$PTHREAD_CC" >&6; }
10427 else
10428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10429 $as_echo "no" >&6; }
10430 fi
10431
10432
10433   test -n "$PTHREAD_CC" && break
10434 done
10435 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10436  ;;
10437 esac ;; #(
10438   *) :
10439      ;;
10440 esac
10441                 ;;
10442             esac
10443         fi
10444 fi
10445
10446 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10447
10448
10449
10450
10451
10452 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10453 if test x"$ax_pthread_ok" = xyes; then
10454
10455 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10456
10457         :
10458 else
10459         ax_pthread_ok=no
10460
10461 fi
10462 ac_ext=c
10463 ac_cpp='$CPP $CPPFLAGS'
10464 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10465 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10466 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10467
10468         # set thread flags
10469
10470 # Some platforms use these, so just define them.  They can't hurt if they
10471 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10472 # enables 5-arg getpwuid_r, among other things.
10473 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10474
10475 # Check for *_r functions
10476 _CFLAGS="$CFLAGS"
10477 _LIBS="$LIBS"
10478 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10479 LIBS="$LIBS $PTHREAD_LIBS"
10480
10481 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10482 if test "x$ac_cv_header_pthread_h" = xyes; then :
10483
10484 else
10485   as_fn_error $? "
10486 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10487 fi
10488
10489
10490
10491 for ac_func in strerror_r getpwuid_r gethostbyname_r
10492 do :
10493   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10494 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10495 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10496   cat >>confdefs.h <<_ACEOF
10497 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10498 _ACEOF
10499
10500 fi
10501 done
10502
10503
10504 # Do test here with the proper thread flags
10505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10506 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10507 if ${pgac_cv_func_strerror_r_int+:} false; then :
10508   $as_echo_n "(cached) " >&6
10509 else
10510   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10511 /* end confdefs.h.  */
10512 #include <string.h>
10513 int
10514 main ()
10515 {
10516 #ifndef _AIX
10517 int strerror_r(int, char *, size_t);
10518 #else
10519 /* Older AIX has 'int' for the third argument so we don't test the args. */
10520 int strerror_r();
10521 #endif
10522   ;
10523   return 0;
10524 }
10525 _ACEOF
10526 if ac_fn_c_try_compile "$LINENO"; then :
10527   pgac_cv_func_strerror_r_int=yes
10528 else
10529   pgac_cv_func_strerror_r_int=no
10530 fi
10531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10532 fi
10533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10534 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10535 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10536
10537 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10538
10539 fi
10540
10541
10542 CFLAGS="$_CFLAGS"
10543 LIBS="$_LIBS"
10544
10545
10546 else
10547    # else
10548 # do not use values from template file
10549 PTHREAD_CFLAGS=
10550 PTHREAD_LIBS=
10551
10552 fi # fi
10553
10554
10555
10556
10557
10558 ##
10559 ## Libraries
10560 ##
10561 ## Most libraries are included only if they demonstrably provide a function
10562 ## we need, but libm is an exception: always include it, because there are
10563 ## too many compilers that play cute optimization games that will break
10564 ## probes for standard functions such as pow().
10565 ##
10566
10567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10568 $as_echo_n "checking for main in -lm... " >&6; }
10569 if ${ac_cv_lib_m_main+:} false; then :
10570   $as_echo_n "(cached) " >&6
10571 else
10572   ac_check_lib_save_LIBS=$LIBS
10573 LIBS="-lm  $LIBS"
10574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10575 /* end confdefs.h.  */
10576
10577
10578 int
10579 main ()
10580 {
10581 return main ();
10582   ;
10583   return 0;
10584 }
10585 _ACEOF
10586 if ac_fn_c_try_link "$LINENO"; then :
10587   ac_cv_lib_m_main=yes
10588 else
10589   ac_cv_lib_m_main=no
10590 fi
10591 rm -f core conftest.err conftest.$ac_objext \
10592     conftest$ac_exeext conftest.$ac_ext
10593 LIBS=$ac_check_lib_save_LIBS
10594 fi
10595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10596 $as_echo "$ac_cv_lib_m_main" >&6; }
10597 if test "x$ac_cv_lib_m_main" = xyes; then :
10598   cat >>confdefs.h <<_ACEOF
10599 #define HAVE_LIBM 1
10600 _ACEOF
10601
10602   LIBS="-lm $LIBS"
10603
10604 fi
10605
10606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10607 $as_echo_n "checking for library containing setproctitle... " >&6; }
10608 if ${ac_cv_search_setproctitle+:} false; then :
10609   $as_echo_n "(cached) " >&6
10610 else
10611   ac_func_search_save_LIBS=$LIBS
10612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10613 /* end confdefs.h.  */
10614
10615 /* Override any GCC internal prototype to avoid an error.
10616    Use char because int might match the return type of a GCC
10617    builtin and then its argument prototype would still apply.  */
10618 #ifdef __cplusplus
10619 extern "C"
10620 #endif
10621 char setproctitle ();
10622 int
10623 main ()
10624 {
10625 return setproctitle ();
10626   ;
10627   return 0;
10628 }
10629 _ACEOF
10630 for ac_lib in '' util; do
10631   if test -z "$ac_lib"; then
10632     ac_res="none required"
10633   else
10634     ac_res=-l$ac_lib
10635     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10636   fi
10637   if ac_fn_c_try_link "$LINENO"; then :
10638   ac_cv_search_setproctitle=$ac_res
10639 fi
10640 rm -f core conftest.err conftest.$ac_objext \
10641     conftest$ac_exeext
10642   if ${ac_cv_search_setproctitle+:} false; then :
10643   break
10644 fi
10645 done
10646 if ${ac_cv_search_setproctitle+:} false; then :
10647
10648 else
10649   ac_cv_search_setproctitle=no
10650 fi
10651 rm conftest.$ac_ext
10652 LIBS=$ac_func_search_save_LIBS
10653 fi
10654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
10655 $as_echo "$ac_cv_search_setproctitle" >&6; }
10656 ac_res=$ac_cv_search_setproctitle
10657 if test "$ac_res" != no; then :
10658   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10659
10660 fi
10661
10662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10663 $as_echo_n "checking for library containing dlopen... " >&6; }
10664 if ${ac_cv_search_dlopen+:} false; then :
10665   $as_echo_n "(cached) " >&6
10666 else
10667   ac_func_search_save_LIBS=$LIBS
10668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10669 /* end confdefs.h.  */
10670
10671 /* Override any GCC internal prototype to avoid an error.
10672    Use char because int might match the return type of a GCC
10673    builtin and then its argument prototype would still apply.  */
10674 #ifdef __cplusplus
10675 extern "C"
10676 #endif
10677 char dlopen ();
10678 int
10679 main ()
10680 {
10681 return dlopen ();
10682   ;
10683   return 0;
10684 }
10685 _ACEOF
10686 for ac_lib in '' dl; do
10687   if test -z "$ac_lib"; then
10688     ac_res="none required"
10689   else
10690     ac_res=-l$ac_lib
10691     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10692   fi
10693   if ac_fn_c_try_link "$LINENO"; then :
10694   ac_cv_search_dlopen=$ac_res
10695 fi
10696 rm -f core conftest.err conftest.$ac_objext \
10697     conftest$ac_exeext
10698   if ${ac_cv_search_dlopen+:} false; then :
10699   break
10700 fi
10701 done
10702 if ${ac_cv_search_dlopen+:} false; then :
10703
10704 else
10705   ac_cv_search_dlopen=no
10706 fi
10707 rm conftest.$ac_ext
10708 LIBS=$ac_func_search_save_LIBS
10709 fi
10710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10711 $as_echo "$ac_cv_search_dlopen" >&6; }
10712 ac_res=$ac_cv_search_dlopen
10713 if test "$ac_res" != no; then :
10714   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10715
10716 fi
10717
10718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
10719 $as_echo_n "checking for library containing socket... " >&6; }
10720 if ${ac_cv_search_socket+:} false; then :
10721   $as_echo_n "(cached) " >&6
10722 else
10723   ac_func_search_save_LIBS=$LIBS
10724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10725 /* end confdefs.h.  */
10726
10727 /* Override any GCC internal prototype to avoid an error.
10728    Use char because int might match the return type of a GCC
10729    builtin and then its argument prototype would still apply.  */
10730 #ifdef __cplusplus
10731 extern "C"
10732 #endif
10733 char socket ();
10734 int
10735 main ()
10736 {
10737 return socket ();
10738   ;
10739   return 0;
10740 }
10741 _ACEOF
10742 for ac_lib in '' socket ws2_32; do
10743   if test -z "$ac_lib"; then
10744     ac_res="none required"
10745   else
10746     ac_res=-l$ac_lib
10747     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10748   fi
10749   if ac_fn_c_try_link "$LINENO"; then :
10750   ac_cv_search_socket=$ac_res
10751 fi
10752 rm -f core conftest.err conftest.$ac_objext \
10753     conftest$ac_exeext
10754   if ${ac_cv_search_socket+:} false; then :
10755   break
10756 fi
10757 done
10758 if ${ac_cv_search_socket+:} false; then :
10759
10760 else
10761   ac_cv_search_socket=no
10762 fi
10763 rm conftest.$ac_ext
10764 LIBS=$ac_func_search_save_LIBS
10765 fi
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
10767 $as_echo "$ac_cv_search_socket" >&6; }
10768 ac_res=$ac_cv_search_socket
10769 if test "$ac_res" != no; then :
10770   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10771
10772 fi
10773
10774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
10775 $as_echo_n "checking for library containing shl_load... " >&6; }
10776 if ${ac_cv_search_shl_load+:} false; then :
10777   $as_echo_n "(cached) " >&6
10778 else
10779   ac_func_search_save_LIBS=$LIBS
10780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10781 /* end confdefs.h.  */
10782
10783 /* Override any GCC internal prototype to avoid an error.
10784    Use char because int might match the return type of a GCC
10785    builtin and then its argument prototype would still apply.  */
10786 #ifdef __cplusplus
10787 extern "C"
10788 #endif
10789 char shl_load ();
10790 int
10791 main ()
10792 {
10793 return shl_load ();
10794   ;
10795   return 0;
10796 }
10797 _ACEOF
10798 for ac_lib in '' dld; do
10799   if test -z "$ac_lib"; then
10800     ac_res="none required"
10801   else
10802     ac_res=-l$ac_lib
10803     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10804   fi
10805   if ac_fn_c_try_link "$LINENO"; then :
10806   ac_cv_search_shl_load=$ac_res
10807 fi
10808 rm -f core conftest.err conftest.$ac_objext \
10809     conftest$ac_exeext
10810   if ${ac_cv_search_shl_load+:} false; then :
10811   break
10812 fi
10813 done
10814 if ${ac_cv_search_shl_load+:} false; then :
10815
10816 else
10817   ac_cv_search_shl_load=no
10818 fi
10819 rm conftest.$ac_ext
10820 LIBS=$ac_func_search_save_LIBS
10821 fi
10822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
10823 $as_echo "$ac_cv_search_shl_load" >&6; }
10824 ac_res=$ac_cv_search_shl_load
10825 if test "$ac_res" != no; then :
10826   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10827
10828 fi
10829
10830 # We only use libld in port/dynloader/aix.c
10831 case $host_os in
10832      aix*)
10833         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
10834 $as_echo_n "checking for library containing ldopen... " >&6; }
10835 if ${ac_cv_search_ldopen+:} false; then :
10836   $as_echo_n "(cached) " >&6
10837 else
10838   ac_func_search_save_LIBS=$LIBS
10839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10840 /* end confdefs.h.  */
10841
10842 /* Override any GCC internal prototype to avoid an error.
10843    Use char because int might match the return type of a GCC
10844    builtin and then its argument prototype would still apply.  */
10845 #ifdef __cplusplus
10846 extern "C"
10847 #endif
10848 char ldopen ();
10849 int
10850 main ()
10851 {
10852 return ldopen ();
10853   ;
10854   return 0;
10855 }
10856 _ACEOF
10857 for ac_lib in '' ld; do
10858   if test -z "$ac_lib"; then
10859     ac_res="none required"
10860   else
10861     ac_res=-l$ac_lib
10862     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10863   fi
10864   if ac_fn_c_try_link "$LINENO"; then :
10865   ac_cv_search_ldopen=$ac_res
10866 fi
10867 rm -f core conftest.err conftest.$ac_objext \
10868     conftest$ac_exeext
10869   if ${ac_cv_search_ldopen+:} false; then :
10870   break
10871 fi
10872 done
10873 if ${ac_cv_search_ldopen+:} false; then :
10874
10875 else
10876   ac_cv_search_ldopen=no
10877 fi
10878 rm conftest.$ac_ext
10879 LIBS=$ac_func_search_save_LIBS
10880 fi
10881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
10882 $as_echo "$ac_cv_search_ldopen" >&6; }
10883 ac_res=$ac_cv_search_ldopen
10884 if test "$ac_res" != no; then :
10885   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10886
10887 fi
10888
10889         ;;
10890 esac
10891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
10892 $as_echo_n "checking for library containing getopt_long... " >&6; }
10893 if ${ac_cv_search_getopt_long+:} false; then :
10894   $as_echo_n "(cached) " >&6
10895 else
10896   ac_func_search_save_LIBS=$LIBS
10897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10898 /* end confdefs.h.  */
10899
10900 /* Override any GCC internal prototype to avoid an error.
10901    Use char because int might match the return type of a GCC
10902    builtin and then its argument prototype would still apply.  */
10903 #ifdef __cplusplus
10904 extern "C"
10905 #endif
10906 char getopt_long ();
10907 int
10908 main ()
10909 {
10910 return getopt_long ();
10911   ;
10912   return 0;
10913 }
10914 _ACEOF
10915 for ac_lib in '' getopt gnugetopt; do
10916   if test -z "$ac_lib"; then
10917     ac_res="none required"
10918   else
10919     ac_res=-l$ac_lib
10920     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10921   fi
10922   if ac_fn_c_try_link "$LINENO"; then :
10923   ac_cv_search_getopt_long=$ac_res
10924 fi
10925 rm -f core conftest.err conftest.$ac_objext \
10926     conftest$ac_exeext
10927   if ${ac_cv_search_getopt_long+:} false; then :
10928   break
10929 fi
10930 done
10931 if ${ac_cv_search_getopt_long+:} false; then :
10932
10933 else
10934   ac_cv_search_getopt_long=no
10935 fi
10936 rm conftest.$ac_ext
10937 LIBS=$ac_func_search_save_LIBS
10938 fi
10939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
10940 $as_echo "$ac_cv_search_getopt_long" >&6; }
10941 ac_res=$ac_cv_search_getopt_long
10942 if test "$ac_res" != no; then :
10943   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10944
10945 fi
10946
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
10948 $as_echo_n "checking for library containing crypt... " >&6; }
10949 if ${ac_cv_search_crypt+:} false; then :
10950   $as_echo_n "(cached) " >&6
10951 else
10952   ac_func_search_save_LIBS=$LIBS
10953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10954 /* end confdefs.h.  */
10955
10956 /* Override any GCC internal prototype to avoid an error.
10957    Use char because int might match the return type of a GCC
10958    builtin and then its argument prototype would still apply.  */
10959 #ifdef __cplusplus
10960 extern "C"
10961 #endif
10962 char crypt ();
10963 int
10964 main ()
10965 {
10966 return crypt ();
10967   ;
10968   return 0;
10969 }
10970 _ACEOF
10971 for ac_lib in '' crypt; do
10972   if test -z "$ac_lib"; then
10973     ac_res="none required"
10974   else
10975     ac_res=-l$ac_lib
10976     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10977   fi
10978   if ac_fn_c_try_link "$LINENO"; then :
10979   ac_cv_search_crypt=$ac_res
10980 fi
10981 rm -f core conftest.err conftest.$ac_objext \
10982     conftest$ac_exeext
10983   if ${ac_cv_search_crypt+:} false; then :
10984   break
10985 fi
10986 done
10987 if ${ac_cv_search_crypt+:} false; then :
10988
10989 else
10990   ac_cv_search_crypt=no
10991 fi
10992 rm conftest.$ac_ext
10993 LIBS=$ac_func_search_save_LIBS
10994 fi
10995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
10996 $as_echo "$ac_cv_search_crypt" >&6; }
10997 ac_res=$ac_cv_search_crypt
10998 if test "$ac_res" != no; then :
10999   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11000
11001 fi
11002
11003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11004 $as_echo_n "checking for library containing shm_open... " >&6; }
11005 if ${ac_cv_search_shm_open+:} false; then :
11006   $as_echo_n "(cached) " >&6
11007 else
11008   ac_func_search_save_LIBS=$LIBS
11009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11010 /* end confdefs.h.  */
11011
11012 /* Override any GCC internal prototype to avoid an error.
11013    Use char because int might match the return type of a GCC
11014    builtin and then its argument prototype would still apply.  */
11015 #ifdef __cplusplus
11016 extern "C"
11017 #endif
11018 char shm_open ();
11019 int
11020 main ()
11021 {
11022 return shm_open ();
11023   ;
11024   return 0;
11025 }
11026 _ACEOF
11027 for ac_lib in '' rt; do
11028   if test -z "$ac_lib"; then
11029     ac_res="none required"
11030   else
11031     ac_res=-l$ac_lib
11032     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11033   fi
11034   if ac_fn_c_try_link "$LINENO"; then :
11035   ac_cv_search_shm_open=$ac_res
11036 fi
11037 rm -f core conftest.err conftest.$ac_objext \
11038     conftest$ac_exeext
11039   if ${ac_cv_search_shm_open+:} false; then :
11040   break
11041 fi
11042 done
11043 if ${ac_cv_search_shm_open+:} false; then :
11044
11045 else
11046   ac_cv_search_shm_open=no
11047 fi
11048 rm conftest.$ac_ext
11049 LIBS=$ac_func_search_save_LIBS
11050 fi
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11052 $as_echo "$ac_cv_search_shm_open" >&6; }
11053 ac_res=$ac_cv_search_shm_open
11054 if test "$ac_res" != no; then :
11055   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11056
11057 fi
11058
11059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11060 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11061 if ${ac_cv_search_shm_unlink+:} false; then :
11062   $as_echo_n "(cached) " >&6
11063 else
11064   ac_func_search_save_LIBS=$LIBS
11065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11066 /* end confdefs.h.  */
11067
11068 /* Override any GCC internal prototype to avoid an error.
11069    Use char because int might match the return type of a GCC
11070    builtin and then its argument prototype would still apply.  */
11071 #ifdef __cplusplus
11072 extern "C"
11073 #endif
11074 char shm_unlink ();
11075 int
11076 main ()
11077 {
11078 return shm_unlink ();
11079   ;
11080   return 0;
11081 }
11082 _ACEOF
11083 for ac_lib in '' rt; do
11084   if test -z "$ac_lib"; then
11085     ac_res="none required"
11086   else
11087     ac_res=-l$ac_lib
11088     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11089   fi
11090   if ac_fn_c_try_link "$LINENO"; then :
11091   ac_cv_search_shm_unlink=$ac_res
11092 fi
11093 rm -f core conftest.err conftest.$ac_objext \
11094     conftest$ac_exeext
11095   if ${ac_cv_search_shm_unlink+:} false; then :
11096   break
11097 fi
11098 done
11099 if ${ac_cv_search_shm_unlink+:} false; then :
11100
11101 else
11102   ac_cv_search_shm_unlink=no
11103 fi
11104 rm conftest.$ac_ext
11105 LIBS=$ac_func_search_save_LIBS
11106 fi
11107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11108 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11109 ac_res=$ac_cv_search_shm_unlink
11110 if test "$ac_res" != no; then :
11111   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11112
11113 fi
11114
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11116 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11117 if ${ac_cv_search_clock_gettime+:} false; then :
11118   $as_echo_n "(cached) " >&6
11119 else
11120   ac_func_search_save_LIBS=$LIBS
11121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11122 /* end confdefs.h.  */
11123
11124 /* Override any GCC internal prototype to avoid an error.
11125    Use char because int might match the return type of a GCC
11126    builtin and then its argument prototype would still apply.  */
11127 #ifdef __cplusplus
11128 extern "C"
11129 #endif
11130 char clock_gettime ();
11131 int
11132 main ()
11133 {
11134 return clock_gettime ();
11135   ;
11136   return 0;
11137 }
11138 _ACEOF
11139 for ac_lib in '' rt posix4; do
11140   if test -z "$ac_lib"; then
11141     ac_res="none required"
11142   else
11143     ac_res=-l$ac_lib
11144     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11145   fi
11146   if ac_fn_c_try_link "$LINENO"; then :
11147   ac_cv_search_clock_gettime=$ac_res
11148 fi
11149 rm -f core conftest.err conftest.$ac_objext \
11150     conftest$ac_exeext
11151   if ${ac_cv_search_clock_gettime+:} false; then :
11152   break
11153 fi
11154 done
11155 if ${ac_cv_search_clock_gettime+:} false; then :
11156
11157 else
11158   ac_cv_search_clock_gettime=no
11159 fi
11160 rm conftest.$ac_ext
11161 LIBS=$ac_func_search_save_LIBS
11162 fi
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11164 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11165 ac_res=$ac_cv_search_clock_gettime
11166 if test "$ac_res" != no; then :
11167   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11168
11169 fi
11170
11171 # Solaris:
11172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11173 $as_echo_n "checking for library containing fdatasync... " >&6; }
11174 if ${ac_cv_search_fdatasync+:} false; then :
11175   $as_echo_n "(cached) " >&6
11176 else
11177   ac_func_search_save_LIBS=$LIBS
11178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11179 /* end confdefs.h.  */
11180
11181 /* Override any GCC internal prototype to avoid an error.
11182    Use char because int might match the return type of a GCC
11183    builtin and then its argument prototype would still apply.  */
11184 #ifdef __cplusplus
11185 extern "C"
11186 #endif
11187 char fdatasync ();
11188 int
11189 main ()
11190 {
11191 return fdatasync ();
11192   ;
11193   return 0;
11194 }
11195 _ACEOF
11196 for ac_lib in '' rt posix4; do
11197   if test -z "$ac_lib"; then
11198     ac_res="none required"
11199   else
11200     ac_res=-l$ac_lib
11201     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11202   fi
11203   if ac_fn_c_try_link "$LINENO"; then :
11204   ac_cv_search_fdatasync=$ac_res
11205 fi
11206 rm -f core conftest.err conftest.$ac_objext \
11207     conftest$ac_exeext
11208   if ${ac_cv_search_fdatasync+:} false; then :
11209   break
11210 fi
11211 done
11212 if ${ac_cv_search_fdatasync+:} false; then :
11213
11214 else
11215   ac_cv_search_fdatasync=no
11216 fi
11217 rm conftest.$ac_ext
11218 LIBS=$ac_func_search_save_LIBS
11219 fi
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11221 $as_echo "$ac_cv_search_fdatasync" >&6; }
11222 ac_res=$ac_cv_search_fdatasync
11223 if test "$ac_res" != no; then :
11224   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11225
11226 fi
11227
11228 # Required for thread_test.c on Solaris
11229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11230 $as_echo_n "checking for library containing sched_yield... " >&6; }
11231 if ${ac_cv_search_sched_yield+:} false; then :
11232   $as_echo_n "(cached) " >&6
11233 else
11234   ac_func_search_save_LIBS=$LIBS
11235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11236 /* end confdefs.h.  */
11237
11238 /* Override any GCC internal prototype to avoid an error.
11239    Use char because int might match the return type of a GCC
11240    builtin and then its argument prototype would still apply.  */
11241 #ifdef __cplusplus
11242 extern "C"
11243 #endif
11244 char sched_yield ();
11245 int
11246 main ()
11247 {
11248 return sched_yield ();
11249   ;
11250   return 0;
11251 }
11252 _ACEOF
11253 for ac_lib in '' rt; do
11254   if test -z "$ac_lib"; then
11255     ac_res="none required"
11256   else
11257     ac_res=-l$ac_lib
11258     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11259   fi
11260   if ac_fn_c_try_link "$LINENO"; then :
11261   ac_cv_search_sched_yield=$ac_res
11262 fi
11263 rm -f core conftest.err conftest.$ac_objext \
11264     conftest$ac_exeext
11265   if ${ac_cv_search_sched_yield+:} false; then :
11266   break
11267 fi
11268 done
11269 if ${ac_cv_search_sched_yield+:} false; then :
11270
11271 else
11272   ac_cv_search_sched_yield=no
11273 fi
11274 rm conftest.$ac_ext
11275 LIBS=$ac_func_search_save_LIBS
11276 fi
11277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11278 $as_echo "$ac_cv_search_sched_yield" >&6; }
11279 ac_res=$ac_cv_search_sched_yield
11280 if test "$ac_res" != no; then :
11281   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11282
11283 fi
11284
11285 # Required for thread_test.c on Solaris 2.5:
11286 # Other ports use it too (HP-UX) so test unconditionally
11287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11288 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11289 if ${ac_cv_search_gethostbyname_r+:} false; then :
11290   $as_echo_n "(cached) " >&6
11291 else
11292   ac_func_search_save_LIBS=$LIBS
11293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11294 /* end confdefs.h.  */
11295
11296 /* Override any GCC internal prototype to avoid an error.
11297    Use char because int might match the return type of a GCC
11298    builtin and then its argument prototype would still apply.  */
11299 #ifdef __cplusplus
11300 extern "C"
11301 #endif
11302 char gethostbyname_r ();
11303 int
11304 main ()
11305 {
11306 return gethostbyname_r ();
11307   ;
11308   return 0;
11309 }
11310 _ACEOF
11311 for ac_lib in '' nsl; do
11312   if test -z "$ac_lib"; then
11313     ac_res="none required"
11314   else
11315     ac_res=-l$ac_lib
11316     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11317   fi
11318   if ac_fn_c_try_link "$LINENO"; then :
11319   ac_cv_search_gethostbyname_r=$ac_res
11320 fi
11321 rm -f core conftest.err conftest.$ac_objext \
11322     conftest$ac_exeext
11323   if ${ac_cv_search_gethostbyname_r+:} false; then :
11324   break
11325 fi
11326 done
11327 if ${ac_cv_search_gethostbyname_r+:} false; then :
11328
11329 else
11330   ac_cv_search_gethostbyname_r=no
11331 fi
11332 rm conftest.$ac_ext
11333 LIBS=$ac_func_search_save_LIBS
11334 fi
11335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11336 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11337 ac_res=$ac_cv_search_gethostbyname_r
11338 if test "$ac_res" != no; then :
11339   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11340
11341 fi
11342
11343 # Cygwin:
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11345 $as_echo_n "checking for library containing shmget... " >&6; }
11346 if ${ac_cv_search_shmget+:} false; then :
11347   $as_echo_n "(cached) " >&6
11348 else
11349   ac_func_search_save_LIBS=$LIBS
11350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11351 /* end confdefs.h.  */
11352
11353 /* Override any GCC internal prototype to avoid an error.
11354    Use char because int might match the return type of a GCC
11355    builtin and then its argument prototype would still apply.  */
11356 #ifdef __cplusplus
11357 extern "C"
11358 #endif
11359 char shmget ();
11360 int
11361 main ()
11362 {
11363 return shmget ();
11364   ;
11365   return 0;
11366 }
11367 _ACEOF
11368 for ac_lib in '' cygipc; do
11369   if test -z "$ac_lib"; then
11370     ac_res="none required"
11371   else
11372     ac_res=-l$ac_lib
11373     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11374   fi
11375   if ac_fn_c_try_link "$LINENO"; then :
11376   ac_cv_search_shmget=$ac_res
11377 fi
11378 rm -f core conftest.err conftest.$ac_objext \
11379     conftest$ac_exeext
11380   if ${ac_cv_search_shmget+:} false; then :
11381   break
11382 fi
11383 done
11384 if ${ac_cv_search_shmget+:} false; then :
11385
11386 else
11387   ac_cv_search_shmget=no
11388 fi
11389 rm conftest.$ac_ext
11390 LIBS=$ac_func_search_save_LIBS
11391 fi
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11393 $as_echo "$ac_cv_search_shmget" >&6; }
11394 ac_res=$ac_cv_search_shmget
11395 if test "$ac_res" != no; then :
11396   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11397
11398 fi
11399
11400
11401 if test "$with_readline" = yes; then
11402
11403
11404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11405 $as_echo_n "checking for library containing readline... " >&6; }
11406 if ${pgac_cv_check_readline+:} false; then :
11407   $as_echo_n "(cached) " >&6
11408 else
11409   pgac_cv_check_readline=no
11410 pgac_save_LIBS=$LIBS
11411 if test x"$with_libedit_preferred" != x"yes"
11412 then    READLINE_ORDER="-lreadline -ledit"
11413 else    READLINE_ORDER="-ledit -lreadline"
11414 fi
11415 for pgac_rllib in $READLINE_ORDER ; do
11416   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11417     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11418     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11419 /* end confdefs.h.  */
11420
11421 /* Override any GCC internal prototype to avoid an error.
11422    Use char because int might match the return type of a GCC
11423    builtin and then its argument prototype would still apply.  */
11424 #ifdef __cplusplus
11425 extern "C"
11426 #endif
11427 char readline ();
11428 int
11429 main ()
11430 {
11431 return readline ();
11432   ;
11433   return 0;
11434 }
11435 _ACEOF
11436 if ac_fn_c_try_link "$LINENO"; then :
11437
11438       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11439       # recognize dependent libraries; assume curses is needed if we didn't
11440       # find any dependency.
11441       case $host_os in
11442         netbsd* | openbsd* | irix*)
11443           if test x"$pgac_lib" = x"" ; then
11444             pgac_lib=" -lcurses"
11445           fi ;;
11446       esac
11447
11448       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11449       break
11450
11451 fi
11452 rm -f core conftest.err conftest.$ac_objext \
11453     conftest$ac_exeext conftest.$ac_ext
11454   done
11455   if test "$pgac_cv_check_readline" != no ; then
11456     break
11457   fi
11458 done
11459 LIBS=$pgac_save_LIBS
11460
11461 fi
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11463 $as_echo "$pgac_cv_check_readline" >&6; }
11464 if test "$pgac_cv_check_readline" != no ; then
11465   LIBS="$pgac_cv_check_readline $LIBS"
11466
11467 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11468
11469 fi
11470
11471
11472   if test x"$pgac_cv_check_readline" = x"no"; then
11473     as_fn_error $? "readline library not found
11474 If you have readline already installed, see config.log for details on the
11475 failure.  It is possible the compiler isn't looking in the proper directory.
11476 Use --without-readline to disable readline support." "$LINENO" 5
11477   fi
11478 fi
11479
11480 if test "$with_zlib" = yes; then
11481   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11482 $as_echo_n "checking for inflate in -lz... " >&6; }
11483 if ${ac_cv_lib_z_inflate+:} false; then :
11484   $as_echo_n "(cached) " >&6
11485 else
11486   ac_check_lib_save_LIBS=$LIBS
11487 LIBS="-lz  $LIBS"
11488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11489 /* end confdefs.h.  */
11490
11491 /* Override any GCC internal prototype to avoid an error.
11492    Use char because int might match the return type of a GCC
11493    builtin and then its argument prototype would still apply.  */
11494 #ifdef __cplusplus
11495 extern "C"
11496 #endif
11497 char inflate ();
11498 int
11499 main ()
11500 {
11501 return inflate ();
11502   ;
11503   return 0;
11504 }
11505 _ACEOF
11506 if ac_fn_c_try_link "$LINENO"; then :
11507   ac_cv_lib_z_inflate=yes
11508 else
11509   ac_cv_lib_z_inflate=no
11510 fi
11511 rm -f core conftest.err conftest.$ac_objext \
11512     conftest$ac_exeext conftest.$ac_ext
11513 LIBS=$ac_check_lib_save_LIBS
11514 fi
11515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11516 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11517 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11518   cat >>confdefs.h <<_ACEOF
11519 #define HAVE_LIBZ 1
11520 _ACEOF
11521
11522   LIBS="-lz $LIBS"
11523
11524 else
11525   as_fn_error $? "zlib library not found
11526 If you have zlib already installed, see config.log for details on the
11527 failure.  It is possible the compiler isn't looking in the proper directory.
11528 Use --without-zlib to disable zlib support." "$LINENO" 5
11529 fi
11530
11531 fi
11532
11533 if test "$enable_spinlocks" = yes; then
11534
11535 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11536
11537 else
11538   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11539 *** Not using spinlocks will cause poor performance." >&5
11540 $as_echo "$as_me: WARNING:
11541 *** Not using spinlocks will cause poor performance." >&2;}
11542 fi
11543
11544 if test "$enable_atomics" = yes; then
11545
11546 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11547
11548 else
11549   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11550 *** Not using atomic operations will cause poor performance." >&5
11551 $as_echo "$as_me: WARNING:
11552 *** Not using atomic operations will cause poor performance." >&2;}
11553 fi
11554
11555 if test "$with_gssapi" = yes ; then
11556   if test "$PORTNAME" != "win32"; then
11557     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11558 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11559 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11560   $as_echo_n "(cached) " >&6
11561 else
11562   ac_func_search_save_LIBS=$LIBS
11563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11564 /* end confdefs.h.  */
11565
11566 /* Override any GCC internal prototype to avoid an error.
11567    Use char because int might match the return type of a GCC
11568    builtin and then its argument prototype would still apply.  */
11569 #ifdef __cplusplus
11570 extern "C"
11571 #endif
11572 char gss_init_sec_context ();
11573 int
11574 main ()
11575 {
11576 return gss_init_sec_context ();
11577   ;
11578   return 0;
11579 }
11580 _ACEOF
11581 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11582   if test -z "$ac_lib"; then
11583     ac_res="none required"
11584   else
11585     ac_res=-l$ac_lib
11586     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11587   fi
11588   if ac_fn_c_try_link "$LINENO"; then :
11589   ac_cv_search_gss_init_sec_context=$ac_res
11590 fi
11591 rm -f core conftest.err conftest.$ac_objext \
11592     conftest$ac_exeext
11593   if ${ac_cv_search_gss_init_sec_context+:} false; then :
11594   break
11595 fi
11596 done
11597 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11598
11599 else
11600   ac_cv_search_gss_init_sec_context=no
11601 fi
11602 rm conftest.$ac_ext
11603 LIBS=$ac_func_search_save_LIBS
11604 fi
11605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11606 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11607 ac_res=$ac_cv_search_gss_init_sec_context
11608 if test "$ac_res" != no; then :
11609   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11610
11611 else
11612   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11613 fi
11614
11615   else
11616     LIBS="$LIBS -lgssapi32"
11617   fi
11618 fi
11619
11620 if test "$with_openssl" = yes ; then
11621     if test "$PORTNAME" != "win32"; then
11622      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11623 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11624 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11625   $as_echo_n "(cached) " >&6
11626 else
11627   ac_check_lib_save_LIBS=$LIBS
11628 LIBS="-lcrypto  $LIBS"
11629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11630 /* end confdefs.h.  */
11631
11632 /* Override any GCC internal prototype to avoid an error.
11633    Use char because int might match the return type of a GCC
11634    builtin and then its argument prototype would still apply.  */
11635 #ifdef __cplusplus
11636 extern "C"
11637 #endif
11638 char CRYPTO_new_ex_data ();
11639 int
11640 main ()
11641 {
11642 return CRYPTO_new_ex_data ();
11643   ;
11644   return 0;
11645 }
11646 _ACEOF
11647 if ac_fn_c_try_link "$LINENO"; then :
11648   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11649 else
11650   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11651 fi
11652 rm -f core conftest.err conftest.$ac_objext \
11653     conftest$ac_exeext conftest.$ac_ext
11654 LIBS=$ac_check_lib_save_LIBS
11655 fi
11656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11657 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11658 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11659   cat >>confdefs.h <<_ACEOF
11660 #define HAVE_LIBCRYPTO 1
11661 _ACEOF
11662
11663   LIBS="-lcrypto $LIBS"
11664
11665 else
11666   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11667 fi
11668
11669      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11670 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11671 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11672   $as_echo_n "(cached) " >&6
11673 else
11674   ac_check_lib_save_LIBS=$LIBS
11675 LIBS="-lssl  $LIBS"
11676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11677 /* end confdefs.h.  */
11678
11679 /* Override any GCC internal prototype to avoid an error.
11680    Use char because int might match the return type of a GCC
11681    builtin and then its argument prototype would still apply.  */
11682 #ifdef __cplusplus
11683 extern "C"
11684 #endif
11685 char SSL_new ();
11686 int
11687 main ()
11688 {
11689 return SSL_new ();
11690   ;
11691   return 0;
11692 }
11693 _ACEOF
11694 if ac_fn_c_try_link "$LINENO"; then :
11695   ac_cv_lib_ssl_SSL_new=yes
11696 else
11697   ac_cv_lib_ssl_SSL_new=no
11698 fi
11699 rm -f core conftest.err conftest.$ac_objext \
11700     conftest$ac_exeext conftest.$ac_ext
11701 LIBS=$ac_check_lib_save_LIBS
11702 fi
11703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
11704 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
11705 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
11706   cat >>confdefs.h <<_ACEOF
11707 #define HAVE_LIBSSL 1
11708 _ACEOF
11709
11710   LIBS="-lssl $LIBS"
11711
11712 else
11713   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
11714 fi
11715
11716   else
11717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
11718 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
11719 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11720   $as_echo_n "(cached) " >&6
11721 else
11722   ac_func_search_save_LIBS=$LIBS
11723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11724 /* end confdefs.h.  */
11725
11726 /* Override any GCC internal prototype to avoid an error.
11727    Use char because int might match the return type of a GCC
11728    builtin and then its argument prototype would still apply.  */
11729 #ifdef __cplusplus
11730 extern "C"
11731 #endif
11732 char CRYPTO_new_ex_data ();
11733 int
11734 main ()
11735 {
11736 return CRYPTO_new_ex_data ();
11737   ;
11738   return 0;
11739 }
11740 _ACEOF
11741 for ac_lib in '' eay32 crypto; do
11742   if test -z "$ac_lib"; then
11743     ac_res="none required"
11744   else
11745     ac_res=-l$ac_lib
11746     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11747   fi
11748   if ac_fn_c_try_link "$LINENO"; then :
11749   ac_cv_search_CRYPTO_new_ex_data=$ac_res
11750 fi
11751 rm -f core conftest.err conftest.$ac_objext \
11752     conftest$ac_exeext
11753   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11754   break
11755 fi
11756 done
11757 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11758
11759 else
11760   ac_cv_search_CRYPTO_new_ex_data=no
11761 fi
11762 rm conftest.$ac_ext
11763 LIBS=$ac_func_search_save_LIBS
11764 fi
11765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
11766 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
11767 ac_res=$ac_cv_search_CRYPTO_new_ex_data
11768 if test "$ac_res" != no; then :
11769   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11770
11771 else
11772   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
11773 fi
11774
11775      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
11776 $as_echo_n "checking for library containing SSL_new... " >&6; }
11777 if ${ac_cv_search_SSL_new+:} false; then :
11778   $as_echo_n "(cached) " >&6
11779 else
11780   ac_func_search_save_LIBS=$LIBS
11781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11782 /* end confdefs.h.  */
11783
11784 /* Override any GCC internal prototype to avoid an error.
11785    Use char because int might match the return type of a GCC
11786    builtin and then its argument prototype would still apply.  */
11787 #ifdef __cplusplus
11788 extern "C"
11789 #endif
11790 char SSL_new ();
11791 int
11792 main ()
11793 {
11794 return SSL_new ();
11795   ;
11796   return 0;
11797 }
11798 _ACEOF
11799 for ac_lib in '' ssleay32 ssl; do
11800   if test -z "$ac_lib"; then
11801     ac_res="none required"
11802   else
11803     ac_res=-l$ac_lib
11804     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11805   fi
11806   if ac_fn_c_try_link "$LINENO"; then :
11807   ac_cv_search_SSL_new=$ac_res
11808 fi
11809 rm -f core conftest.err conftest.$ac_objext \
11810     conftest$ac_exeext
11811   if ${ac_cv_search_SSL_new+:} false; then :
11812   break
11813 fi
11814 done
11815 if ${ac_cv_search_SSL_new+:} false; then :
11816
11817 else
11818   ac_cv_search_SSL_new=no
11819 fi
11820 rm conftest.$ac_ext
11821 LIBS=$ac_func_search_save_LIBS
11822 fi
11823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
11824 $as_echo "$ac_cv_search_SSL_new" >&6; }
11825 ac_res=$ac_cv_search_SSL_new
11826 if test "$ac_res" != no; then :
11827   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11828
11829 else
11830   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
11831 fi
11832
11833   fi
11834   for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
11835 do :
11836   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11837 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11838 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11839   cat >>confdefs.h <<_ACEOF
11840 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11841 _ACEOF
11842
11843 fi
11844 done
11845
11846   # Functions introduced in OpenSSL 1.1.0. We used to check for
11847   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
11848   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
11849   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
11850   # functions.
11851   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
11852 do :
11853   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11854 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11855 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11856   cat >>confdefs.h <<_ACEOF
11857 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11858 _ACEOF
11859
11860 fi
11861 done
11862
11863   # OpenSSL versions before 1.1.0 required setting callback functions, for
11864   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
11865   # function was removed.
11866   for ac_func in CRYPTO_lock
11867 do :
11868   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
11869 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
11870   cat >>confdefs.h <<_ACEOF
11871 #define HAVE_CRYPTO_LOCK 1
11872 _ACEOF
11873
11874 fi
11875 done
11876
11877 fi
11878
11879 if test "$with_pam" = yes ; then
11880   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
11881 $as_echo_n "checking for pam_start in -lpam... " >&6; }
11882 if ${ac_cv_lib_pam_pam_start+:} false; then :
11883   $as_echo_n "(cached) " >&6
11884 else
11885   ac_check_lib_save_LIBS=$LIBS
11886 LIBS="-lpam  $LIBS"
11887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11888 /* end confdefs.h.  */
11889
11890 /* Override any GCC internal prototype to avoid an error.
11891    Use char because int might match the return type of a GCC
11892    builtin and then its argument prototype would still apply.  */
11893 #ifdef __cplusplus
11894 extern "C"
11895 #endif
11896 char pam_start ();
11897 int
11898 main ()
11899 {
11900 return pam_start ();
11901   ;
11902   return 0;
11903 }
11904 _ACEOF
11905 if ac_fn_c_try_link "$LINENO"; then :
11906   ac_cv_lib_pam_pam_start=yes
11907 else
11908   ac_cv_lib_pam_pam_start=no
11909 fi
11910 rm -f core conftest.err conftest.$ac_objext \
11911     conftest$ac_exeext conftest.$ac_ext
11912 LIBS=$ac_check_lib_save_LIBS
11913 fi
11914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
11915 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
11916 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
11917   cat >>confdefs.h <<_ACEOF
11918 #define HAVE_LIBPAM 1
11919 _ACEOF
11920
11921   LIBS="-lpam $LIBS"
11922
11923 else
11924   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
11925 fi
11926
11927 fi
11928
11929 if test "$with_libxml" = yes ; then
11930   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
11931 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
11932 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
11933   $as_echo_n "(cached) " >&6
11934 else
11935   ac_check_lib_save_LIBS=$LIBS
11936 LIBS="-lxml2  $LIBS"
11937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11938 /* end confdefs.h.  */
11939
11940 /* Override any GCC internal prototype to avoid an error.
11941    Use char because int might match the return type of a GCC
11942    builtin and then its argument prototype would still apply.  */
11943 #ifdef __cplusplus
11944 extern "C"
11945 #endif
11946 char xmlSaveToBuffer ();
11947 int
11948 main ()
11949 {
11950 return xmlSaveToBuffer ();
11951   ;
11952   return 0;
11953 }
11954 _ACEOF
11955 if ac_fn_c_try_link "$LINENO"; then :
11956   ac_cv_lib_xml2_xmlSaveToBuffer=yes
11957 else
11958   ac_cv_lib_xml2_xmlSaveToBuffer=no
11959 fi
11960 rm -f core conftest.err conftest.$ac_objext \
11961     conftest$ac_exeext conftest.$ac_ext
11962 LIBS=$ac_check_lib_save_LIBS
11963 fi
11964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
11965 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
11966 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
11967   cat >>confdefs.h <<_ACEOF
11968 #define HAVE_LIBXML2 1
11969 _ACEOF
11970
11971   LIBS="-lxml2 $LIBS"
11972
11973 else
11974   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
11975 fi
11976
11977 fi
11978
11979 if test "$with_libxslt" = yes ; then
11980   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
11981 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
11982 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
11983   $as_echo_n "(cached) " >&6
11984 else
11985   ac_check_lib_save_LIBS=$LIBS
11986 LIBS="-lxslt  $LIBS"
11987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11988 /* end confdefs.h.  */
11989
11990 /* Override any GCC internal prototype to avoid an error.
11991    Use char because int might match the return type of a GCC
11992    builtin and then its argument prototype would still apply.  */
11993 #ifdef __cplusplus
11994 extern "C"
11995 #endif
11996 char xsltCleanupGlobals ();
11997 int
11998 main ()
11999 {
12000 return xsltCleanupGlobals ();
12001   ;
12002   return 0;
12003 }
12004 _ACEOF
12005 if ac_fn_c_try_link "$LINENO"; then :
12006   ac_cv_lib_xslt_xsltCleanupGlobals=yes
12007 else
12008   ac_cv_lib_xslt_xsltCleanupGlobals=no
12009 fi
12010 rm -f core conftest.err conftest.$ac_objext \
12011     conftest$ac_exeext conftest.$ac_ext
12012 LIBS=$ac_check_lib_save_LIBS
12013 fi
12014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12015 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12016 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12017   cat >>confdefs.h <<_ACEOF
12018 #define HAVE_LIBXSLT 1
12019 _ACEOF
12020
12021   LIBS="-lxslt $LIBS"
12022
12023 else
12024   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12025 fi
12026
12027 fi
12028
12029 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12030 if test "$with_ldap" = yes ; then
12031   _LIBS="$LIBS"
12032   if test "$PORTNAME" != "win32"; then
12033     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12034 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12035 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12036   $as_echo_n "(cached) " >&6
12037 else
12038   ac_check_lib_save_LIBS=$LIBS
12039 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12041 /* end confdefs.h.  */
12042
12043 /* Override any GCC internal prototype to avoid an error.
12044    Use char because int might match the return type of a GCC
12045    builtin and then its argument prototype would still apply.  */
12046 #ifdef __cplusplus
12047 extern "C"
12048 #endif
12049 char ldap_bind ();
12050 int
12051 main ()
12052 {
12053 return ldap_bind ();
12054   ;
12055   return 0;
12056 }
12057 _ACEOF
12058 if ac_fn_c_try_link "$LINENO"; then :
12059   ac_cv_lib_ldap_ldap_bind=yes
12060 else
12061   ac_cv_lib_ldap_ldap_bind=no
12062 fi
12063 rm -f core conftest.err conftest.$ac_objext \
12064     conftest$ac_exeext conftest.$ac_ext
12065 LIBS=$ac_check_lib_save_LIBS
12066 fi
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12068 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12069 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12070   cat >>confdefs.h <<_ACEOF
12071 #define HAVE_LIBLDAP 1
12072 _ACEOF
12073
12074   LIBS="-lldap $LIBS"
12075
12076 else
12077   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12078 fi
12079
12080     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12081     if test "$enable_thread_safety" = yes; then
12082       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12083       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12084 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12085 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12086   $as_echo_n "(cached) " >&6
12087 else
12088   ac_check_lib_save_LIBS=$LIBS
12089 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12091 /* end confdefs.h.  */
12092
12093 /* Override any GCC internal prototype to avoid an error.
12094    Use char because int might match the return type of a GCC
12095    builtin and then its argument prototype would still apply.  */
12096 #ifdef __cplusplus
12097 extern "C"
12098 #endif
12099 char ldap_simple_bind ();
12100 int
12101 main ()
12102 {
12103 return ldap_simple_bind ();
12104   ;
12105   return 0;
12106 }
12107 _ACEOF
12108 if ac_fn_c_try_link "$LINENO"; then :
12109   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12110 else
12111   ac_cv_lib_ldap_r_ldap_simple_bind=no
12112 fi
12113 rm -f core conftest.err conftest.$ac_objext \
12114     conftest$ac_exeext conftest.$ac_ext
12115 LIBS=$ac_check_lib_save_LIBS
12116 fi
12117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12118 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12119 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12120   cat >>confdefs.h <<_ACEOF
12121 #define HAVE_LIBLDAP_R 1
12122 _ACEOF
12123
12124   LIBS="-lldap_r $LIBS"
12125
12126 else
12127   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12128 fi
12129
12130       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12131     else
12132       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12133     fi
12134     for ac_func in ldap_initialize
12135 do :
12136   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12137 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12138   cat >>confdefs.h <<_ACEOF
12139 #define HAVE_LDAP_INITIALIZE 1
12140 _ACEOF
12141
12142 fi
12143 done
12144
12145   else
12146     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12147 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12148 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12149   $as_echo_n "(cached) " >&6
12150 else
12151   ac_check_lib_save_LIBS=$LIBS
12152 LIBS="-lwldap32  $LIBS"
12153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12154 /* end confdefs.h.  */
12155
12156 /* Override any GCC internal prototype to avoid an error.
12157    Use char because int might match the return type of a GCC
12158    builtin and then its argument prototype would still apply.  */
12159 #ifdef __cplusplus
12160 extern "C"
12161 #endif
12162 char ldap_bind ();
12163 int
12164 main ()
12165 {
12166 return ldap_bind ();
12167   ;
12168   return 0;
12169 }
12170 _ACEOF
12171 if ac_fn_c_try_link "$LINENO"; then :
12172   ac_cv_lib_wldap32_ldap_bind=yes
12173 else
12174   ac_cv_lib_wldap32_ldap_bind=no
12175 fi
12176 rm -f core conftest.err conftest.$ac_objext \
12177     conftest$ac_exeext conftest.$ac_ext
12178 LIBS=$ac_check_lib_save_LIBS
12179 fi
12180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12181 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12182 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12183   cat >>confdefs.h <<_ACEOF
12184 #define HAVE_LIBWLDAP32 1
12185 _ACEOF
12186
12187   LIBS="-lwldap32 $LIBS"
12188
12189 else
12190   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12191 fi
12192
12193     LDAP_LIBS_FE="-lwldap32"
12194     LDAP_LIBS_BE="-lwldap32"
12195   fi
12196   LIBS="$_LIBS"
12197 fi
12198
12199
12200
12201 # for contrib/sepgsql
12202 if test "$with_selinux" = yes; then
12203   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12204 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12205 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12206   $as_echo_n "(cached) " >&6
12207 else
12208   ac_check_lib_save_LIBS=$LIBS
12209 LIBS="-lselinux  $LIBS"
12210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12211 /* end confdefs.h.  */
12212
12213 /* Override any GCC internal prototype to avoid an error.
12214    Use char because int might match the return type of a GCC
12215    builtin and then its argument prototype would still apply.  */
12216 #ifdef __cplusplus
12217 extern "C"
12218 #endif
12219 char security_compute_create_name ();
12220 int
12221 main ()
12222 {
12223 return security_compute_create_name ();
12224   ;
12225   return 0;
12226 }
12227 _ACEOF
12228 if ac_fn_c_try_link "$LINENO"; then :
12229   ac_cv_lib_selinux_security_compute_create_name=yes
12230 else
12231   ac_cv_lib_selinux_security_compute_create_name=no
12232 fi
12233 rm -f core conftest.err conftest.$ac_objext \
12234     conftest$ac_exeext conftest.$ac_ext
12235 LIBS=$ac_check_lib_save_LIBS
12236 fi
12237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12238 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12239 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12240   cat >>confdefs.h <<_ACEOF
12241 #define HAVE_LIBSELINUX 1
12242 _ACEOF
12243
12244   LIBS="-lselinux $LIBS"
12245
12246 else
12247   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12248 fi
12249
12250 fi
12251
12252 # for contrib/uuid-ossp
12253 if test "$with_uuid" = bsd ; then
12254   # On BSD, the UUID functions are in libc
12255   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12256 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12257   UUID_LIBS=""
12258 else
12259   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12260 fi
12261
12262 elif test "$with_uuid" = e2fs ; then
12263   # On macOS, the UUID functions are in libc
12264   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12265 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12266   UUID_LIBS=""
12267 else
12268   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12269 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12270 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12271   $as_echo_n "(cached) " >&6
12272 else
12273   ac_check_lib_save_LIBS=$LIBS
12274 LIBS="-luuid  $LIBS"
12275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12276 /* end confdefs.h.  */
12277
12278 /* Override any GCC internal prototype to avoid an error.
12279    Use char because int might match the return type of a GCC
12280    builtin and then its argument prototype would still apply.  */
12281 #ifdef __cplusplus
12282 extern "C"
12283 #endif
12284 char uuid_generate ();
12285 int
12286 main ()
12287 {
12288 return uuid_generate ();
12289   ;
12290   return 0;
12291 }
12292 _ACEOF
12293 if ac_fn_c_try_link "$LINENO"; then :
12294   ac_cv_lib_uuid_uuid_generate=yes
12295 else
12296   ac_cv_lib_uuid_uuid_generate=no
12297 fi
12298 rm -f core conftest.err conftest.$ac_objext \
12299     conftest$ac_exeext conftest.$ac_ext
12300 LIBS=$ac_check_lib_save_LIBS
12301 fi
12302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12303 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12304 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12305   UUID_LIBS="-luuid"
12306 else
12307   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12308 fi
12309
12310 fi
12311
12312 elif test "$with_uuid" = ossp ; then
12313   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12314 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12315 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12316   $as_echo_n "(cached) " >&6
12317 else
12318   ac_check_lib_save_LIBS=$LIBS
12319 LIBS="-lossp-uuid  $LIBS"
12320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12321 /* end confdefs.h.  */
12322
12323 /* Override any GCC internal prototype to avoid an error.
12324    Use char because int might match the return type of a GCC
12325    builtin and then its argument prototype would still apply.  */
12326 #ifdef __cplusplus
12327 extern "C"
12328 #endif
12329 char uuid_export ();
12330 int
12331 main ()
12332 {
12333 return uuid_export ();
12334   ;
12335   return 0;
12336 }
12337 _ACEOF
12338 if ac_fn_c_try_link "$LINENO"; then :
12339   ac_cv_lib_ossp_uuid_uuid_export=yes
12340 else
12341   ac_cv_lib_ossp_uuid_uuid_export=no
12342 fi
12343 rm -f core conftest.err conftest.$ac_objext \
12344     conftest$ac_exeext conftest.$ac_ext
12345 LIBS=$ac_check_lib_save_LIBS
12346 fi
12347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12348 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12349 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12350   UUID_LIBS="-lossp-uuid"
12351 else
12352   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12353 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12354 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12355   $as_echo_n "(cached) " >&6
12356 else
12357   ac_check_lib_save_LIBS=$LIBS
12358 LIBS="-luuid  $LIBS"
12359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12360 /* end confdefs.h.  */
12361
12362 /* Override any GCC internal prototype to avoid an error.
12363    Use char because int might match the return type of a GCC
12364    builtin and then its argument prototype would still apply.  */
12365 #ifdef __cplusplus
12366 extern "C"
12367 #endif
12368 char uuid_export ();
12369 int
12370 main ()
12371 {
12372 return uuid_export ();
12373   ;
12374   return 0;
12375 }
12376 _ACEOF
12377 if ac_fn_c_try_link "$LINENO"; then :
12378   ac_cv_lib_uuid_uuid_export=yes
12379 else
12380   ac_cv_lib_uuid_uuid_export=no
12381 fi
12382 rm -f core conftest.err conftest.$ac_objext \
12383     conftest$ac_exeext conftest.$ac_ext
12384 LIBS=$ac_check_lib_save_LIBS
12385 fi
12386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12387 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12388 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12389   UUID_LIBS="-luuid"
12390 else
12391   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12392 fi
12393
12394 fi
12395
12396 fi
12397
12398
12399
12400 ##
12401 ## Header files
12402 ##
12403
12404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12405 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12406 if ${ac_cv_header_stdbool_h+:} false; then :
12407   $as_echo_n "(cached) " >&6
12408 else
12409   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12410 /* end confdefs.h.  */
12411
12412              #include <stdbool.h>
12413              #ifndef bool
12414               "error: bool is not defined"
12415              #endif
12416              #ifndef false
12417               "error: false is not defined"
12418              #endif
12419              #if false
12420               "error: false is not 0"
12421              #endif
12422              #ifndef true
12423               "error: true is not defined"
12424              #endif
12425              #if true != 1
12426               "error: true is not 1"
12427              #endif
12428              #ifndef __bool_true_false_are_defined
12429               "error: __bool_true_false_are_defined is not defined"
12430              #endif
12431
12432              struct s { _Bool s: 1; _Bool t; } s;
12433
12434              char a[true == 1 ? 1 : -1];
12435              char b[false == 0 ? 1 : -1];
12436              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12437              char d[(bool) 0.5 == true ? 1 : -1];
12438              /* See body of main program for 'e'.  */
12439              char f[(_Bool) 0.0 == false ? 1 : -1];
12440              char g[true];
12441              char h[sizeof (_Bool)];
12442              char i[sizeof s.t];
12443              enum { j = false, k = true, l = false * true, m = true * 256 };
12444              /* The following fails for
12445                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12446              _Bool n[m];
12447              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12448              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12449              /* Catch a bug in an HP-UX C compiler.  See
12450                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12451                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12452               */
12453              _Bool q = true;
12454              _Bool *pq = &q;
12455
12456 int
12457 main ()
12458 {
12459
12460              bool e = &s;
12461              *pq |= q;
12462              *pq |= ! q;
12463              /* Refer to every declared value, to avoid compiler optimizations.  */
12464              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12465                      + !m + !n + !o + !p + !q + !pq);
12466
12467   ;
12468   return 0;
12469 }
12470 _ACEOF
12471 if ac_fn_c_try_compile "$LINENO"; then :
12472   ac_cv_header_stdbool_h=yes
12473 else
12474   ac_cv_header_stdbool_h=no
12475 fi
12476 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12477 fi
12478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12479 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12480    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12481 if test "x$ac_cv_type__Bool" = xyes; then :
12482
12483 cat >>confdefs.h <<_ACEOF
12484 #define HAVE__BOOL 1
12485 _ACEOF
12486
12487
12488 fi
12489
12490
12491 if test $ac_cv_header_stdbool_h = yes; then
12492
12493 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12494
12495 fi
12496
12497
12498 for ac_header in atomic.h crypt.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
12499 do :
12500   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12501 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12502 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12503   cat >>confdefs.h <<_ACEOF
12504 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12505 _ACEOF
12506
12507 fi
12508
12509 done
12510
12511
12512 # On BSD, test for net/if.h will fail unless sys/socket.h
12513 # is included first.
12514 for ac_header in net/if.h
12515 do :
12516   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12517 #include <sys/socket.h>
12518
12519 "
12520 if test "x$ac_cv_header_net_if_h" = xyes; then :
12521   cat >>confdefs.h <<_ACEOF
12522 #define HAVE_NET_IF_H 1
12523 _ACEOF
12524
12525 fi
12526
12527 done
12528
12529
12530 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12531 # is included first.
12532 for ac_header in sys/ucred.h
12533 do :
12534   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12535 #include <sys/param.h>
12536
12537 "
12538 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12539   cat >>confdefs.h <<_ACEOF
12540 #define HAVE_SYS_UCRED_H 1
12541 _ACEOF
12542
12543 fi
12544
12545 done
12546
12547
12548 # At least on IRIX, test for netinet/tcp.h will fail unless
12549 # netinet/in.h is included first.
12550 for ac_header in netinet/tcp.h
12551 do :
12552   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12553 #include <netinet/in.h>
12554
12555 "
12556 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12557   cat >>confdefs.h <<_ACEOF
12558 #define HAVE_NETINET_TCP_H 1
12559 _ACEOF
12560
12561 fi
12562
12563 done
12564
12565
12566 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12567   for ac_header in readline/readline.h
12568 do :
12569   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12570 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12571   cat >>confdefs.h <<_ACEOF
12572 #define HAVE_READLINE_READLINE_H 1
12573 _ACEOF
12574
12575 else
12576   for ac_header in readline.h
12577 do :
12578   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12579 if test "x$ac_cv_header_readline_h" = xyes; then :
12580   cat >>confdefs.h <<_ACEOF
12581 #define HAVE_READLINE_H 1
12582 _ACEOF
12583
12584 else
12585   as_fn_error $? "readline header not found
12586 If you have readline already installed, see config.log for details on the
12587 failure.  It is possible the compiler isn't looking in the proper directory.
12588 Use --without-readline to disable readline support." "$LINENO" 5
12589 fi
12590
12591 done
12592
12593 fi
12594
12595 done
12596
12597   for ac_header in readline/history.h
12598 do :
12599   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12600 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12601   cat >>confdefs.h <<_ACEOF
12602 #define HAVE_READLINE_HISTORY_H 1
12603 _ACEOF
12604
12605 else
12606   for ac_header in history.h
12607 do :
12608   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12609 if test "x$ac_cv_header_history_h" = xyes; then :
12610   cat >>confdefs.h <<_ACEOF
12611 #define HAVE_HISTORY_H 1
12612 _ACEOF
12613
12614 else
12615   as_fn_error $? "history header not found
12616 If you have readline 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 readline support." "$LINENO" 5
12619 fi
12620
12621 done
12622
12623 fi
12624
12625 done
12626
12627 fi
12628
12629 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12630 # Some installations of libedit usurp /usr/include/readline/, which seems
12631 # bad practice, since in combined installations readline will have its headers
12632 # there.  We might have to resort to AC_EGREP checks to make sure we found
12633 # the proper header...
12634   for ac_header in editline/readline.h
12635 do :
12636   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12637 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12638   cat >>confdefs.h <<_ACEOF
12639 #define HAVE_EDITLINE_READLINE_H 1
12640 _ACEOF
12641
12642 else
12643   for ac_header in readline.h
12644 do :
12645   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12646 if test "x$ac_cv_header_readline_h" = xyes; then :
12647   cat >>confdefs.h <<_ACEOF
12648 #define HAVE_READLINE_H 1
12649 _ACEOF
12650
12651 else
12652   for ac_header in readline/readline.h
12653 do :
12654   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12655 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12656   cat >>confdefs.h <<_ACEOF
12657 #define HAVE_READLINE_READLINE_H 1
12658 _ACEOF
12659
12660 else
12661   as_fn_error $? "readline header not found
12662 If you have libedit already installed, see config.log for details on the
12663 failure.  It is possible the compiler isn't looking in the proper directory.
12664 Use --without-readline to disable libedit support." "$LINENO" 5
12665 fi
12666
12667 done
12668
12669 fi
12670
12671 done
12672
12673 fi
12674
12675 done
12676
12677 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12678 # not be there at all.  Hence, don't complain if not found.  We must check
12679 # though, since in yet other versions it is an independent header.
12680   for ac_header in editline/history.h
12681 do :
12682   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12683 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12684   cat >>confdefs.h <<_ACEOF
12685 #define HAVE_EDITLINE_HISTORY_H 1
12686 _ACEOF
12687
12688 else
12689   for ac_header in history.h
12690 do :
12691   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12692 if test "x$ac_cv_header_history_h" = xyes; then :
12693   cat >>confdefs.h <<_ACEOF
12694 #define HAVE_HISTORY_H 1
12695 _ACEOF
12696
12697 else
12698   for ac_header in readline/history.h
12699 do :
12700   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12701 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12702   cat >>confdefs.h <<_ACEOF
12703 #define HAVE_READLINE_HISTORY_H 1
12704 _ACEOF
12705
12706 fi
12707
12708 done
12709
12710 fi
12711
12712 done
12713
12714 fi
12715
12716 done
12717
12718 fi
12719
12720 if test "$with_zlib" = yes; then
12721   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
12722 if test "x$ac_cv_header_zlib_h" = xyes; then :
12723
12724 else
12725   as_fn_error $? "zlib header not found
12726 If you have zlib already installed, see config.log for details on the
12727 failure.  It is possible the compiler isn't looking in the proper directory.
12728 Use --without-zlib to disable zlib support." "$LINENO" 5
12729 fi
12730
12731
12732 fi
12733
12734 if test "$with_gssapi" = yes ; then
12735   for ac_header in gssapi/gssapi.h
12736 do :
12737   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
12738 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
12739   cat >>confdefs.h <<_ACEOF
12740 #define HAVE_GSSAPI_GSSAPI_H 1
12741 _ACEOF
12742
12743 else
12744   for ac_header in gssapi.h
12745 do :
12746   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
12747 if test "x$ac_cv_header_gssapi_h" = xyes; then :
12748   cat >>confdefs.h <<_ACEOF
12749 #define HAVE_GSSAPI_H 1
12750 _ACEOF
12751
12752 else
12753   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
12754 fi
12755
12756 done
12757
12758 fi
12759
12760 done
12761
12762 fi
12763
12764 if test "$with_openssl" = yes ; then
12765   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
12766 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
12767
12768 else
12769   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
12770 fi
12771
12772
12773   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
12774 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
12775
12776 else
12777   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
12778 fi
12779
12780
12781 fi
12782
12783 if test "$with_pam" = yes ; then
12784   for ac_header in security/pam_appl.h
12785 do :
12786   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
12787 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
12788   cat >>confdefs.h <<_ACEOF
12789 #define HAVE_SECURITY_PAM_APPL_H 1
12790 _ACEOF
12791
12792 else
12793   for ac_header in pam/pam_appl.h
12794 do :
12795   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
12796 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
12797   cat >>confdefs.h <<_ACEOF
12798 #define HAVE_PAM_PAM_APPL_H 1
12799 _ACEOF
12800
12801 else
12802   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
12803 fi
12804
12805 done
12806
12807 fi
12808
12809 done
12810
12811 fi
12812
12813 if test "$with_bsd_auth" = yes ; then
12814   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
12815 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
12816
12817 else
12818   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
12819 fi
12820
12821
12822 fi
12823
12824 if test "$with_systemd" = yes ; then
12825   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
12826 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
12827
12828 else
12829   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
12830 fi
12831
12832
12833 fi
12834
12835 if test "$with_libxml" = yes ; then
12836   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
12837 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
12838
12839 else
12840   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
12841 fi
12842
12843
12844 fi
12845
12846 if test "$with_libxslt" = yes ; then
12847   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
12848 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
12849
12850 else
12851   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
12852 fi
12853
12854
12855 fi
12856
12857 if test "$with_ldap" = yes ; then
12858   if test "$PORTNAME" != "win32"; then
12859      for ac_header in ldap.h
12860 do :
12861   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
12862 if test "x$ac_cv_header_ldap_h" = xyes; then :
12863   cat >>confdefs.h <<_ACEOF
12864 #define HAVE_LDAP_H 1
12865 _ACEOF
12866
12867 else
12868   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
12869 fi
12870
12871 done
12872
12873      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
12874 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
12875 if ${pgac_cv_ldap_safe+:} false; then :
12876   $as_echo_n "(cached) " >&6
12877 else
12878   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12879 /* end confdefs.h.  */
12880 #include <ldap.h>
12881 #if !defined(LDAP_VENDOR_VERSION) || \
12882      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
12883       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
12884 choke me
12885 #endif
12886 int
12887 main ()
12888 {
12889
12890   ;
12891   return 0;
12892 }
12893 _ACEOF
12894 if ac_fn_c_try_compile "$LINENO"; then :
12895   pgac_cv_ldap_safe=yes
12896 else
12897   pgac_cv_ldap_safe=no
12898 fi
12899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12900 fi
12901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
12902 $as_echo "$pgac_cv_ldap_safe" >&6; }
12903
12904 if test "$pgac_cv_ldap_safe" != yes; then
12905   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12906 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
12907 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
12908 *** also uses LDAP will crash on exit." >&5
12909 $as_echo "$as_me: WARNING:
12910 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
12911 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
12912 *** also uses LDAP will crash on exit." >&2;}
12913 fi
12914   else
12915      for ac_header in winldap.h
12916 do :
12917   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
12918 #include <windows.h>
12919
12920 "
12921 if test "x$ac_cv_header_winldap_h" = xyes; then :
12922   cat >>confdefs.h <<_ACEOF
12923 #define HAVE_WINLDAP_H 1
12924 _ACEOF
12925
12926 else
12927   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
12928 fi
12929
12930 done
12931
12932   fi
12933 fi
12934
12935 if test "$with_bonjour" = yes ; then
12936   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
12937 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
12938
12939 else
12940   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
12941 fi
12942
12943
12944 fi
12945
12946 # for contrib/uuid-ossp
12947 if test "$with_uuid" = bsd ; then
12948   for ac_header in uuid.h
12949 do :
12950   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
12951 if test "x$ac_cv_header_uuid_h" = xyes; then :
12952   cat >>confdefs.h <<_ACEOF
12953 #define HAVE_UUID_H 1
12954 _ACEOF
12955  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12956 /* end confdefs.h.  */
12957 #include <uuid.h>
12958
12959 _ACEOF
12960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12961   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
12962
12963 else
12964   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
12965 fi
12966 rm -f conftest*
12967
12968 else
12969   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
12970 fi
12971
12972 done
12973
12974 elif test "$with_uuid" = e2fs ; then
12975   for ac_header in uuid/uuid.h
12976 do :
12977   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
12978 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
12979   cat >>confdefs.h <<_ACEOF
12980 #define HAVE_UUID_UUID_H 1
12981 _ACEOF
12982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12983 /* end confdefs.h.  */
12984 #include <uuid/uuid.h>
12985
12986 _ACEOF
12987 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12988   $EGREP "uuid_generate" >/dev/null 2>&1; then :
12989
12990 else
12991   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
12992 fi
12993 rm -f conftest*
12994
12995 else
12996   for ac_header in uuid.h
12997 do :
12998   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
12999 if test "x$ac_cv_header_uuid_h" = xyes; then :
13000   cat >>confdefs.h <<_ACEOF
13001 #define HAVE_UUID_H 1
13002 _ACEOF
13003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13004 /* end confdefs.h.  */
13005 #include <uuid.h>
13006
13007 _ACEOF
13008 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13009   $EGREP "uuid_generate" >/dev/null 2>&1; then :
13010
13011 else
13012   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13013 fi
13014 rm -f conftest*
13015
13016 else
13017   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13018 fi
13019
13020 done
13021
13022 fi
13023
13024 done
13025
13026 elif test "$with_uuid" = ossp ; then
13027   for ac_header in ossp/uuid.h
13028 do :
13029   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13030 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13031   cat >>confdefs.h <<_ACEOF
13032 #define HAVE_OSSP_UUID_H 1
13033 _ACEOF
13034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13035 /* end confdefs.h.  */
13036 #include <ossp/uuid.h>
13037
13038 _ACEOF
13039 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13040   $EGREP "uuid_export" >/dev/null 2>&1; then :
13041
13042 else
13043   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13044 fi
13045 rm -f conftest*
13046
13047 else
13048   for ac_header in uuid.h
13049 do :
13050   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13051 if test "x$ac_cv_header_uuid_h" = xyes; then :
13052   cat >>confdefs.h <<_ACEOF
13053 #define HAVE_UUID_H 1
13054 _ACEOF
13055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13056 /* end confdefs.h.  */
13057 #include <uuid.h>
13058
13059 _ACEOF
13060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13061   $EGREP "uuid_export" >/dev/null 2>&1; then :
13062
13063 else
13064   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13065 fi
13066 rm -f conftest*
13067
13068 else
13069   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13070 fi
13071
13072 done
13073
13074 fi
13075
13076 done
13077
13078 fi
13079
13080 if test "$PORTNAME" = "win32" ; then
13081    for ac_header in crtdefs.h
13082 do :
13083   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13084 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13085   cat >>confdefs.h <<_ACEOF
13086 #define HAVE_CRTDEFS_H 1
13087 _ACEOF
13088
13089 fi
13090
13091 done
13092
13093 fi
13094
13095 ##
13096 ## Types, structures, compiler characteristics
13097 ##
13098
13099   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13100 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13101 if ${ac_cv_c_bigendian+:} false; then :
13102   $as_echo_n "(cached) " >&6
13103 else
13104   ac_cv_c_bigendian=unknown
13105     # See if we're dealing with a universal compiler.
13106     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13107 /* end confdefs.h.  */
13108 #ifndef __APPLE_CC__
13109                not a universal capable compiler
13110              #endif
13111              typedef int dummy;
13112
13113 _ACEOF
13114 if ac_fn_c_try_compile "$LINENO"; then :
13115
13116         # Check for potential -arch flags.  It is not universal unless
13117         # there are at least two -arch flags with different values.
13118         ac_arch=
13119         ac_prev=
13120         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13121          if test -n "$ac_prev"; then
13122            case $ac_word in
13123              i?86 | x86_64 | ppc | ppc64)
13124                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13125                  ac_arch=$ac_word
13126                else
13127                  ac_cv_c_bigendian=universal
13128                  break
13129                fi
13130                ;;
13131            esac
13132            ac_prev=
13133          elif test "x$ac_word" = "x-arch"; then
13134            ac_prev=arch
13135          fi
13136        done
13137 fi
13138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13139     if test $ac_cv_c_bigendian = unknown; then
13140       # See if sys/param.h defines the BYTE_ORDER macro.
13141       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13142 /* end confdefs.h.  */
13143 #include <sys/types.h>
13144              #include <sys/param.h>
13145
13146 int
13147 main ()
13148 {
13149 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13150                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13151                      && LITTLE_ENDIAN)
13152               bogus endian macros
13153              #endif
13154
13155   ;
13156   return 0;
13157 }
13158 _ACEOF
13159 if ac_fn_c_try_compile "$LINENO"; then :
13160   # It does; now see whether it defined to BIG_ENDIAN or not.
13161          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13162 /* end confdefs.h.  */
13163 #include <sys/types.h>
13164                 #include <sys/param.h>
13165
13166 int
13167 main ()
13168 {
13169 #if BYTE_ORDER != BIG_ENDIAN
13170                  not big endian
13171                 #endif
13172
13173   ;
13174   return 0;
13175 }
13176 _ACEOF
13177 if ac_fn_c_try_compile "$LINENO"; then :
13178   ac_cv_c_bigendian=yes
13179 else
13180   ac_cv_c_bigendian=no
13181 fi
13182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13183 fi
13184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13185     fi
13186     if test $ac_cv_c_bigendian = unknown; then
13187       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13188       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13189 /* end confdefs.h.  */
13190 #include <limits.h>
13191
13192 int
13193 main ()
13194 {
13195 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13196               bogus endian macros
13197              #endif
13198
13199   ;
13200   return 0;
13201 }
13202 _ACEOF
13203 if ac_fn_c_try_compile "$LINENO"; then :
13204   # It does; now see whether it defined to _BIG_ENDIAN or not.
13205          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13206 /* end confdefs.h.  */
13207 #include <limits.h>
13208
13209 int
13210 main ()
13211 {
13212 #ifndef _BIG_ENDIAN
13213                  not big endian
13214                 #endif
13215
13216   ;
13217   return 0;
13218 }
13219 _ACEOF
13220 if ac_fn_c_try_compile "$LINENO"; then :
13221   ac_cv_c_bigendian=yes
13222 else
13223   ac_cv_c_bigendian=no
13224 fi
13225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13226 fi
13227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13228     fi
13229     if test $ac_cv_c_bigendian = unknown; then
13230       # Compile a test program.
13231       if test "$cross_compiling" = yes; then :
13232   # Try to guess by grepping values from an object file.
13233          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13234 /* end confdefs.h.  */
13235 short int ascii_mm[] =
13236                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13237                 short int ascii_ii[] =
13238                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13239                 int use_ascii (int i) {
13240                   return ascii_mm[i] + ascii_ii[i];
13241                 }
13242                 short int ebcdic_ii[] =
13243                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13244                 short int ebcdic_mm[] =
13245                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13246                 int use_ebcdic (int i) {
13247                   return ebcdic_mm[i] + ebcdic_ii[i];
13248                 }
13249                 extern int foo;
13250
13251 int
13252 main ()
13253 {
13254 return use_ascii (foo) == use_ebcdic (foo);
13255   ;
13256   return 0;
13257 }
13258 _ACEOF
13259 if ac_fn_c_try_compile "$LINENO"; then :
13260   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13261               ac_cv_c_bigendian=yes
13262             fi
13263             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13264               if test "$ac_cv_c_bigendian" = unknown; then
13265                 ac_cv_c_bigendian=no
13266               else
13267                 # finding both strings is unlikely to happen, but who knows?
13268                 ac_cv_c_bigendian=unknown
13269               fi
13270             fi
13271 fi
13272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13273 else
13274   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13275 /* end confdefs.h.  */
13276 $ac_includes_default
13277 int
13278 main ()
13279 {
13280
13281              /* Are we little or big endian?  From Harbison&Steele.  */
13282              union
13283              {
13284                long int l;
13285                char c[sizeof (long int)];
13286              } u;
13287              u.l = 1;
13288              return u.c[sizeof (long int) - 1] == 1;
13289
13290   ;
13291   return 0;
13292 }
13293 _ACEOF
13294 if ac_fn_c_try_run "$LINENO"; then :
13295   ac_cv_c_bigendian=no
13296 else
13297   ac_cv_c_bigendian=yes
13298 fi
13299 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13300   conftest.$ac_objext conftest.beam conftest.$ac_ext
13301 fi
13302
13303     fi
13304 fi
13305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13306 $as_echo "$ac_cv_c_bigendian" >&6; }
13307  case $ac_cv_c_bigendian in #(
13308    yes)
13309      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13310 ;; #(
13311    no)
13312       ;; #(
13313    universal)
13314
13315 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13316
13317      ;; #(
13318    *)
13319      as_fn_error $? "unknown endianness
13320  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13321  esac
13322
13323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13324 $as_echo_n "checking for inline... " >&6; }
13325 if ${ac_cv_c_inline+:} false; then :
13326   $as_echo_n "(cached) " >&6
13327 else
13328   ac_cv_c_inline=no
13329 for ac_kw in inline __inline__ __inline; do
13330   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13331 /* end confdefs.h.  */
13332 #ifndef __cplusplus
13333 typedef int foo_t;
13334 static $ac_kw foo_t static_foo () {return 0; }
13335 $ac_kw foo_t foo () {return 0; }
13336 #endif
13337
13338 _ACEOF
13339 if ac_fn_c_try_compile "$LINENO"; then :
13340   ac_cv_c_inline=$ac_kw
13341 fi
13342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13343   test "$ac_cv_c_inline" != no && break
13344 done
13345
13346 fi
13347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13348 $as_echo "$ac_cv_c_inline" >&6; }
13349
13350 case $ac_cv_c_inline in
13351   inline | yes) ;;
13352   *)
13353     case $ac_cv_c_inline in
13354       no) ac_val=;;
13355       *) ac_val=$ac_cv_c_inline;;
13356     esac
13357     cat >>confdefs.h <<_ACEOF
13358 #ifndef __cplusplus
13359 #define inline $ac_val
13360 #endif
13361 _ACEOF
13362     ;;
13363 esac
13364
13365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13366 $as_echo_n "checking for printf format archetype... " >&6; }
13367 if ${pgac_cv_printf_archetype+:} false; then :
13368   $as_echo_n "(cached) " >&6
13369 else
13370   ac_save_c_werror_flag=$ac_c_werror_flag
13371 ac_c_werror_flag=yes
13372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13373 /* end confdefs.h.  */
13374 extern int
13375 pgac_write(int ignore, const char *fmt,...)
13376 __attribute__((format(gnu_printf, 2, 3)));
13377 int
13378 main ()
13379 {
13380
13381   ;
13382   return 0;
13383 }
13384 _ACEOF
13385 if ac_fn_c_try_compile "$LINENO"; then :
13386   pgac_cv_printf_archetype=gnu_printf
13387 else
13388   pgac_cv_printf_archetype=printf
13389 fi
13390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13391 ac_c_werror_flag=$ac_save_c_werror_flag
13392 fi
13393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13394 $as_echo "$pgac_cv_printf_archetype" >&6; }
13395
13396 cat >>confdefs.h <<_ACEOF
13397 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13398 _ACEOF
13399
13400
13401
13402   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13403 $as_echo_n "checking for flexible array members... " >&6; }
13404 if ${ac_cv_c_flexmember+:} false; then :
13405   $as_echo_n "(cached) " >&6
13406 else
13407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13408 /* end confdefs.h.  */
13409 #include <stdlib.h>
13410             #include <stdio.h>
13411             #include <stddef.h>
13412             struct s { int n; double d[]; };
13413 int
13414 main ()
13415 {
13416 int m = getchar ();
13417             struct s *p = malloc (offsetof (struct s, d)
13418                                   + m * sizeof (double));
13419             p->d[0] = 0.0;
13420             return p->d != (double *) NULL;
13421   ;
13422   return 0;
13423 }
13424 _ACEOF
13425 if ac_fn_c_try_compile "$LINENO"; then :
13426   ac_cv_c_flexmember=yes
13427 else
13428   ac_cv_c_flexmember=no
13429 fi
13430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13431 fi
13432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13433 $as_echo "$ac_cv_c_flexmember" >&6; }
13434   if test $ac_cv_c_flexmember = yes; then
13435
13436 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13437
13438   else
13439     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13440
13441   fi
13442
13443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13444 $as_echo_n "checking for signed types... " >&6; }
13445 if ${pgac_cv_c_signed+:} false; then :
13446   $as_echo_n "(cached) " >&6
13447 else
13448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13449 /* end confdefs.h.  */
13450
13451 int
13452 main ()
13453 {
13454 signed char c; signed short s; signed int i;
13455   ;
13456   return 0;
13457 }
13458 _ACEOF
13459 if ac_fn_c_try_compile "$LINENO"; then :
13460   pgac_cv_c_signed=yes
13461 else
13462   pgac_cv_c_signed=no
13463 fi
13464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13465 fi
13466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13467 $as_echo "$pgac_cv_c_signed" >&6; }
13468 if test x"$pgac_cv_c_signed" = xno ; then
13469
13470 $as_echo "#define signed /**/" >>confdefs.h
13471
13472 fi
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13474 $as_echo_n "checking for __func__... " >&6; }
13475 if ${pgac_cv_funcname_func_support+:} false; then :
13476   $as_echo_n "(cached) " >&6
13477 else
13478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13479 /* end confdefs.h.  */
13480 #include <stdio.h>
13481 int
13482 main ()
13483 {
13484 printf("%s\n", __func__);
13485   ;
13486   return 0;
13487 }
13488 _ACEOF
13489 if ac_fn_c_try_compile "$LINENO"; then :
13490   pgac_cv_funcname_func_support=yes
13491 else
13492   pgac_cv_funcname_func_support=no
13493 fi
13494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13495 fi
13496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13497 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13498 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13499
13500 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13501
13502 else
13503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13504 $as_echo_n "checking for __FUNCTION__... " >&6; }
13505 if ${pgac_cv_funcname_function_support+:} false; then :
13506   $as_echo_n "(cached) " >&6
13507 else
13508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13509 /* end confdefs.h.  */
13510 #include <stdio.h>
13511 int
13512 main ()
13513 {
13514 printf("%s\n", __FUNCTION__);
13515   ;
13516   return 0;
13517 }
13518 _ACEOF
13519 if ac_fn_c_try_compile "$LINENO"; then :
13520   pgac_cv_funcname_function_support=yes
13521 else
13522   pgac_cv_funcname_function_support=no
13523 fi
13524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13525 fi
13526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13527 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13528 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13529
13530 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13531
13532 fi
13533 fi
13534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13535 $as_echo_n "checking for _Static_assert... " >&6; }
13536 if ${pgac_cv__static_assert+:} false; then :
13537   $as_echo_n "(cached) " >&6
13538 else
13539   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13540 /* end confdefs.h.  */
13541
13542 int
13543 main ()
13544 {
13545 ({ _Static_assert(1, "foo"); })
13546   ;
13547   return 0;
13548 }
13549 _ACEOF
13550 if ac_fn_c_try_link "$LINENO"; then :
13551   pgac_cv__static_assert=yes
13552 else
13553   pgac_cv__static_assert=no
13554 fi
13555 rm -f core conftest.err conftest.$ac_objext \
13556     conftest$ac_exeext conftest.$ac_ext
13557 fi
13558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13559 $as_echo "$pgac_cv__static_assert" >&6; }
13560 if test x"$pgac_cv__static_assert" = xyes ; then
13561
13562 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13563
13564 fi
13565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13566 $as_echo_n "checking for typeof... " >&6; }
13567 if ${pgac_cv_c_typeof+:} false; then :
13568   $as_echo_n "(cached) " >&6
13569 else
13570   pgac_cv_c_typeof=no
13571 for pgac_kw in typeof __typeof__ decltype; do
13572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13573 /* end confdefs.h.  */
13574
13575 int
13576 main ()
13577 {
13578 int x = 0;
13579 $pgac_kw(x) y;
13580 y = x;
13581 return y;
13582   ;
13583   return 0;
13584 }
13585 _ACEOF
13586 if ac_fn_c_try_compile "$LINENO"; then :
13587   pgac_cv_c_typeof=$pgac_kw
13588 fi
13589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13590   test "$pgac_cv_c_typeof" != no && break
13591 done
13592 fi
13593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13594 $as_echo "$pgac_cv_c_typeof" >&6; }
13595 if test "$pgac_cv_c_typeof" != no; then
13596
13597 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13598
13599   if test "$pgac_cv_c_typeof" != typeof; then
13600
13601 cat >>confdefs.h <<_ACEOF
13602 #define typeof $pgac_cv_c_typeof
13603 _ACEOF
13604
13605   fi
13606 fi
13607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13608 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13609 if ${pgac_cv__types_compatible+:} false; then :
13610   $as_echo_n "(cached) " >&6
13611 else
13612   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13613 /* end confdefs.h.  */
13614
13615 int
13616 main ()
13617 {
13618  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13619   ;
13620   return 0;
13621 }
13622 _ACEOF
13623 if ac_fn_c_try_compile "$LINENO"; then :
13624   pgac_cv__types_compatible=yes
13625 else
13626   pgac_cv__types_compatible=no
13627 fi
13628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13629 fi
13630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13631 $as_echo "$pgac_cv__types_compatible" >&6; }
13632 if test x"$pgac_cv__types_compatible" = xyes ; then
13633
13634 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13635
13636 fi
13637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13638 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13639 if ${pgac_cv__builtin_bswap16+:} false; then :
13640   $as_echo_n "(cached) " >&6
13641 else
13642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13643 /* end confdefs.h.  */
13644 static unsigned long int x = __builtin_bswap16(0xaabb);
13645
13646 _ACEOF
13647 if ac_fn_c_try_compile "$LINENO"; then :
13648   pgac_cv__builtin_bswap16=yes
13649 else
13650   pgac_cv__builtin_bswap16=no
13651 fi
13652 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13653 fi
13654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13655 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13656 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13657
13658 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13659
13660 fi
13661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13662 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13663 if ${pgac_cv__builtin_bswap32+:} false; then :
13664   $as_echo_n "(cached) " >&6
13665 else
13666   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13667 /* end confdefs.h.  */
13668 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13669
13670 _ACEOF
13671 if ac_fn_c_try_compile "$LINENO"; then :
13672   pgac_cv__builtin_bswap32=yes
13673 else
13674   pgac_cv__builtin_bswap32=no
13675 fi
13676 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13677 fi
13678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
13679 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
13680 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
13681
13682 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
13683
13684 fi
13685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
13686 $as_echo_n "checking for __builtin_bswap64... " >&6; }
13687 if ${pgac_cv__builtin_bswap64+:} false; then :
13688   $as_echo_n "(cached) " >&6
13689 else
13690   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13691 /* end confdefs.h.  */
13692 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
13693
13694 _ACEOF
13695 if ac_fn_c_try_compile "$LINENO"; then :
13696   pgac_cv__builtin_bswap64=yes
13697 else
13698   pgac_cv__builtin_bswap64=no
13699 fi
13700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13701 fi
13702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
13703 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
13704 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
13705
13706 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
13707
13708 fi
13709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
13710 $as_echo_n "checking for __builtin_constant_p... " >&6; }
13711 if ${pgac_cv__builtin_constant_p+:} false; then :
13712   $as_echo_n "(cached) " >&6
13713 else
13714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13715 /* end confdefs.h.  */
13716 static int x;
13717   static int y[__builtin_constant_p(x) ? x : 1];
13718   static int z[__builtin_constant_p("string literal") ? 1 : x];
13719
13720
13721 _ACEOF
13722 if ac_fn_c_try_compile "$LINENO"; then :
13723   pgac_cv__builtin_constant_p=yes
13724 else
13725   pgac_cv__builtin_constant_p=no
13726 fi
13727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13728 fi
13729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
13730 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
13731 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
13732
13733 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
13734
13735 fi
13736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
13737 $as_echo_n "checking for __builtin_unreachable... " >&6; }
13738 if ${pgac_cv__builtin_unreachable+:} false; then :
13739   $as_echo_n "(cached) " >&6
13740 else
13741   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13742 /* end confdefs.h.  */
13743
13744 int
13745 main ()
13746 {
13747 __builtin_unreachable();
13748   ;
13749   return 0;
13750 }
13751 _ACEOF
13752 if ac_fn_c_try_link "$LINENO"; then :
13753   pgac_cv__builtin_unreachable=yes
13754 else
13755   pgac_cv__builtin_unreachable=no
13756 fi
13757 rm -f core conftest.err conftest.$ac_objext \
13758     conftest$ac_exeext conftest.$ac_ext
13759 fi
13760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
13761 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
13762 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
13763
13764 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
13765
13766 fi
13767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
13768 $as_echo_n "checking for computed goto support... " >&6; }
13769 if ${pgac_cv_computed_goto+:} false; then :
13770   $as_echo_n "(cached) " >&6
13771 else
13772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13773 /* end confdefs.h.  */
13774
13775 int
13776 main ()
13777 {
13778 void *labeladdrs[] = {&&my_label};
13779   goto *labeladdrs[0];
13780   my_label:
13781   return 1;
13782
13783   ;
13784   return 0;
13785 }
13786 _ACEOF
13787 if ac_fn_c_try_compile "$LINENO"; then :
13788   pgac_cv_computed_goto=yes
13789 else
13790   pgac_cv_computed_goto=no
13791 fi
13792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13793 fi
13794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
13795 $as_echo "$pgac_cv_computed_goto" >&6; }
13796 if test x"$pgac_cv_computed_goto" = xyes ; then
13797
13798 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
13799
13800 fi
13801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
13802 $as_echo_n "checking for __VA_ARGS__... " >&6; }
13803 if ${pgac_cv__va_args+:} false; then :
13804   $as_echo_n "(cached) " >&6
13805 else
13806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13807 /* end confdefs.h.  */
13808 #include <stdio.h>
13809 int
13810 main ()
13811 {
13812 #define debug(...) fprintf(stderr, __VA_ARGS__)
13813 debug("%s", "blarg");
13814
13815   ;
13816   return 0;
13817 }
13818 _ACEOF
13819 if ac_fn_c_try_compile "$LINENO"; then :
13820   pgac_cv__va_args=yes
13821 else
13822   pgac_cv__va_args=no
13823 fi
13824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13825 fi
13826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
13827 $as_echo "$pgac_cv__va_args" >&6; }
13828 if test x"$pgac_cv__va_args" = xyes ; then
13829
13830 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
13831
13832 fi
13833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13834 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13835 if ${ac_cv_struct_tm+:} false; then :
13836   $as_echo_n "(cached) " >&6
13837 else
13838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13839 /* end confdefs.h.  */
13840 #include <sys/types.h>
13841 #include <time.h>
13842
13843 int
13844 main ()
13845 {
13846 struct tm tm;
13847                                      int *p = &tm.tm_sec;
13848                                      return !p;
13849   ;
13850   return 0;
13851 }
13852 _ACEOF
13853 if ac_fn_c_try_compile "$LINENO"; then :
13854   ac_cv_struct_tm=time.h
13855 else
13856   ac_cv_struct_tm=sys/time.h
13857 fi
13858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13859 fi
13860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13861 $as_echo "$ac_cv_struct_tm" >&6; }
13862 if test $ac_cv_struct_tm = sys/time.h; then
13863
13864 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
13865
13866 fi
13867
13868 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
13869 #include <$ac_cv_struct_tm>
13870
13871 "
13872 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
13873
13874 cat >>confdefs.h <<_ACEOF
13875 #define HAVE_STRUCT_TM_TM_ZONE 1
13876 _ACEOF
13877
13878
13879 fi
13880
13881 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13882
13883 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
13884
13885 fi
13886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13887 $as_echo_n "checking for tzname... " >&6; }
13888 if ${ac_cv_var_tzname+:} false; then :
13889   $as_echo_n "(cached) " >&6
13890 else
13891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13892 /* end confdefs.h.  */
13893 #include <stdlib.h>
13894 #include <time.h>
13895 #ifndef tzname /* For SGI.  */
13896 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
13897 #endif
13898
13899 int
13900 main ()
13901 {
13902 atoi(*tzname);
13903   ;
13904   return 0;
13905 }
13906 _ACEOF
13907 if ac_fn_c_try_link "$LINENO"; then :
13908   ac_cv_var_tzname=yes
13909 else
13910   ac_cv_var_tzname=no
13911 fi
13912 rm -f core conftest.err conftest.$ac_objext \
13913     conftest$ac_exeext conftest.$ac_ext
13914 fi
13915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13916 $as_echo "$ac_cv_var_tzname" >&6; }
13917 if test $ac_cv_var_tzname = yes; then
13918
13919 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
13920
13921 fi
13922
13923 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
13924 #ifdef HAVE_SYS_IPC_H
13925 #include <sys/ipc.h>
13926 #endif
13927 #ifdef HAVE_SYS_SEM_H
13928 #include <sys/sem.h>
13929 #endif
13930 "
13931 if test "x$ac_cv_type_union_semun" = xyes; then :
13932
13933 cat >>confdefs.h <<_ACEOF
13934 #define HAVE_UNION_SEMUN 1
13935 _ACEOF
13936
13937
13938 fi
13939
13940 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
13941 #ifdef HAVE_SYS_UN_H
13942 #include <sys/un.h>
13943 #endif
13944
13945 "
13946 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
13947
13948 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
13949
13950 fi
13951
13952 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
13953 #include <sys/socket.h>
13954
13955 "
13956 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
13957
13958 cat >>confdefs.h <<_ACEOF
13959 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
13960 _ACEOF
13961
13962
13963 fi
13964
13965 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
13966 #include <sys/socket.h>
13967
13968 "
13969 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
13970
13971 cat >>confdefs.h <<_ACEOF
13972 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
13973 _ACEOF
13974
13975
13976 fi
13977 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
13978 #include <sys/socket.h>
13979
13980 "
13981 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
13982
13983 cat >>confdefs.h <<_ACEOF
13984 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
13985 _ACEOF
13986
13987
13988 fi
13989 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
13990 #include <sys/socket.h>
13991
13992 "
13993 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
13994
13995 cat >>confdefs.h <<_ACEOF
13996 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
13997 _ACEOF
13998
13999
14000 fi
14001 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14002 #include <sys/socket.h>
14003
14004 "
14005 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14006
14007 cat >>confdefs.h <<_ACEOF
14008 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14009 _ACEOF
14010
14011
14012 fi
14013 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14014 #include <sys/socket.h>
14015
14016 "
14017 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14018
14019 cat >>confdefs.h <<_ACEOF
14020 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14021 _ACEOF
14022
14023
14024 fi
14025
14026 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14027 #include <sys/socket.h>
14028 #include <netdb.h>
14029
14030 "
14031 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14032
14033 cat >>confdefs.h <<_ACEOF
14034 #define HAVE_STRUCT_ADDRINFO 1
14035 _ACEOF
14036
14037
14038 fi
14039
14040
14041   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14042 if test "x$ac_cv_type_intptr_t" = xyes; then :
14043
14044 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14045
14046 else
14047   for ac_type in 'int' 'long int' 'long long int'; do
14048        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14049 /* end confdefs.h.  */
14050 $ac_includes_default
14051 int
14052 main ()
14053 {
14054 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14055 test_array [0] = 0;
14056 return test_array [0];
14057
14058   ;
14059   return 0;
14060 }
14061 _ACEOF
14062 if ac_fn_c_try_compile "$LINENO"; then :
14063
14064 cat >>confdefs.h <<_ACEOF
14065 #define intptr_t $ac_type
14066 _ACEOF
14067
14068           ac_type=
14069 fi
14070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14071        test -z "$ac_type" && break
14072      done
14073 fi
14074
14075
14076
14077   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14078 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14079
14080 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14081
14082 else
14083   for ac_type in 'unsigned int' 'unsigned long int' \
14084         'unsigned long long int'; do
14085        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14086 /* end confdefs.h.  */
14087 $ac_includes_default
14088 int
14089 main ()
14090 {
14091 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14092 test_array [0] = 0;
14093 return test_array [0];
14094
14095   ;
14096   return 0;
14097 }
14098 _ACEOF
14099 if ac_fn_c_try_compile "$LINENO"; then :
14100
14101 cat >>confdefs.h <<_ACEOF
14102 #define uintptr_t $ac_type
14103 _ACEOF
14104
14105           ac_type=
14106 fi
14107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14108        test -z "$ac_type" && break
14109      done
14110 fi
14111
14112
14113
14114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14115 $as_echo_n "checking for unsigned long long int... " >&6; }
14116 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14117   $as_echo_n "(cached) " >&6
14118 else
14119   ac_cv_type_unsigned_long_long_int=yes
14120      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14121        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14122 /* end confdefs.h.  */
14123
14124   /* For now, do not test the preprocessor; as of 2007 there are too many
14125          implementations with broken preprocessors.  Perhaps this can
14126          be revisited in 2012.  In the meantime, code should not expect
14127          #if to work with literals wider than 32 bits.  */
14128       /* Test literals.  */
14129       long long int ll = 9223372036854775807ll;
14130       long long int nll = -9223372036854775807LL;
14131       unsigned long long int ull = 18446744073709551615ULL;
14132       /* Test constant expressions.   */
14133       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14134                      ? 1 : -1)];
14135       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14136                      ? 1 : -1)];
14137       int i = 63;
14138 int
14139 main ()
14140 {
14141 /* Test availability of runtime routines for shift and division.  */
14142       long long int llmax = 9223372036854775807ll;
14143       unsigned long long int ullmax = 18446744073709551615ull;
14144       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14145               | (llmax / ll) | (llmax % ll)
14146               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14147               | (ullmax / ull) | (ullmax % ull));
14148   ;
14149   return 0;
14150 }
14151
14152 _ACEOF
14153 if ac_fn_c_try_link "$LINENO"; then :
14154
14155 else
14156   ac_cv_type_unsigned_long_long_int=no
14157 fi
14158 rm -f core conftest.err conftest.$ac_objext \
14159     conftest$ac_exeext conftest.$ac_ext
14160      fi
14161 fi
14162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14163 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14164   if test $ac_cv_type_unsigned_long_long_int = yes; then
14165
14166 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14167
14168   fi
14169
14170
14171
14172   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14173 $as_echo_n "checking for long long int... " >&6; }
14174 if ${ac_cv_type_long_long_int+:} false; then :
14175   $as_echo_n "(cached) " >&6
14176 else
14177   ac_cv_type_long_long_int=yes
14178       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14179         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14180         if test $ac_cv_type_long_long_int = yes; then
14181                                   if test "$cross_compiling" = yes; then :
14182   :
14183 else
14184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14185 /* end confdefs.h.  */
14186 #include <limits.h>
14187                  #ifndef LLONG_MAX
14188                  # define HALF \
14189                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14190                  # define LLONG_MAX (HALF - 1 + HALF)
14191                  #endif
14192 int
14193 main ()
14194 {
14195 long long int n = 1;
14196                  int i;
14197                  for (i = 0; ; i++)
14198                    {
14199                      long long int m = n << i;
14200                      if (m >> i != n)
14201                        return 1;
14202                      if (LLONG_MAX / 2 < m)
14203                        break;
14204                    }
14205                  return 0;
14206   ;
14207   return 0;
14208 }
14209 _ACEOF
14210 if ac_fn_c_try_run "$LINENO"; then :
14211
14212 else
14213   ac_cv_type_long_long_int=no
14214 fi
14215 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14216   conftest.$ac_objext conftest.beam conftest.$ac_ext
14217 fi
14218
14219         fi
14220       fi
14221 fi
14222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14223 $as_echo "$ac_cv_type_long_long_int" >&6; }
14224   if test $ac_cv_type_long_long_int = yes; then
14225
14226 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14227
14228   fi
14229
14230
14231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14232 $as_echo_n "checking for locale_t... " >&6; }
14233 if ${pgac_cv_type_locale_t+:} false; then :
14234   $as_echo_n "(cached) " >&6
14235 else
14236   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14237 /* end confdefs.h.  */
14238 #include <locale.h>
14239 locale_t x;
14240 int
14241 main ()
14242 {
14243
14244   ;
14245   return 0;
14246 }
14247 _ACEOF
14248 if ac_fn_c_try_compile "$LINENO"; then :
14249   pgac_cv_type_locale_t=yes
14250 else
14251   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14252 /* end confdefs.h.  */
14253 #include <xlocale.h>
14254 locale_t x;
14255 int
14256 main ()
14257 {
14258
14259   ;
14260   return 0;
14261 }
14262 _ACEOF
14263 if ac_fn_c_try_compile "$LINENO"; then :
14264   pgac_cv_type_locale_t='yes (in xlocale.h)'
14265 else
14266   pgac_cv_type_locale_t=no
14267 fi
14268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14269 fi
14270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14271 fi
14272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14273 $as_echo "$pgac_cv_type_locale_t" >&6; }
14274 if test "$pgac_cv_type_locale_t" != no; then
14275
14276 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14277
14278 fi
14279 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14280
14281 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14282
14283 fi
14284
14285 # MSVC doesn't cope well with defining restrict to __restrict, the
14286 # spelling it understands, because it conflicts with
14287 # __declspec(restrict). Therefore we define pg_restrict to the
14288 # appropriate definition, which presumably won't conflict.
14289 #
14290 # Allow platforms with buggy compilers to force restrict to not be
14291 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14292 # template.
14293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14294 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14295 if ${ac_cv_c_restrict+:} false; then :
14296   $as_echo_n "(cached) " >&6
14297 else
14298   ac_cv_c_restrict=no
14299    # The order here caters to the fact that C++ does not require restrict.
14300    for ac_kw in __restrict __restrict__ _Restrict restrict; do
14301      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14302 /* end confdefs.h.  */
14303 typedef int * int_ptr;
14304         int foo (int_ptr $ac_kw ip) {
14305         return ip[0];
14306        }
14307 int
14308 main ()
14309 {
14310 int s[1];
14311         int * $ac_kw t = s;
14312         t[0] = 0;
14313         return foo(t)
14314   ;
14315   return 0;
14316 }
14317 _ACEOF
14318 if ac_fn_c_try_compile "$LINENO"; then :
14319   ac_cv_c_restrict=$ac_kw
14320 fi
14321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14322      test "$ac_cv_c_restrict" != no && break
14323    done
14324
14325 fi
14326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14327 $as_echo "$ac_cv_c_restrict" >&6; }
14328
14329  case $ac_cv_c_restrict in
14330    restrict) ;;
14331    no) $as_echo "#define restrict /**/" >>confdefs.h
14332  ;;
14333    *)  cat >>confdefs.h <<_ACEOF
14334 #define restrict $ac_cv_c_restrict
14335 _ACEOF
14336  ;;
14337  esac
14338
14339 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14340   pg_restrict=""
14341 else
14342   pg_restrict="$ac_cv_c_restrict"
14343 fi
14344
14345 cat >>confdefs.h <<_ACEOF
14346 #define pg_restrict $pg_restrict
14347 _ACEOF
14348
14349
14350 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14351 #include <sys/param.h>
14352 #ifdef HAVE_SYS_UCRED_H
14353 #include <sys/ucred.h>
14354 #endif
14355 "
14356 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14357
14358 cat >>confdefs.h <<_ACEOF
14359 #define HAVE_STRUCT_CMSGCRED 1
14360 _ACEOF
14361
14362
14363 fi
14364
14365
14366 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14367 #include <getopt.h>
14368 #endif
14369 "
14370 if test "x$ac_cv_type_struct_option" = xyes; then :
14371
14372 cat >>confdefs.h <<_ACEOF
14373 #define HAVE_STRUCT_OPTION 1
14374 _ACEOF
14375
14376
14377 fi
14378
14379
14380 if test "$with_zlib" = yes; then
14381   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14382   # did not).  While we could work around the lack of z_streamp, it
14383   # seems unwise to encourage people to use such old zlib versions...
14384   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14385 "
14386 if test "x$ac_cv_type_z_streamp" = xyes; then :
14387
14388 else
14389   as_fn_error $? "zlib version is too old
14390 Use --without-zlib to disable zlib support." "$LINENO" 5
14391 fi
14392
14393 fi
14394
14395 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14396 case $host_cpu in
14397   ppc*|powerpc*)
14398     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14399 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14400     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14401 /* end confdefs.h.  */
14402
14403 int
14404 main ()
14405 {
14406 int a = 0; int *p = &a; int r;
14407          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14408   ;
14409   return 0;
14410 }
14411 _ACEOF
14412 if ac_fn_c_try_compile "$LINENO"; then :
14413   pgac_cv_have_ppc_mutex_hint=yes
14414 else
14415   pgac_cv_have_ppc_mutex_hint=no
14416 fi
14417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14418     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14419 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14420     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14421
14422 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14423
14424     fi
14425   ;;
14426 esac
14427
14428 # Check largefile support.  You might think this is a system service not a
14429 # compiler characteristic, but you'd be wrong.  We must check this before
14430 # probing existence of related functions such as fseeko, since the largefile
14431 # defines can affect what is generated for that.
14432 if test "$PORTNAME" != "win32"; then
14433    # Check whether --enable-largefile was given.
14434 if test "${enable_largefile+set}" = set; then :
14435   enableval=$enable_largefile;
14436 fi
14437
14438 if test "$enable_largefile" != no; then
14439
14440   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14441 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14442 if ${ac_cv_sys_largefile_CC+:} false; then :
14443   $as_echo_n "(cached) " >&6
14444 else
14445   ac_cv_sys_largefile_CC=no
14446      if test "$GCC" != yes; then
14447        ac_save_CC=$CC
14448        while :; do
14449          # IRIX 6.2 and later do not support large files by default,
14450          # so use the C compiler's -n32 option if that helps.
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   break
14472 fi
14473 rm -f core conftest.err conftest.$ac_objext
14474          CC="$CC -n32"
14475          if ac_fn_c_try_compile "$LINENO"; then :
14476   ac_cv_sys_largefile_CC=' -n32'; break
14477 fi
14478 rm -f core conftest.err conftest.$ac_objext
14479          break
14480        done
14481        CC=$ac_save_CC
14482        rm -f conftest.$ac_ext
14483     fi
14484 fi
14485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14486 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14487   if test "$ac_cv_sys_largefile_CC" != no; then
14488     CC=$CC$ac_cv_sys_largefile_CC
14489   fi
14490
14491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14492 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14493 if ${ac_cv_sys_file_offset_bits+:} false; then :
14494   $as_echo_n "(cached) " >&6
14495 else
14496   while :; do
14497   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14498 /* end confdefs.h.  */
14499 #include <sys/types.h>
14500  /* Check that off_t can represent 2**63 - 1 correctly.
14501     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14502     since some C++ compilers masquerading as C compilers
14503     incorrectly reject 9223372036854775807.  */
14504 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14505   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14506                        && LARGE_OFF_T % 2147483647 == 1)
14507                       ? 1 : -1];
14508 int
14509 main ()
14510 {
14511
14512   ;
14513   return 0;
14514 }
14515 _ACEOF
14516 if ac_fn_c_try_compile "$LINENO"; then :
14517   ac_cv_sys_file_offset_bits=no; break
14518 fi
14519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14521 /* end confdefs.h.  */
14522 #define _FILE_OFFSET_BITS 64
14523 #include <sys/types.h>
14524  /* Check that off_t can represent 2**63 - 1 correctly.
14525     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14526     since some C++ compilers masquerading as C compilers
14527     incorrectly reject 9223372036854775807.  */
14528 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14529   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14530                        && LARGE_OFF_T % 2147483647 == 1)
14531                       ? 1 : -1];
14532 int
14533 main ()
14534 {
14535
14536   ;
14537   return 0;
14538 }
14539 _ACEOF
14540 if ac_fn_c_try_compile "$LINENO"; then :
14541   ac_cv_sys_file_offset_bits=64; break
14542 fi
14543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14544   ac_cv_sys_file_offset_bits=unknown
14545   break
14546 done
14547 fi
14548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14549 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14550 case $ac_cv_sys_file_offset_bits in #(
14551   no | unknown) ;;
14552   *)
14553 cat >>confdefs.h <<_ACEOF
14554 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14555 _ACEOF
14556 ;;
14557 esac
14558 rm -rf conftest*
14559   if test $ac_cv_sys_file_offset_bits = unknown; then
14560     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14561 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14562 if ${ac_cv_sys_large_files+:} false; then :
14563   $as_echo_n "(cached) " >&6
14564 else
14565   while :; do
14566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14567 /* end confdefs.h.  */
14568 #include <sys/types.h>
14569  /* Check that off_t can represent 2**63 - 1 correctly.
14570     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14571     since some C++ compilers masquerading as C compilers
14572     incorrectly reject 9223372036854775807.  */
14573 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14574   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14575                        && LARGE_OFF_T % 2147483647 == 1)
14576                       ? 1 : -1];
14577 int
14578 main ()
14579 {
14580
14581   ;
14582   return 0;
14583 }
14584 _ACEOF
14585 if ac_fn_c_try_compile "$LINENO"; then :
14586   ac_cv_sys_large_files=no; break
14587 fi
14588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14589   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14590 /* end confdefs.h.  */
14591 #define _LARGE_FILES 1
14592 #include <sys/types.h>
14593  /* Check that off_t can represent 2**63 - 1 correctly.
14594     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14595     since some C++ compilers masquerading as C compilers
14596     incorrectly reject 9223372036854775807.  */
14597 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14598   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14599                        && LARGE_OFF_T % 2147483647 == 1)
14600                       ? 1 : -1];
14601 int
14602 main ()
14603 {
14604
14605   ;
14606   return 0;
14607 }
14608 _ACEOF
14609 if ac_fn_c_try_compile "$LINENO"; then :
14610   ac_cv_sys_large_files=1; break
14611 fi
14612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14613   ac_cv_sys_large_files=unknown
14614   break
14615 done
14616 fi
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14618 $as_echo "$ac_cv_sys_large_files" >&6; }
14619 case $ac_cv_sys_large_files in #(
14620   no | unknown) ;;
14621   *)
14622 cat >>confdefs.h <<_ACEOF
14623 #define _LARGE_FILES $ac_cv_sys_large_files
14624 _ACEOF
14625 ;;
14626 esac
14627 rm -rf conftest*
14628   fi
14629
14630
14631 fi
14632
14633
14634 fi
14635
14636 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14637 # The cast to long int works around a bug in the HP C Compiler
14638 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14639 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14640 # This bug is HP SR number 8606223364.
14641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14642 $as_echo_n "checking size of off_t... " >&6; }
14643 if ${ac_cv_sizeof_off_t+:} false; then :
14644   $as_echo_n "(cached) " >&6
14645 else
14646   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14647
14648 else
14649   if test "$ac_cv_type_off_t" = yes; then
14650      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14651 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14652 as_fn_error 77 "cannot compute sizeof (off_t)
14653 See \`config.log' for more details" "$LINENO" 5; }
14654    else
14655      ac_cv_sizeof_off_t=0
14656    fi
14657 fi
14658
14659 fi
14660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14661 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14662
14663
14664
14665 cat >>confdefs.h <<_ACEOF
14666 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14667 _ACEOF
14668
14669
14670
14671 # If we don't have largefile support, can't handle segsize >= 2GB.
14672 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14673    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14674 fi
14675
14676 # The cast to long int works around a bug in the HP C Compiler
14677 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14678 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14679 # This bug is HP SR number 8606223364.
14680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14681 $as_echo_n "checking size of bool... " >&6; }
14682 if ${ac_cv_sizeof_bool+:} false; then :
14683   $as_echo_n "(cached) " >&6
14684 else
14685   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
14686 #include <stdbool.h>
14687 #endif
14688 "; then :
14689
14690 else
14691   if test "$ac_cv_type_bool" = yes; then
14692      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14693 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14694 as_fn_error 77 "cannot compute sizeof (bool)
14695 See \`config.log' for more details" "$LINENO" 5; }
14696    else
14697      ac_cv_sizeof_bool=0
14698    fi
14699 fi
14700
14701 fi
14702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14703 $as_echo "$ac_cv_sizeof_bool" >&6; }
14704
14705
14706
14707 cat >>confdefs.h <<_ACEOF
14708 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14709 _ACEOF
14710
14711
14712
14713
14714 ##
14715 ## Functions, global variables
14716 ##
14717
14718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14719 $as_echo_n "checking for int timezone... " >&6; }
14720 if ${pgac_cv_var_int_timezone+:} false; then :
14721   $as_echo_n "(cached) " >&6
14722 else
14723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14724 /* end confdefs.h.  */
14725 #include <time.h>
14726 int res;
14727 int
14728 main ()
14729 {
14730 #ifndef __CYGWIN__
14731 res = timezone / 60;
14732 #else
14733 res = _timezone / 60;
14734 #endif
14735   ;
14736   return 0;
14737 }
14738 _ACEOF
14739 if ac_fn_c_try_link "$LINENO"; then :
14740   pgac_cv_var_int_timezone=yes
14741 else
14742   pgac_cv_var_int_timezone=no
14743 fi
14744 rm -f core conftest.err conftest.$ac_objext \
14745     conftest$ac_exeext conftest.$ac_ext
14746 fi
14747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
14748 $as_echo "$pgac_cv_var_int_timezone" >&6; }
14749 if test x"$pgac_cv_var_int_timezone" = xyes ; then
14750
14751 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
14752
14753 fi
14754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
14755 $as_echo_n "checking types of arguments for accept()... " >&6; }
14756  if ${ac_cv_func_accept_return+:} false; then :
14757   $as_echo_n "(cached) " >&6
14758 else
14759    if ${ac_cv_func_accept_arg1+:} false; then :
14760   $as_echo_n "(cached) " >&6
14761 else
14762     if ${ac_cv_func_accept_arg2+:} false; then :
14763   $as_echo_n "(cached) " >&6
14764 else
14765      if ${ac_cv_func_accept_arg3+:} false; then :
14766   $as_echo_n "(cached) " >&6
14767 else
14768       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
14769       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
14770        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
14771         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
14772          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14773 /* end confdefs.h.  */
14774 #include <sys/types.h>
14775 #include <sys/socket.h>
14776 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
14777 _ACEOF
14778 if ac_fn_c_try_compile "$LINENO"; then :
14779   ac_not_found=no; break 4
14780 else
14781   ac_not_found=yes
14782 fi
14783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14784        done
14785       done
14786      done
14787     done
14788     if test "$ac_not_found" = yes; then
14789       as_fn_error $? "could not determine argument types" "$LINENO" 5
14790     fi
14791     if test "$ac_cv_func_accept_arg3" = "void"; then
14792       ac_cv_func_accept_arg3=int
14793     fi
14794
14795 fi
14796
14797 fi
14798
14799 fi
14800
14801 fi
14802  { $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
14803 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
14804
14805 cat >>confdefs.h <<_ACEOF
14806 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
14807 _ACEOF
14808
14809
14810 cat >>confdefs.h <<_ACEOF
14811 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
14812 _ACEOF
14813
14814
14815 cat >>confdefs.h <<_ACEOF
14816 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
14817 _ACEOF
14818
14819
14820 cat >>confdefs.h <<_ACEOF
14821 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
14822 _ACEOF
14823
14824
14825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
14826 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
14827 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
14828   $as_echo_n "(cached) " >&6
14829 else
14830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14831 /* end confdefs.h.  */
14832 #include <sys/time.h>
14833 int
14834 main ()
14835 {
14836 struct timeval *tp;
14837 struct timezone *tzp;
14838 gettimeofday(tp,tzp);
14839   ;
14840   return 0;
14841 }
14842 _ACEOF
14843 if ac_fn_c_try_compile "$LINENO"; then :
14844   pgac_cv_func_gettimeofday_1arg=no
14845 else
14846   pgac_cv_func_gettimeofday_1arg=yes
14847 fi
14848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14849 fi
14850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
14851 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
14852 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
14853
14854 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
14855
14856 fi
14857
14858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
14859 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
14860 if ${pgac_cv_func_wcstombs_l+:} false; then :
14861   $as_echo_n "(cached) " >&6
14862 else
14863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14864 /* end confdefs.h.  */
14865 #include <stdlib.h>
14866 #include <locale.h>
14867 int
14868 main ()
14869 {
14870 #ifndef wcstombs_l
14871 (void) wcstombs_l;
14872 #endif
14873   ;
14874   return 0;
14875 }
14876 _ACEOF
14877 if ac_fn_c_try_compile "$LINENO"; then :
14878   pgac_cv_func_wcstombs_l='yes'
14879 else
14880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14881 /* end confdefs.h.  */
14882 #include <stdlib.h>
14883 #include <locale.h>
14884 #include <xlocale.h>
14885 int
14886 main ()
14887 {
14888 #ifndef wcstombs_l
14889 (void) wcstombs_l;
14890 #endif
14891   ;
14892   return 0;
14893 }
14894 _ACEOF
14895 if ac_fn_c_try_compile "$LINENO"; then :
14896   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
14897 else
14898   pgac_cv_func_wcstombs_l='no'
14899 fi
14900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14901 fi
14902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14903 fi
14904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
14905 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
14906 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
14907
14908 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
14909
14910 fi
14911
14912 # Some versions of libedit contain strlcpy(), setproctitle(), and other
14913 # symbols that that library has no business exposing to the world.  Pending
14914 # acquisition of a clue by those developers, ignore libedit (including its
14915 # possible alias of libreadline) while checking for everything else.
14916 LIBS_including_readline="$LIBS"
14917 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
14918
14919 for ac_func in cbrt clock_gettime dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open symlink sync_file_range utime utimes wcstombs_l
14920 do :
14921   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14922 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14923 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14924   cat >>confdefs.h <<_ACEOF
14925 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14926 _ACEOF
14927
14928 fi
14929 done
14930
14931
14932 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
14933 if test "x$ac_cv_func_fseeko" = xyes; then :
14934   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14935
14936 else
14937   case " $LIBOBJS " in
14938   *" fseeko.$ac_objext "* ) ;;
14939   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
14940  ;;
14941 esac
14942
14943 fi
14944
14945
14946 case $host_os in
14947         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
14948         # Mingw uses macros to access Win32 API calls
14949         netbsd*|mingw*)
14950
14951 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
14952
14953                 ac_cv_func_fseeko=yes;;
14954         *)
14955                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14956 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14957 if ${ac_cv_sys_largefile_source+:} false; then :
14958   $as_echo_n "(cached) " >&6
14959 else
14960   while :; do
14961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14962 /* end confdefs.h.  */
14963 #include <sys/types.h> /* for off_t */
14964      #include <stdio.h>
14965 int
14966 main ()
14967 {
14968 int (*fp) (FILE *, off_t, int) = fseeko;
14969      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14970   ;
14971   return 0;
14972 }
14973 _ACEOF
14974 if ac_fn_c_try_link "$LINENO"; then :
14975   ac_cv_sys_largefile_source=no; break
14976 fi
14977 rm -f core conftest.err conftest.$ac_objext \
14978     conftest$ac_exeext conftest.$ac_ext
14979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14980 /* end confdefs.h.  */
14981 #define _LARGEFILE_SOURCE 1
14982 #include <sys/types.h> /* for off_t */
14983      #include <stdio.h>
14984 int
14985 main ()
14986 {
14987 int (*fp) (FILE *, off_t, int) = fseeko;
14988      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14989   ;
14990   return 0;
14991 }
14992 _ACEOF
14993 if ac_fn_c_try_link "$LINENO"; then :
14994   ac_cv_sys_largefile_source=1; break
14995 fi
14996 rm -f core conftest.err conftest.$ac_objext \
14997     conftest$ac_exeext conftest.$ac_ext
14998   ac_cv_sys_largefile_source=unknown
14999   break
15000 done
15001 fi
15002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15003 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15004 case $ac_cv_sys_largefile_source in #(
15005   no | unknown) ;;
15006   *)
15007 cat >>confdefs.h <<_ACEOF
15008 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15009 _ACEOF
15010 ;;
15011 esac
15012 rm -rf conftest*
15013
15014 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15015 # in glibc 2.1.3, but that breaks too many other things.
15016 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15017 if test $ac_cv_sys_largefile_source != unknown; then
15018
15019 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15020
15021 fi
15022 ;;
15023 esac
15024
15025 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15026 # by calling it, 2009-04-02
15027 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15028 if test "$PORTNAME" != "solaris"; then
15029 for ac_func in posix_fadvise
15030 do :
15031   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15032 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15033   cat >>confdefs.h <<_ACEOF
15034 #define HAVE_POSIX_FADVISE 1
15035 _ACEOF
15036
15037 fi
15038 done
15039
15040 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15041 "
15042 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15043   ac_have_decl=1
15044 else
15045   ac_have_decl=0
15046 fi
15047
15048 cat >>confdefs.h <<_ACEOF
15049 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15050 _ACEOF
15051
15052 fi
15053
15054 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15055 "
15056 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15057   ac_have_decl=1
15058 else
15059   ac_have_decl=0
15060 fi
15061
15062 cat >>confdefs.h <<_ACEOF
15063 #define HAVE_DECL_FDATASYNC $ac_have_decl
15064 _ACEOF
15065
15066 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15067 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15068   ac_have_decl=1
15069 else
15070   ac_have_decl=0
15071 fi
15072
15073 cat >>confdefs.h <<_ACEOF
15074 #define HAVE_DECL_STRLCAT $ac_have_decl
15075 _ACEOF
15076 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15077 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15078   ac_have_decl=1
15079 else
15080   ac_have_decl=0
15081 fi
15082
15083 cat >>confdefs.h <<_ACEOF
15084 #define HAVE_DECL_STRLCPY $ac_have_decl
15085 _ACEOF
15086 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15087 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15088   ac_have_decl=1
15089 else
15090   ac_have_decl=0
15091 fi
15092
15093 cat >>confdefs.h <<_ACEOF
15094 #define HAVE_DECL_STRNLEN $ac_have_decl
15095 _ACEOF
15096
15097 # This is probably only present on macOS, but may as well check always
15098 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15099 "
15100 if test "x$ac_cv_have_decl_F_FULLFSYNC" = 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_F_FULLFSYNC $ac_have_decl
15108 _ACEOF
15109
15110
15111 HAVE_IPV6=no
15112 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15113 #include <netinet/in.h>
15114 "
15115 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15116
15117 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15118
15119          HAVE_IPV6=yes
15120 fi
15121
15122
15123
15124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15125 $as_echo_n "checking for PS_STRINGS... " >&6; }
15126 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15127   $as_echo_n "(cached) " >&6
15128 else
15129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15130 /* end confdefs.h.  */
15131 #include <machine/vmparam.h>
15132 #include <sys/exec.h>
15133
15134 int
15135 main ()
15136 {
15137 PS_STRINGS->ps_nargvstr = 1;
15138 PS_STRINGS->ps_argvstr = "foo";
15139   ;
15140   return 0;
15141 }
15142 _ACEOF
15143 if ac_fn_c_try_link "$LINENO"; then :
15144   pgac_cv_var_PS_STRINGS=yes
15145 else
15146   pgac_cv_var_PS_STRINGS=no
15147 fi
15148 rm -f core conftest.err conftest.$ac_objext \
15149     conftest$ac_exeext conftest.$ac_ext
15150 fi
15151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15152 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15153 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15154
15155 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15156
15157 fi
15158
15159
15160 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
15161 # is missing.  Yes, there are machines that have only one.  We may
15162 # also decide to use snprintf.c if snprintf() is present but does not
15163 # have all the features we need --- see below.
15164
15165 if test "$PORTNAME" = "win32"; then
15166   # Win32 gets snprintf.c built unconditionally.
15167   #
15168   # To properly translate all NLS languages strings, we must support the
15169   # *printf() %$ format, which allows *printf() arguments to be selected
15170   # by position in the translated string.
15171   #
15172   # libintl versions < 0.13 use the native *printf() functions, and Win32
15173   # *printf() doesn't understand %$, so we must use our /port versions,
15174   # which do understand %$. libintl versions >= 0.13 include their own
15175   # *printf versions on Win32.  The libintl 0.13 release note text is:
15176   #
15177   #   C format strings with positions, as they arise when a translator
15178   #   needs to reorder a sentence, are now supported on all platforms.
15179   #   On those few platforms (NetBSD and Woe32) for which the native
15180   #   printf()/fprintf()/... functions don't support such format
15181   #   strings, replacements are provided through <libintl.h>.
15182   #
15183   # We could use libintl >= 0.13's *printf() if we were sure that we had
15184   # a libintl >= 0.13 at runtime, but seeing that there is no clean way
15185   # to guarantee that, it is best to just use our own, so we are sure to
15186   # get %$ support. In include/port.h we disable the *printf() macros
15187   # that might have been defined by libintl.
15188   #
15189   # We do this unconditionally whether NLS is used or not so we are sure
15190   # that all Win32 libraries and binaries behave the same.
15191   pgac_need_repl_snprintf=yes
15192 else
15193   pgac_need_repl_snprintf=no
15194   for ac_func in snprintf
15195 do :
15196   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15197 if test "x$ac_cv_func_snprintf" = xyes; then :
15198   cat >>confdefs.h <<_ACEOF
15199 #define HAVE_SNPRINTF 1
15200 _ACEOF
15201
15202 else
15203   pgac_need_repl_snprintf=yes
15204 fi
15205 done
15206
15207   for ac_func in vsnprintf
15208 do :
15209   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
15210 if test "x$ac_cv_func_vsnprintf" = xyes; then :
15211   cat >>confdefs.h <<_ACEOF
15212 #define HAVE_VSNPRINTF 1
15213 _ACEOF
15214
15215 else
15216   pgac_need_repl_snprintf=yes
15217 fi
15218 done
15219
15220 fi
15221
15222
15223 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
15224 # include/c.h will provide declarations.  Note this is a separate test
15225 # from whether the functions exist in the C library --- there are
15226 # systems that have the functions but don't bother to declare them :-(
15227
15228 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15229 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15230   ac_have_decl=1
15231 else
15232   ac_have_decl=0
15233 fi
15234
15235 cat >>confdefs.h <<_ACEOF
15236 #define HAVE_DECL_SNPRINTF $ac_have_decl
15237 _ACEOF
15238 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
15239 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
15240   ac_have_decl=1
15241 else
15242   ac_have_decl=0
15243 fi
15244
15245 cat >>confdefs.h <<_ACEOF
15246 #define HAVE_DECL_VSNPRINTF $ac_have_decl
15247 _ACEOF
15248
15249
15250
15251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15252 $as_echo_n "checking for isinf... " >&6; }
15253 if ${ac_cv_func_isinf+:} false; then :
15254   $as_echo_n "(cached) " >&6
15255 else
15256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15257 /* end confdefs.h.  */
15258
15259 #include <math.h>
15260 double glob_double;
15261
15262 int
15263 main ()
15264 {
15265 return isinf(glob_double) ? 0 : 1;
15266   ;
15267   return 0;
15268 }
15269 _ACEOF
15270 if ac_fn_c_try_link "$LINENO"; then :
15271   ac_cv_func_isinf=yes
15272 else
15273   ac_cv_func_isinf=no
15274 fi
15275 rm -f core conftest.err conftest.$ac_objext \
15276     conftest$ac_exeext conftest.$ac_ext
15277 fi
15278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15279 $as_echo "$ac_cv_func_isinf" >&6; }
15280
15281 if test $ac_cv_func_isinf = yes ; then
15282
15283 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15284
15285 else
15286   case " $LIBOBJS " in
15287   *" isinf.$ac_objext "* ) ;;
15288   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15289  ;;
15290 esac
15291
15292   # Look for a way to implement a substitute for isinf()
15293   for ac_func in fpclass fp_class fp_class_d class
15294 do :
15295   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15296 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15297 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15298   cat >>confdefs.h <<_ACEOF
15299 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15300 _ACEOF
15301  break
15302 fi
15303 done
15304
15305 fi
15306
15307 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15308 if test "x$ac_cv_func_crypt" = xyes; then :
15309   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15310
15311 else
15312   case " $LIBOBJS " in
15313   *" crypt.$ac_objext "* ) ;;
15314   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15315  ;;
15316 esac
15317
15318 fi
15319
15320 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15321 if test "x$ac_cv_func_fls" = xyes; then :
15322   $as_echo "#define HAVE_FLS 1" >>confdefs.h
15323
15324 else
15325   case " $LIBOBJS " in
15326   *" fls.$ac_objext "* ) ;;
15327   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15328  ;;
15329 esac
15330
15331 fi
15332
15333 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15334 if test "x$ac_cv_func_getopt" = xyes; then :
15335   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15336
15337 else
15338   case " $LIBOBJS " in
15339   *" getopt.$ac_objext "* ) ;;
15340   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15341  ;;
15342 esac
15343
15344 fi
15345
15346 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15347 if test "x$ac_cv_func_getrusage" = xyes; then :
15348   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15349
15350 else
15351   case " $LIBOBJS " in
15352   *" getrusage.$ac_objext "* ) ;;
15353   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15354  ;;
15355 esac
15356
15357 fi
15358
15359 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15360 if test "x$ac_cv_func_inet_aton" = xyes; then :
15361   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15362
15363 else
15364   case " $LIBOBJS " in
15365   *" inet_aton.$ac_objext "* ) ;;
15366   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15367  ;;
15368 esac
15369
15370 fi
15371
15372 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15373 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15374   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15375
15376 else
15377   case " $LIBOBJS " in
15378   *" mkdtemp.$ac_objext "* ) ;;
15379   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15380  ;;
15381 esac
15382
15383 fi
15384
15385 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15386 if test "x$ac_cv_func_random" = xyes; then :
15387   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15388
15389 else
15390   case " $LIBOBJS " in
15391   *" random.$ac_objext "* ) ;;
15392   *) LIBOBJS="$LIBOBJS random.$ac_objext"
15393  ;;
15394 esac
15395
15396 fi
15397
15398 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15399 if test "x$ac_cv_func_rint" = xyes; then :
15400   $as_echo "#define HAVE_RINT 1" >>confdefs.h
15401
15402 else
15403   case " $LIBOBJS " in
15404   *" rint.$ac_objext "* ) ;;
15405   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15406  ;;
15407 esac
15408
15409 fi
15410
15411 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15412 if test "x$ac_cv_func_srandom" = xyes; then :
15413   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15414
15415 else
15416   case " $LIBOBJS " in
15417   *" srandom.$ac_objext "* ) ;;
15418   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15419  ;;
15420 esac
15421
15422 fi
15423
15424 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
15425 if test "x$ac_cv_func_strerror" = xyes; then :
15426   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
15427
15428 else
15429   case " $LIBOBJS " in
15430   *" strerror.$ac_objext "* ) ;;
15431   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
15432  ;;
15433 esac
15434
15435 fi
15436
15437 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15438 if test "x$ac_cv_func_strlcat" = xyes; then :
15439   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15440
15441 else
15442   case " $LIBOBJS " in
15443   *" strlcat.$ac_objext "* ) ;;
15444   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15445  ;;
15446 esac
15447
15448 fi
15449
15450 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15451 if test "x$ac_cv_func_strlcpy" = xyes; then :
15452   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15453
15454 else
15455   case " $LIBOBJS " in
15456   *" strlcpy.$ac_objext "* ) ;;
15457   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15458  ;;
15459 esac
15460
15461 fi
15462
15463 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15464 if test "x$ac_cv_func_strnlen" = xyes; then :
15465   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15466
15467 else
15468   case " $LIBOBJS " in
15469   *" strnlen.$ac_objext "* ) ;;
15470   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15471  ;;
15472 esac
15473
15474 fi
15475
15476
15477
15478 case $host_os in
15479
15480         # Windows uses a specialised env handler
15481         # and doesn't need a replacement getpeereid because it doesn't use
15482         # Unix sockets.
15483         mingw*)
15484
15485 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15486
15487
15488 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15489
15490                 ac_cv_func_unsetenv=yes
15491                 ac_cv_func_getpeereid=yes;;
15492         *)
15493                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15494 if test "x$ac_cv_func_unsetenv" = xyes; then :
15495   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15496
15497 else
15498   case " $LIBOBJS " in
15499   *" unsetenv.$ac_objext "* ) ;;
15500   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15501  ;;
15502 esac
15503
15504 fi
15505
15506 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15507 if test "x$ac_cv_func_getpeereid" = xyes; then :
15508   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15509
15510 else
15511   case " $LIBOBJS " in
15512   *" getpeereid.$ac_objext "* ) ;;
15513   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15514  ;;
15515 esac
15516
15517 fi
15518
15519
15520                 ;;
15521 esac
15522
15523 # System's version of getaddrinfo(), if any, may be used only if we found
15524 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15525 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15526 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15527    test "$PORTNAME" != "win32"; then
15528   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15529 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15530   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15531
15532 else
15533   case " $LIBOBJS " in
15534   *" getaddrinfo.$ac_objext "* ) ;;
15535   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15536  ;;
15537 esac
15538
15539 fi
15540
15541
15542 else
15543   case " $LIBOBJS " in
15544   *" getaddrinfo.$ac_objext "* ) ;;
15545   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15546  ;;
15547 esac
15548
15549 fi
15550
15551 # Similarly, use system's getopt_long() only if system provides struct option.
15552 if test x"$ac_cv_type_struct_option" = xyes ; then
15553   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15554 if test "x$ac_cv_func_getopt_long" = xyes; then :
15555   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15556
15557 else
15558   case " $LIBOBJS " in
15559   *" getopt_long.$ac_objext "* ) ;;
15560   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15561  ;;
15562 esac
15563
15564 fi
15565
15566
15567 else
15568   case " $LIBOBJS " in
15569   *" getopt_long.$ac_objext "* ) ;;
15570   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15571  ;;
15572 esac
15573
15574 fi
15575
15576 # Solaris' getopt() doesn't do what we want for long options, so always use
15577 # our version on that platform.
15578 if test "$PORTNAME" = "solaris"; then
15579   case " $LIBOBJS " in
15580   *" getopt.$ac_objext "* ) ;;
15581   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15582  ;;
15583 esac
15584
15585 fi
15586
15587 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15588 # so always use our version on Windows.
15589 if test "$PORTNAME" = "win32"; then
15590   case " $LIBOBJS " in
15591   *" getopt.$ac_objext "* ) ;;
15592   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15593  ;;
15594 esac
15595
15596   case " $LIBOBJS " in
15597   *" getopt_long.$ac_objext "* ) ;;
15598   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15599  ;;
15600 esac
15601
15602 fi
15603
15604 # Win32 (really MinGW) support
15605 if test "$PORTNAME" = "win32"; then
15606   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15607 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15608   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15609
15610 else
15611   case " $LIBOBJS " in
15612   *" gettimeofday.$ac_objext "* ) ;;
15613   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15614  ;;
15615 esac
15616
15617 fi
15618
15619
15620   case " $LIBOBJS " in
15621   *" dirmod.$ac_objext "* ) ;;
15622   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15623  ;;
15624 esac
15625
15626   case " $LIBOBJS " in
15627   *" kill.$ac_objext "* ) ;;
15628   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15629  ;;
15630 esac
15631
15632   case " $LIBOBJS " in
15633   *" open.$ac_objext "* ) ;;
15634   *) LIBOBJS="$LIBOBJS open.$ac_objext"
15635  ;;
15636 esac
15637
15638   case " $LIBOBJS " in
15639   *" system.$ac_objext "* ) ;;
15640   *) LIBOBJS="$LIBOBJS system.$ac_objext"
15641  ;;
15642 esac
15643
15644   case " $LIBOBJS " in
15645   *" win32env.$ac_objext "* ) ;;
15646   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15647  ;;
15648 esac
15649
15650   case " $LIBOBJS " in
15651   *" win32error.$ac_objext "* ) ;;
15652   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15653  ;;
15654 esac
15655
15656   case " $LIBOBJS " in
15657   *" win32security.$ac_objext "* ) ;;
15658   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15659  ;;
15660 esac
15661
15662   case " $LIBOBJS " in
15663   *" win32setlocale.$ac_objext "* ) ;;
15664   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15665  ;;
15666 esac
15667
15668
15669 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
15670
15671   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
15672 #define WIN32_LEAN_AND_MEAN
15673 #include <windows.h>
15674 #include <string.h>
15675 #include <dbghelp.h>
15676 "
15677 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
15678
15679 cat >>confdefs.h <<_ACEOF
15680 #define HAVE_MINIDUMP_TYPE 1
15681 _ACEOF
15682
15683 pgac_minidump_type=yes
15684 else
15685   pgac_minidump_type=no
15686 fi
15687
15688 fi
15689 if test x"$pgac_minidump_type" = x"yes" ; then
15690   have_win32_dbghelp=yes
15691
15692 else
15693   have_win32_dbghelp=no
15694
15695 fi
15696
15697 # Cygwin needs only a bit of that
15698 if test "$PORTNAME" = "cygwin"; then
15699   case " $LIBOBJS " in
15700   *" dirmod.$ac_objext "* ) ;;
15701   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15702  ;;
15703 esac
15704
15705 fi
15706
15707 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
15708 /* NetBSD declares sys_siglist in unistd.h.  */
15709 #ifdef HAVE_UNISTD_H
15710 # include <unistd.h>
15711 #endif
15712
15713 "
15714 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
15715   ac_have_decl=1
15716 else
15717   ac_have_decl=0
15718 fi
15719
15720 cat >>confdefs.h <<_ACEOF
15721 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
15722 _ACEOF
15723
15724
15725 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15726 if test "x$ac_cv_func_syslog" = xyes; then :
15727   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15728 if test "x$ac_cv_header_syslog_h" = xyes; then :
15729
15730 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15731
15732 fi
15733
15734
15735 fi
15736
15737
15738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15739 $as_echo_n "checking for opterr... " >&6; }
15740 if ${pgac_cv_var_int_opterr+:} false; then :
15741   $as_echo_n "(cached) " >&6
15742 else
15743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15744 /* end confdefs.h.  */
15745 #include <unistd.h>
15746 int
15747 main ()
15748 {
15749 extern int opterr; opterr = 1;
15750   ;
15751   return 0;
15752 }
15753 _ACEOF
15754 if ac_fn_c_try_link "$LINENO"; then :
15755   pgac_cv_var_int_opterr=yes
15756 else
15757   pgac_cv_var_int_opterr=no
15758 fi
15759 rm -f core conftest.err conftest.$ac_objext \
15760     conftest$ac_exeext conftest.$ac_ext
15761 fi
15762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15763 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15764 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15765
15766 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15767
15768 fi
15769
15770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15771 $as_echo_n "checking for optreset... " >&6; }
15772 if ${pgac_cv_var_int_optreset+:} false; then :
15773   $as_echo_n "(cached) " >&6
15774 else
15775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15776 /* end confdefs.h.  */
15777 #include <unistd.h>
15778 int
15779 main ()
15780 {
15781 extern int optreset; optreset = 1;
15782   ;
15783   return 0;
15784 }
15785 _ACEOF
15786 if ac_fn_c_try_link "$LINENO"; then :
15787   pgac_cv_var_int_optreset=yes
15788 else
15789   pgac_cv_var_int_optreset=no
15790 fi
15791 rm -f core conftest.err conftest.$ac_objext \
15792     conftest$ac_exeext conftest.$ac_ext
15793 fi
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
15795 $as_echo "$pgac_cv_var_int_optreset" >&6; }
15796 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15797
15798 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
15799
15800 fi
15801
15802 for ac_func in strtoll __strtoll strtoq
15803 do :
15804   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15805 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15806 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15807   cat >>confdefs.h <<_ACEOF
15808 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15809 _ACEOF
15810  break
15811 fi
15812 done
15813
15814 for ac_func in strtoull __strtoull strtouq
15815 do :
15816   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15817 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15818 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15819   cat >>confdefs.h <<_ACEOF
15820 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15821 _ACEOF
15822  break
15823 fi
15824 done
15825
15826 # strto[u]ll may exist but not be declared
15827 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
15828 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
15829   ac_have_decl=1
15830 else
15831   ac_have_decl=0
15832 fi
15833
15834 cat >>confdefs.h <<_ACEOF
15835 #define HAVE_DECL_STRTOLL $ac_have_decl
15836 _ACEOF
15837 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
15838 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
15839   ac_have_decl=1
15840 else
15841   ac_have_decl=0
15842 fi
15843
15844 cat >>confdefs.h <<_ACEOF
15845 #define HAVE_DECL_STRTOULL $ac_have_decl
15846 _ACEOF
15847
15848
15849 if test "$with_icu" = yes; then
15850   ac_save_CPPFLAGS=$CPPFLAGS
15851   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
15852
15853   # Verify we have ICU's header files
15854   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
15855 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
15856
15857 else
15858   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
15859 fi
15860
15861
15862
15863   CPPFLAGS=$ac_save_CPPFLAGS
15864 fi
15865
15866 # Lastly, restore full LIBS list and check for readline/libedit symbols
15867 LIBS="$LIBS_including_readline"
15868
15869 if test "$with_readline" = yes; then
15870   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
15871 $as_echo_n "checking for rl_completion_append_character... " >&6; }
15872 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
15873   $as_echo_n "(cached) " >&6
15874 else
15875   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15876 /* end confdefs.h.  */
15877 #include <stdio.h>
15878 #ifdef HAVE_READLINE_READLINE_H
15879 # include <readline/readline.h>
15880 #elif defined(HAVE_READLINE_H)
15881 # include <readline.h>
15882 #endif
15883
15884 int
15885 main ()
15886 {
15887 rl_completion_append_character = 'x';
15888   ;
15889   return 0;
15890 }
15891 _ACEOF
15892 if ac_fn_c_try_link "$LINENO"; then :
15893   pgac_cv_var_rl_completion_append_character=yes
15894 else
15895   pgac_cv_var_rl_completion_append_character=no
15896 fi
15897 rm -f core conftest.err conftest.$ac_objext \
15898     conftest$ac_exeext conftest.$ac_ext
15899 fi
15900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
15901 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
15902 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
15903
15904 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
15905
15906 fi
15907   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
15908 do :
15909   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15910 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15911 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15912   cat >>confdefs.h <<_ACEOF
15913 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15914 _ACEOF
15915
15916 fi
15917 done
15918
15919   for ac_func in append_history history_truncate_file
15920 do :
15921   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15922 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15923 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15924   cat >>confdefs.h <<_ACEOF
15925 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15926 _ACEOF
15927
15928 fi
15929 done
15930
15931 fi
15932
15933
15934 # This test makes sure that run tests work at all.  Sometimes a shared
15935 # library is found by the linker, but the runtime linker can't find it.
15936 # This check should come after all modifications of compiler or linker
15937 # variables, and before any other run tests.
15938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
15939 $as_echo_n "checking test program... " >&6; }
15940 if test "$cross_compiling" = yes; then :
15941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
15942 $as_echo "cross-compiling" >&6; }
15943 else
15944   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15945 /* end confdefs.h.  */
15946 int main() { return 0; }
15947 _ACEOF
15948 if ac_fn_c_try_run "$LINENO"; then :
15949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15950 $as_echo "ok" >&6; }
15951 else
15952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15953 $as_echo "failed" >&6; }
15954 as_fn_error $? "
15955 Could not execute a simple test program.  This may be a problem
15956 related to locating shared libraries.  Check the file 'config.log'
15957 for the exact reason." "$LINENO" 5
15958 fi
15959 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15960   conftest.$ac_objext conftest.beam conftest.$ac_ext
15961 fi
15962
15963
15964 # --------------------
15965 # Run tests below here
15966 # --------------------
15967
15968 # Force use of our snprintf if system's doesn't do arg control
15969 # See comment above at snprintf test for details.
15970 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
15971   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
15972 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
15973 if ${pgac_cv_snprintf_arg_control+:} false; then :
15974   $as_echo_n "(cached) " >&6
15975 else
15976   if test "$cross_compiling" = yes; then :
15977   pgac_cv_snprintf_arg_control=cross
15978 else
15979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15980 /* end confdefs.h.  */
15981 #include <stdio.h>
15982 #include <string.h>
15983
15984 int main()
15985 {
15986   char buf[100];
15987
15988   /* can it swap arguments? */
15989   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
15990   if (strcmp(buf, "4 3") != 0)
15991     return 1;
15992   return 0;
15993 }
15994 _ACEOF
15995 if ac_fn_c_try_run "$LINENO"; then :
15996   pgac_cv_snprintf_arg_control=yes
15997 else
15998   pgac_cv_snprintf_arg_control=no
15999 fi
16000 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16001   conftest.$ac_objext conftest.beam conftest.$ac_ext
16002 fi
16003
16004
16005 fi
16006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
16007 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
16008
16009   if test $pgac_cv_snprintf_arg_control != yes ; then
16010     pgac_need_repl_snprintf=yes
16011   fi
16012 fi
16013
16014
16015
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16017 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16018 if ${pgac_cv_type_long_int_64+:} false; then :
16019   $as_echo_n "(cached) " >&6
16020 else
16021   if test "$cross_compiling" = yes; then :
16022   # If cross-compiling, check the size reported by the compiler and
16023 # trust that the arithmetic works.
16024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16025 /* end confdefs.h.  */
16026
16027 int
16028 main ()
16029 {
16030 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16031 test_array [0] = 0;
16032 return test_array [0];
16033
16034   ;
16035   return 0;
16036 }
16037 _ACEOF
16038 if ac_fn_c_try_compile "$LINENO"; then :
16039   pgac_cv_type_long_int_64=yes
16040 else
16041   pgac_cv_type_long_int_64=no
16042 fi
16043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16044 else
16045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16046 /* end confdefs.h.  */
16047 typedef long int ac_int64;
16048
16049 /*
16050  * These are globals to discourage the compiler from folding all the
16051  * arithmetic tests down to compile-time constants.
16052  */
16053 ac_int64 a = 20000001;
16054 ac_int64 b = 40000005;
16055
16056 int does_int64_work()
16057 {
16058   ac_int64 c,d;
16059
16060   if (sizeof(ac_int64) != 8)
16061     return 0;                   /* definitely not the right size */
16062
16063   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16064   c = a * b;
16065   d = (c + b) / b;
16066   if (d != a+1)
16067     return 0;
16068   return 1;
16069 }
16070
16071 int
16072 main() {
16073   return (! does_int64_work());
16074 }
16075 _ACEOF
16076 if ac_fn_c_try_run "$LINENO"; then :
16077   pgac_cv_type_long_int_64=yes
16078 else
16079   pgac_cv_type_long_int_64=no
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 fi
16086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16087 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16088
16089 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16090 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16091
16092 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16093
16094 fi
16095
16096
16097 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16098   pg_int64_type="long int"
16099 else
16100   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16101 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16102 if ${pgac_cv_type_long_long_int_64+:} false; then :
16103   $as_echo_n "(cached) " >&6
16104 else
16105   if test "$cross_compiling" = yes; then :
16106   # If cross-compiling, check the size reported by the compiler and
16107 # trust that the arithmetic works.
16108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16109 /* end confdefs.h.  */
16110
16111 int
16112 main ()
16113 {
16114 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16115 test_array [0] = 0;
16116 return test_array [0];
16117
16118   ;
16119   return 0;
16120 }
16121 _ACEOF
16122 if ac_fn_c_try_compile "$LINENO"; then :
16123   pgac_cv_type_long_long_int_64=yes
16124 else
16125   pgac_cv_type_long_long_int_64=no
16126 fi
16127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16128 else
16129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16130 /* end confdefs.h.  */
16131 typedef long long int ac_int64;
16132
16133 /*
16134  * These are globals to discourage the compiler from folding all the
16135  * arithmetic tests down to compile-time constants.
16136  */
16137 ac_int64 a = 20000001;
16138 ac_int64 b = 40000005;
16139
16140 int does_int64_work()
16141 {
16142   ac_int64 c,d;
16143
16144   if (sizeof(ac_int64) != 8)
16145     return 0;                   /* definitely not the right size */
16146
16147   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16148   c = a * b;
16149   d = (c + b) / b;
16150   if (d != a+1)
16151     return 0;
16152   return 1;
16153 }
16154
16155 int
16156 main() {
16157   return (! does_int64_work());
16158 }
16159 _ACEOF
16160 if ac_fn_c_try_run "$LINENO"; then :
16161   pgac_cv_type_long_long_int_64=yes
16162 else
16163   pgac_cv_type_long_long_int_64=no
16164 fi
16165 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16166   conftest.$ac_objext conftest.beam conftest.$ac_ext
16167 fi
16168
16169 fi
16170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16171 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16172
16173 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16174 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16175
16176 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16177
16178 fi
16179
16180   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16181     pg_int64_type="long long int"
16182   else
16183     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16184   fi
16185 fi
16186
16187
16188 cat >>confdefs.h <<_ACEOF
16189 #define PG_INT64_TYPE $pg_int64_type
16190 _ACEOF
16191
16192
16193 # Select the printf length modifier that goes with that, too.
16194 # (This used to be bound up with replacement-snprintf selection, but now
16195 # we assume that the native *printf functions use standard length modifiers.)
16196 if test x"$pg_int64_type" = x"long long int" ; then
16197   INT64_MODIFIER='"ll"'
16198 else
16199   INT64_MODIFIER='"l"'
16200 fi
16201
16202
16203 cat >>confdefs.h <<_ACEOF
16204 #define INT64_MODIFIER $INT64_MODIFIER
16205 _ACEOF
16206
16207
16208 # Force use of our snprintf if the system's doesn't support the %z flag.
16209 # (Note this test uses PG_INT64_TYPE and INT64_MODIFIER.)
16210 if test "$pgac_need_repl_snprintf" = no; then
16211   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
16212 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
16213 if ${pgac_cv_snprintf_size_t_support+:} false; then :
16214   $as_echo_n "(cached) " >&6
16215 else
16216   if test "$cross_compiling" = yes; then :
16217   pgac_cv_snprintf_size_t_support=cross
16218 else
16219   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16220 /* end confdefs.h.  */
16221 #include <stdio.h>
16222 #include <string.h>
16223
16224 int main()
16225 {
16226   char bufz[100];
16227   char buf64[100];
16228
16229   /*
16230    * Print the largest unsigned number fitting in a size_t using both %zu
16231    * and the previously-determined format for 64-bit integers.  Note that
16232    * we don't run this code unless we know snprintf handles 64-bit ints.
16233    */
16234   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
16235   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
16236   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
16237     (unsigned PG_INT64_TYPE) ~((size_t) 0));
16238   if (strcmp(bufz, buf64) != 0)
16239     return 1;
16240   return 0;
16241 }
16242 _ACEOF
16243 if ac_fn_c_try_run "$LINENO"; then :
16244   pgac_cv_snprintf_size_t_support=yes
16245 else
16246   pgac_cv_snprintf_size_t_support=no
16247 fi
16248 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16249   conftest.$ac_objext conftest.beam conftest.$ac_ext
16250 fi
16251
16252
16253 fi
16254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
16255 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
16256
16257   if test "$pgac_cv_snprintf_size_t_support" != yes; then
16258     pgac_need_repl_snprintf=yes
16259   fi
16260 fi
16261
16262 # Now we have checked all the reasons to replace snprintf
16263 if test $pgac_need_repl_snprintf = yes; then
16264
16265 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
16266
16267   case " $LIBOBJS " in
16268   *" snprintf.$ac_objext "* ) ;;
16269   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
16270  ;;
16271 esac
16272
16273 fi
16274
16275 # has to be down here, rather than with the other builtins, because
16276 # the test uses PG_INT64_TYPE.
16277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16278 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16279 if ${pgac_cv__builtin_op_overflow+:} false; then :
16280   $as_echo_n "(cached) " >&6
16281 else
16282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16283 /* end confdefs.h.  */
16284
16285 PG_INT64_TYPE a = 1;
16286 PG_INT64_TYPE b = 1;
16287 PG_INT64_TYPE result;
16288 int oflo;
16289
16290 int
16291 main ()
16292 {
16293 oflo = __builtin_mul_overflow(a, b, &result);
16294   ;
16295   return 0;
16296 }
16297 _ACEOF
16298 if ac_fn_c_try_link "$LINENO"; then :
16299   pgac_cv__builtin_op_overflow=yes
16300 else
16301   pgac_cv__builtin_op_overflow=no
16302 fi
16303 rm -f core conftest.err conftest.$ac_objext \
16304     conftest$ac_exeext conftest.$ac_ext
16305 fi
16306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16307 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16308 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16309
16310 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16311
16312 fi
16313
16314 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16315 # The cast to long int works around a bug in the HP C Compiler
16316 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16317 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16318 # This bug is HP SR number 8606223364.
16319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16320 $as_echo_n "checking size of void *... " >&6; }
16321 if ${ac_cv_sizeof_void_p+:} false; then :
16322   $as_echo_n "(cached) " >&6
16323 else
16324   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16325
16326 else
16327   if test "$ac_cv_type_void_p" = yes; then
16328      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16329 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16330 as_fn_error 77 "cannot compute sizeof (void *)
16331 See \`config.log' for more details" "$LINENO" 5; }
16332    else
16333      ac_cv_sizeof_void_p=0
16334    fi
16335 fi
16336
16337 fi
16338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16339 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16340
16341
16342
16343 cat >>confdefs.h <<_ACEOF
16344 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16345 _ACEOF
16346
16347
16348 # The cast to long int works around a bug in the HP C Compiler
16349 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16350 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16351 # This bug is HP SR number 8606223364.
16352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16353 $as_echo_n "checking size of size_t... " >&6; }
16354 if ${ac_cv_sizeof_size_t+:} false; then :
16355   $as_echo_n "(cached) " >&6
16356 else
16357   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16358
16359 else
16360   if test "$ac_cv_type_size_t" = yes; then
16361      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16362 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16363 as_fn_error 77 "cannot compute sizeof (size_t)
16364 See \`config.log' for more details" "$LINENO" 5; }
16365    else
16366      ac_cv_sizeof_size_t=0
16367    fi
16368 fi
16369
16370 fi
16371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16372 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16373
16374
16375
16376 cat >>confdefs.h <<_ACEOF
16377 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16378 _ACEOF
16379
16380
16381 # The cast to long int works around a bug in the HP C Compiler
16382 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16383 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16384 # This bug is HP SR number 8606223364.
16385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16386 $as_echo_n "checking size of long... " >&6; }
16387 if ${ac_cv_sizeof_long+:} false; then :
16388   $as_echo_n "(cached) " >&6
16389 else
16390   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16391
16392 else
16393   if test "$ac_cv_type_long" = yes; then
16394      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16395 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16396 as_fn_error 77 "cannot compute sizeof (long)
16397 See \`config.log' for more details" "$LINENO" 5; }
16398    else
16399      ac_cv_sizeof_long=0
16400    fi
16401 fi
16402
16403 fi
16404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16405 $as_echo "$ac_cv_sizeof_long" >&6; }
16406
16407
16408
16409 cat >>confdefs.h <<_ACEOF
16410 #define SIZEOF_LONG $ac_cv_sizeof_long
16411 _ACEOF
16412
16413
16414
16415 # Decide whether float4 is passed by value: user-selectable, enabled by default
16416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16417 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16418
16419
16420 # Check whether --enable-float4-byval was given.
16421 if test "${enable_float4_byval+set}" = set; then :
16422   enableval=$enable_float4_byval;
16423   case $enableval in
16424     yes)
16425
16426 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16427
16428                float4passbyval=true
16429       ;;
16430     no)
16431       float4passbyval=false
16432       ;;
16433     *)
16434       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16435       ;;
16436   esac
16437
16438 else
16439   enable_float4_byval=yes
16440
16441 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16442
16443                float4passbyval=true
16444 fi
16445
16446
16447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16448 $as_echo "$enable_float4_byval" >&6; }
16449
16450 cat >>confdefs.h <<_ACEOF
16451 #define FLOAT4PASSBYVAL $float4passbyval
16452 _ACEOF
16453
16454
16455 # Decide whether float8 is passed by value.
16456 # Note: this setting also controls int8 and related types such as timestamp.
16457 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16458 # If not, trying to select it is an error.
16459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16460 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16461 if test $ac_cv_sizeof_void_p -ge 8 ; then
16462
16463
16464 # Check whether --enable-float8-byval was given.
16465 if test "${enable_float8_byval+set}" = set; then :
16466   enableval=$enable_float8_byval;
16467   case $enableval in
16468     yes)
16469       :
16470       ;;
16471     no)
16472       :
16473       ;;
16474     *)
16475       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16476       ;;
16477   esac
16478
16479 else
16480   enable_float8_byval=yes
16481
16482 fi
16483
16484
16485 else
16486
16487
16488 # Check whether --enable-float8-byval was given.
16489 if test "${enable_float8_byval+set}" = set; then :
16490   enableval=$enable_float8_byval;
16491   case $enableval in
16492     yes)
16493       :
16494       ;;
16495     no)
16496       :
16497       ;;
16498     *)
16499       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16500       ;;
16501   esac
16502
16503 else
16504   enable_float8_byval=no
16505
16506 fi
16507
16508
16509   if test "$enable_float8_byval" = yes ; then
16510     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16511   fi
16512 fi
16513 if test "$enable_float8_byval" = yes ; then
16514
16515 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16516
16517   float8passbyval=true
16518 else
16519   float8passbyval=false
16520 fi
16521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16522 $as_echo "$enable_float8_byval" >&6; }
16523
16524 cat >>confdefs.h <<_ACEOF
16525 #define FLOAT8PASSBYVAL $float8passbyval
16526 _ACEOF
16527
16528
16529 # Determine memory alignment requirements for the basic C data types.
16530
16531 # The cast to long int works around a bug in the HP C Compiler,
16532 # see AC_CHECK_SIZEOF for more information.
16533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16534 $as_echo_n "checking alignment of short... " >&6; }
16535 if ${ac_cv_alignof_short+:} false; then :
16536   $as_echo_n "(cached) " >&6
16537 else
16538   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16539 #ifndef offsetof
16540 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16541 #endif
16542 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16543
16544 else
16545   if test "$ac_cv_type_short" = yes; then
16546      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16547 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16548 as_fn_error 77 "cannot compute alignment of short
16549 See \`config.log' for more details" "$LINENO" 5; }
16550    else
16551      ac_cv_alignof_short=0
16552    fi
16553 fi
16554
16555 fi
16556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16557 $as_echo "$ac_cv_alignof_short" >&6; }
16558
16559
16560
16561 cat >>confdefs.h <<_ACEOF
16562 #define ALIGNOF_SHORT $ac_cv_alignof_short
16563 _ACEOF
16564
16565
16566 # The cast to long int works around a bug in the HP C Compiler,
16567 # see AC_CHECK_SIZEOF for more information.
16568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16569 $as_echo_n "checking alignment of int... " >&6; }
16570 if ${ac_cv_alignof_int+:} false; then :
16571   $as_echo_n "(cached) " >&6
16572 else
16573   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16574 #ifndef offsetof
16575 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16576 #endif
16577 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16578
16579 else
16580   if test "$ac_cv_type_int" = yes; then
16581      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16582 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16583 as_fn_error 77 "cannot compute alignment of int
16584 See \`config.log' for more details" "$LINENO" 5; }
16585    else
16586      ac_cv_alignof_int=0
16587    fi
16588 fi
16589
16590 fi
16591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16592 $as_echo "$ac_cv_alignof_int" >&6; }
16593
16594
16595
16596 cat >>confdefs.h <<_ACEOF
16597 #define ALIGNOF_INT $ac_cv_alignof_int
16598 _ACEOF
16599
16600
16601 # The cast to long int works around a bug in the HP C Compiler,
16602 # see AC_CHECK_SIZEOF for more information.
16603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16604 $as_echo_n "checking alignment of long... " >&6; }
16605 if ${ac_cv_alignof_long+:} false; then :
16606   $as_echo_n "(cached) " >&6
16607 else
16608   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16609 #ifndef offsetof
16610 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16611 #endif
16612 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16613
16614 else
16615   if test "$ac_cv_type_long" = yes; then
16616      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16617 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16618 as_fn_error 77 "cannot compute alignment of long
16619 See \`config.log' for more details" "$LINENO" 5; }
16620    else
16621      ac_cv_alignof_long=0
16622    fi
16623 fi
16624
16625 fi
16626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16627 $as_echo "$ac_cv_alignof_long" >&6; }
16628
16629
16630
16631 cat >>confdefs.h <<_ACEOF
16632 #define ALIGNOF_LONG $ac_cv_alignof_long
16633 _ACEOF
16634
16635
16636 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16637   # The cast to long int works around a bug in the HP C Compiler,
16638 # see AC_CHECK_SIZEOF for more information.
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16640 $as_echo_n "checking alignment of long long int... " >&6; }
16641 if ${ac_cv_alignof_long_long_int+:} false; then :
16642   $as_echo_n "(cached) " >&6
16643 else
16644   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
16645 #ifndef offsetof
16646 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16647 #endif
16648 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16649
16650 else
16651   if test "$ac_cv_type_long_long_int" = yes; then
16652      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16653 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16654 as_fn_error 77 "cannot compute alignment of long long int
16655 See \`config.log' for more details" "$LINENO" 5; }
16656    else
16657      ac_cv_alignof_long_long_int=0
16658    fi
16659 fi
16660
16661 fi
16662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16663 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16664
16665
16666
16667 cat >>confdefs.h <<_ACEOF
16668 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16669 _ACEOF
16670
16671
16672 fi
16673 # The cast to long int works around a bug in the HP C Compiler,
16674 # see AC_CHECK_SIZEOF for more information.
16675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16676 $as_echo_n "checking alignment of double... " >&6; }
16677 if ${ac_cv_alignof_double+:} false; then :
16678   $as_echo_n "(cached) " >&6
16679 else
16680   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
16681 #ifndef offsetof
16682 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16683 #endif
16684 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16685
16686 else
16687   if test "$ac_cv_type_double" = yes; then
16688      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16689 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16690 as_fn_error 77 "cannot compute alignment of double
16691 See \`config.log' for more details" "$LINENO" 5; }
16692    else
16693      ac_cv_alignof_double=0
16694    fi
16695 fi
16696
16697 fi
16698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16699 $as_echo "$ac_cv_alignof_double" >&6; }
16700
16701
16702
16703 cat >>confdefs.h <<_ACEOF
16704 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16705 _ACEOF
16706
16707
16708
16709 # Compute maximum alignment of any basic type.
16710 # We assume long's alignment is at least as strong as char, short, or int;
16711 # but we must check long long (if it is being used for int64) and double.
16712 # Note that we intentionally do not consider any types wider than 64 bits,
16713 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
16714 # for disk and memory space.
16715
16716 MAX_ALIGNOF=$ac_cv_alignof_long
16717 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
16718   MAX_ALIGNOF=$ac_cv_alignof_double
16719 fi
16720 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
16721   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
16722 fi
16723
16724 cat >>confdefs.h <<_ACEOF
16725 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16726 _ACEOF
16727
16728
16729
16730 # Some platforms predefine the types int8, int16, etc.  Only check
16731 # a (hopefully) representative subset.
16732 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16733 "
16734 if test "x$ac_cv_type_int8" = xyes; then :
16735
16736 cat >>confdefs.h <<_ACEOF
16737 #define HAVE_INT8 1
16738 _ACEOF
16739
16740
16741 fi
16742 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16743 "
16744 if test "x$ac_cv_type_uint8" = xyes; then :
16745
16746 cat >>confdefs.h <<_ACEOF
16747 #define HAVE_UINT8 1
16748 _ACEOF
16749
16750
16751 fi
16752 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
16753 "
16754 if test "x$ac_cv_type_int64" = xyes; then :
16755
16756 cat >>confdefs.h <<_ACEOF
16757 #define HAVE_INT64 1
16758 _ACEOF
16759
16760
16761 fi
16762 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
16763 "
16764 if test "x$ac_cv_type_uint64" = xyes; then :
16765
16766 cat >>confdefs.h <<_ACEOF
16767 #define HAVE_UINT64 1
16768 _ACEOF
16769
16770
16771 fi
16772
16773
16774 # Some compilers offer a 128-bit integer scalar type.
16775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16776 $as_echo_n "checking for __int128... " >&6; }
16777 if ${pgac_cv__128bit_int+:} false; then :
16778   $as_echo_n "(cached) " >&6
16779 else
16780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16781 /* end confdefs.h.  */
16782
16783 /*
16784  * We don't actually run this test, just link it to verify that any support
16785  * functions needed for __int128 are present.
16786  *
16787  * These are globals to discourage the compiler from folding all the
16788  * arithmetic tests down to compile-time constants.  We do not have
16789  * convenient support for 128bit literals at this point...
16790  */
16791 __int128 a = 48828125;
16792 __int128 b = 97656250;
16793
16794 int
16795 main ()
16796 {
16797
16798 __int128 c,d;
16799 a = (a << 12) + 1; /* 200000000001 */
16800 b = (b << 12) + 5; /* 400000000005 */
16801 /* try the most relevant arithmetic ops */
16802 c = a * b;
16803 d = (c + b) / b;
16804 /* must use the results, else compiler may optimize arithmetic away */
16805 if (d != a+1)
16806   return 1;
16807
16808   ;
16809   return 0;
16810 }
16811 _ACEOF
16812 if ac_fn_c_try_link "$LINENO"; then :
16813   pgac_cv__128bit_int=yes
16814 else
16815   pgac_cv__128bit_int=no
16816 fi
16817 rm -f core conftest.err conftest.$ac_objext \
16818     conftest$ac_exeext conftest.$ac_ext
16819 fi
16820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
16821 $as_echo "$pgac_cv__128bit_int" >&6; }
16822 if test x"$pgac_cv__128bit_int" = xyes ; then
16823   # Use of non-default alignment with __int128 tickles bugs in some compilers.
16824   # If not cross-compiling, we can test for bugs and disable use of __int128
16825   # with buggy compilers.  If cross-compiling, hope for the best.
16826   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
16827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
16828 $as_echo_n "checking for __int128 alignment bug... " >&6; }
16829 if ${pgac_cv__128bit_int_bug+:} false; then :
16830   $as_echo_n "(cached) " >&6
16831 else
16832   if test "$cross_compiling" = yes; then :
16833   pgac_cv__128bit_int_bug="assuming ok"
16834 else
16835   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16836 /* end confdefs.h.  */
16837
16838 /* This must match the corresponding code in c.h: */
16839 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
16840 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
16841 #endif
16842 typedef __int128 int128a
16843 #if defined(pg_attribute_aligned)
16844 pg_attribute_aligned(8)
16845 #endif
16846 ;
16847 int128a holder;
16848 void pass_by_val(void *buffer, int128a par) { holder = par; }
16849
16850 int
16851 main ()
16852 {
16853
16854 long int i64 = 97656225L << 12;
16855 int128a q;
16856 pass_by_val(main, (int128a) i64);
16857 q = (int128a) i64;
16858 if (q != holder)
16859   return 1;
16860
16861   ;
16862   return 0;
16863 }
16864 _ACEOF
16865 if ac_fn_c_try_run "$LINENO"; then :
16866   pgac_cv__128bit_int_bug=ok
16867 else
16868   pgac_cv__128bit_int_bug=broken
16869 fi
16870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16871   conftest.$ac_objext conftest.beam conftest.$ac_ext
16872 fi
16873
16874 fi
16875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
16876 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
16877   if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
16878
16879 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
16880
16881     # The cast to long int works around a bug in the HP C Compiler,
16882 # see AC_CHECK_SIZEOF for more information.
16883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
16884 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
16885 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
16886   $as_echo_n "(cached) " >&6
16887 else
16888   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
16889 #ifndef offsetof
16890 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16891 #endif
16892 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
16893
16894 else
16895   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
16896      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16897 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16898 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
16899 See \`config.log' for more details" "$LINENO" 5; }
16900    else
16901      ac_cv_alignof_PG_INT128_TYPE=0
16902    fi
16903 fi
16904
16905 fi
16906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
16907 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
16908
16909
16910
16911 cat >>confdefs.h <<_ACEOF
16912 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
16913 _ACEOF
16914
16915
16916   fi
16917 fi
16918
16919 # Check for various atomic operations now that we have checked how to declare
16920 # 64bit integers.
16921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
16922 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
16923 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
16924   $as_echo_n "(cached) " >&6
16925 else
16926   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16927 /* end confdefs.h.  */
16928
16929 int
16930 main ()
16931 {
16932 char lock = 0;
16933    __sync_lock_test_and_set(&lock, 1);
16934    __sync_lock_release(&lock);
16935   ;
16936   return 0;
16937 }
16938 _ACEOF
16939 if ac_fn_c_try_link "$LINENO"; then :
16940   pgac_cv_gcc_sync_char_tas="yes"
16941 else
16942   pgac_cv_gcc_sync_char_tas="no"
16943 fi
16944 rm -f core conftest.err conftest.$ac_objext \
16945     conftest$ac_exeext conftest.$ac_ext
16946 fi
16947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
16948 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
16949 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
16950
16951 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
16952
16953 fi
16954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
16955 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
16956 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
16957   $as_echo_n "(cached) " >&6
16958 else
16959   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16960 /* end confdefs.h.  */
16961
16962 int
16963 main ()
16964 {
16965 int lock = 0;
16966    __sync_lock_test_and_set(&lock, 1);
16967    __sync_lock_release(&lock);
16968   ;
16969   return 0;
16970 }
16971 _ACEOF
16972 if ac_fn_c_try_link "$LINENO"; then :
16973   pgac_cv_gcc_sync_int32_tas="yes"
16974 else
16975   pgac_cv_gcc_sync_int32_tas="no"
16976 fi
16977 rm -f core conftest.err conftest.$ac_objext \
16978     conftest$ac_exeext conftest.$ac_ext
16979 fi
16980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
16981 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
16982 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
16983
16984 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
16985
16986 fi
16987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
16988 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
16989 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
16990   $as_echo_n "(cached) " >&6
16991 else
16992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16993 /* end confdefs.h.  */
16994
16995 int
16996 main ()
16997 {
16998 int val = 0;
16999    __sync_val_compare_and_swap(&val, 0, 37);
17000   ;
17001   return 0;
17002 }
17003 _ACEOF
17004 if ac_fn_c_try_link "$LINENO"; then :
17005   pgac_cv_gcc_sync_int32_cas="yes"
17006 else
17007   pgac_cv_gcc_sync_int32_cas="no"
17008 fi
17009 rm -f core conftest.err conftest.$ac_objext \
17010     conftest$ac_exeext conftest.$ac_ext
17011 fi
17012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17013 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17014 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17015
17016 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17017
17018 fi
17019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17020 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17021 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17022   $as_echo_n "(cached) " >&6
17023 else
17024   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17025 /* end confdefs.h.  */
17026
17027 int
17028 main ()
17029 {
17030 PG_INT64_TYPE lock = 0;
17031    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17032   ;
17033   return 0;
17034 }
17035 _ACEOF
17036 if ac_fn_c_try_link "$LINENO"; then :
17037   pgac_cv_gcc_sync_int64_cas="yes"
17038 else
17039   pgac_cv_gcc_sync_int64_cas="no"
17040 fi
17041 rm -f core conftest.err conftest.$ac_objext \
17042     conftest$ac_exeext conftest.$ac_ext
17043 fi
17044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17045 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17046 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17047
17048 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17049
17050 fi
17051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17052 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17053 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17054   $as_echo_n "(cached) " >&6
17055 else
17056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17057 /* end confdefs.h.  */
17058
17059 int
17060 main ()
17061 {
17062 int val = 0;
17063    int expect = 0;
17064    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17065   ;
17066   return 0;
17067 }
17068 _ACEOF
17069 if ac_fn_c_try_link "$LINENO"; then :
17070   pgac_cv_gcc_atomic_int32_cas="yes"
17071 else
17072   pgac_cv_gcc_atomic_int32_cas="no"
17073 fi
17074 rm -f core conftest.err conftest.$ac_objext \
17075     conftest$ac_exeext conftest.$ac_ext
17076 fi
17077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17078 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17079 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17080
17081 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17082
17083 fi
17084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17085 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17086 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17087   $as_echo_n "(cached) " >&6
17088 else
17089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17090 /* end confdefs.h.  */
17091
17092 int
17093 main ()
17094 {
17095 PG_INT64_TYPE val = 0;
17096    PG_INT64_TYPE expect = 0;
17097    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17098   ;
17099   return 0;
17100 }
17101 _ACEOF
17102 if ac_fn_c_try_link "$LINENO"; then :
17103   pgac_cv_gcc_atomic_int64_cas="yes"
17104 else
17105   pgac_cv_gcc_atomic_int64_cas="no"
17106 fi
17107 rm -f core conftest.err conftest.$ac_objext \
17108     conftest$ac_exeext conftest.$ac_ext
17109 fi
17110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17111 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17112 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17113
17114 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17115
17116 fi
17117
17118
17119 # Check for x86 cpuid instruction
17120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17121 $as_echo_n "checking for __get_cpuid... " >&6; }
17122 if ${pgac_cv__get_cpuid+:} false; then :
17123   $as_echo_n "(cached) " >&6
17124 else
17125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17126 /* end confdefs.h.  */
17127 #include <cpuid.h>
17128 int
17129 main ()
17130 {
17131 unsigned int exx[4] = {0, 0, 0, 0};
17132   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17133
17134   ;
17135   return 0;
17136 }
17137 _ACEOF
17138 if ac_fn_c_try_link "$LINENO"; then :
17139   pgac_cv__get_cpuid="yes"
17140 else
17141   pgac_cv__get_cpuid="no"
17142 fi
17143 rm -f core conftest.err conftest.$ac_objext \
17144     conftest$ac_exeext conftest.$ac_ext
17145 fi
17146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17147 $as_echo "$pgac_cv__get_cpuid" >&6; }
17148 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17149
17150 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17151
17152 fi
17153
17154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17155 $as_echo_n "checking for __cpuid... " >&6; }
17156 if ${pgac_cv__cpuid+:} false; then :
17157   $as_echo_n "(cached) " >&6
17158 else
17159   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17160 /* end confdefs.h.  */
17161 #include <intrin.h>
17162 int
17163 main ()
17164 {
17165 unsigned int exx[4] = {0, 0, 0, 0};
17166   __get_cpuid(exx[0], 1);
17167
17168   ;
17169   return 0;
17170 }
17171 _ACEOF
17172 if ac_fn_c_try_link "$LINENO"; then :
17173   pgac_cv__cpuid="yes"
17174 else
17175   pgac_cv__cpuid="no"
17176 fi
17177 rm -f core conftest.err conftest.$ac_objext \
17178     conftest$ac_exeext conftest.$ac_ext
17179 fi
17180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17181 $as_echo "$pgac_cv__cpuid" >&6; }
17182 if test x"$pgac_cv__cpuid" = x"yes"; then
17183
17184 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17185
17186 fi
17187
17188 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17189 #
17190 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17191 # with the default compiler flags. If not, check if adding the -msse4.2
17192 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17194 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17195 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17196   $as_echo_n "(cached) " >&6
17197 else
17198   pgac_save_CFLAGS=$CFLAGS
17199 CFLAGS="$pgac_save_CFLAGS "
17200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17201 /* end confdefs.h.  */
17202 #include <nmmintrin.h>
17203 int
17204 main ()
17205 {
17206 unsigned int crc = 0;
17207    crc = _mm_crc32_u8(crc, 0);
17208    crc = _mm_crc32_u32(crc, 0);
17209    /* return computed value, to prevent the above being optimized away */
17210    return crc == 0;
17211   ;
17212   return 0;
17213 }
17214 _ACEOF
17215 if ac_fn_c_try_link "$LINENO"; then :
17216   pgac_cv_sse42_crc32_intrinsics_=yes
17217 else
17218   pgac_cv_sse42_crc32_intrinsics_=no
17219 fi
17220 rm -f core conftest.err conftest.$ac_objext \
17221     conftest$ac_exeext conftest.$ac_ext
17222 CFLAGS="$pgac_save_CFLAGS"
17223 fi
17224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17225 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17226 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17227   CFLAGS_SSE42=""
17228   pgac_sse42_crc32_intrinsics=yes
17229 fi
17230
17231 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17232   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17233 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17234 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17235   $as_echo_n "(cached) " >&6
17236 else
17237   pgac_save_CFLAGS=$CFLAGS
17238 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17240 /* end confdefs.h.  */
17241 #include <nmmintrin.h>
17242 int
17243 main ()
17244 {
17245 unsigned int crc = 0;
17246    crc = _mm_crc32_u8(crc, 0);
17247    crc = _mm_crc32_u32(crc, 0);
17248    /* return computed value, to prevent the above being optimized away */
17249    return crc == 0;
17250   ;
17251   return 0;
17252 }
17253 _ACEOF
17254 if ac_fn_c_try_link "$LINENO"; then :
17255   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17256 else
17257   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17258 fi
17259 rm -f core conftest.err conftest.$ac_objext \
17260     conftest$ac_exeext conftest.$ac_ext
17261 CFLAGS="$pgac_save_CFLAGS"
17262 fi
17263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17264 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17265 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17266   CFLAGS_SSE42="-msse4.2"
17267   pgac_sse42_crc32_intrinsics=yes
17268 fi
17269
17270 fi
17271
17272
17273 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17274 # define __SSE4_2__ in that case.
17275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17276 /* end confdefs.h.  */
17277
17278 int
17279 main ()
17280 {
17281
17282 #ifndef __SSE4_2__
17283 #error __SSE4_2__ not defined
17284 #endif
17285
17286   ;
17287   return 0;
17288 }
17289 _ACEOF
17290 if ac_fn_c_try_compile "$LINENO"; then :
17291   SSE4_2_TARGETED=1
17292 fi
17293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17294
17295 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17296 #
17297 # First check if __crc32c* intrinsics can be used with the default compiler
17298 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17299 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17301 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17302 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17303   $as_echo_n "(cached) " >&6
17304 else
17305   pgac_save_CFLAGS=$CFLAGS
17306 CFLAGS="$pgac_save_CFLAGS "
17307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17308 /* end confdefs.h.  */
17309 #include <arm_acle.h>
17310 int
17311 main ()
17312 {
17313 unsigned int crc = 0;
17314    crc = __crc32cb(crc, 0);
17315    crc = __crc32ch(crc, 0);
17316    crc = __crc32cw(crc, 0);
17317    crc = __crc32cd(crc, 0);
17318    /* return computed value, to prevent the above being optimized away */
17319    return crc == 0;
17320   ;
17321   return 0;
17322 }
17323 _ACEOF
17324 if ac_fn_c_try_link "$LINENO"; then :
17325   pgac_cv_armv8_crc32c_intrinsics_=yes
17326 else
17327   pgac_cv_armv8_crc32c_intrinsics_=no
17328 fi
17329 rm -f core conftest.err conftest.$ac_objext \
17330     conftest$ac_exeext conftest.$ac_ext
17331 CFLAGS="$pgac_save_CFLAGS"
17332 fi
17333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17334 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17335 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17336   CFLAGS_ARMV8_CRC32C=""
17337   pgac_armv8_crc32c_intrinsics=yes
17338 fi
17339
17340 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17341   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17342 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17343 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17344   $as_echo_n "(cached) " >&6
17345 else
17346   pgac_save_CFLAGS=$CFLAGS
17347 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17349 /* end confdefs.h.  */
17350 #include <arm_acle.h>
17351 int
17352 main ()
17353 {
17354 unsigned int crc = 0;
17355    crc = __crc32cb(crc, 0);
17356    crc = __crc32ch(crc, 0);
17357    crc = __crc32cw(crc, 0);
17358    crc = __crc32cd(crc, 0);
17359    /* return computed value, to prevent the above being optimized away */
17360    return crc == 0;
17361   ;
17362   return 0;
17363 }
17364 _ACEOF
17365 if ac_fn_c_try_link "$LINENO"; then :
17366   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17367 else
17368   pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17369 fi
17370 rm -f core conftest.err conftest.$ac_objext \
17371     conftest$ac_exeext conftest.$ac_ext
17372 CFLAGS="$pgac_save_CFLAGS"
17373 fi
17374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17375 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17376 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17377   CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17378   pgac_armv8_crc32c_intrinsics=yes
17379 fi
17380
17381 fi
17382
17383
17384 # Select CRC-32C implementation.
17385 #
17386 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17387 # use the special CRC instructions for calculating CRC-32C. If we're not
17388 # targeting such a processor, but we can nevertheless produce code that uses
17389 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17390 # implementations and select which one to use at runtime, depending on whether
17391 # SSE 4.2 is supported by the processor we're running on.
17392 #
17393 # Similarly, if we are targeting an ARM processor that has the CRC
17394 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17395 # we're not targeting such a processor, but can nevertheless produce code that
17396 # uses the CRC instructions, compile both, and select at runtime.
17397 #
17398 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17399 # in the template or configure command line.
17400 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
17401   # Use Intel SSE 4.2 if available.
17402   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17403     USE_SSE42_CRC32C=1
17404   else
17405     # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17406     # the runtime check.
17407     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
17408       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17409     else
17410       # Use ARM CRC Extension if available.
17411       if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17412         USE_ARMV8_CRC32C=1
17413       else
17414         # ARM CRC Extension, with runtime check?
17415         if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17416           USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17417         else
17418           # fall back to slicing-by-8 algorithm, which doesn't require any
17419           # special CPU support.
17420           USE_SLICING_BY_8_CRC32C=1
17421         fi
17422       fi
17423     fi
17424   fi
17425 fi
17426
17427 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17429 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17430 if test x"$USE_SSE42_CRC32C" = x"1"; then
17431
17432 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17433
17434   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17436 $as_echo "SSE 4.2" >&6; }
17437 else
17438   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17439
17440 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17441
17442     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17443     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17444 $as_echo "SSE 4.2 with runtime check" >&6; }
17445   else
17446     if test x"$USE_ARMV8_CRC32C" = x"1"; then
17447
17448 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17449
17450       PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17451       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17452 $as_echo "ARMv8 CRC instructions" >&6; }
17453     else
17454       if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17455
17456 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17457
17458         PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17459         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17460 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17461       else
17462
17463 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17464
17465         PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17466         { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17467 $as_echo "slicing-by-8" >&6; }
17468       fi
17469     fi
17470   fi
17471 fi
17472
17473
17474
17475 # Select semaphore implementation type.
17476 if test "$PORTNAME" != "win32"; then
17477   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17478     # Need sem_open for this
17479     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17480 $as_echo_n "checking for library containing sem_open... " >&6; }
17481 if ${ac_cv_search_sem_open+:} false; then :
17482   $as_echo_n "(cached) " >&6
17483 else
17484   ac_func_search_save_LIBS=$LIBS
17485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17486 /* end confdefs.h.  */
17487
17488 /* Override any GCC internal prototype to avoid an error.
17489    Use char because int might match the return type of a GCC
17490    builtin and then its argument prototype would still apply.  */
17491 #ifdef __cplusplus
17492 extern "C"
17493 #endif
17494 char sem_open ();
17495 int
17496 main ()
17497 {
17498 return sem_open ();
17499   ;
17500   return 0;
17501 }
17502 _ACEOF
17503 for ac_lib in '' rt pthread; do
17504   if test -z "$ac_lib"; then
17505     ac_res="none required"
17506   else
17507     ac_res=-l$ac_lib
17508     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17509   fi
17510   if ac_fn_c_try_link "$LINENO"; then :
17511   ac_cv_search_sem_open=$ac_res
17512 fi
17513 rm -f core conftest.err conftest.$ac_objext \
17514     conftest$ac_exeext
17515   if ${ac_cv_search_sem_open+:} false; then :
17516   break
17517 fi
17518 done
17519 if ${ac_cv_search_sem_open+:} false; then :
17520
17521 else
17522   ac_cv_search_sem_open=no
17523 fi
17524 rm conftest.$ac_ext
17525 LIBS=$ac_func_search_save_LIBS
17526 fi
17527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17528 $as_echo "$ac_cv_search_sem_open" >&6; }
17529 ac_res=$ac_cv_search_sem_open
17530 if test "$ac_res" != no; then :
17531   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17532   USE_NAMED_POSIX_SEMAPHORES=1
17533 fi
17534
17535   fi
17536   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17537     # Need sem_init for this
17538     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17539 $as_echo_n "checking for library containing sem_init... " >&6; }
17540 if ${ac_cv_search_sem_init+:} false; then :
17541   $as_echo_n "(cached) " >&6
17542 else
17543   ac_func_search_save_LIBS=$LIBS
17544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17545 /* end confdefs.h.  */
17546
17547 /* Override any GCC internal prototype to avoid an error.
17548    Use char because int might match the return type of a GCC
17549    builtin and then its argument prototype would still apply.  */
17550 #ifdef __cplusplus
17551 extern "C"
17552 #endif
17553 char sem_init ();
17554 int
17555 main ()
17556 {
17557 return sem_init ();
17558   ;
17559   return 0;
17560 }
17561 _ACEOF
17562 for ac_lib in '' rt pthread; do
17563   if test -z "$ac_lib"; then
17564     ac_res="none required"
17565   else
17566     ac_res=-l$ac_lib
17567     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17568   fi
17569   if ac_fn_c_try_link "$LINENO"; then :
17570   ac_cv_search_sem_init=$ac_res
17571 fi
17572 rm -f core conftest.err conftest.$ac_objext \
17573     conftest$ac_exeext
17574   if ${ac_cv_search_sem_init+:} false; then :
17575   break
17576 fi
17577 done
17578 if ${ac_cv_search_sem_init+:} false; then :
17579
17580 else
17581   ac_cv_search_sem_init=no
17582 fi
17583 rm conftest.$ac_ext
17584 LIBS=$ac_func_search_save_LIBS
17585 fi
17586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17587 $as_echo "$ac_cv_search_sem_init" >&6; }
17588 ac_res=$ac_cv_search_sem_init
17589 if test "$ac_res" != no; then :
17590   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17591   USE_UNNAMED_POSIX_SEMAPHORES=1
17592 fi
17593
17594   fi
17595   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17596 $as_echo_n "checking which semaphore API to use... " >&6; }
17597   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17598
17599 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17600
17601     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17602     sematype="named POSIX"
17603   else
17604     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17605
17606 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17607
17608       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17609       sematype="unnamed POSIX"
17610     else
17611
17612 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17613
17614       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17615       sematype="System V"
17616     fi
17617   fi
17618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17619 $as_echo "$sematype" >&6; }
17620 else
17621
17622 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17623
17624   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17625 fi
17626
17627
17628 # Select shared-memory implementation type.
17629 if test "$PORTNAME" != "win32"; then
17630
17631 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17632
17633   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17634 else
17635
17636 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17637
17638   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17639 fi
17640
17641 # Select random number source
17642 #
17643 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17644 # in the template or configure command line.
17645
17646 # If not selected manually, try to select a source automatically.
17647 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
17648   if test x"$with_openssl" = x"yes" ; then
17649     USE_OPENSSL_RANDOM=1
17650   elif test "$PORTNAME" = "win32" ; then
17651     USE_WIN32_RANDOM=1
17652   else
17653     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17654 $as_echo_n "checking for /dev/urandom... " >&6; }
17655 if ${ac_cv_file__dev_urandom+:} false; then :
17656   $as_echo_n "(cached) " >&6
17657 else
17658   test "$cross_compiling" = yes &&
17659   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17660 if test -r "/dev/urandom"; then
17661   ac_cv_file__dev_urandom=yes
17662 else
17663   ac_cv_file__dev_urandom=no
17664 fi
17665 fi
17666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17667 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17668 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17669
17670 fi
17671
17672
17673     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17674       USE_DEV_URANDOM=1
17675     fi
17676   fi
17677 fi
17678
17679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17680 $as_echo_n "checking which random number source to use... " >&6; }
17681 if test "$enable_strong_random" = yes ; then
17682   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17683
17684 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17685
17686     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17687 $as_echo "OpenSSL" >&6; }
17688   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
17689
17690 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
17691
17692     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17693 $as_echo "Windows native" >&6; }
17694   elif test x"$USE_DEV_URANDOM" = x"1" ; then
17695
17696 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
17697
17698     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17699 $as_echo "/dev/urandom" >&6; }
17700   else
17701     as_fn_error $? "
17702 no source of strong random numbers was found
17703 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
17704 for authentication protocols. You can use --disable-strong-random to use a
17705 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
17706   fi
17707
17708 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
17709
17710 else
17711     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
17712 $as_echo "weak builtin PRNG" >&6; }
17713     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17714 *** Not using a strong random number source may be insecure." >&5
17715 $as_echo "$as_me: WARNING:
17716 *** Not using a strong random number source may be insecure." >&2;}
17717 fi
17718
17719 # If not set in template file, set bytes to use libc memset()
17720 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17721   MEMSET_LOOP_LIMIT=1024
17722 fi
17723
17724 cat >>confdefs.h <<_ACEOF
17725 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17726 _ACEOF
17727
17728
17729
17730 if test "$enable_nls" = yes ; then
17731
17732   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17733 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17734 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17735   $as_echo_n "(cached) " >&6
17736 else
17737   ac_func_search_save_LIBS=$LIBS
17738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17739 /* end confdefs.h.  */
17740
17741 /* Override any GCC internal prototype to avoid an error.
17742    Use char because int might match the return type of a GCC
17743    builtin and then its argument prototype would still apply.  */
17744 #ifdef __cplusplus
17745 extern "C"
17746 #endif
17747 char bind_textdomain_codeset ();
17748 int
17749 main ()
17750 {
17751 return bind_textdomain_codeset ();
17752   ;
17753   return 0;
17754 }
17755 _ACEOF
17756 for ac_lib in '' intl; do
17757   if test -z "$ac_lib"; then
17758     ac_res="none required"
17759   else
17760     ac_res=-l$ac_lib
17761     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17762   fi
17763   if ac_fn_c_try_link "$LINENO"; then :
17764   ac_cv_search_bind_textdomain_codeset=$ac_res
17765 fi
17766 rm -f core conftest.err conftest.$ac_objext \
17767     conftest$ac_exeext
17768   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17769   break
17770 fi
17771 done
17772 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17773
17774 else
17775   ac_cv_search_bind_textdomain_codeset=no
17776 fi
17777 rm conftest.$ac_ext
17778 LIBS=$ac_func_search_save_LIBS
17779 fi
17780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
17781 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
17782 ac_res=$ac_cv_search_bind_textdomain_codeset
17783 if test "$ac_res" != no; then :
17784   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17785
17786 else
17787   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
17788 fi
17789
17790   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
17791 if test "x$ac_cv_header_libintl_h" = xyes; then :
17792
17793 else
17794   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
17795 fi
17796
17797
17798   if test -z "$MSGFMT"; then
17799   for ac_prog in msgfmt
17800 do
17801   # Extract the first word of "$ac_prog", so it can be a program name with args.
17802 set dummy $ac_prog; ac_word=$2
17803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17804 $as_echo_n "checking for $ac_word... " >&6; }
17805 if ${ac_cv_path_MSGFMT+:} false; then :
17806   $as_echo_n "(cached) " >&6
17807 else
17808   case $MSGFMT in
17809   [\\/]* | ?:[\\/]*)
17810   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
17811   ;;
17812   *)
17813   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17814 for as_dir in $PATH
17815 do
17816   IFS=$as_save_IFS
17817   test -z "$as_dir" && as_dir=.
17818     for ac_exec_ext in '' $ac_executable_extensions; do
17819   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17820     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
17821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17822     break 2
17823   fi
17824 done
17825   done
17826 IFS=$as_save_IFS
17827
17828   ;;
17829 esac
17830 fi
17831 MSGFMT=$ac_cv_path_MSGFMT
17832 if test -n "$MSGFMT"; then
17833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17834 $as_echo "$MSGFMT" >&6; }
17835 else
17836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17837 $as_echo "no" >&6; }
17838 fi
17839
17840
17841   test -n "$MSGFMT" && break
17842 done
17843
17844 else
17845   # Report the value of MSGFMT in configure's output in all cases.
17846   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
17847 $as_echo_n "checking for MSGFMT... " >&6; }
17848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17849 $as_echo "$MSGFMT" >&6; }
17850 fi
17851
17852   if test -z "$MSGFMT"; then
17853     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
17854   fi
17855   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
17856 $as_echo_n "checking for msgfmt flags... " >&6; }
17857 if ${pgac_cv_msgfmt_flags+:} false; then :
17858   $as_echo_n "(cached) " >&6
17859 else
17860   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
17861     pgac_cv_msgfmt_flags=-c
17862 fi
17863 fi
17864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
17865 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
17866   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
17867
17868   if test -z "$MSGMERGE"; then
17869   for ac_prog in msgmerge
17870 do
17871   # Extract the first word of "$ac_prog", so it can be a program name with args.
17872 set dummy $ac_prog; ac_word=$2
17873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17874 $as_echo_n "checking for $ac_word... " >&6; }
17875 if ${ac_cv_path_MSGMERGE+:} false; then :
17876   $as_echo_n "(cached) " >&6
17877 else
17878   case $MSGMERGE in
17879   [\\/]* | ?:[\\/]*)
17880   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
17881   ;;
17882   *)
17883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17884 for as_dir in $PATH
17885 do
17886   IFS=$as_save_IFS
17887   test -z "$as_dir" && as_dir=.
17888     for ac_exec_ext in '' $ac_executable_extensions; do
17889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17890     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
17891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17892     break 2
17893   fi
17894 done
17895   done
17896 IFS=$as_save_IFS
17897
17898   ;;
17899 esac
17900 fi
17901 MSGMERGE=$ac_cv_path_MSGMERGE
17902 if test -n "$MSGMERGE"; then
17903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17904 $as_echo "$MSGMERGE" >&6; }
17905 else
17906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17907 $as_echo "no" >&6; }
17908 fi
17909
17910
17911   test -n "$MSGMERGE" && break
17912 done
17913
17914 else
17915   # Report the value of MSGMERGE in configure's output in all cases.
17916   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
17917 $as_echo_n "checking for MSGMERGE... " >&6; }
17918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17919 $as_echo "$MSGMERGE" >&6; }
17920 fi
17921
17922   if test -z "$XGETTEXT"; then
17923   for ac_prog in xgettext
17924 do
17925   # Extract the first word of "$ac_prog", so it can be a program name with args.
17926 set dummy $ac_prog; ac_word=$2
17927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17928 $as_echo_n "checking for $ac_word... " >&6; }
17929 if ${ac_cv_path_XGETTEXT+:} false; then :
17930   $as_echo_n "(cached) " >&6
17931 else
17932   case $XGETTEXT in
17933   [\\/]* | ?:[\\/]*)
17934   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
17935   ;;
17936   *)
17937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17938 for as_dir in $PATH
17939 do
17940   IFS=$as_save_IFS
17941   test -z "$as_dir" && as_dir=.
17942     for ac_exec_ext in '' $ac_executable_extensions; do
17943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17944     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
17945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17946     break 2
17947   fi
17948 done
17949   done
17950 IFS=$as_save_IFS
17951
17952   ;;
17953 esac
17954 fi
17955 XGETTEXT=$ac_cv_path_XGETTEXT
17956 if test -n "$XGETTEXT"; then
17957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
17958 $as_echo "$XGETTEXT" >&6; }
17959 else
17960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17961 $as_echo "no" >&6; }
17962 fi
17963
17964
17965   test -n "$XGETTEXT" && break
17966 done
17967
17968 else
17969   # Report the value of XGETTEXT in configure's output in all cases.
17970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
17971 $as_echo_n "checking for XGETTEXT... " >&6; }
17972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
17973 $as_echo "$XGETTEXT" >&6; }
17974 fi
17975
17976
17977 fi
17978
17979 # Check for Tcl configuration script tclConfig.sh
17980 if test "$with_tcl" = yes; then
17981     if test -z "$TCLSH"; then
17982   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
17983 do
17984   # Extract the first word of "$ac_prog", so it can be a program name with args.
17985 set dummy $ac_prog; ac_word=$2
17986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17987 $as_echo_n "checking for $ac_word... " >&6; }
17988 if ${ac_cv_path_TCLSH+:} false; then :
17989   $as_echo_n "(cached) " >&6
17990 else
17991   case $TCLSH in
17992   [\\/]* | ?:[\\/]*)
17993   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
17994   ;;
17995   *)
17996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17997 for as_dir in $PATH
17998 do
17999   IFS=$as_save_IFS
18000   test -z "$as_dir" && as_dir=.
18001     for ac_exec_ext in '' $ac_executable_extensions; do
18002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18003     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18005     break 2
18006   fi
18007 done
18008   done
18009 IFS=$as_save_IFS
18010
18011   ;;
18012 esac
18013 fi
18014 TCLSH=$ac_cv_path_TCLSH
18015 if test -n "$TCLSH"; then
18016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18017 $as_echo "$TCLSH" >&6; }
18018 else
18019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18020 $as_echo "no" >&6; }
18021 fi
18022
18023
18024   test -n "$TCLSH" && break
18025 done
18026
18027 else
18028   # Report the value of TCLSH in configure's output in all cases.
18029   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18030 $as_echo_n "checking for TCLSH... " >&6; }
18031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18032 $as_echo "$TCLSH" >&6; }
18033 fi
18034
18035 if test x"$TCLSH" = x""; then
18036   as_fn_error $? "Tcl shell not found" "$LINENO" 5
18037 fi
18038
18039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18040 $as_echo_n "checking for tclConfig.sh... " >&6; }
18041 # Let user override test
18042 if test -z "$TCL_CONFIG_SH"; then
18043     pgac_test_dirs="$with_tclconfig"
18044
18045     set X $pgac_test_dirs; shift
18046     if test $# -eq 0; then
18047         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18048         set X `echo 'puts $auto_path' | $TCLSH`; shift
18049     fi
18050
18051     for pgac_dir do
18052         if test -r "$pgac_dir/tclConfig.sh"; then
18053             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18054             break
18055         fi
18056     done
18057 fi
18058
18059 if test -z "$TCL_CONFIG_SH"; then
18060     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18061 $as_echo "no" >&6; }
18062     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18063 else
18064     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18065 $as_echo "$TCL_CONFIG_SH" >&6; }
18066 fi
18067
18068
18069
18070     . "$TCL_CONFIG_SH"
18071 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18072 eval TCL_LIBS=\"$TCL_LIBS\"
18073 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18074 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18075
18076         if test "$TCL_SHARED_BUILD" != 1; then
18077       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18078 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18079     fi
18080     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18081     ac_save_CPPFLAGS=$CPPFLAGS
18082     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18083     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18084 if test "x$ac_cv_header_tcl_h" = xyes; then :
18085
18086 else
18087   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18088 fi
18089
18090
18091     CPPFLAGS=$ac_save_CPPFLAGS
18092 fi
18093
18094 # check for <perl.h>
18095 if test "$with_perl" = yes; then
18096   ac_save_CPPFLAGS=$CPPFLAGS
18097   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
18098   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18099 "
18100 if test "x$ac_cv_header_perl_h" = xyes; then :
18101
18102 else
18103   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18104 fi
18105
18106
18107   # While we're at it, check that we can link to libperl.
18108   # On most platforms, if perl.h is there then libperl.so will be too, but at
18109   # this writing Debian packages them separately.  There is no known reason to
18110   # waste cycles on separate probes for the Tcl or Python libraries, though.
18111   pgac_save_LIBS=$LIBS
18112   LIBS="$perl_embed_ldflags"
18113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18114 $as_echo_n "checking for libperl... " >&6; }
18115   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18116 /* end confdefs.h.  */
18117
18118 #include <EXTERN.h>
18119 #include <perl.h>
18120
18121 int
18122 main ()
18123 {
18124 perl_alloc();
18125   ;
18126   return 0;
18127 }
18128 _ACEOF
18129 if ac_fn_c_try_link "$LINENO"; then :
18130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18131 $as_echo "yes" >&6; }
18132 else
18133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18134 $as_echo "no" >&6; }
18135      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18136 fi
18137 rm -f core conftest.err conftest.$ac_objext \
18138     conftest$ac_exeext conftest.$ac_ext
18139   LIBS=$pgac_save_LIBS
18140   CPPFLAGS=$ac_save_CPPFLAGS
18141 fi
18142
18143 # check for <Python.h>
18144 if test "$with_python" = yes; then
18145   ac_save_CPPFLAGS=$CPPFLAGS
18146   CPPFLAGS="$python_includespec $CPPFLAGS"
18147   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18148 if test "x$ac_cv_header_Python_h" = xyes; then :
18149
18150 else
18151   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18152 fi
18153
18154
18155   CPPFLAGS=$ac_save_CPPFLAGS
18156 fi
18157
18158 #
18159 # Check for DocBook and tools
18160 #
18161 if test -z "$XMLLINT"; then
18162   for ac_prog in xmllint
18163 do
18164   # Extract the first word of "$ac_prog", so it can be a program name with args.
18165 set dummy $ac_prog; ac_word=$2
18166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18167 $as_echo_n "checking for $ac_word... " >&6; }
18168 if ${ac_cv_path_XMLLINT+:} false; then :
18169   $as_echo_n "(cached) " >&6
18170 else
18171   case $XMLLINT in
18172   [\\/]* | ?:[\\/]*)
18173   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18174   ;;
18175   *)
18176   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18177 for as_dir in $PATH
18178 do
18179   IFS=$as_save_IFS
18180   test -z "$as_dir" && as_dir=.
18181     for ac_exec_ext in '' $ac_executable_extensions; do
18182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18183     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18185     break 2
18186   fi
18187 done
18188   done
18189 IFS=$as_save_IFS
18190
18191   ;;
18192 esac
18193 fi
18194 XMLLINT=$ac_cv_path_XMLLINT
18195 if test -n "$XMLLINT"; then
18196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18197 $as_echo "$XMLLINT" >&6; }
18198 else
18199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18200 $as_echo "no" >&6; }
18201 fi
18202
18203
18204   test -n "$XMLLINT" && break
18205 done
18206
18207 else
18208   # Report the value of XMLLINT in configure's output in all cases.
18209   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18210 $as_echo_n "checking for XMLLINT... " >&6; }
18211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18212 $as_echo "$XMLLINT" >&6; }
18213 fi
18214
18215
18216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18217 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18218 if ${pgac_cv_check_docbook+:} false; then :
18219   $as_echo_n "(cached) " >&6
18220 else
18221   cat >conftest.xml <<EOF
18222 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18223 <book>
18224  <title>test</title>
18225  <chapter>
18226   <title>random</title>
18227    <sect1>
18228     <title>testsect</title>
18229     <para>text</para>
18230   </sect1>
18231  </chapter>
18232 </book>
18233 EOF
18234
18235 pgac_cv_check_docbook=no
18236
18237 if test -n "$XMLLINT"; then
18238   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18239   if test $? -eq 0; then
18240     pgac_cv_check_docbook=yes
18241   fi
18242 fi
18243 rm -f conftest.xml
18244 fi
18245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18246 $as_echo "$pgac_cv_check_docbook" >&6; }
18247
18248 have_docbook=$pgac_cv_check_docbook
18249
18250
18251 if test -z "$DBTOEPUB"; then
18252   for ac_prog in dbtoepub
18253 do
18254   # Extract the first word of "$ac_prog", so it can be a program name with args.
18255 set dummy $ac_prog; ac_word=$2
18256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18257 $as_echo_n "checking for $ac_word... " >&6; }
18258 if ${ac_cv_path_DBTOEPUB+:} false; then :
18259   $as_echo_n "(cached) " >&6
18260 else
18261   case $DBTOEPUB in
18262   [\\/]* | ?:[\\/]*)
18263   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18264   ;;
18265   *)
18266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18267 for as_dir in $PATH
18268 do
18269   IFS=$as_save_IFS
18270   test -z "$as_dir" && as_dir=.
18271     for ac_exec_ext in '' $ac_executable_extensions; do
18272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18273     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18275     break 2
18276   fi
18277 done
18278   done
18279 IFS=$as_save_IFS
18280
18281   ;;
18282 esac
18283 fi
18284 DBTOEPUB=$ac_cv_path_DBTOEPUB
18285 if test -n "$DBTOEPUB"; then
18286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18287 $as_echo "$DBTOEPUB" >&6; }
18288 else
18289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18290 $as_echo "no" >&6; }
18291 fi
18292
18293
18294   test -n "$DBTOEPUB" && break
18295 done
18296
18297 else
18298   # Report the value of DBTOEPUB in configure's output in all cases.
18299   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18300 $as_echo_n "checking for DBTOEPUB... " >&6; }
18301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18302 $as_echo "$DBTOEPUB" >&6; }
18303 fi
18304
18305 if test -z "$XSLTPROC"; then
18306   for ac_prog in xsltproc
18307 do
18308   # Extract the first word of "$ac_prog", so it can be a program name with args.
18309 set dummy $ac_prog; ac_word=$2
18310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18311 $as_echo_n "checking for $ac_word... " >&6; }
18312 if ${ac_cv_path_XSLTPROC+:} false; then :
18313   $as_echo_n "(cached) " >&6
18314 else
18315   case $XSLTPROC in
18316   [\\/]* | ?:[\\/]*)
18317   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18318   ;;
18319   *)
18320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18321 for as_dir in $PATH
18322 do
18323   IFS=$as_save_IFS
18324   test -z "$as_dir" && as_dir=.
18325     for ac_exec_ext in '' $ac_executable_extensions; do
18326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18327     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18329     break 2
18330   fi
18331 done
18332   done
18333 IFS=$as_save_IFS
18334
18335   ;;
18336 esac
18337 fi
18338 XSLTPROC=$ac_cv_path_XSLTPROC
18339 if test -n "$XSLTPROC"; then
18340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18341 $as_echo "$XSLTPROC" >&6; }
18342 else
18343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18344 $as_echo "no" >&6; }
18345 fi
18346
18347
18348   test -n "$XSLTPROC" && break
18349 done
18350
18351 else
18352   # Report the value of XSLTPROC in configure's output in all cases.
18353   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18354 $as_echo_n "checking for XSLTPROC... " >&6; }
18355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18356 $as_echo "$XSLTPROC" >&6; }
18357 fi
18358
18359 if test -z "$FOP"; then
18360   for ac_prog in fop
18361 do
18362   # Extract the first word of "$ac_prog", so it can be a program name with args.
18363 set dummy $ac_prog; ac_word=$2
18364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18365 $as_echo_n "checking for $ac_word... " >&6; }
18366 if ${ac_cv_path_FOP+:} false; then :
18367   $as_echo_n "(cached) " >&6
18368 else
18369   case $FOP in
18370   [\\/]* | ?:[\\/]*)
18371   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18372   ;;
18373   *)
18374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18375 for as_dir in $PATH
18376 do
18377   IFS=$as_save_IFS
18378   test -z "$as_dir" && as_dir=.
18379     for ac_exec_ext in '' $ac_executable_extensions; do
18380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18381     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18383     break 2
18384   fi
18385 done
18386   done
18387 IFS=$as_save_IFS
18388
18389   ;;
18390 esac
18391 fi
18392 FOP=$ac_cv_path_FOP
18393 if test -n "$FOP"; then
18394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18395 $as_echo "$FOP" >&6; }
18396 else
18397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18398 $as_echo "no" >&6; }
18399 fi
18400
18401
18402   test -n "$FOP" && break
18403 done
18404
18405 else
18406   # Report the value of FOP in configure's output in all cases.
18407   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18408 $as_echo_n "checking for FOP... " >&6; }
18409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18410 $as_echo "$FOP" >&6; }
18411 fi
18412
18413
18414 #
18415 # Check for test tools
18416 #
18417 if test "$enable_tap_tests" = yes; then
18418   # Check for necessary modules, unless user has specified the "prove" to use;
18419   # in that case it's her responsibility to have a working configuration.
18420   # (prove might be part of a different Perl installation than perl, eg on
18421   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18422   if test -z "$PROVE"; then
18423     # Test::More and Time::HiRes are supposed to be part of core Perl,
18424     # but some distros omit them in a minimal installation.
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435 # Make sure we have perl
18436 if test -z "$PERL"; then
18437 # Extract the first word of "perl", so it can be a program name with args.
18438 set dummy perl; 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_prog_PERL+:} false; then :
18442   $as_echo_n "(cached) " >&6
18443 else
18444   if test -n "$PERL"; then
18445   ac_cv_prog_PERL="$PERL" # Let the user override the test.
18446 else
18447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18448 for as_dir in $PATH
18449 do
18450   IFS=$as_save_IFS
18451   test -z "$as_dir" && as_dir=.
18452     for ac_exec_ext in '' $ac_executable_extensions; do
18453   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18454     ac_cv_prog_PERL="perl"
18455     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18456     break 2
18457   fi
18458 done
18459   done
18460 IFS=$as_save_IFS
18461
18462 fi
18463 fi
18464 PERL=$ac_cv_prog_PERL
18465 if test -n "$PERL"; then
18466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18467 $as_echo "$PERL" >&6; }
18468 else
18469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18470 $as_echo "no" >&6; }
18471 fi
18472
18473
18474 fi
18475
18476 if test "x$PERL" != x; then
18477   ax_perl_modules_failed=0
18478   for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18479     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18480 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18481
18482     # Would be nice to log result here, but can't rely on autoconf internals
18483     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18484     if test $? -ne 0; then
18485       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18486 $as_echo "no" >&6; };
18487       ax_perl_modules_failed=1
18488    else
18489       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18490 $as_echo "ok" >&6; };
18491     fi
18492   done
18493
18494   # Run optional shell commands
18495   if test "$ax_perl_modules_failed" = 0; then
18496     :
18497
18498   else
18499     :
18500     as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18501   fi
18502 else
18503   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18504 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18505 fi
18506   fi
18507   # Now make sure we know where prove is
18508   if test -z "$PROVE"; then
18509   for ac_prog in prove
18510 do
18511   # Extract the first word of "$ac_prog", so it can be a program name with args.
18512 set dummy $ac_prog; ac_word=$2
18513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18514 $as_echo_n "checking for $ac_word... " >&6; }
18515 if ${ac_cv_path_PROVE+:} false; then :
18516   $as_echo_n "(cached) " >&6
18517 else
18518   case $PROVE in
18519   [\\/]* | ?:[\\/]*)
18520   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18521   ;;
18522   *)
18523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18524 for as_dir in $PATH
18525 do
18526   IFS=$as_save_IFS
18527   test -z "$as_dir" && as_dir=.
18528     for ac_exec_ext in '' $ac_executable_extensions; do
18529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18530     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18532     break 2
18533   fi
18534 done
18535   done
18536 IFS=$as_save_IFS
18537
18538   ;;
18539 esac
18540 fi
18541 PROVE=$ac_cv_path_PROVE
18542 if test -n "$PROVE"; then
18543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18544 $as_echo "$PROVE" >&6; }
18545 else
18546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18547 $as_echo "no" >&6; }
18548 fi
18549
18550
18551   test -n "$PROVE" && break
18552 done
18553
18554 else
18555   # Report the value of PROVE in configure's output in all cases.
18556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18557 $as_echo_n "checking for PROVE... " >&6; }
18558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18559 $as_echo "$PROVE" >&6; }
18560 fi
18561
18562   if test -z "$PROVE"; then
18563     as_fn_error $? "prove not found" "$LINENO" 5
18564   fi
18565 fi
18566
18567 # Thread testing
18568
18569 # We have to run the thread test near the end so we have all our symbols
18570 # defined.  Cross compiling throws a warning.
18571 #
18572 if test "$enable_thread_safety" = yes; then
18573 if test "$PORTNAME" != "win32"
18574 then
18575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18576 $as_echo_n "checking thread safety of required library functions... " >&6; }
18577
18578 _CFLAGS="$CFLAGS"
18579 _LIBS="$LIBS"
18580 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18581 LIBS="$LIBS $PTHREAD_LIBS"
18582 if test "$cross_compiling" = yes; then :
18583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18584 $as_echo "maybe" >&6; }
18585   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18586 *** Skipping thread test program because of cross-compile build.
18587 *** Run the program in src/test/thread on the target machine.
18588 " >&5
18589 $as_echo "$as_me: WARNING:
18590 *** Skipping thread test program because of cross-compile build.
18591 *** Run the program in src/test/thread on the target machine.
18592 " >&2;}
18593 else
18594   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18595 /* end confdefs.h.  */
18596 #include "$srcdir/src/test/thread/thread_test.c"
18597 _ACEOF
18598 if ac_fn_c_try_run "$LINENO"; then :
18599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18600 $as_echo "yes" >&6; }
18601 else
18602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18603 $as_echo "no" >&6; }
18604   as_fn_error $? "thread test program failed
18605 This platform is not thread-safe.  Check the file 'config.log' or compile
18606 and run src/test/thread/thread_test for the exact reason.
18607 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18608 fi
18609 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18610   conftest.$ac_objext conftest.beam conftest.$ac_ext
18611 fi
18612
18613 CFLAGS="$_CFLAGS"
18614 LIBS="$_LIBS"
18615 else
18616 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18617 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18618 fi
18619 fi
18620
18621 # If compiler will take -Wl,--as-needed (or various platform-specific
18622 # spellings thereof) then add that to LDFLAGS.  This is much easier than
18623 # trying to filter LIBS to the minimum for each executable.
18624 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18625 # libreadline; therefore we postpone testing it until we know what library
18626 # dependencies readline has.  The test code will try to link with $LIBS.
18627 if test "$with_readline" = yes; then
18628   link_test_func=readline
18629 else
18630   link_test_func=exit
18631 fi
18632
18633 if test "$PORTNAME" = "darwin"; then
18634   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18635 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18636 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18637   $as_echo_n "(cached) " >&6
18638 else
18639   pgac_save_LDFLAGS=$LDFLAGS
18640 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18641 if test "$cross_compiling" = yes; then :
18642   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18643 else
18644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18645 /* end confdefs.h.  */
18646 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18647 int
18648 main ()
18649 {
18650
18651   ;
18652   return 0;
18653 }
18654 _ACEOF
18655 if ac_fn_c_try_run "$LINENO"; then :
18656   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18657 else
18658   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18659 fi
18660 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18661   conftest.$ac_objext conftest.beam conftest.$ac_ext
18662 fi
18663
18664 LDFLAGS="$pgac_save_LDFLAGS"
18665 fi
18666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18667 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18668 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18669   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18670 fi
18671
18672 elif test "$PORTNAME" = "openbsd"; then
18673   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18674 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18675 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18676   $as_echo_n "(cached) " >&6
18677 else
18678   pgac_save_LDFLAGS=$LDFLAGS
18679 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18680 if test "$cross_compiling" = yes; then :
18681   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18682 else
18683   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18684 /* end confdefs.h.  */
18685 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18686 int
18687 main ()
18688 {
18689
18690   ;
18691   return 0;
18692 }
18693 _ACEOF
18694 if ac_fn_c_try_run "$LINENO"; then :
18695   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
18696 else
18697   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
18698 fi
18699 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18700   conftest.$ac_objext conftest.beam conftest.$ac_ext
18701 fi
18702
18703 LDFLAGS="$pgac_save_LDFLAGS"
18704 fi
18705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
18706 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
18707 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
18708   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
18709 fi
18710
18711 else
18712   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
18713 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
18714 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
18715   $as_echo_n "(cached) " >&6
18716 else
18717   pgac_save_LDFLAGS=$LDFLAGS
18718 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18719 if test "$cross_compiling" = yes; then :
18720   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
18721 else
18722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18723 /* end confdefs.h.  */
18724 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18725 int
18726 main ()
18727 {
18728
18729   ;
18730   return 0;
18731 }
18732 _ACEOF
18733 if ac_fn_c_try_run "$LINENO"; then :
18734   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
18735 else
18736   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
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 LDFLAGS="$pgac_save_LDFLAGS"
18743 fi
18744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
18745 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
18746 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
18747   LDFLAGS="$LDFLAGS -Wl,--as-needed"
18748 fi
18749
18750 fi
18751
18752 # Create compiler version string
18753 if test x"$GCC" = x"yes" ; then
18754   cc_string=`${CC} --version | sed q`
18755   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18756 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18757   cc_string=`${CC} -V 2>&1 | sed q`
18758 else
18759   cc_string=$CC
18760 fi
18761
18762
18763 cat >>confdefs.h <<_ACEOF
18764 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18765 _ACEOF
18766
18767
18768 # Supply a numeric version string for use by 3rd party add-ons
18769 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18770 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
18771 tr '.' '        ' |
18772 $AWK '{printf "%d%04d", $1, $2}'`"
18773
18774 cat >>confdefs.h <<_ACEOF
18775 #define PG_VERSION_NUM $PG_VERSION_NUM
18776 _ACEOF
18777
18778
18779
18780
18781 # Begin output steps
18782
18783 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
18784 $as_echo "$as_me: using compiler=$cc_string" >&6;}
18785 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
18786 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
18787 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
18788 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
18789 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
18790 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
18791 # Currently only used when LLVM is used
18792 if test "$with_llvm" = yes ; then
18793    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
18794 $as_echo "$as_me: using CXX=$CXX" >&6;}
18795    { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
18796 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
18797    { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
18798 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
18799    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
18800 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
18801    { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
18802 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
18803 fi
18804
18805 # prepare build tree if outside source tree
18806 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18807 # Note 2: /bin/pwd might be better than shell's built-in at getting
18808 #         a symlink-free name.
18809 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18810   vpath_build=no
18811 else
18812   vpath_build=yes
18813   if test "$no_create" != yes; then
18814     $as_echo_n "preparing build tree... " >&6
18815     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
18816     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
18817       || as_fn_error $? "failed" "$LINENO" 5
18818     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
18819 $as_echo "done" >&6; }
18820   fi
18821 fi
18822
18823
18824
18825 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
18826
18827
18828 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}"
18829
18830
18831 if test "$PORTNAME" = "win32"; then
18832 ac_config_commands="$ac_config_commands check_win32_symlinks"
18833
18834 fi
18835
18836 ac_config_headers="$ac_config_headers src/include/pg_config.h"
18837
18838
18839 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
18840
18841
18842 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
18843
18844
18845 cat >confcache <<\_ACEOF
18846 # This file is a shell script that caches the results of configure
18847 # tests run on this system so they can be shared between configure
18848 # scripts and configure runs, see configure's option --config-cache.
18849 # It is not useful on other systems.  If it contains results you don't
18850 # want to keep, you may remove or edit it.
18851 #
18852 # config.status only pays attention to the cache file if you give it
18853 # the --recheck option to rerun configure.
18854 #
18855 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18856 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18857 # following values.
18858
18859 _ACEOF
18860
18861 # The following way of writing the cache mishandles newlines in values,
18862 # but we know of no workaround that is simple, portable, and efficient.
18863 # So, we kill variables containing newlines.
18864 # Ultrix sh set writes to stderr and can't be redirected directly,
18865 # and sets the high bit in the cache file unless we assign to the vars.
18866 (
18867   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18868     eval ac_val=\$$ac_var
18869     case $ac_val in #(
18870     *${as_nl}*)
18871       case $ac_var in #(
18872       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18873 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18874       esac
18875       case $ac_var in #(
18876       _ | IFS | as_nl) ;; #(
18877       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18878       *) { eval $ac_var=; unset $ac_var;} ;;
18879       esac ;;
18880     esac
18881   done
18882
18883   (set) 2>&1 |
18884     case $as_nl`(ac_space=' '; set) 2>&1` in #(
18885     *${as_nl}ac_space=\ *)
18886       # `set' does not quote correctly, so add quotes: double-quote
18887       # substitution turns \\\\ into \\, and sed turns \\ into \.
18888       sed -n \
18889         "s/'/'\\\\''/g;
18890           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18891       ;; #(
18892     *)
18893       # `set' quotes correctly as required by POSIX, so do not add quotes.
18894       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18895       ;;
18896     esac |
18897     sort
18898 ) |
18899   sed '
18900      /^ac_cv_env_/b end
18901      t clear
18902      :clear
18903      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18904      t end
18905      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18906      :end' >>confcache
18907 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18908   if test -w "$cache_file"; then
18909     if test "x$cache_file" != "x/dev/null"; then
18910       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18911 $as_echo "$as_me: updating cache $cache_file" >&6;}
18912       if test ! -f "$cache_file" || test -h "$cache_file"; then
18913         cat confcache >"$cache_file"
18914       else
18915         case $cache_file in #(
18916         */* | ?:*)
18917           mv -f confcache "$cache_file"$$ &&
18918           mv -f "$cache_file"$$ "$cache_file" ;; #(
18919         *)
18920           mv -f confcache "$cache_file" ;;
18921         esac
18922       fi
18923     fi
18924   else
18925     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18926 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18927   fi
18928 fi
18929 rm -f confcache
18930
18931 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18932 # Let make expand exec_prefix.
18933 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18934
18935 DEFS=-DHAVE_CONFIG_H
18936
18937 ac_libobjs=
18938 ac_ltlibobjs=
18939 U=
18940 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18941   # 1. Remove the extension, and $U if already installed.
18942   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18943   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18944   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
18945   #    will be set to the directory where LIBOBJS objects are built.
18946   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18947   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18948 done
18949 LIBOBJS=$ac_libobjs
18950
18951 LTLIBOBJS=$ac_ltlibobjs
18952
18953
18954
18955
18956 : "${CONFIG_STATUS=./config.status}"
18957 ac_write_fail=0
18958 ac_clean_files_save=$ac_clean_files
18959 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18960 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18961 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18962 as_write_fail=0
18963 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
18964 #! $SHELL
18965 # Generated by $as_me.
18966 # Run this file to recreate the current configuration.
18967 # Compiler output produced by configure, useful for debugging
18968 # configure, is in config.log if it exists.
18969
18970 debug=false
18971 ac_cs_recheck=false
18972 ac_cs_silent=false
18973
18974 SHELL=\${CONFIG_SHELL-$SHELL}
18975 export SHELL
18976 _ASEOF
18977 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18978 ## -------------------- ##
18979 ## M4sh Initialization. ##
18980 ## -------------------- ##
18981
18982 # Be more Bourne compatible
18983 DUALCASE=1; export DUALCASE # for MKS sh
18984 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18985   emulate sh
18986   NULLCMD=:
18987   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18988   # is contrary to our usage.  Disable this feature.
18989   alias -g '${1+"$@"}'='"$@"'
18990   setopt NO_GLOB_SUBST
18991 else
18992   case `(set -o) 2>/dev/null` in #(
18993   *posix*) :
18994     set -o posix ;; #(
18995   *) :
18996      ;;
18997 esac
18998 fi
18999
19000
19001 as_nl='
19002 '
19003 export as_nl
19004 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19005 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19006 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19007 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19008 # Prefer a ksh shell builtin over an external printf program on Solaris,
19009 # but without wasting forks for bash or zsh.
19010 if test -z "$BASH_VERSION$ZSH_VERSION" \
19011     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19012   as_echo='print -r --'
19013   as_echo_n='print -rn --'
19014 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19015   as_echo='printf %s\n'
19016   as_echo_n='printf %s'
19017 else
19018   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19019     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19020     as_echo_n='/usr/ucb/echo -n'
19021   else
19022     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19023     as_echo_n_body='eval
19024       arg=$1;
19025       case $arg in #(
19026       *"$as_nl"*)
19027         expr "X$arg" : "X\\(.*\\)$as_nl";
19028         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19029       esac;
19030       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19031     '
19032     export as_echo_n_body
19033     as_echo_n='sh -c $as_echo_n_body as_echo'
19034   fi
19035   export as_echo_body
19036   as_echo='sh -c $as_echo_body as_echo'
19037 fi
19038
19039 # The user is always right.
19040 if test "${PATH_SEPARATOR+set}" != set; then
19041   PATH_SEPARATOR=:
19042   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19043     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19044       PATH_SEPARATOR=';'
19045   }
19046 fi
19047
19048
19049 # IFS
19050 # We need space, tab and new line, in precisely that order.  Quoting is
19051 # there to prevent editors from complaining about space-tab.
19052 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19053 # splitting by setting IFS to empty value.)
19054 IFS=" ""        $as_nl"
19055
19056 # Find who we are.  Look in the path if we contain no directory separator.
19057 as_myself=
19058 case $0 in #((
19059   *[\\/]* ) as_myself=$0 ;;
19060   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19061 for as_dir in $PATH
19062 do
19063   IFS=$as_save_IFS
19064   test -z "$as_dir" && as_dir=.
19065     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19066   done
19067 IFS=$as_save_IFS
19068
19069      ;;
19070 esac
19071 # We did not find ourselves, most probably we were run as `sh COMMAND'
19072 # in which case we are not to be found in the path.
19073 if test "x$as_myself" = x; then
19074   as_myself=$0
19075 fi
19076 if test ! -f "$as_myself"; then
19077   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19078   exit 1
19079 fi
19080
19081 # Unset variables that we do not need and which cause bugs (e.g. in
19082 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19083 # suppresses any "Segmentation fault" message there.  '((' could
19084 # trigger a bug in pdksh 5.2.14.
19085 for as_var in BASH_ENV ENV MAIL MAILPATH
19086 do eval test x\${$as_var+set} = xset \
19087   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19088 done
19089 PS1='$ '
19090 PS2='> '
19091 PS4='+ '
19092
19093 # NLS nuisances.
19094 LC_ALL=C
19095 export LC_ALL
19096 LANGUAGE=C
19097 export LANGUAGE
19098
19099 # CDPATH.
19100 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19101
19102
19103 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19104 # ----------------------------------------
19105 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19106 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19107 # script with STATUS, using 1 if that was 0.
19108 as_fn_error ()
19109 {
19110   as_status=$1; test $as_status -eq 0 && as_status=1
19111   if test "$4"; then
19112     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19113     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19114   fi
19115   $as_echo "$as_me: error: $2" >&2
19116   as_fn_exit $as_status
19117 } # as_fn_error
19118
19119
19120 # as_fn_set_status STATUS
19121 # -----------------------
19122 # Set $? to STATUS, without forking.
19123 as_fn_set_status ()
19124 {
19125   return $1
19126 } # as_fn_set_status
19127
19128 # as_fn_exit STATUS
19129 # -----------------
19130 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19131 as_fn_exit ()
19132 {
19133   set +e
19134   as_fn_set_status $1
19135   exit $1
19136 } # as_fn_exit
19137
19138 # as_fn_unset VAR
19139 # ---------------
19140 # Portably unset VAR.
19141 as_fn_unset ()
19142 {
19143   { eval $1=; unset $1;}
19144 }
19145 as_unset=as_fn_unset
19146 # as_fn_append VAR VALUE
19147 # ----------------------
19148 # Append the text in VALUE to the end of the definition contained in VAR. Take
19149 # advantage of any shell optimizations that allow amortized linear growth over
19150 # repeated appends, instead of the typical quadratic growth present in naive
19151 # implementations.
19152 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19153   eval 'as_fn_append ()
19154   {
19155     eval $1+=\$2
19156   }'
19157 else
19158   as_fn_append ()
19159   {
19160     eval $1=\$$1\$2
19161   }
19162 fi # as_fn_append
19163
19164 # as_fn_arith ARG...
19165 # ------------------
19166 # Perform arithmetic evaluation on the ARGs, and store the result in the
19167 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19168 # must be portable across $(()) and expr.
19169 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19170   eval 'as_fn_arith ()
19171   {
19172     as_val=$(( $* ))
19173   }'
19174 else
19175   as_fn_arith ()
19176   {
19177     as_val=`expr "$@" || test $? -eq 1`
19178   }
19179 fi # as_fn_arith
19180
19181
19182 if expr a : '\(a\)' >/dev/null 2>&1 &&
19183    test "X`expr 00001 : '.*\(...\)'`" = X001; then
19184   as_expr=expr
19185 else
19186   as_expr=false
19187 fi
19188
19189 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19190   as_basename=basename
19191 else
19192   as_basename=false
19193 fi
19194
19195 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19196   as_dirname=dirname
19197 else
19198   as_dirname=false
19199 fi
19200
19201 as_me=`$as_basename -- "$0" ||
19202 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19203          X"$0" : 'X\(//\)$' \| \
19204          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19205 $as_echo X/"$0" |
19206     sed '/^.*\/\([^/][^/]*\)\/*$/{
19207             s//\1/
19208             q
19209           }
19210           /^X\/\(\/\/\)$/{
19211             s//\1/
19212             q
19213           }
19214           /^X\/\(\/\).*/{
19215             s//\1/
19216             q
19217           }
19218           s/.*/./; q'`
19219
19220 # Avoid depending upon Character Ranges.
19221 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19222 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19223 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19224 as_cr_digits='0123456789'
19225 as_cr_alnum=$as_cr_Letters$as_cr_digits
19226
19227 ECHO_C= ECHO_N= ECHO_T=
19228 case `echo -n x` in #(((((
19229 -n*)
19230   case `echo 'xy\c'` in
19231   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
19232   xy)  ECHO_C='\c';;
19233   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19234        ECHO_T=' ';;
19235   esac;;
19236 *)
19237   ECHO_N='-n';;
19238 esac
19239
19240 rm -f conf$$ conf$$.exe conf$$.file
19241 if test -d conf$$.dir; then
19242   rm -f conf$$.dir/conf$$.file
19243 else
19244   rm -f conf$$.dir
19245   mkdir conf$$.dir 2>/dev/null
19246 fi
19247 if (echo >conf$$.file) 2>/dev/null; then
19248   if ln -s conf$$.file conf$$ 2>/dev/null; then
19249     as_ln_s='ln -s'
19250     # ... but there are two gotchas:
19251     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19252     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19253     # In both cases, we have to default to `cp -pR'.
19254     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19255       as_ln_s='cp -pR'
19256   elif ln conf$$.file conf$$ 2>/dev/null; then
19257     as_ln_s=ln
19258   else
19259     as_ln_s='cp -pR'
19260   fi
19261 else
19262   as_ln_s='cp -pR'
19263 fi
19264 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19265 rmdir conf$$.dir 2>/dev/null
19266
19267
19268 # as_fn_mkdir_p
19269 # -------------
19270 # Create "$as_dir" as a directory, including parents if necessary.
19271 as_fn_mkdir_p ()
19272 {
19273
19274   case $as_dir in #(
19275   -*) as_dir=./$as_dir;;
19276   esac
19277   test -d "$as_dir" || eval $as_mkdir_p || {
19278     as_dirs=
19279     while :; do
19280       case $as_dir in #(
19281       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19282       *) as_qdir=$as_dir;;
19283       esac
19284       as_dirs="'$as_qdir' $as_dirs"
19285       as_dir=`$as_dirname -- "$as_dir" ||
19286 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19287          X"$as_dir" : 'X\(//\)[^/]' \| \
19288          X"$as_dir" : 'X\(//\)$' \| \
19289          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19290 $as_echo X"$as_dir" |
19291     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19292             s//\1/
19293             q
19294           }
19295           /^X\(\/\/\)[^/].*/{
19296             s//\1/
19297             q
19298           }
19299           /^X\(\/\/\)$/{
19300             s//\1/
19301             q
19302           }
19303           /^X\(\/\).*/{
19304             s//\1/
19305             q
19306           }
19307           s/.*/./; q'`
19308       test -d "$as_dir" && break
19309     done
19310     test -z "$as_dirs" || eval "mkdir $as_dirs"
19311   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19312
19313
19314 } # as_fn_mkdir_p
19315 if mkdir -p . 2>/dev/null; then
19316   as_mkdir_p='mkdir -p "$as_dir"'
19317 else
19318   test -d ./-p && rmdir ./-p
19319   as_mkdir_p=false
19320 fi
19321
19322
19323 # as_fn_executable_p FILE
19324 # -----------------------
19325 # Test if FILE is an executable regular file.
19326 as_fn_executable_p ()
19327 {
19328   test -f "$1" && test -x "$1"
19329 } # as_fn_executable_p
19330 as_test_x='test -x'
19331 as_executable_p=as_fn_executable_p
19332
19333 # Sed expression to map a string onto a valid CPP name.
19334 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19335
19336 # Sed expression to map a string onto a valid variable name.
19337 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19338
19339
19340 exec 6>&1
19341 ## ----------------------------------- ##
19342 ## Main body of $CONFIG_STATUS script. ##
19343 ## ----------------------------------- ##
19344 _ASEOF
19345 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19346
19347 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19348 # Save the log message, to keep $0 and so on meaningful, and to
19349 # report actual input values of CONFIG_FILES etc. instead of their
19350 # values after options handling.
19351 ac_log="
19352 This file was extended by PostgreSQL $as_me 12devel, which was
19353 generated by GNU Autoconf 2.69.  Invocation command line was
19354
19355   CONFIG_FILES    = $CONFIG_FILES
19356   CONFIG_HEADERS  = $CONFIG_HEADERS
19357   CONFIG_LINKS    = $CONFIG_LINKS
19358   CONFIG_COMMANDS = $CONFIG_COMMANDS
19359   $ $0 $@
19360
19361 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19362 "
19363
19364 _ACEOF
19365
19366 case $ac_config_files in *"
19367 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19368 esac
19369
19370 case $ac_config_headers in *"
19371 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19372 esac
19373
19374
19375 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19376 # Files that config.status was made for.
19377 config_files="$ac_config_files"
19378 config_headers="$ac_config_headers"
19379 config_links="$ac_config_links"
19380 config_commands="$ac_config_commands"
19381
19382 _ACEOF
19383
19384 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19385 ac_cs_usage="\
19386 \`$as_me' instantiates files and other configuration actions
19387 from templates according to the current configuration.  Unless the files
19388 and actions are specified as TAGs, all are instantiated by default.
19389
19390 Usage: $0 [OPTION]... [TAG]...
19391
19392   -h, --help       print this help, then exit
19393   -V, --version    print version number and configuration settings, then exit
19394       --config     print configuration, then exit
19395   -q, --quiet, --silent
19396                    do not print progress messages
19397   -d, --debug      don't remove temporary files
19398       --recheck    update $as_me by reconfiguring in the same conditions
19399       --file=FILE[:TEMPLATE]
19400                    instantiate the configuration file FILE
19401       --header=FILE[:TEMPLATE]
19402                    instantiate the configuration header FILE
19403
19404 Configuration files:
19405 $config_files
19406
19407 Configuration headers:
19408 $config_headers
19409
19410 Configuration links:
19411 $config_links
19412
19413 Configuration commands:
19414 $config_commands
19415
19416 Report bugs to <pgsql-bugs@postgresql.org>."
19417
19418 _ACEOF
19419 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19420 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19421 ac_cs_version="\\
19422 PostgreSQL config.status 12devel
19423 configured by $0, generated by GNU Autoconf 2.69,
19424   with options \\"\$ac_cs_config\\"
19425
19426 Copyright (C) 2012 Free Software Foundation, Inc.
19427 This config.status script is free software; the Free Software Foundation
19428 gives unlimited permission to copy, distribute and modify it."
19429
19430 ac_pwd='$ac_pwd'
19431 srcdir='$srcdir'
19432 INSTALL='$INSTALL'
19433 MKDIR_P='$MKDIR_P'
19434 AWK='$AWK'
19435 test -n "\$AWK" || AWK=awk
19436 _ACEOF
19437
19438 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19439 # The default lists apply if the user does not specify any file.
19440 ac_need_defaults=:
19441 while test $# != 0
19442 do
19443   case $1 in
19444   --*=?*)
19445     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19446     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19447     ac_shift=:
19448     ;;
19449   --*=)
19450     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19451     ac_optarg=
19452     ac_shift=:
19453     ;;
19454   *)
19455     ac_option=$1
19456     ac_optarg=$2
19457     ac_shift=shift
19458     ;;
19459   esac
19460
19461   case $ac_option in
19462   # Handling of the options.
19463   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19464     ac_cs_recheck=: ;;
19465   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19466     $as_echo "$ac_cs_version"; exit ;;
19467   --config | --confi | --conf | --con | --co | --c )
19468     $as_echo "$ac_cs_config"; exit ;;
19469   --debug | --debu | --deb | --de | --d | -d )
19470     debug=: ;;
19471   --file | --fil | --fi | --f )
19472     $ac_shift
19473     case $ac_optarg in
19474     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19475     '') as_fn_error $? "missing file argument" ;;
19476     esac
19477     as_fn_append CONFIG_FILES " '$ac_optarg'"
19478     ac_need_defaults=false;;
19479   --header | --heade | --head | --hea )
19480     $ac_shift
19481     case $ac_optarg in
19482     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19483     esac
19484     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19485     ac_need_defaults=false;;
19486   --he | --h)
19487     # Conflict between --help and --header
19488     as_fn_error $? "ambiguous option: \`$1'
19489 Try \`$0 --help' for more information.";;
19490   --help | --hel | -h )
19491     $as_echo "$ac_cs_usage"; exit ;;
19492   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19493   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19494     ac_cs_silent=: ;;
19495
19496   # This is an error.
19497   -*) as_fn_error $? "unrecognized option: \`$1'
19498 Try \`$0 --help' for more information." ;;
19499
19500   *) as_fn_append ac_config_targets " $1"
19501      ac_need_defaults=false ;;
19502
19503   esac
19504   shift
19505 done
19506
19507 ac_configure_extra_args=
19508
19509 if $ac_cs_silent; then
19510   exec 6>/dev/null
19511   ac_configure_extra_args="$ac_configure_extra_args --silent"
19512 fi
19513
19514 _ACEOF
19515 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19516 if \$ac_cs_recheck; then
19517   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19518   shift
19519   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19520   CONFIG_SHELL='$SHELL'
19521   export CONFIG_SHELL
19522   exec "\$@"
19523 fi
19524
19525 _ACEOF
19526 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19527 exec 5>>config.log
19528 {
19529   echo
19530   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19531 ## Running $as_me. ##
19532 _ASBOX
19533   $as_echo "$ac_log"
19534 } >&5
19535
19536 _ACEOF
19537 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19538 _ACEOF
19539
19540 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19541
19542 # Handling of arguments.
19543 for ac_config_target in $ac_config_targets
19544 do
19545   case $ac_config_target in
19546     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19547     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19548     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19549     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
19550     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19551     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19552     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
19553     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19554     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19555     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19556     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19557     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19558     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19559
19560   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19561   esac
19562 done
19563
19564
19565 # If the user did not use the arguments to specify the items to instantiate,
19566 # then the envvar interface is used.  Set only those that are not.
19567 # We use the long form for the default assignment because of an extremely
19568 # bizarre bug on SunOS 4.1.3.
19569 if $ac_need_defaults; then
19570   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19571   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19572   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19573   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19574 fi
19575
19576 # Have a temporary directory for convenience.  Make it in the build tree
19577 # simply because there is no reason against having it here, and in addition,
19578 # creating and moving files from /tmp can sometimes cause problems.
19579 # Hook for its removal unless debugging.
19580 # Note that there is a small window in which the directory will not be cleaned:
19581 # after its creation but before its name has been assigned to `$tmp'.
19582 $debug ||
19583 {
19584   tmp= ac_tmp=
19585   trap 'exit_status=$?
19586   : "${ac_tmp:=$tmp}"
19587   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19588 ' 0
19589   trap 'as_fn_exit 1' 1 2 13 15
19590 }
19591 # Create a (secure) tmp directory for tmp files.
19592
19593 {
19594   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19595   test -d "$tmp"
19596 }  ||
19597 {
19598   tmp=./conf$$-$RANDOM
19599   (umask 077 && mkdir "$tmp")
19600 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19601 ac_tmp=$tmp
19602
19603 # Set up the scripts for CONFIG_FILES section.
19604 # No need to generate them if there are no CONFIG_FILES.
19605 # This happens for instance with `./config.status config.h'.
19606 if test -n "$CONFIG_FILES"; then
19607
19608
19609 ac_cr=`echo X | tr X '\015'`
19610 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19611 # But we know of no other shell where ac_cr would be empty at this
19612 # point, so we can use a bashism as a fallback.
19613 if test "x$ac_cr" = x; then
19614   eval ac_cr=\$\'\\r\'
19615 fi
19616 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19617 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19618   ac_cs_awk_cr='\\r'
19619 else
19620   ac_cs_awk_cr=$ac_cr
19621 fi
19622
19623 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19624 _ACEOF
19625
19626
19627 {
19628   echo "cat >conf$$subs.awk <<_ACEOF" &&
19629   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19630   echo "_ACEOF"
19631 } >conf$$subs.sh ||
19632   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19633 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19634 ac_delim='%!_!# '
19635 for ac_last_try in false false false false false :; do
19636   . ./conf$$subs.sh ||
19637     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19638
19639   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19640   if test $ac_delim_n = $ac_delim_num; then
19641     break
19642   elif $ac_last_try; then
19643     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19644   else
19645     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19646   fi
19647 done
19648 rm -f conf$$subs.sh
19649
19650 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19651 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19652 _ACEOF
19653 sed -n '
19654 h
19655 s/^/S["/; s/!.*/"]=/
19656 p
19657 g
19658 s/^[^!]*!//
19659 :repl
19660 t repl
19661 s/'"$ac_delim"'$//
19662 t delim
19663 :nl
19664 h
19665 s/\(.\{148\}\)..*/\1/
19666 t more1
19667 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19668 p
19669 n
19670 b repl
19671 :more1
19672 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19673 p
19674 g
19675 s/.\{148\}//
19676 t nl
19677 :delim
19678 h
19679 s/\(.\{148\}\)..*/\1/
19680 t more2
19681 s/["\\]/\\&/g; s/^/"/; s/$/"/
19682 p
19683 b
19684 :more2
19685 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19686 p
19687 g
19688 s/.\{148\}//
19689 t delim
19690 ' <conf$$subs.awk | sed '
19691 /^[^""]/{
19692   N
19693   s/\n//
19694 }
19695 ' >>$CONFIG_STATUS || ac_write_fail=1
19696 rm -f conf$$subs.awk
19697 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19698 _ACAWK
19699 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19700   for (key in S) S_is_set[key] = 1
19701   FS = "\a"
19702
19703 }
19704 {
19705   line = $ 0
19706   nfields = split(line, field, "@")
19707   substed = 0
19708   len = length(field[1])
19709   for (i = 2; i < nfields; i++) {
19710     key = field[i]
19711     keylen = length(key)
19712     if (S_is_set[key]) {
19713       value = S[key]
19714       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19715       len += length(value) + length(field[++i])
19716       substed = 1
19717     } else
19718       len += 1 + keylen
19719   }
19720
19721   print line
19722 }
19723
19724 _ACAWK
19725 _ACEOF
19726 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19727 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19728   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19729 else
19730   cat
19731 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19732   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19733 _ACEOF
19734
19735 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19736 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19737 # trailing colons and then remove the whole line if VPATH becomes empty
19738 # (actually we leave an empty line to preserve line numbers).
19739 if test "x$srcdir" = x.; then
19740   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
19741 h
19742 s///
19743 s/^/:/
19744 s/[      ]*$/:/
19745 s/:\$(srcdir):/:/g
19746 s/:\${srcdir}:/:/g
19747 s/:@srcdir@:/:/g
19748 s/^:*//
19749 s/:*$//
19750 x
19751 s/\(=[   ]*\).*/\1/
19752 G
19753 s/\n//
19754 s/^[^=]*=[       ]*$//
19755 }'
19756 fi
19757
19758 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19759 fi # test -n "$CONFIG_FILES"
19760
19761 # Set up the scripts for CONFIG_HEADERS section.
19762 # No need to generate them if there are no CONFIG_HEADERS.
19763 # This happens for instance with `./config.status Makefile'.
19764 if test -n "$CONFIG_HEADERS"; then
19765 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19766 BEGIN {
19767 _ACEOF
19768
19769 # Transform confdefs.h into an awk script `defines.awk', embedded as
19770 # here-document in config.status, that substitutes the proper values into
19771 # config.h.in to produce config.h.
19772
19773 # Create a delimiter string that does not exist in confdefs.h, to ease
19774 # handling of long lines.
19775 ac_delim='%!_!# '
19776 for ac_last_try in false false :; do
19777   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19778   if test -z "$ac_tt"; then
19779     break
19780   elif $ac_last_try; then
19781     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19782   else
19783     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19784   fi
19785 done
19786
19787 # For the awk script, D is an array of macro values keyed by name,
19788 # likewise P contains macro parameters if any.  Preserve backslash
19789 # newline sequences.
19790
19791 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19792 sed -n '
19793 s/.\{148\}/&'"$ac_delim"'/g
19794 t rset
19795 :rset
19796 s/^[     ]*#[    ]*define[       ][      ]*/ /
19797 t def
19798 d
19799 :def
19800 s/\\$//
19801 t bsnl
19802 s/["\\]/\\&/g
19803 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19804 D["\1"]=" \3"/p
19805 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
19806 d
19807 :bsnl
19808 s/["\\]/\\&/g
19809 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19810 D["\1"]=" \3\\\\\\n"\\/p
19811 t cont
19812 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19813 t cont
19814 d
19815 :cont
19816 n
19817 s/.\{148\}/&'"$ac_delim"'/g
19818 t clear
19819 :clear
19820 s/\\$//
19821 t bsnlc
19822 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19823 d
19824 :bsnlc
19825 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19826 b cont
19827 ' <confdefs.h | sed '
19828 s/'"$ac_delim"'/"\\\
19829 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19830
19831 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19832   for (key in D) D_is_set[key] = 1
19833   FS = "\a"
19834 }
19835 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19836   line = \$ 0
19837   split(line, arg, " ")
19838   if (arg[1] == "#") {
19839     defundef = arg[2]
19840     mac1 = arg[3]
19841   } else {
19842     defundef = substr(arg[1], 2)
19843     mac1 = arg[2]
19844   }
19845   split(mac1, mac2, "(") #)
19846   macro = mac2[1]
19847   prefix = substr(line, 1, index(line, defundef) - 1)
19848   if (D_is_set[macro]) {
19849     # Preserve the white space surrounding the "#".
19850     print prefix "define", macro P[macro] D[macro]
19851     next
19852   } else {
19853     # Replace #undef with comments.  This is necessary, for example,
19854     # in the case of _POSIX_SOURCE, which is predefined and required
19855     # on some systems where configure will not decide to define it.
19856     if (defundef == "undef") {
19857       print "/*", prefix defundef, macro, "*/"
19858       next
19859     }
19860   }
19861 }
19862 { print }
19863 _ACAWK
19864 _ACEOF
19865 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19866   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
19867 fi # test -n "$CONFIG_HEADERS"
19868
19869
19870 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
19871 shift
19872 for ac_tag
19873 do
19874   case $ac_tag in
19875   :[FHLC]) ac_mode=$ac_tag; continue;;
19876   esac
19877   case $ac_mode$ac_tag in
19878   :[FHL]*:*);;
19879   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
19880   :[FH]-) ac_tag=-:-;;
19881   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19882   esac
19883   ac_save_IFS=$IFS
19884   IFS=:
19885   set x $ac_tag
19886   IFS=$ac_save_IFS
19887   shift
19888   ac_file=$1
19889   shift
19890
19891   case $ac_mode in
19892   :L) ac_source=$1;;
19893   :[FH])
19894     ac_file_inputs=
19895     for ac_f
19896     do
19897       case $ac_f in
19898       -) ac_f="$ac_tmp/stdin";;
19899       *) # Look for the file first in the build tree, then in the source tree
19900          # (if the path is not absolute).  The absolute path cannot be DOS-style,
19901          # because $ac_f cannot contain `:'.
19902          test -f "$ac_f" ||
19903            case $ac_f in
19904            [\\/$]*) false;;
19905            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19906            esac ||
19907            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
19908       esac
19909       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19910       as_fn_append ac_file_inputs " '$ac_f'"
19911     done
19912
19913     # Let's still pretend it is `configure' which instantiates (i.e., don't
19914     # use $as_me), people would be surprised to read:
19915     #    /* config.h.  Generated by config.status.  */
19916     configure_input='Generated from '`
19917           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19918         `' by configure.'
19919     if test x"$ac_file" != x-; then
19920       configure_input="$ac_file.  $configure_input"
19921       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19922 $as_echo "$as_me: creating $ac_file" >&6;}
19923     fi
19924     # Neutralize special characters interpreted by sed in replacement strings.
19925     case $configure_input in #(
19926     *\&* | *\|* | *\\* )
19927        ac_sed_conf_input=`$as_echo "$configure_input" |
19928        sed 's/[\\\\&|]/\\\\&/g'`;; #(
19929     *) ac_sed_conf_input=$configure_input;;
19930     esac
19931
19932     case $ac_tag in
19933     *:-:* | *:-) cat >"$ac_tmp/stdin" \
19934       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
19935     esac
19936     ;;
19937   esac
19938
19939   ac_dir=`$as_dirname -- "$ac_file" ||
19940 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19941          X"$ac_file" : 'X\(//\)[^/]' \| \
19942          X"$ac_file" : 'X\(//\)$' \| \
19943          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19944 $as_echo X"$ac_file" |
19945     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19946             s//\1/
19947             q
19948           }
19949           /^X\(\/\/\)[^/].*/{
19950             s//\1/
19951             q
19952           }
19953           /^X\(\/\/\)$/{
19954             s//\1/
19955             q
19956           }
19957           /^X\(\/\).*/{
19958             s//\1/
19959             q
19960           }
19961           s/.*/./; q'`
19962   as_dir="$ac_dir"; as_fn_mkdir_p
19963   ac_builddir=.
19964
19965 case "$ac_dir" in
19966 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19967 *)
19968   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19969   # A ".." for each directory in $ac_dir_suffix.
19970   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19971   case $ac_top_builddir_sub in
19972   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19973   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19974   esac ;;
19975 esac
19976 ac_abs_top_builddir=$ac_pwd
19977 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19978 # for backward compatibility:
19979 ac_top_builddir=$ac_top_build_prefix
19980
19981 case $srcdir in
19982   .)  # We are building in place.
19983     ac_srcdir=.
19984     ac_top_srcdir=$ac_top_builddir_sub
19985     ac_abs_top_srcdir=$ac_pwd ;;
19986   [\\/]* | ?:[\\/]* )  # Absolute name.
19987     ac_srcdir=$srcdir$ac_dir_suffix;
19988     ac_top_srcdir=$srcdir
19989     ac_abs_top_srcdir=$srcdir ;;
19990   *) # Relative name.
19991     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19992     ac_top_srcdir=$ac_top_build_prefix$srcdir
19993     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19994 esac
19995 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19996
19997
19998   case $ac_mode in
19999   :F)
20000   #
20001   # CONFIG_FILE
20002   #
20003
20004   case $INSTALL in
20005   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20006   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20007   esac
20008   ac_MKDIR_P=$MKDIR_P
20009   case $MKDIR_P in
20010   [\\/$]* | ?:[\\/]* ) ;;
20011   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20012   esac
20013 _ACEOF
20014
20015 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20016 # If the template does not know about datarootdir, expand it.
20017 # FIXME: This hack should be removed a few years after 2.60.
20018 ac_datarootdir_hack=; ac_datarootdir_seen=
20019 ac_sed_dataroot='
20020 /datarootdir/ {
20021   p
20022   q
20023 }
20024 /@datadir@/p
20025 /@docdir@/p
20026 /@infodir@/p
20027 /@localedir@/p
20028 /@mandir@/p'
20029 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20030 *datarootdir*) ac_datarootdir_seen=yes;;
20031 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20032   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20033 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20034 _ACEOF
20035 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20036   ac_datarootdir_hack='
20037   s&@datadir@&$datadir&g
20038   s&@docdir@&$docdir&g
20039   s&@infodir@&$infodir&g
20040   s&@localedir@&$localedir&g
20041   s&@mandir@&$mandir&g
20042   s&\\\${datarootdir}&$datarootdir&g' ;;
20043 esac
20044 _ACEOF
20045
20046 # Neutralize VPATH when `$srcdir' = `.'.
20047 # Shell code in configure.ac might set extrasub.
20048 # FIXME: do we really want to maintain this feature?
20049 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20050 ac_sed_extra="$ac_vpsub
20051 $extrasub
20052 _ACEOF
20053 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20054 :t
20055 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20056 s|@configure_input@|$ac_sed_conf_input|;t t
20057 s&@top_builddir@&$ac_top_builddir_sub&;t t
20058 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20059 s&@srcdir@&$ac_srcdir&;t t
20060 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20061 s&@top_srcdir@&$ac_top_srcdir&;t t
20062 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20063 s&@builddir@&$ac_builddir&;t t
20064 s&@abs_builddir@&$ac_abs_builddir&;t t
20065 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20066 s&@INSTALL@&$ac_INSTALL&;t t
20067 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20068 $ac_datarootdir_hack
20069 "
20070 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20071   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20072
20073 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20074   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20075   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20076       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20077   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20078 which seems to be undefined.  Please make sure it is defined" >&5
20079 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20080 which seems to be undefined.  Please make sure it is defined" >&2;}
20081
20082   rm -f "$ac_tmp/stdin"
20083   case $ac_file in
20084   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20085   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20086   esac \
20087   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20088  ;;
20089   :H)
20090   #
20091   # CONFIG_HEADER
20092   #
20093   if test x"$ac_file" != x-; then
20094     {
20095       $as_echo "/* $configure_input  */" \
20096       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20097     } >"$ac_tmp/config.h" \
20098       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20099     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20100       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20101 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20102     else
20103       rm -f "$ac_file"
20104       mv "$ac_tmp/config.h" "$ac_file" \
20105         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20106     fi
20107   else
20108     $as_echo "/* $configure_input  */" \
20109       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20110       || as_fn_error $? "could not create -" "$LINENO" 5
20111   fi
20112  ;;
20113   :L)
20114   #
20115   # CONFIG_LINK
20116   #
20117
20118   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20119     :
20120   else
20121     # Prefer the file from the source tree if names are identical.
20122     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20123       ac_source=$srcdir/$ac_source
20124     fi
20125
20126     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20127 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20128
20129     if test ! -r "$ac_source"; then
20130       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20131     fi
20132     rm -f "$ac_file"
20133
20134     # Try a relative symlink, then a hard link, then a copy.
20135     case $ac_source in
20136     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20137         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20138     esac
20139     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20140       ln "$ac_source" "$ac_file" 2>/dev/null ||
20141       cp -p "$ac_source" "$ac_file" ||
20142       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20143   fi
20144  ;;
20145   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20146 $as_echo "$as_me: executing $ac_file commands" >&6;}
20147  ;;
20148   esac
20149
20150
20151   case $ac_file$ac_mode in
20152     "check_win32_symlinks":C)
20153 # Links sometimes fail undetected on Mingw -
20154 # so here we detect it and warn the user
20155 for FILE in $CONFIG_LINKS
20156  do
20157         # test -e works for symlinks in the MinGW console
20158         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20159 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20160  done
20161  ;;
20162     "src/include/pg_config.h":H)
20163 # Update timestamp for pg_config.h (see Makefile.global)
20164 echo >src/include/stamp-h
20165  ;;
20166     "src/include/pg_config_ext.h":H)
20167 # Update timestamp for pg_config_ext.h (see Makefile.global)
20168 echo >src/include/stamp-ext-h
20169  ;;
20170     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20171
20172   esac
20173 done # for ac_tag
20174
20175
20176 as_fn_exit 0
20177 _ACEOF
20178 ac_clean_files=$ac_clean_files_save
20179
20180 test $ac_write_fail = 0 ||
20181   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20182
20183
20184 # configure is writing to config.log, and then calls config.status.
20185 # config.status does its own redirection, appending to config.log.
20186 # Unfortunately, on DOS this fails, as config.log is still kept open
20187 # by configure, so config.status won't be able to write to it; its
20188 # output is simply discarded.  So we exec the FD to /dev/null,
20189 # effectively closing config.log, so it can be properly (re)opened and
20190 # appended to by config.status.  When coming back to configure, we
20191 # need to make the FD available again.
20192 if test "$no_create" != yes; then
20193   ac_cs_success=:
20194   ac_config_status_args=
20195   test "$silent" = yes &&
20196     ac_config_status_args="$ac_config_status_args --quiet"
20197   exec 5>/dev/null
20198   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20199   exec 5>>config.log
20200   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20201   # would make configure fail if this is the last instruction.
20202   $ac_cs_success || as_fn_exit 1
20203 fi
20204 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20205   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20206 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20207 fi
20208